@open-pencil/scene-graph 0.17.0 → 0.18.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/behaviours/index.d.ts +3 -2
- package/dist/behaviours/index.js +2 -1
- package/dist/behaviours/kinds.d.ts.map +1 -1
- package/dist/behaviours/kinds.js +15 -8
- package/dist/behaviours/kinds.js.map +1 -1
- package/dist/behaviours/model.d.ts +2 -2
- package/dist/behaviours/model.d.ts.map +1 -1
- package/dist/behaviours/model.js.map +1 -1
- package/dist/behaviours/schema.d.ts +136 -1
- package/dist/behaviours/schema.d.ts.map +1 -1
- package/dist/behaviours/schema.js +17 -2
- package/dist/behaviours/schema.js.map +1 -1
- package/dist/behaviours/spec.d.ts.map +1 -1
- package/dist/behaviours/spec.js +4 -0
- package/dist/behaviours/spec.js.map +1 -1
- package/dist/behaviours/transition.d.ts +23 -0
- package/dist/behaviours/transition.d.ts.map +1 -0
- package/dist/behaviours/transition.js +36 -0
- package/dist/behaviours/transition.js.map +1 -0
- package/dist/checkpoint.d.ts.map +1 -1
- package/dist/checkpoint.js +2 -0
- package/dist/checkpoint.js.map +1 -1
- package/dist/color/index.d.ts +12 -9
- package/dist/color/index.d.ts.map +1 -1
- package/dist/color/index.js +15 -25
- package/dist/color/index.js.map +1 -1
- package/dist/color/management.d.ts +51 -23
- package/dist/color/management.d.ts.map +1 -1
- package/dist/color/management.js +154 -149
- package/dist/color/management.js.map +1 -1
- package/dist/color/okhcl.d.ts +28 -10
- package/dist/color/okhcl.d.ts.map +1 -1
- package/dist/color/okhcl.js +56 -40
- package/dist/color/okhcl.js.map +1 -1
- package/dist/color/schema.d.ts +6 -1
- package/dist/color/schema.d.ts.map +1 -1
- package/dist/color/schema.js +10 -1
- package/dist/color/schema.js.map +1 -1
- package/dist/constraints.d.ts.map +1 -1
- package/dist/constraints.js +2 -1
- package/dist/constraints.js.map +1 -1
- package/dist/copy.d.ts +7 -1
- package/dist/copy.d.ts.map +1 -1
- package/dist/copy.js +22 -1
- package/dist/copy.js.map +1 -1
- package/dist/corners.d.ts +3 -1
- package/dist/corners.d.ts.map +1 -1
- package/dist/corners.js +3 -1
- package/dist/corners.js.map +1 -1
- package/dist/css/grid.js +1 -1
- package/dist/css/index.d.ts +2 -1
- package/dist/css/index.js +3 -2
- package/dist/css/motion.d.ts +12 -0
- package/dist/css/motion.d.ts.map +1 -0
- package/dist/css/motion.js +60 -0
- package/dist/css/motion.js.map +1 -0
- package/dist/css/shadows.d.ts +4 -3
- package/dist/css/shadows.d.ts.map +1 -1
- package/dist/css/shadows.js +7 -6
- package/dist/css/shadows.js.map +1 -1
- package/dist/css/values.d.ts +3 -2
- package/dist/css/values.d.ts.map +1 -1
- package/dist/css/values.js +4 -4
- package/dist/css/values.js.map +1 -1
- package/dist/fields/index.d.ts +2 -2
- package/dist/fields/index.js +2 -2
- package/dist/fields/layout.d.ts +3 -1
- package/dist/fields/layout.d.ts.map +1 -1
- package/dist/fields/layout.js +9 -1
- package/dist/fields/layout.js.map +1 -1
- package/dist/figjam/palette.js +1 -1
- package/dist/font-style.d.ts.map +1 -1
- package/dist/font-style.js +7 -3
- package/dist/font-style.js.map +1 -1
- package/dist/generated/index.d.ts +6 -2
- package/dist/generated/index.d.ts.map +1 -1
- package/dist/generated/index.js +14 -4
- package/dist/generated/index.js.map +1 -1
- package/dist/geometry.d.ts +6 -1
- package/dist/geometry.d.ts.map +1 -1
- package/dist/geometry.js +10 -2
- package/dist/geometry.js.map +1 -1
- package/dist/graph.d.ts +29 -4
- package/dist/graph.d.ts.map +1 -1
- package/dist/graph.js +59 -9
- package/dist/graph.js.map +1 -1
- package/dist/group-bounds.d.ts +5 -2
- package/dist/group-bounds.d.ts.map +1 -1
- package/dist/group-bounds.js +38 -8
- package/dist/group-bounds.js.map +1 -1
- package/dist/hit-test.d.ts.map +1 -1
- package/dist/hit-test.js +19 -8
- package/dist/hit-test.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/instances/content-size.js +1 -1
- package/dist/instances/fields.d.ts +2 -2
- package/dist/instances/fields.d.ts.map +1 -1
- package/dist/instances/fields.js +2 -0
- package/dist/instances/fields.js.map +1 -1
- package/dist/instances/index.d.ts.map +1 -1
- package/dist/instances/index.js +50 -11
- package/dist/instances/index.js.map +1 -1
- package/dist/instances/sync.js +67 -7
- package/dist/instances/sync.js.map +1 -1
- package/dist/layout/flow.d.ts +16 -0
- package/dist/layout/flow.d.ts.map +1 -0
- package/dist/layout/flow.js +34 -0
- package/dist/layout/flow.js.map +1 -0
- package/dist/layout/index.d.ts +4 -3
- package/dist/layout/index.js +4 -3
- package/dist/layout/keywords.d.ts.map +1 -1
- package/dist/layout/keywords.js +7 -1
- package/dist/layout/keywords.js.map +1 -1
- package/dist/layout/sizing.d.ts +9 -1
- package/dist/layout/sizing.d.ts.map +1 -1
- package/dist/layout/sizing.js +17 -1
- package/dist/layout/sizing.js.map +1 -1
- package/dist/layout/spacing.d.ts +7 -1
- package/dist/layout/spacing.d.ts.map +1 -1
- package/dist/layout/spacing.js +10 -1
- package/dist/layout/spacing.js.map +1 -1
- package/dist/mesh/geometry.d.ts +83 -0
- package/dist/mesh/geometry.d.ts.map +1 -0
- package/dist/mesh/geometry.js +441 -0
- package/dist/mesh/geometry.js.map +1 -0
- package/dist/mesh/index.d.ts +4 -0
- package/dist/mesh/index.js +4 -0
- package/dist/mesh/model.d.ts +28 -0
- package/dist/mesh/model.d.ts.map +1 -0
- package/dist/mesh/model.js +40 -0
- package/dist/mesh/model.js.map +1 -0
- package/dist/mesh/schema.d.ts +191 -0
- package/dist/mesh/schema.d.ts.map +1 -0
- package/dist/mesh/schema.js +56 -0
- package/dist/mesh/schema.js.map +1 -0
- package/dist/mutation-impact.d.ts +2 -0
- package/dist/mutation-impact.d.ts.map +1 -1
- package/dist/mutation-impact.js +18 -7
- package/dist/mutation-impact.js.map +1 -1
- package/dist/node-defaults.d.ts +3 -1
- package/dist/node-defaults.d.ts.map +1 -1
- package/dist/node-defaults.js +22 -6
- package/dist/node-defaults.js.map +1 -1
- package/dist/paints/index.d.ts +5 -3
- package/dist/paints/index.js +5 -3
- package/dist/paints/pattern.d.ts +5 -1
- package/dist/paints/pattern.d.ts.map +1 -1
- package/dist/paints/pattern.js +33 -1
- package/dist/paints/pattern.js.map +1 -1
- package/dist/paints/shows.d.ts +4 -1
- package/dist/paints/shows.d.ts.map +1 -1
- package/dist/paints/shows.js +8 -1
- package/dist/paints/shows.js.map +1 -1
- package/dist/paints/solid.d.ts +11 -0
- package/dist/paints/solid.d.ts.map +1 -0
- package/dist/paints/solid.js +18 -0
- package/dist/paints/solid.js.map +1 -0
- package/dist/paints/stills.d.ts +74 -0
- package/dist/paints/stills.d.ts.map +1 -0
- package/dist/paints/stills.js +113 -0
- package/dist/paints/stills.js.map +1 -0
- package/dist/plugin-data/field.d.ts.map +1 -1
- package/dist/plugin-data/field.js +2 -0
- package/dist/plugin-data/field.js.map +1 -1
- package/dist/plugin-data/fields.d.ts +67 -0
- package/dist/plugin-data/fields.d.ts.map +1 -1
- package/dist/plugin-data/fields.js +12 -7
- package/dist/plugin-data/fields.js.map +1 -1
- package/dist/resize.d.ts +10 -3
- package/dist/resize.d.ts.map +1 -1
- package/dist/resize.js +34 -3
- package/dist/resize.js.map +1 -1
- package/dist/scaling/index.d.ts +2 -2
- package/dist/scaling/index.js +2 -2
- package/dist/scaling/node.d.ts +2 -1
- package/dist/scaling/node.d.ts.map +1 -1
- package/dist/scaling/node.js +27 -7
- package/dist/scaling/node.js.map +1 -1
- package/dist/shaders/index.d.ts +2 -3
- package/dist/shaders/index.js +2 -3
- package/dist/shaders/model.d.ts +3 -11
- package/dist/shaders/model.d.ts.map +1 -1
- package/dist/shaders/model.js +13 -36
- package/dist/shaders/model.js.map +1 -1
- package/dist/shaders/schema.d.ts +1 -1
- package/dist/shaders/schema.js +1 -1
- package/dist/shaders/schema.js.map +1 -1
- package/dist/shape-with-text/document.js +276 -0
- package/dist/shape-with-text/document.js.map +1 -0
- package/dist/shape-with-text/geometry.d.ts +13 -1
- package/dist/shape-with-text/geometry.d.ts.map +1 -1
- package/dist/shape-with-text/geometry.js +103 -41
- package/dist/shape-with-text/geometry.js.map +1 -1
- package/dist/shape-with-text/index.d.ts +2 -2
- package/dist/shape-with-text/index.js +2 -2
- package/dist/shared-style-index.d.ts +21 -0
- package/dist/shared-style-index.d.ts.map +1 -0
- package/dist/shared-style-index.js +72 -0
- package/dist/shared-style-index.js.map +1 -0
- package/dist/shared-styles.d.ts +3 -3
- package/dist/shared-styles.d.ts.map +1 -1
- package/dist/shared-styles.js +16 -7
- package/dist/shared-styles.js.map +1 -1
- package/dist/slides/drop.d.ts +32 -0
- package/dist/slides/drop.d.ts.map +1 -0
- package/dist/slides/drop.js +81 -0
- package/dist/slides/drop.js.map +1 -0
- package/dist/slides/index.d.ts +56 -0
- package/dist/slides/index.d.ts.map +1 -0
- package/dist/slides/index.js +134 -0
- package/dist/slides/index.js.map +1 -0
- package/dist/slides/motion.d.ts +55 -0
- package/dist/slides/motion.d.ts.map +1 -0
- package/dist/slides/motion.js +142 -0
- package/dist/slides/motion.js.map +1 -0
- package/dist/slides/playback.d.ts +59 -0
- package/dist/slides/playback.d.ts.map +1 -0
- package/dist/slides/playback.js +188 -0
- package/dist/slides/playback.js.map +1 -0
- package/dist/slides/types.d.ts +62 -0
- package/dist/slides/types.d.ts.map +1 -0
- package/dist/slides/types.js +39 -0
- package/dist/slides/types.js.map +1 -0
- package/dist/statuses/workflow.js +1 -1
- package/dist/text/direction.d.ts +6 -3
- package/dist/text/direction.d.ts.map +1 -1
- package/dist/text/direction.js +12 -12
- package/dist/text/direction.js.map +1 -1
- package/dist/text/index.d.ts +2 -1
- package/dist/text/index.js +3 -2
- package/dist/text/name.d.ts +22 -0
- package/dist/text/name.d.ts.map +1 -0
- package/dist/text/name.js +38 -0
- package/dist/text/name.js.map +1 -0
- package/dist/text/references.d.ts.map +1 -1
- package/dist/text/references.js +1 -2
- package/dist/text/references.js.map +1 -1
- package/dist/thumbnail.d.ts +23 -0
- package/dist/thumbnail.d.ts.map +1 -0
- package/dist/thumbnail.js +47 -0
- package/dist/thumbnail.js.map +1 -0
- package/dist/transfer/apply.d.ts.map +1 -1
- package/dist/transfer/apply.js +14 -3
- package/dist/transfer/apply.js.map +1 -1
- package/dist/transfer/copied.d.ts +6 -1
- package/dist/transfer/copied.d.ts.map +1 -1
- package/dist/transfer/copied.js +2 -2
- package/dist/transfer/copied.js.map +1 -1
- package/dist/transfer/dependencies.d.ts +4 -1
- package/dist/transfer/dependencies.d.ts.map +1 -1
- package/dist/transfer/dependencies.js +10 -1
- package/dist/transfer/dependencies.js.map +1 -1
- package/dist/transfer/history.js +2 -0
- package/dist/transfer/history.js.map +1 -1
- package/dist/transfer/identity.js +18 -3
- package/dist/transfer/identity.js.map +1 -1
- package/dist/transfer/index.d.ts +2 -1
- package/dist/transfer/index.js +4 -3
- package/dist/transfer/library.d.ts +45 -0
- package/dist/transfer/library.d.ts.map +1 -0
- package/dist/transfer/library.js +102 -0
- package/dist/transfer/library.js.map +1 -0
- package/dist/transfer/nodes.d.ts.map +1 -1
- package/dist/transfer/nodes.js +9 -0
- package/dist/transfer/nodes.js.map +1 -1
- package/dist/transfer/plan.d.ts +9 -0
- package/dist/transfer/plan.d.ts.map +1 -1
- package/dist/transfer/plan.js +51 -6
- package/dist/transfer/plan.js.map +1 -1
- package/dist/transfer/remove.js +7 -1
- package/dist/transfer/remove.js.map +1 -1
- package/dist/transfer/validation.js +8 -4
- package/dist/transfer/validation.js.map +1 -1
- package/dist/transfer/variables.d.ts.map +1 -1
- package/dist/transfer/variables.js +2 -1
- package/dist/transfer/variables.js.map +1 -1
- package/dist/types.d.ts +90 -12
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +33 -1
- package/dist/types.js.map +1 -1
- package/dist/variables/bindings.d.ts +11 -6
- package/dist/variables/bindings.d.ts.map +1 -1
- package/dist/variables/bindings.js +162 -38
- package/dist/variables/bindings.js.map +1 -1
- package/dist/variables/easing.d.ts +48 -0
- package/dist/variables/easing.d.ts.map +1 -0
- package/dist/variables/easing.js +321 -0
- package/dist/variables/easing.js.map +1 -0
- package/dist/variables/formula/index.d.ts +4 -2
- package/dist/variables/formula/index.d.ts.map +1 -1
- package/dist/variables/formula/index.js +26 -9
- package/dist/variables/formula/index.js.map +1 -1
- package/dist/variables/formula/parse.js +1 -1
- package/dist/variables/formula/schema.js +1 -1
- package/dist/variables/formula/signatures.d.ts +2 -2
- package/dist/variables/formula/signatures.d.ts.map +1 -1
- package/dist/variables/formula/signatures.js.map +1 -1
- package/dist/variables/formula/tree.d.ts +2 -2
- package/dist/variables/formula/tree.d.ts.map +1 -1
- package/dist/variables/formula/tree.js.map +1 -1
- package/dist/variables/index.d.ts +22 -5
- package/dist/variables/index.d.ts.map +1 -1
- package/dist/variables/index.js +67 -17
- package/dist/variables/index.js.map +1 -1
- package/dist/variables/lookup.js +1 -1
- package/dist/variables/lookup.js.map +1 -1
- package/dist/variables/motion.d.ts +46 -0
- package/dist/variables/motion.d.ts.map +1 -0
- package/dist/variables/motion.js +107 -0
- package/dist/variables/motion.js.map +1 -0
- package/dist/variables/paints.d.ts +10 -2
- package/dist/variables/paints.d.ts.map +1 -1
- package/dist/variables/paints.js +24 -10
- package/dist/variables/paints.js.map +1 -1
- package/dist/variables/resolution.d.ts.map +1 -1
- package/dist/variables/resolution.js +10 -9
- package/dist/variables/resolution.js.map +1 -1
- package/dist/variables/schema.d.ts +59 -1
- package/dist/variables/schema.d.ts.map +1 -1
- package/dist/variables/schema.js +36 -1
- package/dist/variables/schema.js.map +1 -1
- package/dist/variables/style-bindings.d.ts +23 -0
- package/dist/variables/style-bindings.d.ts.map +1 -0
- package/dist/variables/style-bindings.js +83 -0
- package/dist/variables/style-bindings.js.map +1 -0
- package/package.json +21 -2
- package/src/behaviours/index.ts +1 -0
- package/src/behaviours/kinds.ts +5 -1
- package/src/behaviours/model.ts +2 -2
- package/src/behaviours/schema.ts +19 -2
- package/src/behaviours/spec.ts +5 -0
- package/src/behaviours/transition.ts +46 -0
- package/src/checkpoint.ts +2 -0
- package/src/color/index.ts +15 -24
- package/src/color/management.ts +144 -168
- package/src/color/okhcl.ts +62 -43
- package/src/color/schema.ts +13 -0
- package/src/constraints.ts +2 -1
- package/src/copy.ts +29 -0
- package/src/corners.ts +3 -0
- package/src/css/index.ts +1 -0
- package/src/css/motion.ts +51 -0
- package/src/css/shadows.ts +7 -6
- package/src/css/values.ts +7 -3
- package/src/fields/layout.ts +9 -0
- package/src/font-style.ts +8 -3
- package/src/generated/index.ts +15 -3
- package/src/geometry.ts +13 -1
- package/src/graph.ts +72 -9
- package/src/group-bounds.ts +54 -13
- package/src/hit-test.ts +13 -8
- package/src/instances/fields.ts +2 -0
- package/src/instances/index.ts +71 -12
- package/src/instances/sync.ts +93 -11
- package/src/layout/flow.ts +34 -0
- package/src/layout/index.ts +1 -0
- package/src/layout/keywords.ts +7 -1
- package/src/layout/sizing.ts +30 -0
- package/src/layout/spacing.ts +12 -0
- package/src/mesh/geometry.ts +433 -0
- package/src/mesh/index.ts +3 -0
- package/src/mesh/model.ts +50 -0
- package/src/mesh/schema.ts +81 -0
- package/src/mutation-impact.ts +23 -7
- package/src/node-defaults.ts +22 -5
- package/src/paints/index.ts +2 -0
- package/src/paints/pattern.ts +55 -0
- package/src/paints/shows.ts +9 -0
- package/src/paints/solid.ts +10 -0
- package/src/paints/stills.ts +182 -0
- package/src/plugin-data/field.ts +3 -0
- package/src/plugin-data/fields.ts +15 -2
- package/src/resize.ts +32 -20
- package/src/scaling/index.ts +1 -1
- package/src/scaling/node.ts +43 -6
- package/src/shaders/index.ts +0 -1
- package/src/shaders/model.ts +19 -49
- package/src/shaders/schema.ts +1 -1
- package/src/shape-with-text/document.ts +175 -0
- package/src/shape-with-text/geometry.ts +99 -27
- package/src/shared-style-index.ts +106 -0
- package/src/shared-styles.ts +21 -14
- package/src/slides/drop.ts +94 -0
- package/src/slides/index.ts +125 -0
- package/src/slides/motion.ts +169 -0
- package/src/slides/playback.ts +200 -0
- package/src/slides/types.ts +94 -0
- package/src/text/direction.ts +13 -23
- package/src/text/index.ts +1 -0
- package/src/text/name.ts +39 -0
- package/src/text/references.ts +3 -3
- package/src/thumbnail.ts +52 -0
- package/src/transfer/apply.ts +16 -3
- package/src/transfer/copied.ts +7 -2
- package/src/transfer/dependencies.ts +10 -1
- package/src/transfer/history.ts +2 -0
- package/src/transfer/identity.ts +34 -2
- package/src/transfer/index.ts +6 -0
- package/src/transfer/library.ts +153 -0
- package/src/transfer/nodes.ts +20 -0
- package/src/transfer/plan.ts +96 -10
- package/src/transfer/remove.ts +6 -2
- package/src/transfer/validation.ts +15 -7
- package/src/transfer/variables.ts +8 -2
- package/src/types.ts +114 -10
- package/src/variables/bindings.ts +260 -36
- package/src/variables/easing.ts +282 -0
- package/src/variables/formula/index.ts +33 -14
- package/src/variables/formula/signatures.ts +6 -2
- package/src/variables/formula/tree.ts +3 -3
- package/src/variables/index.ts +90 -37
- package/src/variables/lookup.ts +1 -1
- package/src/variables/motion.ts +151 -0
- package/src/variables/paints.ts +29 -7
- package/src/variables/resolution.ts +11 -5
- package/src/variables/schema.ts +41 -0
- package/src/variables/style-bindings.ts +137 -0
- package/dist/shaders/still.d.ts +0 -18
- package/dist/shaders/still.d.ts.map +0 -1
- package/dist/shaders/still.js +0 -36
- package/dist/shaders/still.js.map +0 -1
- package/src/shaders/still.ts +0 -41
package/src/transfer/plan.ts
CHANGED
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
import type { SceneGraph } from '../graph'
|
|
2
2
|
import { sharedStyleLayers } from '../shared-styles'
|
|
3
|
-
import type { ComponentPropertyType, SceneNode } from '../types'
|
|
3
|
+
import type { ComponentPropertyType, SceneNode, Variable, VariableCollection } from '../types'
|
|
4
|
+
import {
|
|
5
|
+
libraryModeOf,
|
|
6
|
+
matchLibraryResources,
|
|
7
|
+
withoutLibraryKey,
|
|
8
|
+
type LibraryReuse
|
|
9
|
+
} from './library'
|
|
4
10
|
import { prepareNodeTransfer } from './nodes'
|
|
5
|
-
import { prepareVariableTransfer } from './variables'
|
|
11
|
+
import { prepareVariableTransfer, type VariableTransferReferences } from './variables'
|
|
6
12
|
|
|
7
13
|
export interface GraphTransferInput {
|
|
8
14
|
source: SceneGraph
|
|
@@ -24,6 +30,60 @@ function withStyleId(
|
|
|
24
30
|
return { ...props, source: { ...(props.source ?? node.source), id } }
|
|
25
31
|
}
|
|
26
32
|
|
|
33
|
+
/**
|
|
34
|
+
* The variables and collections a transfer adds, given what the target holds of them: nothing
|
|
35
|
+
* for a copy it holds, and a variable new to a library collection it holds joins that one. A
|
|
36
|
+
* copy that cannot take the place of the target's becomes the target's own, without its key,
|
|
37
|
+
* and a library collection new to the target remembers each library mode, so that a later
|
|
38
|
+
* transfer of it pairs its modes exactly.
|
|
39
|
+
*/
|
|
40
|
+
function libraryResources(
|
|
41
|
+
prepared: { variables: Variable[]; collections: VariableCollection[] },
|
|
42
|
+
sourceCollections: readonly VariableCollection[],
|
|
43
|
+
references: VariableTransferReferences,
|
|
44
|
+
reuse: LibraryReuse
|
|
45
|
+
) {
|
|
46
|
+
const mapped = (id: string) => references.variables.get(id) ?? references.collections.get(id)
|
|
47
|
+
const local = new Set([...reuse.local].map(mapped))
|
|
48
|
+
const reused = {
|
|
49
|
+
collections: [...new Set(reuse.collections.values())],
|
|
50
|
+
variables: [...new Set(reuse.variables.values())],
|
|
51
|
+
styles: [...new Set(reuse.styles.values())]
|
|
52
|
+
}
|
|
53
|
+
const heldCollections = new Set(reused.collections)
|
|
54
|
+
const heldVariables = new Set(reused.variables)
|
|
55
|
+
const own = <T extends { id: string; key?: string; version?: string }>(item: T): T =>
|
|
56
|
+
local.has(item.id) ? withoutLibraryKey(item) : item
|
|
57
|
+
const libraryModes = new Map(
|
|
58
|
+
sourceCollections.flatMap((collection) =>
|
|
59
|
+
collection.key
|
|
60
|
+
? collection.modes.map((mode) => [references.modes.get(mode.modeId), libraryModeOf(mode)])
|
|
61
|
+
: []
|
|
62
|
+
)
|
|
63
|
+
)
|
|
64
|
+
const collections = prepared.collections
|
|
65
|
+
.filter((collection) => !heldCollections.has(collection.id))
|
|
66
|
+
.map(own)
|
|
67
|
+
.map((collection) =>
|
|
68
|
+
collection.key
|
|
69
|
+
? {
|
|
70
|
+
...collection,
|
|
71
|
+
modes: collection.modes.map((mode) => ({
|
|
72
|
+
...mode,
|
|
73
|
+
libraryModeId: libraryModes.get(mode.modeId)
|
|
74
|
+
}))
|
|
75
|
+
}
|
|
76
|
+
: collection
|
|
77
|
+
)
|
|
78
|
+
const variables = prepared.variables
|
|
79
|
+
.filter((variable) => !heldVariables.has(variable.id))
|
|
80
|
+
.map(own)
|
|
81
|
+
const joined = variables
|
|
82
|
+
.filter((variable) => heldCollections.has(variable.collectionId))
|
|
83
|
+
.map((variable) => ({ collectionId: variable.collectionId, variableId: variable.id }))
|
|
84
|
+
return { variables, collections, joined, reused }
|
|
85
|
+
}
|
|
86
|
+
|
|
27
87
|
/** Preflight a self-contained fragment; allocation does not insert anything into the target. */
|
|
28
88
|
export function prepareGraphTransfer(input: GraphTransferInput) {
|
|
29
89
|
const { source, target, parentId } = input
|
|
@@ -43,6 +103,18 @@ export function prepareGraphTransfer(input: GraphTransferInput) {
|
|
|
43
103
|
reserved.add(id)
|
|
44
104
|
return id
|
|
45
105
|
}
|
|
106
|
+
const targetStyles = sharedStyleLayers(target)
|
|
107
|
+
const reuse = matchLibraryResources(
|
|
108
|
+
target,
|
|
109
|
+
{
|
|
110
|
+
collections: source.variableCollections.values(),
|
|
111
|
+
variables: source.variables.values(),
|
|
112
|
+
styles: sharedStyleLayers(source).values()
|
|
113
|
+
},
|
|
114
|
+
targetStyles
|
|
115
|
+
)
|
|
116
|
+
const reusedStyle = (node: SceneNode) =>
|
|
117
|
+
node.sharedStyleType !== null && !!node.source.id && reuse.styles.has(node.source.id)
|
|
46
118
|
const ordered: SceneNode[] = []
|
|
47
119
|
const seen = new Set<string>()
|
|
48
120
|
const visit = (id: string): void => {
|
|
@@ -50,17 +122,27 @@ export function prepareGraphTransfer(input: GraphTransferInput) {
|
|
|
50
122
|
const node = source.getNode(id)
|
|
51
123
|
if (!node) throw new Error(`Missing transfer source ${id}`)
|
|
52
124
|
seen.add(id)
|
|
125
|
+
// Layers name the target's copy of a library style it already holds instead.
|
|
126
|
+
if (reusedStyle(node)) return
|
|
53
127
|
ordered.push(node)
|
|
54
128
|
for (const child of node.childIds) visit(child)
|
|
55
129
|
}
|
|
56
130
|
for (const id of [...input.dependencyPageIds, ...input.rootIds]) visit(id)
|
|
57
131
|
const nodes = new Map(ordered.map((node) => [node.id, allocate()]))
|
|
58
|
-
const variables = new Map(
|
|
59
|
-
|
|
132
|
+
const variables = new Map(
|
|
133
|
+
[...source.variables.keys()].map((id) => [id, reuse.variables.get(id) ?? allocate()])
|
|
134
|
+
)
|
|
135
|
+
const collections = new Map(
|
|
136
|
+
[...source.variableCollections.keys()].map((id) => [
|
|
137
|
+
id,
|
|
138
|
+
reuse.collections.get(id) ?? allocate()
|
|
139
|
+
])
|
|
140
|
+
)
|
|
60
141
|
const modes = new Map<string, string>()
|
|
61
142
|
for (const collection of source.variableCollections.values()) {
|
|
62
143
|
for (const mode of collection.modes)
|
|
63
|
-
if (!modes.has(mode.modeId))
|
|
144
|
+
if (!modes.has(mode.modeId))
|
|
145
|
+
modes.set(mode.modeId, reuse.modes.get(mode.modeId) ?? allocate())
|
|
64
146
|
}
|
|
65
147
|
const properties = new Map<string, string>()
|
|
66
148
|
const propertyTypes = new Map<string, ComponentPropertyType>()
|
|
@@ -73,8 +155,7 @@ export function prepareGraphTransfer(input: GraphTransferInput) {
|
|
|
73
155
|
}
|
|
74
156
|
// Layers name a style by the style's own ID, which a transferred style keeps unless the
|
|
75
157
|
// target already holds another style by it: IDs read from Figma are only unique in one file.
|
|
76
|
-
const
|
|
77
|
-
const styles = new Map<string, string>()
|
|
158
|
+
const styles = new Map(reuse.styles)
|
|
78
159
|
for (const node of ordered) {
|
|
79
160
|
const id = node.source.id
|
|
80
161
|
if (node.sharedStyleType === null || !id) continue
|
|
@@ -89,10 +170,15 @@ export function prepareGraphTransfer(input: GraphTransferInput) {
|
|
|
89
170
|
propertyTypes,
|
|
90
171
|
styles
|
|
91
172
|
}
|
|
92
|
-
const resources =
|
|
93
|
-
|
|
173
|
+
const resources = libraryResources(
|
|
174
|
+
prepareVariableTransfer(
|
|
175
|
+
[...source.variables.values()],
|
|
176
|
+
[...source.variableCollections.values()],
|
|
177
|
+
references
|
|
178
|
+
),
|
|
94
179
|
[...source.variableCollections.values()],
|
|
95
|
-
references
|
|
180
|
+
references,
|
|
181
|
+
reuse
|
|
96
182
|
)
|
|
97
183
|
const mapped = (id: string): string => {
|
|
98
184
|
const value = nodes.get(id)
|
package/src/transfer/remove.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { SceneGraph } from '../graph'
|
|
2
|
-
import type
|
|
2
|
+
import { leaveHeldCollections, type GraphTransferPlan } from './apply'
|
|
3
3
|
import { semanticTransferReferences } from './nodes'
|
|
4
4
|
|
|
5
5
|
/** Refuse to remove transferred content that has acquired external dependents. */
|
|
@@ -25,11 +25,15 @@ export function removeGraphTransfer(graph: SceneGraph, plan: GraphTransferPlan):
|
|
|
25
25
|
throw new Error(`Transferred content is referenced by ${node.id}`)
|
|
26
26
|
}
|
|
27
27
|
for (const variable of graph.variables.values()) {
|
|
28
|
-
if (
|
|
28
|
+
if (variables.has(variable.id)) continue
|
|
29
|
+
if (referencesOwned(variable.valuesByMode))
|
|
29
30
|
throw new Error('Transferred variable has external aliases')
|
|
31
|
+
if (collections.has(variable.collectionId))
|
|
32
|
+
throw new Error('Transferred collection holds non-owned variables')
|
|
30
33
|
}
|
|
31
34
|
graph.withBufferedEvents(() => {
|
|
32
35
|
for (const node of plan.nodes.toReversed()) graph.deleteNode(node.id)
|
|
36
|
+
leaveHeldCollections(graph, plan)
|
|
33
37
|
for (const id of variables) {
|
|
34
38
|
graph.willChangeVariable(id)
|
|
35
39
|
graph.variables.delete(id)
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import type { SceneGraph } from '../graph'
|
|
2
2
|
import { createDefaultNode } from '../node-defaults'
|
|
3
|
+
import { sharedStyleLayers } from '../shared-styles'
|
|
3
4
|
import type { ComponentPropertyType } from '../types'
|
|
4
5
|
import type { GraphTransferPlan } from './apply'
|
|
5
|
-
import { variableIdentityReferences } from './identity'
|
|
6
|
+
import { heldTransferCollections, variableIdentityReferences } from './identity'
|
|
6
7
|
import { prepareNodeTransfer } from './nodes'
|
|
7
8
|
|
|
8
9
|
/** Revalidate mutable plan references without allocating or registering destination nodes. */
|
|
@@ -24,18 +25,25 @@ export function validateTransferReferences(target: SceneGraph, plan: GraphTransf
|
|
|
24
25
|
properties.set(definition.id, definition.id)
|
|
25
26
|
propertyTypes.set(definition.id, definition.type)
|
|
26
27
|
}
|
|
27
|
-
const
|
|
28
|
-
const
|
|
29
|
-
|
|
30
|
-
|
|
28
|
+
const planCollections = [...plan.collections, ...heldTransferCollections(target, plan)]
|
|
29
|
+
const collections = new Map(planCollections.map((collection) => [collection.id, collection]))
|
|
30
|
+
const heldStyles = sharedStyleLayers(target)
|
|
31
|
+
for (const id of plan.reused.styles)
|
|
32
|
+
if (!heldStyles.has(id)) throw new Error(`Missing reused transfer style ${id}`)
|
|
33
|
+
const styles = new Map([
|
|
34
|
+
...plan.reused.styles.map((id) => [id, id] as const),
|
|
35
|
+
...[...nodes.values()].flatMap((node) =>
|
|
36
|
+
node.sharedStyleType !== null && node.source.id
|
|
37
|
+
? [[node.source.id, node.source.id] as const]
|
|
38
|
+
: []
|
|
31
39
|
)
|
|
32
|
-
)
|
|
40
|
+
])
|
|
33
41
|
const references = {
|
|
34
42
|
nodes: identities,
|
|
35
43
|
styles,
|
|
36
44
|
properties,
|
|
37
45
|
propertyTypes,
|
|
38
|
-
...variableIdentityReferences(plan.variables, plan.
|
|
46
|
+
...variableIdentityReferences(plan.variables, planCollections, plan.reused.variables)
|
|
39
47
|
}
|
|
40
48
|
for (const node of nodes.values()) {
|
|
41
49
|
prepareNodeTransfer(node, references)
|
|
@@ -35,8 +35,14 @@ function assertResourceOwnership(
|
|
|
35
35
|
}
|
|
36
36
|
for (const variable of variables) {
|
|
37
37
|
const collection = sets.get(variable.collectionId)
|
|
38
|
-
if (!collection
|
|
39
|
-
|
|
38
|
+
if (!collection) throw new Error(`Missing collection membership for ${variable.id}`)
|
|
39
|
+
// A collection lists only its live variables; a deleted one still transfers with its bindings.
|
|
40
|
+
if (collection.variableIds.includes(variable.id) === !!variable.deleted)
|
|
41
|
+
throw new Error(
|
|
42
|
+
variable.deleted
|
|
43
|
+
? `Deleted variable ${variable.id} listed in ${collection.id}`
|
|
44
|
+
: `Missing collection membership for ${variable.id}`
|
|
45
|
+
)
|
|
40
46
|
const modes = new Set(collection.modes.map((mode) => mode.modeId))
|
|
41
47
|
for (const mode of Object.keys(variable.valuesByMode)) {
|
|
42
48
|
if (!modes.has(mode)) throw new Error(`Unknown mode ${mode} for ${variable.id}`)
|
package/src/types.ts
CHANGED
|
@@ -5,6 +5,7 @@ import type { CanvasGuide } from './guides'
|
|
|
5
5
|
import type { InstanceOverrideState } from './instances/overrides'
|
|
6
6
|
import type { Color, Matrix, Rect, Vector } from './primitives'
|
|
7
7
|
import type { ShapeWithTextType } from './shape-with-text/kinds'
|
|
8
|
+
import type { LayerAnimation, SlideSettings } from './slides/types'
|
|
8
9
|
|
|
9
10
|
export interface SceneGraphEvents {
|
|
10
11
|
'node:created': (node: SceneNode) => void
|
|
@@ -58,10 +59,14 @@ export interface NodeChangeObserver {
|
|
|
58
59
|
resume?: () => void
|
|
59
60
|
}
|
|
60
61
|
|
|
61
|
-
|
|
62
|
+
/**
|
|
63
|
+
* A color profile: the one a document's colors are stored in, or the one they are shown or
|
|
64
|
+
* exported in. Figma files are sRGB or Display P3.
|
|
65
|
+
*/
|
|
66
|
+
export type ColorProfile = 'srgb' | 'display-p3'
|
|
62
67
|
|
|
63
|
-
/** What a document is for, as Figma keeps design files
|
|
64
|
-
export type DocumentKind = 'design' | 'board'
|
|
68
|
+
/** What a document is for, as Figma keeps design files, FigJam boards and Slides decks apart. */
|
|
69
|
+
export type DocumentKind = 'design' | 'board' | 'slides'
|
|
65
70
|
|
|
66
71
|
export interface FigmaSourcePayload {
|
|
67
72
|
rawSize: Vector | null
|
|
@@ -70,6 +75,11 @@ export interface FigmaSourcePayload {
|
|
|
70
75
|
layout: FigmaLayoutMetadata | null
|
|
71
76
|
symbolOverrides: unknown[]
|
|
72
77
|
componentPropAssignments: unknown[]
|
|
78
|
+
/**
|
|
79
|
+
* An instance's saved assignments of slot content that no layer shows, as when its variant
|
|
80
|
+
* has no frame for the slot. Figma keeps them, and the content, for a variant that does.
|
|
81
|
+
*/
|
|
82
|
+
hiddenSlotAssignments: unknown[]
|
|
73
83
|
derivedSymbolData: unknown[]
|
|
74
84
|
derivedSymbolDataLayoutVersion: number | null
|
|
75
85
|
uniformScaleFactor: number | null
|
|
@@ -142,6 +152,14 @@ export type NodeType =
|
|
|
142
152
|
| 'CONNECTOR'
|
|
143
153
|
| 'SHAPE_WITH_TEXT'
|
|
144
154
|
| 'STICKY'
|
|
155
|
+
| 'SLIDE'
|
|
156
|
+
| 'SLIDE_ROW'
|
|
157
|
+
| 'SLIDE_GRID'
|
|
158
|
+
/**
|
|
159
|
+
* A Figma shader's definition on the internal page, which a shader paint names: its library key,
|
|
160
|
+
* version and property definitions. OpenPencil keeps it for Figma and never draws it.
|
|
161
|
+
*/
|
|
162
|
+
| 'CODE_COMPONENT'
|
|
145
163
|
|
|
146
164
|
export type FillType =
|
|
147
165
|
| 'SOLID'
|
|
@@ -186,6 +204,11 @@ export interface GradientStop {
|
|
|
186
204
|
|
|
187
205
|
export type GradientTransform = Matrix
|
|
188
206
|
|
|
207
|
+
export interface LibraryAssetRef {
|
|
208
|
+
key: string
|
|
209
|
+
version?: string
|
|
210
|
+
}
|
|
211
|
+
|
|
189
212
|
/** Figma's adjustments of an image paint, each from -1 to 1; 0 leaves the image as it is. */
|
|
190
213
|
export interface ImageFilters {
|
|
191
214
|
exposure?: number
|
|
@@ -227,6 +250,8 @@ export interface Fill {
|
|
|
227
250
|
density?: number
|
|
228
251
|
noiseSize?: Vector
|
|
229
252
|
customEffectId?: string
|
|
253
|
+
customEffectAssetRef?: LibraryAssetRef
|
|
254
|
+
componentPropAssignments?: unknown[]
|
|
230
255
|
}
|
|
231
256
|
|
|
232
257
|
export type StrokeCap =
|
|
@@ -403,7 +428,11 @@ export interface ConnectorLabelPosition {
|
|
|
403
428
|
offAxis: 'NONE' | 'ABOVE' | 'BELOW'
|
|
404
429
|
}
|
|
405
430
|
export type TextAlignVertical = 'TOP' | 'CENTER' | 'BOTTOM'
|
|
406
|
-
|
|
431
|
+
/**
|
|
432
|
+
* How a text's letters are cased: as typed, re-cased, or drawn as small caps, which take the
|
|
433
|
+
* font's own small capitals for lower-case letters and, forced, for capitals too.
|
|
434
|
+
*/
|
|
435
|
+
export type TextCase = 'ORIGINAL' | 'UPPER' | 'LOWER' | 'TITLE' | 'SMALL_CAPS' | 'SMALL_CAPS_FORCED'
|
|
407
436
|
export type TextDecoration = 'NONE' | 'UNDERLINE' | 'STRIKETHROUGH'
|
|
408
437
|
export type TextDecorationStyle = 'SOLID' | 'DOTTED' | 'WAVY'
|
|
409
438
|
export type LeadingTrim = 'NONE' | 'CAP_HEIGHT'
|
|
@@ -456,8 +485,11 @@ export const TEXT_BINDABLE_FIELDS = [
|
|
|
456
485
|
|
|
457
486
|
export type TextBindableField = (typeof TEXT_BINDABLE_FIELDS)[number]
|
|
458
487
|
|
|
459
|
-
/**
|
|
460
|
-
|
|
488
|
+
/**
|
|
489
|
+
* Variable IDs a range binds, by field: a `TextBindableField`, or the colour of one of the range's
|
|
490
|
+
* own fills, as `fills/0/color`, the way a layer names its paints' bindings.
|
|
491
|
+
*/
|
|
492
|
+
export type TextBoundVariables = Record<string, string>
|
|
461
493
|
|
|
462
494
|
/**
|
|
463
495
|
* A line height or letter spacing as Figma keeps it: pixels, or a percent of the font size that
|
|
@@ -934,6 +966,10 @@ export interface SceneNode {
|
|
|
934
966
|
starInnerRadius: number
|
|
935
967
|
/** The FigJam kind a SHAPE_WITH_TEXT draws; its label is the node's own text. */
|
|
936
968
|
shapeWithTextType: ShapeWithTextType
|
|
969
|
+
/** What a slide keeps besides its layers; null on other layers. */
|
|
970
|
+
slide: SlideSettings | null
|
|
971
|
+
/** How the layer comes onto or leaves the slide it is on while presenting; null for none. */
|
|
972
|
+
animation: LayerAnimation | null
|
|
937
973
|
/** The height a shape with text was given; it grows past it to fit its label. 0 is unset. */
|
|
938
974
|
shapeUserHeight: number
|
|
939
975
|
/**
|
|
@@ -1045,7 +1081,62 @@ export interface ComponentPropertyDefinition {
|
|
|
1045
1081
|
slotSettings?: SlotSettings
|
|
1046
1082
|
}
|
|
1047
1083
|
|
|
1048
|
-
|
|
1084
|
+
/** A TIMING variable holds a duration in seconds; an EASING one, an `Easing`. */
|
|
1085
|
+
export const VARIABLE_TYPES = ['COLOR', 'FLOAT', 'STRING', 'BOOLEAN', 'EASING', 'TIMING'] as const
|
|
1086
|
+
export type VariableType = (typeof VARIABLE_TYPES)[number]
|
|
1087
|
+
|
|
1088
|
+
/**
|
|
1089
|
+
* The curves and springs an easing can be, by the names `.fig` files give them. `CUSTOM_CUBIC`
|
|
1090
|
+
* and `CUSTOM_SPRING` hold the curve or spring they were given; the rest are presets, and
|
|
1091
|
+
* `HOLD` jumps to the end without easing.
|
|
1092
|
+
*/
|
|
1093
|
+
export const EASING_CURVES = [
|
|
1094
|
+
'IN_CUBIC',
|
|
1095
|
+
'OUT_CUBIC',
|
|
1096
|
+
'INOUT_CUBIC',
|
|
1097
|
+
'LINEAR',
|
|
1098
|
+
'IN_BACK_CUBIC',
|
|
1099
|
+
'OUT_BACK_CUBIC',
|
|
1100
|
+
'INOUT_BACK_CUBIC',
|
|
1101
|
+
'CUSTOM_CUBIC',
|
|
1102
|
+
'SPRING',
|
|
1103
|
+
'GENTLE_SPRING',
|
|
1104
|
+
'CUSTOM_SPRING',
|
|
1105
|
+
'SPRING_PRESET_ONE',
|
|
1106
|
+
'SPRING_PRESET_TWO',
|
|
1107
|
+
'SPRING_PRESET_THREE',
|
|
1108
|
+
'HOLD',
|
|
1109
|
+
'EASE_IN'
|
|
1110
|
+
] as const
|
|
1111
|
+
export type EasingCurve = (typeof EASING_CURVES)[number]
|
|
1112
|
+
|
|
1113
|
+
/** A CSS `cubic-bezier()`: the two control points between (0, 0) and (1, 1). */
|
|
1114
|
+
export interface CubicBezier {
|
|
1115
|
+
x1: number
|
|
1116
|
+
y1: number
|
|
1117
|
+
x2: number
|
|
1118
|
+
y2: number
|
|
1119
|
+
}
|
|
1120
|
+
|
|
1121
|
+
/**
|
|
1122
|
+
* A spring as its physics. `type` says how it is edited: by its bounce (`NORMALIZED`, the
|
|
1123
|
+
* default) or by these three numbers (`PHYSICAL`), whose meaning `platform` sets.
|
|
1124
|
+
*/
|
|
1125
|
+
export interface Spring {
|
|
1126
|
+
stiffness: number
|
|
1127
|
+
damping: number
|
|
1128
|
+
mass: number
|
|
1129
|
+
type?: 'NORMALIZED' | 'PHYSICAL'
|
|
1130
|
+
platform?: 'IOS_WEB' | 'ANDROID'
|
|
1131
|
+
}
|
|
1132
|
+
|
|
1133
|
+
/** An EASING variable's value: a curve or spring, and the numbers it holds as a file saves them. */
|
|
1134
|
+
export interface Easing {
|
|
1135
|
+
easing: EasingCurve
|
|
1136
|
+
bezier?: CubicBezier
|
|
1137
|
+
spring?: Spring
|
|
1138
|
+
}
|
|
1139
|
+
|
|
1049
1140
|
export interface VariableAlias {
|
|
1050
1141
|
aliasId: string
|
|
1051
1142
|
}
|
|
@@ -1057,7 +1148,10 @@ export interface VariableColorExpression {
|
|
|
1057
1148
|
opacity: number | VariableAlias
|
|
1058
1149
|
}
|
|
1059
1150
|
|
|
1060
|
-
export type VariableLiteral = Color | number | string | boolean
|
|
1151
|
+
export type VariableLiteral = Color | number | string | boolean | Easing
|
|
1152
|
+
/** The types a formula computes with and gives; easings and timings are not among them. */
|
|
1153
|
+
export type VariableFormulaType = 'COLOR' | 'FLOAT' | 'STRING' | 'BOOLEAN'
|
|
1154
|
+
export type VariableFormulaLiteral = Color | number | string | boolean
|
|
1061
1155
|
/** The arithmetic, comparison, logic and conversions a formula combines values with. */
|
|
1062
1156
|
export const VARIABLE_FORMULA_OPERATORS = [
|
|
1063
1157
|
'add',
|
|
@@ -1083,10 +1177,10 @@ export interface VariableFormulaOperation {
|
|
|
1083
1177
|
operator: VariableFormulaOperator
|
|
1084
1178
|
operands: VariableFormulaNode[]
|
|
1085
1179
|
}
|
|
1086
|
-
export type VariableFormulaNode =
|
|
1180
|
+
export type VariableFormulaNode = VariableFormulaLiteral | VariableAlias | VariableFormulaOperation
|
|
1087
1181
|
export interface VariableFormula {
|
|
1088
1182
|
expression: 'FORMULA'
|
|
1089
|
-
type:
|
|
1183
|
+
type: VariableFormulaType
|
|
1090
1184
|
value: VariableFormulaNode
|
|
1091
1185
|
}
|
|
1092
1186
|
/**
|
|
@@ -1183,6 +1277,11 @@ export interface Variable {
|
|
|
1183
1277
|
key?: string
|
|
1184
1278
|
/** Published library version (from NodeChange.version). Used for assetRef resolution in colorVar. */
|
|
1185
1279
|
version?: string
|
|
1280
|
+
/**
|
|
1281
|
+
* Deleted as Figma deletes a variable: gone from its collection's `variableIds` and from every
|
|
1282
|
+
* list of variables, while layers bound to it still resolve it and the file keeps it.
|
|
1283
|
+
*/
|
|
1284
|
+
deleted?: true
|
|
1186
1285
|
}
|
|
1187
1286
|
|
|
1188
1287
|
/** Scalar numeric node fields accepted by numeric property controls; some may also be null. */
|
|
@@ -1232,6 +1331,11 @@ export interface VariableCollection {
|
|
|
1232
1331
|
key?: string
|
|
1233
1332
|
/** Published library version, which references by key carry with it. */
|
|
1234
1333
|
version?: string
|
|
1334
|
+
/**
|
|
1335
|
+
* Deleted as Figma deletes a collection: gone from every list of collections, with its variables
|
|
1336
|
+
* deleted too, while layers bound to them still resolve them and the file keeps them.
|
|
1337
|
+
*/
|
|
1338
|
+
deleted?: true
|
|
1235
1339
|
}
|
|
1236
1340
|
|
|
1237
1341
|
/** Whether a collection is a library's copy, which takes no variables or modes of the file's. */
|