mythik 0.0.1 → 0.1.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/LICENSE +201 -0
- package/NOTICE +4 -0
- package/README.md +97 -2
- package/dist/actions/dispatcher.d.ts +46 -0
- package/dist/actions/dispatcher.d.ts.map +1 -0
- package/dist/actions/dispatcher.js +366 -0
- package/dist/actions/dispatcher.js.map +1 -0
- package/dist/actions/middleware.d.ts +27 -0
- package/dist/actions/middleware.d.ts.map +1 -0
- package/dist/actions/middleware.js +37 -0
- package/dist/actions/middleware.js.map +1 -0
- package/dist/actions/transaction-engine.d.ts +13 -0
- package/dist/actions/transaction-engine.d.ts.map +1 -0
- package/dist/actions/transaction-engine.js +96 -0
- package/dist/actions/transaction-engine.js.map +1 -0
- package/dist/app/app-engine.d.ts +106 -0
- package/dist/app/app-engine.d.ts.map +1 -0
- package/dist/app/app-engine.js +413 -0
- package/dist/app/app-engine.js.map +1 -0
- package/dist/auth/cross-tab.d.ts +24 -0
- package/dist/auth/cross-tab.d.ts.map +1 -0
- package/dist/auth/cross-tab.js +117 -0
- package/dist/auth/cross-tab.js.map +1 -0
- package/dist/auth/engine.d.ts +16 -0
- package/dist/auth/engine.d.ts.map +1 -0
- package/dist/auth/engine.js +225 -0
- package/dist/auth/engine.js.map +1 -0
- package/dist/auth/persistence.d.ts +21 -0
- package/dist/auth/persistence.d.ts.map +1 -0
- package/dist/auth/persistence.js +97 -0
- package/dist/auth/persistence.js.map +1 -0
- package/dist/auth/providers/custom-jwt.d.ts +41 -0
- package/dist/auth/providers/custom-jwt.d.ts.map +1 -0
- package/dist/auth/providers/custom-jwt.js +165 -0
- package/dist/auth/providers/custom-jwt.js.map +1 -0
- package/dist/auth/providers/mock.d.ts +7 -0
- package/dist/auth/providers/mock.d.ts.map +1 -0
- package/dist/auth/providers/mock.js +52 -0
- package/dist/auth/providers/mock.js.map +1 -0
- package/dist/auth/providers/supabase.d.ts +90 -0
- package/dist/auth/providers/supabase.d.ts.map +1 -0
- package/dist/auth/providers/supabase.js +102 -0
- package/dist/auth/providers/supabase.js.map +1 -0
- package/dist/auth/rate-limiter.d.ts +29 -0
- package/dist/auth/rate-limiter.d.ts.map +1 -0
- package/dist/auth/rate-limiter.js +67 -0
- package/dist/auth/rate-limiter.js.map +1 -0
- package/dist/auth/refresh-engine.d.ts +25 -0
- package/dist/auth/refresh-engine.d.ts.map +1 -0
- package/dist/auth/refresh-engine.js +59 -0
- package/dist/auth/refresh-engine.js.map +1 -0
- package/dist/auth/types.d.ts +89 -0
- package/dist/auth/types.d.ts.map +1 -0
- package/dist/auth/types.js +2 -0
- package/dist/auth/types.js.map +1 -0
- package/dist/contract/endpoint-map.d.ts +20 -0
- package/dist/contract/endpoint-map.d.ts.map +1 -0
- package/dist/contract/endpoint-map.js +57 -0
- package/dist/contract/endpoint-map.js.map +1 -0
- package/dist/contract/engine.d.ts +12 -0
- package/dist/contract/engine.d.ts.map +1 -0
- package/dist/contract/engine.js +80 -0
- package/dist/contract/engine.js.map +1 -0
- package/dist/contract/extractor.d.ts +7 -0
- package/dist/contract/extractor.d.ts.map +1 -0
- package/dist/contract/extractor.js +133 -0
- package/dist/contract/extractor.js.map +1 -0
- package/dist/contract/index.d.ts +4 -0
- package/dist/contract/index.d.ts.map +1 -0
- package/dist/contract/index.js +2 -0
- package/dist/contract/index.js.map +1 -0
- package/dist/contract/matcher.d.ts +13 -0
- package/dist/contract/matcher.d.ts.map +1 -0
- package/dist/contract/matcher.js +57 -0
- package/dist/contract/matcher.js.map +1 -0
- package/dist/contract/rules/endpoints-exist.d.ts +3 -0
- package/dist/contract/rules/endpoints-exist.d.ts.map +1 -0
- package/dist/contract/rules/endpoints-exist.js +29 -0
- package/dist/contract/rules/endpoints-exist.js.map +1 -0
- package/dist/contract/rules/fields-valid.d.ts +3 -0
- package/dist/contract/rules/fields-valid.d.ts.map +1 -0
- package/dist/contract/rules/fields-valid.js +39 -0
- package/dist/contract/rules/fields-valid.js.map +1 -0
- package/dist/contract/rules/params-match.d.ts +3 -0
- package/dist/contract/rules/params-match.d.ts.map +1 -0
- package/dist/contract/rules/params-match.js +40 -0
- package/dist/contract/rules/params-match.js.map +1 -0
- package/dist/contract/rules/permissions-consistent.d.ts +3 -0
- package/dist/contract/rules/permissions-consistent.d.ts.map +1 -0
- package/dist/contract/rules/permissions-consistent.js +52 -0
- package/dist/contract/rules/permissions-consistent.js.map +1 -0
- package/dist/contract/types.d.ts +66 -0
- package/dist/contract/types.d.ts.map +1 -0
- package/dist/contract/types.js +2 -0
- package/dist/contract/types.js.map +1 -0
- package/dist/data/data-sources.d.ts +26 -0
- package/dist/data/data-sources.d.ts.map +1 -0
- package/dist/data/data-sources.js +218 -0
- package/dist/data/data-sources.js.map +1 -0
- package/dist/data/fetch.d.ts +29 -0
- package/dist/data/fetch.d.ts.map +1 -0
- package/dist/data/fetch.js +63 -0
- package/dist/data/fetch.js.map +1 -0
- package/dist/data/offline.d.ts +29 -0
- package/dist/data/offline.d.ts.map +1 -0
- package/dist/data/offline.js +48 -0
- package/dist/data/offline.js.map +1 -0
- package/dist/data/realtime.d.ts +21 -0
- package/dist/data/realtime.d.ts.map +1 -0
- package/dist/data/realtime.js +40 -0
- package/dist/data/realtime.js.map +1 -0
- package/dist/derive/evaluator.d.ts +19 -0
- package/dist/derive/evaluator.d.ts.map +1 -0
- package/dist/derive/evaluator.js +59 -0
- package/dist/derive/evaluator.js.map +1 -0
- package/dist/derive/topo-sort.d.ts +10 -0
- package/dist/derive/topo-sort.d.ts.map +1 -0
- package/dist/derive/topo-sort.js +36 -0
- package/dist/derive/topo-sort.js.map +1 -0
- package/dist/design/animation/cascade-types.d.ts +23 -0
- package/dist/design/animation/cascade-types.d.ts.map +1 -0
- package/dist/design/animation/cascade-types.js +2 -0
- package/dist/design/animation/cascade-types.js.map +1 -0
- package/dist/design/animation/cascade.d.ts +4 -0
- package/dist/design/animation/cascade.d.ts.map +1 -0
- package/dist/design/animation/cascade.js +73 -0
- package/dist/design/animation/cascade.js.map +1 -0
- package/dist/design/animation/css-keyframes.d.ts +8 -0
- package/dist/design/animation/css-keyframes.d.ts.map +1 -0
- package/dist/design/animation/css-keyframes.js +72 -0
- package/dist/design/animation/css-keyframes.js.map +1 -0
- package/dist/design/animation/index.d.ts +14 -0
- package/dist/design/animation/index.d.ts.map +1 -0
- package/dist/design/animation/index.js +9 -0
- package/dist/design/animation/index.js.map +1 -0
- package/dist/design/animation/keyframes-builder.d.ts +40 -0
- package/dist/design/animation/keyframes-builder.d.ts.map +1 -0
- package/dist/design/animation/keyframes-builder.js +140 -0
- package/dist/design/animation/keyframes-builder.js.map +1 -0
- package/dist/design/animation/reanimated-spec.d.ts +16 -0
- package/dist/design/animation/reanimated-spec.d.ts.map +1 -0
- package/dist/design/animation/reanimated-spec.js +162 -0
- package/dist/design/animation/reanimated-spec.js.map +1 -0
- package/dist/design/animation/reduced-motion.d.ts +3 -0
- package/dist/design/animation/reduced-motion.d.ts.map +1 -0
- package/dist/design/animation/reduced-motion.js +54 -0
- package/dist/design/animation/reduced-motion.js.map +1 -0
- package/dist/design/animation/resolver.d.ts +3 -0
- package/dist/design/animation/resolver.d.ts.map +1 -0
- package/dist/design/animation/resolver.js +86 -0
- package/dist/design/animation/resolver.js.map +1 -0
- package/dist/design/animation/types.d.ts +109 -0
- package/dist/design/animation/types.d.ts.map +1 -0
- package/dist/design/animation/types.js +7 -0
- package/dist/design/animation/types.js.map +1 -0
- package/dist/design/animation/validator.d.ts +44 -0
- package/dist/design/animation/validator.d.ts.map +1 -0
- package/dist/design/animation/validator.js +169 -0
- package/dist/design/animation/validator.js.map +1 -0
- package/dist/design/background/blobs/catalog.d.ts +10 -0
- package/dist/design/background/blobs/catalog.d.ts.map +1 -0
- package/dist/design/background/blobs/catalog.js +63 -0
- package/dist/design/background/blobs/catalog.js.map +1 -0
- package/dist/design/background/blobs/index.d.ts +4 -0
- package/dist/design/background/blobs/index.d.ts.map +1 -0
- package/dist/design/background/blobs/index.js +5 -0
- package/dist/design/background/blobs/index.js.map +1 -0
- package/dist/design/background/blobs/resolver.d.ts +16 -0
- package/dist/design/background/blobs/resolver.d.ts.map +1 -0
- package/dist/design/background/blobs/resolver.js +301 -0
- package/dist/design/background/blobs/resolver.js.map +1 -0
- package/dist/design/background/blobs/types.d.ts +112 -0
- package/dist/design/background/blobs/types.d.ts.map +1 -0
- package/dist/design/background/blobs/types.js +27 -0
- package/dist/design/background/blobs/types.js.map +1 -0
- package/dist/design/background/grain.d.ts +3 -0
- package/dist/design/background/grain.d.ts.map +1 -0
- package/dist/design/background/grain.js +23 -0
- package/dist/design/background/grain.js.map +1 -0
- package/dist/design/background/index.d.ts +8 -0
- package/dist/design/background/index.d.ts.map +1 -0
- package/dist/design/background/index.js +8 -0
- package/dist/design/background/index.js.map +1 -0
- package/dist/design/background/layers.d.ts +3 -0
- package/dist/design/background/layers.d.ts.map +1 -0
- package/dist/design/background/layers.js +23 -0
- package/dist/design/background/layers.js.map +1 -0
- package/dist/design/background/patterns/chevron.d.ts +8 -0
- package/dist/design/background/patterns/chevron.d.ts.map +1 -0
- package/dist/design/background/patterns/chevron.js +10 -0
- package/dist/design/background/patterns/chevron.js.map +1 -0
- package/dist/design/background/patterns/crosshatch.d.ts +8 -0
- package/dist/design/background/patterns/crosshatch.d.ts.map +1 -0
- package/dist/design/background/patterns/crosshatch.js +12 -0
- package/dist/design/background/patterns/crosshatch.js.map +1 -0
- package/dist/design/background/patterns/diagonal.d.ts +8 -0
- package/dist/design/background/patterns/diagonal.d.ts.map +1 -0
- package/dist/design/background/patterns/diagonal.js +7 -0
- package/dist/design/background/patterns/diagonal.js.map +1 -0
- package/dist/design/background/patterns/dots.d.ts +7 -0
- package/dist/design/background/patterns/dots.d.ts.map +1 -0
- package/dist/design/background/patterns/dots.js +9 -0
- package/dist/design/background/patterns/dots.js.map +1 -0
- package/dist/design/background/patterns/grid.d.ts +7 -0
- package/dist/design/background/patterns/grid.d.ts.map +1 -0
- package/dist/design/background/patterns/grid.js +8 -0
- package/dist/design/background/patterns/grid.js.map +1 -0
- package/dist/design/background/patterns/index.d.ts +8 -0
- package/dist/design/background/patterns/index.d.ts.map +1 -0
- package/dist/design/background/patterns/index.js +8 -0
- package/dist/design/background/patterns/index.js.map +1 -0
- package/dist/design/background/patterns/iso.d.ts +7 -0
- package/dist/design/background/patterns/iso.d.ts.map +1 -0
- package/dist/design/background/patterns/iso.js +11 -0
- package/dist/design/background/patterns/iso.js.map +1 -0
- package/dist/design/background/patterns/resolver.d.ts +3 -0
- package/dist/design/background/patterns/resolver.d.ts.map +1 -0
- package/dist/design/background/patterns/resolver.js +56 -0
- package/dist/design/background/patterns/resolver.js.map +1 -0
- package/dist/design/background/primitives/gradient.d.ts +3 -0
- package/dist/design/background/primitives/gradient.d.ts.map +1 -0
- package/dist/design/background/primitives/gradient.js +68 -0
- package/dist/design/background/primitives/gradient.js.map +1 -0
- package/dist/design/background/primitives/image.d.ts +3 -0
- package/dist/design/background/primitives/image.d.ts.map +1 -0
- package/dist/design/background/primitives/image.js +12 -0
- package/dist/design/background/primitives/image.js.map +1 -0
- package/dist/design/background/primitives/index.d.ts +4 -0
- package/dist/design/background/primitives/index.d.ts.map +1 -0
- package/dist/design/background/primitives/index.js +4 -0
- package/dist/design/background/primitives/index.js.map +1 -0
- package/dist/design/background/primitives/solid.d.ts +8 -0
- package/dist/design/background/primitives/solid.d.ts.map +1 -0
- package/dist/design/background/primitives/solid.js +15 -0
- package/dist/design/background/primitives/solid.js.map +1 -0
- package/dist/design/background/resolver.d.ts +3 -0
- package/dist/design/background/resolver.d.ts.map +1 -0
- package/dist/design/background/resolver.js +20 -0
- package/dist/design/background/resolver.js.map +1 -0
- package/dist/design/background/sanitizer.d.ts +2 -0
- package/dist/design/background/sanitizer.d.ts.map +1 -0
- package/dist/design/background/sanitizer.js +54 -0
- package/dist/design/background/sanitizer.js.map +1 -0
- package/dist/design/deep-tokens.d.ts +125 -0
- package/dist/design/deep-tokens.d.ts.map +1 -0
- package/dist/design/deep-tokens.js +115 -0
- package/dist/design/deep-tokens.js.map +1 -0
- package/dist/design/dna.d.ts +7 -0
- package/dist/design/dna.d.ts.map +1 -0
- package/dist/design/dna.js +210 -0
- package/dist/design/dna.js.map +1 -0
- package/dist/design/identity/color.d.ts +8 -0
- package/dist/design/identity/color.d.ts.map +1 -0
- package/dist/design/identity/color.js +64 -0
- package/dist/design/identity/color.js.map +1 -0
- package/dist/design/identity/elevation.d.ts +8 -0
- package/dist/design/identity/elevation.d.ts.map +1 -0
- package/dist/design/identity/elevation.js +31 -0
- package/dist/design/identity/elevation.js.map +1 -0
- package/dist/design/identity/index.d.ts +12 -0
- package/dist/design/identity/index.d.ts.map +1 -0
- package/dist/design/identity/index.js +14 -0
- package/dist/design/identity/index.js.map +1 -0
- package/dist/design/identity/shape.d.ts +4 -0
- package/dist/design/identity/shape.d.ts.map +1 -0
- package/dist/design/identity/shape.js +23 -0
- package/dist/design/identity/shape.js.map +1 -0
- package/dist/design/identity/surface.d.ts +18 -0
- package/dist/design/identity/surface.d.ts.map +1 -0
- package/dist/design/identity/surface.js +125 -0
- package/dist/design/identity/surface.js.map +1 -0
- package/dist/design/identity/types.d.ts +280 -0
- package/dist/design/identity/types.d.ts.map +1 -0
- package/dist/design/identity/types.js +21 -0
- package/dist/design/identity/types.js.map +1 -0
- package/dist/design/identity/typography.d.ts +7 -0
- package/dist/design/identity/typography.d.ts.map +1 -0
- package/dist/design/identity/typography.js +42 -0
- package/dist/design/identity/typography.js.map +1 -0
- package/dist/design/identity-resolver.d.ts +15 -0
- package/dist/design/identity-resolver.d.ts.map +1 -0
- package/dist/design/identity-resolver.js +52 -0
- package/dist/design/identity-resolver.js.map +1 -0
- package/dist/design/oklch.d.ts +10 -0
- package/dist/design/oklch.d.ts.map +1 -0
- package/dist/design/oklch.js +61 -0
- package/dist/design/oklch.js.map +1 -0
- package/dist/design/palette.d.ts +26 -0
- package/dist/design/palette.d.ts.map +1 -0
- package/dist/design/palette.js +73 -0
- package/dist/design/palette.js.map +1 -0
- package/dist/design/presets.d.ts +18 -0
- package/dist/design/presets.d.ts.map +1 -0
- package/dist/design/presets.js +2 -0
- package/dist/design/presets.js.map +1 -0
- package/dist/design/recipes/animations.d.ts +11 -0
- package/dist/design/recipes/animations.d.ts.map +1 -0
- package/dist/design/recipes/animations.js +180 -0
- package/dist/design/recipes/animations.js.map +1 -0
- package/dist/design/recipes/backgrounds.d.ts +3 -0
- package/dist/design/recipes/backgrounds.d.ts.map +1 -0
- package/dist/design/recipes/backgrounds.js +152 -0
- package/dist/design/recipes/backgrounds.js.map +1 -0
- package/dist/design/recipes/index.d.ts +2 -0
- package/dist/design/recipes/index.d.ts.map +1 -0
- package/dist/design/recipes/index.js +2 -0
- package/dist/design/recipes/index.js.map +1 -0
- package/dist/design/surface-to-css.d.ts +57 -0
- package/dist/design/surface-to-css.d.ts.map +1 -0
- package/dist/design/surface-to-css.js +130 -0
- package/dist/design/surface-to-css.js.map +1 -0
- package/dist/design/surface-to-rn.d.ts +57 -0
- package/dist/design/surface-to-rn.d.ts.map +1 -0
- package/dist/design/surface-to-rn.js +133 -0
- package/dist/design/surface-to-rn.js.map +1 -0
- package/dist/design/tokens.d.ts +67 -0
- package/dist/design/tokens.d.ts.map +1 -0
- package/dist/design/tokens.js +36 -0
- package/dist/design/tokens.js.map +1 -0
- package/dist/device/context.d.ts +13 -0
- package/dist/device/context.d.ts.map +1 -0
- package/dist/device/context.js +2 -0
- package/dist/device/context.js.map +1 -0
- package/dist/editor-session/clone.d.ts +4 -0
- package/dist/editor-session/clone.d.ts.map +1 -0
- package/dist/editor-session/clone.js +55 -0
- package/dist/editor-session/clone.js.map +1 -0
- package/dist/editor-session/engine.d.ts +21 -0
- package/dist/editor-session/engine.d.ts.map +1 -0
- package/dist/editor-session/engine.js +375 -0
- package/dist/editor-session/engine.js.map +1 -0
- package/dist/editor-session/persistence.d.ts +8 -0
- package/dist/editor-session/persistence.d.ts.map +1 -0
- package/dist/editor-session/persistence.js +89 -0
- package/dist/editor-session/persistence.js.map +1 -0
- package/dist/editor-session/types.d.ts +90 -0
- package/dist/editor-session/types.d.ts.map +1 -0
- package/dist/editor-session/types.js +2 -0
- package/dist/editor-session/types.js.map +1 -0
- package/dist/editor-session/validators.d.ts +5 -0
- package/dist/editor-session/validators.d.ts.map +1 -0
- package/dist/editor-session/validators.js +106 -0
- package/dist/editor-session/validators.js.map +1 -0
- package/dist/elements/composer.d.ts +109 -0
- package/dist/elements/composer.d.ts.map +1 -0
- package/dist/elements/composer.js +129 -0
- package/dist/elements/composer.js.map +1 -0
- package/dist/export/csv.d.ts +3 -0
- package/dist/export/csv.d.ts.map +1 -0
- package/dist/export/csv.js +16 -0
- package/dist/export/csv.js.map +1 -0
- package/dist/export/download.d.ts +2 -0
- package/dist/export/download.d.ts.map +1 -0
- package/dist/export/download.js +13 -0
- package/dist/export/download.js.map +1 -0
- package/dist/export/format.d.ts +3 -0
- package/dist/export/format.d.ts.map +1 -0
- package/dist/export/format.js +43 -0
- package/dist/export/format.js.map +1 -0
- package/dist/export/types.d.ts +22 -0
- package/dist/export/types.d.ts.map +1 -0
- package/dist/export/types.js +2 -0
- package/dist/export/types.js.map +1 -0
- package/dist/expressions/deep-resolve.d.ts +4 -0
- package/dist/expressions/deep-resolve.d.ts.map +1 -0
- package/dist/expressions/deep-resolve.js +20 -0
- package/dist/expressions/deep-resolve.js.map +1 -0
- package/dist/expressions/handlers/array.d.ts +19 -0
- package/dist/expressions/handlers/array.d.ts.map +1 -0
- package/dist/expressions/handlers/array.js +161 -0
- package/dist/expressions/handlers/array.js.map +1 -0
- package/dist/expressions/handlers/auth.d.ts +13 -0
- package/dist/expressions/handlers/auth.d.ts.map +1 -0
- package/dist/expressions/handlers/auth.js +90 -0
- package/dist/expressions/handlers/auth.js.map +1 -0
- package/dist/expressions/handlers/bind.d.ts +22 -0
- package/dist/expressions/handlers/bind.d.ts.map +1 -0
- package/dist/expressions/handlers/bind.js +57 -0
- package/dist/expressions/handlers/bind.js.map +1 -0
- package/dist/expressions/handlers/breakpoint.d.ts +10 -0
- package/dist/expressions/handlers/breakpoint.d.ts.map +1 -0
- package/dist/expressions/handlers/breakpoint.js +39 -0
- package/dist/expressions/handlers/breakpoint.js.map +1 -0
- package/dist/expressions/handlers/computed.d.ts +3 -0
- package/dist/expressions/handlers/computed.d.ts.map +1 -0
- package/dist/expressions/handlers/computed.js +20 -0
- package/dist/expressions/handlers/computed.js.map +1 -0
- package/dist/expressions/handlers/cond.d.ts +3 -0
- package/dist/expressions/handlers/cond.d.ts.map +1 -0
- package/dist/expressions/handlers/cond.js +57 -0
- package/dist/expressions/handlers/cond.js.map +1 -0
- package/dist/expressions/handlers/date.d.ts +14 -0
- package/dist/expressions/handlers/date.d.ts.map +1 -0
- package/dist/expressions/handlers/date.js +95 -0
- package/dist/expressions/handlers/date.js.map +1 -0
- package/dist/expressions/handlers/format.d.ts +19 -0
- package/dist/expressions/handlers/format.d.ts.map +1 -0
- package/dist/expressions/handlers/format.js +93 -0
- package/dist/expressions/handlers/format.js.map +1 -0
- package/dist/expressions/handlers/group.d.ts +25 -0
- package/dist/expressions/handlers/group.d.ts.map +1 -0
- package/dist/expressions/handlers/group.js +85 -0
- package/dist/expressions/handlers/group.js.map +1 -0
- package/dist/expressions/handlers/i18n.d.ts +8 -0
- package/dist/expressions/handlers/i18n.d.ts.map +1 -0
- package/dist/expressions/handlers/i18n.js +35 -0
- package/dist/expressions/handlers/i18n.js.map +1 -0
- package/dist/expressions/handlers/index.d.ts +4 -0
- package/dist/expressions/handlers/index.d.ts.map +1 -0
- package/dist/expressions/handlers/index.js +52 -0
- package/dist/expressions/handlers/index.js.map +1 -0
- package/dist/expressions/handlers/let.d.ts +4 -0
- package/dist/expressions/handlers/let.d.ts.map +1 -0
- package/dist/expressions/handlers/let.js +36 -0
- package/dist/expressions/handlers/let.js.map +1 -0
- package/dist/expressions/handlers/logic.d.ts +27 -0
- package/dist/expressions/handlers/logic.d.ts.map +1 -0
- package/dist/expressions/handlers/logic.js +52 -0
- package/dist/expressions/handlers/logic.js.map +1 -0
- package/dist/expressions/handlers/math.d.ts +13 -0
- package/dist/expressions/handlers/math.d.ts.map +1 -0
- package/dist/expressions/handlers/math.js +58 -0
- package/dist/expressions/handlers/math.js.map +1 -0
- package/dist/expressions/handlers/platform.d.ts +13 -0
- package/dist/expressions/handlers/platform.d.ts.map +1 -0
- package/dist/expressions/handlers/platform.js +37 -0
- package/dist/expressions/handlers/platform.js.map +1 -0
- package/dist/expressions/handlers/prop.d.ts +10 -0
- package/dist/expressions/handlers/prop.d.ts.map +1 -0
- package/dist/expressions/handlers/prop.js +18 -0
- package/dist/expressions/handlers/prop.js.map +1 -0
- package/dist/expressions/handlers/selection.d.ts +10 -0
- package/dist/expressions/handlers/selection.d.ts.map +1 -0
- package/dist/expressions/handlers/selection.js +33 -0
- package/dist/expressions/handlers/selection.js.map +1 -0
- package/dist/expressions/handlers/state.d.ts +3 -0
- package/dist/expressions/handlers/state.d.ts.map +1 -0
- package/dist/expressions/handlers/state.js +8 -0
- package/dist/expressions/handlers/state.js.map +1 -0
- package/dist/expressions/handlers/switch.d.ts +15 -0
- package/dist/expressions/handlers/switch.d.ts.map +1 -0
- package/dist/expressions/handlers/switch.js +31 -0
- package/dist/expressions/handlers/switch.js.map +1 -0
- package/dist/expressions/handlers/template.d.ts +3 -0
- package/dist/expressions/handlers/template.d.ts.map +1 -0
- package/dist/expressions/handlers/template.js +23 -0
- package/dist/expressions/handlers/template.js.map +1 -0
- package/dist/expressions/handlers/token.d.ts +3 -0
- package/dist/expressions/handlers/token.d.ts.map +1 -0
- package/dist/expressions/handlers/token.js +40 -0
- package/dist/expressions/handlers/token.js.map +1 -0
- package/dist/expressions/handlers/unique-id.d.ts +11 -0
- package/dist/expressions/handlers/unique-id.d.ts.map +1 -0
- package/dist/expressions/handlers/unique-id.js +52 -0
- package/dist/expressions/handlers/unique-id.js.map +1 -0
- package/dist/expressions/registry.d.ts +8 -0
- package/dist/expressions/registry.d.ts.map +1 -0
- package/dist/expressions/registry.js +35 -0
- package/dist/expressions/registry.js.map +1 -0
- package/dist/expressions/resolver.d.ts +15 -0
- package/dist/expressions/resolver.d.ts.map +1 -0
- package/dist/expressions/resolver.js +56 -0
- package/dist/expressions/resolver.js.map +1 -0
- package/dist/factory.d.ts +56 -0
- package/dist/factory.d.ts.map +1 -0
- package/dist/factory.js +265 -0
- package/dist/factory.js.map +1 -0
- package/dist/fetch/framework-fetch.d.ts +12 -0
- package/dist/fetch/framework-fetch.d.ts.map +1 -0
- package/dist/fetch/framework-fetch.js +36 -0
- package/dist/fetch/framework-fetch.js.map +1 -0
- package/dist/fetch/interceptors/auth.d.ts +19 -0
- package/dist/fetch/interceptors/auth.d.ts.map +1 -0
- package/dist/fetch/interceptors/auth.js +66 -0
- package/dist/fetch/interceptors/auth.js.map +1 -0
- package/dist/fetch/interceptors/logging.d.ts +8 -0
- package/dist/fetch/interceptors/logging.d.ts.map +1 -0
- package/dist/fetch/interceptors/logging.js +40 -0
- package/dist/fetch/interceptors/logging.js.map +1 -0
- package/dist/fetch/interceptors/retry.d.ts +20 -0
- package/dist/fetch/interceptors/retry.d.ts.map +1 -0
- package/dist/fetch/interceptors/retry.js +34 -0
- package/dist/fetch/interceptors/retry.js.map +1 -0
- package/dist/fetch/interceptors/timeout.d.ts +7 -0
- package/dist/fetch/interceptors/timeout.d.ts.map +1 -0
- package/dist/fetch/interceptors/timeout.js +20 -0
- package/dist/fetch/interceptors/timeout.js.map +1 -0
- package/dist/fetch/types.d.ts +30 -0
- package/dist/fetch/types.d.ts.map +1 -0
- package/dist/fetch/types.js +2 -0
- package/dist/fetch/types.js.map +1 -0
- package/dist/forms/engine.d.ts +3 -0
- package/dist/forms/engine.d.ts.map +1 -0
- package/dist/forms/engine.js +167 -0
- package/dist/forms/engine.js.map +1 -0
- package/dist/forms/types.d.ts +30 -0
- package/dist/forms/types.d.ts.map +1 -0
- package/dist/forms/types.js +2 -0
- package/dist/forms/types.js.map +1 -0
- package/dist/i18n/engine.d.ts +15 -0
- package/dist/i18n/engine.d.ts.map +1 -0
- package/dist/i18n/engine.js +61 -0
- package/dist/i18n/engine.js.map +1 -0
- package/dist/index.d.ts +161 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +106 -0
- package/dist/index.js.map +1 -0
- package/dist/interactions/data-operations.d.ts +51 -0
- package/dist/interactions/data-operations.d.ts.map +1 -0
- package/dist/interactions/data-operations.js +64 -0
- package/dist/interactions/data-operations.js.map +1 -0
- package/dist/interactions/drag-drop.d.ts +14 -0
- package/dist/interactions/drag-drop.d.ts.map +1 -0
- package/dist/interactions/drag-drop.js +35 -0
- package/dist/interactions/drag-drop.js.map +1 -0
- package/dist/interactions/export.d.ts +24 -0
- package/dist/interactions/export.d.ts.map +1 -0
- package/dist/interactions/export.js +44 -0
- package/dist/interactions/export.js.map +1 -0
- package/dist/interactions/history.d.ts +16 -0
- package/dist/interactions/history.d.ts.map +1 -0
- package/dist/interactions/history.js +52 -0
- package/dist/interactions/history.js.map +1 -0
- package/dist/motion/engine.d.ts +47 -0
- package/dist/motion/engine.d.ts.map +1 -0
- package/dist/motion/engine.js +81 -0
- package/dist/motion/engine.js.map +1 -0
- package/dist/navigation/router.d.ts +36 -0
- package/dist/navigation/router.d.ts.map +1 -0
- package/dist/navigation/router.js +51 -0
- package/dist/navigation/router.js.map +1 -0
- package/dist/permissions/evaluator.d.ts +15 -0
- package/dist/permissions/evaluator.d.ts.map +1 -0
- package/dist/permissions/evaluator.js +32 -0
- package/dist/permissions/evaluator.js.map +1 -0
- package/dist/plugins/loader.d.ts +30 -0
- package/dist/plugins/loader.d.ts.map +1 -0
- package/dist/plugins/loader.js +87 -0
- package/dist/plugins/loader.js.map +1 -0
- package/dist/reference/generator.d.ts +25 -0
- package/dist/reference/generator.d.ts.map +1 -0
- package/dist/reference/generator.js +808 -0
- package/dist/reference/generator.js.map +1 -0
- package/dist/renderer/deps.d.ts +24 -0
- package/dist/renderer/deps.d.ts.map +1 -0
- package/dist/renderer/deps.js +150 -0
- package/dist/renderer/deps.js.map +1 -0
- package/dist/renderer/engine.d.ts +15 -0
- package/dist/renderer/engine.d.ts.map +1 -0
- package/dist/renderer/engine.js +1097 -0
- package/dist/renderer/engine.js.map +1 -0
- package/dist/renderer/lazy-paths.d.ts +14 -0
- package/dist/renderer/lazy-paths.d.ts.map +1 -0
- package/dist/renderer/lazy-paths.js +63 -0
- package/dist/renderer/lazy-paths.js.map +1 -0
- package/dist/renderer/prop-schemas.d.ts +17 -0
- package/dist/renderer/prop-schemas.d.ts.map +1 -0
- package/dist/renderer/prop-schemas.js +81 -0
- package/dist/renderer/prop-schemas.js.map +1 -0
- package/dist/renderer/registry.d.ts +10 -0
- package/dist/renderer/registry.d.ts.map +1 -0
- package/dist/renderer/registry.js +22 -0
- package/dist/renderer/registry.js.map +1 -0
- package/dist/renderer/variants.d.ts +54 -0
- package/dist/renderer/variants.d.ts.map +1 -0
- package/dist/renderer/variants.js +105 -0
- package/dist/renderer/variants.js.map +1 -0
- package/dist/runtime/mount-spec-runtime.d.ts +59 -0
- package/dist/runtime/mount-spec-runtime.d.ts.map +1 -0
- package/dist/runtime/mount-spec-runtime.js +73 -0
- package/dist/runtime/mount-spec-runtime.js.map +1 -0
- package/dist/security/api-spec-validator.d.ts +13 -0
- package/dist/security/api-spec-validator.d.ts.map +1 -0
- package/dist/security/api-spec-validator.js +347 -0
- package/dist/security/api-spec-validator.js.map +1 -0
- package/dist/security/app-spec-validator.d.ts +4 -0
- package/dist/security/app-spec-validator.d.ts.map +1 -0
- package/dist/security/app-spec-validator.js +200 -0
- package/dist/security/app-spec-validator.js.map +1 -0
- package/dist/security/identifier-guard.d.ts +3 -0
- package/dist/security/identifier-guard.d.ts.map +1 -0
- package/dist/security/identifier-guard.js +15 -0
- package/dist/security/identifier-guard.js.map +1 -0
- package/dist/security/identity-token-validator.d.ts +3 -0
- package/dist/security/identity-token-validator.d.ts.map +1 -0
- package/dist/security/identity-token-validator.js +121 -0
- package/dist/security/identity-token-validator.js.map +1 -0
- package/dist/security/index.d.ts +14 -0
- package/dist/security/index.d.ts.map +1 -0
- package/dist/security/index.js +8 -0
- package/dist/security/index.js.map +1 -0
- package/dist/security/protection-registry.d.ts +24 -0
- package/dist/security/protection-registry.d.ts.map +1 -0
- package/dist/security/protection-registry.js +35 -0
- package/dist/security/protection-registry.js.map +1 -0
- package/dist/security/rate-limiter.d.ts +23 -0
- package/dist/security/rate-limiter.d.ts.map +1 -0
- package/dist/security/rate-limiter.js +44 -0
- package/dist/security/rate-limiter.js.map +1 -0
- package/dist/security/spec-signing.d.ts +23 -0
- package/dist/security/spec-signing.d.ts.map +1 -0
- package/dist/security/spec-signing.js +62 -0
- package/dist/security/spec-signing.js.map +1 -0
- package/dist/security/spec-validator.d.ts +60 -0
- package/dist/security/spec-validator.d.ts.map +1 -0
- package/dist/security/spec-validator.js +903 -0
- package/dist/security/spec-validator.js.map +1 -0
- package/dist/security/state-protection.d.ts +23 -0
- package/dist/security/state-protection.d.ts.map +1 -0
- package/dist/security/state-protection.js +49 -0
- package/dist/security/state-protection.js.map +1 -0
- package/dist/security/url-whitelist.d.ts +14 -0
- package/dist/security/url-whitelist.d.ts.map +1 -0
- package/dist/security/url-whitelist.js +37 -0
- package/dist/security/url-whitelist.js.map +1 -0
- package/dist/server.d.ts +6 -0
- package/dist/server.d.ts.map +1 -0
- package/dist/server.js +8 -0
- package/dist/server.js.map +1 -0
- package/dist/spec-engine/app-elements.d.ts +5 -0
- package/dist/spec-engine/app-elements.d.ts.map +1 -0
- package/dist/spec-engine/app-elements.js +36 -0
- package/dist/spec-engine/app-elements.js.map +1 -0
- package/dist/spec-engine/app-manifest.d.ts +3 -0
- package/dist/spec-engine/app-manifest.d.ts.map +1 -0
- package/dist/spec-engine/app-manifest.js +132 -0
- package/dist/spec-engine/app-manifest.js.map +1 -0
- package/dist/spec-engine/elements.d.ts +8 -0
- package/dist/spec-engine/elements.d.ts.map +1 -0
- package/dist/spec-engine/elements.js +18 -0
- package/dist/spec-engine/elements.js.map +1 -0
- package/dist/spec-engine/engine.d.ts +3 -0
- package/dist/spec-engine/engine.d.ts.map +1 -0
- package/dist/spec-engine/engine.js +76 -0
- package/dist/spec-engine/engine.js.map +1 -0
- package/dist/spec-engine/handlers/api-handler.d.ts +5 -0
- package/dist/spec-engine/handlers/api-handler.d.ts.map +1 -0
- package/dist/spec-engine/handlers/api-handler.js +111 -0
- package/dist/spec-engine/handlers/api-handler.js.map +1 -0
- package/dist/spec-engine/handlers/app-handler.d.ts +4 -0
- package/dist/spec-engine/handlers/app-handler.d.ts.map +1 -0
- package/dist/spec-engine/handlers/app-handler.js +41 -0
- package/dist/spec-engine/handlers/app-handler.js.map +1 -0
- package/dist/spec-engine/handlers/index.d.ts +8 -0
- package/dist/spec-engine/handlers/index.d.ts.map +1 -0
- package/dist/spec-engine/handlers/index.js +17 -0
- package/dist/spec-engine/handlers/index.js.map +1 -0
- package/dist/spec-engine/handlers/screen-handler.d.ts +4 -0
- package/dist/spec-engine/handlers/screen-handler.d.ts.map +1 -0
- package/dist/spec-engine/handlers/screen-handler.js +34 -0
- package/dist/spec-engine/handlers/screen-handler.js.map +1 -0
- package/dist/spec-engine/manifest.d.ts +11 -0
- package/dist/spec-engine/manifest.d.ts.map +1 -0
- package/dist/spec-engine/manifest.js +76 -0
- package/dist/spec-engine/manifest.js.map +1 -0
- package/dist/spec-engine/types.d.ts +61 -0
- package/dist/spec-engine/types.d.ts.map +1 -0
- package/dist/spec-engine/types.js +2 -0
- package/dist/spec-engine/types.js.map +1 -0
- package/dist/spec-stores/file.d.ts +12 -0
- package/dist/spec-stores/file.d.ts.map +1 -0
- package/dist/spec-stores/file.js +32 -0
- package/dist/spec-stores/file.js.map +1 -0
- package/dist/spec-stores/memory-versioned.d.ts +22 -0
- package/dist/spec-stores/memory-versioned.d.ts.map +1 -0
- package/dist/spec-stores/memory-versioned.js +125 -0
- package/dist/spec-stores/memory-versioned.js.map +1 -0
- package/dist/spec-stores/memory.d.ts +10 -0
- package/dist/spec-stores/memory.d.ts.map +1 -0
- package/dist/spec-stores/memory.js +31 -0
- package/dist/spec-stores/memory.js.map +1 -0
- package/dist/spec-stores/sqlserver-versioned.d.ts +44 -0
- package/dist/spec-stores/sqlserver-versioned.d.ts.map +1 -0
- package/dist/spec-stores/sqlserver-versioned.js +253 -0
- package/dist/spec-stores/sqlserver-versioned.js.map +1 -0
- package/dist/spec-stores/sqlserver.d.ts +27 -0
- package/dist/spec-stores/sqlserver.d.ts.map +1 -0
- package/dist/spec-stores/sqlserver.js +78 -0
- package/dist/spec-stores/sqlserver.js.map +1 -0
- package/dist/spec-stores/supabase-versioned.d.ts +38 -0
- package/dist/spec-stores/supabase-versioned.d.ts.map +1 -0
- package/dist/spec-stores/supabase-versioned.js +197 -0
- package/dist/spec-stores/supabase-versioned.js.map +1 -0
- package/dist/spec-stores/supabase.d.ts +18 -0
- package/dist/spec-stores/supabase.d.ts.map +1 -0
- package/dist/spec-stores/supabase.js +68 -0
- package/dist/spec-stores/supabase.js.map +1 -0
- package/dist/state/reserved-paths.d.ts +41 -0
- package/dist/state/reserved-paths.d.ts.map +1 -0
- package/dist/state/reserved-paths.js +40 -0
- package/dist/state/reserved-paths.js.map +1 -0
- package/dist/state/store.d.ts +18 -0
- package/dist/state/store.d.ts.map +1 -0
- package/dist/state/store.js +114 -0
- package/dist/state/store.js.map +1 -0
- package/dist/storage/supabase.d.ts +37 -0
- package/dist/storage/supabase.d.ts.map +1 -0
- package/dist/storage/supabase.js +22 -0
- package/dist/storage/supabase.js.map +1 -0
- package/dist/storage/types.d.ts +22 -0
- package/dist/storage/types.d.ts.map +1 -0
- package/dist/storage/types.js +2 -0
- package/dist/storage/types.js.map +1 -0
- package/dist/storage/upload-action.d.ts +22 -0
- package/dist/storage/upload-action.d.ts.map +1 -0
- package/dist/storage/upload-action.js +117 -0
- package/dist/storage/upload-action.js.map +1 -0
- package/dist/storage/url.d.ts +17 -0
- package/dist/storage/url.d.ts.map +1 -0
- package/dist/storage/url.js +48 -0
- package/dist/storage/url.js.map +1 -0
- package/dist/streaming/compiler.d.ts +26 -0
- package/dist/streaming/compiler.d.ts.map +1 -0
- package/dist/streaming/compiler.js +54 -0
- package/dist/streaming/compiler.js.map +1 -0
- package/dist/streaming/patch.d.ts +19 -0
- package/dist/streaming/patch.d.ts.map +1 -0
- package/dist/streaming/patch.js +139 -0
- package/dist/streaming/patch.js.map +1 -0
- package/dist/types.d.ts +443 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +8 -0
- package/dist/types.js.map +1 -0
- package/dist/util/to-array.d.ts +2 -0
- package/dist/util/to-array.d.ts.map +1 -0
- package/dist/util/to-array.js +14 -0
- package/dist/util/to-array.js.map +1 -0
- package/dist/utils/levenshtein.d.ts +3 -0
- package/dist/utils/levenshtein.d.ts.map +1 -0
- package/dist/utils/levenshtein.js +29 -0
- package/dist/utils/levenshtein.js.map +1 -0
- package/dist/validation/validators.d.ts +20 -0
- package/dist/validation/validators.d.ts.map +1 -0
- package/dist/validation/validators.js +138 -0
- package/dist/validation/validators.js.map +1 -0
- package/dist/versioning/compute-patches.d.ts +7 -0
- package/dist/versioning/compute-patches.d.ts.map +1 -0
- package/dist/versioning/compute-patches.js +62 -0
- package/dist/versioning/compute-patches.js.map +1 -0
- package/dist/versioning/index.d.ts +12 -0
- package/dist/versioning/index.d.ts.map +1 -0
- package/dist/versioning/index.js +7 -0
- package/dist/versioning/index.js.map +1 -0
- package/dist/versioning/promote-gate.d.ts +12 -0
- package/dist/versioning/promote-gate.d.ts.map +1 -0
- package/dist/versioning/promote-gate.js +166 -0
- package/dist/versioning/promote-gate.js.map +1 -0
- package/dist/versioning/rollback.d.ts +26 -0
- package/dist/versioning/rollback.d.ts.map +1 -0
- package/dist/versioning/rollback.js +67 -0
- package/dist/versioning/rollback.js.map +1 -0
- package/dist/versioning/structural-diff.d.ts +8 -0
- package/dist/versioning/structural-diff.d.ts.map +1 -0
- package/dist/versioning/structural-diff.js +287 -0
- package/dist/versioning/structural-diff.js.map +1 -0
- package/dist/versioning/types.d.ts +90 -0
- package/dist/versioning/types.d.ts.map +1 -0
- package/dist/versioning/types.js +2 -0
- package/dist/versioning/types.js.map +1 -0
- package/dist/visibility/evaluator.d.ts +12 -0
- package/dist/visibility/evaluator.d.ts.map +1 -0
- package/dist/visibility/evaluator.js +76 -0
- package/dist/visibility/evaluator.js.map +1 -0
- package/dist/watchers/engine.d.ts +19 -0
- package/dist/watchers/engine.d.ts.map +1 -0
- package/dist/watchers/engine.js +24 -0
- package/dist/watchers/engine.js.map +1 -0
- package/docs/consumer/README.md +44 -0
- package/docs/consumer/WHERE-TO-LOOK.md +94 -0
- package/docs/consumer/ai-context-api.md +195 -0
- package/docs/consumer/ai-context-custom-elements.md +249 -0
- package/docs/consumer/ai-context-patterns.md +254 -0
- package/docs/consumer/ai-context-primitives.md +839 -0
- package/docs/consumer/ai-context-runtime-semantics.md +1075 -0
- package/docs/consumer/ai-context.md +1374 -0
- package/docs/consumer/reference-doc.md +3201 -0
- package/docs/llms.txt +17 -0
- package/docs/wiki/compiled/README.md +33 -0
- package/docs/wiki/compiled/_gaps.md +52 -0
- package/docs/wiki/compiled/_index.md +354 -0
- package/docs/wiki/compiled/_inventory.md +2986 -0
- package/docs/wiki/compiled/_lint.md +66 -0
- package/docs/wiki/compiled/_unmapped.md +3 -0
- package/docs/wiki/compiled/action-apply-preset.md +63 -0
- package/docs/wiki/compiled/action-copy-clipboard.md +45 -0
- package/docs/wiki/compiled/action-drawer.md +50 -0
- package/docs/wiki/compiled/action-export.md +66 -0
- package/docs/wiki/compiled/action-fetch.md +87 -0
- package/docs/wiki/compiled/action-form-control.md +55 -0
- package/docs/wiki/compiled/action-login.md +71 -0
- package/docs/wiki/compiled/action-modal.md +61 -0
- package/docs/wiki/compiled/action-navigate.md +72 -0
- package/docs/wiki/compiled/action-open-url.md +38 -0
- package/docs/wiki/compiled/action-refresh-data-source.md +51 -0
- package/docs/wiki/compiled/action-selection.md +55 -0
- package/docs/wiki/compiled/action-set-locale.md +44 -0
- package/docs/wiki/compiled/action-set-state.md +61 -0
- package/docs/wiki/compiled/action-show-notification.md +65 -0
- package/docs/wiki/compiled/action-submit-form.md +69 -0
- package/docs/wiki/compiled/action-toggle-theme.md +50 -0
- package/docs/wiki/compiled/action-update-tokens.md +63 -0
- package/docs/wiki/compiled/action-upload-file.md +87 -0
- package/docs/wiki/compiled/antipattern-action-chain-no-stop.md +49 -0
- package/docs/wiki/compiled/antipattern-all-filter-wildcard.md +59 -0
- package/docs/wiki/compiled/antipattern-auth-domains-port.md +47 -0
- package/docs/wiki/compiled/antipattern-background-blobs-prop.md +62 -0
- package/docs/wiki/compiled/antipattern-background-css-token.md +53 -0
- package/docs/wiki/compiled/antipattern-checkbox-toggle-value.md +42 -0
- package/docs/wiki/compiled/antipattern-crud-id-collision.md +66 -0
- package/docs/wiki/compiled/antipattern-derive-server-pagination.md +58 -0
- package/docs/wiki/compiled/antipattern-element-variant-top-level.md +57 -0
- package/docs/wiki/compiled/antipattern-event-expression.md +55 -0
- package/docs/wiki/compiled/antipattern-input-type-name.md +43 -0
- package/docs/wiki/compiled/antipattern-mix-fetch-and-datasources.md +48 -0
- package/docs/wiki/compiled/antipattern-modal-drawer-visible.md +57 -0
- package/docs/wiki/compiled/antipattern-motion-entrance-token.md +53 -0
- package/docs/wiki/compiled/antipattern-overflow-hidden-with-shadow.md +50 -0
- package/docs/wiki/compiled/antipattern-required-if-equals.md +59 -0
- package/docs/wiki/compiled/antipattern-row-literal.md +70 -0
- package/docs/wiki/compiled/antipattern-row-template-capture.md +42 -0
- package/docs/wiki/compiled/antipattern-store-save-bypass.md +72 -0
- package/docs/wiki/compiled/antipattern-style-block-duplication.md +56 -0
- package/docs/wiki/compiled/antipattern-submit-form-in-tx-confirm.md +56 -0
- package/docs/wiki/compiled/cli-app-spec.md +53 -0
- package/docs/wiki/compiled/cli-config.md +46 -0
- package/docs/wiki/compiled/cli-contract.md +73 -0
- package/docs/wiki/compiled/cli-delete.md +37 -0
- package/docs/wiki/compiled/cli-docs.md +44 -0
- package/docs/wiki/compiled/cli-elements.md +39 -0
- package/docs/wiki/compiled/cli-existing-spec-edit-loop.md +24 -0
- package/docs/wiki/compiled/cli-history.md +38 -0
- package/docs/wiki/compiled/cli-lint.md +77 -0
- package/docs/wiki/compiled/cli-manifest.md +43 -0
- package/docs/wiki/compiled/cli-overview.md +77 -0
- package/docs/wiki/compiled/cli-patch.md +85 -0
- package/docs/wiki/compiled/cli-programmatic-api.md +73 -0
- package/docs/wiki/compiled/cli-pull.md +39 -0
- package/docs/wiki/compiled/cli-push.md +91 -0
- package/docs/wiki/compiled/cli-tokens.md +38 -0
- package/docs/wiki/compiled/cli-toon.md +44 -0
- package/docs/wiki/compiled/cli-validate.md +52 -0
- package/docs/wiki/compiled/cli-versioning-author.md +58 -0
- package/docs/wiki/compiled/concept-action-chains.md +65 -0
- package/docs/wiki/compiled/concept-action-middleware.md +55 -0
- package/docs/wiki/compiled/concept-animation-build-css.md +43 -0
- package/docs/wiki/compiled/concept-animation-build-rn.md +44 -0
- package/docs/wiki/compiled/concept-animation-caps.md +38 -0
- package/docs/wiki/compiled/concept-animation-cascade.md +89 -0
- package/docs/wiki/compiled/concept-animation-null-semantics.md +55 -0
- package/docs/wiki/compiled/concept-animation-recipes.md +67 -0
- package/docs/wiki/compiled/concept-animation-triggers.md +54 -0
- package/docs/wiki/compiled/concept-animations-engine.md +78 -0
- package/docs/wiki/compiled/concept-api-audit.md +67 -0
- package/docs/wiki/compiled/concept-api-auth.md +67 -0
- package/docs/wiki/compiled/concept-api-catalogs.md +44 -0
- package/docs/wiki/compiled/concept-api-crud-endpoint.md +90 -0
- package/docs/wiki/compiled/concept-api-endpoint-properties.md +40 -0
- package/docs/wiki/compiled/concept-api-endpoints-overview.md +57 -0
- package/docs/wiki/compiled/concept-api-handler-endpoint.md +56 -0
- package/docs/wiki/compiled/concept-api-login-body-contract.md +47 -0
- package/docs/wiki/compiled/concept-api-param-properties.md +44 -0
- package/docs/wiki/compiled/concept-api-public-endpoint.md +33 -0
- package/docs/wiki/compiled/concept-api-query-endpoint.md +53 -0
- package/docs/wiki/compiled/concept-api-scope-filter.md +59 -0
- package/docs/wiki/compiled/concept-api-spec.md +70 -0
- package/docs/wiki/compiled/concept-app-auto-state-paths.md +59 -0
- package/docs/wiki/compiled/concept-app-spec.md +89 -0
- package/docs/wiki/compiled/concept-auth-config.md +71 -0
- package/docs/wiki/compiled/concept-auth-domains.md +55 -0
- package/docs/wiki/compiled/concept-auth-security.md +58 -0
- package/docs/wiki/compiled/concept-auth-state-paths.md +48 -0
- package/docs/wiki/compiled/concept-auto-dark-mode.md +55 -0
- package/docs/wiki/compiled/concept-background-caps.md +42 -0
- package/docs/wiki/compiled/concept-background-layer-kinds.md +80 -0
- package/docs/wiki/compiled/concept-background-recipes.md +53 -0
- package/docs/wiki/compiled/concept-background-stack.md +55 -0
- package/docs/wiki/compiled/concept-blob-layer.md +92 -0
- package/docs/wiki/compiled/concept-blob-motion.md +58 -0
- package/docs/wiki/compiled/concept-blob-shapes-catalog.md +45 -0
- package/docs/wiki/compiled/concept-cli-tokens-inspect.md +38 -0
- package/docs/wiki/compiled/concept-component-variants.md +89 -0
- package/docs/wiki/compiled/concept-cross-tab-sync.md +35 -0
- package/docs/wiki/compiled/concept-css-vs-motion.md +46 -0
- package/docs/wiki/compiled/concept-custom-detection-pattern.md +49 -0
- package/docs/wiki/compiled/concept-custom-element-action-props.md +81 -0
- package/docs/wiki/compiled/concept-custom-element-black-box.md +56 -0
- package/docs/wiki/compiled/concept-custom-element-cache.md +39 -0
- package/docs/wiki/compiled/concept-custom-element-error-boundary.md +33 -0
- package/docs/wiki/compiled/concept-custom-element-prop-cascade.md +60 -0
- package/docs/wiki/compiled/concept-custom-element-repeat.md +53 -0
- package/docs/wiki/compiled/concept-custom-elements.md +71 -0
- package/docs/wiki/compiled/concept-custom-jwt-provider.md +63 -0
- package/docs/wiki/compiled/concept-customize-action.md +33 -0
- package/docs/wiki/compiled/concept-customize-cli-lint-rule.md +30 -0
- package/docs/wiki/compiled/concept-customize-expression-handler.md +30 -0
- package/docs/wiki/compiled/concept-customize-plugin.md +43 -0
- package/docs/wiki/compiled/concept-customize-server-middleware.md +36 -0
- package/docs/wiki/compiled/concept-customize-spec-store.md +42 -0
- package/docs/wiki/compiled/concept-customize-validator-rule.md +35 -0
- package/docs/wiki/compiled/concept-customize-versioned-store.md +37 -0
- package/docs/wiki/compiled/concept-data-sources-lifecycle.md +61 -0
- package/docs/wiki/compiled/concept-data-sources.md +96 -0
- package/docs/wiki/compiled/concept-debugging-runtime-pointers.md +45 -0
- package/docs/wiki/compiled/concept-derive-datasources-mount-order.md +72 -0
- package/docs/wiki/compiled/concept-derive.md +67 -0
- package/docs/wiki/compiled/concept-dna-seeds.md +79 -0
- package/docs/wiki/compiled/concept-editor-commit.md +37 -0
- package/docs/wiki/compiled/concept-editor-save.md +18 -0
- package/docs/wiki/compiled/concept-editor-sessions.md +23 -0
- package/docs/wiki/compiled/concept-element-children-slot.md +54 -0
- package/docs/wiki/compiled/concept-element-definition.md +60 -0
- package/docs/wiki/compiled/concept-element-key.md +56 -0
- package/docs/wiki/compiled/concept-element-prop-definition.md +54 -0
- package/docs/wiki/compiled/concept-element-properties.md +81 -0
- package/docs/wiki/compiled/concept-element-render-node.md +62 -0
- package/docs/wiki/compiled/concept-element-variants.md +67 -0
- package/docs/wiki/compiled/concept-environment-store.md +46 -0
- package/docs/wiki/compiled/concept-export-action.md +56 -0
- package/docs/wiki/compiled/concept-expression-contexts.md +56 -0
- package/docs/wiki/compiled/concept-expression-timing.md +56 -0
- package/docs/wiki/compiled/concept-fetch-interceptors.md +49 -0
- package/docs/wiki/compiled/concept-file-upload-overview.md +55 -0
- package/docs/wiki/compiled/concept-fire-and-forget.md +45 -0
- package/docs/wiki/compiled/concept-font-loading.md +52 -0
- package/docs/wiki/compiled/concept-form-state-paths.md +55 -0
- package/docs/wiki/compiled/concept-forms.md +89 -0
- package/docs/wiki/compiled/concept-identity-accent-application.md +48 -0
- package/docs/wiki/compiled/concept-identity-animations.md +48 -0
- package/docs/wiki/compiled/concept-identity-border-elevation-override.md +56 -0
- package/docs/wiki/compiled/concept-identity-color-scheme.md +74 -0
- package/docs/wiki/compiled/concept-identity-color-weight.md +50 -0
- package/docs/wiki/compiled/concept-identity-glass-rn.md +46 -0
- package/docs/wiki/compiled/concept-identity-gradients.md +56 -0
- package/docs/wiki/compiled/concept-identity-heading-color.md +40 -0
- package/docs/wiki/compiled/concept-identity-helpers.md +61 -0
- package/docs/wiki/compiled/concept-identity-icons.md +46 -0
- package/docs/wiki/compiled/concept-identity-images.md +36 -0
- package/docs/wiki/compiled/concept-identity-label-style.md +36 -0
- package/docs/wiki/compiled/concept-identity-overview.md +72 -0
- package/docs/wiki/compiled/concept-identity-radius-pattern.md +39 -0
- package/docs/wiki/compiled/concept-identity-surface.md +62 -0
- package/docs/wiki/compiled/concept-identity-text-decoration.md +48 -0
- package/docs/wiki/compiled/concept-identity-typography-hierarchy.md +40 -0
- package/docs/wiki/compiled/concept-initial-actions.md +82 -0
- package/docs/wiki/compiled/concept-interactive-states.md +72 -0
- package/docs/wiki/compiled/concept-keyframe-snapshot.md +52 -0
- package/docs/wiki/compiled/concept-layer-background.md +80 -0
- package/docs/wiki/compiled/concept-motion-field.md +77 -0
- package/docs/wiki/compiled/concept-mount-spec-runtime.md +47 -0
- package/docs/wiki/compiled/concept-mythik-renderer.md +76 -0
- package/docs/wiki/compiled/concept-navigation-dirty-guard.md +23 -0
- package/docs/wiki/compiled/concept-navigation.md +75 -0
- package/docs/wiki/compiled/concept-package-layout.md +35 -0
- package/docs/wiki/compiled/concept-path-references.md +53 -0
- package/docs/wiki/compiled/concept-pattern-primitives.md +54 -0
- package/docs/wiki/compiled/concept-preset-dropdown-pattern.md +52 -0
- package/docs/wiki/compiled/concept-presets.md +49 -0
- package/docs/wiki/compiled/concept-primitive-prop-schemas.md +53 -0
- package/docs/wiki/compiled/concept-primitives-overview.md +49 -0
- package/docs/wiki/compiled/concept-promote-gate.md +47 -0
- package/docs/wiki/compiled/concept-prop-cascade.md +76 -0
- package/docs/wiki/compiled/concept-public-package-names.md +33 -0
- package/docs/wiki/compiled/concept-query-envelope.md +55 -0
- package/docs/wiki/compiled/concept-reduced-motion.md +38 -0
- package/docs/wiki/compiled/concept-register-presets.md +44 -0
- package/docs/wiki/compiled/concept-render-error-visibility.md +57 -0
- package/docs/wiki/compiled/concept-repeat-grouped.md +72 -0
- package/docs/wiki/compiled/concept-repeat-selection.md +61 -0
- package/docs/wiki/compiled/concept-repeat.md +81 -0
- package/docs/wiki/compiled/concept-role-access.md +61 -0
- package/docs/wiki/compiled/concept-rollback.md +36 -0
- package/docs/wiki/compiled/concept-rules-catalog.md +49 -0
- package/docs/wiki/compiled/concept-screen-definition.md +51 -0
- package/docs/wiki/compiled/concept-screen-outlet.md +46 -0
- package/docs/wiki/compiled/concept-session-persistence.md +41 -0
- package/docs/wiki/compiled/concept-shape-animations.md +66 -0
- package/docs/wiki/compiled/concept-skeleton-auto.md +58 -0
- package/docs/wiki/compiled/concept-skeleton-manual.md +47 -0
- package/docs/wiki/compiled/concept-source-of-truth-references.md +37 -0
- package/docs/wiki/compiled/concept-source-reading-misleading.md +37 -0
- package/docs/wiki/compiled/concept-spatial-map-editor.md +22 -0
- package/docs/wiki/compiled/concept-spatial-map-zones.md +18 -0
- package/docs/wiki/compiled/concept-spec-engine.md +47 -0
- package/docs/wiki/compiled/concept-spec-store-interface.md +59 -0
- package/docs/wiki/compiled/concept-spec-store-layering.md +51 -0
- package/docs/wiki/compiled/concept-spec-stores-catalog.md +66 -0
- package/docs/wiki/compiled/concept-spec-structure.md +94 -0
- package/docs/wiki/compiled/concept-spec-types.md +76 -0
- package/docs/wiki/compiled/concept-state-change-animation.md +73 -0
- package/docs/wiki/compiled/concept-state-policies.md +44 -0
- package/docs/wiki/compiled/concept-state-protection.md +51 -0
- package/docs/wiki/compiled/concept-storage-adapter.md +69 -0
- package/docs/wiki/compiled/concept-storage-custom-names.md +69 -0
- package/docs/wiki/compiled/concept-storage-evolution.md +32 -0
- package/docs/wiki/compiled/concept-storage-idempotency.md +35 -0
- package/docs/wiki/compiled/concept-storage-overview.md +81 -0
- package/docs/wiki/compiled/concept-storage-postgres-jsonb.md +53 -0
- package/docs/wiki/compiled/concept-storage-postgres-triggers.md +60 -0
- package/docs/wiki/compiled/concept-storage-table-environments.md +40 -0
- package/docs/wiki/compiled/concept-storage-table-screens.md +44 -0
- package/docs/wiki/compiled/concept-storage-table-versions.md +50 -0
- package/docs/wiki/compiled/concept-storage-verification.md +57 -0
- package/docs/wiki/compiled/concept-template-children-marker.md +56 -0
- package/docs/wiki/compiled/concept-template-interpolation.md +60 -0
- package/docs/wiki/compiled/concept-templates-vs-variants.md +80 -0
- package/docs/wiki/compiled/concept-templates.md +93 -0
- package/docs/wiki/compiled/concept-token-categories.md +58 -0
- package/docs/wiki/compiled/concept-token-system.md +61 -0
- package/docs/wiki/compiled/concept-transaction-phase-timing.md +47 -0
- package/docs/wiki/compiled/concept-transaction-rollback.md +38 -0
- package/docs/wiki/compiled/concept-transaction-snapshot.md +37 -0
- package/docs/wiki/compiled/concept-transactions.md +72 -0
- package/docs/wiki/compiled/concept-validation-checks.md +63 -0
- package/docs/wiki/compiled/concept-validators-catalog.md +76 -0
- package/docs/wiki/compiled/concept-versioned-store.md +65 -0
- package/docs/wiki/compiled/concept-versioning-snapshots-patches.md +61 -0
- package/docs/wiki/compiled/concept-visibility.md +55 -0
- package/docs/wiki/compiled/concept-web-only-recipes.md +37 -0
- package/docs/wiki/compiled/concept-where-to-look.md +78 -0
- package/docs/wiki/compiled/expression-and-or-not.md +68 -0
- package/docs/wiki/compiled/expression-array.md +111 -0
- package/docs/wiki/compiled/expression-auth.md +83 -0
- package/docs/wiki/compiled/expression-binditem.md +52 -0
- package/docs/wiki/compiled/expression-bindstate.md +63 -0
- package/docs/wiki/compiled/expression-breakpoint.md +71 -0
- package/docs/wiki/compiled/expression-computed.md +52 -0
- package/docs/wiki/compiled/expression-cond.md +78 -0
- package/docs/wiki/compiled/expression-date.md +66 -0
- package/docs/wiki/compiled/expression-format.md +79 -0
- package/docs/wiki/compiled/expression-group.md +84 -0
- package/docs/wiki/compiled/expression-i18n.md +53 -0
- package/docs/wiki/compiled/expression-item-index.md +72 -0
- package/docs/wiki/compiled/expression-let-ref.md +87 -0
- package/docs/wiki/compiled/expression-math.md +67 -0
- package/docs/wiki/compiled/expression-platform.md +68 -0
- package/docs/wiki/compiled/expression-prop.md +89 -0
- package/docs/wiki/compiled/expression-selection.md +58 -0
- package/docs/wiki/compiled/expression-state.md +70 -0
- package/docs/wiki/compiled/expression-switch.md +68 -0
- package/docs/wiki/compiled/expression-template.md +71 -0
- package/docs/wiki/compiled/expression-token.md +67 -0
- package/docs/wiki/compiled/path-app-screens.md +55 -0
- package/docs/wiki/compiled/path-data-source-paths.md +44 -0
- package/docs/wiki/compiled/path-forms.md +38 -0
- package/docs/wiki/compiled/path-login.md +57 -0
- package/docs/wiki/compiled/path-navigation.md +62 -0
- package/docs/wiki/compiled/path-presets-available.md +44 -0
- package/docs/wiki/compiled/path-tokens.md +56 -0
- package/docs/wiki/compiled/path-tx-result-error.md +56 -0
- package/docs/wiki/compiled/path-ui-device.md +53 -0
- package/docs/wiki/compiled/path-ui-loading-error.md +40 -0
- package/docs/wiki/compiled/path-ui-modals-drawers.md +46 -0
- package/docs/wiki/compiled/path-ui-selected-row.md +92 -0
- package/docs/wiki/compiled/path-uploads.md +32 -0
- package/docs/wiki/compiled/pattern-cross-screen-data-flow.md +83 -0
- package/docs/wiki/compiled/pattern-fetch-vs-datasources.md +63 -0
- package/docs/wiki/compiled/pattern-file-upload-auto.md +61 -0
- package/docs/wiki/compiled/pattern-file-upload-manual.md +59 -0
- package/docs/wiki/compiled/pattern-form-validation-cross-field.md +58 -0
- package/docs/wiki/compiled/pattern-form-validation.md +58 -0
- package/docs/wiki/compiled/pattern-fullstack-coherence.md +49 -0
- package/docs/wiki/compiled/pattern-git-vs-db-versioning.md +55 -0
- package/docs/wiki/compiled/pattern-identity-aware-spec.md +70 -0
- package/docs/wiki/compiled/pattern-loading-content-empty.md +66 -0
- package/docs/wiki/compiled/pattern-login-body-template.md +47 -0
- package/docs/wiki/compiled/pattern-login-screen.md +83 -0
- package/docs/wiki/compiled/pattern-push-vs-patch.md +54 -0
- package/docs/wiki/compiled/pattern-reusable-components.md +67 -0
- package/docs/wiki/compiled/pattern-tx-create.md +76 -0
- package/docs/wiki/compiled/pattern-tx-delete.md +50 -0
- package/docs/wiki/compiled/pattern-tx-toggle.md +45 -0
- package/docs/wiki/compiled/pattern-tx-update.md +68 -0
- package/docs/wiki/compiled/primitive-accordion.md +46 -0
- package/docs/wiki/compiled/primitive-area-chart.md +35 -0
- package/docs/wiki/compiled/primitive-audio-player.md +27 -0
- package/docs/wiki/compiled/primitive-bar-chart.md +34 -0
- package/docs/wiki/compiled/primitive-box.md +58 -0
- package/docs/wiki/compiled/primitive-button.md +55 -0
- package/docs/wiki/compiled/primitive-camera.md +39 -0
- package/docs/wiki/compiled/primitive-checkbox.md +62 -0
- package/docs/wiki/compiled/primitive-divider.md +31 -0
- package/docs/wiki/compiled/primitive-drawer.md +44 -0
- package/docs/wiki/compiled/primitive-file-upload.md +65 -0
- package/docs/wiki/compiled/primitive-grid.md +48 -0
- package/docs/wiki/compiled/primitive-icon.md +106 -0
- package/docs/wiki/compiled/primitive-image.md +49 -0
- package/docs/wiki/compiled/primitive-input.md +81 -0
- package/docs/wiki/compiled/primitive-kanban-board.md +30 -0
- package/docs/wiki/compiled/primitive-line-chart.md +33 -0
- package/docs/wiki/compiled/primitive-list.md +34 -0
- package/docs/wiki/compiled/primitive-modal.md +51 -0
- package/docs/wiki/compiled/primitive-pie-chart.md +32 -0
- package/docs/wiki/compiled/primitive-screen-outlet.md +42 -0
- package/docs/wiki/compiled/primitive-screen.md +43 -0
- package/docs/wiki/compiled/primitive-scroll.md +33 -0
- package/docs/wiki/compiled/primitive-select.md +76 -0
- package/docs/wiki/compiled/primitive-signature.md +40 -0
- package/docs/wiki/compiled/primitive-skeleton.md +48 -0
- package/docs/wiki/compiled/primitive-slider.md +47 -0
- package/docs/wiki/compiled/primitive-spacer.md +33 -0
- package/docs/wiki/compiled/primitive-spatial-map.md +26 -0
- package/docs/wiki/compiled/primitive-stack.md +46 -0
- package/docs/wiki/compiled/primitive-table.md +127 -0
- package/docs/wiki/compiled/primitive-tabs.md +52 -0
- package/docs/wiki/compiled/primitive-text.md +59 -0
- package/docs/wiki/compiled/primitive-textarea.md +44 -0
- package/docs/wiki/compiled/primitive-toast-container.md +44 -0
- package/docs/wiki/compiled/primitive-toggle.md +46 -0
- package/docs/wiki/compiled/primitive-touchable.md +40 -0
- package/docs/wiki/compiled/primitive-wizard.md +43 -0
- package/package.json +58 -8
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { validateApiSpec } from '../../security/api-spec-validator.js';
|
|
2
|
+
export const apiHandler = {
|
|
3
|
+
type: 'api',
|
|
4
|
+
detect(doc) {
|
|
5
|
+
return doc != null && typeof doc === 'object' && 'type' in doc && doc.type === 'api';
|
|
6
|
+
},
|
|
7
|
+
generateManifest(doc) {
|
|
8
|
+
const lines = [];
|
|
9
|
+
lines.push(`API: ${doc.name ?? '(unnamed)'}`);
|
|
10
|
+
lines.push('');
|
|
11
|
+
const catalogs = doc.catalogs;
|
|
12
|
+
if (catalogs) {
|
|
13
|
+
const entries = Object.entries(catalogs);
|
|
14
|
+
lines.push(`Catalogs (${entries.length}):`);
|
|
15
|
+
for (const [name, config] of entries) {
|
|
16
|
+
const detail = config.static
|
|
17
|
+
? '(static)'
|
|
18
|
+
: config.distinct
|
|
19
|
+
? `(distinct: ${config.distinct})`
|
|
20
|
+
: `(${config.value} → ${config.label})`;
|
|
21
|
+
lines.push(` ${name} ${detail}`);
|
|
22
|
+
}
|
|
23
|
+
lines.push('');
|
|
24
|
+
}
|
|
25
|
+
const endpoints = doc.endpoints;
|
|
26
|
+
if (endpoints) {
|
|
27
|
+
const entries = Object.entries(endpoints);
|
|
28
|
+
lines.push(`Endpoints (${entries.length}):`);
|
|
29
|
+
for (const [name, ep] of entries) {
|
|
30
|
+
const method = (ep.method ?? 'GET').toUpperCase();
|
|
31
|
+
const details = [];
|
|
32
|
+
if (ep.query)
|
|
33
|
+
details.push('query');
|
|
34
|
+
if (ep.handler)
|
|
35
|
+
details.push(`handler: ${ep.handler}`);
|
|
36
|
+
if (ep.crud)
|
|
37
|
+
details.push('crud');
|
|
38
|
+
if (ep.pagination)
|
|
39
|
+
details.push(`pagination: ${ep.pagination}`);
|
|
40
|
+
if (ep.policy)
|
|
41
|
+
details.push(`policy: ${ep.policy}`);
|
|
42
|
+
lines.push(` ${name}: ${method} ${ep.path} (${details.join(', ')})`);
|
|
43
|
+
}
|
|
44
|
+
lines.push('');
|
|
45
|
+
}
|
|
46
|
+
const auth = doc.auth;
|
|
47
|
+
if (auth) {
|
|
48
|
+
lines.push('Auth:');
|
|
49
|
+
lines.push(` Strategy: ${auth.strategy ?? 'jwt'}`);
|
|
50
|
+
if (auth.policies) {
|
|
51
|
+
const policyNames = Object.keys(auth.policies);
|
|
52
|
+
lines.push(` Policies (${policyNames.length}): ${policyNames.join(', ')}`);
|
|
53
|
+
}
|
|
54
|
+
if (auth.scopeFilter) {
|
|
55
|
+
const sf = auth.scopeFilter;
|
|
56
|
+
lines.push(` Scope filter: ${sf.mode ?? 'all'} on ${sf.column}`);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
return lines.join('\n');
|
|
60
|
+
},
|
|
61
|
+
getElements(doc, ids) {
|
|
62
|
+
const found = {};
|
|
63
|
+
const notFound = [];
|
|
64
|
+
for (const id of ids) {
|
|
65
|
+
const parts = id.split('.');
|
|
66
|
+
let current = doc;
|
|
67
|
+
for (const part of parts) {
|
|
68
|
+
if (current && typeof current === 'object' && part in current) {
|
|
69
|
+
current = current[part];
|
|
70
|
+
}
|
|
71
|
+
else {
|
|
72
|
+
current = undefined;
|
|
73
|
+
break;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
if (current !== undefined) {
|
|
77
|
+
found[id] = current;
|
|
78
|
+
}
|
|
79
|
+
else {
|
|
80
|
+
notFound.push(id);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
return { found, notFound };
|
|
84
|
+
},
|
|
85
|
+
validate(doc, _context) {
|
|
86
|
+
const result = validateApiSpec(doc);
|
|
87
|
+
return {
|
|
88
|
+
valid: result.valid,
|
|
89
|
+
errors: result.errors.map(msg => ({ message: msg, path: '' })),
|
|
90
|
+
warnings: [],
|
|
91
|
+
lintWarnings: result.lintWarnings,
|
|
92
|
+
};
|
|
93
|
+
},
|
|
94
|
+
extractPatchedPaths(patches) {
|
|
95
|
+
const sections = new Set();
|
|
96
|
+
const topLevelSections = new Set(['catalogs', 'endpoints', 'auth', 'name', 'type']);
|
|
97
|
+
for (const p of patches) {
|
|
98
|
+
const sectionMatch = p.path.match(/^\/([^/]+)/);
|
|
99
|
+
if (sectionMatch && topLevelSections.has(sectionMatch[1])) {
|
|
100
|
+
sections.add(sectionMatch[1]);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
return { elements: [], sections: Array.from(sections) };
|
|
104
|
+
},
|
|
105
|
+
countElements(doc) {
|
|
106
|
+
const catalogCount = doc.catalogs ? Object.keys(doc.catalogs).length : 0;
|
|
107
|
+
const endpointCount = doc.endpoints ? Object.keys(doc.endpoints).length : 0;
|
|
108
|
+
return catalogCount + endpointCount;
|
|
109
|
+
},
|
|
110
|
+
};
|
|
111
|
+
//# sourceMappingURL=api-handler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api-handler.js","sourceRoot":"","sources":["../../../src/spec-engine/handlers/api-handler.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AAIvE,M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,CAAC;QACpG,MAAM,aAAa,GAAG,GAAG,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,SAAoC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;QACvG,OAAO,YAAY,GAAG,aAAa,CAAC;IACtC,CAAC;CACF,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app-handler.d.ts","sourceRoot":"","sources":["../../../src/spec-engine/handlers/app-handler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,KAAK,EAAE,eAAe,EAAsC,MAAM,aAAa,CAAC;AAOvF,eAAO,MAAM,UAAU,EAAE,eAAe,CAAC,OAAO,CA4C/C,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { generateAppManifest } from '../app-manifest.js';
|
|
2
|
+
import { getAppElements } from '../app-elements.js';
|
|
3
|
+
import { validateAppSpec } from '../../security/app-spec-validator.js';
|
|
4
|
+
export const appHandler = {
|
|
5
|
+
type: 'app',
|
|
6
|
+
detect(doc) {
|
|
7
|
+
return doc != null && typeof doc === 'object' && 'type' in doc && doc.type === 'app';
|
|
8
|
+
},
|
|
9
|
+
generateManifest(doc) {
|
|
10
|
+
return generateAppManifest(doc);
|
|
11
|
+
},
|
|
12
|
+
getElements(doc, ids) {
|
|
13
|
+
return getAppElements(doc, ids);
|
|
14
|
+
},
|
|
15
|
+
validate(doc, context) {
|
|
16
|
+
return validateAppSpec(doc, context);
|
|
17
|
+
},
|
|
18
|
+
extractPatchedPaths(patches) {
|
|
19
|
+
const elements = new Set();
|
|
20
|
+
const sections = new Set();
|
|
21
|
+
const topLevelSections = new Set(['tokens', 'screens', 'navigation', 'translations', 'sharedState', 'templates', 'layout', 'name', 'type']);
|
|
22
|
+
for (const p of patches) {
|
|
23
|
+
// /layout/elements/{id}/... → element
|
|
24
|
+
const layoutMatch = p.path.match(/^\/layout\/elements\/([^/]+)/);
|
|
25
|
+
if (layoutMatch) {
|
|
26
|
+
elements.add(layoutMatch[1]);
|
|
27
|
+
continue;
|
|
28
|
+
}
|
|
29
|
+
// /tokens/... → section "tokens", /screens/... → section "screens", etc.
|
|
30
|
+
const sectionMatch = p.path.match(/^\/([^/]+)/);
|
|
31
|
+
if (sectionMatch && topLevelSections.has(sectionMatch[1])) {
|
|
32
|
+
sections.add(sectionMatch[1]);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
return { elements: Array.from(elements), sections: Array.from(sections) };
|
|
36
|
+
},
|
|
37
|
+
countElements(doc) {
|
|
38
|
+
return Object.keys(doc.layout.elements).length;
|
|
39
|
+
},
|
|
40
|
+
};
|
|
41
|
+
//# sourceMappingURL=app-handler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app-handler.js","sourceRoot":"","sources":["../../../src/spec-engine/handlers/app-handler.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AAEvE,MAAM,CAAC,MAAM,UAAU,GAA6B;IAClD,IAAI,EAAE,KAAK;IAEX,MAAM,CAAC,GAAY;QACjB,OAAO,GAAG,IAAI,IAAI,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,MAAM,IAAI,GAAG,IAAK,GAA+B,CAAC,IAAI,KAAK,KAAK,CAAC;IACpH,CAAC;IAED,gBAAgB,CAAC,GAAY;QAC3B,OAAO,mBAAmB,CAAC,GAAG,CAAC,CAAC;IAClC,CAAC;IAED,WAAW,CAAC,GAAY,EAAE,GAAa;QACrC,OAAO,cAAc,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;IAClC,CAAC;IAED,QAAQ,CAAC,GAAY,EAAE,OAA0B;QAC/C,OA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DocumentHandler } from '../types.js';
|
|
2
|
+
import { screenHandler } from './screen-handler.js';
|
|
3
|
+
import { appHandler } from './app-handler.js';
|
|
4
|
+
import { apiHandler } from './api-handler.js';
|
|
5
|
+
export declare function getDocumentHandler(doc: unknown): DocumentHandler;
|
|
6
|
+
export declare function registerDocumentHandler(handler: DocumentHandler): void;
|
|
7
|
+
export { screenHandler, appHandler, apiHandler };
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/spec-engine/handlers/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAI9C,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,OAAO,GAAG,eAAe,CAOhE;AAED,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,eAAe,GAAG,IAAI,CAGtE;AAED,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,UAAU,EAAE,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { screenHandler } from './screen-handler.js';
|
|
2
|
+
import { appHandler } from './app-handler.js';
|
|
3
|
+
import { apiHandler } from './api-handler.js';
|
|
4
|
+
const handlers = [apiHandler, appHandler, screenHandler];
|
|
5
|
+
export function getDocumentHandler(doc) {
|
|
6
|
+
for (const h of handlers) {
|
|
7
|
+
if (h.detect(doc))
|
|
8
|
+
return h;
|
|
9
|
+
}
|
|
10
|
+
throw new Error('Unknown document type. Expected screen spec (root + elements), app spec (type: "app"), or api spec (type: "api").');
|
|
11
|
+
}
|
|
12
|
+
export function registerDocumentHandler(handler) {
|
|
13
|
+
// Insert before screenHandler (last position) — screen is the fallback
|
|
14
|
+
handlers.splice(handlers.length - 1, 0, handler);
|
|
15
|
+
}
|
|
16
|
+
export { screenHandler, appHandler, apiHandler };
|
|
17
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/spec-engine/handlers/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE9C,MAAM,QAAQ,GAAsB,CAAC,UAAU,EAAE,UAAU,EAAE,aAAa,CAAC,CAAC;AAE5E,MAAM,UAAU,kBAAkB,CAAC,GAAY;IAC7C,KAAK,MAAM,CAAC,IAAI,QAAQ,EAAE,CAAC;QACzB,IAAI,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC;YAAE,OAAO,CAAC,CAAC;IAC9B,CAAC;IACD,MAAM,IAAI,KAAK,CACb,mHAAmH,CACpH,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,uBAAuB,CAAC,OAAwB;IAC9D,uEAAuE;IACvE,QAAQ,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,EAAE,OAAO,CAAC,CAAC;AACnD,CAAC;AAED,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,UAAU,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"screen-handler.d.ts","sourceRoot":"","sources":["../../../src/spec-engine/handlers/screen-handler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,KAAK,EAAE,eAAe,EAAsC,MAAM,aAAa,CAAC;AAgBvF,eAAO,MAAM,aAAa,EAAE,eAAe,CAAC,IAAI,CA0B/C,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { generateManifest } from '../manifest.js';
|
|
2
|
+
import { getElements as getElementsPure } from '../elements.js';
|
|
3
|
+
import { validateSpec } from '../../security/spec-validator.js';
|
|
4
|
+
function extractPatchedElements(patches) {
|
|
5
|
+
const ids = new Set();
|
|
6
|
+
for (const p of patches) {
|
|
7
|
+
const match = p.path.match(/^\/elements\/([^/]+)/);
|
|
8
|
+
if (match)
|
|
9
|
+
ids.add(match[1]);
|
|
10
|
+
}
|
|
11
|
+
return Array.from(ids);
|
|
12
|
+
}
|
|
13
|
+
export const screenHandler = {
|
|
14
|
+
type: 'screen',
|
|
15
|
+
detect(doc) {
|
|
16
|
+
return doc != null && typeof doc === 'object' && 'root' in doc && 'elements' in doc;
|
|
17
|
+
},
|
|
18
|
+
generateManifest(doc) {
|
|
19
|
+
return generateManifest(doc);
|
|
20
|
+
},
|
|
21
|
+
getElements(doc, ids) {
|
|
22
|
+
return getElementsPure(doc, ids);
|
|
23
|
+
},
|
|
24
|
+
validate(doc, context) {
|
|
25
|
+
return validateSpec(doc, context);
|
|
26
|
+
},
|
|
27
|
+
extractPatchedPaths(patches) {
|
|
28
|
+
return { elements: extractPatchedElements(patches), sections: [] };
|
|
29
|
+
},
|
|
30
|
+
countElements(doc) {
|
|
31
|
+
return Object.keys(doc.elements).length;
|
|
32
|
+
},
|
|
33
|
+
};
|
|
34
|
+
//# sourceMappingURL=screen-handler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"screen-handler.js","sourceRoot":"","sources":["../../../src/spec-engine/handlers/screen-handler.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,EAAE,WAAW,IAAI,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAChE,OAAO,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAEhE,SAAS,sBAAsB,CAAC,OAAoB;IAClD,MAAM,GAAG,GAAG,IAAI,GAAG,EAAU,CAAC;IAC9B,KAAK,MAAM,CAAC,IAAI,OAAO,EAAE,CAAC;QACxB,MAAM,KAAK,GAAG,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,sBAAsB,CAAC,CAAC;QACnD,IAAI,KAAK;YAAE,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;IAC/B,CAAC;IACD,OAAO,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACzB,CAAC;AAED,MAAM,CAAC,MAAM,aAAa,GAA0B;IAClD,IAAI,EAAE,QAAQ;IAEd,MAAM,CAAC,GAAY;QACjB,OAAO,GAAG,IAAI,IAAI,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,MAAM,IAAI,GAAG,IAAI,UAAU,IAAI,GAAG,CAAC;IACtF,CAAC;IAED,gBAAgB,CAAC,GAAS;QACxB,OAAO,gBAAgB,CAAC,GAAG,CAAC,CAAC;IAC/B,CAAC;IAED,WAAW,CAAC,GAAS,EAAE,GAAa;QAClC,OAAO,eAAe,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;IACnC,CAAC;IAED,QAAQ,CAAC,GAAS,EAAE,OAA0B;QAC5C,OAAO,YAAY,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;IACpC,CAAC;IAED,mBAAmB,CAAC,OAAoB;QACtC,OAAO,EAAE,QAAQ,EAAE,sBAAsB,CAAC,OAAO,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC;IACrE,CAAC;IAED,aAAa,CAAC,GAAS;QACrB,OAAO,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC;IAC1C,CAAC;CACF,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Spec, Element } from '../types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Generate a plain-text structural manifest of a spec.
|
|
4
|
+
* Shows the element tree with annotations — no props, styles, or expression values.
|
|
5
|
+
*/
|
|
6
|
+
export declare function generateManifest(spec: Spec): string;
|
|
7
|
+
export declare function appendChildren(spec: {
|
|
8
|
+
elements: Record<string, Element>;
|
|
9
|
+
}, childIds: string[], lines: string[], prefix: string): void;
|
|
10
|
+
export declare function buildAnnotations(el: Element): string;
|
|
11
|
+
//# sourceMappingURL=manifest.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"manifest.d.ts","sourceRoot":"","sources":["../../src/spec-engine/manifest.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,OAAO,EAAiB,MAAM,aAAa,CAAC;AAEhE;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,CAyBnD;AAED,wBAAgB,cAAc,CAAC,IAAI,EAAE;IAAE,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI,CAoBrI;AAED,wBAAgB,gBAAgB,CAAC,EAAE,EAAE,OAAO,GAAG,MAAM,CAuBpD"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generate a plain-text structural manifest of a spec.
|
|
3
|
+
* Shows the element tree with annotations — no props, styles, or expression values.
|
|
4
|
+
*/
|
|
5
|
+
export function generateManifest(spec) {
|
|
6
|
+
const elementCount = Object.keys(spec.elements).length;
|
|
7
|
+
const lines = [];
|
|
8
|
+
lines.push(`screen: ${spec.root} (${elementCount} elements)`);
|
|
9
|
+
if (spec.initialActions && spec.initialActions.length > 0) {
|
|
10
|
+
const actionSummaries = spec.initialActions.map(summarizeAction).filter(Boolean);
|
|
11
|
+
if (actionSummaries.length > 0) {
|
|
12
|
+
lines.push(`initialActions: ${actionSummaries.join(', ')}`);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
lines.push('');
|
|
16
|
+
const rootEl = spec.elements[spec.root];
|
|
17
|
+
if (rootEl) {
|
|
18
|
+
const annotations = buildAnnotations(rootEl);
|
|
19
|
+
lines.push(`root: ${spec.root} (${rootEl.type})${annotations}`);
|
|
20
|
+
if (rootEl.children && rootEl.children.length > 0) {
|
|
21
|
+
appendChildren(spec, rootEl.children, lines, '');
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
return lines.join('\n');
|
|
25
|
+
}
|
|
26
|
+
export function appendChildren(spec, childIds, lines, prefix) {
|
|
27
|
+
for (let i = 0; i < childIds.length; i++) {
|
|
28
|
+
const id = childIds[i];
|
|
29
|
+
const el = spec.elements[id];
|
|
30
|
+
const isLast = i === childIds.length - 1;
|
|
31
|
+
const connector = isLast ? '└── ' : '├── ';
|
|
32
|
+
const childPrefix = isLast ? ' ' : '│ ';
|
|
33
|
+
if (!el) {
|
|
34
|
+
lines.push(`${prefix}${connector}${id} (MISSING)`);
|
|
35
|
+
continue;
|
|
36
|
+
}
|
|
37
|
+
const annotations = buildAnnotations(el);
|
|
38
|
+
lines.push(`${prefix}${connector}${id} (${el.type})${annotations}`);
|
|
39
|
+
if (el.children && el.children.length > 0) {
|
|
40
|
+
appendChildren(spec, el.children, lines, prefix + childPrefix);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
export function buildAnnotations(el) {
|
|
45
|
+
const parts = [];
|
|
46
|
+
if (el.repeat) {
|
|
47
|
+
if (el.repeat.statePath) {
|
|
48
|
+
parts.push(`repeat:${el.repeat.statePath}`);
|
|
49
|
+
}
|
|
50
|
+
else if (el.repeat.source) {
|
|
51
|
+
parts.push('repeat:expression');
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
if (el.visible !== undefined && el.visible !== true) {
|
|
55
|
+
parts.push('visible:conditional');
|
|
56
|
+
}
|
|
57
|
+
if (el.on) {
|
|
58
|
+
const events = Object.keys(el.on).sort().join(',');
|
|
59
|
+
if (events) {
|
|
60
|
+
parts.push(`on:${events}`);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
return parts.length > 0 ? ` → ${parts.join(', ')}` : '';
|
|
64
|
+
}
|
|
65
|
+
function summarizeAction(binding) {
|
|
66
|
+
if ('transaction' in binding)
|
|
67
|
+
return 'transaction';
|
|
68
|
+
const ab = binding;
|
|
69
|
+
if (ab.action === 'fetch' || ab.action === 'submitForm') {
|
|
70
|
+
const method = ab.params?.method ?? 'GET';
|
|
71
|
+
const target = ab.params?.target ?? '';
|
|
72
|
+
return `${ab.action} ${method}${target ? ' → ' + target : ''}`;
|
|
73
|
+
}
|
|
74
|
+
return ab.action;
|
|
75
|
+
}
|
|
76
|
+
//# sourceMappingURL=manifest.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"manifest.js","sourceRoot":"","sources":["../../src/spec-engine/manifest.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,MAAM,UAAU,gBAAgB,CAAC,IAAU;IACzC,MAAM,YAAY,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC;IACvD,MAAM,KAAK,GAAa,EAAE,CAAC;IAE3B,KAAK,CAAC,IAAI,CAAC,WAAW,IAAI,CAAC,IAAI,KAAK,YAAY,YAAY,CAAC,CAAC;IAE9D,IAAI,IAAI,CAAC,cAAc,IAAI,IAAI,CAAC,cAAc,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAC1D,MAAM,eAAe,GAAG,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;QACjF,IAAI,eAAe,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAC/B,KAAK,CAAC,IAAI,CAAC,mBAAmB,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QAC9D,CAAC;IACH,CAAC;IAED,KAAK,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,CAAC;QAC7B,CAAC;IACH,CAAC;IAED,OAAO,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,MAAM,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;AAC1D,CAAC;AAED,SAAS,eAAe,CAAC,OAAkD;IACzE,IAAI,aAAa,IAAI,OAAO;QAAE,OAAO,aAAa,CAAC;IACnD,MAAM,EAAE,GAAG,OAAwB,CAAC;IACpC,IAAI,EAAE,CAAC,MAAM,KAAK,OAAO,IAAI,EAAE,CAAC,MAAM,KAAK,YAAY,EAAE,CAAC;QACxD,MAAM,MAAM,GAAI,EAAE,CAAC,MAAM,EAAE,MAAiB,IAAI,KAAK,CAAC;QACtD,MAAM,MAAM,GAAI,EAAE,CAAC,MAAM,EAAE,MAAiB,IAAI,EAAE,CAAC;QACnD,OAAO,GAAG,EAAE,CAAC,MAAM,IAAI,MAAM,GAAG,MAAM,CAAC,CAAC,CAAC,KAAK,GAAG,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;IACjE,CAAC;IACD,OAAO,EAAE,CAAC,MAAM,CAAC;AACnB,CAAC"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import type { JsonPatch } from '../streaming/patch.js';
|
|
2
|
+
import type { PrimitiveRegistry } from '../renderer/registry.js';
|
|
3
|
+
import type { ValidationError, ValidationContext, SpecValidationResult } from '../security/spec-validator.js';
|
|
4
|
+
export interface SpecStore {
|
|
5
|
+
load(id: string): Promise<unknown>;
|
|
6
|
+
/**
|
|
7
|
+
* Persist a document at the given id.
|
|
8
|
+
*
|
|
9
|
+
* @internal
|
|
10
|
+
* Persistence primitive — called by the CLI / SpecEngine tier after validation.
|
|
11
|
+
* Do NOT call from application code; use one of the three approved paths:
|
|
12
|
+
* - Shell: `mythik push <id> --from-file spec.json`
|
|
13
|
+
* - Bulk: `mythik push --from-dir ./specs/`
|
|
14
|
+
* - Programmatic: `import { runPush } from 'mythik-cli/api'`
|
|
15
|
+
*
|
|
16
|
+
* Bypassing the CLI / engine tier skips validation and is a known anti-pattern
|
|
17
|
+
* (audit findings F6, v36 items #5 and #8).
|
|
18
|
+
*/
|
|
19
|
+
save(id: string, doc: unknown): Promise<void>;
|
|
20
|
+
list(): Promise<string[]>;
|
|
21
|
+
delete(id: string): Promise<void>;
|
|
22
|
+
}
|
|
23
|
+
export interface PatchedPathsResult {
|
|
24
|
+
elements: string[];
|
|
25
|
+
sections: string[];
|
|
26
|
+
}
|
|
27
|
+
export interface DocumentHandler<T = unknown> {
|
|
28
|
+
type: string;
|
|
29
|
+
detect(doc: unknown): doc is T;
|
|
30
|
+
generateManifest(doc: T): string;
|
|
31
|
+
getElements(doc: T, ids: string[]): ElementsResult;
|
|
32
|
+
validate(doc: T, context: ValidationContext): SpecValidationResult;
|
|
33
|
+
extractPatchedPaths(patches: JsonPatch[]): PatchedPathsResult;
|
|
34
|
+
countElements(doc: T): number;
|
|
35
|
+
}
|
|
36
|
+
export interface ElementsResult {
|
|
37
|
+
found: Record<string, unknown>;
|
|
38
|
+
notFound: string[];
|
|
39
|
+
}
|
|
40
|
+
export interface SpecEngineConfig {
|
|
41
|
+
store: SpecStore;
|
|
42
|
+
primitiveRegistry?: PrimitiveRegistry;
|
|
43
|
+
}
|
|
44
|
+
export interface PatchResult {
|
|
45
|
+
success: boolean;
|
|
46
|
+
manifest: string;
|
|
47
|
+
errors?: ValidationError[];
|
|
48
|
+
elementCount: number;
|
|
49
|
+
patchedElements: string[];
|
|
50
|
+
patchedSections?: string[];
|
|
51
|
+
}
|
|
52
|
+
export interface SpecEngine {
|
|
53
|
+
getManifest(screenId: string): Promise<string>;
|
|
54
|
+
getElements(screenId: string, elementIds: string[]): Promise<ElementsResult>;
|
|
55
|
+
patch(screenId: string, patches: JsonPatch[]): Promise<PatchResult>;
|
|
56
|
+
delete(screenId: string): Promise<{
|
|
57
|
+
spec: unknown;
|
|
58
|
+
manifest: string;
|
|
59
|
+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E,GAAG,kBAAkB,CAAC;IAC9D,aAAa,CAAC,GAAG,EAAE,CAAC,GAAG,MAAM,CAAC;CAC/B;AAID,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC/B,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB;AAID,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,SAAS,CAAC;IACjB,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;CACvC;AAED,MAAM,WAAW,WAAW;IAC1B,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,eAAe,EAAE,CAAC;IAC3B,YAAY,EAAE,MAAM,CAAC;IACrB,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;CAC5B;AAED,MAAM,WAAW,UAAU;IACzB,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAC/C,WAAW,CAAC,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,cAAc,CAAC,CAAC;IAC7E,KAAK,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;IACpE,MAAM,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;QAAE,IAAI,EAAE,OAAO,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CACxE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/spec-engine/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { SpecStore } from '../spec-engine/types.js';
|
|
2
|
+
export declare class FileSpecStore implements SpecStore {
|
|
3
|
+
private directory;
|
|
4
|
+
constructor(config: {
|
|
5
|
+
directory: string;
|
|
6
|
+
});
|
|
7
|
+
load(screenId: string): Promise<unknown>;
|
|
8
|
+
save(screenId: string, spec: unknown): Promise<void>;
|
|
9
|
+
list(): Promise<string[]>;
|
|
10
|
+
delete(screenId: string): Promise<void>;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=file.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file.d.ts","sourceRoot":"","sources":["../../src/spec-stores/file.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAIzD,qBAAa,aAAc,YAAW,SAAS;IAC7C,OAAO,CAAC,SAAS,CAAS;gBAEd,MAAM,EAAE;QAAE,SAAS,EAAE,MAAM,CAAA;KAAE;IAInC,IAAI,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAMxC,IAAI,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC;IAMpD,IAAI,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;IAMzB,MAAM,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAO9C"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import fs from 'fs';
|
|
2
|
+
import path from 'path';
|
|
3
|
+
export class FileSpecStore {
|
|
4
|
+
directory;
|
|
5
|
+
constructor(config) {
|
|
6
|
+
this.directory = config.directory;
|
|
7
|
+
}
|
|
8
|
+
async load(screenId) {
|
|
9
|
+
const filePath = path.join(this.directory, `${screenId}.json`);
|
|
10
|
+
const raw = fs.readFileSync(filePath, 'utf-8');
|
|
11
|
+
return JSON.parse(raw);
|
|
12
|
+
}
|
|
13
|
+
async save(screenId, spec) {
|
|
14
|
+
fs.mkdirSync(this.directory, { recursive: true });
|
|
15
|
+
const filePath = path.join(this.directory, `${screenId}.json`);
|
|
16
|
+
fs.writeFileSync(filePath, JSON.stringify(spec, null, 2), 'utf-8');
|
|
17
|
+
}
|
|
18
|
+
async list() {
|
|
19
|
+
if (!fs.existsSync(this.directory))
|
|
20
|
+
return [];
|
|
21
|
+
const files = fs.readdirSync(this.directory).filter(f => f.endsWith('.json'));
|
|
22
|
+
return files.map(f => path.basename(f, '.json'));
|
|
23
|
+
}
|
|
24
|
+
async delete(screenId) {
|
|
25
|
+
const filePath = path.join(this.directory, `${screenId}.json`);
|
|
26
|
+
if (!fs.existsSync(filePath)) {
|
|
27
|
+
throw new Error(`Spec "${screenId}" not found`);
|
|
28
|
+
}
|
|
29
|
+
fs.unlinkSync(filePath);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=file.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file.js","sourceRoot":"","sources":["../../src/spec-stores/file.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,MAAM,OAAO,aAAa;IAChB,SAAS,CAAS;IAE1B,YAAY,MAA6B;QACvC,IAAI,CAAC,SAAS,GAAG,MAAM,CAAC,SAAS,CAAC;IACpC,CAAC;IAED,KAAK,CAAC,IAAI,CAAC,QAAgB;QACzB,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,GAAG,QAAQ,OAAO,CAAC,CAAC;QAC/D,MAAM,GAAG,GAAG,EAAE,CAAC,YAAY,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;QAC/C,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACzB,CAAC;IAED,KAAK,CAAC,IAAI,CAAC,QAAgB,EAAE,IAAa;QACxC,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,SAAS,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;QAClD,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,GAAG,QAAQ,OAAO,CAAC,CAAC;QAC/D,EAAE,CAAC,aAAa,CAAC,QAAQ,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC;IACrE,CAAC;IAED,KAAK,CAAC,IAAI;QACR,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC;YAAE,OAAO,EAAE,CAAC;QAC9C,MAAM,KAAK,GAAG,EAAE,CAAC,WAAW,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC;QAC9E,OAAO,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC;IACnD,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,QAAgB;QAC3B,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,GAAG,QAAQ,OAAO,CAAC,CAAC;QAC/D,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE,CAAC;YAC7B,MAAM,IAAI,KAAK,CAAC,SAAS,QAAQ,aAAa,CAAC,CAAC;QAClD,CAAC;QACD,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;IAC1B,CAAC;CACF"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { MemorySpecStore } from './memory.js';
|
|
2
|
+
import type { VersionedSpecStore, EnvironmentStore, VersionMeta, VersionEntry, EnvironmentPointer } from '../versioning/types.js';
|
|
3
|
+
export interface MemoryVersionedSpecStoreConfig {
|
|
4
|
+
snapshotInterval?: number;
|
|
5
|
+
}
|
|
6
|
+
export declare class MemoryVersionedSpecStore extends MemorySpecStore implements VersionedSpecStore {
|
|
7
|
+
private versions;
|
|
8
|
+
private snapshotInterval;
|
|
9
|
+
constructor(config?: MemoryVersionedSpecStoreConfig);
|
|
10
|
+
saveVersion(id: string, doc: unknown, meta: VersionMeta): Promise<number>;
|
|
11
|
+
loadVersion(id: string, version: number): Promise<unknown>;
|
|
12
|
+
listVersions(id: string, limit?: number): Promise<VersionEntry[]>;
|
|
13
|
+
currentVersion(id: string): Promise<number>;
|
|
14
|
+
private reconstructSpec;
|
|
15
|
+
}
|
|
16
|
+
export declare class MemoryEnvironmentStore implements EnvironmentStore {
|
|
17
|
+
private envs;
|
|
18
|
+
getEnvironments(specId: string): Promise<EnvironmentPointer[]>;
|
|
19
|
+
getEnvironment(specId: string, env: string): Promise<EnvironmentPointer | null>;
|
|
20
|
+
setEnvironment(specId: string, env: string, version: number, author: string): Promise<void>;
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=memory-versioned.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"memory-versioned.d.ts","sourceRoot":"","sources":["../../src/spec-stores/memory-versioned.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,KAAK,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,WAAW,EAAE,YAAY,EAAiB,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAIjJ,MAAM,WAAW,8BAA8B;IAC7C,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED,qBAAa,wBAAyB,SAAQ,eAAgB,YAAW,kBAAkB;IACzF,OAAO,CAAC,QAAQ,CAAsC;IACtD,OAAO,CAAC,gBAAgB,CAAS;gBAErB,MAAM,CAAC,EAAE,8BAA8B;IAK7C,WAAW,CAAC,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,WAAW,GAAG,OAA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