@yahoo/uds-create-config 2.45.0 → 3.0.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/README.md +129 -0
- package/dist/ai-lanes.d.ts +23 -0
- package/dist/ai-lanes.js +34 -0
- package/dist/authoring/define-component.d.ts +85 -0
- package/dist/configs/CanvasConfig.d.ts +3237 -0
- package/dist/configs/CanvasConfig.js +332 -0
- package/dist/configs/build-options.d.ts +10 -0
- package/dist/configs/build-options.js +68 -0
- package/dist/configs/platform.d.ts +15 -0
- package/dist/configs/platform.js +17 -0
- package/dist/configs/react-native-system.d.ts +3026 -0
- package/dist/configs/react-native-system.js +64 -0
- package/dist/configs/system.d.ts +2771 -0
- package/dist/configs/system.js +74 -0
- package/dist/css/properties.generated.d.ts +14 -0
- package/dist/css/properties.generated.js +6260 -0
- package/dist/css/value-type.d.ts +48 -0
- package/dist/css/value-type.js +131 -0
- package/dist/css/values.d.ts +33 -0
- package/dist/css/values.js +116 -0
- package/dist/entities/native/NativeModifier.d.ts +25 -0
- package/dist/entities/native/NativeModifier.js +41 -0
- package/dist/entities/native/NativeSettings.d.ts +44 -0
- package/dist/entities/native/NativeSettings.js +39 -0
- package/dist/entities/native/NativeStyleProperty.d.ts +355 -0
- package/dist/entities/native/NativeStyleProperty.js +28 -0
- package/dist/entities/native/NativeToken.d.ts +31 -0
- package/dist/entities/native/NativeToken.js +49 -0
- package/dist/entities/system/CanvasRole.d.ts +34 -0
- package/dist/entities/system/CanvasRole.js +45 -0
- package/dist/entities/system/Component.d.ts +1287 -0
- package/dist/entities/system/Component.js +1840 -0
- package/dist/entities/system/Composite.d.ts +12 -0
- package/dist/entities/system/Composite.js +26 -0
- package/dist/entities/system/Device.d.ts +11 -0
- package/dist/entities/system/Device.js +18 -0
- package/dist/entities/system/File.d.ts +72 -0
- package/dist/entities/system/File.js +136 -0
- package/dist/entities/system/Font.d.ts +48 -0
- package/dist/entities/system/Font.js +56 -0
- package/dist/entities/system/GlobalStyle.d.ts +26 -0
- package/dist/entities/system/GlobalStyle.js +54 -0
- package/dist/entities/system/Guidance.d.ts +85 -0
- package/dist/entities/system/Guidance.js +59 -0
- package/dist/entities/system/GuidanceStyle.d.ts +14 -0
- package/dist/entities/system/GuidanceStyle.js +8 -0
- package/dist/entities/system/Icon.d.ts +46 -0
- package/dist/entities/system/Icon.js +46 -0
- package/dist/entities/system/LinkedSystem.d.ts +504 -0
- package/dist/entities/system/LinkedSystem.js +814 -0
- package/dist/entities/system/Modifier.d.ts +92 -0
- package/dist/entities/system/Modifier.js +120 -0
- package/dist/entities/system/Motion.d.ts +28 -0
- package/dist/entities/system/Motion.js +48 -0
- package/dist/entities/system/Operation.d.ts +100 -0
- package/dist/entities/system/Operation.js +236 -0
- package/dist/entities/system/Package.d.ts +42 -0
- package/dist/entities/system/Package.js +75 -0
- package/dist/entities/system/Settings.d.ts +94 -0
- package/dist/entities/system/Settings.js +166 -0
- package/dist/entities/system/StyleProperty.d.ts +135 -0
- package/dist/entities/system/StyleProperty.js +438 -0
- package/dist/entities/system/Token.d.ts +67 -0
- package/dist/entities/system/Token.js +129 -0
- package/dist/entities/system/Tool.d.ts +134 -0
- package/dist/entities/system/Tool.js +124 -0
- package/dist/entities/system/color.d.ts +64 -0
- package/dist/entities/system/color.js +123 -0
- package/dist/entities/system/component-module.d.ts +63 -0
- package/dist/entities/system/component-module.js +258 -0
- package/dist/entities/system/copy-plan.d.ts +98 -0
- package/dist/entities/system/copy-plan.js +451 -0
- package/dist/entities/system/defineComponent.d.ts +428 -0
- package/dist/entities/system/defineComponent.js +337 -0
- package/dist/entities/system/element.d.ts +101 -0
- package/dist/entities/system/element.js +171 -0
- package/dist/entities/system/icon-library.d.ts +64 -0
- package/dist/entities/system/icon-library.js +112 -0
- package/dist/entities/system/icon-metadata.d.ts +72 -0
- package/dist/entities/system/icon-metadata.js +111 -0
- package/dist/entities/system/link-declaration.d.ts +27 -0
- package/dist/entities/system/link-declaration.js +64 -0
- package/dist/entities/system/link-plan.d.ts +160 -0
- package/dist/entities/system/link-plan.js +770 -0
- package/dist/entities/system/runtime-modules.d.ts +25 -0
- package/dist/entities/system/runtime-modules.js +38 -0
- package/dist/entities/system/style-bag.d.ts +20 -0
- package/dist/entities/system/style-bag.js +246 -0
- package/dist/entities/system/token-index.d.ts +89 -0
- package/dist/entities/system/token-index.js +112 -0
- package/dist/framework/Config.d.ts +2472 -0
- package/dist/framework/Config.js +5023 -0
- package/dist/framework/Entity.d.ts +127 -0
- package/dist/framework/Entity.js +125 -0
- package/dist/framework/authoring.d.ts +24 -0
- package/dist/framework/authoring.js +7 -0
- package/dist/framework/change-hooks.d.ts +119 -0
- package/dist/framework/change-hooks.js +131 -0
- package/dist/framework/changes.d.ts +88 -0
- package/dist/framework/changes.js +246 -0
- package/dist/framework/class-names.d.ts +260 -0
- package/dist/framework/class-names.js +630 -0
- package/dist/framework/coalesce.d.ts +25 -0
- package/dist/framework/coalesce.js +60 -0
- package/dist/framework/config-op.d.ts +76 -0
- package/dist/framework/config-op.js +43 -0
- package/dist/framework/config-operation-kind.d.ts +14 -0
- package/dist/framework/config-operation-kind.js +14 -0
- package/dist/framework/config-ops.d.ts +34 -0
- package/dist/framework/config-ops.js +187 -0
- package/dist/framework/defineConfig.d.ts +196 -0
- package/dist/framework/defineConfig.js +100 -0
- package/dist/framework/defineDerivedEntity.d.ts +74 -0
- package/dist/framework/defineDerivedEntity.js +83 -0
- package/dist/framework/defineEntity.d.ts +318 -0
- package/dist/framework/defineEntity.js +183 -0
- package/dist/framework/defineSubEntity.d.ts +148 -0
- package/dist/framework/defineSubEntity.js +121 -0
- package/dist/framework/derived-mutations.d.ts +20 -0
- package/dist/framework/derived-mutations.js +38 -0
- package/dist/framework/entity-search.d.ts +29 -0
- package/dist/framework/entity-search.js +117 -0
- package/dist/framework/inline-sources.d.ts +49 -0
- package/dist/framework/inline-sources.js +388 -0
- package/dist/framework/layer-styles.d.ts +25 -0
- package/dist/framework/layer-styles.js +49 -0
- package/dist/framework/memo.d.ts +48 -0
- package/dist/framework/memo.js +84 -0
- package/dist/framework/overlay.d.ts +49 -0
- package/dist/framework/overlay.js +17 -0
- package/dist/framework/plan.d.ts +49 -0
- package/dist/framework/plan.js +73 -0
- package/dist/framework/projections.d.ts +480 -0
- package/dist/framework/projections.js +974 -0
- package/dist/framework/prop-surface.d.ts +132 -0
- package/dist/framework/prop-surface.js +278 -0
- package/dist/framework/ref-graph.d.ts +71 -0
- package/dist/framework/ref-graph.js +158 -0
- package/dist/framework/ref-integrity.d.ts +55 -0
- package/dist/framework/ref-integrity.js +171 -0
- package/dist/framework/registered.d.ts +95 -0
- package/dist/framework/registry-dir.d.ts +42 -0
- package/dist/framework/registry-dir.js +48 -0
- package/dist/framework/registry.d.ts +300 -0
- package/dist/framework/registry.js +104 -0
- package/dist/framework/rejection.d.ts +58 -0
- package/dist/framework/rejection.js +111 -0
- package/dist/framework/rename-inference.d.ts +26 -0
- package/dist/framework/rename-inference.js +50 -0
- package/dist/framework/render-spec.d.ts +296 -0
- package/dist/framework/render-spec.js +809 -0
- package/dist/framework/schema-version.d.ts +140 -0
- package/dist/framework/schema-version.js +214 -0
- package/dist/framework/schemas.d.ts +109 -0
- package/dist/framework/schemas.js +615 -0
- package/dist/framework/session.d.ts +196 -0
- package/dist/framework/session.js +367 -0
- package/dist/framework/signature.d.ts +15 -0
- package/dist/framework/signature.js +83 -0
- package/dist/framework/snapshot.d.ts +115 -0
- package/dist/framework/snapshot.js +277 -0
- package/dist/framework/source-integrity.d.ts +226 -0
- package/dist/framework/source-integrity.js +478 -0
- package/dist/framework/sources.d.ts +211 -0
- package/dist/framework/sources.js +89 -0
- package/dist/framework/utils/compiled-schema.d.ts +23 -0
- package/dist/framework/utils/compiled-schema.js +46 -0
- package/dist/framework/utils/content-key.d.ts +15 -0
- package/dist/framework/utils/content-key.js +33 -0
- package/dist/framework/utils/enumerated.d.ts +13 -0
- package/dist/framework/utils/enumerated.js +19 -0
- package/dist/framework/utils/field-path.d.ts +95 -0
- package/dist/framework/utils/field-path.js +136 -0
- package/dist/framework/utils/field-schema.d.ts +55 -0
- package/dist/framework/utils/field-schema.js +183 -0
- package/dist/framework/utils/group.d.ts +37 -0
- package/dist/framework/utils/group.js +13 -0
- package/dist/framework/utils/package-path.d.ts +37 -0
- package/dist/framework/utils/package-path.js +61 -0
- package/dist/framework/utils/refs.d.ts +194 -0
- package/dist/framework/utils/refs.js +403 -0
- package/dist/framework/validate-spec.d.ts +27 -0
- package/dist/framework/validate-spec.js +45 -0
- package/dist/framework/value-domain.d.ts +26 -0
- package/dist/framework/value-domain.js +202 -0
- package/dist/framework/views-facade.d.ts +15 -0
- package/dist/framework/views-facade.js +19 -0
- package/dist/index.d.ts +90 -42
- package/dist/index.js +86 -37
- package/dist/migrations/2.0.0/raw-css.d.ts +11 -0
- package/dist/migrations/2.0.0/raw-css.js +72 -0
- package/dist/migrations/2.0.0/v1-artifact.d.ts +1559 -0
- package/dist/migrations/2.0.0/v1-artifact.js +1018 -0
- package/dist/migrations/20260908171448_settings_as_kind.d.ts +22 -0
- package/dist/migrations/20260908171448_settings_as_kind.js +89 -0
- package/dist/migrations/20260908194245_visible_state_pointer.d.ts +19 -0
- package/dist/migrations/20260908194245_visible_state_pointer.js +115 -0
- package/dist/migrations/20260909183001_icon_knockout_variants.d.ts +18 -0
- package/dist/migrations/20260909183001_icon_knockout_variants.js +8 -0
- package/dist/migrations/20260910212453_linked_system_link_ops.d.ts +13 -0
- package/dist/migrations/20260910212453_linked_system_link_ops.js +8 -0
- package/dist/migrations/index.d.ts +2 -0
- package/dist/migrations/index.js +2 -0
- package/dist/react-native/style-keys.generated.d.ts +10 -0
- package/dist/react-native/style-keys.generated.js +167 -0
- package/dist/renderer/RendererErrorBoundary.d.ts +32 -5
- package/dist/renderer/RendererErrorBoundary.js +59 -10
- package/dist/renderer/UdsRenderer.d.ts +11 -10
- package/dist/renderer/UdsRenderer.js +1 -1
- package/dist/renderer/assetEntries.d.ts +37 -0
- package/dist/renderer/assetEntries.js +39 -0
- package/dist/renderer/assetRenderable.d.ts +14 -6
- package/dist/renderer/assetRenderable.js +8 -2
- package/dist/renderer/componentEntry.d.ts +58 -0
- package/dist/renderer/componentEntry.js +71 -0
- package/dist/renderer/icon-library.d.ts +20 -0
- package/dist/renderer/index.d.ts +7 -7
- package/dist/renderer/index.js +5 -5
- package/dist/renderer/primitives/SlotRenderer.d.ts +1 -1
- package/dist/renderer/primitives/SlotRenderer.js +1 -1
- package/dist/renderer/runtimeComponent.d.ts +33 -0
- package/dist/renderer/runtimeComponent.js +113 -0
- package/dist/renderer/spec-content.d.ts +43 -0
- package/dist/renderer/spec-content.js +95 -0
- package/dist/renderer/wrapRegistry.d.ts +22 -37
- package/dist/renderer/wrapRegistry.js +10 -20
- package/dist/renderer/wrappers/event-bridge.js +6 -5
- package/dist/renderer/wrappers/hex-normalize.js +6 -5
- package/dist/renderer/wrappers/html-aliases.d.ts +7 -2
- package/dist/renderer/wrappers/html-aliases.js +36 -19
- package/dist/renderer/wrappers/inline-styles.js +7 -6
- package/dist/spec/asset-jsx.d.ts +18 -5
- package/dist/spec/asset-jsx.js +27 -16
- package/dist/spec/collapse-text-labels.d.ts +5 -15
- package/dist/spec/collapse-text-labels.js +26 -19
- package/dist/spec/empty-node-slots.d.ts +56 -34
- package/dist/spec/empty-node-slots.js +87 -47
- package/dist/spec/index.d.ts +21 -10
- package/dist/spec/index.js +21 -10
- package/dist/spec/jsxToSpec.d.ts +14 -9
- package/dist/spec/jsxToSpec.js +20 -3
- package/dist/spec/preview-elements.d.ts +63 -0
- package/dist/spec/preview-elements.js +89 -0
- package/dist/spec/rewrite-refs.d.ts +58 -0
- package/dist/spec/rewrite-refs.js +250 -0
- package/dist/spec/specToJsx.js +18 -29
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +39 -52
- package/dist/AssetGroup.d.ts +0 -77
- package/dist/AssetGroup.js +0 -125
- package/dist/Component.d.ts +0 -333
- package/dist/Component.js +0 -1061
- package/dist/ComponentGroup.d.ts +0 -22
- package/dist/ComponentGroup.js +0 -51
- package/dist/CompositeStyle.d.ts +0 -30
- package/dist/CompositeStyle.js +0 -59
- package/dist/Config.d.ts +0 -528
- package/dist/Config.js +0 -1712
- package/dist/Mode.d.ts +0 -41
- package/dist/Mode.js +0 -81
- package/dist/Modifier.d.ts +0 -51
- package/dist/Modifier.js +0 -97
- package/dist/MotionDef.d.ts +0 -81
- package/dist/MotionDef.js +0 -212
- package/dist/Props.d.ts +0 -332
- package/dist/Props.js +0 -35
- package/dist/Provider.d.ts +0 -20
- package/dist/Provider.js +0 -14
- package/dist/StyleProp.d.ts +0 -145
- package/dist/StyleProp.js +0 -239
- package/dist/Token.d.ts +0 -76
- package/dist/Token.js +0 -133
- package/dist/TokenGroup.d.ts +0 -33
- package/dist/TokenGroup.js +0 -69
- package/dist/asset-kind.d.ts +0 -55
- package/dist/asset-kind.js +0 -29
- package/dist/asset-value.d.ts +0 -23
- package/dist/asset-value.js +0 -40
- package/dist/brands.d.ts +0 -30
- package/dist/brands.js +0 -20
- package/dist/captureCallerPath.d.ts +0 -48
- package/dist/captureCallerPath.js +0 -95
- package/dist/colorExpressions.d.ts +0 -131
- package/dist/colorExpressions.js +0 -148
- package/dist/component-referrers.d.ts +0 -30
- package/dist/component-referrers.js +0 -40
- package/dist/config-diagnostics.d.ts +0 -21
- package/dist/config-diagnostics.js +0 -12
- package/dist/defineAssetGroup.d.ts +0 -200
- package/dist/defineAssetGroup.js +0 -323
- package/dist/defineProvider.d.ts +0 -29
- package/dist/defineProvider.js +0 -60
- package/dist/element-marker.d.ts +0 -63
- package/dist/element-marker.js +0 -113
- package/dist/entity-utils.d.ts +0 -56
- package/dist/entity-utils.js +0 -105
- package/dist/extension.d.ts +0 -55
- package/dist/extension.js +0 -214
- package/dist/factories.d.ts +0 -863
- package/dist/factories.js +0 -475
- package/dist/font-face.d.ts +0 -25
- package/dist/font-face.js +0 -72
- package/dist/foreign-component-name.d.ts +0 -21
- package/dist/foreign-component-name.js +0 -42
- package/dist/interpolate.d.ts +0 -20
- package/dist/interpolate.js +0 -10
- package/dist/jsx/__fixtures__/cross-component-preview.d.ts +0 -3
- package/dist/jsx/__fixtures__/cross-component-preview.js +0 -15
- package/dist/jsx/jsx-dev-runtime.d.ts +0 -15
- package/dist/jsx/jsx-dev-runtime.js +0 -11
- package/dist/jsx/jsx-runtime.d.ts +0 -48
- package/dist/jsx/jsx-runtime.js +0 -305
- package/dist/linked-system-pins.d.ts +0 -30
- package/dist/linked-system-pins.js +0 -45
- package/dist/linkedNodePrefixes.d.ts +0 -73
- package/dist/linkedNodePrefixes.js +0 -99
- package/dist/markers.d.ts +0 -235
- package/dist/markers.js +0 -70
- package/dist/motion-constants.d.ts +0 -37
- package/dist/motion-constants.js +0 -61
- package/dist/native/NativeConfig.d.ts +0 -56
- package/dist/native/NativeConfig.js +0 -162
- package/dist/native/assets.d.ts +0 -20
- package/dist/native/assets.js +0 -17
- package/dist/native/components.d.ts +0 -139
- package/dist/native/components.js +0 -67
- package/dist/native/index.d.ts +0 -18
- package/dist/native/index.js +0 -17
- package/dist/native/modes.d.ts +0 -10
- package/dist/native/modes.js +0 -11
- package/dist/native/types.d.ts +0 -95
- package/dist/native/types.js +0 -0
- package/dist/native/validation.d.ts +0 -8
- package/dist/native/validation.js +0 -885
- package/dist/native/values.d.ts +0 -7
- package/dist/native/values.js +0 -15
- package/dist/native.d.ts +0 -12
- package/dist/native.js +0 -10
- package/dist/refs.d.ts +0 -204
- package/dist/refs.js +0 -129
- package/dist/registry-aliases.d.ts +0 -33
- package/dist/registry-aliases.js +0 -35
- package/dist/registry-dir.d.ts +0 -22
- package/dist/registry-dir.js +0 -10
- package/dist/renderer/makeRegistry.d.ts +0 -34
- package/dist/renderer/makeRegistry.js +0 -52
- package/dist/renderer/makeUdsRenderer.d.ts +0 -13
- package/dist/renderer/makeUdsRenderer.js +0 -51
- package/dist/renderer/wrappers/component-slots.d.ts +0 -41
- package/dist/renderer/wrappers/component-slots.js +0 -66
- package/dist/renderer/wrappers/slot-resolution.d.ts +0 -25
- package/dist/renderer/wrappers/slot-resolution.js +0 -68
- package/dist/renderer/wrappers/void-elements.d.ts +0 -37
- package/dist/renderer/wrappers/void-elements.js +0 -40
- package/dist/spec/layer-props.d.ts +0 -52
- package/dist/spec/layer-props.js +0 -149
- package/dist/spec/preview-controls.d.ts +0 -44
- package/dist/spec/preview-controls.js +0 -139
- package/dist/spec/slot-refs.d.ts +0 -39
- package/dist/spec/slot-refs.js +0 -56
- package/dist/token-override-rows.d.ts +0 -68
- package/dist/token-override-rows.js +0 -233
- package/dist/tokenValueType.d.ts +0 -34
- package/dist/tokenValueType.js +0 -138
- package/dist/types/css-properties.d.ts +0 -233
- package/dist/types/css-properties.js +0 -14
- package/dist/types/css-property-keywords.d.ts +0 -156
- package/dist/types/css-property-keywords.js +0 -616
- package/dist/types/css-values.d.ts +0 -63
- package/dist/types/css-values.js +0 -16
- package/dist/types.d.ts +0 -1138
- package/dist/types.js +0 -12
- package/dist/units.d.ts +0 -14
- package/dist/units.js +0 -16
- package/dist/utils/index.d.ts +0 -4
- package/dist/utils/index.js +0 -4
package/dist/index.js
CHANGED
|
@@ -1,37 +1,86 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
|
|
1
|
+
import { AI_LANES, GUIDANCE_LANES } from "./ai-lanes.js";
|
|
2
|
+
import { BUILD_DEFAULTS } from "./configs/build-options.js";
|
|
3
|
+
import { CONFIG_OPERATION_KIND } from "./framework/config-operation-kind.js";
|
|
4
|
+
import { ConfigFormatError, ConfigRejection, isConfigFormatError, isConfigRejection } from "./framework/rejection.js";
|
|
5
|
+
import { ENTITY_PATH_MESSAGE, MINTED, collectRefs, entityRefOf, isEntityPath, isExtendedRef, isMintedRow, isRef, kindOf, memberOf, memberRef, orRef, pathOf, ref, refLeaf, refSchema, rewriteRefNamespace, rewriteRefSource, rewriteRefs, sourceOf, splitRef } from "./framework/utils/refs.js";
|
|
6
|
+
import { describePatch } from "./framework/plan.js";
|
|
7
|
+
import { applyPathDelta, isPlainObject, namedFields, pathDelta, pathSegments, setAtPath, touchedFields } from "./framework/utils/field-path.js";
|
|
8
|
+
import { declaredField, deriveCreateSchema, deriveUpdateSchema, fieldKeys } from "./framework/utils/field-schema.js";
|
|
9
|
+
import { danglingDirectives, danglingSourcedRefs, leafAddresses, leafVerb, misdeclaredOverlays, overlayVerb, redundantQualifiers, unadoptedDirectives, unreadableBorrows, unstatableConditions, valueAt } from "./framework/source-integrity.js";
|
|
10
|
+
import { opsForKind } from "./framework/registry.js";
|
|
11
|
+
import { GROUP, brandGroup, isGroupBody } from "./framework/utils/group.js";
|
|
12
|
+
import { defineEntity } from "./framework/defineEntity.js";
|
|
13
|
+
import { defineSubEntity } from "./framework/defineSubEntity.js";
|
|
14
|
+
import { alpha, darken, isDerivedColor, isGradient, lighten, linearGradient, mix, renderDerivedColor, renderGradient } from "./entities/system/color.js";
|
|
15
|
+
import { VOID_ELEMENTS, childrenPolicy, forwardsOf, ownerOf, partsOf, renderedElement, renderedTarget, rootLayerOf } from "./entities/system/element.js";
|
|
16
|
+
import { CSS_PROPERTY_NAMES, CSS_WIDE_KEYWORDS, cssProperty, cssValueIssue, isCssProperty } from "./css/values.js";
|
|
17
|
+
import { valueLeavesOf, valueSchemaOf } from "./framework/value-domain.js";
|
|
18
|
+
import { Composite } from "./entities/system/Composite.js";
|
|
19
|
+
import { MODIFIER_CATEGORIES, Modifier, WEB_ACTIVATIONS, modeAxes, modifierAxes, modifierAxis, modifierCategory, modifierGroupFields, modifierInvariants, modifierLeaf } from "./entities/system/Modifier.js";
|
|
20
|
+
import { BuildSection, CSS_DEFAULTS, CssSection, PLAYGROUND_DEFAULTS, PlaygroundSection, Settings, SystemSection, classPrefixOf, cssPrefixes, varPrefixOf } from "./entities/system/Settings.js";
|
|
21
|
+
import { STYLE_PROP_VALUE_FORMS, STYLE_PROP_VALUE_LEAVES, StyleProperty, classifyStylePropValue, cssPropertyNames, leavesOfStylePropValue, stylePropValueFormOf, stylePropValueSchema, toCssPropertyName } from "./entities/system/StyleProperty.js";
|
|
22
|
+
import { authoredBag, authoredValue, className, cssPropValue, cssVar, cssVarRef, declaredPropRouting, memberFromLeaf, memberLeaves, negatedCssValue, opacityPercentage, previewDefaults, previewMatrix, propOwner, propValueDomain, propValueFromAxis, renderStyleValue, resolveComponentProps, resolveFieldValue, resolveTokenValue, resolveTokenValueUnder, routedBag, sourceVarPrefix, styleAliasesOf, styleDeclarations, stylePropEntries, stylePropLeafForToken, stylePropNegates, stylePropTokenGroup, stylePropTokenPath, stylePropTokenValues, stylePropValueFromLeaf, stylePropValueLeaves, stylePropValues, stylePropertiesWriting, stylePropertyAccepts, stylePropertyFor, stylePropertyPathFor, validateComponentProps } from "./framework/projections.js";
|
|
23
|
+
import { forwardClaims, forwardedLayers, intoName, routedProp, routedPropIn, routesContent, surfaceProp, surfaceProps } from "./framework/prop-surface.js";
|
|
24
|
+
import { layerStyles, ruleApplies } from "./framework/layer-styles.js";
|
|
25
|
+
import { createSliceMemo } from "./framework/memo.js";
|
|
26
|
+
import { componentClassBase, componentCompositeClasses, componentLayerClass, componentMotionClasses, componentPropClasses, componentRuleClasses, forceModeAttribute, forceModeAttributeOf, forceModeProp, forceModePropGroup, forceModePropValue, forceModeProps, forceStateAttribute, isForceModeProp, kebabComponent, layerCompositeProps, modifierUtilitiesUsed, motionClassName, ruleCondition, splitStyleProps, stylePropClassBase, stylePropClassName, stylePropClasses, styleRuleMotionClasses } from "./framework/class-names.js";
|
|
27
|
+
import { boundElementType, componentSpec, deriveSpec, entryKeyOf, expandComponent, expandSpec, instanceSpec, previewSpec, resolveVisibility, slotTargetsOf, specWithResolvedVisibility, visibilityStateProps, visibilityTerms, withoutTruthyTerm } from "./framework/render-spec.js";
|
|
28
|
+
import { Package } from "./entities/system/Package.js";
|
|
29
|
+
import { File, SCRIPT_EXTENSIONS, isBinaryAsset } from "./entities/system/File.js";
|
|
30
|
+
import { Component, canonicalWhen, forwardedNames, layerRef, ownValues, ownsItsValues, valueRef } from "./entities/system/Component.js";
|
|
31
|
+
import { Device } from "./entities/system/Device.js";
|
|
32
|
+
import { ICON_METADATA_FORMATS, iconMemberMetadata, iconMetadata, iconMetadataDeclaration, iconMetadataFile, iconMetadataFileJsonSchema, iconMetadataFormat } from "./entities/system/icon-metadata.js";
|
|
33
|
+
import { Icon } from "./entities/system/Icon.js";
|
|
34
|
+
import { addressOf, editOp, inputOf, opOf, opVerb } from "./framework/config-op.js";
|
|
35
|
+
import { renderSignature, signatureOf } from "./framework/signature.js";
|
|
36
|
+
import { authoringSignatures } from "./framework/config-ops.js";
|
|
37
|
+
import { defineDerivedEntity } from "./framework/defineDerivedEntity.js";
|
|
38
|
+
import { Operation } from "./entities/system/Operation.js";
|
|
39
|
+
import { Tool } from "./entities/system/Tool.js";
|
|
40
|
+
import { isAuthored } from "./framework/authoring.js";
|
|
41
|
+
import { Entity } from "./framework/Entity.js";
|
|
42
|
+
import { CURRENT_SCHEMA_VERSION, SchemaVersionTooNew, detectedWireVersion, registerSchemaMigrations, schemaVersionOf, upgradeDraftEntries, upgradePatch, upgradeSerializedConfig } from "./framework/schema-version.js";
|
|
43
|
+
import { stamp } from "./framework/overlay.js";
|
|
44
|
+
import { buildRefGraph, buildRefIndex, refGraphOf, updateRefIndex } from "./framework/ref-graph.js";
|
|
45
|
+
import { Snapshot } from "./framework/snapshot.js";
|
|
46
|
+
import { UNREACHABLE, resolutionSchema, sourceUnreachable } from "./framework/sources.js";
|
|
47
|
+
import { views } from "./framework/views-facade.js";
|
|
48
|
+
import { Config, SERIALIZED_CONFIG_VERSION } from "./framework/Config.js";
|
|
49
|
+
import { defineConfig, kindsOf } from "./framework/defineConfig.js";
|
|
50
|
+
import { CANVAS_ROLES, CanvasRole } from "./entities/system/CanvasRole.js";
|
|
51
|
+
import { Font, FontFile } from "./entities/system/Font.js";
|
|
52
|
+
import { GlobalStyle, globalStyleName } from "./entities/system/GlobalStyle.js";
|
|
53
|
+
import { Guidance, guidanceReaches, guidanceScopeOf, guidanceTextOf } from "./entities/system/Guidance.js";
|
|
54
|
+
import { GuidanceStyle } from "./entities/system/GuidanceStyle.js";
|
|
55
|
+
import { isNativeConfig, isSystemConfig } from "./configs/platform.js";
|
|
56
|
+
import { componentModuleFilePaths, componentModuleKey, componentModuleSource, componentRegistryImports } from "./entities/system/component-module.js";
|
|
57
|
+
import { planCopy, sourceEntries } from "./entities/system/copy-plan.js";
|
|
58
|
+
import { planBreak, planLink, planUnlink, sourceRowStates } from "./entities/system/link-plan.js";
|
|
59
|
+
import { LINK_SLUG, LINK_SLUG_MESSAGE, LinkedSystem, borrowedGroup, borrowedItem, isLinkSlug, resolvedSource, sourceOfGroup, sourceOfItem, sourceSlugFor, sourceUnavailable, suggestLinkSlug } from "./entities/system/LinkedSystem.js";
|
|
60
|
+
import { Motion } from "./entities/system/Motion.js";
|
|
61
|
+
import { Token, defineOverride, overrideCondition, overrideKey, overrideKeyModifiers, overrideModifiers } from "./entities/system/Token.js";
|
|
62
|
+
import { danglingLocalRefs, unknownStyleLeaves } from "./framework/ref-integrity.js";
|
|
63
|
+
import { System } from "./configs/system.js";
|
|
64
|
+
import { AiChat, AiFlow, AiGeneration, AiMessage, Canvas, CanvasConfig, Node, Page, SystemSource, createCanvasConfig } from "./configs/CanvasConfig.js";
|
|
65
|
+
import { NATIVE_ACTIVATIONS, NativeModifier } from "./entities/native/NativeModifier.js";
|
|
66
|
+
import { CanvasSection, NativeSettings } from "./entities/native/NativeSettings.js";
|
|
67
|
+
import { RN_STYLE_KEYS } from "./react-native/style-keys.generated.js";
|
|
68
|
+
import { NativeStyleProperty, rnStyleKey } from "./entities/native/NativeStyleProperty.js";
|
|
69
|
+
import { NativeToken, nativeTokenValue } from "./entities/native/NativeToken.js";
|
|
70
|
+
import { ReactNativeSystem } from "./configs/react-native-system.js";
|
|
71
|
+
import { resolveValueType, sniffValueType } from "./css/value-type.js";
|
|
72
|
+
import { defineComponent } from "./entities/system/defineComponent.js";
|
|
73
|
+
import { assetType, iconCategories, iconLibraries, iconLibrary, isDeclaredElementProp, memberVariantOptions, resolveIconLibrary } from "./entities/system/icon-library.js";
|
|
74
|
+
import { declaredRuntimeModules } from "./entities/system/runtime-modules.js";
|
|
75
|
+
import { matchEntities, normalizeName, searchEntities } from "./framework/entity-search.js";
|
|
76
|
+
import { matchTokens, searchTokens, tokenBinding } from "./entities/system/token-index.js";
|
|
77
|
+
import { runChangeHooks } from "./framework/change-hooks.js";
|
|
78
|
+
import { baseOf, changeOf, changeValueAt, changesOf, describeBody, summarizeChanges } from "./framework/changes.js";
|
|
79
|
+
import { DERIVED_MUTATIONS } from "./framework/derived-mutations.js";
|
|
80
|
+
import { resolveInputDir, resolveOutDir, resolveRegistryDir } from "./framework/registry-dir.js";
|
|
81
|
+
import { inferredRenames } from "./framework/rename-inference.js";
|
|
82
|
+
import { ConfigSession, memoryConfigSource } from "./framework/session.js";
|
|
83
|
+
import { EXPORT_MEMBER, packageKey, packageName } from "./framework/utils/package-path.js";
|
|
84
|
+
import { validateSpec } from "./framework/validate-spec.js";
|
|
85
|
+
import { namedSlotTargets } from "./spec/empty-node-slots.js";
|
|
86
|
+
export { AI_LANES, AiChat, AiFlow, AiGeneration, AiMessage, BUILD_DEFAULTS, BuildSection, CANVAS_ROLES, CONFIG_OPERATION_KIND, CSS_DEFAULTS, CSS_PROPERTY_NAMES, CSS_WIDE_KEYWORDS, CURRENT_SCHEMA_VERSION, Canvas, CanvasConfig, CanvasRole, CanvasSection, Component, Composite, Config, ConfigFormatError, ConfigRejection, ConfigSession, CssSection, DERIVED_MUTATIONS, Device, ENTITY_PATH_MESSAGE, EXPORT_MEMBER, Entity, File, Font, FontFile, GROUP, GUIDANCE_LANES, GlobalStyle, Guidance, GuidanceStyle, ICON_METADATA_FORMATS, Icon, LINK_SLUG, LINK_SLUG_MESSAGE, LinkedSystem, MINTED, MODIFIER_CATEGORIES, Modifier, Motion, NATIVE_ACTIVATIONS, NativeModifier, NativeSettings, NativeStyleProperty, NativeToken, Node, Operation, PLAYGROUND_DEFAULTS, Package, Page, PlaygroundSection, RN_STYLE_KEYS, ReactNativeSystem, SCRIPT_EXTENSIONS, SERIALIZED_CONFIG_VERSION, STYLE_PROP_VALUE_FORMS, STYLE_PROP_VALUE_LEAVES, SchemaVersionTooNew, Settings, Snapshot, StyleProperty, System, SystemSection, SystemSource, Token, Tool, UNREACHABLE, VOID_ELEMENTS, WEB_ACTIVATIONS, addressOf, alpha, applyPathDelta, assetType, authoredBag, authoredValue, authoringSignatures, baseOf, borrowedGroup, borrowedItem, boundElementType, brandGroup, buildRefGraph, buildRefIndex, canonicalWhen, changeOf, changeValueAt, changesOf, childrenPolicy, className, classPrefixOf, classifyStylePropValue, collectRefs, componentClassBase, componentCompositeClasses, componentLayerClass, componentModuleFilePaths, componentModuleKey, componentModuleSource, componentMotionClasses, componentPropClasses, componentRegistryImports, componentRuleClasses, componentSpec, createCanvasConfig, createSliceMemo, cssPrefixes, cssPropValue, cssProperty, cssPropertyNames, cssValueIssue, cssVar, cssVarRef, danglingDirectives, danglingLocalRefs, danglingSourcedRefs, darken, declaredField, declaredPropRouting, declaredRuntimeModules, defineComponent, defineConfig, defineDerivedEntity, defineEntity, defineOverride, defineSubEntity, deriveCreateSchema, deriveSpec, deriveUpdateSchema, describeBody, describePatch, detectedWireVersion, editOp, entityRefOf, entryKeyOf, expandComponent, expandSpec, fieldKeys, forceModeAttribute, forceModeAttributeOf, forceModeProp, forceModePropGroup, forceModePropValue, forceModeProps, forceStateAttribute, forwardClaims, forwardedLayers, forwardedNames, forwardsOf, globalStyleName, guidanceReaches, guidanceScopeOf, guidanceTextOf, iconCategories, iconLibraries, iconLibrary, iconMemberMetadata, iconMetadata, iconMetadataDeclaration, iconMetadataFile, iconMetadataFileJsonSchema, iconMetadataFormat, inferredRenames, inputOf, instanceSpec, intoName, isAuthored, isBinaryAsset, isConfigFormatError, isConfigRejection, isCssProperty, isDeclaredElementProp, isDerivedColor, isEntityPath, isExtendedRef, isForceModeProp, isGradient, isGroupBody, isLinkSlug, isMintedRow, isNativeConfig, isPlainObject, isRef, isSystemConfig, kebabComponent, kindOf, kindsOf, layerCompositeProps, layerRef, layerStyles, leafAddresses, leafVerb, leavesOfStylePropValue, lighten, linearGradient, matchEntities, matchTokens, memberFromLeaf, memberLeaves, memberOf, memberRef, memberVariantOptions, memoryConfigSource, misdeclaredOverlays, mix, modeAxes, modifierAxes, modifierAxis, modifierCategory, modifierGroupFields, modifierInvariants, modifierLeaf, modifierUtilitiesUsed, motionClassName, namedFields, namedSlotTargets, nativeTokenValue, negatedCssValue, normalizeName, opOf, opVerb, opacityPercentage, opsForKind, orRef, overlayVerb, overrideCondition, overrideKey, overrideKeyModifiers, overrideModifiers, ownValues, ownerOf, ownsItsValues, packageKey, packageName, partsOf, pathDelta, pathOf, pathSegments, planBreak, planCopy, planLink, planUnlink, previewDefaults, previewMatrix, previewSpec, propOwner, propValueDomain, propValueFromAxis, redundantQualifiers, ref, refGraphOf, refLeaf, refSchema, registerSchemaMigrations, renderDerivedColor, renderGradient, renderSignature, renderStyleValue, renderedElement, renderedTarget, resolutionSchema, resolveComponentProps, resolveFieldValue, resolveIconLibrary, resolveInputDir, resolveOutDir, resolveRegistryDir, resolveTokenValue, resolveTokenValueUnder, resolveValueType, resolveVisibility, resolvedSource, rewriteRefNamespace, rewriteRefSource, rewriteRefs, rnStyleKey, rootLayerOf, routedBag, routedProp, routedPropIn, routesContent, ruleApplies, ruleCondition, runChangeHooks, schemaVersionOf, searchEntities, searchTokens, setAtPath, signatureOf, slotTargetsOf, sniffValueType, sourceEntries, sourceOf, sourceOfGroup, sourceOfItem, sourceRowStates, sourceSlugFor, sourceUnavailable, sourceUnreachable, sourceVarPrefix, specWithResolvedVisibility, splitRef, splitStyleProps, stamp, styleAliasesOf, styleDeclarations, stylePropClassBase, stylePropClassName, stylePropClasses, stylePropEntries, stylePropLeafForToken, stylePropNegates, stylePropTokenGroup, stylePropTokenPath, stylePropTokenValues, stylePropValueFormOf, stylePropValueFromLeaf, stylePropValueLeaves, stylePropValueSchema, stylePropValues, stylePropertiesWriting, stylePropertyAccepts, stylePropertyFor, stylePropertyPathFor, styleRuleMotionClasses, suggestLinkSlug, summarizeChanges, surfaceProp, surfaceProps, toCssPropertyName, tokenBinding, touchedFields, unadoptedDirectives, unknownStyleLeaves, unreadableBorrows, unstatableConditions, updateRefIndex, upgradeDraftEntries, upgradePatch, upgradeSerializedConfig, validateComponentProps, validateSpec, valueAt, valueLeavesOf, valueRef, valueSchemaOf, varPrefixOf, views, visibilityStateProps, visibilityTerms, withoutTruthyTerm };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export type RawDeclared = string | {
|
|
2
|
+
[key: string]: RawDeclared;
|
|
3
|
+
};
|
|
4
|
+
export interface RawRule {
|
|
5
|
+
readonly selector: string;
|
|
6
|
+
readonly declarations: Record<string, RawDeclared>;
|
|
7
|
+
}
|
|
8
|
+
export declare function parseRawCss(css: string): {
|
|
9
|
+
rules: RawRule[];
|
|
10
|
+
unparsed: string[];
|
|
11
|
+
};
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import generate from "css-tree/generator";
|
|
2
|
+
import parse from "css-tree/parser";
|
|
3
|
+
import { tokenTypes, tokenize } from "css-tree/tokenizer";
|
|
4
|
+
//#region src/migrations/2.0.0/raw-css.ts
|
|
5
|
+
function parseRawCss(css) {
|
|
6
|
+
const rules = [];
|
|
7
|
+
const unparsed = [];
|
|
8
|
+
const textOf = (node) => {
|
|
9
|
+
const text = node.loc ? css.slice(node.loc.start.offset, node.loc.end.offset) : generate(node);
|
|
10
|
+
const tokens = [];
|
|
11
|
+
tokenize(text, (type, start, end) => {
|
|
12
|
+
tokens.push(type === tokenTypes.WhiteSpace ? " " : text.slice(start, end));
|
|
13
|
+
});
|
|
14
|
+
return tokens.join("").trim();
|
|
15
|
+
};
|
|
16
|
+
function readRule(node) {
|
|
17
|
+
if (node.type === "Rule") return {
|
|
18
|
+
selector: textOf(node.prelude),
|
|
19
|
+
declarations: readBlock(node.block)
|
|
20
|
+
};
|
|
21
|
+
if (node.type === "Atrule" && node.block) {
|
|
22
|
+
const prelude = node.prelude ? ` ${textOf(node.prelude)}` : "";
|
|
23
|
+
return {
|
|
24
|
+
selector: `@${node.name}${prelude}`,
|
|
25
|
+
declarations: readBlock(node.block)
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
throw new Error("CSS statement has no rule representation");
|
|
29
|
+
}
|
|
30
|
+
function readBlock(block) {
|
|
31
|
+
const entries = /* @__PURE__ */ new Map();
|
|
32
|
+
for (const node of block.children) {
|
|
33
|
+
if (node.type === "Comment") continue;
|
|
34
|
+
let key;
|
|
35
|
+
let value;
|
|
36
|
+
if (node.type === "Declaration") {
|
|
37
|
+
key = node.property.startsWith("--") ? node.property : node.property.toLowerCase();
|
|
38
|
+
value = `${textOf(node.value)}${node.important ? " !important" : ""}`;
|
|
39
|
+
} else {
|
|
40
|
+
const rule = readRule(node);
|
|
41
|
+
key = rule.selector;
|
|
42
|
+
value = rule.declarations;
|
|
43
|
+
}
|
|
44
|
+
if (entries.has(key)) throw new Error(`Repeated CSS entry: ${key}`);
|
|
45
|
+
entries.set(key, value);
|
|
46
|
+
}
|
|
47
|
+
return Object.fromEntries(entries);
|
|
48
|
+
}
|
|
49
|
+
try {
|
|
50
|
+
const stylesheet = parse(css, { positions: true });
|
|
51
|
+
if (stylesheet.type !== "StyleSheet") throw new Error("Expected a stylesheet");
|
|
52
|
+
for (const node of stylesheet.children) {
|
|
53
|
+
if (node.type === "Comment") continue;
|
|
54
|
+
try {
|
|
55
|
+
rules.push(readRule(node));
|
|
56
|
+
} catch {
|
|
57
|
+
unparsed.push(textOf(node).replace(/;$/, ""));
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
} catch {
|
|
61
|
+
return {
|
|
62
|
+
rules: [],
|
|
63
|
+
unparsed: [css]
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
return {
|
|
67
|
+
rules,
|
|
68
|
+
unparsed
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
//#endregion
|
|
72
|
+
export { parseRawCss };
|