@aglyn/aglyn 1.0.0-beta.143
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/README.md +11 -0
- package/package.json +66 -0
- package/src/index.d.ts +25 -0
- package/src/index.js +26 -0
- package/src/index.js.map +1 -0
- package/src/lib/aglyn.d.ts +31 -0
- package/src/lib/aglyn.js +114 -0
- package/src/lib/aglyn.js.map +1 -0
- package/src/lib/app-utils/abuse-report.d.ts +193 -0
- package/src/lib/app-utils/abuse-report.js +321 -0
- package/src/lib/app-utils/abuse-report.js.map +1 -0
- package/src/lib/app-utils/accept-negotiation.d.ts +129 -0
- package/src/lib/app-utils/accept-negotiation.js +266 -0
- package/src/lib/app-utils/accept-negotiation.js.map +1 -0
- package/src/lib/app-utils/account-emails.d.ts +263 -0
- package/src/lib/app-utils/account-emails.js +264 -0
- package/src/lib/app-utils/account-emails.js.map +1 -0
- package/src/lib/app-utils/actions.d.ts +717 -0
- package/src/lib/app-utils/actions.js +1031 -0
- package/src/lib/app-utils/actions.js.map +1 -0
- package/src/lib/app-utils/activity-presenter.d.ts +152 -0
- package/src/lib/app-utils/activity-presenter.js +326 -0
- package/src/lib/app-utils/activity-presenter.js.map +1 -0
- package/src/lib/app-utils/advertising-tag-mounts.d.ts +133 -0
- package/src/lib/app-utils/advertising-tag-mounts.js +118 -0
- package/src/lib/app-utils/advertising-tag-mounts.js.map +1 -0
- package/src/lib/app-utils/advertising-tags.d.ts +307 -0
- package/src/lib/app-utils/advertising-tags.js +525 -0
- package/src/lib/app-utils/advertising-tags.js.map +1 -0
- package/src/lib/app-utils/agent-api-catalog.d.ts +94 -0
- package/src/lib/app-utils/agent-api-catalog.js +106 -0
- package/src/lib/app-utils/agent-api-catalog.js.map +1 -0
- package/src/lib/app-utils/agent-openapi.d.ts +103 -0
- package/src/lib/app-utils/agent-openapi.js +1128 -0
- package/src/lib/app-utils/agent-openapi.js.map +1 -0
- package/src/lib/app-utils/analytics-beacon.d.ts +154 -0
- package/src/lib/app-utils/analytics-beacon.js +152 -0
- package/src/lib/app-utils/analytics-beacon.js.map +1 -0
- package/src/lib/app-utils/analytics-environment.d.ts +133 -0
- package/src/lib/app-utils/analytics-environment.js +152 -0
- package/src/lib/app-utils/analytics-environment.js.map +1 -0
- package/src/lib/app-utils/analytics-events.d.ts +744 -0
- package/src/lib/app-utils/analytics-events.js +650 -0
- package/src/lib/app-utils/analytics-events.js.map +1 -0
- package/src/lib/app-utils/analytics-link-clicks.d.ts +102 -0
- package/src/lib/app-utils/analytics-link-clicks.js +267 -0
- package/src/lib/app-utils/analytics-link-clicks.js.map +1 -0
- package/src/lib/app-utils/analytics-path-key.d.ts +46 -0
- package/src/lib/app-utils/analytics-path-key.js +46 -0
- package/src/lib/app-utils/analytics-path-key.js.map +1 -0
- package/src/lib/app-utils/api-adapter.d.ts +47 -0
- package/src/lib/app-utils/api-adapter.js +367 -0
- package/src/lib/app-utils/api-adapter.js.map +1 -0
- package/src/lib/app-utils/api-idempotency.d.ts +169 -0
- package/src/lib/app-utils/api-idempotency.js +213 -0
- package/src/lib/app-utils/api-idempotency.js.map +1 -0
- package/src/lib/app-utils/api-plugins.d.ts +210 -0
- package/src/lib/app-utils/api-plugins.js +221 -0
- package/src/lib/app-utils/api-plugins.js.map +1 -0
- package/src/lib/app-utils/assist-credits.d.ts +482 -0
- package/src/lib/app-utils/assist-credits.js +509 -0
- package/src/lib/app-utils/assist-credits.js.map +1 -0
- package/src/lib/app-utils/attribution-attribute.d.ts +34 -0
- package/src/lib/app-utils/attribution-attribute.js +34 -0
- package/src/lib/app-utils/attribution-attribute.js.map +1 -0
- package/src/lib/app-utils/attribution-guard.d.ts +130 -0
- package/src/lib/app-utils/attribution-guard.js +410 -0
- package/src/lib/app-utils/attribution-guard.js.map +1 -0
- package/src/lib/app-utils/author-css.d.ts +123 -0
- package/src/lib/app-utils/author-css.js +275 -0
- package/src/lib/app-utils/author-css.js.map +1 -0
- package/src/lib/app-utils/author-html-markdown.d.ts +31 -0
- package/src/lib/app-utils/author-html-markdown.js +497 -0
- package/src/lib/app-utils/author-html-markdown.js.map +1 -0
- package/src/lib/app-utils/author-html.d.ts +135 -0
- package/src/lib/app-utils/author-html.js +1037 -0
- package/src/lib/app-utils/author-html.js.map +1 -0
- package/src/lib/app-utils/automation-placeholders.d.ts +72 -0
- package/src/lib/app-utils/automation-placeholders.js +207 -0
- package/src/lib/app-utils/automation-placeholders.js.map +1 -0
- package/src/lib/app-utils/bandwidth-cap.d.ts +183 -0
- package/src/lib/app-utils/bandwidth-cap.js +193 -0
- package/src/lib/app-utils/bandwidth-cap.js.map +1 -0
- package/src/lib/app-utils/binding-token-catalog.d.ts +82 -0
- package/src/lib/app-utils/binding-token-catalog.js +293 -0
- package/src/lib/app-utils/binding-token-catalog.js.map +1 -0
- package/src/lib/app-utils/binding-tokens.d.ts +157 -0
- package/src/lib/app-utils/binding-tokens.js +251 -0
- package/src/lib/app-utils/binding-tokens.js.map +1 -0
- package/src/lib/app-utils/breadcrumb-json-ld.d.ts +57 -0
- package/src/lib/app-utils/breadcrumb-json-ld.js +67 -0
- package/src/lib/app-utils/breadcrumb-json-ld.js.map +1 -0
- package/src/lib/app-utils/campaign-attribution.d.ts +117 -0
- package/src/lib/app-utils/campaign-attribution.js +162 -0
- package/src/lib/app-utils/campaign-attribution.js.map +1 -0
- package/src/lib/app-utils/campaign-forwarding.d.ts +220 -0
- package/src/lib/app-utils/campaign-forwarding.js +332 -0
- package/src/lib/app-utils/campaign-forwarding.js.map +1 -0
- package/src/lib/app-utils/campaign-membership.d.ts +109 -0
- package/src/lib/app-utils/campaign-membership.js +176 -0
- package/src/lib/app-utils/campaign-membership.js.map +1 -0
- package/src/lib/app-utils/campaign-touch.d.ts +206 -0
- package/src/lib/app-utils/campaign-touch.js +326 -0
- package/src/lib/app-utils/campaign-touch.js.map +1 -0
- package/src/lib/app-utils/child-contract-compose.d.ts +28 -0
- package/src/lib/app-utils/child-contract-compose.js +140 -0
- package/src/lib/app-utils/child-contract-compose.js.map +1 -0
- package/src/lib/app-utils/child-contract.d.ts +129 -0
- package/src/lib/app-utils/child-contract.js +153 -0
- package/src/lib/app-utils/child-contract.js.map +1 -0
- package/src/lib/app-utils/collection-delete.d.ts +113 -0
- package/src/lib/app-utils/collection-delete.js +120 -0
- package/src/lib/app-utils/collection-delete.js.map +1 -0
- package/src/lib/app-utils/collection-entries.d.ts +833 -0
- package/src/lib/app-utils/collection-entries.js +1285 -0
- package/src/lib/app-utils/collection-entries.js.map +1 -0
- package/src/lib/app-utils/collection-entry-date.d.ts +129 -0
- package/src/lib/app-utils/collection-entry-date.js +183 -0
- package/src/lib/app-utils/collection-entry-date.js.map +1 -0
- package/src/lib/app-utils/collection-kind.d.ts +55 -0
- package/src/lib/app-utils/collection-kind.js +69 -0
- package/src/lib/app-utils/collection-kind.js.map +1 -0
- package/src/lib/app-utils/collection-slug.d.ts +79 -0
- package/src/lib/app-utils/collection-slug.js +70 -0
- package/src/lib/app-utils/collection-slug.js.map +1 -0
- package/src/lib/app-utils/compose-layout-nodes.d.ts +147 -0
- package/src/lib/app-utils/compose-layout-nodes.js +261 -0
- package/src/lib/app-utils/compose-layout-nodes.js.map +1 -0
- package/src/lib/app-utils/compose-layout-props.d.ts +71 -0
- package/src/lib/app-utils/compose-layout-props.js +61 -0
- package/src/lib/app-utils/compose-layout-props.js.map +1 -0
- package/src/lib/app-utils/compose-reusable-components.d.ts +504 -0
- package/src/lib/app-utils/compose-reusable-components.js +1366 -0
- package/src/lib/app-utils/compose-reusable-components.js.map +1 -0
- package/src/lib/app-utils/compress.d.ts +35 -0
- package/src/lib/app-utils/compress.js +38 -0
- package/src/lib/app-utils/compress.js.map +1 -0
- package/src/lib/app-utils/consent-banner-ui.d.ts +226 -0
- package/src/lib/app-utils/consent-banner-ui.js +583 -0
- package/src/lib/app-utils/consent-banner-ui.js.map +1 -0
- package/src/lib/app-utils/consent-groups.d.ts +189 -0
- package/src/lib/app-utils/consent-groups.js +219 -0
- package/src/lib/app-utils/consent-groups.js.map +1 -0
- package/src/lib/app-utils/consent-preferences-dialog.d.ts +58 -0
- package/src/lib/app-utils/consent-preferences-dialog.js +106 -0
- package/src/lib/app-utils/consent-preferences-dialog.js.map +1 -0
- package/src/lib/app-utils/console-record-links.d.ts +163 -0
- package/src/lib/app-utils/console-record-links.js +178 -0
- package/src/lib/app-utils/console-record-links.js.map +1 -0
- package/src/lib/app-utils/console-routes.d.ts +658 -0
- package/src/lib/app-utils/console-routes.js +489 -0
- package/src/lib/app-utils/console-routes.js.map +1 -0
- package/src/lib/app-utils/console-widget-slot-context.d.ts +46 -0
- package/src/lib/app-utils/console-widget-slot-context.js +23 -0
- package/src/lib/app-utils/console-widget-slot-context.js.map +1 -0
- package/src/lib/app-utils/contact-custom-fields.d.ts +191 -0
- package/src/lib/app-utils/contact-custom-fields.js +349 -0
- package/src/lib/app-utils/contact-custom-fields.js.map +1 -0
- package/src/lib/app-utils/contact-holder.d.ts +52 -0
- package/src/lib/app-utils/contact-holder.js +98 -0
- package/src/lib/app-utils/contact-holder.js.map +1 -0
- package/src/lib/app-utils/contact-merge.d.ts +136 -0
- package/src/lib/app-utils/contact-merge.js +379 -0
- package/src/lib/app-utils/contact-merge.js.map +1 -0
- package/src/lib/app-utils/contacts.d.ts +554 -0
- package/src/lib/app-utils/contacts.js +401 -0
- package/src/lib/app-utils/contacts.js.map +1 -0
- package/src/lib/app-utils/content-author-profile.d.ts +68 -0
- package/src/lib/app-utils/content-author-profile.js +118 -0
- package/src/lib/app-utils/content-author-profile.js.map +1 -0
- package/src/lib/app-utils/content-authors.d.ts +662 -0
- package/src/lib/app-utils/content-authors.js +771 -0
- package/src/lib/app-utils/content-authors.js.map +1 -0
- package/src/lib/app-utils/content-schema-type.d.ts +81 -0
- package/src/lib/app-utils/content-schema-type.js +87 -0
- package/src/lib/app-utils/content-schema-type.js.map +1 -0
- package/src/lib/app-utils/contexts.d.ts +35 -0
- package/src/lib/app-utils/contexts.js +35 -0
- package/src/lib/app-utils/contexts.js.map +1 -0
- package/src/lib/app-utils/create-resource-uid.d.ts +18 -0
- package/src/lib/app-utils/create-resource-uid.js +23 -0
- package/src/lib/app-utils/create-resource-uid.js.map +1 -0
- package/src/lib/app-utils/crm-booking.d.ts +75 -0
- package/src/lib/app-utils/crm-booking.js +133 -0
- package/src/lib/app-utils/crm-booking.js.map +1 -0
- package/src/lib/app-utils/crm-csv.d.ts +232 -0
- package/src/lib/app-utils/crm-csv.js +432 -0
- package/src/lib/app-utils/crm-csv.js.map +1 -0
- package/src/lib/app-utils/crm-digest.d.ts +179 -0
- package/src/lib/app-utils/crm-digest.js +271 -0
- package/src/lib/app-utils/crm-digest.js.map +1 -0
- package/src/lib/app-utils/crm-email-templates.d.ts +172 -0
- package/src/lib/app-utils/crm-email-templates.js +382 -0
- package/src/lib/app-utils/crm-email-templates.js.map +1 -0
- package/src/lib/app-utils/crm-inbound.d.ts +245 -0
- package/src/lib/app-utils/crm-inbound.js +407 -0
- package/src/lib/app-utils/crm-inbound.js.map +1 -0
- package/src/lib/app-utils/crm-kinds.d.ts +73 -0
- package/src/lib/app-utils/crm-kinds.js +92 -0
- package/src/lib/app-utils/crm-kinds.js.map +1 -0
- package/src/lib/app-utils/crm-next-activity.d.ts +107 -0
- package/src/lib/app-utils/crm-next-activity.js +140 -0
- package/src/lib/app-utils/crm-next-activity.js.map +1 -0
- package/src/lib/app-utils/crm-reports.d.ts +479 -0
- package/src/lib/app-utils/crm-reports.js +680 -0
- package/src/lib/app-utils/crm-reports.js.map +1 -0
- package/src/lib/app-utils/crm-task-reminders.d.ts +129 -0
- package/src/lib/app-utils/crm-task-reminders.js +139 -0
- package/src/lib/app-utils/crm-task-reminders.js.map +1 -0
- package/src/lib/app-utils/crm.d.ts +1546 -0
- package/src/lib/app-utils/crm.js +1814 -0
- package/src/lib/app-utils/crm.js.map +1 -0
- package/src/lib/app-utils/csp-report.d.ts +84 -0
- package/src/lib/app-utils/csp-report.js +177 -0
- package/src/lib/app-utils/csp-report.js.map +1 -0
- package/src/lib/app-utils/csv-import.d.ts +192 -0
- package/src/lib/app-utils/csv-import.js +279 -0
- package/src/lib/app-utils/csv-import.js.map +1 -0
- package/src/lib/app-utils/dataset-csv.d.ts +109 -0
- package/src/lib/app-utils/dataset-csv.js +235 -0
- package/src/lib/app-utils/dataset-csv.js.map +1 -0
- package/src/lib/app-utils/dataset-models.d.ts +194 -0
- package/src/lib/app-utils/dataset-models.js +409 -0
- package/src/lib/app-utils/dataset-models.js.map +1 -0
- package/src/lib/app-utils/dataset-query.d.ts +57 -0
- package/src/lib/app-utils/dataset-query.js +126 -0
- package/src/lib/app-utils/dataset-query.js.map +1 -0
- package/src/lib/app-utils/datasets.d.ts +136 -0
- package/src/lib/app-utils/datasets.js +177 -0
- package/src/lib/app-utils/datasets.js.map +1 -0
- package/src/lib/app-utils/decompress.d.ts +36 -0
- package/src/lib/app-utils/decompress.js +32 -0
- package/src/lib/app-utils/decompress.js.map +1 -0
- package/src/lib/app-utils/dedicated-sending-domain.d.ts +47 -0
- package/src/lib/app-utils/dedicated-sending-domain.js +114 -0
- package/src/lib/app-utils/dedicated-sending-domain.js.map +1 -0
- package/src/lib/app-utils/deferred-image.d.ts +86 -0
- package/src/lib/app-utils/deferred-image.js +83 -0
- package/src/lib/app-utils/deferred-image.js.map +1 -0
- package/src/lib/app-utils/definition-canvas-tree.d.ts +61 -0
- package/src/lib/app-utils/definition-canvas-tree.js +126 -0
- package/src/lib/app-utils/definition-canvas-tree.js.map +1 -0
- package/src/lib/app-utils/deployment-shape.d.ts +167 -0
- package/src/lib/app-utils/deployment-shape.js +238 -0
- package/src/lib/app-utils/deployment-shape.js.map +1 -0
- package/src/lib/app-utils/detect-template-placeholders.d.ts +30 -0
- package/src/lib/app-utils/detect-template-placeholders.js +53 -0
- package/src/lib/app-utils/detect-template-placeholders.js.map +1 -0
- package/src/lib/app-utils/dmca-counter-notice.d.ts +185 -0
- package/src/lib/app-utils/dmca-counter-notice.js +277 -0
- package/src/lib/app-utils/dmca-counter-notice.js.map +1 -0
- package/src/lib/app-utils/docs-deflection.d.ts +156 -0
- package/src/lib/app-utils/docs-deflection.js +547 -0
- package/src/lib/app-utils/docs-deflection.js.map +1 -0
- package/src/lib/app-utils/docs-help.d.ts +57 -0
- package/src/lib/app-utils/docs-help.generated.d.ts +303 -0
- package/src/lib/app-utils/docs-help.generated.js +867 -0
- package/src/lib/app-utils/docs-help.generated.js.map +1 -0
- package/src/lib/app-utils/docs-help.js +46 -0
- package/src/lib/app-utils/docs-help.js.map +1 -0
- package/src/lib/app-utils/docs-index.generated.d.ts +29 -0
- package/src/lib/app-utils/docs-index.generated.js +8388 -0
- package/src/lib/app-utils/docs-index.generated.js.map +1 -0
- package/src/lib/app-utils/docs-retrieval.d.ts +67 -0
- package/src/lib/app-utils/docs-retrieval.js +188 -0
- package/src/lib/app-utils/docs-retrieval.js.map +1 -0
- package/src/lib/app-utils/document-landmark.d.ts +50 -0
- package/src/lib/app-utils/document-landmark.js +100 -0
- package/src/lib/app-utils/document-landmark.js.map +1 -0
- package/src/lib/app-utils/duplicate-resource.d.ts +101 -0
- package/src/lib/app-utils/duplicate-resource.js +206 -0
- package/src/lib/app-utils/duplicate-resource.js.map +1 -0
- package/src/lib/app-utils/dynamic-list-rule.d.ts +471 -0
- package/src/lib/app-utils/dynamic-list-rule.js +914 -0
- package/src/lib/app-utils/dynamic-list-rule.js.map +1 -0
- package/src/lib/app-utils/element-animation.d.ts +200 -0
- package/src/lib/app-utils/element-animation.js +233 -0
- package/src/lib/app-utils/element-animation.js.map +1 -0
- package/src/lib/app-utils/element-hidden-style.d.ts +46 -0
- package/src/lib/app-utils/element-hidden-style.js +48 -0
- package/src/lib/app-utils/element-hidden-style.js.map +1 -0
- package/src/lib/app-utils/element-ui.d.ts +243 -0
- package/src/lib/app-utils/element-ui.js +459 -0
- package/src/lib/app-utils/element-ui.js.map +1 -0
- package/src/lib/app-utils/email-starter-policy.d.ts +160 -0
- package/src/lib/app-utils/email-starter-policy.js +327 -0
- package/src/lib/app-utils/email-starter-policy.js.map +1 -0
- package/src/lib/app-utils/email-topics.d.ts +310 -0
- package/src/lib/app-utils/email-topics.js +336 -0
- package/src/lib/app-utils/email-topics.js.map +1 -0
- package/src/lib/app-utils/enabled-plugins-context.d.ts +100 -0
- package/src/lib/app-utils/enabled-plugins-context.js +113 -0
- package/src/lib/app-utils/enabled-plugins-context.js.map +1 -0
- package/src/lib/app-utils/ensure-canvas-root.d.ts +38 -0
- package/src/lib/app-utils/ensure-canvas-root.js +61 -0
- package/src/lib/app-utils/ensure-canvas-root.js.map +1 -0
- package/src/lib/app-utils/entity-picker-context.d.ts +199 -0
- package/src/lib/app-utils/entity-picker-context.js +93 -0
- package/src/lib/app-utils/entity-picker-context.js.map +1 -0
- package/src/lib/app-utils/error-beacon.d.ts +107 -0
- package/src/lib/app-utils/error-beacon.js +296 -0
- package/src/lib/app-utils/error-beacon.js.map +1 -0
- package/src/lib/app-utils/expand-repeatables.d.ts +172 -0
- package/src/lib/app-utils/expand-repeatables.js +299 -0
- package/src/lib/app-utils/expand-repeatables.js.map +1 -0
- package/src/lib/app-utils/foreign-script.d.ts +82 -0
- package/src/lib/app-utils/foreign-script.js +102 -0
- package/src/lib/app-utils/foreign-script.js.map +1 -0
- package/src/lib/app-utils/form-abuse-ceiling.d.ts +146 -0
- package/src/lib/app-utils/form-abuse-ceiling.js +158 -0
- package/src/lib/app-utils/form-abuse-ceiling.js.map +1 -0
- package/src/lib/app-utils/form-contract.d.ts +198 -0
- package/src/lib/app-utils/form-contract.js +282 -0
- package/src/lib/app-utils/form-contract.js.map +1 -0
- package/src/lib/app-utils/form-dataset-binding.d.ts +50 -0
- package/src/lib/app-utils/form-dataset-binding.js +74 -0
- package/src/lib/app-utils/form-dataset-binding.js.map +1 -0
- package/src/lib/app-utils/forms.d.ts +727 -0
- package/src/lib/app-utils/forms.js +777 -0
- package/src/lib/app-utils/forms.js.map +1 -0
- package/src/lib/app-utils/functions.d.ts +188 -0
- package/src/lib/app-utils/functions.js +529 -0
- package/src/lib/app-utils/functions.js.map +1 -0
- package/src/lib/app-utils/guarded-version-save.d.ts +91 -0
- package/src/lib/app-utils/guarded-version-save.js +131 -0
- package/src/lib/app-utils/guarded-version-save.js.map +1 -0
- package/src/lib/app-utils/health-report.d.ts +1766 -0
- package/src/lib/app-utils/health-report.js +2072 -0
- package/src/lib/app-utils/health-report.js.map +1 -0
- package/src/lib/app-utils/host-naming.d.ts +135 -0
- package/src/lib/app-utils/host-naming.js +188 -0
- package/src/lib/app-utils/host-naming.js.map +1 -0
- package/src/lib/app-utils/host-permissions.d.ts +76 -0
- package/src/lib/app-utils/host-permissions.js +119 -0
- package/src/lib/app-utils/host-permissions.js.map +1 -0
- package/src/lib/app-utils/host-tokens.d.ts +228 -0
- package/src/lib/app-utils/host-tokens.js +304 -0
- package/src/lib/app-utils/host-tokens.js.map +1 -0
- package/src/lib/app-utils/idp-profile.d.ts +83 -0
- package/src/lib/app-utils/idp-profile.js +268 -0
- package/src/lib/app-utils/idp-profile.js.map +1 -0
- package/src/lib/app-utils/image-upload-types.d.ts +49 -0
- package/src/lib/app-utils/image-upload-types.js +86 -0
- package/src/lib/app-utils/image-upload-types.js.map +1 -0
- package/src/lib/app-utils/index.d.ts +18 -0
- package/src/lib/app-utils/index.js +23 -0
- package/src/lib/app-utils/index.js.map +1 -0
- package/src/lib/app-utils/internal-traffic.d.ts +197 -0
- package/src/lib/app-utils/internal-traffic.js +288 -0
- package/src/lib/app-utils/internal-traffic.js.map +1 -0
- package/src/lib/app-utils/lineal-order.d.ts +62 -0
- package/src/lib/app-utils/lineal-order.js +65 -0
- package/src/lib/app-utils/lineal-order.js.map +1 -0
- package/src/lib/app-utils/link-references.d.ts +36 -0
- package/src/lib/app-utils/link-references.js +89 -0
- package/src/lib/app-utils/link-references.js.map +1 -0
- package/src/lib/app-utils/link-target-search-context.d.ts +123 -0
- package/src/lib/app-utils/link-target-search-context.js +221 -0
- package/src/lib/app-utils/link-target-search-context.js.map +1 -0
- package/src/lib/app-utils/list-assignment-policy.d.ts +169 -0
- package/src/lib/app-utils/list-assignment-policy.js +170 -0
- package/src/lib/app-utils/list-assignment-policy.js.map +1 -0
- package/src/lib/app-utils/list-import.d.ts +158 -0
- package/src/lib/app-utils/list-import.js +332 -0
- package/src/lib/app-utils/list-import.js.map +1 -0
- package/src/lib/app-utils/llms-txt.d.ts +104 -0
- package/src/lib/app-utils/llms-txt.js +144 -0
- package/src/lib/app-utils/llms-txt.js.map +1 -0
- package/src/lib/app-utils/local-storage-budget.d.ts +75 -0
- package/src/lib/app-utils/local-storage-budget.js +153 -0
- package/src/lib/app-utils/local-storage-budget.js.map +1 -0
- package/src/lib/app-utils/lockdown.d.ts +698 -0
- package/src/lib/app-utils/lockdown.js +929 -0
- package/src/lib/app-utils/lockdown.js.map +1 -0
- package/src/lib/app-utils/margin-utilization.d.ts +267 -0
- package/src/lib/app-utils/margin-utilization.js +351 -0
- package/src/lib/app-utils/margin-utilization.js.map +1 -0
- package/src/lib/app-utils/markdown-lite.d.ts +297 -0
- package/src/lib/app-utils/markdown-lite.js +705 -0
- package/src/lib/app-utils/markdown-lite.js.map +1 -0
- package/src/lib/app-utils/marketing-consent.d.ts +704 -0
- package/src/lib/app-utils/marketing-consent.js +783 -0
- package/src/lib/app-utils/marketing-consent.js.map +1 -0
- package/src/lib/app-utils/marketplace-listing-visibility.d.ts +120 -0
- package/src/lib/app-utils/marketplace-listing-visibility.js +139 -0
- package/src/lib/app-utils/marketplace-listing-visibility.js.map +1 -0
- package/src/lib/app-utils/marketplace-overrides.d.ts +271 -0
- package/src/lib/app-utils/marketplace-overrides.js +462 -0
- package/src/lib/app-utils/marketplace-overrides.js.map +1 -0
- package/src/lib/app-utils/marketplace-provenance.d.ts +150 -0
- package/src/lib/app-utils/marketplace-provenance.js +136 -0
- package/src/lib/app-utils/marketplace-provenance.js.map +1 -0
- package/src/lib/app-utils/marketplace-theme.d.ts +237 -0
- package/src/lib/app-utils/marketplace-theme.js +525 -0
- package/src/lib/app-utils/marketplace-theme.js.map +1 -0
- package/src/lib/app-utils/marketplace-update-state.d.ts +119 -0
- package/src/lib/app-utils/marketplace-update-state.js +132 -0
- package/src/lib/app-utils/marketplace-update-state.js.map +1 -0
- package/src/lib/app-utils/marketplace-verification.d.ts +95 -0
- package/src/lib/app-utils/marketplace-verification.js +81 -0
- package/src/lib/app-utils/marketplace-verification.js.map +1 -0
- package/src/lib/app-utils/measure-node-map.d.ts +76 -0
- package/src/lib/app-utils/measure-node-map.js +111 -0
- package/src/lib/app-utils/measure-node-map.js.map +1 -0
- package/src/lib/app-utils/media-alt.d.ts +55 -0
- package/src/lib/app-utils/media-alt.js +58 -0
- package/src/lib/app-utils/media-alt.js.map +1 -0
- package/src/lib/app-utils/media-asset-facts.d.ts +125 -0
- package/src/lib/app-utils/media-asset-facts.js +467 -0
- package/src/lib/app-utils/media-asset-facts.js.map +1 -0
- package/src/lib/app-utils/media-cdn-scope.d.ts +65 -0
- package/src/lib/app-utils/media-cdn-scope.js +75 -0
- package/src/lib/app-utils/media-cdn-scope.js.map +1 -0
- package/src/lib/app-utils/media-folders.d.ts +161 -0
- package/src/lib/app-utils/media-folders.js +230 -0
- package/src/lib/app-utils/media-folders.js.map +1 -0
- package/src/lib/app-utils/media-metadata.d.ts +277 -0
- package/src/lib/app-utils/media-metadata.js +388 -0
- package/src/lib/app-utils/media-metadata.js.map +1 -0
- package/src/lib/app-utils/media-picker-context.d.ts +93 -0
- package/src/lib/app-utils/media-picker-context.js +26 -0
- package/src/lib/app-utils/media-picker-context.js.map +1 -0
- package/src/lib/app-utils/media-quarantine.d.ts +247 -0
- package/src/lib/app-utils/media-quarantine.js +323 -0
- package/src/lib/app-utils/media-quarantine.js.map +1 -0
- package/src/lib/app-utils/media-ref.d.ts +661 -0
- package/src/lib/app-utils/media-ref.js +1055 -0
- package/src/lib/app-utils/media-ref.js.map +1 -0
- package/src/lib/app-utils/media-takedown-reach.d.ts +126 -0
- package/src/lib/app-utils/media-takedown-reach.js +143 -0
- package/src/lib/app-utils/media-takedown-reach.js.map +1 -0
- package/src/lib/app-utils/member-email-aliases.d.ts +180 -0
- package/src/lib/app-utils/member-email-aliases.js +217 -0
- package/src/lib/app-utils/member-email-aliases.js.map +1 -0
- package/src/lib/app-utils/merge-node-sx.d.ts +47 -0
- package/src/lib/app-utils/merge-node-sx.js +123 -0
- package/src/lib/app-utils/merge-node-sx.js.map +1 -0
- package/src/lib/app-utils/name-match.d.ts +155 -0
- package/src/lib/app-utils/name-match.js +175 -0
- package/src/lib/app-utils/name-match.js.map +1 -0
- package/src/lib/app-utils/name-search.d.ts +117 -0
- package/src/lib/app-utils/name-search.js +145 -0
- package/src/lib/app-utils/name-search.js.map +1 -0
- package/src/lib/app-utils/node-capabilities.d.ts +85 -0
- package/src/lib/app-utils/node-capabilities.js +88 -0
- package/src/lib/app-utils/node-capabilities.js.map +1 -0
- package/src/lib/app-utils/node-definition-sanitizer.d.ts +164 -0
- package/src/lib/app-utils/node-definition-sanitizer.js +402 -0
- package/src/lib/app-utils/node-definition-sanitizer.js.map +1 -0
- package/src/lib/app-utils/node-identity.d.ts +47 -0
- package/src/lib/app-utils/node-identity.js +50 -0
- package/src/lib/app-utils/node-identity.js.map +1 -0
- package/src/lib/app-utils/node-interactions.d.ts +102 -0
- package/src/lib/app-utils/node-interactions.js +192 -0
- package/src/lib/app-utils/node-interactions.js.map +1 -0
- package/src/lib/app-utils/node-url-policy.d.ts +54 -0
- package/src/lib/app-utils/node-url-policy.js +72 -0
- package/src/lib/app-utils/node-url-policy.js.map +1 -0
- package/src/lib/app-utils/notifications.d.ts +71 -0
- package/src/lib/app-utils/notifications.js +101 -0
- package/src/lib/app-utils/notifications.js.map +1 -0
- package/src/lib/app-utils/onboarding-deep-link.d.ts +120 -0
- package/src/lib/app-utils/onboarding-deep-link.js +142 -0
- package/src/lib/app-utils/onboarding-deep-link.js.map +1 -0
- package/src/lib/app-utils/operator-identity.d.ts +207 -0
- package/src/lib/app-utils/operator-identity.js +186 -0
- package/src/lib/app-utils/operator-identity.js.map +1 -0
- package/src/lib/app-utils/org-billing-doc.d.ts +231 -0
- package/src/lib/app-utils/org-billing-doc.js +238 -0
- package/src/lib/app-utils/org-billing-doc.js.map +1 -0
- package/src/lib/app-utils/org-override-reason.d.ts +100 -0
- package/src/lib/app-utils/org-override-reason.js +116 -0
- package/src/lib/app-utils/org-override-reason.js.map +1 -0
- package/src/lib/app-utils/org-permissions.d.ts +194 -0
- package/src/lib/app-utils/org-permissions.js +357 -0
- package/src/lib/app-utils/org-permissions.js.map +1 -0
- package/src/lib/app-utils/org-roles.d.ts +72 -0
- package/src/lib/app-utils/org-roles.js +131 -0
- package/src/lib/app-utils/org-roles.js.map +1 -0
- package/src/lib/app-utils/organizations.d.ts +407 -0
- package/src/lib/app-utils/organizations.js +511 -0
- package/src/lib/app-utils/organizations.js.map +1 -0
- package/src/lib/app-utils/page-header-actions-context.d.ts +83 -0
- package/src/lib/app-utils/page-header-actions-context.js +58 -0
- package/src/lib/app-utils/page-header-actions-context.js.map +1 -0
- package/src/lib/app-utils/page-header-record-context.d.ts +80 -0
- package/src/lib/app-utils/page-header-record-context.js +64 -0
- package/src/lib/app-utils/page-header-record-context.js.map +1 -0
- package/src/lib/app-utils/page-markdown.d.ts +103 -0
- package/src/lib/app-utils/page-markdown.js +385 -0
- package/src/lib/app-utils/page-markdown.js.map +1 -0
- package/src/lib/app-utils/paid-media-source.d.ts +90 -0
- package/src/lib/app-utils/paid-media-source.js +184 -0
- package/src/lib/app-utils/paid-media-source.js.map +1 -0
- package/src/lib/app-utils/palette-sx.d.ts +34 -0
- package/src/lib/app-utils/palette-sx.js +150 -0
- package/src/lib/app-utils/palette-sx.js.map +1 -0
- package/src/lib/app-utils/password-policy.d.ts +47 -0
- package/src/lib/app-utils/password-policy.js +46 -0
- package/src/lib/app-utils/password-policy.js.map +1 -0
- package/src/lib/app-utils/payments-configured.d.ts +84 -0
- package/src/lib/app-utils/payments-configured.js +88 -0
- package/src/lib/app-utils/payments-configured.js.map +1 -0
- package/src/lib/app-utils/person-erasure.d.ts +126 -0
- package/src/lib/app-utils/person-erasure.js +121 -0
- package/src/lib/app-utils/person-erasure.js.map +1 -0
- package/src/lib/app-utils/person-key.d.ts +32 -0
- package/src/lib/app-utils/person-key.js +62 -0
- package/src/lib/app-utils/person-key.js.map +1 -0
- package/src/lib/app-utils/plan-entitlements.d.ts +2756 -0
- package/src/lib/app-utils/plan-entitlements.js +4085 -0
- package/src/lib/app-utils/plan-entitlements.js.map +1 -0
- package/src/lib/app-utils/platform-ad-conversions.d.ts +122 -0
- package/src/lib/app-utils/platform-ad-conversions.js +174 -0
- package/src/lib/app-utils/platform-ad-conversions.js.map +1 -0
- package/src/lib/app-utils/platform-advertising-tags.d.ts +139 -0
- package/src/lib/app-utils/platform-advertising-tags.js +203 -0
- package/src/lib/app-utils/platform-advertising-tags.js.map +1 -0
- package/src/lib/app-utils/platform-brand.d.ts +151 -0
- package/src/lib/app-utils/platform-brand.js +175 -0
- package/src/lib/app-utils/platform-brand.js.map +1 -0
- package/src/lib/app-utils/platform-consent-default.d.ts +142 -0
- package/src/lib/app-utils/platform-consent-default.js +295 -0
- package/src/lib/app-utils/platform-consent-default.js.map +1 -0
- package/src/lib/app-utils/platform-marketing-consent.d.ts +151 -0
- package/src/lib/app-utils/platform-marketing-consent.js +182 -0
- package/src/lib/app-utils/platform-marketing-consent.js.map +1 -0
- package/src/lib/app-utils/platform-marketing-host.d.ts +33 -0
- package/src/lib/app-utils/platform-marketing-host.js +97 -0
- package/src/lib/app-utils/platform-marketing-host.js.map +1 -0
- package/src/lib/app-utils/platform-visitor-consent.d.ts +252 -0
- package/src/lib/app-utils/platform-visitor-consent.js +533 -0
- package/src/lib/app-utils/platform-visitor-consent.js.map +1 -0
- package/src/lib/app-utils/plugin-api-cross-origin.d.ts +61 -0
- package/src/lib/app-utils/plugin-api-cross-origin.js +202 -0
- package/src/lib/app-utils/plugin-api-cross-origin.js.map +1 -0
- package/src/lib/app-utils/plugin-api-rate-limit.d.ts +192 -0
- package/src/lib/app-utils/plugin-api-rate-limit.js +270 -0
- package/src/lib/app-utils/plugin-api-rate-limit.js.map +1 -0
- package/src/lib/app-utils/plugin-artifact-path.d.ts +32 -0
- package/src/lib/app-utils/plugin-artifact-path.js +33 -0
- package/src/lib/app-utils/plugin-artifact-path.js.map +1 -0
- package/src/lib/app-utils/plugin-bundle-checks.d.ts +148 -0
- package/src/lib/app-utils/plugin-bundle-checks.js +989 -0
- package/src/lib/app-utils/plugin-bundle-checks.js.map +1 -0
- package/src/lib/app-utils/plugin-manifest.d.ts +516 -0
- package/src/lib/app-utils/plugin-manifest.js +687 -0
- package/src/lib/app-utils/plugin-manifest.js.map +1 -0
- package/src/lib/app-utils/published-legal-pages.d.ts +71 -0
- package/src/lib/app-utils/published-legal-pages.js +90 -0
- package/src/lib/app-utils/published-legal-pages.js.map +1 -0
- package/src/lib/app-utils/publisher-agreement.d.ts +254 -0
- package/src/lib/app-utils/publisher-agreement.js +274 -0
- package/src/lib/app-utils/publisher-agreement.js.map +1 -0
- package/src/lib/app-utils/publisher-attestation.d.ts +99 -0
- package/src/lib/app-utils/publisher-attestation.js +158 -0
- package/src/lib/app-utils/publisher-attestation.js.map +1 -0
- package/src/lib/app-utils/recipient-email-render.d.ts +216 -0
- package/src/lib/app-utils/recipient-email-render.js +221 -0
- package/src/lib/app-utils/recipient-email-render.js.map +1 -0
- package/src/lib/app-utils/redispatch-caught-error.d.ts +38 -0
- package/src/lib/app-utils/redispatch-caught-error.js +46 -0
- package/src/lib/app-utils/redispatch-caught-error.js.map +1 -0
- package/src/lib/app-utils/registering-plugin.d.ts +19 -0
- package/src/lib/app-utils/registering-plugin.js +38 -0
- package/src/lib/app-utils/registering-plugin.js.map +1 -0
- package/src/lib/app-utils/release-flags.d.ts +283 -0
- package/src/lib/app-utils/release-flags.js +518 -0
- package/src/lib/app-utils/release-flags.js.map +1 -0
- package/src/lib/app-utils/repair-canvas-nodes.d.ts +130 -0
- package/src/lib/app-utils/repair-canvas-nodes.js +298 -0
- package/src/lib/app-utils/repair-canvas-nodes.js.map +1 -0
- package/src/lib/app-utils/repeat-infringer.d.ts +166 -0
- package/src/lib/app-utils/repeat-infringer.js +188 -0
- package/src/lib/app-utils/repeat-infringer.js.map +1 -0
- package/src/lib/app-utils/repeat-sources.d.ts +115 -0
- package/src/lib/app-utils/repeat-sources.js +86 -0
- package/src/lib/app-utils/repeat-sources.js.map +1 -0
- package/src/lib/app-utils/request-geo.d.ts +114 -0
- package/src/lib/app-utils/request-geo.js +247 -0
- package/src/lib/app-utils/request-geo.js.map +1 -0
- package/src/lib/app-utils/request-ip.d.ts +213 -0
- package/src/lib/app-utils/request-ip.js +344 -0
- package/src/lib/app-utils/request-ip.js.map +1 -0
- package/src/lib/app-utils/resolve-named-tokens.d.ts +26 -0
- package/src/lib/app-utils/resolve-named-tokens.js +59 -0
- package/src/lib/app-utils/resolve-named-tokens.js.map +1 -0
- package/src/lib/app-utils/responsive-typography-sx.d.ts +77 -0
- package/src/lib/app-utils/responsive-typography-sx.js +122 -0
- package/src/lib/app-utils/responsive-typography-sx.js.map +1 -0
- package/src/lib/app-utils/reusable-component-keys.d.ts +135 -0
- package/src/lib/app-utils/reusable-component-keys.js +140 -0
- package/src/lib/app-utils/reusable-component-keys.js.map +1 -0
- package/src/lib/app-utils/reusable-prop-values.d.ts +199 -0
- package/src/lib/app-utils/reusable-prop-values.js +494 -0
- package/src/lib/app-utils/reusable-prop-values.js.map +1 -0
- package/src/lib/app-utils/safe-json-ld.d.ts +29 -0
- package/src/lib/app-utils/safe-json-ld.js +37 -0
- package/src/lib/app-utils/safe-json-ld.js.map +1 -0
- package/src/lib/app-utils/sanitize-svg.d.ts +55 -0
- package/src/lib/app-utils/sanitize-svg.js +460 -0
- package/src/lib/app-utils/sanitize-svg.js.map +1 -0
- package/src/lib/app-utils/scheme-sx.d.ts +84 -0
- package/src/lib/app-utils/scheme-sx.js +148 -0
- package/src/lib/app-utils/scheme-sx.js.map +1 -0
- package/src/lib/app-utils/scope-tokens.d.ts +249 -0
- package/src/lib/app-utils/scope-tokens.js +331 -0
- package/src/lib/app-utils/scope-tokens.js.map +1 -0
- package/src/lib/app-utils/screen-link-context-value.d.ts +57 -0
- package/src/lib/app-utils/screen-link-context-value.js +43 -0
- package/src/lib/app-utils/screen-link-context-value.js.map +1 -0
- package/src/lib/app-utils/screen-link-context.d.ts +185 -0
- package/src/lib/app-utils/screen-link-context.js +304 -0
- package/src/lib/app-utils/screen-link-context.js.map +1 -0
- package/src/lib/app-utils/screen-link-value.d.ts +269 -0
- package/src/lib/app-utils/screen-link-value.js +384 -0
- package/src/lib/app-utils/screen-link-value.js.map +1 -0
- package/src/lib/app-utils/screen-route.d.ts +669 -0
- package/src/lib/app-utils/screen-route.js +751 -0
- package/src/lib/app-utils/screen-route.js.map +1 -0
- package/src/lib/app-utils/screen-seo-fields.d.ts +37 -0
- package/src/lib/app-utils/screen-seo-fields.js +42 -0
- package/src/lib/app-utils/screen-seo-fields.js.map +1 -0
- package/src/lib/app-utils/search-indexing.d.ts +162 -0
- package/src/lib/app-utils/search-indexing.js +207 -0
- package/src/lib/app-utils/search-indexing.js.map +1 -0
- package/src/lib/app-utils/seo-listing-fields.d.ts +70 -0
- package/src/lib/app-utils/seo-listing-fields.js +75 -0
- package/src/lib/app-utils/seo-listing-fields.js.map +1 -0
- package/src/lib/app-utils/seo-locale.d.ts +119 -0
- package/src/lib/app-utils/seo-locale.js +133 -0
- package/src/lib/app-utils/seo-locale.js.map +1 -0
- package/src/lib/app-utils/seo-title-variables.d.ts +149 -0
- package/src/lib/app-utils/seo-title-variables.js +190 -0
- package/src/lib/app-utils/seo-title-variables.js.map +1 -0
- package/src/lib/app-utils/seo-title.d.ts +70 -0
- package/src/lib/app-utils/seo-title.js +117 -0
- package/src/lib/app-utils/seo-title.js.map +1 -0
- package/src/lib/app-utils/server.d.ts +174 -0
- package/src/lib/app-utils/server.js +314 -0
- package/src/lib/app-utils/server.js.map +1 -0
- package/src/lib/app-utils/site-context.d.ts +106 -0
- package/src/lib/app-utils/site-context.js +100 -0
- package/src/lib/app-utils/site-context.js.map +1 -0
- package/src/lib/app-utils/sitemap.d.ts +117 -0
- package/src/lib/app-utils/sitemap.js +183 -0
- package/src/lib/app-utils/sitemap.js.map +1 -0
- package/src/lib/app-utils/social-image.d.ts +112 -0
- package/src/lib/app-utils/social-image.js +191 -0
- package/src/lib/app-utils/social-image.js.map +1 -0
- package/src/lib/app-utils/starter-templates.d.ts +99 -0
- package/src/lib/app-utils/starter-templates.js +579 -0
- package/src/lib/app-utils/starter-templates.js.map +1 -0
- package/src/lib/app-utils/stored-nodes.d.ts +120 -0
- package/src/lib/app-utils/stored-nodes.js +174 -0
- package/src/lib/app-utils/stored-nodes.js.map +1 -0
- package/src/lib/app-utils/strip-undefined.d.ts +59 -0
- package/src/lib/app-utils/strip-undefined.js +95 -0
- package/src/lib/app-utils/strip-undefined.js.map +1 -0
- package/src/lib/app-utils/stripe-deployment-mode.d.ts +47 -0
- package/src/lib/app-utils/stripe-deployment-mode.js +70 -0
- package/src/lib/app-utils/stripe-deployment-mode.js.map +1 -0
- package/src/lib/app-utils/support-tiers.d.ts +108 -0
- package/src/lib/app-utils/support-tiers.js +201 -0
- package/src/lib/app-utils/support-tiers.js.map +1 -0
- package/src/lib/app-utils/timezone-geo-hint.d.ts +36 -0
- package/src/lib/app-utils/timezone-geo-hint.js +180 -0
- package/src/lib/app-utils/timezone-geo-hint.js.map +1 -0
- package/src/lib/app-utils/upload-cors.d.ts +155 -0
- package/src/lib/app-utils/upload-cors.js +254 -0
- package/src/lib/app-utils/upload-cors.js.map +1 -0
- package/src/lib/app-utils/upload-inspection.d.ts +159 -0
- package/src/lib/app-utils/upload-inspection.js +539 -0
- package/src/lib/app-utils/upload-inspection.js.map +1 -0
- package/src/lib/app-utils/url-slug.d.ts +40 -0
- package/src/lib/app-utils/url-slug.js +42 -0
- package/src/lib/app-utils/url-slug.js.map +1 -0
- package/src/lib/app-utils/usage-budget.d.ts +429 -0
- package/src/lib/app-utils/usage-budget.js +421 -0
- package/src/lib/app-utils/usage-budget.js.map +1 -0
- package/src/lib/app-utils/variables.d.ts +96 -0
- package/src/lib/app-utils/variables.js +233 -0
- package/src/lib/app-utils/variables.js.map +1 -0
- package/src/lib/app-utils/video-asset-facts.d.ts +61 -0
- package/src/lib/app-utils/video-asset-facts.js +70 -0
- package/src/lib/app-utils/video-asset-facts.js.map +1 -0
- package/src/lib/app-utils/video-object.d.ts +89 -0
- package/src/lib/app-utils/video-object.js +245 -0
- package/src/lib/app-utils/video-object.js.map +1 -0
- package/src/lib/app-utils/visitor-consent.d.ts +757 -0
- package/src/lib/app-utils/visitor-consent.js +981 -0
- package/src/lib/app-utils/visitor-consent.js.map +1 -0
- package/src/lib/app-utils/visitor-record-ceiling.d.ts +223 -0
- package/src/lib/app-utils/visitor-record-ceiling.js +215 -0
- package/src/lib/app-utils/visitor-record-ceiling.js.map +1 -0
- package/src/lib/app-utils/web-vitals-rum.d.ts +53 -0
- package/src/lib/app-utils/web-vitals-rum.js +278 -0
- package/src/lib/app-utils/web-vitals-rum.js.map +1 -0
- package/src/lib/app-utils/webhook-delivery.d.ts +324 -0
- package/src/lib/app-utils/webhook-delivery.js +413 -0
- package/src/lib/app-utils/webhook-delivery.js.map +1 -0
- package/src/lib/app-utils/where-used.d.ts +57 -0
- package/src/lib/app-utils/where-used.js +59 -0
- package/src/lib/app-utils/where-used.js.map +1 -0
- package/src/lib/app-utils/wistia-embed.d.ts +86 -0
- package/src/lib/app-utils/wistia-embed.js +119 -0
- package/src/lib/app-utils/wistia-embed.js.map +1 -0
- package/src/lib/app-utils/workflows.d.ts +136 -0
- package/src/lib/app-utils/workflows.js +346 -0
- package/src/lib/app-utils/workflows.js.map +1 -0
- package/src/lib/canvas-manager/canvas-manager-tree.d.ts +109 -0
- package/src/lib/canvas-manager/canvas-manager-tree.js +139 -0
- package/src/lib/canvas-manager/canvas-manager-tree.js.map +1 -0
- package/src/lib/canvas-manager/canvas-manager.d.ts +549 -0
- package/src/lib/canvas-manager/canvas-manager.js +1311 -0
- package/src/lib/canvas-manager/canvas-manager.js.map +1 -0
- package/src/lib/canvas-manager/index.d.ts +20 -0
- package/src/lib/canvas-manager/index.js +21 -0
- package/src/lib/canvas-manager/index.js.map +1 -0
- package/src/lib/canvas-manager/stores/index.d.ts +17 -0
- package/src/lib/canvas-manager/stores/index.js +18 -0
- package/src/lib/canvas-manager/stores/index.js.map +1 -0
- package/src/lib/canvas-manager/stores/node.store.d.ts +30 -0
- package/src/lib/canvas-manager/stores/node.store.js +45 -0
- package/src/lib/canvas-manager/stores/node.store.js.map +1 -0
- package/src/lib/components-manager/components-manager.d.ts +56 -0
- package/src/lib/components-manager/components-manager.js +191 -0
- package/src/lib/components-manager/components-manager.js.map +1 -0
- package/src/lib/components-manager/index.d.ts +18 -0
- package/src/lib/components-manager/index.js +19 -0
- package/src/lib/components-manager/index.js.map +1 -0
- package/src/lib/emit-manager/emit-manager.d.ts +56 -0
- package/src/lib/emit-manager/emit-manager.js +60 -0
- package/src/lib/emit-manager/emit-manager.js.map +1 -0
- package/src/lib/emit-manager/index.d.ts +18 -0
- package/src/lib/emit-manager/index.js +19 -0
- package/src/lib/emit-manager/index.js.map +1 -0
- package/src/lib/foundation/constants/_internal.d.ts +18 -0
- package/src/lib/foundation/constants/_internal.js +62 -0
- package/src/lib/foundation/constants/_internal.js.map +1 -0
- package/src/lib/foundation/constants/app.d.ts +23 -0
- package/src/lib/foundation/constants/app.js +25 -0
- package/src/lib/foundation/constants/app.js.map +1 -0
- package/src/lib/foundation/constants/canvas.d.ts +18 -0
- package/src/lib/foundation/constants/canvas.js +18 -0
- package/src/lib/foundation/constants/canvas.js.map +1 -0
- package/src/lib/foundation/constants/components.d.ts +54 -0
- package/src/lib/foundation/constants/components.js +61 -0
- package/src/lib/foundation/constants/components.js.map +1 -0
- package/src/lib/foundation/constants/shared.d.ts +50 -0
- package/src/lib/foundation/constants/shared.js +49 -0
- package/src/lib/foundation/constants/shared.js.map +1 -0
- package/src/lib/foundation/constants/symbol.d.ts +63 -0
- package/src/lib/foundation/constants/symbol.js +75 -0
- package/src/lib/foundation/constants/symbol.js.map +1 -0
- package/src/lib/foundation/definitions/components.types.d.ts +372 -0
- package/src/lib/foundation/definitions/components.types.js +180 -0
- package/src/lib/foundation/definitions/components.types.js.map +1 -0
- package/src/lib/foundation/definitions/contact.types.d.ts +73 -0
- package/src/lib/foundation/definitions/contact.types.js +107 -0
- package/src/lib/foundation/definitions/contact.types.js.map +1 -0
- package/src/lib/foundation/definitions/host-content-collections.d.ts +137 -0
- package/src/lib/foundation/definitions/host-content-collections.js +219 -0
- package/src/lib/foundation/definitions/host-content-collections.js.map +1 -0
- package/src/lib/foundation/definitions/org-billing.types.d.ts +1361 -0
- package/src/lib/foundation/definitions/org-billing.types.js +77 -0
- package/src/lib/foundation/definitions/org-billing.types.js.map +1 -0
- package/src/lib/foundation/definitions/organization.types.d.ts +307 -0
- package/src/lib/foundation/definitions/organization.types.js +42 -0
- package/src/lib/foundation/definitions/organization.types.js.map +1 -0
- package/src/lib/foundation/definitions/platform.types.d.ts +1326 -0
- package/src/lib/foundation/definitions/platform.types.js +124 -0
- package/src/lib/foundation/definitions/platform.types.js.map +1 -0
- package/src/lib/foundation/definitions/property-kinds.d.ts +189 -0
- package/src/lib/foundation/definitions/property-kinds.js +565 -0
- package/src/lib/foundation/definitions/property-kinds.js.map +1 -0
- package/src/lib/foundation/definitions/shared.d.ts +23 -0
- package/src/lib/foundation/definitions/shared.js +18 -0
- package/src/lib/foundation/definitions/shared.js.map +1 -0
- package/src/lib/foundation/definitions/write-deny-coverage.util.d.ts +249 -0
- package/src/lib/foundation/definitions/write-deny-coverage.util.js +499 -0
- package/src/lib/foundation/definitions/write-deny-coverage.util.js.map +1 -0
- package/src/lib/foundation/index.d.ts +32 -0
- package/src/lib/foundation/index.js +67 -0
- package/src/lib/foundation/index.js.map +1 -0
- package/src/lib/lifecycle.d.ts +24 -0
- package/src/lib/lifecycle.js +39 -0
- package/src/lib/lifecycle.js.map +1 -0
- package/src/lib/mst/common.d.ts +17 -0
- package/src/lib/mst/common.js +23 -0
- package/src/lib/mst/common.js.map +1 -0
- package/src/lib/mst/index.d.ts +19 -0
- package/src/lib/mst/index.js +20 -0
- package/src/lib/mst/index.js.map +1 -0
- package/src/lib/mst/json.d.ts +22 -0
- package/src/lib/mst/json.js +23 -0
- package/src/lib/mst/json.js.map +1 -0
- package/src/lib/mst/types.d.ts +20 -0
- package/src/lib/mst/types.js +18 -0
- package/src/lib/mst/types.js.map +1 -0
- package/src/lib/plugin-manager/billing-webhook-hooks.d.ts +77 -0
- package/src/lib/plugin-manager/billing-webhook-hooks.js +55 -0
- package/src/lib/plugin-manager/billing-webhook-hooks.js.map +1 -0
- package/src/lib/plugin-manager/commerce-zone-props.d.ts +172 -0
- package/src/lib/plugin-manager/commerce-zone-props.js +31 -0
- package/src/lib/plugin-manager/commerce-zone-props.js.map +1 -0
- package/src/lib/plugin-manager/custom-fields.d.ts +60 -0
- package/src/lib/plugin-manager/custom-fields.js +39 -0
- package/src/lib/plugin-manager/custom-fields.js.map +1 -0
- package/src/lib/plugin-manager/editor-sessions.d.ts +109 -0
- package/src/lib/plugin-manager/editor-sessions.js +137 -0
- package/src/lib/plugin-manager/editor-sessions.js.map +1 -0
- package/src/lib/plugin-manager/enabled-plugins.d.ts +438 -0
- package/src/lib/plugin-manager/enabled-plugins.js +403 -0
- package/src/lib/plugin-manager/enabled-plugins.js.map +1 -0
- package/src/lib/plugin-manager/feature-plugins.d.ts +1314 -0
- package/src/lib/plugin-manager/feature-plugins.js +609 -0
- package/src/lib/plugin-manager/feature-plugins.js.map +1 -0
- package/src/lib/plugin-manager/first-party-plugins.generated.d.ts +11 -0
- package/src/lib/plugin-manager/first-party-plugins.generated.js +149 -0
- package/src/lib/plugin-manager/first-party-plugins.generated.js.map +1 -0
- package/src/lib/plugin-manager/index.d.ts +42 -0
- package/src/lib/plugin-manager/index.js +46 -0
- package/src/lib/plugin-manager/index.js.map +1 -0
- package/src/lib/plugin-manager/install-presets.d.ts +93 -0
- package/src/lib/plugin-manager/install-presets.js +86 -0
- package/src/lib/plugin-manager/install-presets.js.map +1 -0
- package/src/lib/plugin-manager/media-delivery-provider.d.ts +124 -0
- package/src/lib/plugin-manager/media-delivery-provider.js +53 -0
- package/src/lib/plugin-manager/media-delivery-provider.js.map +1 -0
- package/src/lib/plugin-manager/order-fulfilment.d.ts +142 -0
- package/src/lib/plugin-manager/order-fulfilment.js +104 -0
- package/src/lib/plugin-manager/order-fulfilment.js.map +1 -0
- package/src/lib/plugin-manager/plugin-activity-actions.d.ts +122 -0
- package/src/lib/plugin-manager/plugin-activity-actions.js +140 -0
- package/src/lib/plugin-manager/plugin-activity-actions.js.map +1 -0
- package/src/lib/plugin-manager/plugin-bridge.d.ts +98 -0
- package/src/lib/plugin-manager/plugin-bridge.js +154 -0
- package/src/lib/plugin-manager/plugin-bridge.js.map +1 -0
- package/src/lib/plugin-manager/plugin-config.d.ts +148 -0
- package/src/lib/plugin-manager/plugin-config.js +228 -0
- package/src/lib/plugin-manager/plugin-config.js.map +1 -0
- package/src/lib/plugin-manager/plugin-console-crons.d.ts +139 -0
- package/src/lib/plugin-manager/plugin-console-crons.js +177 -0
- package/src/lib/plugin-manager/plugin-console-crons.js.map +1 -0
- package/src/lib/plugin-manager/plugin-contact-capture.d.ts +220 -0
- package/src/lib/plugin-manager/plugin-contact-capture.js +89 -0
- package/src/lib/plugin-manager/plugin-contact-capture.js.map +1 -0
- package/src/lib/plugin-manager/plugin-contributions.d.ts +244 -0
- package/src/lib/plugin-manager/plugin-contributions.js +283 -0
- package/src/lib/plugin-manager/plugin-contributions.js.map +1 -0
- package/src/lib/plugin-manager/plugin-entitlement-keys.d.ts +169 -0
- package/src/lib/plugin-manager/plugin-entitlement-keys.js +84 -0
- package/src/lib/plugin-manager/plugin-entitlement-keys.js.map +1 -0
- package/src/lib/plugin-manager/plugin-entitlements.d.ts +181 -0
- package/src/lib/plugin-manager/plugin-entitlements.js +188 -0
- package/src/lib/plugin-manager/plugin-entitlements.js.map +1 -0
- package/src/lib/plugin-manager/plugin-events.d.ts +145 -0
- package/src/lib/plugin-manager/plugin-events.js +79 -0
- package/src/lib/plugin-manager/plugin-events.js.map +1 -0
- package/src/lib/plugin-manager/plugin-figures.d.ts +251 -0
- package/src/lib/plugin-manager/plugin-figures.js +252 -0
- package/src/lib/plugin-manager/plugin-figures.js.map +1 -0
- package/src/lib/plugin-manager/plugin-host-collections.d.ts +146 -0
- package/src/lib/plugin-manager/plugin-host-collections.js +116 -0
- package/src/lib/plugin-manager/plugin-host-collections.js.map +1 -0
- package/src/lib/plugin-manager/plugin-jobs.d.ts +130 -0
- package/src/lib/plugin-manager/plugin-jobs.js +182 -0
- package/src/lib/plugin-manager/plugin-jobs.js.map +1 -0
- package/src/lib/plugin-manager/plugin-loader.d.ts +86 -0
- package/src/lib/plugin-manager/plugin-loader.js +223 -0
- package/src/lib/plugin-manager/plugin-loader.js.map +1 -0
- package/src/lib/plugin-manager/plugin-manager.d.ts +95 -0
- package/src/lib/plugin-manager/plugin-manager.js +343 -0
- package/src/lib/plugin-manager/plugin-manager.js.map +1 -0
- package/src/lib/plugin-manager/plugin-metered-lines.d.ts +97 -0
- package/src/lib/plugin-manager/plugin-metered-lines.js +123 -0
- package/src/lib/plugin-manager/plugin-metered-lines.js.map +1 -0
- package/src/lib/plugin-manager/plugin-org-erasure.d.ts +52 -0
- package/src/lib/plugin-manager/plugin-org-erasure.js +100 -0
- package/src/lib/plugin-manager/plugin-org-erasure.js.map +1 -0
- package/src/lib/plugin-manager/plugin-permissions.d.ts +69 -0
- package/src/lib/plugin-manager/plugin-permissions.js +77 -0
- package/src/lib/plugin-manager/plugin-permissions.js.map +1 -0
- package/src/lib/plugin-manager/plugin-person-erasure.d.ts +58 -0
- package/src/lib/plugin-manager/plugin-person-erasure.js +109 -0
- package/src/lib/plugin-manager/plugin-person-erasure.js.map +1 -0
- package/src/lib/plugin-manager/plugin-record-cards.d.ts +99 -0
- package/src/lib/plugin-manager/plugin-record-cards.js +59 -0
- package/src/lib/plugin-manager/plugin-record-cards.js.map +1 -0
- package/src/lib/plugin-manager/plugin-record-facts.d.ts +111 -0
- package/src/lib/plugin-manager/plugin-record-facts.js +51 -0
- package/src/lib/plugin-manager/plugin-record-facts.js.map +1 -0
- package/src/lib/plugin-manager/plugin-record-routes.d.ts +129 -0
- package/src/lib/plugin-manager/plugin-record-routes.js +93 -0
- package/src/lib/plugin-manager/plugin-record-routes.js.map +1 -0
- package/src/lib/plugin-manager/plugin-record-timeline.d.ts +147 -0
- package/src/lib/plugin-manager/plugin-record-timeline.js +39 -0
- package/src/lib/plugin-manager/plugin-record-timeline.js.map +1 -0
- package/src/lib/plugin-manager/plugin-resource-drafts.d.ts +137 -0
- package/src/lib/plugin-manager/plugin-resource-drafts.js +51 -0
- package/src/lib/plugin-manager/plugin-resource-drafts.js.map +1 -0
- package/src/lib/plugin-manager/plugin-services.d.ts +94 -0
- package/src/lib/plugin-manager/plugin-services.js +153 -0
- package/src/lib/plugin-manager/plugin-services.js.map +1 -0
- package/src/lib/plugin-manager/plugin-styles-ui.d.ts +71 -0
- package/src/lib/plugin-manager/plugin-styles-ui.js +80 -0
- package/src/lib/plugin-manager/plugin-styles-ui.js.map +1 -0
- package/src/lib/plugin-manager/plugin-styles.d.ts +176 -0
- package/src/lib/plugin-manager/plugin-styles.js +186 -0
- package/src/lib/plugin-manager/plugin-styles.js.map +1 -0
- package/src/lib/plugin-manager/plugin-subprocessors.d.ts +135 -0
- package/src/lib/plugin-manager/plugin-subprocessors.js +129 -0
- package/src/lib/plugin-manager/plugin-subprocessors.js.map +1 -0
- package/src/lib/plugin-manager/plugin-tax-profile.d.ts +84 -0
- package/src/lib/plugin-manager/plugin-tax-profile.js +39 -0
- package/src/lib/plugin-manager/plugin-tax-profile.js.map +1 -0
- package/src/lib/plugin-manager/plugin-user-erasure.d.ts +53 -0
- package/src/lib/plugin-manager/plugin-user-erasure.js +84 -0
- package/src/lib/plugin-manager/plugin-user-erasure.js.map +1 -0
- package/src/lib/plugin-manager/plugin-zones.d.ts +121 -0
- package/src/lib/plugin-manager/plugin-zones.js +74 -0
- package/src/lib/plugin-manager/plugin-zones.js.map +1 -0
- package/src/lib/plugin-manager/realm-plugins.d.ts +112 -0
- package/src/lib/plugin-manager/realm-plugins.js +196 -0
- package/src/lib/plugin-manager/realm-plugins.js.map +1 -0
- package/src/lib/plugin-manager/realm-server.d.ts +54 -0
- package/src/lib/plugin-manager/realm-server.js +88 -0
- package/src/lib/plugin-manager/realm-server.js.map +1 -0
- package/src/lib/plugin-manager/record-zone-props.d.ts +126 -0
- package/src/lib/plugin-manager/record-zone-props.js +31 -0
- package/src/lib/plugin-manager/record-zone-props.js.map +1 -0
- package/src/lib/plugin-manager/site-page-hooks.d.ts +102 -0
- package/src/lib/plugin-manager/site-page-hooks.js +114 -0
- package/src/lib/plugin-manager/site-page-hooks.js.map +1 -0
- package/src/lib/plugin-manager/site-runtime.d.ts +57 -0
- package/src/lib/plugin-manager/site-runtime.js +25 -0
- package/src/lib/plugin-manager/site-runtime.js.map +1 -0
- package/src/lib/plugin-manager/usage-alert-contributors.d.ts +115 -0
- package/src/lib/plugin-manager/usage-alert-contributors.js +106 -0
- package/src/lib/plugin-manager/usage-alert-contributors.js.map +1 -0
- package/src/lib/types/ast.d.ts +199 -0
- package/src/lib/types/ast.js +20 -0
- package/src/lib/types/ast.js.map +1 -0
- package/src/lib/types/index.d.ts +20 -0
- package/src/lib/types/index.js +21 -0
- package/src/lib/types/index.js.map +1 -0
- package/src/lib/types/nodes.d.ts +608 -0
- package/src/lib/types/nodes.js +28 -0
- package/src/lib/types/nodes.js.map +1 -0
- package/src/lib/types/routing.d.ts +17 -0
- package/src/lib/types/routing.js +18 -0
- package/src/lib/types/routing.js.map +1 -0
- package/src/lib/types/screen.d.ts +23 -0
- package/src/lib/types/screen.js +18 -0
- package/src/lib/types/screen.js.map +1 -0
- package/src/lib/utils.d.ts +25 -0
- package/src/lib/utils.js +42 -0
- package/src/lib/utils.js.map +1 -0
- package/src/server.d.ts +37 -0
- package/src/server.js +55 -0
- package/src/server.js.map +1 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../libs/aglyn/src/lib/app-utils/compose-reusable-components.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2026 Aglyn LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// By path: the naming rule alone, without the icon catalog's loader beside it.\nimport { iconPathPropName } from '@aglyn/shared-data-mdi/utils/icon-path-prop-name'\nimport type {\n AglynNodeSchema,\n NodeId,\n ReusableComponentIcon,\n ReusableComponentProp,\n} from '../foundation'\nimport {\n type ReusablePropValueClass,\n reusablePropValueClass,\n} from '../foundation/definitions/property-kinds'\nimport {\n COMPONENT_NODE_ID_PREFIX,\n COMPONENT_PROP_TOKEN_PREFIX,\n INSTANCE_CARRIED_NODE_FIELDS,\n INSTANCE_CARRIED_PROPS,\n NODE_HIDE_IF_PROP,\n NODE_HIDE_UNLESS_PROP,\n REUSABLE_INSTANCE_COMPONENT_ID,\n REUSABLE_INSTANCE_PROP_VALUES_KEY,\n STYLE_OVERRIDES_ROOT_KEY,\n} from './reusable-component-keys'\nimport {\n REPEAT_DIRECTIVE_PROPS,\n REPEAT_SELF_PROP,\n repeatKey,\n withoutRepeatDirective,\n} from './expand-repeatables'\nimport { mergeNodeSx } from './merge-node-sx'\nimport {\n hasUrlScheme,\n isSafeNodeUrl,\n NODE_URL_PROPS,\n type NodeUrlProp,\n} from './node-url-policy'\nimport {\n readInstanceIconValue,\n readYesNoValue,\n resolveReusablePropValues,\n} from './reusable-prop-values'\nimport { resolveNamedTokens } from './resolve-named-tokens'\n\nexport * from './reusable-component-keys'\nexport * from './reusable-prop-values'\n\nconst isStyleRecord = (value: unknown): value is Record<string, unknown> =>\n typeof value === 'object' &&\n value !== null &&\n !Array.isArray(value) &&\n Object.keys(value).length > 0\n\n/**\n * Space-separated class lists joined in order, each name once, or `undefined`\n * when no list holds a name. A value that is not a string contributes nothing.\n */\nfunction joinClassNames(...lists: unknown[]): string | undefined {\n const names = lists\n .filter((list): list is string => typeof list === 'string')\n .flatMap((list) => list.split(/\\s+/))\n .filter(Boolean)\n return names.length ? [...new Set(names)].join(' ') : undefined\n}\n\n/**\n * Every per-instance style override an instance node carries, keyed the way\n * it is stored (AGL-1332): {@link STYLE_OVERRIDES_ROOT_KEY} for the\n * component root, and a DEFINITION-internal node id for each overridden\n * leaf. Empty for a node that is not an instance or carries none.\n *\n * Keyed on the definition's own id, never the grafted `cmp__…` id: the\n * graft id is DERIVED from the instance id, so keying on it would break the\n * moment a subtree was duplicated or an instance re-keyed, and two\n * instances of one component could not share the same authoring vocabulary.\n * Entries that are not a non-empty plain object are dropped here rather\n * than at each call site — a `null`, a string, or a cleared `{}` must read\n * as \"no override\" identically in the graft, in detach and in the panel.\n *\n * Deliberately here rather than in a render surface: this file owns what\n * an instance node looks like, and the graft below is the ONE place the\n * overrides are applied — canvas, Preview and tenant SSR all call\n * {@link composeReusableComponentNodes}, so they cannot disagree about\n * what an override means.\n */\nexport function getInstanceStyleOverrides(\n node: { componentId?: string; styleOverrides?: unknown } | undefined | null,\n): Record<string, Record<string, unknown>> {\n if (node?.componentId !== REUSABLE_INSTANCE_COMPONENT_ID) return {}\n const overrides = node?.styleOverrides as Record<string, unknown> | undefined\n if (!isStyleRecord(overrides)) return {}\n const clean: Record<string, Record<string, unknown>> = {}\n for (const [key, value] of Object.entries(overrides)) {\n if (key && isStyleRecord(value)) clean[key] = value\n }\n return clean\n}\n\n/**\n * The sx-shaped ROOT style override carried by an instance node, or\n * `undefined` when the node is not an instance or carries none — the\n * AGL-1306 half of {@link getInstanceStyleOverrides}.\n */\nexport function getInstanceRootStyleOverride(\n node: { componentId?: string; styleOverrides?: unknown } | undefined | null,\n): Record<string, unknown> | undefined {\n return getInstanceStyleOverrides(node)[STYLE_OVERRIDES_ROOT_KEY]\n}\n\n/**\n * The `{ sx }` patch one definition node takes from an instance's\n * overrides, or `undefined` when none applies (AGL-1332).\n *\n * Two layers, coarse first: the root slice when this node IS the\n * definition root, then the node's own definition-id slice. Both go\n * through `mergeNodeSx`, so a per-leaf override gets exactly the cascade\n * semantics the root one already had — a `{ md: … }` slice keeps the\n * base's narrower widths, an `@scheme dark` slice merges key-by-key, and\n * a plain property replaces only the leaf it names.\n *\n * A key naming a node the definition no longer has is simply never\n * consulted: this runs per definition node, so a component edited after\n * the override was written degrades to the component's own styling rather\n * than throwing on a page nobody has opened since.\n *\n * Returned as a patch object rather than a value so the caller can spread\n * nothing at all — writing `sx: undefined` onto a node that never had one\n * would materialize the key on every grafted leaf.\n */\nfunction instanceSxPatch(\n baseSx: unknown,\n overrides: Record<string, Record<string, unknown>>,\n defId: NodeId,\n rootId: NodeId | undefined,\n): { sx: unknown } | undefined {\n // The root is addressed by the constant, so a definition node whose id\n // merely happens to BE `root` without being the root gets nothing from\n // the root slice — the alternative is styling an arbitrary leaf from the\n // panel's root target.\n const rootSlice =\n defId === rootId ? overrides[STYLE_OVERRIDES_ROOT_KEY] : undefined\n const leafSlice =\n defId === STYLE_OVERRIDES_ROOT_KEY ? undefined : overrides[defId]\n if (!rootSlice && !leafSlice) return undefined\n let sx = baseSx\n if (rootSlice) sx = mergeNodeSx(sx, rootSlice)\n if (leafSlice) sx = mergeNodeSx(sx, leafSlice)\n return { sx }\n}\n\n/**\n * Props on a grafted definition node that an instance override must never\n * address (AGL-1899).\n *\n * `sx` has its own override layer one field up, and honouring it here would\n * leave two writers racing for one rendered value with no rule to say which\n * wins — the Styles panel would show an instance as clean while the\n * Attributes panel silently repainted it.\n */\nconst ATTR_OVERRIDE_REFUSED_PROPS = new Set(['sx'])\n\n/**\n * Every per-instance ATTRIBUTE override an instance node carries, keyed the\n * way {@link getInstanceStyleOverrides} keys styles — `root` for the\n * definition root, a definition-internal node id for anything else\n * (AGL-1899).\n *\n * Refused props are dropped HERE rather than at the write site, so a slice\n * that reached storage before a refusal existed (or by any path that did not\n * go through the panel) still cannot take effect.\n */\nexport function getInstanceAttrOverrides(\n node: { componentId?: string; attrOverrides?: unknown } | undefined | null,\n): Record<string, Record<string, unknown>> {\n if (node?.componentId !== REUSABLE_INSTANCE_COMPONENT_ID) return {}\n const overrides = node?.attrOverrides as Record<string, unknown> | undefined\n if (!isStyleRecord(overrides)) return {}\n const clean: Record<string, Record<string, unknown>> = {}\n for (const [key, value] of Object.entries(overrides)) {\n if (!key || !isStyleRecord(value)) continue\n const slice: Record<string, unknown> = {}\n for (const [prop, propValue] of Object.entries(value)) {\n if (ATTR_OVERRIDE_REFUSED_PROPS.has(prop)) continue\n slice[prop] = propValue\n }\n if (Object.keys(slice).length > 0) clean[key] = slice\n }\n return clean\n}\n\n/**\n * The `{ props }` patch one definition node takes from an instance's\n * attribute overrides, or `undefined` when none applies (AGL-1899).\n *\n * Layered coarse-first exactly like {@link instanceSxPatch} — the root slice\n * when this node IS the definition root, then the node's own id slice — so\n * the two override kinds stay one authoring model rather than two.\n *\n * The merge is one level deep, replacing only the props each slice NAMES.\n * That keeps a component free to add a prop later and still have every\n * existing instance pick up the new default, and it is deliberately not the\n * cascade `mergeNodeSx` performs: an sx object's nested records are\n * selectors (`@scheme dark`, breakpoints) that genuinely compose, while a\n * prop value is one value. Deep-merging two prop objects that merely look\n * alike would hand the renderer a third thing neither the component nor the\n * page asked for.\n */\nfunction instancePropsPatch(\n baseProps: unknown,\n overrides: Record<string, Record<string, unknown>>,\n defId: NodeId,\n rootId: NodeId | undefined,\n): { props: Record<string, unknown> } | undefined {\n const rootSlice =\n defId === rootId ? overrides[STYLE_OVERRIDES_ROOT_KEY] : undefined\n const leafSlice =\n defId === STYLE_OVERRIDES_ROOT_KEY ? undefined : overrides[defId]\n if (!rootSlice && !leafSlice) return undefined\n return {\n props: {\n ...((baseProps as Record<string, unknown> | undefined) ?? {}),\n ...(rootSlice ?? {}),\n ...(leafSlice ?? {}),\n },\n }\n}\n\n/** One styleable target inside an instance — see {@link listInstanceStyleTargets}. */\nexport interface InstanceStyleTarget {\n /** The `styleOverrides` key this target reads and writes. */\n key: string\n /** The definition-internal node id it styles. */\n componentInternalId: NodeId\n /** 0 for the component root, +1 per level down — the picker indents by it. */\n depth: number\n /** The definition node's `componentId`, so a picker can label it. */\n componentId?: string\n /** The definition node's own `name`, when the component author set one. */\n name?: string\n /** True for the component root (the AGL-1306 target). */\n isRoot: boolean\n}\n\n/**\n * The styleable targets inside one component definition, in tree order\n * (root first, then depth-first through each node's `nodes`) — what the\n * Styles panel offers when a component instance is selected (AGL-1332).\n *\n * Beside the graft on purpose: the panel must write the SAME keys the\n * graft reads, and a second walker that disagreed would offer authors\n * targets no renderer consults. Cycle-safe and unreachable-safe: a node\n * the root cannot reach is not offered, because the graft would never\n * render it either.\n */\nexport function listInstanceStyleTargets(\n definition:\n | Pick<ReusableComponentTree<any>, 'rootId' | 'nodes'>\n | null\n | undefined,\n): InstanceStyleTarget[] {\n const rootId = definition?.rootId\n const nodes = definition?.nodes\n if (!rootId || !nodes?.[rootId]) return []\n const targets: InstanceStyleTarget[] = []\n const seen = new Set<NodeId>()\n const walk = (id: NodeId, depth: number) => {\n const node = nodes[id]\n // `seen` is what bounds the walk: a definition that referenced an\n // ancestor would otherwise recurse until the stack gave out.\n if (!node || seen.has(id)) return\n seen.add(id)\n const isRoot = id === rootId\n targets.push({\n key: isRoot ? STYLE_OVERRIDES_ROOT_KEY : id,\n componentInternalId: id,\n depth,\n componentId: (node as { componentId?: string }).componentId,\n name: (node as { name?: string }).name,\n isRoot,\n })\n const children = (node as { nodes?: unknown }).nodes\n if (!Array.isArray(children)) return\n for (const childId of children as NodeId[]) {\n if (typeof childId === 'string') walk(childId, depth + 1)\n }\n }\n walk(rootId, 0)\n return targets\n}\n\n/**\n * Definitions may nest instances of other definitions; expansion runs in\n * passes capped here so a self-referencing definition can't recurse forever.\n */\nconst MAX_COMPONENT_DEPTH = 5\n\ntype NormalizedNodes<N extends AglynNodeSchema> = Record<NodeId, N>\n\n/** Stored shape of a host-level reusable component definition's tree. */\nexport interface ReusableComponentTree<\n N extends AglynNodeSchema = AglynNodeSchema,\n> {\n rootId: NodeId\n nodes: NormalizedNodes<N>\n /** Props this definition declares (AGL-1247); absent = unparameterised. */\n props?: ReusableComponentProp[]\n /**\n * The definition's chosen icon (AGL-1193), carried so every editor surface\n * that draws an instance can reach it without a second read. Nothing in\n * the graft below touches it — an instance's icon is editor chrome, and\n * the published page renders the definition's own nodes.\n */\n icon?: ReusableComponentIcon\n}\n\nfunction instancePrefix(instanceId: NodeId) {\n return `${COMPONENT_NODE_ID_PREFIX}${instanceId}__`\n}\n\n/**\n * One kind of node that STANDS FOR a tree stored on another document, and\n * where that tree comes from.\n *\n * A reusable-component instance was the first such node; a placed form is the\n * second (`componentId: 'form'`, `props.formId` → `hosts/{hostId}/forms/{id}`,\n * whose published `rootId`/`nodes` are the fields the page renders). They are\n * one mechanism described twice, so they run through one expansion rather than\n * two passes that would have to agree about id namespacing, depth bounding and\n * cycle safety — and, more sharply, could not see each other: a form placed\n * inside a shared component only exists after the component graft, and a\n * reusable instance inside a form design only exists after the form graft.\n * Passing both kinds to {@link composeReusableComponentNodes} expands each\n * against the other, in either nesting order, within the same depth bound.\n */\nexport interface PlacementKind<N extends AglynNodeSchema = AglynNodeSchema> {\n /** The `componentId` a node must carry to be expanded by this kind. */\n componentId: string\n /** The prop naming the document whose tree is grafted. */\n refProp: string\n /** Resolvable trees, keyed by the id `refProp` holds. */\n definitionsById:\n | Record<string, ReusableComponentTree<N> | undefined>\n | undefined\n /**\n * Whether a resolved graft DISCARDS what the placement node already held.\n *\n * Off for reusable instances, which never hold anything: the editor refuses\n * a drop into them (`flags.dropping: DISABLED`), so replacing the child list\n * with the grafted root is the whole of what the graft has to do.\n *\n * On for placed forms, which do — a form node accepts fields, and every form\n * on the site was built that way before the form entity existed. Those\n * inline fields are the node's OWN content, so they cannot merely be\n * unlinked: left in the map they would still be walked by every later\n * compose stage, still ship in the page payload, and still answer to any\n * scan that reads `formField` nodes out of a flat map. The subtree is\n * dropped with the child list, exactly as `detachInstanceSubtree` drops what\n * it replaces.\n *\n * ⚠️ This is the one thing here that can take content off a page that\n * renders today, so it is deliberately gated on the graft RESOLVING: a\n * placement whose document is missing, unpublished, or holds no design is\n * left untouched, inline children and all. See\n * {@link composeReusableComponentNodes}.\n */\n replacesAuthoredChildren?: boolean\n}\n\n/**\n * The declared-prop name a stored value references when it is EXACTLY one\n * `{{prop.<name>}}` token (whitespace inside the braces tolerated, matching\n * `resolveNamedTokens`' grammar), else `null`.\n *\n * Exact-match on purpose: a value that merely CONTAINS a token\n * (`\"Hi {{prop.name}}!\"`) is only partially prop-fed, so an inline edit of\n * the rendered text could not be decomposed back into a prop value — those\n * leaves stay component-owned (AGL-1304).\n */\nexport function matchComponentPropToken(value: unknown): string | null {\n if (typeof value !== 'string') return null\n const match =\n /^\\s*\\{\\{\\s*prop\\.([A-Za-z_][A-Za-z0-9_]*)\\s*\\}\\}\\s*$/.exec(value)\n return match ? match[1] : null\n}\n\n/** What feeds a grafted instance leaf — see {@link resolveInstanceLeafBinding}. */\nexport interface InstanceLeafBinding {\n /** The definition-internal node id the grafted leaf was copied from. */\n componentInternalId: NodeId\n /**\n * The declared prop whose value feeds the leaf's `contentProp`, or `null`\n * when the leaf's content is the component's own (not prop-fed).\n */\n boundProp: string | null\n}\n\n/**\n * Maps a grafted node id back to its component-internal source and the\n * declared prop (if any) feeding one of its content props (AGL-1304).\n *\n * The graft's provenance is its id scheme — `cmp__{instanceId}__{defId}`\n * (see {@link composeReusableComponentNodes}) — and this is the ONE reader\n * of that scheme, deliberately beside the writer: the canvas double-click\n * hit-test uses it today, and AGL-1306 phase 2 (inner-node style overrides)\n * and AGL-1303 phase 3 (in-place focus mode) need the same inverse mapping.\n *\n * Returns `null` when the id was not grafted from THIS instance, or when\n * the internal id is unknown to the definition — which includes leaves of a\n * NESTED instance's graft (prefixes stack per pass), whose props are fed by\n * the outer definition's own instance node, not by this one.\n *\n * `boundProp` is non-null only when the definition node's `contentProp`\n * (default `children`; pass `src` for image leaves) is exactly one\n * `{{prop.*}}` token naming a DECLARED prop — an undeclared token never\n * substitutes, so an override written for it would silently do nothing.\n *\n * Pure: no canvas, no DOM, inputs never mutated.\n */\nexport function resolveInstanceLeafBinding(\n graftedId: NodeId | null | undefined,\n instanceId: NodeId | null | undefined,\n definition:\n | Pick<ReusableComponentTree, 'nodes' | 'props'>\n | null\n | undefined,\n contentProp = 'children',\n rootId?: NodeId | null,\n): InstanceLeafBinding | null {\n if (!graftedId || !instanceId) return null\n const prefix = instancePrefix(instanceId)\n // The definition's ROOT carries the instance's own id, not a prefixed one\n // — the two are one element (AGL-2521). Without this the root is the one\n // leaf the double-click cannot reach, so a component whose root IS its text\n // stops being inline-editable through its placements.\n if (graftedId === instanceId) {\n const rootInternalId =\n rootId ??\n Object.keys(definition?.nodes ?? {}).find(\n (id) => !(definition?.nodes as Record<string, { parentId?: unknown }>)?.[id]?.parentId,\n )\n if (!rootInternalId) return null\n return resolveInstanceLeafBinding(\n `${prefix}${rootInternalId}`,\n instanceId,\n definition,\n contentProp,\n )\n }\n if (!graftedId.startsWith(prefix)) return null\n const componentInternalId = graftedId.slice(prefix.length)\n if (!componentInternalId) return null\n const defNode = definition?.nodes?.[componentInternalId]\n if (!defNode) return null\n const raw = (defNode.props as Record<string, unknown> | undefined)?.[\n contentProp\n ]\n const name = matchComponentPropToken(raw)\n const declared =\n name != null && (definition?.props ?? []).some((prop) => prop?.name === name)\n return { componentInternalId, boundProp: declared ? name : null }\n}\n\n/** An instance's own values, keyed by declared prop name (AGL-1247). */\nfunction instancePropValues(\n instanceProps: unknown,\n): Record<string, unknown> | undefined {\n const values = (instanceProps as Record<string, unknown> | undefined)?.[\n REUSABLE_INSTANCE_PROP_VALUES_KEY\n ]\n return values && typeof values === 'object' && !Array.isArray(values)\n ? (values as Record<string, unknown>)\n : undefined\n}\n\n/**\n * The text an instance currently renders for a declared prop: its override\n * when set, else the prop's `defaultValue`, else `''`. `''` counts as unset,\n * as it does in the graft — clearing an override restores the component's own\n * copy, so the inline editor and the graft agree about what the author is\n * looking at.\n */\nexport function getInstanceEffectivePropText(\n instanceProps: unknown,\n declared: ReusableComponentProp[] | undefined | null,\n propName: string,\n): string {\n return (\n resolveReusablePropValues(declared, instancePropValues(instanceProps))\n .tokens[`${COMPONENT_PROP_TOKEN_PREFIX}${propName}`] ?? ''\n )\n}\n\n/** A value a field bound to a property has nothing to receive from. */\nfunction isNothingToGive(value: unknown): boolean {\n return (\n value === undefined ||\n value === null ||\n value === '' ||\n (Array.isArray(value) && value.length === 0) ||\n matchComponentPropToken(value) != null\n )\n}\n\n/** A copy a field can own: a list is copied, so no two fields share one. */\nfunction ownValue(value: unknown): unknown {\n return Array.isArray(value) ? [...value] : value\n}\n\n/**\n * What a field bound to exactly one property token receives, by the value\n * class of that property — or `undefined` to remove the prop.\n *\n * `known` is the property's value when the caller resolved one, and\n * `substituted` the text its token became; a caller that resolved nothing\n * (a component editor drawing raw tokens) is read from the text alone.\n */\nfunction typedBindingValue(\n valueClass: ReusablePropValueClass,\n known: { value: unknown } | undefined,\n substituted: unknown,\n): unknown {\n const value = known ? known.value : substituted\n switch (valueClass) {\n case 'boolean':\n return readYesNoValue(value) === true\n case 'number': {\n if (isNothingToGive(value)) return undefined\n if (typeof value === 'number') return value\n const numeric = Number(value)\n return Number.isFinite(numeric) ? numeric : substituted\n }\n case 'icon':\n return isNothingToGive(value)\n ? undefined\n : (readInstanceIconValue(value)?.iconId ?? undefined)\n default:\n return isNothingToGive(value) ? undefined : ownValue(value)\n }\n}\n\n/**\n * The declared-prop substitution for a set of nodes, with each binding handed\n * to the element as the value its property's kind holds (AGL-2871, AGL-2893).\n *\n * The substitution itself is textual — every token becomes text and\n * `resolveNamedTokens` splices it into string props. That is right for copy\n * and wrong for the fields that do not hold copy. So a prop whose stored value\n * is EXACTLY one token naming a declared prop is finished by that prop's value\n * class (`reusablePropValueClass`):\n *\n * - `boolean` (Yes / no, a single Checkbox) — a real `true` or `false`, read\n * through {@link readYesNoValue}, because an element reading `lightbox`\n * takes the string `'false'` for a yes. Nothing to read is a no.\n * - `number` (Number, Slider) — a real number when the value is one, because an\n * element passing `size` to MUI turns `'32'` into `font-size: 32`, which no\n * browser applies. Nothing set is removed; text that is not a number is left\n * as it was authored.\n * - `icon` — the picked icon's id, with its path written into the field's\n * companion (`iconId` → `iconPath`, the rule `iconPathPropName` states)\n * from `iconPaths`. The path is what a published page draws, since it never\n * loads the icon catalog; and it is written or removed on every pass,\n * because a path left over from the component's own icon would be drawn in\n * place of the page's. Nothing picked removes both.\n * - `value` (every other kind: a Choice, a Color, a Size, a Date, a list of\n * answers, an entity) — the value exactly as the property holds it, from\n * `values`, so a list stays a list and a theme multiple stays a number.\n * Nothing set is removed, so the element keeps its own default: a\n * dropdown's empty value is not one of its options, and an element handed\n * `variant: ''` draws neither the component's variant nor its own.\n * - `text` (Text, Long text, Image, Link) — the substituted text.\n *\n * \"Nothing chosen\" includes a binding still holding its token after\n * substitution — a component editor drawing a prop that has no default —\n * which is then drawn exactly as a page that sets nothing renders it.\n *\n * The same finishing reaches a nested placement: a component placed inside\n * this definition, whose own `propValues` hand one of this definition's\n * properties on by its exact token, receives the value typed — a list, a\n * number, an icon with its path — and nothing at all where there is nothing to\n * give, so its own default applies.\n *\n * Exact match only, for the reason {@link matchComponentPropToken} gives: a\n * value that merely contains a token is text with a value inside it, and it\n * stays text. An undeclared name is never typed either — it never substitutes,\n * so there is no value to read.\n *\n * Top-level props only, and never an element's text content (`children`). The\n * binding a panel field offers writes that field's own prop; a token nested in\n * an item list is content the component spelled out, and text is text\n * whatever kind of property fills it — so both keep the textual treatment.\n *\n * An `href` or `src` a token fed is then held to the address rule — see\n * {@link holdPropFedAddresses}.\n *\n * Inputs are never mutated, and a map with no typed binding and no refused\n * address comes back exactly as the substitution left it.\n */\nexport function resolveComponentPropTokens<\n N extends AglynNodeSchema = AglynNodeSchema,\n>(\n nodes: NormalizedNodes<N>,\n declared: ReusableComponentProp[] | undefined | null,\n tokens: Record<string, string> | null | undefined,\n iconPaths?: Record<string, string> | null,\n values?: Record<string, unknown> | null,\n): NormalizedNodes<N> {\n const substituted = resolveNamedTokens(nodes, tokens)\n const typedProps = new Map<string, ReusablePropValueClass>()\n for (const prop of declared ?? []) {\n if (!prop?.name) continue\n const valueClass = reusablePropValueClass(prop)\n if (valueClass !== 'text') typedProps.set(prop.name, valueClass)\n }\n if (!typedProps.size) return holdPropFedAddresses(nodes, substituted)\n const knownValue = (name: string) =>\n values ? { value: values[name] } : undefined\n let typed: NormalizedNodes<N> | undefined\n for (const [id, node] of Object.entries(nodes ?? {})) {\n const raw = node?.props as Record<string, unknown> | undefined\n if (!raw || typeof raw !== 'object') continue\n let props: Record<string, unknown> | undefined\n const own = () =>\n (props = props ?? {\n ...(substituted[id]?.props as Record<string, unknown> | undefined),\n })\n for (const [key, value] of Object.entries(raw)) {\n if (key === 'children') continue\n const name = matchComponentPropToken(value)\n const valueClass = name ? typedProps.get(name) : undefined\n if (!name || !valueClass) continue\n const next = own()\n const finished = typedBindingValue(\n valueClass,\n knownValue(name),\n next[key],\n )\n if (finished === undefined) delete next[key]\n else next[key] = finished\n if (valueClass !== 'icon') continue\n const pathKey = iconPathPropName(key)\n if (pathKey === key) continue\n const path = finished === undefined ? undefined : iconPaths?.[name]\n if (path) next[pathKey] = path\n else delete next[pathKey]\n }\n const nested =\n node?.componentId === REUSABLE_INSTANCE_COMPONENT_ID\n ? instancePropValues(raw)\n : undefined\n if (nested) {\n let forwarded: Record<string, unknown> | undefined\n for (const [key, value] of Object.entries(nested)) {\n const name = matchComponentPropToken(value)\n const valueClass = name ? typedProps.get(name) : undefined\n if (!name || !valueClass) continue\n forwarded = forwarded ?? {\n ...instancePropValues(own()),\n }\n const known = knownValue(name)\n const given = known ? known.value : forwarded[key]\n if (isNothingToGive(given)) {\n delete forwarded[key]\n continue\n }\n if (valueClass === 'icon') {\n const icon = readInstanceIconValue(given)\n const path = iconPaths?.[name]\n forwarded[key] = icon\n ? { ...icon, ...(path && !icon.iconPath ? { iconPath: path } : {}) }\n : undefined\n if (!forwarded[key]) delete forwarded[key]\n continue\n }\n forwarded[key] = typedBindingValue(valueClass, { value: given }, given)\n }\n if (forwarded) own()[REUSABLE_INSTANCE_PROP_VALUES_KEY] = forwarded\n }\n if (!props) continue\n typed = typed ?? { ...substituted }\n typed[id] = { ...substituted[id], props } as N\n }\n return holdPropFedAddresses(nodes, typed ?? substituted)\n}\n\n/** A `{{prop.*}}` token's opening, escaped for a pattern. */\nconst PROP_TOKEN_SOURCE = `\\\\{\\\\{\\\\s*${COMPONENT_PROP_TOKEN_PREFIX.replace(\n /[.*+?^${}()|[\\]\\\\]/g,\n '\\\\$&',\n)}`\n\n/** Where a `{{prop.*}}` token opens, anywhere inside a value. */\nconst PROP_TOKEN_OPENING = new RegExp(PROP_TOKEN_SOURCE)\n\n/**\n * The bindings that open a value and that a later compose stage resolves — a\n * host token, a site variable — but not a property token, which this stage\n * resolves or never will.\n */\nconst LATER_BINDINGS_OPENING = new RegExp(\n `^(?:\\\\{\\\\{(?!${PROP_TOKEN_SOURCE.slice('\\\\{\\\\{'.length)})[^{}]*\\\\}\\\\}\\\\s*)+`,\n)\n\n/**\n * Whether a property-fed value may stay in an address prop once the\n * substitution has made it.\n *\n * The address rule, with the site's own references admitted — a screen or\n * collection link, a media-library pick — since this is the site that resolves\n * them. One exception: a value that opens with a binding a later stage\n * resolves (`{{host.url}}/about`) has no scheme until then, so the binding is\n * left to supply one and what follows it is judged as though the binding came\n * to nothing — which is what an unknown host token does — so a scheme cannot\n * be smuggled in behind it.\n */\nfunction isRenderableAddress(prop: NodeUrlProp, value: unknown): boolean {\n if (typeof value !== 'string') return false\n const address = value.trim()\n if (isSafeNodeUrl(prop, address, { siteReferences: true })) return true\n const opening = LATER_BINDINGS_OPENING.exec(address)\n if (!opening) return false\n const rest = address.slice(opening[0].length)\n return (\n rest === '' ||\n isSafeNodeUrl(prop, rest, { siteReferences: true }) ||\n !hasUrlScheme(rest)\n )\n}\n\n/**\n * `resolved` with every `href` and `src` that a `{{prop.*}}` token fed held to\n * the address rule, and removed where it fails it (AGL-2933).\n *\n * A published node's own address is held to that rule when it is published,\n * and a property's default when its declaration is — but a property's value\n * is set by whichever page places the component, or screen inside the layout,\n * long after either, and this is where it becomes the prop an element spreads\n * onto the DOM. Canvas, Preview, detach and the tenant all arrive here, so a\n * `javascript:` or `data:` value set on a property reaches none of them.\n *\n * It judges the whole value the substitution made (see\n * {@link isRenderableAddress}), so a token behind a literal scheme\n * (`https://example.com/{{prop.path}}`) stays a path on that site, and two\n * values that spell a scheme between them are refused together. A value still\n * holding its property token — an undeclared name, or the component editor's\n * raw-token view — is no address either, and a linking element reads it as\n * none.\n *\n * Only the prop goes: a button with no address is still a button. `raw` is\n * the map before substitution, which is what says a token fed the value;\n * neither map is mutated.\n */\nfunction holdPropFedAddresses<N extends AglynNodeSchema>(\n raw: NormalizedNodes<N>,\n resolved: NormalizedNodes<N>,\n): NormalizedNodes<N> {\n let held: NormalizedNodes<N> | undefined\n for (const [id, node] of Object.entries(raw ?? {})) {\n const authored = node?.props as Record<string, unknown> | undefined\n if (!authored || typeof authored !== 'object') continue\n let props: Record<string, unknown> | undefined\n for (const key of NODE_URL_PROPS) {\n const source = authored[key]\n if (typeof source !== 'string' || !PROP_TOKEN_OPENING.test(source)) continue\n const current = (\n props ?? (resolved[id]?.props as Record<string, unknown> | undefined)\n )?.[key]\n if (current === undefined || isRenderableAddress(key, current)) continue\n props = props ?? {\n ...(resolved[id]?.props as Record<string, unknown> | undefined),\n }\n delete props[key]\n }\n if (!props) continue\n held = held ?? { ...resolved }\n held[id] = { ...resolved[id], props } as N\n }\n return held ?? resolved\n}\n\n/**\n * A definition's declared props resolved over a set of its nodes for one page,\n * then the parts that page hides pruned (AGL-1314) — the single sequence the\n * component graft, detach and a composed layout all run.\n *\n * `values` is the page's own map, and `rootId` the node the prune never\n * removes. Visibility directives are evaluated on the result, never before:\n * they read `{{prop.*}}` like everything else, so pruning ahead of\n * substitution would see a token instead of the value and hide whatever the\n * definition merely MENTIONED.\n */\nexport function applyDeclaredProps<N extends AglynNodeSchema = AglynNodeSchema>(\n nodes: NormalizedNodes<N>,\n declared: ReusableComponentProp[] | undefined | null,\n values: Readonly<Record<string, unknown>> | null | undefined,\n rootId: NodeId,\n): NormalizedNodes<N> {\n const resolved = resolveReusablePropValues(declared, values)\n return pruneHiddenNodes(\n resolveComponentPropTokens(\n nodes,\n declared,\n resolved.tokens,\n resolved.iconPaths,\n resolved.values,\n ),\n rootId,\n )\n}\n\n/**\n * Whether a node's props ask for it to be dropped (AGL-1314) — see\n * {@link NODE_HIDE_IF_PROP} and {@link NODE_HIDE_UNLESS_PROP}.\n *\n * Evaluated on SUBSTITUTED props, so callers must run this after the\n * declared-prop tokens have resolved; against a raw definition node every\n * directive is still a token and reads as \"no opinion\" by design, which is\n * what keeps the component editor showing the parts a page will hide.\n */\nexport function isNodeHiddenByDirective(props: unknown): boolean {\n if (!props || typeof props !== 'object' || Array.isArray(props)) return false\n const bag = props as Record<string, unknown>\n if (readYesNoValue(bag[NODE_HIDE_IF_PROP]) === true) return true\n return readYesNoValue(bag[NODE_HIDE_UNLESS_PROP]) === false\n}\n\nfunction hasVisibilityDirective(props: unknown): boolean {\n if (!props || typeof props !== 'object' || Array.isArray(props)) return false\n const bag = props as Record<string, unknown>\n return NODE_HIDE_IF_PROP in bag || NODE_HIDE_UNLESS_PROP in bag\n}\n\n/**\n * The node minus its visibility directives — they are compose-time\n * instructions, and `Leaf` spreads whatever survives onto the component,\n * so leaving them would put `hideif=\"…\"` on the DOM of every node that\n * declared one and stayed.\n */\nfunction withoutVisibilityDirectives<N extends AglynNodeSchema>(node: N): N {\n if (!hasVisibilityDirective(node?.props)) return node\n const props = { ...(node.props as Record<string, unknown>) }\n delete props[NODE_HIDE_IF_PROP]\n delete props[NODE_HIDE_UNLESS_PROP]\n return { ...node, props: props as N['props'] }\n}\n\n/**\n * Drops every node under `rootId` whose props ask to be hidden, along with\n * its whole subtree and its entry in its parent's child list, and strips\n * the directives off everything that survives (AGL-1314).\n *\n * Structural rather than a `display: none`: an instance can already hide a\n * leaf with a per-leaf style override (AGL-1332), but that still ships the\n * markup, still fetches the image, still leaves the grid column, and still\n * leaves the control in the tab order. \"This page has no mockup\" is a\n * statement about the tree, so it is made in the tree.\n *\n * `rootId` itself is never dropped. The graft below wires the instance\n * node's single child to the definition root by id, so a self-hiding root\n * would leave a dangling reference; a component that should not appear at\n * all is a decision for the page that placed it, not for the definition.\n *\n * Returns the input unchanged when no node carries a directive, so the\n * overwhelmingly common case costs one scan and allocates nothing.\n */\nexport function pruneHiddenNodes<N extends AglynNodeSchema = AglynNodeSchema>(\n nodes: NormalizedNodes<N>,\n rootId: NodeId,\n): NormalizedNodes<N> {\n if (!nodes) return nodes\n let sawDirective = false\n for (const node of Object.values(nodes)) {\n if (hasVisibilityDirective(node?.props)) {\n sawDirective = true\n break\n }\n }\n if (!sawDirective) return nodes\n\n const hidden = new Set<NodeId>()\n const seen = new Set<NodeId>()\n const walk = (id: NodeId) => {\n const node = nodes[id]\n // `seen` bounds the walk: a definition that referenced an ancestor\n // would otherwise recurse until the stack gave out.\n if (!node || seen.has(id)) return\n seen.add(id)\n const children = Array.isArray(node.nodes) ? (node.nodes as NodeId[]) : []\n for (const childId of children) {\n if (typeof childId !== 'string' || !nodes[childId]) continue\n if (isNodeHiddenByDirective(nodes[childId]?.props)) {\n hidden.add(childId)\n for (const descendant of collectDescendantIds(nodes, childId)) {\n hidden.add(descendant)\n }\n continue\n }\n walk(childId)\n }\n }\n walk(rootId)\n\n const next: NormalizedNodes<N> = {}\n for (const [id, node] of Object.entries(nodes)) {\n if (hidden.has(id)) continue\n const kept = withoutVisibilityDirectives(node as N)\n const children = Array.isArray(kept?.nodes) ? (kept.nodes as NodeId[]) : null\n const survivors =\n children && children.some((childId) => hidden.has(childId as NodeId))\n ? children.filter((childId) => !hidden.has(childId as NodeId))\n : null\n next[id] = survivors ? ({ ...kept, nodes: survivors } as N) : kept\n }\n return next\n}\n\n/**\n * Expands reusable-component instance nodes (componentId\n * {@link REUSABLE_INSTANCE_COMPONENT_ID}, `props.refId` → definition id) by\n * grafting the referenced definition's subtree under each instance:\n *\n * - Grafted node ids are namespaced per instance (`cmp__{instanceId}__…`).\n * - The instance node keeps its identity (selection/attributes target) and\n * gains the grafted root as its only child.\n * - Unresolvable refIds leave the instance untouched — a deleted definition\n * must never take a published screen down.\n * - Definitions may contain instances of other definitions; expansion\n * repeats up to {@link MAX_COMPONENT_DEPTH} passes, which also bounds\n * accidental self-reference.\n * - A definition's declared props (AGL-1247) resolve per instance as the\n * subtree is grafted: `{{prop.name}}` tokens take that instance's\n * override, falling back to the prop's default. This is what lets one\n * hero serve eleven pages instead of being copied onto each.\n * - A grafted node asking to be hidden ({@link NODE_HIDE_IF_PROP} /\n * {@link NODE_HIDE_UNLESS_PROP}, AGL-1314) is pruned with its subtree —\n * which is how one hero renders with a mockup on `/product` and without\n * one on `/press`.\n * - Inputs are never mutated.\n *\n * `morePlacements` adds further node kinds that stand for a stored tree — a\n * placed form is the second one ({@link PlacementKind}) — expanded in the same\n * passes as instances, so the two nest inside each other in either order.\n *\n * ⛔ **A placement is expanded only when its tree RESOLVES**, meaning the\n * document is in the map AND carries a `rootId` its `nodes` actually hold. An\n * unresolvable one is left exactly as authored. That is what makes the\n * child-replacing kind safe to introduce on a live site: a form bound to an\n * entity that has never been published still renders the fields drawn on the\n * page, and the graft can only ever swap a page's copy of a form for the\n * entity's own.\n */\nexport function composeReusableComponentNodes<\n N extends AglynNodeSchema = AglynNodeSchema,\n>(\n nodes: NormalizedNodes<N>,\n definitionsById:\n | Record<string, ReusableComponentTree<N> | undefined>\n | undefined,\n morePlacements?: readonly PlacementKind<N>[],\n): NormalizedNodes<N> {\n const placements: PlacementKind<N>[] = [\n {\n componentId: REUSABLE_INSTANCE_COMPONENT_ID,\n refProp: 'refId',\n definitionsById,\n },\n ...(morePlacements ?? []),\n ].filter((placement) => placement.definitionsById)\n if (!placements.length) return nodes\n\n /**\n * The kind and tree this node stands for, or `undefined` when it stands for\n * nothing resolvable.\n *\n * The `nodes[rootId]` check is the resolution rule stated once: a document\n * whose root is not among its own nodes has no design to graft, and wiring\n * the placement's only child to an id nothing holds would blank it on the\n * page while reading, downstream, as already expanded.\n */\n const resolvePlacement = (node: N | undefined) => {\n for (const placement of placements) {\n if (node?.componentId !== placement.componentId) continue\n const refId = (node.props as any)?.[placement.refProp]\n if (typeof refId !== 'string' || !refId) continue\n const definition = placement.definitionsById?.[refId]\n if (!definition?.rootId || !definition.nodes?.[definition.rootId]) continue\n return { placement, definition }\n }\n return undefined\n }\n\n /** Expanded by an earlier pass — its children already carry its prefix. */\n const alreadyGrafted = (id: NodeId, node: N) => {\n const childIds = Array.isArray(node.nodes) ? (node.nodes as NodeId[]) : []\n return childIds.some(\n (childId) =>\n typeof childId === 'string' && childId.startsWith(instancePrefix(id)),\n )\n }\n\n let composed: NormalizedNodes<N> = nodes\n\n /*\n * WHAT A RESOLVED FORM REPLACES, DROPPED BEFORE ANYTHING IS GRAFTED.\n *\n * Ahead of the passes rather than inside them so the drop is decided against\n * the authored tree alone. Inside a pass it would race the expansions\n * running beside it: an inline field that was itself a component instance\n * could be grafted in the same pass that discards it, and its grafted\n * subtree — keyed off ids this walk never sees — would survive its own\n * parent as unreachable nodes on a published page.\n */\n const doomed = new Set<NodeId>()\n const emptied: NodeId[] = []\n for (const [id, node] of Object.entries(nodes)) {\n if (!node || !resolvePlacement(node)?.placement.replacesAuthoredChildren) {\n continue\n }\n if (alreadyGrafted(id, node)) continue\n const descendants = collectDescendantIds(nodes, id)\n if (!descendants.size) continue\n for (const descendantId of descendants) doomed.add(descendantId)\n emptied.push(id)\n }\n if (doomed.size) {\n const pruned: NormalizedNodes<N> = {}\n for (const [id, node] of Object.entries(nodes)) {\n if (!doomed.has(id)) pruned[id] = node as N\n }\n for (const id of emptied) {\n // A replaced form nested in another replaced form's authored children is\n // gone with it, so there is nothing left here to empty.\n if (pruned[id]) pruned[id] = { ...pruned[id], nodes: [] }\n }\n composed = pruned\n }\n\n /**\n * Which definition each graft brought in, keyed by the id prefix its nodes\n * carry — the ancestry a node cannot expand into again.\n *\n * `alreadyGrafted` bounds an instance against ITSELF: once a node's children\n * carry its prefix, that node is done. It cannot see the other shape, where\n * a definition's own subtree contains a FRESH instance naming the same\n * definition. Each pass mints a new instance id, so that node looks new to\n * every check there was, and the graft ran again on its own output until\n * {@link MAX_COMPONENT_DEPTH} stopped it.\n *\n * A depth cap is the right backstop for a reusable component, where\n * self-reference is an authoring mistake. It is the wrong bound for a FORM:\n * `checkFormContract` REQUIRES a form design's tree to contain a `form` node\n * naming that same form, so a placed form does not merely risk grafting into\n * itself — it always does, to the cap, every render. Six nested `<form>`\n * elements is invalid HTML, so the server parser drops the inner ones and\n * the client tree then disagrees with the server tree, which is a hydration\n * failure on a public page.\n *\n * Keyed by prefix because the prefix chain IS the ancestry: a node grafted\n * inside instance X has an id beginning with X's prefix, and one nested two\n * deep begins with both. Testing `startsWith` against a definition already\n * open above therefore asks exactly the right question — \"is this the same\n * definition, inside its own expansion?\" — while leaving a genuinely\n * different form placed inside a form free to expand.\n */\n const graftedAncestry: Array<{ prefix: string; refId: string }> = []\n\n /**\n * The definition id a node points at, and the placement that claims it.\n *\n * Scoped to placements that REPLACE authored children. That is what a form\n * does and what a reusable-component instance does not, and the difference\n * is the whole reason this guard is narrow: for a component, a definition\n * naming itself is an authoring mistake whose documented behaviour is a\n * depth-bounded expansion, and collapsing it here would change a semantic\n * this fix has no business touching. For a placement that replaces children,\n * the instance and the definition's root denote the same thing.\n */\n const replacingRefOf = (\n node: N | undefined,\n ): { refId: string; placement: PlacementKind<N> } | null => {\n for (const placement of placements) {\n if (!placement.replacesAuthoredChildren) continue\n // `componentId` sits on the NODE and the ref on its props, matching\n // `resolvePlacement` exactly — a predicate that drifted from that one\n // would not fail loudly, it would simply never match and leave the guard\n // switched off.\n if (node?.componentId !== placement.componentId) continue\n const refId = (node.props as any)?.[placement.refProp]\n if (typeof refId === 'string' && refId) return { refId, placement }\n }\n return null\n }\n\n /** Just the id, for the two call sites that do not need the placement. */\n const refIdOf = (node: N | undefined): string | null =>\n replacingRefOf(node)?.refId ?? null\n\n /**\n * Is this node an instance of a definition already open above it?\n *\n * Left completely untouched when so — not pruned, not emptied. An unexpanded\n * form node renders its own authored children, which is the same thing an\n * unresolvable ref does, and matches the rule that a missing definition must\n * never take a published page down.\n */\n const withinOwnExpansion = (id: NodeId, node: N): boolean => {\n const refId = refIdOf(node)\n if (!refId) return false\n return graftedAncestry.some(\n (entry) => entry.refId === refId && id.startsWith(entry.prefix),\n )\n }\n\n for (let depth = 0; depth < MAX_COMPONENT_DEPTH; depth++) {\n const pending = Object.entries(composed).filter(\n ([id, node]) =>\n Boolean(resolvePlacement(node)) &&\n !alreadyGrafted(id, node) &&\n !withinOwnExpansion(id, node),\n )\n if (!pending.length) break\n\n const next: NormalizedNodes<N> = { ...composed }\n for (const [instanceId, instanceNode] of pending) {\n const definition = (\n resolvePlacement(instanceNode) as {\n definition: ReusableComponentTree<N>\n }\n ).definition\n const prefix = instancePrefix(instanceId)\n // Recorded BEFORE the subtree is written, so the nodes this graft is\n // about to produce are already inside its ancestry when the next pass\n // considers them.\n const grafting = refIdOf(instanceNode)\n if (grafting) graftedAncestry.push({ prefix, refId: grafting })\n const prefixId = (id: NodeId) => `${prefix}${id}`\n // Style overrides (AGL-1306 root, AGL-1332 per leaf): merged over\n // each definition node's own sx as this instance's copy is grafted —\n // per-instance scope exists only here, exactly like the declared-prop\n // substitution below. Merging into the graft (rather than a renderer\n // patch) is what gives canvas/Preview/tenant parity for free, and\n // reading the definition's CURRENT nodes each pass is why an override\n // can never pin the instance to an old component version.\n //\n // Per-leaf is not a nicety: a component's text leaves usually set\n // their OWN colour, so a root-level `color` never reaches them and an\n // instance given a white background renders white-on-white (AGL-1318).\n const styleOverrides = getInstanceStyleOverrides(\n instanceNode as { componentId?: string; styleOverrides?: unknown },\n )\n // Attribute overrides (AGL-1899) ride the same graft for the same\n // reason: this is the one point where per-instance scope exists, so\n // merging here is what makes canvas, Preview and tenant SSR agree\n // without any of them knowing an override happened.\n //\n // Applied to the props BEFORE `resolveNamedTokens` below, which is\n // what lets an override be written in `{{prop.*}}`/`{{var:id}}` and\n // still resolve, and what makes an override on a bound prop beat the\n // component's own binding — the more specific placement wins.\n const attrOverrides = getInstanceAttrOverrides(\n instanceNode as { componentId?: string; attrOverrides?: unknown },\n )\n\n const grafted: NormalizedNodes<N> = {}\n for (const [defId, defNode] of Object.entries(definition.nodes)) {\n if (!defNode) continue\n grafted[prefixId(defId)] = {\n ...defNode,\n $id: prefixId(defNode.$id ?? defId),\n parentId:\n defId === definition.rootId\n ? instanceId\n : defNode.parentId != null\n ? prefixId(defNode.parentId)\n : defNode.parentId,\n ...(Array.isArray(defNode.nodes) && {\n nodes: (defNode.nodes as NodeId[]).map((childId) =>\n typeof childId === 'string' ? prefixId(childId) : childId,\n ),\n }),\n ...((instanceSxPatch(\n defNode.sx,\n styleOverrides,\n defId,\n definition.rootId,\n ) ?? {}) as any),\n ...((instancePropsPatch(\n defNode.props,\n attrOverrides,\n defId,\n definition.rootId,\n ) ?? {}) as any),\n }\n }\n // Declared props (AGL-1247) substitute HERE, on this instance's copy\n // of the subtree — the only point in the pipeline where per-instance\n // scope exists, since after the merge every grafted node is just\n // another entry in one flat map.\n //\n // The value lands in a real string prop and compose runs graft →\n // repeatables → `resolveNodesBindings`, so a `{{var:id}}` typed into\n // an override still resolves downstream for free. A field bound to a\n // prop that is not text is finished by that prop's kind instead — see\n // `resolveComponentPropTokens` — and the parts this page hides are\n // pruned from the result (`applyDeclaredProps`).\n Object.assign(\n next,\n applyDeclaredProps(\n grafted,\n definition.props,\n instancePropValues(instanceNode.props),\n prefixId(definition.rootId),\n ),\n )\n /*\n * A definition whose ROOT names the definition itself is grafted\n * UNWRAPPED — its root's children attach to the instance, and the\n * duplicate root is dropped.\n *\n * Bounding the recursion above stops the runaway, but one graft of a\n * self-naming design still produces two of the same element nested: the\n * placed node, and the design's root inside it. For a form that is a\n * `<form>` inside a `<form>`, which is invalid HTML — the server parser\n * drops the inner one, the client keeps it, and the two trees disagree.\n * Six of them or two, the page still fails to hydrate.\n *\n * Unwrapping is not a special case bolted on for forms: the instance and\n * the definition's root denote THE SAME THING here, and rendering both\n * was always the duplicate. `checkFormContract` is what makes a form\n * design always take this shape, so for forms this branch is the normal\n * path rather than the exception.\n *\n * The instance keeps its own props: it is the node the page authored,\n * carrying the id everything else resolves against.\n */\n const graftedRootId = prefixId(definition.rootId)\n const definitionRoot = definition.nodes[definition.rootId] as N | undefined\n const rootNamesItself =\n Boolean(grafting) && refIdOf(definitionRoot) === grafting\n const graftedRoot = next[graftedRootId]\n if (rootNamesItself && graftedRoot) {\n const adopted = Array.isArray(graftedRoot.nodes)\n ? (graftedRoot.nodes as NodeId[])\n : []\n for (const childId of adopted) {\n if (next[childId]) {\n next[childId] = { ...next[childId], parentId: instanceId }\n }\n }\n delete next[graftedRootId]\n next[instanceId] = { ...instanceNode, nodes: adopted }\n } else if (graftedRoot) {\n /*\n * THE INSTANCE AND THE DEFINITION'S ROOT ARE ONE ELEMENT (AGL-2521).\n *\n * The graft used to keep both — the instance as a container with the\n * definition's root inside it — so every placement published a `div`\n * the author never drew. On `aglyn.com` that was four of them on the\n * home page, one per placement, each sitting between a landmark and\n * its parent and breaking any direct-child selector the layout wrote.\n *\n * So the root TAKES THE INSTANCE'S PLACE: same id, same parent, same\n * slot in the parent's child list. Its own grafted id disappears and\n * its children keep theirs, which is what leaves the `cmp__{instance}\n * __{defId}` scheme — and everything reading it, from per-leaf\n * overrides to {@link resolveInstanceLeafBinding} — untouched.\n *\n * Keeping the INSTANCE'S id rather than the root's is the half that\n * matters: interactions, animations and analytics are all keyed to the\n * node the page authored, and a swap to the prefixed id would silently\n * drop every one of them.\n *\n * What the instance contributed as an element comes with it. Its `sx`\n * merges OVER the root's, because a placement styling its component is\n * the more specific of the two. Its universal directives — hide,\n * animate — move across for the same reason: they were authored\n * against \"this placement\", which is now this element. What stays\n * behind is the bookkeeping that only ever addressed the wrapper:\n * `refId`, `name`, the declared-prop values and the override slices,\n * all of them already consumed by the graft above.\n */\n /*\n * Interactions come from BOTH nodes, root's first.\n *\n * They are keyed to the element by node id, and after the merge one\n * element answers to two authors: the component, which wrote the\n * choreography its internals rely on, and the placement, which wrote\n * whatever this page wants on top. Keeping only one side silently\n * drops the other's — and because the instance keeps its own id, the\n * side that would go missing is the page's, on the very node whose id\n * it is.\n *\n * Root's run first for the reason the host actions do in\n * `getClientAutomations`: the more general enrolls before the more\n * specific, which is the order a page is read in.\n *\n * `interactions` is declared on `NodeSchema`, one layer above the\n * `AglynNodeSchema` this function is generic over, so both are read\n * off the node rather than through the type.\n */\n const interactionsOf = (node: unknown): readonly unknown[] => {\n const value = (node as { interactions?: unknown })?.interactions\n return Array.isArray(value) ? value : []\n }\n const mergedInteractions = [\n ...interactionsOf(graftedRoot),\n ...interactionsOf(instanceNode),\n ]\n const carried: Record<string, unknown> = {}\n for (const key of INSTANCE_CARRIED_PROPS) {\n const value = (instanceNode.props as Record<string, unknown>)?.[key]\n if (value !== undefined) carried[key] = value\n }\n /*\n * A placement's repeat moves across too, and the element repeats\n * ITSELF (AGL-3111).\n *\n * It is the other universal directive authored against \"this\n * placement\": the page asked for one copy of the component per record.\n * After the merge that component is an element whose children are the\n * component's own, which would read as the item template, so the scope\n * is stated rather than left to the child list. The placement's repeat\n * replaces one on the component's root rather than mixing with it —\n * repeats do not nest, and a filter meant for the root's rows applied\n * to the placement's would be neither author's.\n */\n const repeatsPlacement = repeatKey(instanceNode) !== ''\n if (repeatsPlacement) {\n for (const key of REPEAT_DIRECTIVE_PROPS) {\n const value = (instanceNode.props as Record<string, unknown>)?.[key]\n if (value !== undefined) carried[key] = value\n }\n carried[REPEAT_SELF_PROP] = true\n }\n const rootProps = repeatsPlacement\n ? withoutRepeatDirective(graftedRoot).props\n : graftedRoot.props\n /*\n * Classes from BOTH nodes, the component root's first.\n *\n * A class names the element for the site's stylesheet and for the\n * runtime: ⋮ ▸ Start hidden writes `aglyn-hidden` into the placement's\n * `props.className`, and the show/hide steps toggle that class on the\n * element answering to the placement's id, which after the merge is\n * this one. Keeping either list alone drops the other author's names,\n * so the two are joined, each name once, in `props` and on the node.\n */\n const propsClassName = joinClassNames(\n (graftedRoot.props as Record<string, unknown> | undefined)?.[\n 'className'\n ],\n (instanceNode.props as Record<string, unknown> | undefined)?.[\n 'className'\n ],\n )\n if (propsClassName) carried['className'] = propsClassName\n const nodeClassName = joinClassNames(\n (graftedRoot as { className?: unknown }).className,\n (instanceNode as { className?: unknown }).className,\n )\n // The override slices and the reference are DOCUMENT state living on\n // the node beside `sx`, not props — the renderer never spreads them at\n // an element — so they ride along rather than being consumed and\n // dropped. A composed map that is saved back must still carry what the\n // author set on this placement (AGL-1306/AGL-1899), and a re-compose\n // is a no-op because the merged node no longer answers to\n // `reusableInstance`.\n const documentState: Record<string, unknown> = {}\n for (const key of INSTANCE_CARRIED_NODE_FIELDS) {\n const value = (instanceNode as Record<string, unknown>)[key]\n if (value !== undefined) documentState[key] = value\n }\n const mergedSx = mergeNodeSx(graftedRoot.sx, instanceNode.sx)\n const merged = {\n ...graftedRoot,\n $id: instanceId,\n parentId: instanceNode.parentId,\n ...documentState,\n ...(mergedSx === undefined ? {} : { sx: mergedSx as N['sx'] }),\n // Only when there is something to say: materializing an empty\n // `props` on a node that had none is a visible difference to\n // everything that asks whether a node was authored with any.\n ...(rootProps !== undefined || Object.keys(carried).length\n ? { props: { ...(rootProps as object), ...carried } }\n : {}),\n ...(nodeClassName ? { className: nodeClassName } : {}),\n // Absent rather than empty, like `props` above: a node the author\n // gave no choreography is one that carries no such key anywhere\n // else in the pipeline.\n ...(mergedInteractions.length\n ? { interactions: mergedInteractions }\n : {}),\n /*\n * The eye on the placement's hierarchy row hides the element the\n * placement became.\n *\n * Either author may hide it: the component, on its own root, which\n * arrives with the spread above, or the page, on the placement. Only\n * a hiding flag is carried, never a showing one: `false` and absent\n * mean the same thing on a node, so a placement whose eye was never\n * touched cannot bring back a root the component hid. Read off the\n * node for the reason `interactions` is: `hidden` is declared on\n * `NodeSchema`, above the type this function is generic over.\n */\n ...((instanceNode as { hidden?: unknown }).hidden\n ? { hidden: true }\n : {}),\n } as N\n for (const childId of Array.isArray(merged.nodes)\n ? (merged.nodes as NodeId[])\n : []) {\n if (next[childId]) {\n next[childId] = { ...next[childId], parentId: instanceId }\n }\n }\n delete next[graftedRootId]\n next[instanceId] = merged\n } else {\n /*\n * The root was pruned by its own visibility directive, so there is\n * nothing to take the instance's place. The instance stays as an empty\n * container rather than vanishing: its own hide directive has not been\n * evaluated yet, and removing a node the later passes still expect to\n * walk would strand its parent's child list.\n */\n next[instanceId] = {\n ...instanceNode,\n nodes: [],\n }\n }\n }\n composed = next\n }\n return composed\n}\n\n/**\n * Ids of every descendant of `rootId` reachable through `nodes` arrays —\n * the root itself excluded, unknown and repeated ids skipped, so a cycle\n * cannot hang the walk.\n *\n * Child lists are the only edges followed, never `parentId`. That is the\n * published renderer's own reach from the document root, which is why\n * `pageVideoObjects` asks this which Video nodes a page draws (AGL-2957).\n */\nexport function collectDescendantIds<N extends AglynNodeSchema>(\n nodes: NormalizedNodes<N>,\n rootId: NodeId,\n): Set<NodeId> {\n const found = new Set<NodeId>()\n const root = nodes?.[rootId]\n const queue: NodeId[] = Array.isArray(root?.nodes)\n ? [...(root.nodes as NodeId[])]\n : []\n while (queue.length) {\n const id = queue.shift() as NodeId\n if (found.has(id) || id === rootId || !nodes[id]) continue\n found.add(id)\n const children = nodes[id]?.nodes\n if (Array.isArray(children)) queue.push(...(children as NodeId[]))\n }\n return found\n}\n\n/**\n * Materializes the instance at `instanceId` into a plain, freely editable\n * copy of what it was RENDERING (AGL-1314) — what \"Detach from component\"\n * does, and the inverse of {@link replaceSubtreeWithInstance}.\n *\n * Deliberately here, beside the graft, because \"what the instance rendered\"\n * is a question only {@link composeReusableComponentNodes} can answer. The\n * console used to copy `definition.nodes` verbatim, which is the whole bug:\n * the definition's leaves hold `{{prop.headline}}` TOKENS, not text, so a\n * detached hero rendered its own markers and the author's copy was gone.\n * A second, simpler materializer will always drift from the renderer —\n * so this one runs the renderer's own steps:\n *\n * - Declared props (AGL-1247) resolve through {@link applyDeclaredProps},\n * exactly as the graft does: the instance's override, else the\n * definition's default. Every string prop is walked,\n * so an image's `src` bakes to the bound media for free — the token is\n * substituted by name, not by which prop happens to hold it.\n * - The style overrides (AGL-1306 root, AGL-1332 per leaf) merge over the\n * matching definition node's own sx, so the copy keeps the look the page\n * was showing rather than snapping back to the component's base styling.\n * Every node is patched, not just the root: an instance re-coloured to a\n * white band with black copy must detach as a white band with black copy.\n * - Ids are FRESH (`createId`), never the `cmp__…` graft namespace: a\n * detached copy is an ordinary subtree, and leaving graft ids behind\n * would collide the next time an instance of the same definition\n * expanded here. Only the root keeps the instance's id, so the parent's\n * child list, the undo stack and the selection all stay valid.\n * - Anything hanging under the instance (a pre-grafted layout-chrome\n * subtree, AGL-1218) is dropped with it; the copy replaces the whole\n * thing.\n *\n * A missing instance, a node that is not an instance, or a definition\n * without a resolvable root returns `nodes` UNCHANGED — detach must never\n * be the thing that empties a screen. Inputs are never mutated.\n */\nexport function detachInstanceSubtree<\n N extends AglynNodeSchema = AglynNodeSchema,\n>(\n nodes: NormalizedNodes<N>,\n instanceId: NodeId,\n definition:\n | Pick<ReusableComponentTree<N>, 'rootId' | 'nodes' | 'props'>\n | null\n | undefined,\n createId: () => NodeId,\n): NormalizedNodes<N> {\n const instanceNode = nodes?.[instanceId]\n if (instanceNode?.componentId !== REUSABLE_INSTANCE_COMPONENT_ID) {\n return nodes\n }\n const rootId = definition?.rootId\n if (!rootId || !definition?.nodes?.[rootId]) return nodes\n\n // Fresh ids for everything but the root, which inherits the instance's.\n // `createId` is injected so this stays pure (and specs stay readable);\n // the loop re-rolls rather than trusting uniqueness, because a collision\n // here would silently overwrite an unrelated node on the page.\n const taken = new Set<NodeId>(Object.keys(nodes))\n const idMap: Record<NodeId, NodeId> = { [rootId]: instanceId }\n for (const defId of Object.keys(definition.nodes)) {\n if (idMap[defId] != null) continue\n let fresh = createId()\n for (\n let attempt = 0;\n (!fresh || taken.has(fresh)) && attempt < 10;\n attempt++\n ) {\n fresh = createId()\n }\n taken.add(fresh)\n idMap[defId] = fresh\n }\n\n const styleOverrides = getInstanceStyleOverrides(\n instanceNode as { componentId?: string; styleOverrides?: unknown },\n )\n const attrOverrides = getInstanceAttrOverrides(\n instanceNode as { componentId?: string; attrOverrides?: unknown },\n )\n const copied: NormalizedNodes<N> = {}\n for (const [defId, defNode] of Object.entries(definition.nodes)) {\n if (!defNode) continue\n const newId = idMap[defId]\n copied[newId] = {\n ...defNode,\n $id: newId,\n parentId:\n defId === rootId\n ? (instanceNode.parentId ?? null)\n : defNode.parentId != null\n ? (idMap[defNode.parentId] ?? null)\n : (defNode.parentId ?? null),\n ...(Array.isArray(defNode.nodes) && {\n nodes: (defNode.nodes as NodeId[]).map((childId) =>\n typeof childId === 'string' ? (idMap[childId] ?? childId) : childId,\n ),\n }),\n // The SAME patch the graft applies, node for node (AGL-1332) — the\n // detached copy has to look identical to what the page was showing,\n // and a per-leaf override baked only at the root would repaint every\n // headline the moment an author detached.\n ...((instanceSxPatch(defNode.sx, styleOverrides, defId, rootId) ??\n {}) as any),\n // Attribute overrides bake in for the same reason (AGL-1899): a\n // detached copy that reverted to the component's own `variant` would\n // change under the author at the moment they asked for a fork.\n ...((instancePropsPatch(defNode.props, attrOverrides, defId, rootId) ??\n {}) as any),\n }\n }\n\n const doomed = collectDescendantIds(nodes, instanceId)\n const next: NormalizedNodes<N> = {}\n for (const [id, node] of Object.entries(nodes)) {\n if (id === instanceId || doomed.has(id)) continue\n next[id] = node as N\n }\n // Detach must materialize what the instance was RENDERING, so the parts\n // this page hid (AGL-1314) are absent from the copy too — a detached hero\n // that grew its mockup back is the same class of bug as one that rendered\n // `{{prop.headline}}`.\n return Object.assign(\n next,\n applyDeclaredProps(\n copied,\n definition.props,\n instancePropValues(instanceNode.props),\n instanceId,\n ),\n )\n}\n\n/**\n * The definition a subtree becomes when it is promoted (AGL-2908): the\n * element at `rootId` and everything under it, as a component document's own\n * `nodes` map.\n *\n * The other half of \"Save as reusable component\", beside\n * {@link replaceSubtreeWithInstance}: this one says what the new document\n * holds, that one says what the promoting document keeps. Both are here so\n * neither can drift from what the graft expects to read back.\n *\n * - The promoted root's `parentId` is dropped. In its old document it hung\n * from a section; in its own it IS the document, and a definition whose\n * root still points at a parent it no longer has grafts nothing.\n * - Editor-only fields go: `componentSchema` is the palette's own object and\n * `resolvedProps` is a render of the props beside them, so storing either\n * writes a snapshot of the editor into a document the renderer reads.\n * - Unknown `rootId` gives an empty map, and the input is never mutated.\n *\n * Child lists are the only edges followed, so an element the subtree does not\n * reach is not carried along even if it claims the root as its parent.\n */\nexport function reusableComponentDefinitionFrom<\n N extends AglynNodeSchema = AglynNodeSchema,\n>(nodes: NormalizedNodes<N>, rootId: NodeId): NormalizedNodes<N> {\n const root = nodes?.[rootId]\n if (!root) return {}\n const definition: NormalizedNodes<N> = {}\n for (const id of [rootId, ...collectDescendantIds(nodes, rootId)]) {\n const node = nodes[id]\n if (!node) continue\n const {\n componentSchema: _schema,\n resolvedProps: _resolved,\n ...stored\n } = node as N & { componentSchema?: unknown; resolvedProps?: unknown }\n definition[id] = (id === rootId ? { ...stored, parentId: null } : stored) as N\n }\n return definition\n}\n\n/**\n * Replaces the subtree rooted at `rootId` with an instance of `definitionId`\n * (AGL-1193) — what \"Save as reusable component\" does to the tree it was\n * promoted from.\n *\n * Without this the promoting document keeps an inline *copy*: the one place\n * guaranteed never to track the component it created, silently. Deliberately\n * in this file so the swap and {@link composeReusableComponentNodes} cannot\n * drift about what an instance node looks like.\n *\n * - The instance keeps the promoted root's `$id` and `parentId`, so the\n * parent's child list, the undo stack and the current selection all stay\n * valid — the mirror of the detach path, which reuses the instance id.\n * - Every descendant is dropped; its content now lives in the definition.\n * - `displayName` rides along as a prop purely so the editor placeholder can\n * name what it stands for (definitions are not grafted into the canvas).\n * - Unknown `rootId` is a no-op, and the input is never mutated.\n */\nexport function replaceSubtreeWithInstance<\n N extends AglynNodeSchema = AglynNodeSchema,\n>(\n nodes: NormalizedNodes<N>,\n rootId: NodeId,\n definitionId: string,\n displayName?: string,\n): NormalizedNodes<N> {\n const root = nodes?.[rootId]\n if (!root || !definitionId) return nodes\n\n // Descendants only — the root is replaced, not removed.\n const doomed = collectDescendantIds(nodes, rootId)\n\n const next: NormalizedNodes<N> = {}\n for (const [id, node] of Object.entries(nodes)) {\n if (!doomed.has(id)) next[id] = node as N\n }\n next[rootId] = {\n $id: rootId,\n parentId: root.parentId ?? null,\n componentId: REUSABLE_INSTANCE_COMPONENT_ID,\n pluginId: 'mui',\n props: {\n refId: definitionId,\n ...(displayName && { name: displayName }),\n },\n nodes: [],\n } as unknown as N\n return next\n}\n\n/**\n * The icon path an instance node should be drawn with (AGL-1193), or\n * `undefined` when the node is not an instance, its definition is unknown,\n * or that definition chose no icon — every one of which means \"fall back to\n * the component schema's own glyph\".\n *\n * The visual half of `getNodeLabelShort`: an instance stands for one\n * specific component, so a hierarchy of promoted sections drawn with one\n * repeated package glyph tells the author nothing. Unlike the label, the\n * icon is NOT denormalized onto the instance — it is read live off the\n * definition, so changing a component's icon updates every instance already\n * placed instead of only the ones inserted afterwards.\n *\n * Deliberately here rather than in the canvas manager: this file owns what\n * an instance node looks like, and a second reader that disagreed would draw\n * definition icons on nodes the graft does not treat as instances.\n *\n * Returns only the stored `iconPath`. Resolving `iconId` would need the\n * ~2.9 MB icon catalog, which render surfaces never load — and the lookup\n * that \"helpfully\" substitutes a default is what made every icon a \"help\"\n * glyph in AGL-1212.\n */\nexport function resolveInstanceIconPath(\n node:\n | { componentId?: string; props?: unknown }\n | undefined\n | null,\n definitionsById:\n | Record<string, { icon?: ReusableComponentIcon } | undefined>\n | undefined\n | null,\n): string | undefined {\n if (!node || !definitionsById) return undefined\n if (node.componentId !== REUSABLE_INSTANCE_COMPONENT_ID) return undefined\n const refId = (node.props as { refId?: unknown } | undefined)?.refId\n if (typeof refId !== 'string' || !refId) return undefined\n return definitionsById[refId]?.icon?.iconPath || undefined\n}\n\n/**\n * Whether a node map contains an instance of `definitionId` (AGL-703).\n *\n * The inverse of the graft above, and deliberately in the same file: a\n * \"Used by\" card that disagreed with {@link composeReusableComponentNodes}\n * about what counts as a reference would report \"used nowhere\" for\n * something the renderer does expand, which is an invitation to delete it.\n *\n * Scans ONLY direct instances. Callers wanting transitive usage must scan\n * definitions too — a definition may nest instances of other definitions,\n * so \"used by no screen\" does not mean \"used by nothing\".\n */\nexport function nodesReferenceComponent(\n nodes: Record<string, AglynNodeSchema | undefined> | undefined | null,\n definitionId: string,\n): boolean {\n if (!nodes || !definitionId) return false\n return Object.values(nodes).some(\n (node) =>\n node?.componentId === REUSABLE_INSTANCE_COMPONENT_ID &&\n (node.props as { refId?: unknown } | undefined)?.refId === definitionId,\n )\n}\n\n/**\n * Every definition id a node map renders, DIRECTLY or through another\n * definition (AGL-1898).\n *\n * {@link nodesReferenceComponent} answers the same question for one id and\n * scans direct instances only — its own doc says a caller wanting transitive\n * usage \"must scan definitions too\". This is that scan, kept beside the\n * graft for the same reason: a caller that disagreed with\n * {@link composeReusableComponentNodes} about what a document references\n * would be wrong about exactly the nested case the canvas draws.\n *\n * Why it exists here rather than at a call site. A screen's canvas re-grafts\n * when the host's definitions map changes, which is the whole of AGL-1898's\n * phase-2 transport — but that map changes whenever ANY component in the\n * host is published, most of them not on this page. Deciding whether a\n * change is this document's business needs the transitive set, because the\n * usual shared component is reached through a nav or a card rather than\n * placed on the screen itself.\n *\n * - Unresolvable ids are INCLUDED. A screen referencing a definition that is\n * unpublished, deleted, or simply not in the map yet still references it;\n * a caller filtering to \"what can expand\" can intersect with its own map,\n * whereas an id dropped here cannot be recovered.\n * - Cycles terminate: an id already collected is never re-walked, which\n * bounds a self-referencing definition the same way\n * {@link MAX_COMPONENT_DEPTH} bounds the graft.\n * - Traversal is over the definition's stored `nodes`, NOT a composed tree,\n * so it costs nothing and cannot be thrown off by grafted ids.\n */\nexport function collectReferencedComponentIds(\n nodes: Record<string, AglynNodeSchema | undefined> | undefined | null,\n definitionsById?:\n | Record<string, { nodes?: unknown } | undefined>\n | undefined\n | null,\n): Set<string> {\n const found = new Set<string>()\n const directRefIds = (\n source: Record<string, AglynNodeSchema | undefined> | undefined | null,\n ) => {\n const ids: string[] = []\n for (const node of Object.values(source ?? {})) {\n if (node?.componentId !== REUSABLE_INSTANCE_COMPONENT_ID) continue\n const refId = (node.props as { refId?: unknown } | undefined)?.refId\n if (typeof refId === 'string' && refId) ids.push(refId)\n }\n return ids\n }\n\n const queue = directRefIds(nodes)\n while (queue.length) {\n const refId = queue.shift() as string\n if (found.has(refId)) continue\n found.add(refId)\n const definition = definitionsById?.[refId]\n if (!definition?.nodes) continue\n queue.push(\n ...directRefIds(\n definition.nodes as Record<string, AglynNodeSchema | undefined>,\n ),\n )\n }\n return found\n}\n\nexport default composeReusableComponentNodes\n"],"names":["iconPathPropName","reusablePropValueClass","COMPONENT_NODE_ID_PREFIX","COMPONENT_PROP_TOKEN_PREFIX","INSTANCE_CARRIED_NODE_FIELDS","INSTANCE_CARRIED_PROPS","NODE_HIDE_IF_PROP","NODE_HIDE_UNLESS_PROP","REUSABLE_INSTANCE_COMPONENT_ID","REUSABLE_INSTANCE_PROP_VALUES_KEY","STYLE_OVERRIDES_ROOT_KEY","REPEAT_DIRECTIVE_PROPS","REPEAT_SELF_PROP","repeatKey","withoutRepeatDirective","mergeNodeSx","hasUrlScheme","isSafeNodeUrl","NODE_URL_PROPS","readInstanceIconValue","readYesNoValue","resolveReusablePropValues","resolveNamedTokens","isStyleRecord","value","Array","isArray","Object","keys","length","joinClassNames","lists","names","filter","list","flatMap","split","Boolean","Set","join","undefined","getInstanceStyleOverrides","node","componentId","overrides","styleOverrides","clean","key","entries","getInstanceRootStyleOverride","instanceSxPatch","baseSx","defId","rootId","rootSlice","leafSlice","sx","ATTR_OVERRIDE_REFUSED_PROPS","getInstanceAttrOverrides","attrOverrides","slice","prop","propValue","has","instancePropsPatch","baseProps","props","listInstanceStyleTargets","definition","nodes","targets","seen","walk","id","depth","add","isRoot","push","componentInternalId","name","children","childId","MAX_COMPONENT_DEPTH","instancePrefix","instanceId","matchComponentPropToken","match","exec","resolveInstanceLeafBinding","graftedId","contentProp","defNode","prefix","rootInternalId","find","parentId","startsWith","raw","declared","some","boundProp","instancePropValues","instanceProps","values","getInstanceEffectivePropText","propName","tokens","isNothingToGive","ownValue","typedBindingValue","valueClass","known","substituted","numeric","Number","isFinite","iconId","resolveComponentPropTokens","iconPaths","typedProps","Map","set","size","holdPropFedAddresses","knownValue","typed","own","get","next","finished","pathKey","path","nested","forwarded","given","icon","iconPath","PROP_TOKEN_SOURCE","replace","PROP_TOKEN_OPENING","RegExp","LATER_BINDINGS_OPENING","isRenderableAddress","address","trim","siteReferences","opening","rest","resolved","held","authored","source","test","current","applyDeclaredProps","pruneHiddenNodes","isNodeHiddenByDirective","bag","hasVisibilityDirective","withoutVisibilityDirectives","sawDirective","hidden","descendant","collectDescendantIds","kept","survivors","composeReusableComponentNodes","definitionsById","morePlacements","placements","refProp","placement","resolvePlacement","refId","alreadyGrafted","childIds","composed","doomed","emptied","replacesAuthoredChildren","descendants","descendantId","pruned","graftedAncestry","replacingRefOf","refIdOf","withinOwnExpansion","entry","pending","instanceNode","grafting","prefixId","grafted","$id","map","assign","graftedRootId","definitionRoot","rootNamesItself","graftedRoot","adopted","interactionsOf","interactions","mergedInteractions","carried","repeatsPlacement","rootProps","propsClassName","nodeClassName","className","documentState","mergedSx","merged","found","root","queue","shift","detachInstanceSubtree","createId","taken","idMap","fresh","attempt","copied","newId","reusableComponentDefinitionFrom","componentSchema","_schema","resolvedProps","_resolved","stored","replaceSubtreeWithInstance","definitionId","displayName","pluginId","resolveInstanceIconPath","nodesReferenceComponent","collectReferencedComponentIds","directRefIds","ids"],"mappings":";;AAAA;;;;;;;;;;;;;;;CAeC,GAED,+EAA+E;AAC/E,SAASA,gBAAgB,QAAQ,mDAAkD;AAOnF,SAEEC,sBAAsB,QACjB,8CAA0C;AACjD,SACEC,wBAAwB,EACxBC,2BAA2B,EAC3BC,4BAA4B,EAC5BC,sBAAsB,EACtBC,iBAAiB,EACjBC,qBAAqB,EACrBC,8BAA8B,EAC9BC,iCAAiC,EACjCC,wBAAwB,QACnB,+BAA2B;AAClC,SACEC,sBAAsB,EACtBC,gBAAgB,EAChBC,SAAS,EACTC,sBAAsB,QACjB,0BAAsB;AAC7B,SAASC,WAAW,QAAQ,qBAAiB;AAC7C,SACEC,YAAY,EACZC,aAAa,EACbC,cAAc,QAET,uBAAmB;AAC1B,SACEC,qBAAqB,EACrBC,cAAc,EACdC,yBAAyB,QACpB,4BAAwB;AAC/B,SAASC,kBAAkB,QAAQ,4BAAwB;AAE3D,cAAc,+BAA2B;AACzC,cAAc,4BAAwB;AAEtC,MAAMC,gBAAgB,CAACC,QACrB,OAAOA,UAAU,YACjBA,UAAU,QACV,CAACC,MAAMC,OAAO,CAACF,UACfG,OAAOC,IAAI,CAACJ,OAAOK,MAAM,GAAG;AAE9B;;;CAGC,GACD,SAASC,eAAe,GAAGC,KAAgB;IACzC,MAAMC,QAAQ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EA,eAAe/C,8BAA6B"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2026 Aglyn LLC
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
/**
|
|
18
|
+
* Pack a value to msgpack bytes.
|
|
19
|
+
*
|
|
20
|
+
* Returns a plain `Uint8Array` and knows NOTHING about Firestore (AGL-1151).
|
|
21
|
+
*
|
|
22
|
+
* It used to return a Firestore `Bytes`, which meant one line —
|
|
23
|
+
* `import { Bytes } from 'firebase/firestore'` — and that line put the entire
|
|
24
|
+
* Firestore client SDK into the `@aglyn/aglyn` barrel. Every published tenant
|
|
25
|
+
* page imports that barrel, so every visitor to every customer site downloaded
|
|
26
|
+
* ~258 KB gzipped (~900 KB parsed) of database client to render static HTML
|
|
27
|
+
* that never queries anything. A VALUE import of one class, for a wrapper
|
|
28
|
+
* around a byte array.
|
|
29
|
+
*
|
|
30
|
+
* The three callers are all editor hooks that already import `Bytes`
|
|
31
|
+
* themselves, so wrapping at the call site costs them nothing and keeps the
|
|
32
|
+
* dependency where it is actually used.
|
|
33
|
+
*/
|
|
34
|
+
export declare function compress<T>(value: T): Uint8Array;
|
|
35
|
+
export default compress;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2026 Aglyn LLC
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/ import { encode } from "@msgpack/msgpack";
|
|
17
|
+
/**
|
|
18
|
+
* Pack a value to msgpack bytes.
|
|
19
|
+
*
|
|
20
|
+
* Returns a plain `Uint8Array` and knows NOTHING about Firestore (AGL-1151).
|
|
21
|
+
*
|
|
22
|
+
* It used to return a Firestore `Bytes`, which meant one line —
|
|
23
|
+
* `import { Bytes } from 'firebase/firestore'` — and that line put the entire
|
|
24
|
+
* Firestore client SDK into the `@aglyn/aglyn` barrel. Every published tenant
|
|
25
|
+
* page imports that barrel, so every visitor to every customer site downloaded
|
|
26
|
+
* ~258 KB gzipped (~900 KB parsed) of database client to render static HTML
|
|
27
|
+
* that never queries anything. A VALUE import of one class, for a wrapper
|
|
28
|
+
* around a byte array.
|
|
29
|
+
*
|
|
30
|
+
* The three callers are all editor hooks that already import `Bytes`
|
|
31
|
+
* themselves, so wrapping at the call site costs them nothing and keeps the
|
|
32
|
+
* dependency where it is actually used.
|
|
33
|
+
*/ export function compress(value) {
|
|
34
|
+
return encode(value);
|
|
35
|
+
}
|
|
36
|
+
export default compress;
|
|
37
|
+
|
|
38
|
+
//# sourceMappingURL=compress.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../libs/aglyn/src/lib/app-utils/compress.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2026 Aglyn LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { encode } from '@msgpack/msgpack'\n\n/**\n * Pack a value to msgpack bytes.\n *\n * Returns a plain `Uint8Array` and knows NOTHING about Firestore (AGL-1151).\n *\n * It used to return a Firestore `Bytes`, which meant one line —\n * `import { Bytes } from 'firebase/firestore'` — and that line put the entire\n * Firestore client SDK into the `@aglyn/aglyn` barrel. Every published tenant\n * page imports that barrel, so every visitor to every customer site downloaded\n * ~258 KB gzipped (~900 KB parsed) of database client to render static HTML\n * that never queries anything. A VALUE import of one class, for a wrapper\n * around a byte array.\n *\n * The three callers are all editor hooks that already import `Bytes`\n * themselves, so wrapping at the call site costs them nothing and keeps the\n * dependency where it is actually used.\n */\nexport function compress<T>(value: T): Uint8Array {\n return encode(value)\n}\nexport default compress\n"],"names":["encode","compress","value"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GAED,SAASA,MAAM,QAAQ,mBAAkB;AAEzC;;;;;;;;;;;;;;;;CAgBC,GACD,OAAO,SAASC,SAAYC,KAAQ;IAClC,OAAOF,OAAOE;AAChB;AACA,eAAeD,SAAQ"}
|
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2026 Aglyn LLC
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
import { type ReactElement, type ReactNode } from 'react';
|
|
18
|
+
import { type StoredVisitorConsent, type VisitorConsentPosture, type VisitorConsentStatus } from './visitor-consent';
|
|
19
|
+
/**
|
|
20
|
+
* The visitor consent surfaces (AGL-1498) — UI over the enforcement layer,
|
|
21
|
+
* never the enforcement itself: the GA script stays unloaded until a
|
|
22
|
+
* granting state is recorded, whether or not this component ever rendered.
|
|
23
|
+
*
|
|
24
|
+
* Three surfaces in one component, driven by the resolved state:
|
|
25
|
+
*
|
|
26
|
+
* - **The prior-consent banner** (opt-in posture, undecided visitor):
|
|
27
|
+
* symmetric Allow / Decline plus Preferences — the peer benchmark's
|
|
28
|
+
* credible shape; Decline is never buried.
|
|
29
|
+
* - **The "Your Privacy Choices" pill**: a small, persistent, fixed control on
|
|
30
|
+
* EVERY page whenever the consent machinery is active. In the implied
|
|
31
|
+
* posture no banner and no notice ever renders (the Squarespace shape),
|
|
32
|
+
* which makes this pill the ONE discoverable opt-out surface — that is
|
|
33
|
+
* why it is platform-mounted rather than a per-template footer link a
|
|
34
|
+
* theme could drop. Sites can additionally link any element to
|
|
35
|
+
* `#aglyn-consent`; both open the same panel.
|
|
36
|
+
* - **The preferences panel**: change the state in EITHER direction at any
|
|
37
|
+
* time — accept after declining, opt out after being defaulted in.
|
|
38
|
+
*
|
|
39
|
+
* ## EVERY surface renders this component
|
|
40
|
+
*
|
|
41
|
+
* Published customer sites, the console — signed in and signed out — and the
|
|
42
|
+
* console preview's region simulator. There were two implementations of these
|
|
43
|
+
* three surfaces and they had already drifted into two different designs: a
|
|
44
|
+
* plain card with bare checkboxes on one side, a MUI dialog with switches and
|
|
45
|
+
* descriptions on the other. The dialog is the design that survived, and the
|
|
46
|
+
* differences that were real turned out to be STRINGS — "this site" against
|
|
47
|
+
* "this console", carts against signing in — which is what {@link ConsentCopy}
|
|
48
|
+
* is for. A string is not a reason for a second component.
|
|
49
|
+
*
|
|
50
|
+
* MUI is available on both: the tenant runtime renders it through
|
|
51
|
+
* `HostThemeProvider`, under the same `AppRouterCacheProvider` emotion cache
|
|
52
|
+
* the console uses, and `membership-page.tsx` already draws MUI components a
|
|
53
|
+
* folder away from the call site here. The unlayered-cache hazard is the
|
|
54
|
+
* BESIGNER canvas, which no published page and no consent surface goes
|
|
55
|
+
* through.
|
|
56
|
+
*
|
|
57
|
+
* Palette and type come from whichever theme is in scope, which on a customer
|
|
58
|
+
* site is the site's own — the control belongs to the page it is asked on. The
|
|
59
|
+
* two things that must NOT follow a theme are the §7015 mark, which is
|
|
60
|
+
* transcribed artwork, and {@link CONSENT_OVERLAY_Z_INDEX}, which has to
|
|
61
|
+
* outrank a popup backdrop no theme knows about.
|
|
62
|
+
*/
|
|
63
|
+
/**
|
|
64
|
+
* The title of the persistent opt-out control — **fixed by regulation, not a
|
|
65
|
+
* copy choice**.
|
|
66
|
+
*
|
|
67
|
+
* Once a business "shares" personal information for cross-context behavioral
|
|
68
|
+
* advertising, CCPA §1798.135(b) requires a clear and conspicuous opt-out
|
|
69
|
+
* link, and CCPA regs §7015 permit a SINGLE combined link only when it is
|
|
70
|
+
* titled with these exact words. Aglyn crossed that line when advertising
|
|
71
|
+
* technology went onto aglyn.com, so the pill's previous label — "Privacy
|
|
72
|
+
* choices" — stopped being compliant the moment the tag shipped.
|
|
73
|
+
*
|
|
74
|
+
* Capitalisation is part of the specified title. Do not sentence-case it to
|
|
75
|
+
* match the rest of the overlay copy, do not shorten it to fit a narrow
|
|
76
|
+
* viewport, and do not translate it away on a US-facing site: it is pinned by
|
|
77
|
+
* `consent-opt-out-title.spec.tsx`, which renders the real control and reads
|
|
78
|
+
* the text back.
|
|
79
|
+
*/
|
|
80
|
+
export declare const CONSENT_OPT_OUT_TITLE = "Your Privacy Choices";
|
|
81
|
+
/**
|
|
82
|
+
* The opt-out icon, sized for the pill.
|
|
83
|
+
*
|
|
84
|
+
* `aria-hidden`, because it sits beside the words it stands for: the pill
|
|
85
|
+
* already announces "Your Privacy Choices" as its accessible name, and a
|
|
86
|
+
* labelled icon next to identical visible text makes a screen reader say the
|
|
87
|
+
* title twice. Same treatment as the admin bar's mark.
|
|
88
|
+
*
|
|
89
|
+
* 26 × 12 against the file's own `0 0 30 14` viewBox, so the default
|
|
90
|
+
* `preserveAspectRatio` scales the drawing to the 12px height — one line of
|
|
91
|
+
* the pill's 12px/1.4 text — and centres it. That is what §7015's "the same
|
|
92
|
+
* size as other icons" asks for here: the pill has no other icons, so the
|
|
93
|
+
* text is the scale to match.
|
|
94
|
+
*
|
|
95
|
+
* **The colours are the regulation's, not the theme's.** The pill's own
|
|
96
|
+
* background is a fixed near-white that no tenant palette reaches, which is
|
|
97
|
+
* exactly the surface this artwork was published against — so it needs no
|
|
98
|
+
* light/dark variant and must not be given one.
|
|
99
|
+
*/
|
|
100
|
+
/**
|
|
101
|
+
* Exported so a surface that renders its own opt-out control gets the
|
|
102
|
+
* REGULATOR'S artwork rather than an approximation of it. §7015(f) points at
|
|
103
|
+
* published artwork, and the console's unauthenticated pages need the same
|
|
104
|
+
* mark this overlay draws — a second, hand-drawn toggle would be a different
|
|
105
|
+
* mark wearing the same name.
|
|
106
|
+
*/
|
|
107
|
+
export declare function CcpaOptOutIcon(): ReactElement;
|
|
108
|
+
/**
|
|
109
|
+
* The stacking context the consent surfaces must win, and why it is a number
|
|
110
|
+
* rather than a theme token.
|
|
111
|
+
*
|
|
112
|
+
* `theme.zIndex.modal` is 1300, and on a published site the consent card has
|
|
113
|
+
* to sit above the popup backdrop at 2147483200 — the consent question
|
|
114
|
+
* outranks a promotional popup, and the popup's own GA mirrors are waiting on
|
|
115
|
+
* the answer. Exported so the console preview's own panel can be raised
|
|
116
|
+
* against the real value instead of a copy of it.
|
|
117
|
+
*/
|
|
118
|
+
export declare const CONSENT_OVERLAY_Z_INDEX = 2147483400;
|
|
119
|
+
/** The persistent control sits just below the card it can be replaced by. */
|
|
120
|
+
export declare const CONSENT_PILL_Z_INDEX = 2147483390;
|
|
121
|
+
/**
|
|
122
|
+
* Bottom padding the end of the page needs so the fixed pill cannot land on
|
|
123
|
+
* top of it (AGL-2205).
|
|
124
|
+
*
|
|
125
|
+
* Derived from the pill's MEASURED box rather than from `PILL_STYLE`: the
|
|
126
|
+
* label wraps to two lines in a narrow viewport and in a translated locale,
|
|
127
|
+
* and a clearance computed from the constants would be exactly one line
|
|
128
|
+
* short in precisely the case where the copyright row is already tightest.
|
|
129
|
+
*
|
|
130
|
+
* Pure, and exported, because the geometry is the whole fix: a spec can pin
|
|
131
|
+
* "51px of room for a 30.8px pill sitting 12px off the bottom" without a
|
|
132
|
+
* layout engine, which is the half a jsdom render cannot check.
|
|
133
|
+
*/
|
|
134
|
+
export declare function consentPillClearance(viewportHeight: number, pillTop: number): number;
|
|
135
|
+
/**
|
|
136
|
+
* The words each surface uses, so one component serves them all.
|
|
137
|
+
*
|
|
138
|
+
* A console says "this console" and a published site says "this site"; the
|
|
139
|
+
* strictly-necessary sentence names shopping carts on a customer site and
|
|
140
|
+
* signing in on the console. Those are STRINGS, and a string is not a reason
|
|
141
|
+
* for a second component — which is what the two implementations this replaces
|
|
142
|
+
* had become. Every field defaults to the published-site wording, so a caller
|
|
143
|
+
* that has nothing to say differently passes nothing.
|
|
144
|
+
*/
|
|
145
|
+
export interface ConsentCopy {
|
|
146
|
+
/** Opens the preferences panel. */
|
|
147
|
+
panelIntro?: string;
|
|
148
|
+
/** Names what runs regardless, and why it is not being asked about. */
|
|
149
|
+
strictlyNecessary?: string;
|
|
150
|
+
/** The ask, on a site that runs analytics only. */
|
|
151
|
+
bannerAnalyticsOnly?: string;
|
|
152
|
+
/** The ask, on a site that also asks about advertising. */
|
|
153
|
+
bannerWithAdvertising?: string;
|
|
154
|
+
/** The analytics control's label and the line under it. */
|
|
155
|
+
analyticsLabel?: string;
|
|
156
|
+
analyticsDetail?: string;
|
|
157
|
+
/** The advertising control's, where the surface asks about it. */
|
|
158
|
+
advertisingLabel?: string;
|
|
159
|
+
advertisingDetail?: string;
|
|
160
|
+
}
|
|
161
|
+
export interface ConsentBannerUiProps {
|
|
162
|
+
hostId: string;
|
|
163
|
+
/** The visitor's recorded state; null means undecided. */
|
|
164
|
+
stored: StoredVisitorConsent | null;
|
|
165
|
+
/** The resolved posture; only consulted while undecided. */
|
|
166
|
+
posture: VisitorConsentPosture | null;
|
|
167
|
+
/** Region at decision time, recorded onto explicit choices. */
|
|
168
|
+
country?: string | null;
|
|
169
|
+
/**
|
|
170
|
+
* Whether this surface asks about advertising storage. Resolved by the
|
|
171
|
+
* caller — from the host document on a published site, from the platform's
|
|
172
|
+
* own consent declaration on the console.
|
|
173
|
+
*/
|
|
174
|
+
advertising?: boolean;
|
|
175
|
+
/** Per-surface wording; see {@link ConsentCopy}. */
|
|
176
|
+
copy?: ConsentCopy;
|
|
177
|
+
/**
|
|
178
|
+
* Links to the policies behind the choice, rendered under the copy on both
|
|
179
|
+
* the banner and the panel.
|
|
180
|
+
*
|
|
181
|
+
* A node rather than a pair of URLs: the console links its own published
|
|
182
|
+
* Privacy and Cookie policies through its route constants, and a published
|
|
183
|
+
* site links whatever its owner has. A choice offered with no way to read
|
|
184
|
+
* what is being chosen is not an informed one, but neither surface's links
|
|
185
|
+
* are this component's to know.
|
|
186
|
+
*/
|
|
187
|
+
policyLinks?: ReactNode;
|
|
188
|
+
/**
|
|
189
|
+
* Whether the persistent "Your Privacy Choices" control may render here.
|
|
190
|
+
*
|
|
191
|
+
* `true` — the default, and every published site — draws the pill whenever
|
|
192
|
+
* no other surface is up. It is the ONLY opt-out surface a visitor in the
|
|
193
|
+
* implied posture ever sees, so it is platform-mounted rather than left to
|
|
194
|
+
* a template that could drop it.
|
|
195
|
+
*
|
|
196
|
+
* `false` for a page that already carries the control somewhere better. The
|
|
197
|
+
* console's signed-in pages put it in the account menu, where a person looks
|
|
198
|
+
* for their own settings; floating a second copy over the page would be the
|
|
199
|
+
* same control drawn twice.
|
|
200
|
+
*/
|
|
201
|
+
showPill?: boolean;
|
|
202
|
+
/**
|
|
203
|
+
* The caller owns what a decision DOES.
|
|
204
|
+
*
|
|
205
|
+
* Unset — a published site — persists through `storeVisitorConsent`, which
|
|
206
|
+
* is where the withdrawal behaviour lives: it re-derives both grants from
|
|
207
|
+
* the status, silences any resident tag, sweeps the analytics and
|
|
208
|
+
* advertising cookies and dispatches the change event.
|
|
209
|
+
*
|
|
210
|
+
* Set, and the caller writes instead. The console writes through
|
|
211
|
+
* `storePlatformConsent` so the record also mirrors across its hostnames;
|
|
212
|
+
* the console's region simulator writes nothing at all, which is what keeps
|
|
213
|
+
* previewing as-if-from-the-EU from recording a real consent record.
|
|
214
|
+
*/
|
|
215
|
+
onDecision?: (status: VisitorConsentStatus, advertising?: boolean) => void;
|
|
216
|
+
}
|
|
217
|
+
/**
|
|
218
|
+
* Fetches the preferences panel's module, once. A failed fetch is forgotten
|
|
219
|
+
* so the next attempt can retry it.
|
|
220
|
+
*
|
|
221
|
+
* Exported for callers that know the panel is about to be needed, and for
|
|
222
|
+
* specs that open it and read it back in the same tick.
|
|
223
|
+
*/
|
|
224
|
+
export declare function preloadConsentPreferences(): Promise<void>;
|
|
225
|
+
export declare function ConsentBannerUi(props: ConsentBannerUiProps): ReactElement | null;
|
|
226
|
+
export default ConsentBannerUi;
|