<commit_before>import Foundation

#if os(iOS)
import UIKit
#elseif os(OSX)
import AppKit
#endif
///
/// MacawView is a main class used to embed Macaw scene into your Cocoa UI.
/// You could create your own view extended from MacawView with predefined scene.
///
open class MacawView: MView, MGestureRecognizerDelegate {

    /// Scene root node
    open var node: Node = Group() {
        willSet {
            nodesMap.remove(node)
        }

        didSet {
            layoutHelper.nodeChanged()
            nodesMap.add(node, view: self)
            self.renderer?.dispose()
            if let cache = animationCache {
                self.renderer = RenderUtils.createNodeRenderer(node, view: self, animationCache: cache)
            }

            if let _ = superview {
                animationProducer.addStoredAnimations(node)
            }

            self.setNeedsDisplay()
        }
    }

    open var contentLayout: ContentLayout = .none {
        didSet {
            layoutHelper.layoutChanged()
            setNeedsDisplay()
        }
    }

    open override var contentMode: MViewContentMode {
        didSet {<commit_msg>Added invalidating intrinsic content size<commit_after>import Foundation

#if os(iOS)
import UIKit
#elseif os(OSX)
import AppKit
#endif
///
/// MacawView is a main class used to embed Macaw scene into your Cocoa UI.
/// You could create your own view extended from MacawView with predefined scene.
///
open class MacawView: MView, MGestureRecognizerDelegate {

    /// Scene root node
    open var node: Node = Group() {
        willSet {
            nodesMap.remove(node)
        }

        didSet {
            layoutHelper.nodeChanged()
            nodesMap.add(node, view: self)
            self.renderer?.dispose()
            if let cache = animationCache {
                self.renderer = RenderUtils.createNodeRenderer(node, view: self, animationCache: cache)
            }

            if let _ = superview {
                animationProducer.addStoredAnimations(node)
            }

            self.setNeedsDisplay()
            invalidateIntrinsicContentSize()
        }
    }

    open var contentLayout: ContentLayout = .none {
        didSet {
            layoutHelper.layoutChanged()
            setNeedsDisplay()
            invalidateIntrinsicContentSize()
        }
    }

    open override var contentMode: MViewContentMode {
        didSet {
{'fraction_non_alphanumeric': 0.07813798836242726, 'fraction_numerical': 0.0, 'mean_word_length': 1.9461444308445532, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '941235', 'n_tokens_mistral': 653, 'n_tokens_neox': 629, 'n_words': 180}