@moondraft/import 0.0.0-stage → 0.2.0
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/CHANGELOG.md +36 -0
- package/LICENSE +34 -0
- package/README.md +36 -2
- package/SOURCE.md +394 -0
- package/dist/adapter/convert.d.ts +144 -0
- package/dist/adapter/convert.js +2811 -0
- package/dist/adapter/figma-descriptions.d.ts +7 -0
- package/dist/adapter/figma-descriptions.js +34 -0
- package/dist/adapter/figma-grids.d.ts +12 -0
- package/dist/adapter/figma-grids.js +175 -0
- package/dist/adapter/figma-handoff.d.ts +12 -0
- package/dist/adapter/figma-handoff.js +167 -0
- package/dist/adapter/figma-hyperlinks.d.ts +13 -0
- package/dist/adapter/figma-hyperlinks.js +77 -0
- package/dist/adapter/figma.d.ts +12 -0
- package/dist/adapter/figma.js +40 -0
- package/dist/adapter/file-components.d.ts +20 -0
- package/dist/adapter/file-components.js +352 -0
- package/dist/adapter/file-resources.d.ts +29 -0
- package/dist/adapter/file-resources.js +851 -0
- package/dist/adapter/image-crop.d.ts +18 -0
- package/dist/adapter/image-crop.js +30 -0
- package/dist/adapter/index.d.ts +6 -0
- package/dist/adapter/index.js +9 -0
- package/dist/adapter/link.d.ts +49 -0
- package/dist/adapter/link.js +892 -0
- package/dist/adapter/payload.d.ts +31 -0
- package/dist/adapter/payload.js +78 -0
- package/dist/adapter/shapes.d.ts +31 -0
- package/dist/adapter/shapes.js +75 -0
- package/dist/adapter/variables.d.ts +45 -0
- package/dist/adapter/variables.js +106 -0
- package/dist/figma-file.d.ts +38 -0
- package/dist/figma-file.js +97 -0
- package/dist/figma-worker.d.ts +11 -0
- package/dist/figma-worker.js +12 -0
- package/dist/figma.d.ts +26 -0
- package/dist/figma.js +230 -0
- package/dist/index.d.ts +29 -0
- package/dist/index.js +50 -0
- package/dist/report.d.ts +42 -0
- package/dist/report.js +142 -0
- package/dist/serialize.d.ts +7 -0
- package/dist/serialize.js +79 -0
- package/dist/svg.d.ts +33 -0
- package/dist/svg.js +44 -0
- package/dist/syntax.d.ts +8 -0
- package/dist/syntax.js +19 -0
- package/dist/taco/figma-import/clipboard.d.ts +25 -0
- package/dist/taco/figma-import/clipboard.js +87 -0
- package/dist/taco/figma-import/clipboardSize.d.ts +31 -0
- package/dist/taco/figma-import/clipboardSize.js +107 -0
- package/dist/taco/figma-import/container/compression.d.ts +9 -0
- package/dist/taco/figma-import/container/compression.js +174 -0
- package/dist/taco/figma-import/container/error.d.ts +15 -0
- package/dist/taco/figma-import/container/error.js +19 -0
- package/dist/taco/figma-import/container/kiwiContainer.d.ts +41 -0
- package/dist/taco/figma-import/container/kiwiContainer.js +61 -0
- package/dist/taco/figma-import/container/limits.d.ts +22 -0
- package/dist/taco/figma-import/container/limits.js +22 -0
- package/dist/taco/figma-import/container/zip.d.ts +14 -0
- package/dist/taco/figma-import/container/zip.js +154 -0
- package/dist/taco/figma-import/figFile.d.ts +34 -0
- package/dist/taco/figma-import/figFile.js +91 -0
- package/dist/taco/figma-import/figFileDocument.d.ts +25 -0
- package/dist/taco/figma-import/figFileDocument.js +100 -0
- package/dist/taco/figma-import/import/blobs.d.ts +10 -0
- package/dist/taco/figma-import/import/blobs.js +23 -0
- package/dist/taco/figma-import/import/carry.d.ts +24 -0
- package/dist/taco/figma-import/import/carry.js +66 -0
- package/dist/taco/figma-import/import/componentProps.d.ts +90 -0
- package/dist/taco/figma-import/import/componentProps.js +329 -0
- package/dist/taco/figma-import/import/componentSets.d.ts +85 -0
- package/dist/taco/figma-import/import/componentSets.js +647 -0
- package/dist/taco/figma-import/import/converters/effects.d.ts +31 -0
- package/dist/taco/figma-import/import/converters/effects.js +127 -0
- package/dist/taco/figma-import/import/converters/ellipse.d.ts +7 -0
- package/dist/taco/figma-import/import/converters/ellipse.js +54 -0
- package/dist/taco/figma-import/import/converters/exportSettings.d.ts +4 -0
- package/dist/taco/figma-import/import/converters/exportSettings.js +49 -0
- package/dist/taco/figma-import/import/converters/frame.d.ts +21 -0
- package/dist/taco/figma-import/import/converters/frame.js +63 -0
- package/dist/taco/figma-import/import/converters/gradient.d.ts +74 -0
- package/dist/taco/figma-import/import/converters/gradient.js +108 -0
- package/dist/taco/figma-import/import/converters/group.d.ts +19 -0
- package/dist/taco/figma-import/import/converters/group.js +30 -0
- package/dist/taco/figma-import/import/converters/image.d.ts +13 -0
- package/dist/taco/figma-import/import/converters/image.js +94 -0
- package/dist/taco/figma-import/import/converters/layout.d.ts +33 -0
- package/dist/taco/figma-import/import/converters/layout.js +187 -0
- package/dist/taco/figma-import/import/converters/line.d.ts +11 -0
- package/dist/taco/figma-import/import/converters/line.js +40 -0
- package/dist/taco/figma-import/import/converters/rectangle.d.ts +3 -0
- package/dist/taco/figma-import/import/converters/rectangle.js +11 -0
- package/dist/taco/figma-import/import/converters/section.d.ts +8 -0
- package/dist/taco/figma-import/import/converters/section.js +29 -0
- package/dist/taco/figma-import/import/converters/shared.d.ts +71 -0
- package/dist/taco/figma-import/import/converters/shared.js +372 -0
- package/dist/taco/figma-import/import/converters/text.d.ts +54 -0
- package/dist/taco/figma-import/import/converters/text.js +707 -0
- package/dist/taco/figma-import/import/converters/vector.d.ts +105 -0
- package/dist/taco/figma-import/import/converters/vector.js +609 -0
- package/dist/taco/figma-import/import/converters/vectorNetwork.d.ts +114 -0
- package/dist/taco/figma-import/import/converters/vectorNetwork.js +503 -0
- package/dist/taco/figma-import/import/fields.d.ts +15 -0
- package/dist/taco/figma-import/import/fields.js +29 -0
- package/dist/taco/figma-import/import/instances.d.ts +184 -0
- package/dist/taco/figma-import/import/instances.js +1530 -0
- package/dist/taco/figma-import/import/nestingCycles.d.ts +86 -0
- package/dist/taco/figma-import/import/nestingCycles.js +488 -0
- package/dist/taco/figma-import/import/slots.d.ts +56 -0
- package/dist/taco/figma-import/import/slots.js +96 -0
- package/dist/taco/figma-import/import/styles.d.ts +48 -0
- package/dist/taco/figma-import/import/styles.js +48 -0
- package/dist/taco/figma-import/import/tree.d.ts +66 -0
- package/dist/taco/figma-import/import/tree.js +194 -0
- package/dist/taco/figma-import/import/types.d.ts +232 -0
- package/dist/taco/figma-import/import/types.js +33 -0
- package/dist/taco/figma-import/import/variables.d.ts +137 -0
- package/dist/taco/figma-import/import/variables.js +769 -0
- package/dist/taco/figma-import/import/variantTrees.d.ts +20 -0
- package/dist/taco/figma-import/import/variantTrees.js +520 -0
- package/dist/taco/figma-import/import/walk.d.ts +207 -0
- package/dist/taco/figma-import/import/walk.js +1464 -0
- package/dist/taco/figma-import/index.d.ts +22 -0
- package/dist/taco/figma-import/index.js +13 -0
- package/dist/taco/figma-import/kiwi/byteReader.d.ts +37 -0
- package/dist/taco/figma-import/kiwi/byteReader.js +151 -0
- package/dist/taco/figma-import/kiwi/error.d.ts +14 -0
- package/dist/taco/figma-import/kiwi/error.js +29 -0
- package/dist/taco/figma-import/kiwi/limits.d.ts +18 -0
- package/dist/taco/figma-import/kiwi/limits.js +18 -0
- package/dist/taco/figma-import/kiwi/message.d.ts +12 -0
- package/dist/taco/figma-import/kiwi/message.js +147 -0
- package/dist/taco/figma-import/kiwi/schema.d.ts +42 -0
- package/dist/taco/figma-import/kiwi/schema.js +206 -0
- package/dist/taco/figma-import/kiwi/types.d.ts +46 -0
- package/dist/taco/figma-import/kiwi/types.js +18 -0
- package/dist/taco/model/agent-hidden-fields.d.ts +20 -0
- package/dist/taco/model/agent-hidden-fields.js +29 -0
- package/dist/taco/model/asset-users.d.ts +23 -0
- package/dist/taco/model/asset-users.js +128 -0
- package/dist/taco/model/auto-layout-lines.d.ts +32 -0
- package/dist/taco/model/auto-layout-lines.js +70 -0
- package/dist/taco/model/codec.d.ts +444 -0
- package/dist/taco/model/codec.js +5665 -0
- package/dist/taco/model/color.d.ts +11 -0
- package/dist/taco/model/color.js +61 -0
- package/dist/taco/model/comment-operations.d.ts +102 -0
- package/dist/taco/model/comment-operations.js +227 -0
- package/dist/taco/model/component-evaluation.d.ts +96 -0
- package/dist/taco/model/component-evaluation.js +555 -0
- package/dist/taco/model/component-expressions.d.ts +242 -0
- package/dist/taco/model/component-expressions.js +1082 -0
- package/dist/taco/model/component-properties.d.ts +111 -0
- package/dist/taco/model/component-properties.js +339 -0
- package/dist/taco/model/component-samples.d.ts +83 -0
- package/dist/taco/model/component-samples.js +290 -0
- package/dist/taco/model/component-validity.d.ts +85 -0
- package/dist/taco/model/component-validity.js +397 -0
- package/dist/taco/model/components.d.ts +155 -0
- package/dist/taco/model/components.js +505 -0
- package/dist/taco/model/connector-ends.d.ts +20 -0
- package/dist/taco/model/connector-ends.js +188 -0
- package/dist/taco/model/connector-geometry.d.ts +74 -0
- package/dist/taco/model/connector-geometry.js +293 -0
- package/dist/taco/model/corner-radii.d.ts +26 -0
- package/dist/taco/model/corner-radii.js +47 -0
- package/dist/taco/model/derivations.d.ts +81 -0
- package/dist/taco/model/derivations.js +151 -0
- package/dist/taco/model/export-settings.d.ts +53 -0
- package/dist/taco/model/export-settings.js +156 -0
- package/dist/taco/model/expressions/ast.d.ts +153 -0
- package/dist/taco/model/expressions/ast.js +6 -0
- package/dist/taco/model/expressions/cache.d.ts +23 -0
- package/dist/taco/model/expressions/cache.js +43 -0
- package/dist/taco/model/expressions/check.d.ts +72 -0
- package/dist/taco/model/expressions/check.js +517 -0
- package/dist/taco/model/expressions/completion.d.ts +61 -0
- package/dist/taco/model/expressions/completion.js +421 -0
- package/dist/taco/model/expressions/evaluate.d.ts +32 -0
- package/dist/taco/model/expressions/evaluate.js +519 -0
- package/dist/taco/model/expressions/forms.d.ts +84 -0
- package/dist/taco/model/expressions/forms.js +200 -0
- package/dist/taco/model/expressions/index.d.ts +14 -0
- package/dist/taco/model/expressions/index.js +17 -0
- package/dist/taco/model/expressions/lexer.d.ts +42 -0
- package/dist/taco/model/expressions/lexer.js +213 -0
- package/dist/taco/model/expressions/library.d.ts +33 -0
- package/dist/taco/model/expressions/library.js +117 -0
- package/dist/taco/model/expressions/names.d.ts +43 -0
- package/dist/taco/model/expressions/names.js +99 -0
- package/dist/taco/model/expressions/parser.d.ts +15 -0
- package/dist/taco/model/expressions/parser.js +438 -0
- package/dist/taco/model/expressions/rename.d.ts +34 -0
- package/dist/taco/model/expressions/rename.js +46 -0
- package/dist/taco/model/expressions/source.d.ts +15 -0
- package/dist/taco/model/expressions/source.js +161 -0
- package/dist/taco/model/expressions/types.d.ts +119 -0
- package/dist/taco/model/expressions/types.js +102 -0
- package/dist/taco/model/expressions/values.d.ts +97 -0
- package/dist/taco/model/expressions/values.js +160 -0
- package/dist/taco/model/geometry-limits.d.ts +16 -0
- package/dist/taco/model/geometry-limits.js +67 -0
- package/dist/taco/model/geometry.d.ts +47 -0
- package/dist/taco/model/geometry.js +193 -0
- package/dist/taco/model/group-bounds.d.ts +38 -0
- package/dist/taco/model/group-bounds.js +144 -0
- package/dist/taco/model/id-table.d.ts +37 -0
- package/dist/taco/model/id-table.js +80 -0
- package/dist/taco/model/index.d.ts +25 -0
- package/dist/taco/model/index.js +27 -0
- package/dist/taco/model/instance-resolver.d.ts +376 -0
- package/dist/taco/model/instance-resolver.js +1778 -0
- package/dist/taco/model/layer-syntax.d.ts +340 -0
- package/dist/taco/model/layer-syntax.js +3506 -0
- package/dist/taco/model/layout/constraints.d.ts +84 -0
- package/dist/taco/model/layout/constraints.js +445 -0
- package/dist/taco/model/layout/frame-layout.d.ts +46 -0
- package/dist/taco/model/layout/frame-layout.js +618 -0
- package/dist/taco/model/layout/node-sizing.d.ts +163 -0
- package/dist/taco/model/layout/node-sizing.js +486 -0
- package/dist/taco/model/legacy-connector-caps.d.ts +15 -0
- package/dist/taco/model/legacy-connector-caps.js +70 -0
- package/dist/taco/model/linear-call.d.ts +48 -0
- package/dist/taco/model/linear-call.js +58 -0
- package/dist/taco/model/new-nodes.d.ts +145 -0
- package/dist/taco/model/new-nodes.js +277 -0
- package/dist/taco/model/node-builder.d.ts +449 -0
- package/dist/taco/model/node-builder.js +2294 -0
- package/dist/taco/model/node-table-watch.d.ts +36 -0
- package/dist/taco/model/node-table-watch.js +63 -0
- package/dist/taco/model/node-transform.d.ts +39 -0
- package/dist/taco/model/node-transform.js +79 -0
- package/dist/taco/model/node-users-index.d.ts +10 -0
- package/dist/taco/model/node-users-index.js +82 -0
- package/dist/taco/model/operation-references.d.ts +80 -0
- package/dist/taco/model/operation-references.js +399 -0
- package/dist/taco/model/operations.d.ts +610 -0
- package/dist/taco/model/operations.js +2882 -0
- package/dist/taco/model/overlay-table.d.ts +71 -0
- package/dist/taco/model/overlay-table.js +171 -0
- package/dist/taco/model/override-remap.d.ts +69 -0
- package/dist/taco/model/override-remap.js +230 -0
- package/dist/taco/model/parent-table.d.ts +53 -0
- package/dist/taco/model/parent-table.js +193 -0
- package/dist/taco/model/problem-collector.d.ts +27 -0
- package/dist/taco/model/problem-collector.js +101 -0
- package/dist/taco/model/sha256.d.ts +10 -0
- package/dist/taco/model/sha256.js +79 -0
- package/dist/taco/model/shape-geometry.d.ts +96 -0
- package/dist/taco/model/shape-geometry.js +368 -0
- package/dist/taco/model/shared-node-table.d.ts +97 -0
- package/dist/taco/model/shared-node-table.js +546 -0
- package/dist/taco/model/slots.d.ts +113 -0
- package/dist/taco/model/slots.js +281 -0
- package/dist/taco/model/stroke-settings.d.ts +37 -0
- package/dist/taco/model/stroke-settings.js +90 -0
- package/dist/taco/model/svg-path-import.d.ts +89 -0
- package/dist/taco/model/svg-path-import.js +219 -0
- package/dist/taco/model/text-measurement.d.ts +142 -0
- package/dist/taco/model/text-measurement.js +846 -0
- package/dist/taco/model/text-reads.d.ts +66 -0
- package/dist/taco/model/text-reads.js +128 -0
- package/dist/taco/model/text-sizer.d.ts +358 -0
- package/dist/taco/model/text-sizer.js +996 -0
- package/dist/taco/model/theme-users.d.ts +59 -0
- package/dist/taco/model/theme-users.js +312 -0
- package/dist/taco/model/thumbnail.d.ts +15 -0
- package/dist/taco/model/thumbnail.js +34 -0
- package/dist/taco/model/types.d.ts +2369 -0
- package/dist/taco/model/types.js +366 -0
- package/dist/taco/model/unknown-property.d.ts +5 -0
- package/dist/taco/model/unknown-property.js +7 -0
- package/dist/taco/model/validated-documents.d.ts +22 -0
- package/dist/taco/model/validated-documents.js +22 -0
- package/dist/taco/model/variable-modes.d.ts +61 -0
- package/dist/taco/model/variable-modes.js +438 -0
- package/dist/taco/model/variable-references.d.ts +54 -0
- package/dist/taco/model/variable-references.js +183 -0
- package/dist/taco/model/variables.d.ts +24 -0
- package/dist/taco/model/variables.js +151 -0
- package/dist/taco/model/vector-network.d.ts +34 -0
- package/dist/taco/model/vector-network.js +411 -0
- package/dist/taco/svg-import/import-svg.d.ts +36 -0
- package/dist/taco/svg-import/import-svg.js +729 -0
- package/dist/taco/svg-import/index.d.ts +3 -0
- package/dist/taco/svg-import/index.js +3 -0
- package/dist/taco/svg-import/limits/limits.d.ts +79 -0
- package/dist/taco/svg-import/limits/limits.js +160 -0
- package/dist/taco/svg-import/paint/gradients.d.ts +64 -0
- package/dist/taco/svg-import/paint/gradients.js +429 -0
- package/dist/taco/svg-import/paint/paint.d.ts +32 -0
- package/dist/taco/svg-import/paint/paint.js +162 -0
- package/dist/taco/svg-import/paths/paths.d.ts +58 -0
- package/dist/taco/svg-import/paths/paths.js +205 -0
- package/dist/taco/svg-import/public-types.d.ts +279 -0
- package/dist/taco/svg-import/public-types.js +56 -0
- package/dist/taco/svg-import/report/report.d.ts +44 -0
- package/dist/taco/svg-import/report/report.js +79 -0
- package/dist/taco/svg-import/reuse/reuse.d.ts +99 -0
- package/dist/taco/svg-import/reuse/reuse.js +840 -0
- package/dist/taco/svg-import/shapes/shapes.d.ts +35 -0
- package/dist/taco/svg-import/shapes/shapes.js +386 -0
- package/dist/taco/svg-import/structure/effects.d.ts +26 -0
- package/dist/taco/svg-import/structure/effects.js +618 -0
- package/dist/taco/svg-import/structure/image.d.ts +24 -0
- package/dist/taco/svg-import/structure/image.js +495 -0
- package/dist/taco/svg-import/structure/walk.d.ts +85 -0
- package/dist/taco/svg-import/structure/walk.js +544 -0
- package/dist/taco/svg-import/style/color.d.ts +40 -0
- package/dist/taco/svg-import/style/color.js +275 -0
- package/dist/taco/svg-import/style/computed.d.ts +214 -0
- package/dist/taco/svg-import/style/computed.js +1534 -0
- package/dist/taco/svg-import/style/css.d.ts +127 -0
- package/dist/taco/svg-import/style/css.js +541 -0
- package/dist/taco/svg-import/style/media.d.ts +25 -0
- package/dist/taco/svg-import/style/media.js +307 -0
- package/dist/taco/svg-import/style/properties.d.ts +43 -0
- package/dist/taco/svg-import/style/properties.js +135 -0
- package/dist/taco/svg-import/style/selector-reach.d.ts +30 -0
- package/dist/taco/svg-import/style/selector-reach.js +169 -0
- package/dist/taco/svg-import/style/selector-validity.d.ts +14 -0
- package/dist/taco/svg-import/style/selector-validity.js +307 -0
- package/dist/taco/svg-import/text/text.d.ts +29 -0
- package/dist/taco/svg-import/text/text.js +545 -0
- package/dist/taco/svg-import/transform/matrix.d.ts +111 -0
- package/dist/taco/svg-import/transform/matrix.js +229 -0
- package/dist/taco/svg-import/tree/element-data.d.ts +52 -0
- package/dist/taco/svg-import/tree/element-data.js +155 -0
- package/dist/taco/svg-import/tree/elements.d.ts +36 -0
- package/dist/taco/svg-import/tree/elements.js +121 -0
- package/dist/taco/svg-import/units/length.d.ts +43 -0
- package/dist/taco/svg-import/units/length.js +125 -0
- package/dist/taco/svg-import/units/viewbox.d.ts +35 -0
- package/dist/taco/svg-import/units/viewbox.js +77 -0
- package/package.json +55 -4
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
// Generated by packages/import/scripts/sync-taco.mjs: the part of @taco-design/model's public index that the copied
|
|
2
|
+
// importers and their tests use. Do not edit; run the sync script instead.
|
|
3
|
+
export { assertSceneNode, checkSceneNode, deserializeDocument, ModelError } from "./codec.js";
|
|
4
|
+
export { paragraphsFromCharacters } from "./component-evaluation.js";
|
|
5
|
+
export { componentExpressionEnvironment, componentValueEnvironment, computableFieldType, storedFieldValue, variableExpressionType, variablesByExpressionName } from "./component-expressions.js";
|
|
6
|
+
export { computableFieldsOf, variablePropertiesOfField } from "./component-properties.js";
|
|
7
|
+
export { plainInstanceSample } from "./component-samples.js";
|
|
8
|
+
export { isValidVariantCombination } from "./component-validity.js";
|
|
9
|
+
export { componentNestingGraph, findComponentCycle, layerPathKey, parseLayerPath } from "./components.js";
|
|
10
|
+
export { checkExpressionSource, evaluateExpression, EXPRESSION_NAME_MAX_LENGTH, EXPRESSION_SOURCE_LIMIT, EXPRESSION_TYPES, expressionNameProblem, expressionValuesEqual, expressionValueSource, formatExpressionName, formatExpressionString, normalizeExpressionName, parseExpression, writeValueTable } from "./expressions/index.js";
|
|
11
|
+
export { getNodeBounds, getPathBounds, getVectorNetworkBounds } from "./geometry.js";
|
|
12
|
+
export { buildParentMap, fitAllGroups, fitGroupToChildren } from "./group-bounds.js";
|
|
13
|
+
export { entryOf } from "./id-table.js";
|
|
14
|
+
export { PROPERTIES_DROPPED_BY_FIELD, resolveInstance, TEXT_STYLE_PROPERTIES } from "./instance-resolver.js";
|
|
15
|
+
export { planLayerEdit } from "./layer-syntax.js";
|
|
16
|
+
export { constrainChildren } from "./layout/constraints.js";
|
|
17
|
+
export { layoutFrameTree } from "./layout/frame-layout.js";
|
|
18
|
+
export { multiplyTransforms, nodeLocalTransform, transformIsInvertible } from "./node-transform.js";
|
|
19
|
+
export { applyOperations } from "./operations.js";
|
|
20
|
+
export { isWholeEllipseArc } from "./shape-geometry.js";
|
|
21
|
+
export { miterAngleFromLimit } from "./stroke-settings.js";
|
|
22
|
+
export { pathNodeFromSvgPath } from "./svg-path-import.js";
|
|
23
|
+
export { paragraphSpaceAbove, resolveTextStyle, splitCssFontFamilies } from "./text-measurement.js";
|
|
24
|
+
export { BLEND_MODES, codeStyleId, componentId, componentPropertyId, CURRENT_DOCUMENT_SCHEMA_VERSION, DEFAULT_STROKE_MITER_ANGLE, documentId, nodeId, ownedChildIds, pageId, textStyleId, vectorHandleId, vectorRegionId, vectorSegmentId, vectorVertexId } from "./types.js";
|
|
25
|
+
export { applyVariableBindings } from "./variable-modes.js";
|
|
26
|
+
export { listVariablesForProperty, nodeSupportsVariableProperty, VARIABLE_PROPERTY_TYPES } from "./variables.js";
|
|
27
|
+
export { vectorRegionToSvgPathData } from "./vector-network.js";
|
|
@@ -0,0 +1,376 @@
|
|
|
1
|
+
import { type ComponentExpressionError } from "./component-evaluation.ts";
|
|
2
|
+
import { type ComponentId, type ComponentPropertyId, type ComponentPropertyValues, type DesignDocument, type CodeNode, type InstanceNode, type LayerOverride, type LayoutPadding, type NodeId, type SceneNode, type TextNode, type TextParagraph, type VariableModes, type VariableProperty } from "./types.ts";
|
|
3
|
+
/**
|
|
4
|
+
* The stored instance a resolved layer stands for, set on the root layer
|
|
5
|
+
* and on every nested instance layer.
|
|
6
|
+
* @since 0.23.0
|
|
7
|
+
*/
|
|
8
|
+
export interface ResolvedLayerInstance {
|
|
9
|
+
/** The stored `InstanceNode`: the outer instance, or a nested one inside a component. */
|
|
10
|
+
readonly instanceId: NodeId;
|
|
11
|
+
/** The component shown, after any swap by an outer override. */
|
|
12
|
+
readonly componentId: ComponentId;
|
|
13
|
+
/**
|
|
14
|
+
* The instance node as resolved: swapped, with outer overrides and the
|
|
15
|
+
* enclosing component's computed fields (its own `propertyValues`
|
|
16
|
+
* included) applied. The component view draws a nested instance from it.
|
|
17
|
+
* @since 0.26.0
|
|
18
|
+
*/
|
|
19
|
+
readonly node: InstanceNode;
|
|
20
|
+
/**
|
|
21
|
+
* The property values the component is resolved with: the stored
|
|
22
|
+
* instance's own, or for a nested instance its outer override, else its
|
|
23
|
+
* expression over the outer properties, else its stored value. Absent
|
|
24
|
+
* when none is set (every property at its default).
|
|
25
|
+
* @since 0.26.0
|
|
26
|
+
*/
|
|
27
|
+
readonly propertyValues?: ComponentPropertyValues;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* One derived layer of a resolved instance. `node` is the component node
|
|
31
|
+
* with the instance's overrides applied (by the precedence on
|
|
32
|
+
* `LayerOverride`) and its `frame` laid out for the instance's size, so the
|
|
33
|
+
* compiler compiles it exactly as it compiles a stored node, with
|
|
34
|
+
* `virtualId` as the render node ID.
|
|
35
|
+
*
|
|
36
|
+
* - `node.id` equals `virtualId`, and a container's `children` list holds
|
|
37
|
+
* the virtual IDs of `children`, in paint order.
|
|
38
|
+
* - `path` names the nested instance nodes passed through and then the
|
|
39
|
+
* layer itself; frames passed through inside one component are left out,
|
|
40
|
+
* as component roots are, since node IDs are unique in the document.
|
|
41
|
+
* - The root layer stands for the instance itself: its `virtualId` is the
|
|
42
|
+
* instance's own ID, its `path` is `[component root ID]` (the override key
|
|
43
|
+
* for the instance's paints and size), and its `node` is a `FrameNode`
|
|
44
|
+
* carrying the instance's `NodeBase` fields, `frame`, `rotation`, flips
|
|
45
|
+
* and `resizing`, with the component root's `layout`, `style` and
|
|
46
|
+
* `clipContent` (overrides applied). `instance` names the stored instance.
|
|
47
|
+
* A nested instance layer's `path` is the path to the nested instance
|
|
48
|
+
* node, which is also its override key on the outer instance for its
|
|
49
|
+
* paints and sizing, as `editTargetFor` writes it.
|
|
50
|
+
* - A nested instance inside the component is expanded the same way: its
|
|
51
|
+
* `node` is a `FrameNode` built like the root layer (the nested instance
|
|
52
|
+
* node's placement and `NodeBase` fields, after the outer overrides, with
|
|
53
|
+
* the nested component root's `layout`, `style` and `clipContent`),
|
|
54
|
+
* `instance` gives the nested instance and the component it shows after
|
|
55
|
+
* any swap, and `children` are the nested component's layers, whose paths
|
|
56
|
+
* continue through it.
|
|
57
|
+
* @since 0.23.0
|
|
58
|
+
*/
|
|
59
|
+
export interface ResolvedLayer {
|
|
60
|
+
readonly virtualId: NodeId;
|
|
61
|
+
/** The component node this layer is derived from. */
|
|
62
|
+
readonly sourceNodeId: NodeId;
|
|
63
|
+
/** The layer path inside the outermost instance; see `VirtualNodeId.path`. */
|
|
64
|
+
readonly path: readonly NodeId[];
|
|
65
|
+
readonly node: SceneNode;
|
|
66
|
+
readonly children: readonly ResolvedLayer[];
|
|
67
|
+
/** Present on the root layer and on nested instance layers. */
|
|
68
|
+
readonly instance?: ResolvedLayerInstance;
|
|
69
|
+
/**
|
|
70
|
+
* The variable modes the layer inherits from its parent layer, as
|
|
71
|
+
* `inheritedVariableModes` gives them for a stored node; the layer's own
|
|
72
|
+
* choices (an instance's, for the root and nested instance layers) are
|
|
73
|
+
* not included. Present on the layers of a resolved instance.
|
|
74
|
+
* @since 0.26.0
|
|
75
|
+
*/
|
|
76
|
+
readonly inheritedVariableModes?: VariableModes;
|
|
77
|
+
/**
|
|
78
|
+
* The variable modes in effect at the layer, which its bound fields read.
|
|
79
|
+
* Present on the layers of a resolved instance.
|
|
80
|
+
* @since 0.26.0
|
|
81
|
+
*/
|
|
82
|
+
readonly variableModes?: VariableModes;
|
|
83
|
+
/**
|
|
84
|
+
* Present on a slot frame layer (a frame bound to a slot property that
|
|
85
|
+
* exists): the slot property, the `layerPathKey` of the nested instance
|
|
86
|
+
* path the slot belongs to inside the outermost instance (`""` for the
|
|
87
|
+
* outermost instance's own slot), which is the key an outer fill is stored
|
|
88
|
+
* under in `InstanceNode.slots`, and the host whose content the layer
|
|
89
|
+
* shows. Without `hostId` the layer shows the default content.
|
|
90
|
+
* @since 0.37.0
|
|
91
|
+
*/
|
|
92
|
+
readonly slot?: ResolvedLayerSlot;
|
|
93
|
+
/**
|
|
94
|
+
* On each top-level layer of a slot's content: the slot host that holds
|
|
95
|
+
* it. The content of a stored instance's slot keeps its stored IDs as
|
|
96
|
+
* `virtualId`.
|
|
97
|
+
* @since 0.37.0
|
|
98
|
+
*/
|
|
99
|
+
readonly slotHostId?: NodeId;
|
|
100
|
+
/**
|
|
101
|
+
* On the layers of an instance inside slot content (its root layer and
|
|
102
|
+
* the layers derived from its component): that stored instance, which
|
|
103
|
+
* `path` and `slot.pathKey` are relative to and whose `overrides` and
|
|
104
|
+
* `slots` they key. Absent on every other layer, whose `path` is relative
|
|
105
|
+
* to the instance resolved (or, on a stored content layer, is its own ID).
|
|
106
|
+
* @since 0.37.0
|
|
107
|
+
*/
|
|
108
|
+
readonly pathInstanceId?: NodeId;
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* The slot a slot frame layer stands for; see `ResolvedLayer.slot`.
|
|
112
|
+
* @since 0.37.0
|
|
113
|
+
*/
|
|
114
|
+
export interface ResolvedLayerSlot {
|
|
115
|
+
readonly propertyId: ComponentPropertyId;
|
|
116
|
+
readonly pathKey: string;
|
|
117
|
+
readonly hostId?: NodeId;
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* What `resolveInstance` returns: the instance's derived layer tree.
|
|
121
|
+
* @since 0.23.0
|
|
122
|
+
*/
|
|
123
|
+
export interface ResolvedInstance {
|
|
124
|
+
readonly instanceId: NodeId;
|
|
125
|
+
readonly componentId: ComponentId;
|
|
126
|
+
/** The layer standing for the instance itself; see `ResolvedLayer`. */
|
|
127
|
+
readonly root: ResolvedLayer;
|
|
128
|
+
/** Every resolved layer by virtual ID, the root under the instance ID. */
|
|
129
|
+
readonly layers: ReadonlyMap<NodeId, ResolvedLayer>;
|
|
130
|
+
/**
|
|
131
|
+
* The components this instance draws, its own first, then every nested
|
|
132
|
+
* one after swaps, without repeats. A change to any of them changes the
|
|
133
|
+
* result.
|
|
134
|
+
*/
|
|
135
|
+
readonly componentIds: readonly ComponentId[];
|
|
136
|
+
/**
|
|
137
|
+
* Computed values this instance's property values make invalid, such as
|
|
138
|
+
* a font family with no font in the document, for every component it
|
|
139
|
+
* draws; each such field shows its stored value.
|
|
140
|
+
* @since 0.25.0
|
|
141
|
+
*/
|
|
142
|
+
readonly expressionErrors: readonly ComponentExpressionError[];
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* Resolved trees kept between calls so a component is resolved once for all
|
|
146
|
+
* its instances (design 4.3). One cache belongs to one document line; call
|
|
147
|
+
* `clear` when the document is replaced.
|
|
148
|
+
*
|
|
149
|
+
* A component's version rises when any node in its own layer tree is a new
|
|
150
|
+
* object, and goes back to an earlier one when a document shows that earlier
|
|
151
|
+
* tree again; an entry is reused only while every component it draws keeps
|
|
152
|
+
* its version and the theme and assets are the same objects. An instance
|
|
153
|
+
* entry also needs the instance node itself to be the same object, or one
|
|
154
|
+
* with the same fields, and no drawn text size it read to have changed.
|
|
155
|
+
* @since 0.23.0
|
|
156
|
+
*/
|
|
157
|
+
export interface InstanceResolveCache {
|
|
158
|
+
clear(): void;
|
|
159
|
+
/**
|
|
160
|
+
* How many `resolveInstance` and `resolveComponent` calls were served from
|
|
161
|
+
* the cache, and how many times a component's conditions and computed
|
|
162
|
+
* fields were evaluated (`evaluations`, since 0.25.0): once per component,
|
|
163
|
+
* component version, variables and property values with defaults filled
|
|
164
|
+
* in, however many instances share them. `contentReads` (since 0.37.0)
|
|
165
|
+
* counts the stored slot content nodes read to check that a cached
|
|
166
|
+
* instance's content is unchanged, which happens only after a document
|
|
167
|
+
* that no recorded edit made from the last one (a load). `treeReads`
|
|
168
|
+
* (since 0.38.0) counts the component layer trees read to find which
|
|
169
|
+
* components a new node table changed: only the trees holding a node the
|
|
170
|
+
* edits since the last document changed, or every tree after a load.
|
|
171
|
+
*/
|
|
172
|
+
readonly stats: {
|
|
173
|
+
readonly hits: number;
|
|
174
|
+
readonly misses: number;
|
|
175
|
+
readonly evaluations: number;
|
|
176
|
+
readonly contentReads: number;
|
|
177
|
+
readonly treeReads: number;
|
|
178
|
+
};
|
|
179
|
+
}
|
|
180
|
+
/** @since 0.23.0 */
|
|
181
|
+
export interface ResolveInstanceOptions {
|
|
182
|
+
/** Resolve layer content and appearance without computing geometry for a host that lays out the result. */
|
|
183
|
+
readonly layout?: boolean;
|
|
184
|
+
readonly cache?: InstanceResolveCache;
|
|
185
|
+
/**
|
|
186
|
+
* The variable modes the instance inherits from its parent, as
|
|
187
|
+
* `inheritedVariableModes` returns them. Read from the document when
|
|
188
|
+
* omitted; the page compiler passes them as it walks the page.
|
|
189
|
+
* @since 0.26.0
|
|
190
|
+
*/
|
|
191
|
+
readonly variableModes?: VariableModes;
|
|
192
|
+
}
|
|
193
|
+
/**
|
|
194
|
+
* Tells `cache` that the slot content of `instanceIds` changed in a node
|
|
195
|
+
* record that is written in place: the content of a slot each owns, or of a
|
|
196
|
+
* slot inside that content. A new record object is read from the edits that
|
|
197
|
+
* made it, but a write to the record the cache already read is not seen, so
|
|
198
|
+
* code that writes slot hosts or content into a working record calls this
|
|
199
|
+
* with every owner up the chain (`slotOwnersOf`).
|
|
200
|
+
* @since 0.37.0
|
|
201
|
+
*/
|
|
202
|
+
export declare function noteSlotContentChanged(cache: InstanceResolveCache, instanceIds: Iterable<NodeId>): void;
|
|
203
|
+
/**
|
|
204
|
+
* Tells `cache` that the layer trees of `componentIds` changed in a node
|
|
205
|
+
* record that is written in place. The cache notices a new record object by
|
|
206
|
+
* itself, but not a write to the record it already read, so code that lays
|
|
207
|
+
* out a working record calls this after each write to a component's layers.
|
|
208
|
+
*/
|
|
209
|
+
export declare function noteComponentTreesChanged(cache: InstanceResolveCache, componentIds: Iterable<ComponentId>): void;
|
|
210
|
+
/**
|
|
211
|
+
* Whether a drawn text size that `result`, an instance `resolveInstance`
|
|
212
|
+
* resolved with a cache, read may have changed since the drawn text sizes
|
|
213
|
+
* version `version` (`getDrawnTextSizesVersion`). True when the sizes it
|
|
214
|
+
* read are not known (resolved without a cache, or before any size was
|
|
215
|
+
* drawn) or the sizer no longer lists its changes that far back; false when
|
|
216
|
+
* no size was recorded since, or none it read changed. A caller that keeps
|
|
217
|
+
* resolved instances re-resolves only those for which this is true.
|
|
218
|
+
* @since 0.37.0
|
|
219
|
+
*/
|
|
220
|
+
export declare function resolvedTextSizesChangedSince(document: DesignDocument, result: ResolvedInstance, version: number): boolean;
|
|
221
|
+
/** Makes an instance cache. A one-pass consumer may keep component computations
|
|
222
|
+
* without retaining the complete resolved tree of every occurrence.
|
|
223
|
+
*/
|
|
224
|
+
export declare function createInstanceResolveCache(retainTrees?: boolean): InstanceResolveCache;
|
|
225
|
+
/**
|
|
226
|
+
* The cache that everything resolving the open document's instances shares:
|
|
227
|
+
* the layout cascade, the page compiler, the accessibility tree, the
|
|
228
|
+
* selection and the text font scan. Entries are kept by instance node object
|
|
229
|
+
* and checked against the document they are read for, so the stored document
|
|
230
|
+
* and the laid-out one each hit their own, and the instances both share are
|
|
231
|
+
* resolved once for all of them. The host clears it when another document is
|
|
232
|
+
* opened.
|
|
233
|
+
* @since 0.37.0
|
|
234
|
+
*/
|
|
235
|
+
export declare function sharedInstanceResolveCache(): InstanceResolveCache;
|
|
236
|
+
/**
|
|
237
|
+
* Tells `cache` that `working` holds the node entries of `base` at every ID
|
|
238
|
+
* but `changedNodeIds`, for a document built outside recorded edits (the
|
|
239
|
+
* cascade's view of its working record). The cache then reads again only the
|
|
240
|
+
* component trees holding one of those nodes when it moves between `working`
|
|
241
|
+
* and documents linked to `base`, instead of every tree. Later writes into
|
|
242
|
+
* `working` in place are told with `noteComponentTreesChanged`.
|
|
243
|
+
* @since 0.37.0
|
|
244
|
+
*/
|
|
245
|
+
export declare function noteWorkingDocument(cache: InstanceResolveCache, working: DesignDocument, base: DesignDocument, changedNodeIds: Iterable<NodeId>): void;
|
|
246
|
+
/**
|
|
247
|
+
* The expressions and conditions on `componentId`'s layers that do not parse
|
|
248
|
+
* or check, in tree order. Each is left out when the component is resolved:
|
|
249
|
+
* the field shows its stored value, and a condition counts as no condition
|
|
250
|
+
* (design 8.5). After them come the computed values the default property
|
|
251
|
+
* values make invalid, such as a font family with no font in the document,
|
|
252
|
+
* which show their stored value too. A nested component's errors are listed
|
|
253
|
+
* under its own ID.
|
|
254
|
+
* @since 0.25.0
|
|
255
|
+
*/
|
|
256
|
+
export declare function componentExpressionErrors(document: DesignDocument, componentId: ComponentId, options?: ResolveInstanceOptions): readonly ComponentExpressionError[];
|
|
257
|
+
/** Which variable properties a plain override value replaces (design 3.5, rule 2). */
|
|
258
|
+
export declare const PROPERTIES_DROPPED_BY_FIELD: Readonly<Partial<Record<keyof LayerOverride, readonly VariableProperty[]>>>;
|
|
259
|
+
/** The variable property each side of a `padding` override replaces: a side drops only its own binding. */
|
|
260
|
+
export declare const PADDING_PROPERTIES: Readonly<Record<keyof LayoutPadding, VariableProperty>>;
|
|
261
|
+
/** The variable property each `textStyle` override member replaces: a member drops only its own binding. */
|
|
262
|
+
export declare const TEXT_STYLE_PROPERTIES: Readonly<Record<string, VariableProperty>>;
|
|
263
|
+
/**
|
|
264
|
+
* `paragraphs` as an instance draws them under an override: its `textStyleId` (null takes the style away) and its
|
|
265
|
+
* `textStyle` over every run, the `textStyle` over each run's own overrides. List markers are left as they are.
|
|
266
|
+
*/
|
|
267
|
+
export declare function restyledParagraphs(paragraphs: readonly TextParagraph[], override: Pick<LayerOverride, "textStyleId" | "textStyle">): readonly TextParagraph[];
|
|
268
|
+
/**
|
|
269
|
+
* Whether an instance was resized away from its component's size, which a
|
|
270
|
+
* swap keeps (as in Figma). An axis on which the component root hugs, after
|
|
271
|
+
* the instance's own sizing override and Fill, does not count: its size
|
|
272
|
+
* follows the content, so a longer label is not a resize.
|
|
273
|
+
*/
|
|
274
|
+
export declare function resizedAwayFromComponent(document: DesignDocument, instance: InstanceNode): boolean;
|
|
275
|
+
/**
|
|
276
|
+
* One text or code layer of a stored instance, as `instanceTextLayers` gives
|
|
277
|
+
* it; the fields are those of `ResolvedLayer`.
|
|
278
|
+
* @since 0.37.0
|
|
279
|
+
*/
|
|
280
|
+
export interface ResolvedTextLayer {
|
|
281
|
+
readonly virtualId: NodeId;
|
|
282
|
+
readonly sourceNodeId: NodeId;
|
|
283
|
+
readonly path: readonly NodeId[];
|
|
284
|
+
readonly node: TextNode | CodeNode;
|
|
285
|
+
readonly pathInstanceId?: NodeId;
|
|
286
|
+
}
|
|
287
|
+
/**
|
|
288
|
+
* The text and code layers of the stored instance `instanceId`, in the
|
|
289
|
+
* order `resolveInstance` lists its layers, with the words, styles and fonts
|
|
290
|
+
* it gives them, but without layout: no auto layout, constraint or group
|
|
291
|
+
* fitting runs and no text is measured, so each keeps the frame its
|
|
292
|
+
* component stores, an overridden or computed text that sizes itself too.
|
|
293
|
+
* The instance's other layers are not built. For readers of words and
|
|
294
|
+
* fonts, such as a document's font scan, that must not measure text. A
|
|
295
|
+
* cache may be shared with `resolveInstance`; the components computed
|
|
296
|
+
* without measuring are kept apart in it.
|
|
297
|
+
*
|
|
298
|
+
* Throws as `resolveInstance` does.
|
|
299
|
+
* @since 0.37.0
|
|
300
|
+
*/
|
|
301
|
+
export declare function instanceTextLayers(document: DesignDocument, instanceId: NodeId, options?: ResolveInstanceOptions): readonly ResolvedTextLayer[];
|
|
302
|
+
/**
|
|
303
|
+
* Every component a resolved instance's rendering goes through, each once: those it draws (its own, then each
|
|
304
|
+
* nested one after overrides, property values, their defaults and swaps) and those whose trees refused a computed
|
|
305
|
+
* swap in it. A change to any of them can change what the instance shows.
|
|
306
|
+
*/
|
|
307
|
+
export declare function resolvedInstanceComponents(result: ResolvedInstance): ComponentId[];
|
|
308
|
+
/**
|
|
309
|
+
* Derives the layers an instance shows: virtual IDs, overrides applied by
|
|
310
|
+
* precedence, nested instances expanded, and the component root's auto
|
|
311
|
+
* layout run for the instance's size and overridden text. A hugging axis
|
|
312
|
+
* takes its natural size, whatever the stored frame says; a fixed axis and
|
|
313
|
+
* an axis the instance fills keep the stored size.
|
|
314
|
+
*
|
|
315
|
+
* With component properties (design 8.6, since 0.25.0), each component in
|
|
316
|
+
* the instance is resolved in this order: conditions leave layers out (with
|
|
317
|
+
* their sublayers, taking no space in auto layout), computed fields are
|
|
318
|
+
* evaluated for the instance's property values and written into the model
|
|
319
|
+
* fields, overrides go on top (an override wins over a computed value), and
|
|
320
|
+
* then layout runs. A nested instance's property values are its outer
|
|
321
|
+
* override, else its expression over the outer properties, else its stored
|
|
322
|
+
* value, else the nested component's default. An expression that does not
|
|
323
|
+
* check is skipped (see `componentExpressionErrors`). A resized instance
|
|
324
|
+
* places the root's children by their constraints (`constrainChildren`):
|
|
325
|
+
* every child of a root without auto layout, and the absolute children of
|
|
326
|
+
* an auto layout root.
|
|
327
|
+
*
|
|
328
|
+
* Throws a `ModelError` with code `INVALID_TREE` when `instanceId` is not
|
|
329
|
+
* an instance node or its component is missing.
|
|
330
|
+
* @since 0.23.0
|
|
331
|
+
*/
|
|
332
|
+
export declare function resolveInstance(document: DesignDocument, instanceId: NodeId, options?: ResolveInstanceOptions): ResolvedInstance;
|
|
333
|
+
/**
|
|
334
|
+
* Derives the component view: the component's own layer tree at its natural
|
|
335
|
+
* size with no overrides, as `ResolvedLayer`s whose `virtualId`s are the
|
|
336
|
+
* stored node IDs. Isolation mode draws it; a nested instance inside it is
|
|
337
|
+
* expanded as in `resolveInstance`, under its own stored ID. A component
|
|
338
|
+
* with properties or expressions shows its default values (design 8.9):
|
|
339
|
+
* conditions and computed fields are evaluated with the defaults, and its
|
|
340
|
+
* auto layout frames are laid out again.
|
|
341
|
+
* @since 0.23.0
|
|
342
|
+
*/
|
|
343
|
+
export declare function resolveComponent(document: DesignDocument, componentId: ComponentId, options?: ResolveInstanceOptions): ResolvedLayer;
|
|
344
|
+
/**
|
|
345
|
+
* The size an instance takes on each axis it hugs, from its resolved root.
|
|
346
|
+
* `undefined` on an axis the instance keeps as stored (Fixed, Fill, or a
|
|
347
|
+
* component root without auto layout).
|
|
348
|
+
* @since 0.23.0
|
|
349
|
+
*/
|
|
350
|
+
export declare function huggedInstanceSize(document: DesignDocument, instanceId: NodeId, options?: ResolveInstanceOptions): {
|
|
351
|
+
readonly width?: number;
|
|
352
|
+
readonly height?: number;
|
|
353
|
+
};
|
|
354
|
+
/** The `huggedInstanceSize` of an instance already resolved. */
|
|
355
|
+
export declare function huggedSizeOf(resolved: ResolvedInstance): {
|
|
356
|
+
readonly width?: number;
|
|
357
|
+
readonly height?: number;
|
|
358
|
+
};
|
|
359
|
+
/**
|
|
360
|
+
* Every node the renderer draws, for code that scans the document for the
|
|
361
|
+
* fonts, characters or assets its text uses: the stored nodes (page layers
|
|
362
|
+
* and component layers, but no slot host and no slot content), then the layers of every stored instance outside
|
|
363
|
+
* slot content as
|
|
364
|
+
* `resolveInstance` derives them, with the instance's overrides, property
|
|
365
|
+
* values and nested instances applied and the virtual ID as `id`. Text or a
|
|
366
|
+
* font that exists only in an override is found here and nowhere in
|
|
367
|
+
* `document.nodes`. An instance that cannot be resolved (a missing component
|
|
368
|
+
* or a nesting cycle) adds no layers; the compiler reports that itself.
|
|
369
|
+
* Slot content is listed once, as the layers of the instance that draws it
|
|
370
|
+
* (since 0.37.0), so content its instance does not draw, such as dormant
|
|
371
|
+
* content whose slot frame a condition leaves out, is not listed.
|
|
372
|
+
* The same document object gives the same array, and unchanged instances
|
|
373
|
+
* give the same layer objects, so per-node caches keyed by object stay warm.
|
|
374
|
+
* @since 0.26.0
|
|
375
|
+
*/
|
|
376
|
+
export declare function drawnNodes(document: DesignDocument): readonly SceneNode[];
|