@pwfabric/runtime 0.0.0-stage → 1.0.0-rc.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 +90 -0
- package/README.md +13 -2
- package/dist/__tests__/dom-test-setup.d.ts +21 -0
- package/dist/__tests__/dom-test-setup.d.ts.map +1 -0
- package/dist/__tests__/dom-test-setup.js +36 -0
- package/dist/__tests__/dom-test-setup.js.map +1 -0
- package/dist/a11y/announcer.d.ts +66 -0
- package/dist/a11y/announcer.d.ts.map +1 -0
- package/dist/a11y/announcer.js +140 -0
- package/dist/a11y/announcer.js.map +1 -0
- package/dist/a11y/contrast.d.ts +55 -0
- package/dist/a11y/contrast.d.ts.map +1 -0
- package/dist/a11y/contrast.js +93 -0
- package/dist/a11y/contrast.js.map +1 -0
- package/dist/a11y/focus.d.ts +124 -0
- package/dist/a11y/focus.d.ts.map +1 -0
- package/dist/a11y/focus.js +282 -0
- package/dist/a11y/focus.js.map +1 -0
- package/dist/a11y/index.d.ts +22 -0
- package/dist/a11y/index.d.ts.map +1 -0
- package/dist/a11y/index.js +18 -0
- package/dist/a11y/index.js.map +1 -0
- package/dist/a11y/keyboard.d.ts +145 -0
- package/dist/a11y/keyboard.d.ts.map +1 -0
- package/dist/a11y/keyboard.js +317 -0
- package/dist/a11y/keyboard.js.map +1 -0
- package/dist/adapters/default-image.d.ts +26 -0
- package/dist/adapters/default-image.d.ts.map +1 -0
- package/dist/adapters/default-image.js +37 -0
- package/dist/adapters/default-image.js.map +1 -0
- package/dist/adapters/index.d.ts +28 -0
- package/dist/adapters/index.d.ts.map +1 -0
- package/dist/adapters/index.js +28 -0
- package/dist/adapters/index.js.map +1 -0
- package/dist/adapters/next-image.d.ts +39 -0
- package/dist/adapters/next-image.d.ts.map +1 -0
- package/dist/adapters/next-image.js +124 -0
- package/dist/adapters/next-image.js.map +1 -0
- package/dist/adapters/types.d.ts +62 -0
- package/dist/adapters/types.d.ts.map +1 -0
- package/dist/adapters/types.js +11 -0
- package/dist/adapters/types.js.map +1 -0
- package/dist/analytics/index.d.ts +15 -0
- package/dist/analytics/index.d.ts.map +1 -0
- package/dist/analytics/index.js +15 -0
- package/dist/analytics/index.js.map +1 -0
- package/dist/analytics/tracker.d.ts +66 -0
- package/dist/analytics/tracker.d.ts.map +1 -0
- package/dist/analytics/tracker.js +251 -0
- package/dist/analytics/tracker.js.map +1 -0
- package/dist/analytics/types.d.ts +131 -0
- package/dist/analytics/types.d.ts.map +1 -0
- package/dist/analytics/types.js +11 -0
- package/dist/analytics/types.js.map +1 -0
- package/dist/auth/index.d.ts +16 -0
- package/dist/auth/index.d.ts.map +1 -0
- package/dist/auth/index.js +14 -0
- package/dist/auth/index.js.map +1 -0
- package/dist/auth/provider.d.ts +133 -0
- package/dist/auth/provider.d.ts.map +1 -0
- package/dist/auth/provider.js +473 -0
- package/dist/auth/provider.js.map +1 -0
- package/dist/auth/types.d.ts +118 -0
- package/dist/auth/types.d.ts.map +1 -0
- package/dist/auth/types.js +9 -0
- package/dist/auth/types.js.map +1 -0
- package/dist/binding/collection.d.ts +191 -0
- package/dist/binding/collection.d.ts.map +1 -0
- package/dist/binding/collection.js +358 -0
- package/dist/binding/collection.js.map +1 -0
- package/dist/binding/datasource.d.ts +320 -0
- package/dist/binding/datasource.d.ts.map +1 -0
- package/dist/binding/datasource.js +556 -0
- package/dist/binding/datasource.js.map +1 -0
- package/dist/binding/engine.d.ts +66 -0
- package/dist/binding/engine.d.ts.map +1 -0
- package/dist/binding/engine.js +268 -0
- package/dist/binding/engine.js.map +1 -0
- package/dist/binding/expression.d.ts +151 -0
- package/dist/binding/expression.d.ts.map +1 -0
- package/dist/binding/expression.js +787 -0
- package/dist/binding/expression.js.map +1 -0
- package/dist/binding/index.d.ts +20 -0
- package/dist/binding/index.d.ts.map +1 -0
- package/dist/binding/index.js +14 -0
- package/dist/binding/index.js.map +1 -0
- package/dist/binding/two-way.d.ts +150 -0
- package/dist/binding/two-way.d.ts.map +1 -0
- package/dist/binding/two-way.js +462 -0
- package/dist/binding/two-way.js.map +1 -0
- package/dist/binding/types.d.ts +120 -0
- package/dist/binding/types.d.ts.map +1 -0
- package/dist/binding/types.js +9 -0
- package/dist/binding/types.js.map +1 -0
- package/dist/blocks/__test-fixtures__/block-fixtures.d.ts +40 -0
- package/dist/blocks/__test-fixtures__/block-fixtures.d.ts.map +1 -0
- package/dist/blocks/__test-fixtures__/block-fixtures.js +506 -0
- package/dist/blocks/__test-fixtures__/block-fixtures.js.map +1 -0
- package/dist/blocks/component-types.d.ts +82 -0
- package/dist/blocks/component-types.d.ts.map +1 -0
- package/dist/blocks/component-types.js +11 -0
- package/dist/blocks/component-types.js.map +1 -0
- package/dist/blocks/composition-rules.d.ts +169 -0
- package/dist/blocks/composition-rules.d.ts.map +1 -0
- package/dist/blocks/composition-rules.js +391 -0
- package/dist/blocks/composition-rules.js.map +1 -0
- package/dist/blocks/hooks.d.ts +32 -0
- package/dist/blocks/hooks.d.ts.map +1 -0
- package/dist/blocks/hooks.js +42 -0
- package/dist/blocks/hooks.js.map +1 -0
- package/dist/blocks/index.d.ts +16 -0
- package/dist/blocks/index.d.ts.map +1 -0
- package/dist/blocks/index.js +24 -0
- package/dist/blocks/index.js.map +1 -0
- package/dist/blocks/registry.d.ts +85 -0
- package/dist/blocks/registry.d.ts.map +1 -0
- package/dist/blocks/registry.js +136 -0
- package/dist/blocks/registry.js.map +1 -0
- package/dist/blocks/rule-engine.d.ts +132 -0
- package/dist/blocks/rule-engine.d.ts.map +1 -0
- package/dist/blocks/rule-engine.js +321 -0
- package/dist/blocks/rule-engine.js.map +1 -0
- package/dist/blocks/surface-event-context.d.ts +14 -0
- package/dist/blocks/surface-event-context.d.ts.map +1 -0
- package/dist/blocks/surface-event-context.js +14 -0
- package/dist/blocks/surface-event-context.js.map +1 -0
- package/dist/blocks/surface-id-context.d.ts +14 -0
- package/dist/blocks/surface-id-context.d.ts.map +1 -0
- package/dist/blocks/surface-id-context.js +15 -0
- package/dist/blocks/surface-id-context.js.map +1 -0
- package/dist/bus.d.ts +42 -0
- package/dist/bus.d.ts.map +1 -0
- package/dist/bus.js +158 -0
- package/dist/bus.js.map +1 -0
- package/dist/cache/index.d.ts +10 -0
- package/dist/cache/index.d.ts.map +1 -0
- package/dist/cache/index.js +10 -0
- package/dist/cache/index.js.map +1 -0
- package/dist/cache/memory.d.ts +33 -0
- package/dist/cache/memory.d.ts.map +1 -0
- package/dist/cache/memory.js +138 -0
- package/dist/cache/memory.js.map +1 -0
- package/dist/cache/types.d.ts +63 -0
- package/dist/cache/types.d.ts.map +1 -0
- package/dist/cache/types.js +9 -0
- package/dist/cache/types.js.map +1 -0
- package/dist/capability/index.d.ts +73 -0
- package/dist/capability/index.d.ts.map +1 -0
- package/dist/capability/index.js +87 -0
- package/dist/capability/index.js.map +1 -0
- package/dist/capability/kernel-capabilities.d.ts +32 -0
- package/dist/capability/kernel-capabilities.d.ts.map +1 -0
- package/dist/capability/kernel-capabilities.js +36 -0
- package/dist/capability/kernel-capabilities.js.map +1 -0
- package/dist/capability/platform-capabilities.d.ts +72 -0
- package/dist/capability/platform-capabilities.d.ts.map +1 -0
- package/dist/capability/platform-capabilities.js +267 -0
- package/dist/capability/platform-capabilities.js.map +1 -0
- package/dist/capability/type-mapping.d.ts +71 -0
- package/dist/capability/type-mapping.d.ts.map +1 -0
- package/dist/capability/type-mapping.js +107 -0
- package/dist/capability/type-mapping.js.map +1 -0
- package/dist/capability/validation.d.ts +47 -0
- package/dist/capability/validation.d.ts.map +1 -0
- package/dist/capability/validation.js +54 -0
- package/dist/capability/validation.js.map +1 -0
- package/dist/connectors/declared-connector.d.ts +49 -0
- package/dist/connectors/declared-connector.d.ts.map +1 -0
- package/dist/connectors/declared-connector.js +333 -0
- package/dist/connectors/declared-connector.js.map +1 -0
- package/dist/connectors/engine-registry.d.ts +51 -0
- package/dist/connectors/engine-registry.d.ts.map +1 -0
- package/dist/connectors/engine-registry.js +135 -0
- package/dist/connectors/engine-registry.js.map +1 -0
- package/dist/connectors/index.d.ts +15 -0
- package/dist/connectors/index.d.ts.map +1 -0
- package/dist/connectors/index.js +14 -0
- package/dist/connectors/index.js.map +1 -0
- package/dist/connectors/module-loader.d.ts +71 -0
- package/dist/connectors/module-loader.d.ts.map +1 -0
- package/dist/connectors/module-loader.js +143 -0
- package/dist/connectors/module-loader.js.map +1 -0
- package/dist/connectors/types.d.ts +175 -0
- package/dist/connectors/types.d.ts.map +1 -0
- package/dist/connectors/types.js +23 -0
- package/dist/connectors/types.js.map +1 -0
- package/dist/context.d.ts +28 -0
- package/dist/context.d.ts.map +1 -0
- package/dist/context.js +38 -0
- package/dist/context.js.map +1 -0
- package/dist/data/DataCapabilityProvider.d.ts +40 -0
- package/dist/data/DataCapabilityProvider.d.ts.map +1 -0
- package/dist/data/DataCapabilityProvider.js +58 -0
- package/dist/data/DataCapabilityProvider.js.map +1 -0
- package/dist/data/index.d.ts +18 -0
- package/dist/data/index.d.ts.map +1 -0
- package/dist/data/index.js +18 -0
- package/dist/data/index.js.map +1 -0
- package/dist/data/manager.d.ts +41 -0
- package/dist/data/manager.d.ts.map +1 -0
- package/dist/data/manager.js +442 -0
- package/dist/data/manager.js.map +1 -0
- package/dist/data/types.d.ts +219 -0
- package/dist/data/types.d.ts.map +1 -0
- package/dist/data/types.js +2 -0
- package/dist/data/types.js.map +1 -0
- package/dist/entity/aggregate.d.ts +9 -0
- package/dist/entity/aggregate.d.ts.map +1 -0
- package/dist/entity/aggregate.js +24 -0
- package/dist/entity/aggregate.js.map +1 -0
- package/dist/entity/apply-query.d.ts +59 -0
- package/dist/entity/apply-query.d.ts.map +1 -0
- package/dist/entity/apply-query.js +264 -0
- package/dist/entity/apply-query.js.map +1 -0
- package/dist/entity/behavior.d.ts +95 -0
- package/dist/entity/behavior.d.ts.map +1 -0
- package/dist/entity/behavior.js +78 -0
- package/dist/entity/behavior.js.map +1 -0
- package/dist/entity/connector.d.ts +142 -0
- package/dist/entity/connector.d.ts.map +1 -0
- package/dist/entity/connector.js +89 -0
- package/dist/entity/connector.js.map +1 -0
- package/dist/entity/connectors/index.d.ts +13 -0
- package/dist/entity/connectors/index.d.ts.map +1 -0
- package/dist/entity/connectors/index.js +11 -0
- package/dist/entity/connectors/index.js.map +1 -0
- package/dist/entity/connectors/static.d.ts +52 -0
- package/dist/entity/connectors/static.d.ts.map +1 -0
- package/dist/entity/connectors/static.js +245 -0
- package/dist/entity/connectors/static.js.map +1 -0
- package/dist/entity/entity-datasource.d.ts +51 -0
- package/dist/entity/entity-datasource.d.ts.map +1 -0
- package/dist/entity/entity-datasource.js +33 -0
- package/dist/entity/entity-datasource.js.map +1 -0
- package/dist/entity/facade.d.ts +71 -0
- package/dist/entity/facade.d.ts.map +1 -0
- package/dist/entity/facade.js +70 -0
- package/dist/entity/facade.js.map +1 -0
- package/dist/entity/http-connector.d.ts +124 -0
- package/dist/entity/http-connector.d.ts.map +1 -0
- package/dist/entity/http-connector.js +295 -0
- package/dist/entity/http-connector.js.map +1 -0
- package/dist/entity/index.d.ts +39 -0
- package/dist/entity/index.d.ts.map +1 -0
- package/dist/entity/index.js +31 -0
- package/dist/entity/index.js.map +1 -0
- package/dist/entity/postgres-connector.d.ts +65 -0
- package/dist/entity/postgres-connector.d.ts.map +1 -0
- package/dist/entity/postgres-connector.js +239 -0
- package/dist/entity/postgres-connector.js.map +1 -0
- package/dist/entity/registry.d.ts +60 -0
- package/dist/entity/registry.d.ts.map +1 -0
- package/dist/entity/registry.js +90 -0
- package/dist/entity/registry.js.map +1 -0
- package/dist/entity/store.d.ts +67 -0
- package/dist/entity/store.d.ts.map +1 -0
- package/dist/entity/store.js +349 -0
- package/dist/entity/store.js.map +1 -0
- package/dist/entity/types.d.ts +181 -0
- package/dist/entity/types.d.ts.map +1 -0
- package/dist/entity/types.js +10 -0
- package/dist/entity/types.js.map +1 -0
- package/dist/execution-context.d.ts +89 -0
- package/dist/execution-context.d.ts.map +1 -0
- package/dist/execution-context.js +146 -0
- package/dist/execution-context.js.map +1 -0
- package/dist/executor.d.ts +28 -0
- package/dist/executor.d.ts.map +1 -0
- package/dist/executor.js +33 -0
- package/dist/executor.js.map +1 -0
- package/dist/forms/form-entity-bridge.d.ts +95 -0
- package/dist/forms/form-entity-bridge.d.ts.map +1 -0
- package/dist/forms/form-entity-bridge.js +96 -0
- package/dist/forms/form-entity-bridge.js.map +1 -0
- package/dist/forms/form-write-target.d.ts +35 -0
- package/dist/forms/form-write-target.d.ts.map +1 -0
- package/dist/forms/form-write-target.js +81 -0
- package/dist/forms/form-write-target.js.map +1 -0
- package/dist/forms/index.d.ts +23 -0
- package/dist/forms/index.d.ts.map +1 -0
- package/dist/forms/index.js +25 -0
- package/dist/forms/index.js.map +1 -0
- package/dist/forms/named-control-values.d.ts +28 -0
- package/dist/forms/named-control-values.d.ts.map +1 -0
- package/dist/forms/named-control-values.js +42 -0
- package/dist/forms/named-control-values.js.map +1 -0
- package/dist/forms/processor.d.ts +56 -0
- package/dist/forms/processor.d.ts.map +1 -0
- package/dist/forms/processor.js +154 -0
- package/dist/forms/processor.js.map +1 -0
- package/dist/forms/types.d.ts +175 -0
- package/dist/forms/types.d.ts.map +1 -0
- package/dist/forms/types.js +33 -0
- package/dist/forms/types.js.map +1 -0
- package/dist/forms/validator.d.ts +62 -0
- package/dist/forms/validator.d.ts.map +1 -0
- package/dist/forms/validator.js +218 -0
- package/dist/forms/validator.js.map +1 -0
- package/dist/graph/index.d.ts +11 -0
- package/dist/graph/index.d.ts.map +1 -0
- package/dist/graph/index.js +9 -0
- package/dist/graph/index.js.map +1 -0
- package/dist/graph/resolver.d.ts +67 -0
- package/dist/graph/resolver.d.ts.map +1 -0
- package/dist/graph/resolver.js +243 -0
- package/dist/graph/resolver.js.map +1 -0
- package/dist/graph/types.d.ts +126 -0
- package/dist/graph/types.d.ts.map +1 -0
- package/dist/graph/types.js +9 -0
- package/dist/graph/types.js.map +1 -0
- package/dist/hooks/useInstalledAtoms.d.ts +97 -0
- package/dist/hooks/useInstalledAtoms.d.ts.map +1 -0
- package/dist/hooks/useInstalledAtoms.js +92 -0
- package/dist/hooks/useInstalledAtoms.js.map +1 -0
- package/dist/i18n/index.d.ts +16 -0
- package/dist/i18n/index.d.ts.map +1 -0
- package/dist/i18n/index.js +14 -0
- package/dist/i18n/index.js.map +1 -0
- package/dist/i18n/translator.d.ts +77 -0
- package/dist/i18n/translator.d.ts.map +1 -0
- package/dist/i18n/translator.js +357 -0
- package/dist/i18n/translator.js.map +1 -0
- package/dist/i18n/types.d.ts +94 -0
- package/dist/i18n/types.d.ts.map +1 -0
- package/dist/i18n/types.js +9 -0
- package/dist/i18n/types.js.map +1 -0
- package/dist/index.d.ts +65 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +95 -0
- package/dist/index.js.map +1 -0
- package/dist/kernel.d.ts +48 -0
- package/dist/kernel.d.ts.map +1 -0
- package/dist/kernel.js +258 -0
- package/dist/kernel.js.map +1 -0
- package/dist/perf/budget.d.ts +93 -0
- package/dist/perf/budget.d.ts.map +1 -0
- package/dist/perf/budget.js +122 -0
- package/dist/perf/budget.js.map +1 -0
- package/dist/perf/index.d.ts +17 -0
- package/dist/perf/index.d.ts.map +1 -0
- package/dist/perf/index.js +13 -0
- package/dist/perf/index.js.map +1 -0
- package/dist/perf/render-timer.d.ts +91 -0
- package/dist/perf/render-timer.d.ts.map +1 -0
- package/dist/perf/render-timer.js +136 -0
- package/dist/perf/render-timer.js.map +1 -0
- package/dist/perf/reporter.d.ts +127 -0
- package/dist/perf/reporter.d.ts.map +1 -0
- package/dist/perf/reporter.js +241 -0
- package/dist/perf/reporter.js.map +1 -0
- package/dist/perf/web-vitals.d.ts +112 -0
- package/dist/perf/web-vitals.d.ts.map +1 -0
- package/dist/perf/web-vitals.js +268 -0
- package/dist/perf/web-vitals.js.map +1 -0
- package/dist/registry.d.ts +64 -0
- package/dist/registry.d.ts.map +1 -0
- package/dist/registry.js +126 -0
- package/dist/registry.js.map +1 -0
- package/dist/render/BehaviorSurfaceProvider.d.ts +66 -0
- package/dist/render/BehaviorSurfaceProvider.d.ts.map +1 -0
- package/dist/render/BehaviorSurfaceProvider.js +185 -0
- package/dist/render/BehaviorSurfaceProvider.js.map +1 -0
- package/dist/render/BlockErrorBoundary.d.ts +27 -0
- package/dist/render/BlockErrorBoundary.d.ts.map +1 -0
- package/dist/render/BlockErrorBoundary.js +41 -0
- package/dist/render/BlockErrorBoundary.js.map +1 -0
- package/dist/render/DataBoundSurfaceRenderer.d.ts +79 -0
- package/dist/render/DataBoundSurfaceRenderer.d.ts.map +1 -0
- package/dist/render/DataBoundSurfaceRenderer.js +998 -0
- package/dist/render/DataBoundSurfaceRenderer.js.map +1 -0
- package/dist/render/DynamicBlockWrapper.d.ts +24 -0
- package/dist/render/DynamicBlockWrapper.d.ts.map +1 -0
- package/dist/render/DynamicBlockWrapper.js +117 -0
- package/dist/render/DynamicBlockWrapper.js.map +1 -0
- package/dist/render/appearance-resolver.d.ts +51 -0
- package/dist/render/appearance-resolver.d.ts.map +1 -0
- package/dist/render/appearance-resolver.js +78 -0
- package/dist/render/appearance-resolver.js.map +1 -0
- package/dist/render/capability-gate.d.ts +70 -0
- package/dist/render/capability-gate.d.ts.map +1 -0
- package/dist/render/capability-gate.js +94 -0
- package/dist/render/capability-gate.js.map +1 -0
- package/dist/render/conditional-states-css.d.ts +42 -0
- package/dist/render/conditional-states-css.d.ts.map +1 -0
- package/dist/render/conditional-states-css.js +82 -0
- package/dist/render/conditional-states-css.js.map +1 -0
- package/dist/render/connections-context.d.ts +32 -0
- package/dist/render/connections-context.d.ts.map +1 -0
- package/dist/render/connections-context.js +34 -0
- package/dist/render/connections-context.js.map +1 -0
- package/dist/render/dark-theme-css.d.ts +37 -0
- package/dist/render/dark-theme-css.d.ts.map +1 -0
- package/dist/render/dark-theme-css.js +67 -0
- package/dist/render/dark-theme-css.js.map +1 -0
- package/dist/render/data-binding-types.d.ts +192 -0
- package/dist/render/data-binding-types.d.ts.map +1 -0
- package/dist/render/data-binding-types.js +11 -0
- package/dist/render/data-binding-types.js.map +1 -0
- package/dist/render/data-cache.d.ts +31 -0
- package/dist/render/data-cache.d.ts.map +1 -0
- package/dist/render/data-cache.js +37 -0
- package/dist/render/data-cache.js.map +1 -0
- package/dist/render/derive-dark-theme.d.ts +18 -0
- package/dist/render/derive-dark-theme.d.ts.map +1 -0
- package/dist/render/derive-dark-theme.js +18 -0
- package/dist/render/derive-dark-theme.js.map +1 -0
- package/dist/render/dynamic-artifact-context.d.ts +78 -0
- package/dist/render/dynamic-artifact-context.d.ts.map +1 -0
- package/dist/render/dynamic-artifact-context.js +89 -0
- package/dist/render/dynamic-artifact-context.js.map +1 -0
- package/dist/render/dynamic-block-loader.d.ts +81 -0
- package/dist/render/dynamic-block-loader.d.ts.map +1 -0
- package/dist/render/dynamic-block-loader.js +197 -0
- package/dist/render/dynamic-block-loader.js.map +1 -0
- package/dist/render/endpoint.d.ts +19 -0
- package/dist/render/endpoint.d.ts.map +1 -0
- package/dist/render/endpoint.js +109 -0
- package/dist/render/endpoint.js.map +1 -0
- package/dist/render/entity-facade-context.d.ts +35 -0
- package/dist/render/entity-facade-context.d.ts.map +1 -0
- package/dist/render/entity-facade-context.js +37 -0
- package/dist/render/entity-facade-context.js.map +1 -0
- package/dist/render/group-states-css.d.ts +42 -0
- package/dist/render/group-states-css.d.ts.map +1 -0
- package/dist/render/group-states-css.js +73 -0
- package/dist/render/group-states-css.js.map +1 -0
- package/dist/render/hooks/useSurfaceEvents.d.ts +9 -0
- package/dist/render/hooks/useSurfaceEvents.d.ts.map +1 -0
- package/dist/render/hooks/useSurfaceEvents.js +9 -0
- package/dist/render/hooks/useSurfaceEvents.js.map +1 -0
- package/dist/render/hooks/useSurfaceId.d.ts +9 -0
- package/dist/render/hooks/useSurfaceId.d.ts.map +1 -0
- package/dist/render/hooks/useSurfaceId.js +9 -0
- package/dist/render/hooks/useSurfaceId.js.map +1 -0
- package/dist/render/index.d.ts +49 -0
- package/dist/render/index.d.ts.map +1 -0
- package/dist/render/index.js +61 -0
- package/dist/render/index.js.map +1 -0
- package/dist/render/interaction-rule-engine.d.ts +13 -0
- package/dist/render/interaction-rule-engine.d.ts.map +1 -0
- package/dist/render/interaction-rule-engine.js +47 -0
- package/dist/render/interaction-rule-engine.js.map +1 -0
- package/dist/render/keyframes-css.d.ts +32 -0
- package/dist/render/keyframes-css.d.ts.map +1 -0
- package/dist/render/keyframes-css.js +44 -0
- package/dist/render/keyframes-css.js.map +1 -0
- package/dist/render/query-state.d.ts +4 -0
- package/dist/render/query-state.d.ts.map +1 -0
- package/dist/render/query-state.js +70 -0
- package/dist/render/query-state.js.map +1 -0
- package/dist/render/renderer.d.ts +45 -0
- package/dist/render/renderer.d.ts.map +1 -0
- package/dist/render/renderer.js +937 -0
- package/dist/render/renderer.js.map +1 -0
- package/dist/render/resolve-expressions.d.ts +38 -0
- package/dist/render/resolve-expressions.d.ts.map +1 -0
- package/dist/render/resolve-expressions.js +309 -0
- package/dist/render/resolve-expressions.js.map +1 -0
- package/dist/render/responsive-style-css.d.ts +43 -0
- package/dist/render/responsive-style-css.d.ts.map +1 -0
- package/dist/render/responsive-style-css.js +123 -0
- package/dist/render/responsive-style-css.js.map +1 -0
- package/dist/render/responsive.d.ts +50 -0
- package/dist/render/responsive.d.ts.map +1 -0
- package/dist/render/responsive.js +99 -0
- package/dist/render/responsive.js.map +1 -0
- package/dist/render/scoped-css.d.ts +72 -0
- package/dist/render/scoped-css.d.ts.map +1 -0
- package/dist/render/scoped-css.js +102 -0
- package/dist/render/scoped-css.js.map +1 -0
- package/dist/render/shell-selection.d.ts +70 -0
- package/dist/render/shell-selection.d.ts.map +1 -0
- package/dist/render/shell-selection.js +117 -0
- package/dist/render/shell-selection.js.map +1 -0
- package/dist/render/states-css.d.ts +33 -0
- package/dist/render/states-css.d.ts.map +1 -0
- package/dist/render/states-css.js +63 -0
- package/dist/render/states-css.js.map +1 -0
- package/dist/render/surface-data-context.d.ts +19 -0
- package/dist/render/surface-data-context.d.ts.map +1 -0
- package/dist/render/surface-data-context.js +21 -0
- package/dist/render/surface-data-context.js.map +1 -0
- package/dist/render/surface-event-bus.d.ts +20 -0
- package/dist/render/surface-event-bus.d.ts.map +1 -0
- package/dist/render/surface-event-bus.js +68 -0
- package/dist/render/surface-event-bus.js.map +1 -0
- package/dist/render/surface-event-context.d.ts +12 -0
- package/dist/render/surface-event-context.d.ts.map +1 -0
- package/dist/render/surface-event-context.js +12 -0
- package/dist/render/surface-event-context.js.map +1 -0
- package/dist/render/surface-id-context.d.ts +9 -0
- package/dist/render/surface-id-context.d.ts.map +1 -0
- package/dist/render/surface-id-context.js +9 -0
- package/dist/render/surface-id-context.js.map +1 -0
- package/dist/render/theme-utils.d.ts +15 -0
- package/dist/render/theme-utils.d.ts.map +1 -0
- package/dist/render/theme-utils.js +15 -0
- package/dist/render/theme-utils.js.map +1 -0
- package/dist/render/types.d.ts +283 -0
- package/dist/render/types.d.ts.map +1 -0
- package/dist/render/types.js +9 -0
- package/dist/render/types.js.map +1 -0
- package/dist/render/visibility-css.d.ts +43 -0
- package/dist/render/visibility-css.d.ts.map +1 -0
- package/dist/render/visibility-css.js +119 -0
- package/dist/render/visibility-css.js.map +1 -0
- package/dist/render/width-scope.d.ts +35 -0
- package/dist/render/width-scope.d.ts.map +1 -0
- package/dist/render/width-scope.js +44 -0
- package/dist/render/width-scope.js.map +1 -0
- package/dist/render/write-only-sources.d.ts +34 -0
- package/dist/render/write-only-sources.d.ts.map +1 -0
- package/dist/render/write-only-sources.js +99 -0
- package/dist/render/write-only-sources.js.map +1 -0
- package/dist/routing/index.d.ts +15 -0
- package/dist/routing/index.d.ts.map +1 -0
- package/dist/routing/index.js +15 -0
- package/dist/routing/index.js.map +1 -0
- package/dist/routing/router.d.ts +43 -0
- package/dist/routing/router.d.ts.map +1 -0
- package/dist/routing/router.js +218 -0
- package/dist/routing/router.js.map +1 -0
- package/dist/routing/types.d.ts +125 -0
- package/dist/routing/types.d.ts.map +1 -0
- package/dist/routing/types.js +9 -0
- package/dist/routing/types.js.map +1 -0
- package/dist/seo/generator.d.ts +40 -0
- package/dist/seo/generator.d.ts.map +1 -0
- package/dist/seo/generator.js +236 -0
- package/dist/seo/generator.js.map +1 -0
- package/dist/seo/index.d.ts +15 -0
- package/dist/seo/index.d.ts.map +1 -0
- package/dist/seo/index.js +15 -0
- package/dist/seo/index.js.map +1 -0
- package/dist/seo/types.d.ts +182 -0
- package/dist/seo/types.d.ts.map +1 -0
- package/dist/seo/types.js +9 -0
- package/dist/seo/types.js.map +1 -0
- package/dist/state/index.d.ts +16 -0
- package/dist/state/index.d.ts.map +1 -0
- package/dist/state/index.js +16 -0
- package/dist/state/index.js.map +1 -0
- package/dist/state/manager.d.ts +34 -0
- package/dist/state/manager.d.ts.map +1 -0
- package/dist/state/manager.js +81 -0
- package/dist/state/manager.js.map +1 -0
- package/dist/state/store.d.ts +41 -0
- package/dist/state/store.d.ts.map +1 -0
- package/dist/state/store.js +145 -0
- package/dist/state/store.js.map +1 -0
- package/dist/state/types.d.ts +108 -0
- package/dist/state/types.d.ts.map +1 -0
- package/dist/state/types.js +9 -0
- package/dist/state/types.js.map +1 -0
- package/dist/surface/expression.d.ts +66 -0
- package/dist/surface/expression.d.ts.map +1 -0
- package/dist/surface/expression.js +179 -0
- package/dist/surface/expression.js.map +1 -0
- package/dist/surface/index.d.ts +33 -0
- package/dist/surface/index.d.ts.map +1 -0
- package/dist/surface/index.js +25 -0
- package/dist/surface/index.js.map +1 -0
- package/dist/surface/interpreter.d.ts +97 -0
- package/dist/surface/interpreter.d.ts.map +1 -0
- package/dist/surface/interpreter.js +231 -0
- package/dist/surface/interpreter.js.map +1 -0
- package/dist/surface/layout.d.ts +55 -0
- package/dist/surface/layout.d.ts.map +1 -0
- package/dist/surface/layout.js +288 -0
- package/dist/surface/layout.js.map +1 -0
- package/dist/surface/output.d.ts +91 -0
- package/dist/surface/output.d.ts.map +1 -0
- package/dist/surface/output.js +104 -0
- package/dist/surface/output.js.map +1 -0
- package/dist/surface/primitives.d.ts +181 -0
- package/dist/surface/primitives.d.ts.map +1 -0
- package/dist/surface/primitives.js +339 -0
- package/dist/surface/primitives.js.map +1 -0
- package/dist/surface/renderer.d.ts +97 -0
- package/dist/surface/renderer.d.ts.map +1 -0
- package/dist/surface/renderer.js +190 -0
- package/dist/surface/renderer.js.map +1 -0
- package/dist/surface/schemas.d.ts +182 -0
- package/dist/surface/schemas.d.ts.map +1 -0
- package/dist/surface/schemas.js +142 -0
- package/dist/surface/schemas.js.map +1 -0
- package/dist/surface/transforms.d.ts +145 -0
- package/dist/surface/transforms.d.ts.map +1 -0
- package/dist/surface/transforms.js +120 -0
- package/dist/surface/transforms.js.map +1 -0
- package/dist/surface/types.d.ts +161 -0
- package/dist/surface/types.d.ts.map +1 -0
- package/dist/surface/types.js +51 -0
- package/dist/surface/types.js.map +1 -0
- package/dist/surface/validation.d.ts +124 -0
- package/dist/surface/validation.d.ts.map +1 -0
- package/dist/surface/validation.js +147 -0
- package/dist/surface/validation.js.map +1 -0
- package/dist/validator.d.ts +56 -0
- package/dist/validator.d.ts.map +1 -0
- package/dist/validator.js +100 -0
- package/dist/validator.js.map +1 -0
- package/package.json +105 -3
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Responsive Rendering Utilities
|
|
3
|
+
*
|
|
4
|
+
* Viewport-aware layout resolution for runtime rendering.
|
|
5
|
+
* Re-exports pure functions from @pwfabric/core and provides
|
|
6
|
+
* React-specific viewport hook.
|
|
7
|
+
*
|
|
8
|
+
* @module @pwfabric/runtime/render/responsive
|
|
9
|
+
*/
|
|
10
|
+
import * as React from 'react';
|
|
11
|
+
import type { BlockLayout, BreakpointName } from '@pwfabric/core';
|
|
12
|
+
export { resolveResponsiveValue, resolveSpanAtBreakpoint, getColumnsAtBreakpoint, getBreakpointForWidth, } from '@pwfabric/core';
|
|
13
|
+
/**
|
|
14
|
+
* Resolve the complete block layout at a given viewport breakpoint.
|
|
15
|
+
* Returns span, offset, order, and hidden values.
|
|
16
|
+
*/
|
|
17
|
+
export declare function resolveBlockLayout(layout: BlockLayout, viewport: BreakpointName): {
|
|
18
|
+
span: number;
|
|
19
|
+
offset: number | undefined;
|
|
20
|
+
order: number | undefined;
|
|
21
|
+
hidden: boolean | undefined;
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* Surface root — carries NO MEASURE.
|
|
25
|
+
*
|
|
26
|
+
* If the root carried both the 12-column grid and
|
|
27
|
+
* `maxWidth: var(--pw-layout-container-max-width)` + `margin: 0 auto`,
|
|
28
|
+
* persistent chrome would sit inside the centred box too (a persistent rail
|
|
29
|
+
* would start well in from the screen edge, as part of the narrower container).
|
|
30
|
+
*
|
|
31
|
+
* The measure goes to the inner container through `resolveMeasureStyle`;
|
|
32
|
+
* the root is flow only.
|
|
33
|
+
*/
|
|
34
|
+
export declare function resolveSurfaceRootStyle(gap?: string | number, padding?: string | number): React.CSSProperties;
|
|
35
|
+
/**
|
|
36
|
+
* Measured container — the wrapper of `container`-scoped blocks.
|
|
37
|
+
*
|
|
38
|
+
* The 12-column grid and `containerMaxWidth` live HERE. Blocks that declare
|
|
39
|
+
* `widthScope:'viewport'` are drawn as SIBLINGS of this container, not its
|
|
40
|
+
* children — the escape is placement, not a CSS trick (see render/width-scope.ts).
|
|
41
|
+
*/
|
|
42
|
+
export declare function resolveMeasureStyle(viewport: BreakpointName, gap?: string | number, padding?: string | number, containerMaxWidth?: string): React.CSSProperties;
|
|
43
|
+
/**
|
|
44
|
+
* React hook that returns the current viewport breakpoint.
|
|
45
|
+
* Uses matchMedia for efficient viewport detection.
|
|
46
|
+
*
|
|
47
|
+
* Returns 'lg' on server (SSR fallback).
|
|
48
|
+
*/
|
|
49
|
+
export declare function useViewport(): BreakpointName;
|
|
50
|
+
//# sourceMappingURL=responsive.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"responsive.d.ts","sourceRoot":"","sources":["../../src/render/responsive.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAUjE,OAAO,EACL,sBAAsB,EACtB,uBAAuB,EACvB,sBAAsB,EACtB,qBAAqB,GACtB,MAAM,gBAAgB,CAAA;AAMvB;;;GAGG;AACH,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,WAAW,EACnB,QAAQ,EAAE,cAAc,GACvB;IACD,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,MAAM,GAAG,SAAS,CAAA;IAC1B,KAAK,EAAE,MAAM,GAAG,SAAS,CAAA;IACzB,MAAM,EAAE,OAAO,GAAG,SAAS,CAAA;CAC5B,CAOA;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,uBAAuB,CACrC,GAAG,GAAE,MAAM,GAAG,MAAW,EACzB,OAAO,GAAE,MAAM,GAAG,MAAU,GAC3B,KAAK,CAAC,aAAa,CAOrB;AAED;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CACjC,QAAQ,EAAE,cAAc,EACxB,GAAG,GAAE,MAAM,GAAG,MAAW,EACzB,OAAO,GAAE,MAAM,GAAG,MAAW,EAC7B,iBAAiB,SAAyC,GACzD,KAAK,CAAC,aAAa,CAWrB;AAMD;;;;;GAKG;AACH,wBAAgB,WAAW,IAAI,cAAc,CA2B5C"}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Responsive Rendering Utilities
|
|
3
|
+
*
|
|
4
|
+
* Viewport-aware layout resolution for runtime rendering.
|
|
5
|
+
* Re-exports pure functions from @pwfabric/core and provides
|
|
6
|
+
* React-specific viewport hook.
|
|
7
|
+
*
|
|
8
|
+
* @module @pwfabric/runtime/render/responsive
|
|
9
|
+
*/
|
|
10
|
+
import * as React from 'react';
|
|
11
|
+
import { BREAKPOINTS, resolveSpanAtBreakpoint, resolveResponsiveValue, getColumnsAtBreakpoint, getBreakpointForWidth, } from '@pwfabric/core';
|
|
12
|
+
// Re-export pure functions for convenience
|
|
13
|
+
export { resolveResponsiveValue, resolveSpanAtBreakpoint, getColumnsAtBreakpoint, getBreakpointForWidth, } from '@pwfabric/core';
|
|
14
|
+
// ============================================================
|
|
15
|
+
// BLOCK STYLE RESOLUTION
|
|
16
|
+
// ============================================================
|
|
17
|
+
/**
|
|
18
|
+
* Resolve the complete block layout at a given viewport breakpoint.
|
|
19
|
+
* Returns span, offset, order, and hidden values.
|
|
20
|
+
*/
|
|
21
|
+
export function resolveBlockLayout(layout, viewport) {
|
|
22
|
+
return {
|
|
23
|
+
span: resolveSpanAtBreakpoint(layout, viewport),
|
|
24
|
+
offset: resolveResponsiveValue(layout.offset, viewport),
|
|
25
|
+
order: resolveResponsiveValue(layout.order, viewport),
|
|
26
|
+
hidden: resolveResponsiveValue(layout.hidden, viewport),
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Surface root — carries NO MEASURE.
|
|
31
|
+
*
|
|
32
|
+
* If the root carried both the 12-column grid and
|
|
33
|
+
* `maxWidth: var(--pw-layout-container-max-width)` + `margin: 0 auto`,
|
|
34
|
+
* persistent chrome would sit inside the centred box too (a persistent rail
|
|
35
|
+
* would start well in from the screen edge, as part of the narrower container).
|
|
36
|
+
*
|
|
37
|
+
* The measure goes to the inner container through `resolveMeasureStyle`;
|
|
38
|
+
* the root is flow only.
|
|
39
|
+
*/
|
|
40
|
+
export function resolveSurfaceRootStyle(gap = 16, padding = 0) {
|
|
41
|
+
return {
|
|
42
|
+
display: 'flex',
|
|
43
|
+
flexDirection: 'column',
|
|
44
|
+
gap: typeof gap === 'number' ? `${gap}px` : gap,
|
|
45
|
+
padding: typeof padding === 'number' ? `${padding}px` : padding,
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Measured container — the wrapper of `container`-scoped blocks.
|
|
50
|
+
*
|
|
51
|
+
* The 12-column grid and `containerMaxWidth` live HERE. Blocks that declare
|
|
52
|
+
* `widthScope:'viewport'` are drawn as SIBLINGS of this container, not its
|
|
53
|
+
* children — the escape is placement, not a CSS trick (see render/width-scope.ts).
|
|
54
|
+
*/
|
|
55
|
+
export function resolveMeasureStyle(viewport, gap = 16, padding = 24, containerMaxWidth = 'var(--pw-layout-container-max-width)') {
|
|
56
|
+
const columns = getColumnsAtBreakpoint(viewport);
|
|
57
|
+
return {
|
|
58
|
+
display: 'grid',
|
|
59
|
+
gridTemplateColumns: `repeat(${columns}, 1fr)`,
|
|
60
|
+
gap: typeof gap === 'number' ? `${gap}px` : gap,
|
|
61
|
+
padding: typeof padding === 'number' ? `${padding}px` : padding,
|
|
62
|
+
maxWidth: containerMaxWidth,
|
|
63
|
+
margin: '0 auto',
|
|
64
|
+
width: '100%',
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
// ============================================================
|
|
68
|
+
// VIEWPORT HOOK
|
|
69
|
+
// ============================================================
|
|
70
|
+
/**
|
|
71
|
+
* React hook that returns the current viewport breakpoint.
|
|
72
|
+
* Uses matchMedia for efficient viewport detection.
|
|
73
|
+
*
|
|
74
|
+
* Returns 'lg' on server (SSR fallback).
|
|
75
|
+
*/
|
|
76
|
+
export function useViewport() {
|
|
77
|
+
const [breakpoint, setBreakpoint] = React.useState('lg');
|
|
78
|
+
React.useEffect(() => {
|
|
79
|
+
// Set initial value from current window width
|
|
80
|
+
setBreakpoint(getBreakpointForWidth(window.innerWidth));
|
|
81
|
+
// Create media query listeners for each breakpoint transition
|
|
82
|
+
const listeners = [];
|
|
83
|
+
for (const bp of BREAKPOINTS) {
|
|
84
|
+
const mql = window.matchMedia(`(min-width: ${bp.minWidth}px)`);
|
|
85
|
+
const handler = () => {
|
|
86
|
+
setBreakpoint(getBreakpointForWidth(window.innerWidth));
|
|
87
|
+
};
|
|
88
|
+
mql.addEventListener('change', handler);
|
|
89
|
+
listeners.push({ mql, handler });
|
|
90
|
+
}
|
|
91
|
+
return () => {
|
|
92
|
+
for (const { mql, handler } of listeners) {
|
|
93
|
+
mql.removeEventListener('change', handler);
|
|
94
|
+
}
|
|
95
|
+
};
|
|
96
|
+
}, []);
|
|
97
|
+
return breakpoint;
|
|
98
|
+
}
|
|
99
|
+
//# sourceMappingURL=responsive.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"responsive.js","sourceRoot":"","sources":["../../src/render/responsive.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared helpers for the scoped per-block CSS collectors.
|
|
3
|
+
*
|
|
4
|
+
* The runtime emits several kinds of scoped `<style>` rules keyed by a block's
|
|
5
|
+
* stable `data-block-id` (visibility / interaction-states / responsive-style /
|
|
6
|
+
* conditional-states / group-states). They all share the SAME primitives:
|
|
7
|
+
*
|
|
8
|
+
* - `cssEscapeId(id)` — conservative attribute-value escaper for block ids.
|
|
9
|
+
* - `camelToKebab(prop)` — CSS camelCase property name → kebab-case.
|
|
10
|
+
* - `blockSelector(id)` — `[data-pw-surface] [data-block-id="<escaped>"]`,
|
|
11
|
+
* the scoped base selector every rule attaches to.
|
|
12
|
+
* - `collectScopedCss(blocks, perBlockFn)` — walk the block tree (including
|
|
13
|
+
* children) and concatenate each block's CSS as
|
|
14
|
+
* produced by `perBlockFn(block)`.
|
|
15
|
+
*
|
|
16
|
+
* Centralising these keeps the per-collector files focused on their own
|
|
17
|
+
* selector/declaration semantics and guarantees byte-identical output across
|
|
18
|
+
* the family (the same escaper, the same selector string, the same walk order).
|
|
19
|
+
*
|
|
20
|
+
* @module @pwfabric/runtime/render/scoped-css
|
|
21
|
+
*/
|
|
22
|
+
import type { Block } from '@pwfabric/core';
|
|
23
|
+
/** Conservative CSS attribute-selector value escaper (block ids are slugs, but be safe). */
|
|
24
|
+
export declare function cssEscapeId(id: string): string;
|
|
25
|
+
/** camelCase CSS property → kebab-case (e.g. `backgroundColor` → `background-color`). */
|
|
26
|
+
export declare function camelToKebab(prop: string): string;
|
|
27
|
+
/** The bare `[data-block-id="<escaped-id>"]` attribute selector (no surface scope). */
|
|
28
|
+
export declare function blockIdAttr(id: string): string;
|
|
29
|
+
/**
|
|
30
|
+
* The surface-root selector a scoped rule hangs off.
|
|
31
|
+
*
|
|
32
|
+
* With a `surfaceId` this is `[data-pw-surface="<id>"]` — scope carried by the
|
|
33
|
+
* attribute's VALUE, not merely its presence. That matters because the embed
|
|
34
|
+
* autoloader hydrates EVERY `[data-pw-surface]` element in a document, so a host
|
|
35
|
+
* page can hold several surfaces at once; a value-less selector makes each
|
|
36
|
+
* surface's rules apply to all of them, and the last one in document order wins.
|
|
37
|
+
*
|
|
38
|
+
* Without a `surfaceId` it degrades to the historical `[data-pw-surface]`, which
|
|
39
|
+
* is correct for rules whose content is identical for every surface (the base
|
|
40
|
+
* CSS) and for unit tests that render a single surface.
|
|
41
|
+
*/
|
|
42
|
+
export declare function surfaceScope(surfaceId?: string): string;
|
|
43
|
+
/**
|
|
44
|
+
* The scoped base selector a per-block rule attaches to:
|
|
45
|
+
* `[data-pw-surface="<sid>"] [data-block-id="<escaped-id>"]`. Scoped under the
|
|
46
|
+
* surface root so a rule can never leak to the host page — and, when the surface
|
|
47
|
+
* id is supplied, never to a SIBLING surface that happens to reuse a block id.
|
|
48
|
+
*/
|
|
49
|
+
export declare function blockSelector(id: string, surfaceId?: string): string;
|
|
50
|
+
/**
|
|
51
|
+
* Walk a surface block tree (depth-first, children after their parent — the
|
|
52
|
+
* order all collectors used) and concatenate the per-block CSS produced by
|
|
53
|
+
* `perBlockFn(block)`. Blocks for which `perBlockFn` returns '' contribute zero
|
|
54
|
+
* bytes, so existing surfaces stay byte-identical.
|
|
55
|
+
*/
|
|
56
|
+
export declare function collectScopedCss(blocks: readonly Block[], perBlockFn: (block: Block) => string): string;
|
|
57
|
+
/**
|
|
58
|
+
* Style keys HOISTED to the wrapper — kept here so the renderer and the
|
|
59
|
+
* responsive CSS generator see the SAME list.
|
|
60
|
+
*
|
|
61
|
+
* This list is a RULE: these keys apply to the outer wrapper, not the
|
|
62
|
+
* component root. For flat values the renderer hoists them; for responsive
|
|
63
|
+
* values the value leaves the inline style entirely and lands in CSS, so the
|
|
64
|
+
* same rule has to be expressed on the selector side — otherwise the rule
|
|
65
|
+
* matches both the wrapper and the root and the value is applied TWICE
|
|
66
|
+
* (`marginTop:'-40%'` would move content by both -335px and -256px).
|
|
67
|
+
*/
|
|
68
|
+
export declare const FLEX_HOIST_KEYS: readonly ["flex", "flexGrow", "flexShrink", "flexBasis"];
|
|
69
|
+
export declare const LAYOUT_HOIST_KEYS: readonly ["margin", "marginTop", "marginRight", "marginBottom", "marginLeft", "maxWidth", "minWidth", "flex", "flexGrow", "flexShrink", "flexBasis"];
|
|
70
|
+
/** The attribute that tells the wrapper from the component root (the same marker states-css uses). */
|
|
71
|
+
export declare const WRAPPER_ATTR = "[data-block-wrapper]";
|
|
72
|
+
//# sourceMappingURL=scoped-css.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scoped-css.d.ts","sourceRoot":"","sources":["../../src/render/scoped-css.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAA;AAE3C,4FAA4F;AAC5F,wBAAgB,WAAW,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,CAE9C;AAED,yFAAyF;AACzF,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEjD;AAED,uFAAuF;AACvF,wBAAgB,WAAW,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,CAE9C;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,YAAY,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,CAEvD;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,EAAE,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,CAEpE;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAC9B,MAAM,EAAE,SAAS,KAAK,EAAE,EACxB,UAAU,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,MAAM,GACnC,MAAM,CAUR;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,eAAe,0DAA2D,CAAA;AAEvF,eAAO,MAAM,iBAAiB,sJASpB,CAAA;AAEV,sGAAsG;AACtG,eAAO,MAAM,YAAY,yBAAyB,CAAA"}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared helpers for the scoped per-block CSS collectors.
|
|
3
|
+
*
|
|
4
|
+
* The runtime emits several kinds of scoped `<style>` rules keyed by a block's
|
|
5
|
+
* stable `data-block-id` (visibility / interaction-states / responsive-style /
|
|
6
|
+
* conditional-states / group-states). They all share the SAME primitives:
|
|
7
|
+
*
|
|
8
|
+
* - `cssEscapeId(id)` — conservative attribute-value escaper for block ids.
|
|
9
|
+
* - `camelToKebab(prop)` — CSS camelCase property name → kebab-case.
|
|
10
|
+
* - `blockSelector(id)` — `[data-pw-surface] [data-block-id="<escaped>"]`,
|
|
11
|
+
* the scoped base selector every rule attaches to.
|
|
12
|
+
* - `collectScopedCss(blocks, perBlockFn)` — walk the block tree (including
|
|
13
|
+
* children) and concatenate each block's CSS as
|
|
14
|
+
* produced by `perBlockFn(block)`.
|
|
15
|
+
*
|
|
16
|
+
* Centralising these keeps the per-collector files focused on their own
|
|
17
|
+
* selector/declaration semantics and guarantees byte-identical output across
|
|
18
|
+
* the family (the same escaper, the same selector string, the same walk order).
|
|
19
|
+
*
|
|
20
|
+
* @module @pwfabric/runtime/render/scoped-css
|
|
21
|
+
*/
|
|
22
|
+
/** Conservative CSS attribute-selector value escaper (block ids are slugs, but be safe). */
|
|
23
|
+
export function cssEscapeId(id) {
|
|
24
|
+
return id.replace(/["\\]/g, '\\$&');
|
|
25
|
+
}
|
|
26
|
+
/** camelCase CSS property → kebab-case (e.g. `backgroundColor` → `background-color`). */
|
|
27
|
+
export function camelToKebab(prop) {
|
|
28
|
+
return prop.replace(/[A-Z]/g, (m) => `-${m.toLowerCase()}`);
|
|
29
|
+
}
|
|
30
|
+
/** The bare `[data-block-id="<escaped-id>"]` attribute selector (no surface scope). */
|
|
31
|
+
export function blockIdAttr(id) {
|
|
32
|
+
return `[data-block-id="${cssEscapeId(id)}"]`;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* The surface-root selector a scoped rule hangs off.
|
|
36
|
+
*
|
|
37
|
+
* With a `surfaceId` this is `[data-pw-surface="<id>"]` — scope carried by the
|
|
38
|
+
* attribute's VALUE, not merely its presence. That matters because the embed
|
|
39
|
+
* autoloader hydrates EVERY `[data-pw-surface]` element in a document, so a host
|
|
40
|
+
* page can hold several surfaces at once; a value-less selector makes each
|
|
41
|
+
* surface's rules apply to all of them, and the last one in document order wins.
|
|
42
|
+
*
|
|
43
|
+
* Without a `surfaceId` it degrades to the historical `[data-pw-surface]`, which
|
|
44
|
+
* is correct for rules whose content is identical for every surface (the base
|
|
45
|
+
* CSS) and for unit tests that render a single surface.
|
|
46
|
+
*/
|
|
47
|
+
export function surfaceScope(surfaceId) {
|
|
48
|
+
return surfaceId ? `[data-pw-surface="${cssEscapeId(surfaceId)}"]` : '[data-pw-surface]';
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* The scoped base selector a per-block rule attaches to:
|
|
52
|
+
* `[data-pw-surface="<sid>"] [data-block-id="<escaped-id>"]`. Scoped under the
|
|
53
|
+
* surface root so a rule can never leak to the host page — and, when the surface
|
|
54
|
+
* id is supplied, never to a SIBLING surface that happens to reuse a block id.
|
|
55
|
+
*/
|
|
56
|
+
export function blockSelector(id, surfaceId) {
|
|
57
|
+
return `${surfaceScope(surfaceId)} ${blockIdAttr(id)}`;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Walk a surface block tree (depth-first, children after their parent — the
|
|
61
|
+
* order all collectors used) and concatenate the per-block CSS produced by
|
|
62
|
+
* `perBlockFn(block)`. Blocks for which `perBlockFn` returns '' contribute zero
|
|
63
|
+
* bytes, so existing surfaces stay byte-identical.
|
|
64
|
+
*/
|
|
65
|
+
export function collectScopedCss(blocks, perBlockFn) {
|
|
66
|
+
let css = '';
|
|
67
|
+
const walk = (block) => {
|
|
68
|
+
css += perBlockFn(block);
|
|
69
|
+
if (block.children) {
|
|
70
|
+
for (const child of block.children)
|
|
71
|
+
walk(child);
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
for (const block of blocks)
|
|
75
|
+
walk(block);
|
|
76
|
+
return css;
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Style keys HOISTED to the wrapper — kept here so the renderer and the
|
|
80
|
+
* responsive CSS generator see the SAME list.
|
|
81
|
+
*
|
|
82
|
+
* This list is a RULE: these keys apply to the outer wrapper, not the
|
|
83
|
+
* component root. For flat values the renderer hoists them; for responsive
|
|
84
|
+
* values the value leaves the inline style entirely and lands in CSS, so the
|
|
85
|
+
* same rule has to be expressed on the selector side — otherwise the rule
|
|
86
|
+
* matches both the wrapper and the root and the value is applied TWICE
|
|
87
|
+
* (`marginTop:'-40%'` would move content by both -335px and -256px).
|
|
88
|
+
*/
|
|
89
|
+
export const FLEX_HOIST_KEYS = ['flex', 'flexGrow', 'flexShrink', 'flexBasis'];
|
|
90
|
+
export const LAYOUT_HOIST_KEYS = [
|
|
91
|
+
'margin',
|
|
92
|
+
'marginTop',
|
|
93
|
+
'marginRight',
|
|
94
|
+
'marginBottom',
|
|
95
|
+
'marginLeft',
|
|
96
|
+
'maxWidth',
|
|
97
|
+
'minWidth',
|
|
98
|
+
...FLEX_HOIST_KEYS,
|
|
99
|
+
];
|
|
100
|
+
/** The attribute that tells the wrapper from the component root (the same marker states-css uses). */
|
|
101
|
+
export const WRAPPER_ATTR = '[data-block-wrapper]';
|
|
102
|
+
//# sourceMappingURL=scoped-css.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scoped-css.js","sourceRoot":"","sources":["../../src/render/scoped-css.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAIH,4FAA4F;AAC5F,MAAM,UAAU,WAAW,CAAC,EAAU;IACpC,OAAO,EAAE,CAAC,OAAO,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAA;AACrC,CAAC;AAED,yFAAyF;AACzF,MAAM,UAAU,YAAY,CAAC,IAAY;IACvC,OAAO,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC,WAAW,EAAE,EAAE,CAAC,CAAA;AAC7D,CAAC;AAED,uFAAuF;AACvF,MAAM,UAAU,WAAW,CAAC,EAAU;IACpC,OAAO,mBAAmB,WAAW,CAAC,EAAE,CAAC,IAAI,CAAA;AAC/C,CAAC;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,YAAY,CAAC,SAAkB;IAC7C,OAAO,SAAS,CAAC,CAAC,CAAC,qBAAqB,WAAW,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,mBAAmB,CAAA;AAC1F,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,aAAa,CAAC,EAAU,EAAE,SAAkB;IAC1D,OAAO,GAAG,YAAY,CAAC,SAAS,CAAC,IAAI,WAAW,CAAC,EAAE,CAAC,EAAE,CAAA;AACxD,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,gBAAgB,CAC9B,MAAwB,EACxB,UAAoC;IAEpC,IAAI,GAAG,GAAG,EAAE,CAAA;IACZ,MAAM,IAAI,GAAG,CAAC,KAAY,EAAQ,EAAE;QAClC,GAAG,IAAI,UAAU,CAAC,KAAK,CAAC,CAAA;QACxB,IAAI,KAAK,CAAC,QAAQ,EAAE,CAAC;YACnB,KAAK,MAAM,KAAK,IAAI,KAAK,CAAC,QAAQ;gBAAE,IAAI,CAAC,KAAK,CAAC,CAAA;QACjD,CAAC;IACH,CAAC,CAAA;IACD,KAAK,MAAM,KAAK,IAAI,MAAM;QAAE,IAAI,CAAC,KAAK,CAAC,CAAA;IACvC,OAAO,GAAG,CAAA;AACZ,CAAC;AAED;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,MAAM,EAAE,UAAU,EAAE,YAAY,EAAE,WAAW,CAAU,CAAA;AAEvF,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,QAAQ;IACR,WAAW;IACX,aAAa;IACb,cAAc;IACd,YAAY;IACZ,UAAU;IACV,UAAU;IACV,GAAG,eAAe;CACV,CAAA;AAEV,sGAAsG;AACtG,MAAM,CAAC,MAAM,YAAY,GAAG,sBAAsB,CAAA"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shell selection — the state a SPLIT shell runs on.
|
|
3
|
+
*
|
|
4
|
+
* WHY THIS IS IN THE RUNTIME AND NOT IN THE BLOCK. A split surface (list on the
|
|
5
|
+
* left, detail on the right) has exactly one piece of state: which item is
|
|
6
|
+
* selected. Kept inside the block it is invisible to everything else — the URL
|
|
7
|
+
* does not move, so the page cannot be linked to, the browser Back button does
|
|
8
|
+
* nothing, and a second block on the same surface (a header showing the
|
|
9
|
+
* selected record's title, a toolbar acting on it) has no way to read it.
|
|
10
|
+
*
|
|
11
|
+
* So selection is a SURFACE-level fact with a URL projection:
|
|
12
|
+
*
|
|
13
|
+
* ?<key>=<itemId>
|
|
14
|
+
*
|
|
15
|
+
* and this module is the single place that reads and writes it.
|
|
16
|
+
*
|
|
17
|
+
* THE URL IS THE SOURCE OF TRUTH when syncing is on. React state mirrors it
|
|
18
|
+
* rather than the other way round, which is what makes a pasted link, a Back
|
|
19
|
+
* press and a click on the list all land in the same place — three paths, one
|
|
20
|
+
* rule.
|
|
21
|
+
*
|
|
22
|
+
* INERT HOSTS DO NOT NAVIGATE. An editor or preview canvas renders the same
|
|
23
|
+
* block with `interactionMode: 'inert'`; there the selection stays in memory and
|
|
24
|
+
* the host's own URL is never touched. That mirrors the existing rule for blocks
|
|
25
|
+
* that navigate or write data.
|
|
26
|
+
*/
|
|
27
|
+
import * as React from 'react';
|
|
28
|
+
type Listener = () => void;
|
|
29
|
+
export interface ShellSelectionStore {
|
|
30
|
+
/** Current selection for a key, or undefined when nothing is selected. */
|
|
31
|
+
get(key: string): string | undefined;
|
|
32
|
+
/** Select an item. Writes the URL when this store syncs. */
|
|
33
|
+
set(key: string, id: string | undefined): void;
|
|
34
|
+
subscribe(listener: Listener): () => void;
|
|
35
|
+
readonly syncUrl: boolean;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Create a selection store.
|
|
39
|
+
*
|
|
40
|
+
* `syncUrl: false` gives an in-memory store with identical semantics — the same
|
|
41
|
+
* hook, the same cross-block sharing, no address-bar side effects.
|
|
42
|
+
*/
|
|
43
|
+
export declare function createShellSelectionStore(syncUrl: boolean): ShellSelectionStore;
|
|
44
|
+
export declare const ShellSelectionContext: React.Context<ShellSelectionStore | null>;
|
|
45
|
+
export interface ShellSelectionProviderProps {
|
|
46
|
+
/** Off for editor/preview canvases — selection works, the address bar does not move. */
|
|
47
|
+
readonly syncUrl?: boolean;
|
|
48
|
+
readonly children: React.ReactNode;
|
|
49
|
+
}
|
|
50
|
+
export declare function ShellSelectionProvider({ syncUrl, children, }: ShellSelectionProviderProps): React.ReactElement;
|
|
51
|
+
export interface ShellSelectionOptions {
|
|
52
|
+
/** Selected when the URL carries nothing — normally the first list item. */
|
|
53
|
+
readonly fallback?: string | undefined;
|
|
54
|
+
/**
|
|
55
|
+
* Override the provider. A block rendered inert must not move the host's URL
|
|
56
|
+
* even when the surrounding surface is live.
|
|
57
|
+
*/
|
|
58
|
+
readonly syncUrl?: boolean;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Read and write the shell selection for `key`.
|
|
62
|
+
*
|
|
63
|
+
* Works with OR without a provider: with no `ShellSelectionProvider` above it,
|
|
64
|
+
* the hook makes its own store, so a block dropped into a bare React tree keeps
|
|
65
|
+
* behaving instead of throwing. The provider only widens the scope — one store
|
|
66
|
+
* per surface means two blocks reading the same key see the same value.
|
|
67
|
+
*/
|
|
68
|
+
export declare function useShellSelection(key: string, options?: ShellSelectionOptions): readonly [string | undefined, (id: string | undefined) => void];
|
|
69
|
+
export {};
|
|
70
|
+
//# sourceMappingURL=shell-selection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shell-selection.d.ts","sourceRoot":"","sources":["../../src/render/shell-selection.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAM9B,KAAK,QAAQ,GAAG,MAAM,IAAI,CAAA;AAE1B,MAAM,WAAW,mBAAmB;IAClC,0EAA0E;IAC1E,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAA;IACpC,4DAA4D;IAC5D,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,CAAA;IAC9C,SAAS,CAAC,QAAQ,EAAE,QAAQ,GAAG,MAAM,IAAI,CAAA;IACzC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAA;CAC1B;AAQD;;;;;GAKG;AACH,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,OAAO,GAAG,mBAAmB,CAuC/E;AAMD,eAAO,MAAM,qBAAqB,2CAAwD,CAAA;AAE1F,MAAM,WAAW,2BAA2B;IAC1C,wFAAwF;IACxF,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAA;IAC1B,QAAQ,CAAC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CACnC;AAED,wBAAgB,sBAAsB,CAAC,EACrC,OAAc,EACd,QAAQ,GACT,EAAE,2BAA2B,GAAG,KAAK,CAAC,YAAY,CAGlD;AAMD,MAAM,WAAW,qBAAqB;IACpC,4EAA4E;IAC5E,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IACtC;;;OAGG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAA;CAC3B;AAED;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAC/B,GAAG,EAAE,MAAM,EACX,OAAO,GAAE,qBAA0B,GAClC,SAAS,CAAC,MAAM,GAAG,SAAS,EAAE,CAAC,EAAE,EAAE,MAAM,GAAG,SAAS,KAAK,IAAI,CAAC,CA4BjE"}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* Shell selection — the state a SPLIT shell runs on.
|
|
4
|
+
*
|
|
5
|
+
* WHY THIS IS IN THE RUNTIME AND NOT IN THE BLOCK. A split surface (list on the
|
|
6
|
+
* left, detail on the right) has exactly one piece of state: which item is
|
|
7
|
+
* selected. Kept inside the block it is invisible to everything else — the URL
|
|
8
|
+
* does not move, so the page cannot be linked to, the browser Back button does
|
|
9
|
+
* nothing, and a second block on the same surface (a header showing the
|
|
10
|
+
* selected record's title, a toolbar acting on it) has no way to read it.
|
|
11
|
+
*
|
|
12
|
+
* So selection is a SURFACE-level fact with a URL projection:
|
|
13
|
+
*
|
|
14
|
+
* ?<key>=<itemId>
|
|
15
|
+
*
|
|
16
|
+
* and this module is the single place that reads and writes it.
|
|
17
|
+
*
|
|
18
|
+
* THE URL IS THE SOURCE OF TRUTH when syncing is on. React state mirrors it
|
|
19
|
+
* rather than the other way round, which is what makes a pasted link, a Back
|
|
20
|
+
* press and a click on the list all land in the same place — three paths, one
|
|
21
|
+
* rule.
|
|
22
|
+
*
|
|
23
|
+
* INERT HOSTS DO NOT NAVIGATE. An editor or preview canvas renders the same
|
|
24
|
+
* block with `interactionMode: 'inert'`; there the selection stays in memory and
|
|
25
|
+
* the host's own URL is never touched. That mirrors the existing rule for blocks
|
|
26
|
+
* that navigate or write data.
|
|
27
|
+
*/
|
|
28
|
+
import * as React from 'react';
|
|
29
|
+
function readFromUrl(key) {
|
|
30
|
+
if (typeof window === 'undefined')
|
|
31
|
+
return undefined;
|
|
32
|
+
const value = new URLSearchParams(window.location.search).get(key);
|
|
33
|
+
return value === null || value === '' ? undefined : value;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Create a selection store.
|
|
37
|
+
*
|
|
38
|
+
* `syncUrl: false` gives an in-memory store with identical semantics — the same
|
|
39
|
+
* hook, the same cross-block sharing, no address-bar side effects.
|
|
40
|
+
*/
|
|
41
|
+
export function createShellSelectionStore(syncUrl) {
|
|
42
|
+
const memory = new Map();
|
|
43
|
+
const listeners = new Set();
|
|
44
|
+
const emit = () => {
|
|
45
|
+
for (const l of [...listeners])
|
|
46
|
+
l();
|
|
47
|
+
};
|
|
48
|
+
if (syncUrl && typeof window !== 'undefined') {
|
|
49
|
+
window.addEventListener('popstate', emit);
|
|
50
|
+
}
|
|
51
|
+
return {
|
|
52
|
+
syncUrl,
|
|
53
|
+
get(key) {
|
|
54
|
+
// URL first: a Back press changes the address without going through
|
|
55
|
+
// `set`, so reading memory would serve a stale value.
|
|
56
|
+
if (syncUrl)
|
|
57
|
+
return readFromUrl(key) ?? memory.get(key);
|
|
58
|
+
return memory.get(key);
|
|
59
|
+
},
|
|
60
|
+
set(key, id) {
|
|
61
|
+
memory.set(key, id);
|
|
62
|
+
if (syncUrl && typeof window !== 'undefined') {
|
|
63
|
+
const url = new URL(window.location.href);
|
|
64
|
+
if (id === undefined)
|
|
65
|
+
url.searchParams.delete(key);
|
|
66
|
+
else
|
|
67
|
+
url.searchParams.set(key, id);
|
|
68
|
+
// pushState, not replaceState: selecting a record is a navigation the
|
|
69
|
+
// user expects Back to undo. That is the whole point of putting it in
|
|
70
|
+
// the URL rather than in a ref.
|
|
71
|
+
if (url.href !== window.location.href)
|
|
72
|
+
window.history.pushState({}, '', url);
|
|
73
|
+
}
|
|
74
|
+
emit();
|
|
75
|
+
},
|
|
76
|
+
subscribe(listener) {
|
|
77
|
+
listeners.add(listener);
|
|
78
|
+
return () => {
|
|
79
|
+
listeners.delete(listener);
|
|
80
|
+
};
|
|
81
|
+
},
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
// ============================================================
|
|
85
|
+
// CONTEXT
|
|
86
|
+
// ============================================================
|
|
87
|
+
export const ShellSelectionContext = React.createContext(null);
|
|
88
|
+
export function ShellSelectionProvider({ syncUrl = true, children, }) {
|
|
89
|
+
const store = React.useMemo(() => createShellSelectionStore(syncUrl), [syncUrl]);
|
|
90
|
+
return _jsx(ShellSelectionContext.Provider, { value: store, children: children });
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Read and write the shell selection for `key`.
|
|
94
|
+
*
|
|
95
|
+
* Works with OR without a provider: with no `ShellSelectionProvider` above it,
|
|
96
|
+
* the hook makes its own store, so a block dropped into a bare React tree keeps
|
|
97
|
+
* behaving instead of throwing. The provider only widens the scope — one store
|
|
98
|
+
* per surface means two blocks reading the same key see the same value.
|
|
99
|
+
*/
|
|
100
|
+
export function useShellSelection(key, options = {}) {
|
|
101
|
+
const provided = React.useContext(ShellSelectionContext);
|
|
102
|
+
const wantsSync = options.syncUrl ?? provided?.syncUrl ?? true;
|
|
103
|
+
// A provider whose sync setting disagrees with this block's is not usable —
|
|
104
|
+
// an inert block inside a live surface must not push history.
|
|
105
|
+
const usable = provided && provided.syncUrl === wantsSync ? provided : null;
|
|
106
|
+
const fallbackStore = React.useMemo(() => (usable ? null : createShellSelectionStore(wantsSync)), [usable, wantsSync]);
|
|
107
|
+
const store = usable ?? fallbackStore;
|
|
108
|
+
const subscribe = React.useCallback((l) => store.subscribe(l), [store]);
|
|
109
|
+
const selected = React.useSyncExternalStore(subscribe, () => store.get(key),
|
|
110
|
+
// Server render: no URL, no memory — the fallback is the honest answer.
|
|
111
|
+
() => undefined);
|
|
112
|
+
const select = React.useCallback((id) => {
|
|
113
|
+
store.set(key, id);
|
|
114
|
+
}, [store, key]);
|
|
115
|
+
return [selected ?? options.fallback, select];
|
|
116
|
+
}
|
|
117
|
+
//# sourceMappingURL=shell-selection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shell-selection.js","sourceRoot":"","sources":["../../src/render/shell-selection.tsx"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Interaction-state CSS generation (token-driven hover/active/focus).
|
|
3
|
+
*
|
|
4
|
+
* `block.style` sits inline and cannot express pseudo-classes, so per-state
|
|
5
|
+
* styling lives in `block.states` and the runtime emits scoped CSS rules —
|
|
6
|
+
* keyed by the block's `data-block-id` — into the surface's generated
|
|
7
|
+
* `<style>` (the SAME mechanism `layout.hideOn`/`showOn` use). For a block
|
|
8
|
+
* with `states`, the runtime emits:
|
|
9
|
+
*
|
|
10
|
+
* `[data-pw-surface] [data-block-id="<id>"]:hover{ … }`
|
|
11
|
+
* `[data-pw-surface] [data-block-id="<id>"]:active{ … }`
|
|
12
|
+
* `[data-pw-surface] [data-block-id="<id>"]:focus-visible{ … }`
|
|
13
|
+
*
|
|
14
|
+
* Keys are CSS camelCase property names (converted to kebab-case); values pass
|
|
15
|
+
* through untouched, so `var(--pw-color-primary-subtle)` works. Blocks without
|
|
16
|
+
* `states` emit zero bytes so existing surfaces are byte-identical.
|
|
17
|
+
*
|
|
18
|
+
* @module @pwfabric/runtime/render/states-css
|
|
19
|
+
*/
|
|
20
|
+
import type { Block } from '@pwfabric/core';
|
|
21
|
+
/**
|
|
22
|
+
* Emit the scoped CSS rule(s) for a single block's interaction states. Targets
|
|
23
|
+
* `[data-block-id="<id>"]<pseudo>` scoped under the surface root so it cannot
|
|
24
|
+
* leak to the host page. Returns '' when the block declares no non-empty state.
|
|
25
|
+
*/
|
|
26
|
+
export declare function blockStatesCss(blockId: string, states: NonNullable<Block['states']>, surfaceId?: string): string;
|
|
27
|
+
/**
|
|
28
|
+
* Walk a surface block tree and concatenate the per-block interaction-state CSS
|
|
29
|
+
* for every block declaring `states`. Blocks without `states` are skipped (zero
|
|
30
|
+
* bytes emitted) so existing surfaces are byte-identical.
|
|
31
|
+
*/
|
|
32
|
+
export declare function collectStatesCss(blocks: readonly Block[], surfaceId?: string): string;
|
|
33
|
+
//# sourceMappingURL=states-css.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"states-css.d.ts","sourceRoot":"","sources":["../../src/render/states-css.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAA;AAiB3C;;;;GAIG;AACH,wBAAgB,cAAc,CAC5B,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,WAAW,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,EACpC,SAAS,CAAC,EAAE,MAAM,GACjB,MAAM,CAeR;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,SAAS,KAAK,EAAE,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,CAIrF"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Interaction-state CSS generation (token-driven hover/active/focus).
|
|
3
|
+
*
|
|
4
|
+
* `block.style` sits inline and cannot express pseudo-classes, so per-state
|
|
5
|
+
* styling lives in `block.states` and the runtime emits scoped CSS rules —
|
|
6
|
+
* keyed by the block's `data-block-id` — into the surface's generated
|
|
7
|
+
* `<style>` (the SAME mechanism `layout.hideOn`/`showOn` use). For a block
|
|
8
|
+
* with `states`, the runtime emits:
|
|
9
|
+
*
|
|
10
|
+
* `[data-pw-surface] [data-block-id="<id>"]:hover{ … }`
|
|
11
|
+
* `[data-pw-surface] [data-block-id="<id>"]:active{ … }`
|
|
12
|
+
* `[data-pw-surface] [data-block-id="<id>"]:focus-visible{ … }`
|
|
13
|
+
*
|
|
14
|
+
* Keys are CSS camelCase property names (converted to kebab-case); values pass
|
|
15
|
+
* through untouched, so `var(--pw-color-primary-subtle)` works. Blocks without
|
|
16
|
+
* `states` emit zero bytes so existing surfaces are byte-identical.
|
|
17
|
+
*
|
|
18
|
+
* @module @pwfabric/runtime/render/states-css
|
|
19
|
+
*/
|
|
20
|
+
import { blockSelector, camelToKebab, collectScopedCss } from './scoped-css.js';
|
|
21
|
+
/** Pseudo-state → selector suffix. `focus` maps to `:focus-visible`. */
|
|
22
|
+
const STATE_SELECTORS = {
|
|
23
|
+
hover: ':hover',
|
|
24
|
+
active: ':active',
|
|
25
|
+
focus: ':focus-visible',
|
|
26
|
+
};
|
|
27
|
+
/** Serialize a camelCase decl record to `prop:value;…` (values pass through). */
|
|
28
|
+
function declsToCss(decls) {
|
|
29
|
+
return Object.entries(decls)
|
|
30
|
+
.map(([prop, value]) => `${camelToKebab(prop)}:${value}`)
|
|
31
|
+
.join(';');
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Emit the scoped CSS rule(s) for a single block's interaction states. Targets
|
|
35
|
+
* `[data-block-id="<id>"]<pseudo>` scoped under the surface root so it cannot
|
|
36
|
+
* leak to the host page. Returns '' when the block declares no non-empty state.
|
|
37
|
+
*/
|
|
38
|
+
export function blockStatesCss(blockId, states, surfaceId) {
|
|
39
|
+
const selector = blockSelector(blockId, surfaceId);
|
|
40
|
+
let css = '';
|
|
41
|
+
for (const key of ['hover', 'active', 'focus']) {
|
|
42
|
+
const decls = states[key];
|
|
43
|
+
if (!decls || Object.keys(decls).length === 0)
|
|
44
|
+
continue;
|
|
45
|
+
// `data-block-id` lives on BOTH the renderer wrapper and the component root
|
|
46
|
+
// (the wrapper keeps `data-block-wrapper`). A state rule keyed on the bare
|
|
47
|
+
// id therefore fired twice: the square wrapper took the hover box-shadow
|
|
48
|
+
// (square corners bleeding out from under a rounded card) and transforms
|
|
49
|
+
// compounded. Exclude the wrapper — visual states belong to the styled
|
|
50
|
+
// component root only.
|
|
51
|
+
css += `${selector}:not([data-block-wrapper])${STATE_SELECTORS[key]}{${declsToCss(decls)}}`;
|
|
52
|
+
}
|
|
53
|
+
return css;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Walk a surface block tree and concatenate the per-block interaction-state CSS
|
|
57
|
+
* for every block declaring `states`. Blocks without `states` are skipped (zero
|
|
58
|
+
* bytes emitted) so existing surfaces are byte-identical.
|
|
59
|
+
*/
|
|
60
|
+
export function collectStatesCss(blocks, surfaceId) {
|
|
61
|
+
return collectScopedCss(blocks, (block) => block.states ? blockStatesCss(block.id, block.states, surfaceId) : '');
|
|
62
|
+
}
|
|
63
|
+
//# sourceMappingURL=states-css.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"states-css.js","sourceRoot":"","sources":["../../src/render/states-css.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;AAE/E,wEAAwE;AACxE,MAAM,eAAe,GAAiD;IACpE,KAAK,EAAE,QAAQ;IACf,MAAM,EAAE,SAAS;IACjB,KAAK,EAAE,gBAAgB;CACxB,CAAA;AAED,iFAAiF;AACjF,SAAS,UAAU,CAAC,KAAuC;IACzD,OAAO,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC;SACzB,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,GAAG,YAAY,CAAC,IAAI,CAAC,IAAI,KAAK,EAAE,CAAC;SACxD,IAAI,CAAC,GAAG,CAAC,CAAA;AACd,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,cAAc,CAC5B,OAAe,EACf,MAAoC,EACpC,SAAkB;IAElB,MAAM,QAAQ,GAAG,aAAa,CAAC,OAAO,EAAE,SAAS,CAAC,CAAA;IAClD,IAAI,GAAG,GAAG,EAAE,CAAA;IACZ,KAAK,MAAM,GAAG,IAAI,CAAC,OAAO,EAAE,QAAQ,EAAE,OAAO,CAAU,EAAE,CAAC;QACxD,MAAM,KAAK,GAAG,MAAM,CAAC,GAAG,CAAC,CAAA;QACzB,IAAI,CAAC,KAAK,IAAI,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,KAAK,CAAC;YAAE,SAAQ;QACvD,4EAA4E;QAC5E,2EAA2E;QAC3E,yEAAyE;QACzE,yEAAyE;QACzE,uEAAuE;QACvE,uBAAuB;QACvB,GAAG,IAAI,GAAG,QAAQ,6BAA6B,eAAe,CAAC,GAAG,CAAC,IAAI,UAAU,CAAC,KAAK,CAAC,GAAG,CAAA;IAC7F,CAAC;IACD,OAAO,GAAG,CAAA;AACZ,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,gBAAgB,CAAC,MAAwB,EAAE,SAAkB;IAC3E,OAAO,gBAAgB,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE,EAAE,CACxC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,EAAE,KAAK,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC,EAAE,CACtE,CAAA;AACH,CAAC"}
|