@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,467 @@
|
|
|
1
|
+
import { _ as _extends } from "@swc/helpers/_/_extends";
|
|
2
|
+
import { _ as _object_without_properties_loose } from "@swc/helpers/_/_object_without_properties_loose";
|
|
3
|
+
/**
|
|
4
|
+
* @license
|
|
5
|
+
* Copyright 2026 Aglyn LLC
|
|
6
|
+
*
|
|
7
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
8
|
+
* you may not use this file except in compliance with the License.
|
|
9
|
+
* You may obtain a copy of the License at
|
|
10
|
+
*
|
|
11
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
12
|
+
*
|
|
13
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
14
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
15
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16
|
+
* See the License for the specific language governing permissions and
|
|
17
|
+
* limitations under the License.
|
|
18
|
+
*/ /**
|
|
19
|
+
* What a placed library asset is NOW, read from its DAM document when the
|
|
20
|
+
* page is composed rather than copied onto the node when it was picked: a
|
|
21
|
+
* film's length, shape and poster (AGL-2807), and an image's pixel pair
|
|
22
|
+
* (AGL-2833).
|
|
23
|
+
*
|
|
24
|
+
* ## Why the pick-time copy is not enough
|
|
25
|
+
*
|
|
26
|
+
* Picking a library asset copies facts onto the node. An image gets its pixel
|
|
27
|
+
* pair ({@link intrinsicMediaSize}), which `image.tsx` renders as the
|
|
28
|
+
* `<img>`'s `width`/`height` attributes so the browser can reserve the box
|
|
29
|
+
* before the bytes arrive. A film gets its running time, its frame's pair and
|
|
30
|
+
* a poster flag ({@link videoMediaProps}): the pair becomes the player's CSS
|
|
31
|
+
* `aspect-ratio`, the running time becomes `VideoObject.duration`, and the
|
|
32
|
+
* flag decides whether a lightbox `<img>` and a `thumbnailUrl` exist at all.
|
|
33
|
+
*
|
|
34
|
+
* A replace (AGL-2732) keeps the asset's id and URL and rewrites its document:
|
|
35
|
+
* an image's `width`/`height`, a film's `video` and `poster` records. It
|
|
36
|
+
* cannot rewrite the nodes, which sit in every screen, layout, component and
|
|
37
|
+
* published version that places the asset. So after a replace with a
|
|
38
|
+
* different shape, every page placing the image reserved the previous
|
|
39
|
+
* picture's box and shifted when the new one decoded, and every page placing
|
|
40
|
+
* the film kept the previous film's length and shape, until someone re-picked
|
|
41
|
+
* it.
|
|
42
|
+
*
|
|
43
|
+
* ## The rule
|
|
44
|
+
*
|
|
45
|
+
* Two surfaces read each placed asset's document and lay what it records over
|
|
46
|
+
* the node here: the tenant's composition, for the page a visitor gets
|
|
47
|
+
* (`libs/tenant/runtime/src/lib/get-media-asset-facts.ts`), and the console,
|
|
48
|
+
* for the besigner canvas an author edits and the Preview that checks it
|
|
49
|
+
* (AGL-2838, AGL-2849). Both decide what a read answers through
|
|
50
|
+
* {@link mediaAssetFactsFromDocument}, so the editor cannot disagree with the
|
|
51
|
+
* page about which assets answer. When the asset cannot be answered for (a
|
|
52
|
+
* failed or pending read, a missing or deleted document, an asset the CDN
|
|
53
|
+
* would not serve under this page's URL, one past the composition's cap), the
|
|
54
|
+
* node keeps what the pick stored. That is the render every page had before
|
|
55
|
+
* this, never a worse one. When the asset answers:
|
|
56
|
+
*
|
|
57
|
+
* - **A film's facts win, including their ABSENCE.** A film the replace left
|
|
58
|
+
* with no `video` record has no known shape, so a stored pair describing
|
|
59
|
+
* the previous film is dropped rather than published, and a poster flag the
|
|
60
|
+
* document no longer backs is dropped with it. One stored value survives: a
|
|
61
|
+
* running time the AUTHOR typed for a film the DAM has no running time for.
|
|
62
|
+
* The pick only ever writes the duration together with the pixel pair
|
|
63
|
+
* ({@link videoMediaProps} is all-or-nothing on the `video` record), and the
|
|
64
|
+
* pair is not an author control. So a duration standing alone is an
|
|
65
|
+
* author's, and a duration standing beside a pair is a copy of a film that
|
|
66
|
+
* may no longer be the one in the bucket.
|
|
67
|
+
* - **An image's pair wins when the document records one.** When it records
|
|
68
|
+
* none (an SVG, which the upload cannot measure, or a file older than
|
|
69
|
+
* AGL-173), the stored pair stays, whether an author typed it through the
|
|
70
|
+
* API or it is a copy of the file the asset held before. The asymmetry with
|
|
71
|
+
* a film is in the render, not the data. A film's pair is the player's
|
|
72
|
+
* permanent box, but an image's is only a reservation
|
|
73
|
+
* (`aspect-ratio: auto w / h`), which the decoded picture's own ratio
|
|
74
|
+
* replaces. Dropping the pair guarantees a shift of the image's full height
|
|
75
|
+
* on every view. A stale pair shifts by the difference between two heights,
|
|
76
|
+
* and a pair typed for a file the DAM cannot measure shifts by nothing.
|
|
77
|
+
*
|
|
78
|
+
* Nothing an author sets for the placement is touched: an image's CSS
|
|
79
|
+
* `width` and `height`, its fit and radius, and a film's own poster describe
|
|
80
|
+
* the placement rather than the file.
|
|
81
|
+
*
|
|
82
|
+
* Imported by path and never through a barrel: every `@aglyn/aglyn` barrel
|
|
83
|
+
* ships to published pages, and nothing here has a reason to reach one, so
|
|
84
|
+
* the composition and the console both import this module by path.
|
|
85
|
+
*/ import { CANVAS_ROOT_ELEMENT_ID } from "../foundation/constants/canvas.js";
|
|
86
|
+
import { mediaCdnScopeRefusal, parseMediaCdnScope } from "./media-cdn-scope.js";
|
|
87
|
+
import { intrinsicMediaSize, videoMediaProps } from "./media-metadata.js";
|
|
88
|
+
import { hostQualifiedScope, parseMediaRef } from "./media-ref.js";
|
|
89
|
+
import { VIDEO_COMPONENT_ID } from "./video-object.js";
|
|
90
|
+
/** The Image element's persisted component id (`image.tsx`), never renamed. */ export const IMAGE_COMPONENT_ID = 'image';
|
|
91
|
+
/**
|
|
92
|
+
* The prop each element that holds a markdown-lite DOCUMENT keeps it in, and
|
|
93
|
+
* therefore every element whose body can name a library image (AGL-3149).
|
|
94
|
+
*
|
|
95
|
+
* The same two elements and the same two prop names `resolveMarkdownSource`
|
|
96
|
+
* walks for a table of contents (AGL-1162), which is the other reader of a
|
|
97
|
+
* body's contents. They differ: the Markdown element calls it `content` and a
|
|
98
|
+
* collection entry's body calls it `markdown`.
|
|
99
|
+
*
|
|
100
|
+
* Both ids are spelled out rather than imported. `markdown` belongs to a
|
|
101
|
+
* plugin, which core may never import; `collectionEntryBody` is exported by
|
|
102
|
+
* `collection-entries.ts`, but that module is 1,860 lines and drags
|
|
103
|
+
* `content-authors.ts` behind it, and this one is deliberately outside the
|
|
104
|
+
* barrel that ships to published pages. A persisted component id is a string
|
|
105
|
+
* that cannot change — renaming one orphans every document that stores it —
|
|
106
|
+
* so the copy cannot drift in the way an imported value would protect against.
|
|
107
|
+
*/ const MARKDOWN_BODY_PROPS = {
|
|
108
|
+
markdown: 'content',
|
|
109
|
+
collectionEntryBody: 'markdown'
|
|
110
|
+
};
|
|
111
|
+
/** The root of a composed map, where a walk in document order starts. */ const ROOT_NODE_ID = CANVAS_ROOT_ELEMENT_ID;
|
|
112
|
+
/**
|
|
113
|
+
* Every field an asset's facts are decided from, and the projection a reader
|
|
114
|
+
* asks Firestore for: ONE list, whichever surface reads. `width` and `height`
|
|
115
|
+
* (an image's) and `video` and `poster` (a film's) are the facts. The other
|
|
116
|
+
* three are the gates `serveMediaCdn` applies before it will serve an asset at
|
|
117
|
+
* all, so no surface shows the shape of a file its page's URL refuses.
|
|
118
|
+
*/ export const MEDIA_ASSET_FACT_FIELDS = [
|
|
119
|
+
'width',
|
|
120
|
+
'height',
|
|
121
|
+
'video',
|
|
122
|
+
'poster',
|
|
123
|
+
'deletedAt',
|
|
124
|
+
'private',
|
|
125
|
+
'visibleTo'
|
|
126
|
+
];
|
|
127
|
+
const owns = (map, key)=>Object.prototype.hasOwnProperty.call(map, key);
|
|
128
|
+
/**
|
|
129
|
+
* The key an asset's facts are filed under: the reference's own scope and id.
|
|
130
|
+
*
|
|
131
|
+
* Deliberately NOT the host-qualified scope a page renders. The document lives
|
|
132
|
+
* under the scope's owner whichever site places it, and which site may be
|
|
133
|
+
* shown it is the reader's question, answered once per page.
|
|
134
|
+
*/ export function mediaAssetFactsKey(ref) {
|
|
135
|
+
return `${ref.scope}/${ref.mediaId}`;
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* Where an asset's media document lives: under the scope's OWNER, `orgs/` for
|
|
139
|
+
* the org library and `hosts/` for a site's own, whichever site places it.
|
|
140
|
+
* `null` for a scope the CDN would not parse, which no read can answer for.
|
|
141
|
+
*/ export function mediaAssetDocumentPath(ref) {
|
|
142
|
+
const scope = parseMediaCdnScope(ref.scope);
|
|
143
|
+
if (!scope) return null;
|
|
144
|
+
return `${scope.isOrg ? 'orgs' : 'hosts'}/${scope.scopeId}/media/${ref.mediaId}`;
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* The facts one read of an asset's document yields for a placement rendered
|
|
148
|
+
* on `hostId`'s pages, or `undefined` when the placement keeps its stored
|
|
149
|
+
* props.
|
|
150
|
+
*
|
|
151
|
+
* An answer exists only for a document that was read, is live, is not
|
|
152
|
+
* private, and is visible to that site under the host-qualified scope the page
|
|
153
|
+
* renders: the verdict the CDN reaches when the browser asks for the bytes.
|
|
154
|
+
* The URL a page renders names the site doing the rendering
|
|
155
|
+
* (`resolveMediaSrc`), so visibility is asked of THAT scope, not of the scope
|
|
156
|
+
* the reference was stored with.
|
|
157
|
+
*/ export function mediaAssetFactsFromDocument(document, ref, hostId) {
|
|
158
|
+
if (!document) return undefined;
|
|
159
|
+
if (document.deletedAt || document.private === true) return undefined;
|
|
160
|
+
const served = parseMediaCdnScope(hostQualifiedScope(ref.scope, hostId));
|
|
161
|
+
if (!served || mediaCdnScopeRefusal(served, document.visibleTo)) {
|
|
162
|
+
return undefined;
|
|
163
|
+
}
|
|
164
|
+
return {
|
|
165
|
+
width: document.width,
|
|
166
|
+
height: document.height,
|
|
167
|
+
video: document.video,
|
|
168
|
+
poster: document.poster
|
|
169
|
+
};
|
|
170
|
+
}
|
|
171
|
+
/** The library asset an Image or Video node places, or null for anything else. */ function placedAsset(node, only) {
|
|
172
|
+
var _ref;
|
|
173
|
+
const componentId = node == null ? void 0 : node.componentId;
|
|
174
|
+
if (componentId !== IMAGE_COMPONENT_ID && componentId !== VIDEO_COMPONENT_ID) {
|
|
175
|
+
return null;
|
|
176
|
+
}
|
|
177
|
+
if (only && componentId !== only) return null;
|
|
178
|
+
// The precedence every other reader of the composed map uses: a node inside
|
|
179
|
+
// a repeated collection carries its bound values in the resolved copy.
|
|
180
|
+
const props = (_ref = node == null ? void 0 : node.resolvedProps) != null ? _ref : node == null ? void 0 : node.props;
|
|
181
|
+
return parseMediaRef(props == null ? void 0 : props['src']);
|
|
182
|
+
}
|
|
183
|
+
/** A compose-time token the tenant has not substituted — never a document. */ const UNRESOLVED_TOKEN = /^\{\{[^}]+\}\}$/;
|
|
184
|
+
/**
|
|
185
|
+
* The markdown-lite document a node holds, or `''` for a node holding none.
|
|
186
|
+
*
|
|
187
|
+
* `resolvedProps` first, for the reason {@link placedAsset} gives: an entry
|
|
188
|
+
* body is the literal `{{entry.body}}` in `props` and the entry's real text in
|
|
189
|
+
* the resolved copy. An unsubstituted token is not a document — it can name no
|
|
190
|
+
* asset — so it is dropped here rather than walked for images that a canvas
|
|
191
|
+
* surface would never find.
|
|
192
|
+
*/ function markdownBodyOf(props, componentId) {
|
|
193
|
+
const prop = componentId && owns(MARKDOWN_BODY_PROPS, componentId) ? MARKDOWN_BODY_PROPS[componentId] : undefined;
|
|
194
|
+
const text = prop ? props == null ? void 0 : props[prop] : undefined;
|
|
195
|
+
if (typeof text !== 'string' || UNRESOLVED_TOKEN.test(text.trim())) return '';
|
|
196
|
+
return text;
|
|
197
|
+
}
|
|
198
|
+
/** See {@link markdownBodyOf} — the body the page will actually render. */ function markdownBody(node) {
|
|
199
|
+
var _ref;
|
|
200
|
+
return markdownBodyOf((_ref = node == null ? void 0 : node.resolvedProps) != null ? _ref : node == null ? void 0 : node.props, node == null ? void 0 : node.componentId);
|
|
201
|
+
}
|
|
202
|
+
/**
|
|
203
|
+
* A markdown-lite image: ``, capturing only the target, and only
|
|
204
|
+
* up to the first whitespace or `)`.
|
|
205
|
+
*
|
|
206
|
+
* That is the whole of the syntax `markdown-lite.ts` accepts — no title string
|
|
207
|
+
* after the target, no angle-bracket form — so there is nowhere else in a body
|
|
208
|
+
* for a reference to hide, and matching more than the parser does would name
|
|
209
|
+
* assets the renderer never asks for.
|
|
210
|
+
*/ const MARKDOWN_IMAGE_TARGET = /!\[[^\]]*\]\(\s*([^)\s]+)/g;
|
|
211
|
+
/**
|
|
212
|
+
* Every library asset a markdown body's images name, in the order the body
|
|
213
|
+
* names them, each beside the target EXACTLY as the body wrote it.
|
|
214
|
+
*
|
|
215
|
+
* The raw target is carried because that is the key the renderer has: it holds
|
|
216
|
+
* the parsed block's `src`, the same string, and looking a pair up by it costs
|
|
217
|
+
* no second parse per image on every render.
|
|
218
|
+
*
|
|
219
|
+
* A target that is not a `media:` reference yields nothing — a hotlinked URL
|
|
220
|
+
* and a legacy stored path have no DAM document to read, and the renderer
|
|
221
|
+
* gives those today's markup unchanged.
|
|
222
|
+
*/ function markdownImageRefs(text) {
|
|
223
|
+
if (!text.includes('![')) return [];
|
|
224
|
+
const found = [];
|
|
225
|
+
for (const match of text.matchAll(MARKDOWN_IMAGE_TARGET)){
|
|
226
|
+
const target = match[1];
|
|
227
|
+
const ref = parseMediaRef(target);
|
|
228
|
+
if (ref) found.push({
|
|
229
|
+
target,
|
|
230
|
+
ref
|
|
231
|
+
});
|
|
232
|
+
}
|
|
233
|
+
return found;
|
|
234
|
+
}
|
|
235
|
+
/**
|
|
236
|
+
* The map's node ids in document order: depth first from the root through
|
|
237
|
+
* each node's child ids, then every id the walk never reached (a map with no
|
|
238
|
+
* root, an orphan) in the order the map lists it. That puts the top of the
|
|
239
|
+
* page ahead of its footer, and it is the same order for the same map.
|
|
240
|
+
*/ function documentOrder(nodes) {
|
|
241
|
+
const order = [];
|
|
242
|
+
const seen = new Set();
|
|
243
|
+
const stack = owns(nodes, ROOT_NODE_ID) ? [
|
|
244
|
+
ROOT_NODE_ID
|
|
245
|
+
] : [];
|
|
246
|
+
while(stack.length){
|
|
247
|
+
var _nodes_id;
|
|
248
|
+
const id = stack.pop();
|
|
249
|
+
if (seen.has(id) || !owns(nodes, id)) continue;
|
|
250
|
+
seen.add(id);
|
|
251
|
+
order.push(id);
|
|
252
|
+
const children = (_nodes_id = nodes[id]) == null ? void 0 : _nodes_id.nodes;
|
|
253
|
+
if (!Array.isArray(children)) continue;
|
|
254
|
+
for(let index = children.length - 1; index >= 0; index -= 1){
|
|
255
|
+
const child = children[index];
|
|
256
|
+
if (typeof child === 'string' && !seen.has(child)) stack.push(child);
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
for(const id in nodes)if (!seen.has(id)) order.push(id);
|
|
260
|
+
return order;
|
|
261
|
+
}
|
|
262
|
+
/**
|
|
263
|
+
* Every distinct library asset the Image and Video nodes in a map place:
|
|
264
|
+
* films first, then images, each in document order.
|
|
265
|
+
*
|
|
266
|
+
* A read that is capped honors that order. A film goes first because its
|
|
267
|
+
* stale facts are the worse render (a player of the wrong shape and a
|
|
268
|
+
* thumbnail that 404s, against a reservation that corrects itself when an
|
|
269
|
+
* image decodes), and document order covers the top of the page before its
|
|
270
|
+
* footer.
|
|
271
|
+
*
|
|
272
|
+
* `[]` for a page that places none, so a caller that gates its read on the
|
|
273
|
+
* length spends nothing on it. A pinned and an unpinned reference to one
|
|
274
|
+
* asset are one entry: a pin names bytes, not a different asset.
|
|
275
|
+
*/ export function mediaAssetRefs(nodes, options = {}) {
|
|
276
|
+
const refs = [];
|
|
277
|
+
if (!nodes) return refs;
|
|
278
|
+
const order = documentOrder(nodes);
|
|
279
|
+
const seen = new Set();
|
|
280
|
+
for (const element of [
|
|
281
|
+
VIDEO_COMPONENT_ID,
|
|
282
|
+
IMAGE_COMPONENT_ID
|
|
283
|
+
]){
|
|
284
|
+
if (options.only && options.only !== element) continue;
|
|
285
|
+
for (const id of order){
|
|
286
|
+
const node = nodes[id];
|
|
287
|
+
if ((node == null ? void 0 : node.componentId) !== element) continue;
|
|
288
|
+
const ref = placedAsset(node);
|
|
289
|
+
if (!ref) continue;
|
|
290
|
+
const key = mediaAssetFactsKey(ref);
|
|
291
|
+
if (seen.has(key)) continue;
|
|
292
|
+
seen.add(key);
|
|
293
|
+
refs.push(ref);
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
// A markdown body's images come LAST, and only when the caller wants every
|
|
297
|
+
// element (AGL-3149). Last because of what a capped read costs each kind: a
|
|
298
|
+
// placement that misses out renders at its pick-time pair, a body image that
|
|
299
|
+
// misses out renders exactly as it does today, and a film that misses out
|
|
300
|
+
// gets a player of the wrong shape. Only-when-unfiltered because `only` asks
|
|
301
|
+
// for one ELEMENT's placements, and a body image is not a placement of the
|
|
302
|
+
// Image element — the video-asset reader would otherwise read image
|
|
303
|
+
// documents it has no use for.
|
|
304
|
+
if (options.only) return refs;
|
|
305
|
+
for (const id of order){
|
|
306
|
+
const body = markdownBody(nodes[id]);
|
|
307
|
+
for (const { ref } of markdownImageRefs(body)){
|
|
308
|
+
const key = mediaAssetFactsKey(ref);
|
|
309
|
+
if (seen.has(key)) continue;
|
|
310
|
+
seen.add(key);
|
|
311
|
+
refs.push(ref);
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
return refs;
|
|
315
|
+
}
|
|
316
|
+
const usable = (value)=>typeof value === 'number' && Number.isFinite(value) && value > 0;
|
|
317
|
+
/** A film's props with its asset's facts laid over them. See the module note. */ function withFilmFacts(props, facts) {
|
|
318
|
+
const live = videoMediaProps({
|
|
319
|
+
componentId: VIDEO_COMPONENT_ID,
|
|
320
|
+
propName: 'src',
|
|
321
|
+
assetVideo: facts.video,
|
|
322
|
+
assetPoster: facts.poster
|
|
323
|
+
});
|
|
324
|
+
const { durationSeconds, intrinsicWidth, intrinsicHeight, posterFromSource: _storedPosterFlag } = props, next = _object_without_properties_loose(props, [
|
|
325
|
+
"durationSeconds",
|
|
326
|
+
"intrinsicWidth",
|
|
327
|
+
"intrinsicHeight",
|
|
328
|
+
"posterFromSource"
|
|
329
|
+
]);
|
|
330
|
+
// The pick writes a duration only beside the pixel pair, so a pair is what
|
|
331
|
+
// marks the stored duration as a copy rather than an author's own.
|
|
332
|
+
const typedByAuthor = !(usable(intrinsicWidth) && usable(intrinsicHeight));
|
|
333
|
+
if (live.durationSeconds !== undefined) {
|
|
334
|
+
next['durationSeconds'] = live.durationSeconds;
|
|
335
|
+
} else if (typedByAuthor && durationSeconds !== undefined) {
|
|
336
|
+
next['durationSeconds'] = durationSeconds;
|
|
337
|
+
}
|
|
338
|
+
if (live.intrinsicWidth !== undefined && live.intrinsicHeight !== undefined) {
|
|
339
|
+
next['intrinsicWidth'] = live.intrinsicWidth;
|
|
340
|
+
next['intrinsicHeight'] = live.intrinsicHeight;
|
|
341
|
+
}
|
|
342
|
+
if (live.posterFromSource) next['posterFromSource'] = true;
|
|
343
|
+
return next;
|
|
344
|
+
}
|
|
345
|
+
/**
|
|
346
|
+
* An image's props with its asset's pair laid over them, or the SAME object
|
|
347
|
+
* when the document records no usable pair or the stored one already matches.
|
|
348
|
+
* See the module note.
|
|
349
|
+
*/ function withImageFacts(props, facts) {
|
|
350
|
+
// Through the pick's own gate, so the overlay and the pick agree on what a
|
|
351
|
+
// usable pair is: both halves, finite and positive.
|
|
352
|
+
const live = intrinsicMediaSize({
|
|
353
|
+
componentId: IMAGE_COMPONENT_ID,
|
|
354
|
+
propName: 'src',
|
|
355
|
+
assetWidth: facts.width,
|
|
356
|
+
assetHeight: facts.height
|
|
357
|
+
});
|
|
358
|
+
if (live.intrinsicWidth === undefined || live.intrinsicHeight === undefined) {
|
|
359
|
+
return props;
|
|
360
|
+
}
|
|
361
|
+
if (props['intrinsicWidth'] === live.intrinsicWidth && props['intrinsicHeight'] === live.intrinsicHeight) {
|
|
362
|
+
return props;
|
|
363
|
+
}
|
|
364
|
+
return _extends({}, props, {
|
|
365
|
+
intrinsicWidth: live.intrinsicWidth,
|
|
366
|
+
intrinsicHeight: live.intrinsicHeight
|
|
367
|
+
});
|
|
368
|
+
}
|
|
369
|
+
/**
|
|
370
|
+
* The prop a markdown body carries its images' pixel pairs in, keyed by the
|
|
371
|
+
* target the body wrote (AGL-3149).
|
|
372
|
+
*
|
|
373
|
+
* A body image is not a node, so it cannot take `intrinsicWidth` and
|
|
374
|
+
* `intrinsicHeight` the way a placement does; the pairs travel together on the
|
|
375
|
+
* element that holds the document, and the renderer looks each one up by the
|
|
376
|
+
* parsed block's `src`.
|
|
377
|
+
*/ export const BODY_IMAGE_SIZES_PROP = 'intrinsicSizes';
|
|
378
|
+
/**
|
|
379
|
+
* A markdown body's props with a pair for each library image it names, or the
|
|
380
|
+
* SAME object when no image in it can be answered for.
|
|
381
|
+
*
|
|
382
|
+
* Only images whose document records a usable pair get an entry, through the
|
|
383
|
+
* same {@link intrinsicMediaSize} gate a placement goes through. An image left
|
|
384
|
+
* out is one the renderer must give today's markup: `srcSet` without the pair
|
|
385
|
+
* makes `sizes` the image's rendered width, which upscales anything narrower
|
|
386
|
+
* than the column, so a partial answer is worse here than no answer.
|
|
387
|
+
*/ function withBodyImageFacts(props, componentId, facts) {
|
|
388
|
+
// THIS object's own body, never the node's resolved one: `props` on a bound
|
|
389
|
+
// entry body still holds the `{{entry.body}}` token, and pairs for images it
|
|
390
|
+
// does not name are bytes in the tree that nothing can ever look up.
|
|
391
|
+
let sizes;
|
|
392
|
+
for (const { target, ref } of markdownImageRefs(markdownBodyOf(props, componentId))){
|
|
393
|
+
const found = facts.get(mediaAssetFactsKey(ref));
|
|
394
|
+
if (!found) continue;
|
|
395
|
+
const live = intrinsicMediaSize({
|
|
396
|
+
componentId: IMAGE_COMPONENT_ID,
|
|
397
|
+
propName: 'src',
|
|
398
|
+
assetWidth: found.width,
|
|
399
|
+
assetHeight: found.height
|
|
400
|
+
});
|
|
401
|
+
if (live.intrinsicWidth === undefined || live.intrinsicHeight === undefined) {
|
|
402
|
+
continue;
|
|
403
|
+
}
|
|
404
|
+
if (!sizes) sizes = {};
|
|
405
|
+
sizes[target] = {
|
|
406
|
+
width: live.intrinsicWidth,
|
|
407
|
+
height: live.intrinsicHeight
|
|
408
|
+
};
|
|
409
|
+
}
|
|
410
|
+
if (!sizes) return props;
|
|
411
|
+
return _extends({}, props, {
|
|
412
|
+
[BODY_IMAGE_SIZES_PROP]: sizes
|
|
413
|
+
});
|
|
414
|
+
}
|
|
415
|
+
/**
|
|
416
|
+
* The composed map with each placed asset's facts laid over its node, and each
|
|
417
|
+
* markdown body's images' pairs laid over the element holding the body.
|
|
418
|
+
*
|
|
419
|
+
* `facts` is keyed by {@link mediaAssetFactsKey}. A placement with no entry,
|
|
420
|
+
* because the reader could not answer for its asset, keeps its stored props.
|
|
421
|
+
* The SAME map comes back when nothing changes, so a page with no library
|
|
422
|
+
* asset pays for one walk and no copy, and the input is never mutated either
|
|
423
|
+
* way.
|
|
424
|
+
*/ export function applyMediaAssetFacts(nodes, facts, options = {}) {
|
|
425
|
+
if (!facts.size) return nodes;
|
|
426
|
+
let applied;
|
|
427
|
+
const write = (id, node, next)=>{
|
|
428
|
+
if (!applied) applied = _extends({}, nodes);
|
|
429
|
+
applied[id] = _extends({}, node, next.props ? {
|
|
430
|
+
props: next.props
|
|
431
|
+
} : {}, next.resolvedProps ? {
|
|
432
|
+
resolvedProps: next.resolvedProps
|
|
433
|
+
} : {});
|
|
434
|
+
};
|
|
435
|
+
for(const id in nodes){
|
|
436
|
+
const node = nodes[id];
|
|
437
|
+
const ref = placedAsset(node, options.only);
|
|
438
|
+
const found = ref ? facts.get(mediaAssetFactsKey(ref)) : undefined;
|
|
439
|
+
if (found) {
|
|
440
|
+
const overlay = node.componentId === VIDEO_COMPONENT_ID ? withFilmFacts : withImageFacts;
|
|
441
|
+
const props = node.props && overlay(node.props, found);
|
|
442
|
+
const resolvedProps = node.resolvedProps && overlay(node.resolvedProps, found);
|
|
443
|
+
if (props === node.props && resolvedProps === node.resolvedProps) continue;
|
|
444
|
+
write(id, node, {
|
|
445
|
+
props,
|
|
446
|
+
resolvedProps
|
|
447
|
+
});
|
|
448
|
+
continue;
|
|
449
|
+
}
|
|
450
|
+
// A markdown body, under the same `only` rule `mediaAssetRefs` collects
|
|
451
|
+
// under: a body image is not a placement of the Image element, so a reader
|
|
452
|
+
// asking for one element's placements is not asking about bodies.
|
|
453
|
+
if (options.only) continue;
|
|
454
|
+
const { componentId } = node;
|
|
455
|
+
if (!componentId || !owns(MARKDOWN_BODY_PROPS, componentId)) continue;
|
|
456
|
+
const props = node.props && withBodyImageFacts(node.props, componentId, facts);
|
|
457
|
+
const resolvedProps = node.resolvedProps && withBodyImageFacts(node.resolvedProps, componentId, facts);
|
|
458
|
+
if (props === node.props && resolvedProps === node.resolvedProps) continue;
|
|
459
|
+
write(id, node, {
|
|
460
|
+
props,
|
|
461
|
+
resolvedProps
|
|
462
|
+
});
|
|
463
|
+
}
|
|
464
|
+
return applied ? applied : nodes;
|
|
465
|
+
}
|
|
466
|
+
|
|
467
|
+
//# sourceMappingURL=media-asset-facts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../libs/aglyn/src/lib/app-utils/media-asset-facts.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/**\n * What a placed library asset is NOW, read from its DAM document when the\n * page is composed rather than copied onto the node when it was picked: a\n * film's length, shape and poster (AGL-2807), and an image's pixel pair\n * (AGL-2833).\n *\n * ## Why the pick-time copy is not enough\n *\n * Picking a library asset copies facts onto the node. An image gets its pixel\n * pair ({@link intrinsicMediaSize}), which `image.tsx` renders as the\n * `<img>`'s `width`/`height` attributes so the browser can reserve the box\n * before the bytes arrive. A film gets its running time, its frame's pair and\n * a poster flag ({@link videoMediaProps}): the pair becomes the player's CSS\n * `aspect-ratio`, the running time becomes `VideoObject.duration`, and the\n * flag decides whether a lightbox `<img>` and a `thumbnailUrl` exist at all.\n *\n * A replace (AGL-2732) keeps the asset's id and URL and rewrites its document:\n * an image's `width`/`height`, a film's `video` and `poster` records. It\n * cannot rewrite the nodes, which sit in every screen, layout, component and\n * published version that places the asset. So after a replace with a\n * different shape, every page placing the image reserved the previous\n * picture's box and shifted when the new one decoded, and every page placing\n * the film kept the previous film's length and shape, until someone re-picked\n * it.\n *\n * ## The rule\n *\n * Two surfaces read each placed asset's document and lay what it records over\n * the node here: the tenant's composition, for the page a visitor gets\n * (`libs/tenant/runtime/src/lib/get-media-asset-facts.ts`), and the console,\n * for the besigner canvas an author edits and the Preview that checks it\n * (AGL-2838, AGL-2849). Both decide what a read answers through\n * {@link mediaAssetFactsFromDocument}, so the editor cannot disagree with the\n * page about which assets answer. When the asset cannot be answered for (a\n * failed or pending read, a missing or deleted document, an asset the CDN\n * would not serve under this page's URL, one past the composition's cap), the\n * node keeps what the pick stored. That is the render every page had before\n * this, never a worse one. When the asset answers:\n *\n * - **A film's facts win, including their ABSENCE.** A film the replace left\n * with no `video` record has no known shape, so a stored pair describing\n * the previous film is dropped rather than published, and a poster flag the\n * document no longer backs is dropped with it. One stored value survives: a\n * running time the AUTHOR typed for a film the DAM has no running time for.\n * The pick only ever writes the duration together with the pixel pair\n * ({@link videoMediaProps} is all-or-nothing on the `video` record), and the\n * pair is not an author control. So a duration standing alone is an\n * author's, and a duration standing beside a pair is a copy of a film that\n * may no longer be the one in the bucket.\n * - **An image's pair wins when the document records one.** When it records\n * none (an SVG, which the upload cannot measure, or a file older than\n * AGL-173), the stored pair stays, whether an author typed it through the\n * API or it is a copy of the file the asset held before. The asymmetry with\n * a film is in the render, not the data. A film's pair is the player's\n * permanent box, but an image's is only a reservation\n * (`aspect-ratio: auto w / h`), which the decoded picture's own ratio\n * replaces. Dropping the pair guarantees a shift of the image's full height\n * on every view. A stale pair shifts by the difference between two heights,\n * and a pair typed for a file the DAM cannot measure shifts by nothing.\n *\n * Nothing an author sets for the placement is touched: an image's CSS\n * `width` and `height`, its fit and radius, and a film's own poster describe\n * the placement rather than the file.\n *\n * Imported by path and never through a barrel: every `@aglyn/aglyn` barrel\n * ships to published pages, and nothing here has a reason to reach one, so\n * the composition and the console both import this module by path.\n */\n\nimport { CANVAS_ROOT_ELEMENT_ID } from '../foundation/constants/canvas'\nimport { mediaCdnScopeRefusal, parseMediaCdnScope } from './media-cdn-scope'\nimport { intrinsicMediaSize, videoMediaProps } from './media-metadata'\nimport { hostQualifiedScope, type MediaRef, parseMediaRef } from './media-ref'\nimport { VIDEO_COMPONENT_ID } from './video-object'\n\n/** The Image element's persisted component id (`image.tsx`), never renamed. */\nexport const IMAGE_COMPONENT_ID = 'image'\n\n/**\n * The prop each element that holds a markdown-lite DOCUMENT keeps it in, and\n * therefore every element whose body can name a library image (AGL-3149).\n *\n * The same two elements and the same two prop names `resolveMarkdownSource`\n * walks for a table of contents (AGL-1162), which is the other reader of a\n * body's contents. They differ: the Markdown element calls it `content` and a\n * collection entry's body calls it `markdown`.\n *\n * Both ids are spelled out rather than imported. `markdown` belongs to a\n * plugin, which core may never import; `collectionEntryBody` is exported by\n * `collection-entries.ts`, but that module is 1,860 lines and drags\n * `content-authors.ts` behind it, and this one is deliberately outside the\n * barrel that ships to published pages. A persisted component id is a string\n * that cannot change — renaming one orphans every document that stores it —\n * so the copy cannot drift in the way an imported value would protect against.\n */\nconst MARKDOWN_BODY_PROPS: Readonly<Record<string, string>> = {\n markdown: 'content',\n collectionEntryBody: 'markdown',\n}\n\n/** The root of a composed map, where a walk in document order starts. */\nconst ROOT_NODE_ID: string = CANVAS_ROOT_ELEMENT_ID\n\n/**\n * What a readable asset's media document records, as the overlay consumes it.\n *\n * Raw on purpose: {@link intrinsicMediaSize} and {@link videoMediaProps} are\n * where a pair and a `video` record are bounded, and a second reading of the\n * same numbers here is how two files come to disagree about what a partial\n * record means.\n */\nexport interface MediaAssetFacts {\n /** The document's `width`: an image's, read from its bytes at upload. */\n width?: unknown\n /** The document's `height`, the other half of {@link width}. */\n height?: unknown\n /** The document's `video` record: `durationMs`, `width` and `height`. */\n video?: unknown\n /** The document's generated `poster` record, when it has one. */\n poster?: unknown\n}\n\n/**\n * Every field an asset's facts are decided from, and the projection a reader\n * asks Firestore for: ONE list, whichever surface reads. `width` and `height`\n * (an image's) and `video` and `poster` (a film's) are the facts. The other\n * three are the gates `serveMediaCdn` applies before it will serve an asset at\n * all, so no surface shows the shape of a file its page's URL refuses.\n */\nexport const MEDIA_ASSET_FACT_FIELDS = [\n 'width',\n 'height',\n 'video',\n 'poster',\n 'deletedAt',\n 'private',\n 'visibleTo',\n] as const\n\n/** An asset's media document, as far as {@link MEDIA_ASSET_FACT_FIELDS} reach. */\nexport type MediaAssetDocument = Partial<\n Record<(typeof MEDIA_ASSET_FACT_FIELDS)[number], unknown>\n>\n\n/** The elements whose placements follow their file. */\nexport type MediaAssetElement =\n | typeof IMAGE_COMPONENT_ID\n | typeof VIDEO_COMPONENT_ID\n\nexport interface MediaAssetFactsOptions {\n /**\n * One element's placements only, by persisted component id. Absent means\n * both, which is what the composition asks for.\n */\n only?: MediaAssetElement\n}\n\n/** A node as the composed map holds it: flat, children by id. */\ninterface ComposedMediaNode {\n componentId?: string\n nodes?: unknown\n props?: Record<string, unknown>\n resolvedProps?: Record<string, unknown>\n}\n\nconst owns = (map: object, key: string) =>\n Object.prototype.hasOwnProperty.call(map, key)\n\n/**\n * The key an asset's facts are filed under: the reference's own scope and id.\n *\n * Deliberately NOT the host-qualified scope a page renders. The document lives\n * under the scope's owner whichever site places it, and which site may be\n * shown it is the reader's question, answered once per page.\n */\nexport function mediaAssetFactsKey(\n ref: Pick<MediaRef, 'scope' | 'mediaId'>,\n): string {\n return `${ref.scope}/${ref.mediaId}`\n}\n\n/**\n * Where an asset's media document lives: under the scope's OWNER, `orgs/` for\n * the org library and `hosts/` for a site's own, whichever site places it.\n * `null` for a scope the CDN would not parse, which no read can answer for.\n */\nexport function mediaAssetDocumentPath(\n ref: Pick<MediaRef, 'scope' | 'mediaId'>,\n): string | null {\n const scope = parseMediaCdnScope(ref.scope)\n if (!scope) return null\n return `${scope.isOrg ? 'orgs' : 'hosts'}/${scope.scopeId}/media/${ref.mediaId}`\n}\n\n/**\n * The facts one read of an asset's document yields for a placement rendered\n * on `hostId`'s pages, or `undefined` when the placement keeps its stored\n * props.\n *\n * An answer exists only for a document that was read, is live, is not\n * private, and is visible to that site under the host-qualified scope the page\n * renders: the verdict the CDN reaches when the browser asks for the bytes.\n * The URL a page renders names the site doing the rendering\n * (`resolveMediaSrc`), so visibility is asked of THAT scope, not of the scope\n * the reference was stored with.\n */\nexport function mediaAssetFactsFromDocument(\n document: MediaAssetDocument | null | undefined,\n ref: Pick<MediaRef, 'scope'>,\n hostId: string,\n): MediaAssetFacts | undefined {\n if (!document) return undefined\n if (document.deletedAt || document.private === true) return undefined\n const served = parseMediaCdnScope(hostQualifiedScope(ref.scope, hostId))\n if (!served || mediaCdnScopeRefusal(served, document.visibleTo)) {\n return undefined\n }\n return {\n width: document.width,\n height: document.height,\n video: document.video,\n poster: document.poster,\n }\n}\n\n/** The library asset an Image or Video node places, or null for anything else. */\nfunction placedAsset(\n node: ComposedMediaNode | null | undefined,\n only?: MediaAssetElement,\n): MediaRef | null {\n const componentId = node?.componentId\n if (componentId !== IMAGE_COMPONENT_ID && componentId !== VIDEO_COMPONENT_ID) {\n return null\n }\n if (only && componentId !== only) return null\n // The precedence every other reader of the composed map uses: a node inside\n // a repeated collection carries its bound values in the resolved copy.\n const props = node?.resolvedProps ?? node?.props\n return parseMediaRef(props?.['src'])\n}\n\n/** A compose-time token the tenant has not substituted — never a document. */\nconst UNRESOLVED_TOKEN = /^\\{\\{[^}]+\\}\\}$/\n\n/**\n * The markdown-lite document a node holds, or `''` for a node holding none.\n *\n * `resolvedProps` first, for the reason {@link placedAsset} gives: an entry\n * body is the literal `{{entry.body}}` in `props` and the entry's real text in\n * the resolved copy. An unsubstituted token is not a document — it can name no\n * asset — so it is dropped here rather than walked for images that a canvas\n * surface would never find.\n */\nfunction markdownBodyOf(\n props: Record<string, unknown> | undefined,\n componentId: string | undefined,\n): string {\n const prop =\n componentId && owns(MARKDOWN_BODY_PROPS, componentId)\n ? MARKDOWN_BODY_PROPS[componentId]\n : undefined\n const text = prop ? props?.[prop] : undefined\n if (typeof text !== 'string' || UNRESOLVED_TOKEN.test(text.trim())) return ''\n return text\n}\n\n/** See {@link markdownBodyOf} — the body the page will actually render. */\nfunction markdownBody(node: ComposedMediaNode | null | undefined): string {\n return markdownBodyOf(\n node?.resolvedProps ?? node?.props,\n node?.componentId,\n )\n}\n\n/**\n * A markdown-lite image: ``, capturing only the target, and only\n * up to the first whitespace or `)`.\n *\n * That is the whole of the syntax `markdown-lite.ts` accepts — no title string\n * after the target, no angle-bracket form — so there is nowhere else in a body\n * for a reference to hide, and matching more than the parser does would name\n * assets the renderer never asks for.\n */\nconst MARKDOWN_IMAGE_TARGET = /!\\[[^\\]]*\\]\\(\\s*([^)\\s]+)/g\n\n/**\n * Every library asset a markdown body's images name, in the order the body\n * names them, each beside the target EXACTLY as the body wrote it.\n *\n * The raw target is carried because that is the key the renderer has: it holds\n * the parsed block's `src`, the same string, and looking a pair up by it costs\n * no second parse per image on every render.\n *\n * A target that is not a `media:` reference yields nothing — a hotlinked URL\n * and a legacy stored path have no DAM document to read, and the renderer\n * gives those today's markup unchanged.\n */\nfunction markdownImageRefs(\n text: string,\n): Array<{ target: string; ref: MediaRef }> {\n if (!text.includes('![')) return []\n const found: Array<{ target: string; ref: MediaRef }> = []\n for (const match of text.matchAll(MARKDOWN_IMAGE_TARGET)) {\n const target = match[1]\n const ref = parseMediaRef(target)\n if (ref) found.push({ target, ref })\n }\n return found\n}\n\n/**\n * The map's node ids in document order: depth first from the root through\n * each node's child ids, then every id the walk never reached (a map with no\n * root, an orphan) in the order the map lists it. That puts the top of the\n * page ahead of its footer, and it is the same order for the same map.\n */\nfunction documentOrder(nodes: Record<string, unknown>): string[] {\n const order: string[] = []\n const seen = new Set<string>()\n const stack = owns(nodes, ROOT_NODE_ID) ? [ROOT_NODE_ID] : []\n while (stack.length) {\n const id = stack.pop() as string\n if (seen.has(id) || !owns(nodes, id)) continue\n seen.add(id)\n order.push(id)\n const children = (nodes[id] as ComposedMediaNode | null)?.nodes\n if (!Array.isArray(children)) continue\n for (let index = children.length - 1; index >= 0; index -= 1) {\n const child = children[index]\n if (typeof child === 'string' && !seen.has(child)) stack.push(child)\n }\n }\n for (const id in nodes) if (!seen.has(id)) order.push(id)\n return order\n}\n\n/**\n * Every distinct library asset the Image and Video nodes in a map place:\n * films first, then images, each in document order.\n *\n * A read that is capped honors that order. A film goes first because its\n * stale facts are the worse render (a player of the wrong shape and a\n * thumbnail that 404s, against a reservation that corrects itself when an\n * image decodes), and document order covers the top of the page before its\n * footer.\n *\n * `[]` for a page that places none, so a caller that gates its read on the\n * length spends nothing on it. A pinned and an unpinned reference to one\n * asset are one entry: a pin names bytes, not a different asset.\n */\nexport function mediaAssetRefs(\n nodes: Record<string, unknown> | null | undefined,\n options: MediaAssetFactsOptions = {},\n): MediaRef[] {\n const refs: MediaRef[] = []\n if (!nodes) return refs\n const order = documentOrder(nodes)\n const seen = new Set<string>()\n for (const element of [VIDEO_COMPONENT_ID, IMAGE_COMPONENT_ID] as const) {\n if (options.only && options.only !== element) continue\n for (const id of order) {\n const node = nodes[id] as ComposedMediaNode | null\n if (node?.componentId !== element) continue\n const ref = placedAsset(node)\n if (!ref) continue\n const key = mediaAssetFactsKey(ref)\n if (seen.has(key)) continue\n seen.add(key)\n refs.push(ref)\n }\n }\n // A markdown body's images come LAST, and only when the caller wants every\n // element (AGL-3149). Last because of what a capped read costs each kind: a\n // placement that misses out renders at its pick-time pair, a body image that\n // misses out renders exactly as it does today, and a film that misses out\n // gets a player of the wrong shape. Only-when-unfiltered because `only` asks\n // for one ELEMENT's placements, and a body image is not a placement of the\n // Image element — the video-asset reader would otherwise read image\n // documents it has no use for.\n if (options.only) return refs\n for (const id of order) {\n const body = markdownBody(nodes[id] as ComposedMediaNode | null)\n for (const { ref } of markdownImageRefs(body)) {\n const key = mediaAssetFactsKey(ref)\n if (seen.has(key)) continue\n seen.add(key)\n refs.push(ref)\n }\n }\n return refs\n}\n\nconst usable = (value: unknown): value is number =>\n typeof value === 'number' && Number.isFinite(value) && value > 0\n\n/** A film's props with its asset's facts laid over them. See the module note. */\nfunction withFilmFacts(\n props: Record<string, unknown>,\n facts: MediaAssetFacts,\n): Record<string, unknown> {\n const live = videoMediaProps({\n componentId: VIDEO_COMPONENT_ID,\n propName: 'src',\n assetVideo: facts.video,\n assetPoster: facts.poster,\n })\n const {\n durationSeconds,\n intrinsicWidth,\n intrinsicHeight,\n posterFromSource: _storedPosterFlag,\n ...next\n } = props\n // The pick writes a duration only beside the pixel pair, so a pair is what\n // marks the stored duration as a copy rather than an author's own.\n const typedByAuthor = !(usable(intrinsicWidth) && usable(intrinsicHeight))\n if (live.durationSeconds !== undefined) {\n next['durationSeconds'] = live.durationSeconds\n } else if (typedByAuthor && durationSeconds !== undefined) {\n next['durationSeconds'] = durationSeconds\n }\n if (live.intrinsicWidth !== undefined && live.intrinsicHeight !== undefined) {\n next['intrinsicWidth'] = live.intrinsicWidth\n next['intrinsicHeight'] = live.intrinsicHeight\n }\n if (live.posterFromSource) next['posterFromSource'] = true\n return next\n}\n\n/**\n * An image's props with its asset's pair laid over them, or the SAME object\n * when the document records no usable pair or the stored one already matches.\n * See the module note.\n */\nfunction withImageFacts(\n props: Record<string, unknown>,\n facts: MediaAssetFacts,\n): Record<string, unknown> {\n // Through the pick's own gate, so the overlay and the pick agree on what a\n // usable pair is: both halves, finite and positive.\n const live = intrinsicMediaSize({\n componentId: IMAGE_COMPONENT_ID,\n propName: 'src',\n assetWidth: facts.width,\n assetHeight: facts.height,\n })\n if (live.intrinsicWidth === undefined || live.intrinsicHeight === undefined) {\n return props\n }\n if (\n props['intrinsicWidth'] === live.intrinsicWidth &&\n props['intrinsicHeight'] === live.intrinsicHeight\n ) {\n return props\n }\n return {\n ...props,\n intrinsicWidth: live.intrinsicWidth,\n intrinsicHeight: live.intrinsicHeight,\n }\n}\n\n/**\n * The prop a markdown body carries its images' pixel pairs in, keyed by the\n * target the body wrote (AGL-3149).\n *\n * A body image is not a node, so it cannot take `intrinsicWidth` and\n * `intrinsicHeight` the way a placement does; the pairs travel together on the\n * element that holds the document, and the renderer looks each one up by the\n * parsed block's `src`.\n */\nexport const BODY_IMAGE_SIZES_PROP = 'intrinsicSizes'\n\n/** One body image's pair, as {@link BODY_IMAGE_SIZES_PROP} carries it. */\nexport interface BodyImageSize {\n width: number\n height: number\n}\n\n/**\n * A markdown body's props with a pair for each library image it names, or the\n * SAME object when no image in it can be answered for.\n *\n * Only images whose document records a usable pair get an entry, through the\n * same {@link intrinsicMediaSize} gate a placement goes through. An image left\n * out is one the renderer must give today's markup: `srcSet` without the pair\n * makes `sizes` the image's rendered width, which upscales anything narrower\n * than the column, so a partial answer is worse here than no answer.\n */\nfunction withBodyImageFacts(\n props: Record<string, unknown>,\n componentId: string | undefined,\n facts: ReadonlyMap<string, MediaAssetFacts>,\n): Record<string, unknown> {\n // THIS object's own body, never the node's resolved one: `props` on a bound\n // entry body still holds the `{{entry.body}}` token, and pairs for images it\n // does not name are bytes in the tree that nothing can ever look up.\n let sizes: Record<string, BodyImageSize> | undefined\n for (const { target, ref } of markdownImageRefs(\n markdownBodyOf(props, componentId),\n )) {\n const found = facts.get(mediaAssetFactsKey(ref))\n if (!found) continue\n const live = intrinsicMediaSize({\n componentId: IMAGE_COMPONENT_ID,\n propName: 'src',\n assetWidth: found.width,\n assetHeight: found.height,\n })\n if (\n live.intrinsicWidth === undefined ||\n live.intrinsicHeight === undefined\n ) {\n continue\n }\n if (!sizes) sizes = {}\n sizes[target] = {\n width: live.intrinsicWidth,\n height: live.intrinsicHeight,\n }\n }\n if (!sizes) return props\n return { ...props, [BODY_IMAGE_SIZES_PROP]: sizes }\n}\n\n/**\n * The composed map with each placed asset's facts laid over its node, and each\n * markdown body's images' pairs laid over the element holding the body.\n *\n * `facts` is keyed by {@link mediaAssetFactsKey}. A placement with no entry,\n * because the reader could not answer for its asset, keeps its stored props.\n * The SAME map comes back when nothing changes, so a page with no library\n * asset pays for one walk and no copy, and the input is never mutated either\n * way.\n */\nexport function applyMediaAssetFacts<T extends Record<string, unknown>>(\n nodes: T,\n facts: ReadonlyMap<string, MediaAssetFacts>,\n options: MediaAssetFactsOptions = {},\n): T {\n if (!facts.size) return nodes\n let applied: Record<string, unknown> | undefined\n const write = (id: string, node: ComposedMediaNode, next: {\n props?: Record<string, unknown>\n resolvedProps?: Record<string, unknown>\n }): void => {\n if (!applied) applied = { ...nodes }\n applied[id] = {\n ...node,\n ...(next.props ? { props: next.props } : {}),\n ...(next.resolvedProps ? { resolvedProps: next.resolvedProps } : {}),\n }\n }\n for (const id in nodes) {\n const node = nodes[id] as ComposedMediaNode\n const ref = placedAsset(node, options.only)\n const found = ref ? facts.get(mediaAssetFactsKey(ref)) : undefined\n if (found) {\n const overlay =\n node.componentId === VIDEO_COMPONENT_ID ? withFilmFacts : withImageFacts\n const props = node.props && overlay(node.props, found)\n const resolvedProps =\n node.resolvedProps && overlay(node.resolvedProps, found)\n if (props === node.props && resolvedProps === node.resolvedProps) continue\n write(id, node, { props, resolvedProps })\n continue\n }\n // A markdown body, under the same `only` rule `mediaAssetRefs` collects\n // under: a body image is not a placement of the Image element, so a reader\n // asking for one element's placements is not asking about bodies.\n if (options.only) continue\n const { componentId } = node\n if (!componentId || !owns(MARKDOWN_BODY_PROPS, componentId)) continue\n const props =\n node.props && withBodyImageFacts(node.props, componentId, facts)\n const resolvedProps =\n node.resolvedProps &&\n withBodyImageFacts(node.resolvedProps, componentId, facts)\n if (props === node.props && resolvedProps === node.resolvedProps) continue\n write(id, node, { props, resolvedProps })\n }\n return applied ? (applied as T) : nodes\n}\n"],"names":["CANVAS_ROOT_ELEMENT_ID","mediaCdnScopeRefusal","parseMediaCdnScope","intrinsicMediaSize","videoMediaProps","hostQualifiedScope","parseMediaRef","VIDEO_COMPONENT_ID","IMAGE_COMPONENT_ID","MARKDOWN_BODY_PROPS","markdown","collectionEntryBody","ROOT_NODE_ID","MEDIA_ASSET_FACT_FIELDS","owns","map","key","Object","prototype","hasOwnProperty","call","mediaAssetFactsKey","ref","scope","mediaId","mediaAssetDocumentPath","isOrg","scopeId","mediaAssetFactsFromDocument","document","hostId","undefined","deletedAt","private","served","visibleTo","width","height","video","poster","placedAsset","node","only","componentId","props","resolvedProps","UNRESOLVED_TOKEN","markdownBodyOf","prop","text","test","trim","markdownBody","MARKDOWN_IMAGE_TARGET","markdownImageRefs","includes","found","match","matchAll","target","push","documentOrder","nodes","order","seen","Set","stack","length","id","pop","has","add","children","Array","isArray","index","child","mediaAssetRefs","options","refs","element","body","usable","value","Number","isFinite","withFilmFacts","facts","live","propName","assetVideo","assetPoster","durationSeconds","intrinsicWidth","intrinsicHeight","posterFromSource","_storedPosterFlag","next","typedByAuthor","withImageFacts","assetWidth","assetHeight","BODY_IMAGE_SIZES_PROP","withBodyImageFacts","sizes","get","applyMediaAssetFacts","size","applied","write","overlay"],"mappings":";;AAAA;;;;;;;;;;;;;;;CAeC,GAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmEC,GAED,SAASA,sBAAsB,QAAQ,oCAAgC;AACvE,SAASC,oBAAoB,EAAEC,kBAAkB,QAAQ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QS;QACzD,IAAIyB,OAAO;YACT,MAAMsD,UACJrE,KAAKE,WAAW,KAAKpC,qBAAqB+E,gBAAgBa;YAC5D,MAAMvD,QAAQH,KAAKG,KAAK,IAAIkE,QAAQrE,KAAKG,KAAK,EAAEY;YAChD,MAAMX,gBACJJ,KAAKI,aAAa,IAAIiE,QAAQrE,KAAKI,aAAa,EAAEW;YACpD,IAAIZ,UAAUH,KAAKG,KAAK,IAAIC,kBAAkBJ,KAAKI,aAAa,EAAE;YAClEgE,MAAMzC,IAAI3B,MAAM;gBAAEG;gBAAOC;YAAc;YACvC;QACF;QACA,wEAAwE;QACxE,2EAA2E;QAC3E,kEAAkE;QAClE,IAAIiC,QAAQpC,IAAI,EAAE;QAClB,MAAM,EAAEC,WAAW,EAAE,GAAGF;QACxB,IAAI,CAACE,eAAe,CAAC7B,KAAKL,qBAAqBkC,cAAc;QAC7D,MAAMC,QACJH,KAAKG,KAAK,IAAI2D,mBAAmB9D,KAAKG,KAAK,EAAED,aAAa4C;QAC5D,MAAM1C,gBACJJ,KAAKI,aAAa,IAClB0D,mBAAmB9D,KAAKI,aAAa,EAAEF,aAAa4C;QACtD,IAAI3C,UAAUH,KAAKG,KAAK,IAAIC,kBAAkBJ,KAAKI,aAAa,EAAE;QAClEgE,MAAMzC,IAAI3B,MAAM;YAAEG;YAAOC;QAAc;IACzC;IACA,OAAO+D,UAAWA,UAAgB9C;AACpC"}
|
|
@@ -0,0 +1,65 @@
|
|
|
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
|
+
/** One CDN path segment: a host id, an org id, a media id or a content hash. */
|
|
18
|
+
export declare const MEDIA_CDN_SEGMENT: RegExp;
|
|
19
|
+
/**
|
|
20
|
+
* The parsed CDN scope segment (AGL-1043). Shapes:
|
|
21
|
+
*
|
|
22
|
+
* - `{hostId}` — that host's own library
|
|
23
|
+
* - `org:{orgId}` — the org library, ORG-WIDE assets only
|
|
24
|
+
* - `org:{orgId}:{hostId}` — an org asset in one site's context
|
|
25
|
+
*
|
|
26
|
+
* The host is in the URL rather than sniffed from the `Host` header on
|
|
27
|
+
* purpose. A header is the requester's CHOICE: anyone holding a restricted
|
|
28
|
+
* asset's id could fetch it through a domain that IS permitted and get the
|
|
29
|
+
* bytes, so header-based enforcement stops accidents while looking like a
|
|
30
|
+
* boundary. Here the decision is a pure function of (URL, doc), and since
|
|
31
|
+
* the cache key IS the URL, one host's answer can never reach another.
|
|
32
|
+
*/
|
|
33
|
+
export interface MediaCdnScope {
|
|
34
|
+
isOrg: boolean;
|
|
35
|
+
scopeId: string;
|
|
36
|
+
/** Only on the `org:{orgId}:{hostId}` form. */
|
|
37
|
+
contextHostId?: string;
|
|
38
|
+
}
|
|
39
|
+
export declare function parseMediaCdnScope(scopeSegment: string): MediaCdnScope | null;
|
|
40
|
+
/**
|
|
41
|
+
* The three ways an org asset can be refused under a CDN URL.
|
|
42
|
+
*
|
|
43
|
+
* They are one 404 on the wire — whether a restricted asset exists is not
|
|
44
|
+
* something an anonymous caller has standing to learn — and three different
|
|
45
|
+
* faults to whoever is looking at the broken page:
|
|
46
|
+
*
|
|
47
|
+
* - `restricted` — the asset carries a scope and this URL is not in it. The
|
|
48
|
+
* URL is what is wrong: a restricted asset has to be requested through the
|
|
49
|
+
* form that names the site (`hostQualifiedCdnPath`), and the same asset
|
|
50
|
+
* serves normally from the site it is shared with.
|
|
51
|
+
* - `unscoped` — no `visibleTo` at all, so the asset is undeliverable under
|
|
52
|
+
* EVERY URL form there is. The document is what is wrong, and it means a
|
|
53
|
+
* creation path wrote it without a scope: `newResourceScopeFields` is what
|
|
54
|
+
* stops that at compile time, and the scope backfill is what repairs the
|
|
55
|
+
* documents already written (`docs/SCOPE_DRIFT.md`).
|
|
56
|
+
* - `no-sites` — a stored empty array: somebody chose nobody. Equally
|
|
57
|
+
* undeliverable, and NOT repairable by the backfill, which leaves an empty
|
|
58
|
+
* array alone rather than widening a resource nobody asked to widen — so
|
|
59
|
+
* this one needs a person either way.
|
|
60
|
+
*/
|
|
61
|
+
export type MediaCdnScopeRefusal = 'restricted' | 'unscoped' | 'no-sites';
|
|
62
|
+
/** Why the asset is refused under this URL; `null` when it is not. */
|
|
63
|
+
export declare function mediaCdnScopeRefusal(scope: MediaCdnScope, visibleTo: unknown): MediaCdnScopeRefusal | null;
|
|
64
|
+
/** Whether the asset may be served under this URL. */
|
|
65
|
+
export declare function mediaCdnAllows(scope: MediaCdnScope, visibleTo: unknown): boolean;
|