@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,184 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2026 Aglyn LLC
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/ import { isFirstPartyHost, MEDIA_CDN_ROUTE, MEDIA_REF_PREFIX, parseMediaRef } from "./media-ref.js";
|
|
17
|
+
const STORAGE_DOWNLOAD_HOST = 'firebasestorage.googleapis.com';
|
|
18
|
+
const GCS_HOST = 'storage.googleapis.com';
|
|
19
|
+
/**
|
|
20
|
+
* The Storage emulator's `host:port`, whose download URLs have the same shape
|
|
21
|
+
* as production's. Read per call so a test can set it.
|
|
22
|
+
*/ function storageEmulatorHost() {
|
|
23
|
+
var _process_env;
|
|
24
|
+
const env = typeof process === 'undefined' ? undefined : (_process_env = process.env) == null ? void 0 : _process_env['FIREBASE_STORAGE_EMULATOR_HOST'];
|
|
25
|
+
return String(env != null ? env : '').trim().toLowerCase();
|
|
26
|
+
}
|
|
27
|
+
/** A library asset from `/api/media/cdn/{scope}/{mediaId}[/{hash}]`. */ function assetFromCdnPath(path) {
|
|
28
|
+
const rest = path.slice(`${MEDIA_CDN_ROUTE}/`.length).split(/[?#]/)[0];
|
|
29
|
+
const segments = rest.split('/');
|
|
30
|
+
if (segments.length < 2 || segments.length > 3) return {
|
|
31
|
+
kind: 'malformed'
|
|
32
|
+
};
|
|
33
|
+
let scope;
|
|
34
|
+
try {
|
|
35
|
+
scope = decodeURIComponent(segments[0]);
|
|
36
|
+
} catch (unused) {
|
|
37
|
+
return {
|
|
38
|
+
kind: 'malformed'
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
// Parsed through the reference grammar rather than a second copy of it. A
|
|
42
|
+
// content pin in the path is dropped: a paid link names the asset, and the
|
|
43
|
+
// stable URL always serves its current bytes.
|
|
44
|
+
const ref = parseMediaRef(`${MEDIA_REF_PREFIX}${scope}/${segments[1]}`);
|
|
45
|
+
return ref ? {
|
|
46
|
+
kind: 'asset',
|
|
47
|
+
scope: ref.scope,
|
|
48
|
+
mediaId: ref.mediaId
|
|
49
|
+
} : {
|
|
50
|
+
kind: 'malformed'
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
/** Decodes each `/`-separated piece of a path; null when one is malformed. */ function decodePath(pieces) {
|
|
54
|
+
try {
|
|
55
|
+
return pieces.map((piece)=>decodeURIComponent(piece)).join('/');
|
|
56
|
+
} catch (unused) {
|
|
57
|
+
return null;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Classifies a stored value. The same input always gives the same answer, so
|
|
62
|
+
* every branch is checkable without a project.
|
|
63
|
+
*/ export function parsePaidMediaSource(stored) {
|
|
64
|
+
const value = typeof stored === 'string' ? stored.trim() : '';
|
|
65
|
+
if (!value) return {
|
|
66
|
+
kind: 'malformed'
|
|
67
|
+
};
|
|
68
|
+
if (value.startsWith(MEDIA_REF_PREFIX)) {
|
|
69
|
+
const ref = parseMediaRef(value);
|
|
70
|
+
return ref ? {
|
|
71
|
+
kind: 'asset',
|
|
72
|
+
scope: ref.scope,
|
|
73
|
+
mediaId: ref.mediaId
|
|
74
|
+
} : {
|
|
75
|
+
kind: 'malformed'
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
if (value.startsWith(`${MEDIA_CDN_ROUTE}/`)) return assetFromCdnPath(value);
|
|
79
|
+
if (!/^https?:\/\//i.test(value)) return {
|
|
80
|
+
kind: 'malformed'
|
|
81
|
+
};
|
|
82
|
+
let url;
|
|
83
|
+
try {
|
|
84
|
+
url = new URL(value);
|
|
85
|
+
} catch (unused) {
|
|
86
|
+
return {
|
|
87
|
+
kind: 'malformed'
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
const hostname = url.hostname.toLowerCase();
|
|
91
|
+
const emulator = storageEmulatorHost();
|
|
92
|
+
if (hostname === STORAGE_DOWNLOAD_HOST || emulator && url.host.toLowerCase() === emulator) {
|
|
93
|
+
// `/v0/b/{bucket}/o/{object}`, with the object key percent-encoded as one
|
|
94
|
+
// segment. A download URL in any other shape is still a token URL, so it
|
|
95
|
+
// is refused rather than handed through as a hotlink.
|
|
96
|
+
const match = /^\/v0\/b\/([^/]+)\/o\/([^/]+)$/.exec(url.pathname);
|
|
97
|
+
const bucket = match ? decodePath([
|
|
98
|
+
match[1]
|
|
99
|
+
]) : null;
|
|
100
|
+
const objectPath = match ? decodePath([
|
|
101
|
+
match[2]
|
|
102
|
+
]) : null;
|
|
103
|
+
return bucket && objectPath ? {
|
|
104
|
+
kind: 'storage-object',
|
|
105
|
+
bucket,
|
|
106
|
+
objectPath
|
|
107
|
+
} : {
|
|
108
|
+
kind: 'malformed'
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
if (hostname === GCS_HOST) {
|
|
112
|
+
const [, bucketPiece, ...objectPieces] = url.pathname.split('/');
|
|
113
|
+
const bucket = bucketPiece ? decodePath([
|
|
114
|
+
bucketPiece
|
|
115
|
+
]) : null;
|
|
116
|
+
const objectPath = objectPieces.length ? decodePath(objectPieces) : null;
|
|
117
|
+
return bucket && objectPath ? {
|
|
118
|
+
kind: 'storage-object',
|
|
119
|
+
bucket,
|
|
120
|
+
objectPath
|
|
121
|
+
} : {
|
|
122
|
+
kind: 'malformed'
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
if (isFirstPartyHost(hostname) && url.pathname.startsWith(`${MEDIA_CDN_ROUTE}/`)) {
|
|
126
|
+
return assetFromCdnPath(url.pathname);
|
|
127
|
+
}
|
|
128
|
+
return {
|
|
129
|
+
kind: 'external',
|
|
130
|
+
url: value
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* The library asset a media object key belongs to, or null.
|
|
135
|
+
*
|
|
136
|
+
* Every writer keys an asset's object as `{base}/media/[folders/]{mediaId}`,
|
|
137
|
+
* with `base` either `hosts/{hostId}` or `orgs/{orgId}`. So a key in that
|
|
138
|
+
* shape whose last segment is id-shaped IS that asset, wherever a folder move
|
|
139
|
+
* has since put it. Derived objects (`…__r720p.mp4`, `…__poster.webp`) carry
|
|
140
|
+
* a dot and are no asset's key.
|
|
141
|
+
*
|
|
142
|
+
* This names the asset and decides nothing about access: a caller that signs
|
|
143
|
+
* still has to check the bucket and that the library is its own.
|
|
144
|
+
*/ export function paidMediaAssetOfObject(objectPath) {
|
|
145
|
+
const segments = String(objectPath != null ? objectPath : '').split('/');
|
|
146
|
+
if (segments.length < 4 || segments[2] !== 'media') return null;
|
|
147
|
+
if (segments.some((segment)=>!segment || segment === '..')) return null;
|
|
148
|
+
const [root, scopeId] = segments;
|
|
149
|
+
const scope = root === 'hosts' ? scopeId : root === 'orgs' ? `org:${scopeId}` : null;
|
|
150
|
+
if (!scope) return null;
|
|
151
|
+
const ref = parseMediaRef(`${MEDIA_REF_PREFIX}${scope}/${segments[segments.length - 1]}`);
|
|
152
|
+
return ref ? {
|
|
153
|
+
scope: ref.scope,
|
|
154
|
+
mediaId: ref.mediaId
|
|
155
|
+
} : null;
|
|
156
|
+
}
|
|
157
|
+
/**
|
|
158
|
+
* The library asset a stored paid-media URL names, in whichever form it was
|
|
159
|
+
* written, or null for a hotlink, a malformed value, or a Storage URL that
|
|
160
|
+
* names no asset. Pass `bucket` to refuse a download URL from any other
|
|
161
|
+
* bucket, which is what every server-side caller should do.
|
|
162
|
+
*/ export function paidMediaAssetOf(stored, options) {
|
|
163
|
+
const source = parsePaidMediaSource(stored);
|
|
164
|
+
if (source.kind === 'asset') {
|
|
165
|
+
return {
|
|
166
|
+
scope: source.scope,
|
|
167
|
+
mediaId: source.mediaId
|
|
168
|
+
};
|
|
169
|
+
}
|
|
170
|
+
if (source.kind !== 'storage-object') return null;
|
|
171
|
+
if ((options == null ? void 0 : options.bucket) !== undefined && source.bucket !== options.bucket) {
|
|
172
|
+
return null;
|
|
173
|
+
}
|
|
174
|
+
return paidMediaAssetOfObject(source.objectPath);
|
|
175
|
+
}
|
|
176
|
+
/**
|
|
177
|
+
* Whether two scope segments name the same library: the same host, or the
|
|
178
|
+
* same org whatever site either is qualified with.
|
|
179
|
+
*/ export function samePaidMediaLibrary(a, b) {
|
|
180
|
+
const library = (scope)=>scope.startsWith('org:') ? `org:${scope.slice(4).split(':')[0]}` : scope;
|
|
181
|
+
return library(a) === library(b);
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
//# sourceMappingURL=paid-media-source.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../libs/aglyn/src/lib/app-utils/paid-media-source.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2026 Aglyn LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n isFirstPartyHost,\n MEDIA_CDN_ROUTE,\n MEDIA_REF_PREFIX,\n parseMediaRef,\n} from './media-ref'\n\n/**\n * What a URL stored on a product's paid media names (AGL-2814).\n *\n * A members video is stored as whatever wrote it: the paid-media picker's\n * reference, an older picker's CDN path, the raw Storage download URL a\n * free-tier library hands out, or a hotlink typed into an import. Three\n * places have to agree on which ASSET that is: the stream route that signs\n * it, the console that shows the author whether it is protected, and the\n * media route that refuses to publish a file a product still sells. One\n * grammar, here, so they cannot disagree.\n *\n * Pure and environment-light: nothing here reads Firestore, Storage or a\n * secret, so the console bundle can carry it.\n */\nexport type PaidMediaSource =\n /** A media-library asset, named by scope segment and id. */\n | { kind: 'asset'; scope: string; mediaId: string }\n /** An object in a Storage bucket, from a download or GCS URL. */\n | { kind: 'storage-object'; bucket: string; objectPath: string }\n /** Somebody else's server. */\n | { kind: 'external'; url: string }\n /** Nothing that can be delivered, including a Storage URL we cannot read. */\n | { kind: 'malformed' }\n\nconst STORAGE_DOWNLOAD_HOST = 'firebasestorage.googleapis.com'\nconst GCS_HOST = 'storage.googleapis.com'\n\n/**\n * The Storage emulator's `host:port`, whose download URLs have the same shape\n * as production's. Read per call so a test can set it.\n */\nfunction storageEmulatorHost(): string {\n const env =\n typeof process === 'undefined' ? undefined : process.env?.['FIREBASE_STORAGE_EMULATOR_HOST']\n return String(env ?? '')\n .trim()\n .toLowerCase()\n}\n\n/** A library asset from `/api/media/cdn/{scope}/{mediaId}[/{hash}]`. */\nfunction assetFromCdnPath(path: string): PaidMediaSource {\n const rest = path.slice(`${MEDIA_CDN_ROUTE}/`.length).split(/[?#]/)[0]\n const segments = rest.split('/')\n if (segments.length < 2 || segments.length > 3) return { kind: 'malformed' }\n let scope: string\n try {\n scope = decodeURIComponent(segments[0])\n } catch {\n return { kind: 'malformed' }\n }\n // Parsed through the reference grammar rather than a second copy of it. A\n // content pin in the path is dropped: a paid link names the asset, and the\n // stable URL always serves its current bytes.\n const ref = parseMediaRef(`${MEDIA_REF_PREFIX}${scope}/${segments[1]}`)\n return ref\n ? { kind: 'asset', scope: ref.scope, mediaId: ref.mediaId }\n : { kind: 'malformed' }\n}\n\n/** Decodes each `/`-separated piece of a path; null when one is malformed. */\nfunction decodePath(pieces: string[]): string | null {\n try {\n return pieces.map((piece) => decodeURIComponent(piece)).join('/')\n } catch {\n return null\n }\n}\n\n/**\n * Classifies a stored value. The same input always gives the same answer, so\n * every branch is checkable without a project.\n */\nexport function parsePaidMediaSource(stored: unknown): PaidMediaSource {\n const value = typeof stored === 'string' ? stored.trim() : ''\n if (!value) return { kind: 'malformed' }\n if (value.startsWith(MEDIA_REF_PREFIX)) {\n const ref = parseMediaRef(value)\n return ref\n ? { kind: 'asset', scope: ref.scope, mediaId: ref.mediaId }\n : { kind: 'malformed' }\n }\n if (value.startsWith(`${MEDIA_CDN_ROUTE}/`)) return assetFromCdnPath(value)\n if (!/^https?:\\/\\//i.test(value)) return { kind: 'malformed' }\n let url: URL\n try {\n url = new URL(value)\n } catch {\n return { kind: 'malformed' }\n }\n const hostname = url.hostname.toLowerCase()\n const emulator = storageEmulatorHost()\n if (\n hostname === STORAGE_DOWNLOAD_HOST ||\n (emulator && url.host.toLowerCase() === emulator)\n ) {\n // `/v0/b/{bucket}/o/{object}`, with the object key percent-encoded as one\n // segment. A download URL in any other shape is still a token URL, so it\n // is refused rather than handed through as a hotlink.\n const match = /^\\/v0\\/b\\/([^/]+)\\/o\\/([^/]+)$/.exec(url.pathname)\n const bucket = match ? decodePath([match[1]]) : null\n const objectPath = match ? decodePath([match[2]]) : null\n return bucket && objectPath\n ? { kind: 'storage-object', bucket, objectPath }\n : { kind: 'malformed' }\n }\n if (hostname === GCS_HOST) {\n const [, bucketPiece, ...objectPieces] = url.pathname.split('/')\n const bucket = bucketPiece ? decodePath([bucketPiece]) : null\n const objectPath = objectPieces.length ? decodePath(objectPieces) : null\n return bucket && objectPath\n ? { kind: 'storage-object', bucket, objectPath }\n : { kind: 'malformed' }\n }\n if (\n isFirstPartyHost(hostname) &&\n url.pathname.startsWith(`${MEDIA_CDN_ROUTE}/`)\n ) {\n return assetFromCdnPath(url.pathname)\n }\n return { kind: 'external', url: value }\n}\n\n/**\n * The library asset a media object key belongs to, or null.\n *\n * Every writer keys an asset's object as `{base}/media/[folders/]{mediaId}`,\n * with `base` either `hosts/{hostId}` or `orgs/{orgId}`. So a key in that\n * shape whose last segment is id-shaped IS that asset, wherever a folder move\n * has since put it. Derived objects (`…__r720p.mp4`, `…__poster.webp`) carry\n * a dot and are no asset's key.\n *\n * This names the asset and decides nothing about access: a caller that signs\n * still has to check the bucket and that the library is its own.\n */\nexport function paidMediaAssetOfObject(\n objectPath: string,\n): { scope: string; mediaId: string } | null {\n const segments = String(objectPath ?? '').split('/')\n if (segments.length < 4 || segments[2] !== 'media') return null\n if (segments.some((segment) => !segment || segment === '..')) return null\n const [root, scopeId] = segments\n const scope =\n root === 'hosts' ? scopeId : root === 'orgs' ? `org:${scopeId}` : null\n if (!scope) return null\n const ref = parseMediaRef(\n `${MEDIA_REF_PREFIX}${scope}/${segments[segments.length - 1]}`,\n )\n return ref ? { scope: ref.scope, mediaId: ref.mediaId } : null\n}\n\n/**\n * The library asset a stored paid-media URL names, in whichever form it was\n * written, or null for a hotlink, a malformed value, or a Storage URL that\n * names no asset. Pass `bucket` to refuse a download URL from any other\n * bucket, which is what every server-side caller should do.\n */\nexport function paidMediaAssetOf(\n stored: unknown,\n options?: { bucket?: string },\n): { scope: string; mediaId: string } | null {\n const source = parsePaidMediaSource(stored)\n if (source.kind === 'asset') {\n return { scope: source.scope, mediaId: source.mediaId }\n }\n if (source.kind !== 'storage-object') return null\n if (options?.bucket !== undefined && source.bucket !== options.bucket) {\n return null\n }\n return paidMediaAssetOfObject(source.objectPath)\n}\n\n/**\n * Whether two scope segments name the same library: the same host, or the\n * same org whatever site either is qualified with.\n */\nexport function samePaidMediaLibrary(a: string, b: string): boolean {\n const library = (scope: string) =>\n scope.startsWith('org:') ? `org:${scope.slice(4).split(':')[0]}` : scope\n return library(a) === library(b)\n}\n"],"names":["isFirstPartyHost","MEDIA_CDN_ROUTE","MEDIA_REF_PREFIX","parseMediaRef","STORAGE_DOWNLOAD_HOST","GCS_HOST","storageEmulatorHost","process","env","undefined","String","trim","toLowerCase","assetFromCdnPath","path","rest","slice","length","split","segments","kind","scope","decodeURIComponent","ref","mediaId","decodePath","pieces","map","piece","join","parsePaidMediaSource","stored","value","startsWith","test","url","URL","hostname","emulator","host","match","exec","pathname","bucket","objectPath","bucketPiece","objectPieces","paidMediaAssetOfObject","some","segment","root","scopeId","paidMediaAssetOf","options","source","samePaidMediaLibrary","a","b","library"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GAED,SACEA,gBAAgB,EAChBC,eAAe,EACfC,gBAAgB,EAChBC,aAAa,QACR,iBAAa;AA0BpB,MAAMC,wBAAwB;AAC9B,MAAMC,WAAW;AAEjB;;;CAGC,GACD,SAASC;QAEwCC;IAD/C,MAAMC,MACJ,OAAOD,YAAY,cAAcE,aAAYF,eAAAA,QAAQC,GAAG,qBAAXD,YAAa,CAAC,iCAAiC;IAC9F,OAAOG,OAAOF,cAAAA,MAAO,IAClBG,IAAI,GACJC,WAAW;AAChB;AAEA,sEAAsE,GACtE,SAASC,iBAAiBC,IAAY;IACpC,MAAMC,OAAOD,KAAKE,KAAK,CAAC,GAAGf,gBAAgB,CAAC,CAAC,CAACgB,MAAM,EAAEC,KAAK,CAAC,OAAO,CAAC,EAAE;IACtE,MAAMC,WAAWJ,KAAKG,KAAK,CAAC;IAC5B,IAAIC,SAASF,MAAM,GAAG,KAAKE,SAASF,MAAM,GAAG,GAAG,OAAO;QAAEG,MAAM;IAAY;IAC3E,IAAIC;IACJ,IAAI;QACFA,QAAQC,mBAAmBH,QAAQ,CAAC,EAAE;IACxC,EAAE,eAAM;QACN,OAAO;YAAEC,MAAM;QAAY;IAC7B;IACA,0EAA0E;IAC1E,2EAA2E;IAC3E,8CAA8C;IAC9C,MAAMG,MAAMpB,cAAc,GAAGD,mBAAmBmB,MAAM,CAAC,EAAEF,QAAQ,CAAC,EAAE,EAAE;IACtE,OAAOI,MACH;QAAEH,MAAM;QAASC,OAAOE,IAAIF,KAAK;QAAEG,SAASD,IAAIC,OAAO;IAAC,IACxD;QAAEJ,MAAM;IAAY;AAC1B;AAEA,4EAA4E,GAC5E,SAASK,WAAWC,MAAgB;IAClC,IAAI;QACF,OAAOA,OAAOC,GAAG,CAAC,CAACC,QAAUN,mBAAmBM,QAAQC,IAAI,CAAC;IAC/D,EAAE,eAAM;QACN,OAAO;IACT;AACF;AAEA;;;CAGC,GACD,OAAO,SAASC,qBAAqBC,MAAe;IAClD,MAAMC,QAAQ,OAAOD,WAAW,WAAWA,OAAOpB,IAAI,KAAK;IAC3D,IAAI,CAACqB,OAAO,OAAO;QAAEZ,MAAM;IAAY;IACvC,IAAIY,MAAMC,UAAU,CAAC/B,mBAAmB;QACtC,MAAMqB,MAAMpB,cAAc6B;QAC1B,OAAOT,MACH;YAAEH,MAAM;YAASC,OAAOE,IAAIF,KAAK;YAAEG,SAASD,IAAIC,OAAO;QAAC,IACxD;YAAEJ,MAAM;QAAY;IAC1B;IACA,IAAIY,MAAMC,UAAU,CAAC,GAAGhC,gBAAgB,CAAC,CAAC,GAAG,OAAOY,iBAAiBmB;IACrE,IAAI,CAAC,gBAAgBE,IAAI,CAACF,QAAQ,OAAO;QAAEZ,MAAM;IAAY;IAC7D,IAAIe;IACJ,IAAI;QACFA,MAAM,IAAIC,IAAIJ;IAChB,EAAE,eAAM;QACN,OAAO;YAAEZ,MAAM;QAAY;IAC7B;IACA,MAAMiB,WAAWF,IAAIE,QAAQ,CAACzB,WAAW;IACzC,MAAM0B,WAAWhC;IACjB,IACE+B,aAAajC,yBACZkC,YAAYH,IAAII,IAAI,CAAC3B,WAAW,OAAO0B,UACxC;QACA,0EAA0E;QAC1E,yEAAyE;QACzE,sDAAsD;QACtD,MAAME,QAAQ,iCAAiCC,IAAI,CAACN,IAAIO,QAAQ;QAChE,MAAMC,SAASH,QAAQf,WAAW;YAACe,KAAK,CAAC,EAAE;SAAC,IAAI;QAChD,MAAMI,aAAaJ,QAAQf,WAAW;YAACe,KAAK,CAAC,EAAE;SAAC,IAAI;QACpD,OAAOG,UAAUC,aACb;YAAExB,MAAM;YAAkBuB;YAAQC;QAAW,IAC7C;YAAExB,MAAM;QAAY;IAC1B;IACA,IAAIiB,aAAahC,UAAU;QACzB,MAAM,GAAGwC,aAAa,GAAGC,aAAa,GAAGX,IAAIO,QAAQ,CAACxB,KAAK,CAAC;QAC5D,MAAMyB,SAASE,cAAcpB,WAAW;YAACoB;SAAY,IAAI;QACzD,MAAMD,aAAaE,aAAa7B,MAAM,GAAGQ,WAAWqB,gBAAgB;QACpE,OAAOH,UAAUC,aACb;YAAExB,MAAM;YAAkBuB;YAAQC;QAAW,IAC7C;YAAExB,MAAM;QAAY;IAC1B;IACA,IACEpB,iBAAiBqC,aACjBF,IAAIO,QAAQ,CAACT,UAAU,CAAC,GAAGhC,gBAAgB,CAAC,CAAC,GAC7C;QACA,OAAOY,iBAAiBsB,IAAIO,QAAQ;IACtC;IACA,OAAO;QAAEtB,MAAM;QAAYe,KAAKH;IAAM;AACxC;AAEA;;;;;;;;;;;CAWC,GACD,OAAO,SAASe,uBACdH,UAAkB;IAElB,MAAMzB,WAAWT,OAAOkC,qBAAAA,aAAc,IAAI1B,KAAK,CAAC;IAChD,IAAIC,SAASF,MAAM,GAAG,KAAKE,QAAQ,CAAC,EAAE,KAAK,SAAS,OAAO;IAC3D,IAAIA,SAAS6B,IAAI,CAAC,CAACC,UAAY,CAACA,WAAWA,YAAY,OAAO,OAAO;IACrE,MAAM,CAACC,MAAMC,QAAQ,GAAGhC;IACxB,MAAME,QACJ6B,SAAS,UAAUC,UAAUD,SAAS,SAAS,CAAC,IAAI,EAAEC,SAAS,GAAG;IACpE,IAAI,CAAC9B,OAAO,OAAO;IACnB,MAAME,MAAMpB,cACV,GAAGD,mBAAmBmB,MAAM,CAAC,EAAEF,QAAQ,CAACA,SAASF,MAAM,GAAG,EAAE,EAAE;IAEhE,OAAOM,MAAM;QAAEF,OAAOE,IAAIF,KAAK;QAAEG,SAASD,IAAIC,OAAO;IAAC,IAAI;AAC5D;AAEA;;;;;CAKC,GACD,OAAO,SAAS4B,iBACdrB,MAAe,EACfsB,OAA6B;IAE7B,MAAMC,SAASxB,qBAAqBC;IACpC,IAAIuB,OAAOlC,IAAI,KAAK,SAAS;QAC3B,OAAO;YAAEC,OAAOiC,OAAOjC,KAAK;YAAEG,SAAS8B,OAAO9B,OAAO;QAAC;IACxD;IACA,IAAI8B,OAAOlC,IAAI,KAAK,kBAAkB,OAAO;IAC7C,IAAIiC,CAAAA,2BAAAA,QAASV,MAAM,MAAKlC,aAAa6C,OAAOX,MAAM,KAAKU,QAAQV,MAAM,EAAE;QACrE,OAAO;IACT;IACA,OAAOI,uBAAuBO,OAAOV,UAAU;AACjD;AAEA;;;CAGC,GACD,OAAO,SAASW,qBAAqBC,CAAS,EAAEC,CAAS;IACvD,MAAMC,UAAU,CAACrC,QACfA,MAAMY,UAAU,CAAC,UAAU,CAAC,IAAI,EAAEZ,MAAML,KAAK,CAAC,GAAGE,KAAK,CAAC,IAAI,CAAC,EAAE,EAAE,GAAGG;IACrE,OAAOqC,QAAQF,OAAOE,QAAQD;AAChC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2026 Aglyn LLC
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
/**
|
|
18
|
+
* Substitutes palette `var()` references in one string. Returns the same
|
|
19
|
+
* string (identity) when there is nothing to substitute, so callers can
|
|
20
|
+
* cheaply tell an untouched value from a rewritten one. A reference whose
|
|
21
|
+
* token the palette does not define collapses to its literal fallback —
|
|
22
|
+
* never left as a `var()` that an ancestor provider could hijack.
|
|
23
|
+
*/
|
|
24
|
+
export declare function resolvePaletteVars(value: string, palette: Record<string, unknown> | undefined): string;
|
|
25
|
+
/**
|
|
26
|
+
* Walks an sx value substituting palette `var()` references against the
|
|
27
|
+
* active theme's palette. Arrays resolve per entry, theme callbacks are
|
|
28
|
+
* wrapped, nested objects (breakpoint slices, pseudo selectors, custom
|
|
29
|
+
* CSS) resolve recursively, and the input is never mutated. Values with no
|
|
30
|
+
* palette reference come back by identity, so an sx that uses none is not
|
|
31
|
+
* reallocated.
|
|
32
|
+
*/
|
|
33
|
+
export declare function resolvePaletteVarsSx<T>(sx: T, palette: Record<string, unknown> | undefined): T;
|
|
34
|
+
export default resolvePaletteVarsSx;
|
|
@@ -0,0 +1,150 @@
|
|
|
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
|
+
*/ // Subpath, NOT the `@aglyn/shared-data-enums` barrel — see the note on the
|
|
17
|
+
// same import in `merge-node-sx.ts` (AGL-2486). The barrel reaches
|
|
18
|
+
// `firebase/auth`; this file wants the palette-token readers, and takes them
|
|
19
|
+
// from the module that holds only those rather than from `lib/styles`, which
|
|
20
|
+
// re-exports them alongside the unit enum and the gradient model.
|
|
21
|
+
import { channelCssVarNameToPaletteToken, cssColorToChannel, cssVarNameToPaletteToken } from "@aglyn/shared-data-enums/palette-token-css-var";
|
|
22
|
+
/**
|
|
23
|
+
* Palette-token references inside sx STRING values (AGL-1331).
|
|
24
|
+
*
|
|
25
|
+
* MUI resolves palette token paths for the handful of sx properties it
|
|
26
|
+
* declares with `themeKey: 'palette'` — `color`, `bgcolor`,
|
|
27
|
+
* `backgroundColor`, `borderColor`. Everything else, `backgroundImage`
|
|
28
|
+
* included, reaches CSS verbatim. So a gradient stop bound to a theme
|
|
29
|
+
* token cannot be written as `primary.main`: it has to be a value CSS
|
|
30
|
+
* itself understands.
|
|
31
|
+
*
|
|
32
|
+
* The Background Fill field therefore persists token stops as
|
|
33
|
+
* `var(--mui-palette-primary-main, #00B0FF)`, and this pass substitutes
|
|
34
|
+
* the ACTIVE theme's palette value before the sx reaches emotion. Two
|
|
35
|
+
* reasons it resolves here rather than leaving the `var()` to the browser:
|
|
36
|
+
*
|
|
37
|
+
* 1. Sites build their theme with `createResponsiveTheme` (plain
|
|
38
|
+
* `createTheme`, no `cssVariables`), so `--mui-palette-*` is not defined
|
|
39
|
+
* on the tenant at all — the browser would fall back to the literal and
|
|
40
|
+
* a later palette change would never reach the gradient.
|
|
41
|
+
* 2. On the canvas the opposite hazard: the besigner runs INSIDE the
|
|
42
|
+
* console's `CssVarsProvider`, which DOES define `--mui-palette-*` — the
|
|
43
|
+
* console's own brand colours. An unresolved `var()` would paint the
|
|
44
|
+
* console's primary into the site's gradient.
|
|
45
|
+
*
|
|
46
|
+
* Substituting from the site theme's palette is correct in both places, and
|
|
47
|
+
* it makes scheme adaptation free: the leaf resolves against the theme that
|
|
48
|
+
* is already light or dark, so a token stop behaves exactly like
|
|
49
|
+
* `backgroundColor: 'primary.main'` does.
|
|
50
|
+
*
|
|
51
|
+
* The literal fallback is never wasted work — it is what renders if this
|
|
52
|
+
* pass is ever skipped, so the failure mode of the whole feature is a
|
|
53
|
+
* slightly stale colour rather than a dropped declaration.
|
|
54
|
+
*
|
|
55
|
+
* AGL-2486 extends the same mechanism to ALPHA. `rgba(…)` cannot take a
|
|
56
|
+
* colour, only channels, so "primary.main at 12%" persists as
|
|
57
|
+
* `rgba(var(--mui-palette-primary-mainChannel, 31 41 55) / 0.12)` and this
|
|
58
|
+
* pass derives the triplet from the palette colour — see
|
|
59
|
+
* {@link readPaletteVarValue}. Flattening to `rgba(31, 41, 55, 0.12)` at
|
|
60
|
+
* author time would have been simpler and wrong: the value stops being a
|
|
61
|
+
* token, so a white-label palette swap silently keeps the old brand colour.
|
|
62
|
+
*/ /**
|
|
63
|
+
* Matches one `var(--mui-palette-…[, fallback])` reference. The fallback
|
|
64
|
+
* group allows ONE level of nesting so an `rgb(…)`/`rgba(…)` fallback — what
|
|
65
|
+
* the colour picker emits for a token whose palette entry is not a hex —
|
|
66
|
+
* is captured whole rather than truncated at its first `)`.
|
|
67
|
+
*/ const PALETTE_VAR_PATTERN = /var\(\s*(--mui-palette-[a-z0-9-]+)\s*(?:,((?:[^()]|\([^()]*\))*))?\)/gi;
|
|
68
|
+
const isPlainObject = (value)=>typeof value === 'object' && value !== null && !Array.isArray(value);
|
|
69
|
+
/** Resolves a dot path into a palette object to its colour string. */ function readPaletteToken(palette, path) {
|
|
70
|
+
if (!palette) return undefined;
|
|
71
|
+
const resolved = path.split('.').reduce((node, key)=>node && typeof node === 'object' ? node[key] : undefined, palette);
|
|
72
|
+
return typeof resolved === 'string' ? resolved : undefined;
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* What one `--mui-palette-…` custom property stands for in this palette.
|
|
76
|
+
*
|
|
77
|
+
* Two shapes, because MUI publishes two (AGL-2486):
|
|
78
|
+
*
|
|
79
|
+
* - `--mui-palette-primary-main` — the colour itself.
|
|
80
|
+
* - `--mui-palette-primary-mainChannel` — its `31 41 55` RGB triplet, which
|
|
81
|
+
* is how alpha is applied to a TOKEN rather than to a flattened literal:
|
|
82
|
+
* `rgba(var(--mui-palette-primary-mainChannel) / 0.12)`. That is the whole
|
|
83
|
+
* point of the channel form, and it is what the styles panel's opacity
|
|
84
|
+
* control persists.
|
|
85
|
+
*
|
|
86
|
+
* The direct read comes first so a theme that really does define channel
|
|
87
|
+
* entries (anything built through `CssVarsProvider`) wins with its own
|
|
88
|
+
* values. `createResponsiveTheme` is plain `createTheme` and defines none, so
|
|
89
|
+
* for every Aglyn site the triplet is DERIVED here from the colour the token
|
|
90
|
+
* resolves to — which is exactly what keeps an alpha'd token following the
|
|
91
|
+
* palette instead of freezing the colour it had on the day it was authored.
|
|
92
|
+
*/ function readPaletteVarValue(name, palette) {
|
|
93
|
+
const path = cssVarNameToPaletteToken(name);
|
|
94
|
+
const direct = path ? readPaletteToken(palette, path) : undefined;
|
|
95
|
+
if (direct) return direct;
|
|
96
|
+
const channelPath = channelCssVarNameToPaletteToken(name);
|
|
97
|
+
if (!channelPath) return undefined;
|
|
98
|
+
const color = readPaletteToken(palette, channelPath);
|
|
99
|
+
return color ? cssColorToChannel(color) : undefined;
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Substitutes palette `var()` references in one string. Returns the same
|
|
103
|
+
* string (identity) when there is nothing to substitute, so callers can
|
|
104
|
+
* cheaply tell an untouched value from a rewritten one. A reference whose
|
|
105
|
+
* token the palette does not define collapses to its literal fallback —
|
|
106
|
+
* never left as a `var()` that an ancestor provider could hijack.
|
|
107
|
+
*/ export function resolvePaletteVars(value, palette) {
|
|
108
|
+
if (!value.includes('--mui-palette-')) return value;
|
|
109
|
+
return value.replace(PALETTE_VAR_PATTERN, (match, name, fallback)=>{
|
|
110
|
+
const resolved = readPaletteVarValue(name, palette);
|
|
111
|
+
if (resolved) return resolved;
|
|
112
|
+
const literal = (fallback != null ? fallback : '').trim();
|
|
113
|
+
return literal || match;
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Walks an sx value substituting palette `var()` references against the
|
|
118
|
+
* active theme's palette. Arrays resolve per entry, theme callbacks are
|
|
119
|
+
* wrapped, nested objects (breakpoint slices, pseudo selectors, custom
|
|
120
|
+
* CSS) resolve recursively, and the input is never mutated. Values with no
|
|
121
|
+
* palette reference come back by identity, so an sx that uses none is not
|
|
122
|
+
* reallocated.
|
|
123
|
+
*/ export function resolvePaletteVarsSx(sx, palette) {
|
|
124
|
+
if (typeof sx === 'string') return resolvePaletteVars(sx, palette);
|
|
125
|
+
if (Array.isArray(sx)) {
|
|
126
|
+
let changed = false;
|
|
127
|
+
const next = sx.map((entry)=>{
|
|
128
|
+
const resolved = resolvePaletteVarsSx(entry, palette);
|
|
129
|
+
if (resolved !== entry) changed = true;
|
|
130
|
+
return resolved;
|
|
131
|
+
});
|
|
132
|
+
return changed ? next : sx;
|
|
133
|
+
}
|
|
134
|
+
if (typeof sx === 'function') {
|
|
135
|
+
const callback = sx;
|
|
136
|
+
return (...args)=>resolvePaletteVarsSx(callback(...args), palette);
|
|
137
|
+
}
|
|
138
|
+
if (!isPlainObject(sx)) return sx;
|
|
139
|
+
let changed = false;
|
|
140
|
+
const out = {};
|
|
141
|
+
for (const [key, value] of Object.entries(sx)){
|
|
142
|
+
const resolved = resolvePaletteVarsSx(value, palette);
|
|
143
|
+
if (resolved !== value) changed = true;
|
|
144
|
+
out[key] = resolved;
|
|
145
|
+
}
|
|
146
|
+
return changed ? out : sx;
|
|
147
|
+
}
|
|
148
|
+
export default resolvePaletteVarsSx;
|
|
149
|
+
|
|
150
|
+
//# sourceMappingURL=palette-sx.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../libs/aglyn/src/lib/app-utils/palette-sx.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// Subpath, NOT the `@aglyn/shared-data-enums` barrel — see the note on the\n// same import in `merge-node-sx.ts` (AGL-2486). The barrel reaches\n// `firebase/auth`; this file wants the palette-token readers, and takes them\n// from the module that holds only those rather than from `lib/styles`, which\n// re-exports them alongside the unit enum and the gradient model.\nimport {\n channelCssVarNameToPaletteToken,\n cssColorToChannel,\n cssVarNameToPaletteToken,\n} from '@aglyn/shared-data-enums/palette-token-css-var'\n\n/**\n * Palette-token references inside sx STRING values (AGL-1331).\n *\n * MUI resolves palette token paths for the handful of sx properties it\n * declares with `themeKey: 'palette'` — `color`, `bgcolor`,\n * `backgroundColor`, `borderColor`. Everything else, `backgroundImage`\n * included, reaches CSS verbatim. So a gradient stop bound to a theme\n * token cannot be written as `primary.main`: it has to be a value CSS\n * itself understands.\n *\n * The Background Fill field therefore persists token stops as\n * `var(--mui-palette-primary-main, #00B0FF)`, and this pass substitutes\n * the ACTIVE theme's palette value before the sx reaches emotion. Two\n * reasons it resolves here rather than leaving the `var()` to the browser:\n *\n * 1. Sites build their theme with `createResponsiveTheme` (plain\n * `createTheme`, no `cssVariables`), so `--mui-palette-*` is not defined\n * on the tenant at all — the browser would fall back to the literal and\n * a later palette change would never reach the gradient.\n * 2. On the canvas the opposite hazard: the besigner runs INSIDE the\n * console's `CssVarsProvider`, which DOES define `--mui-palette-*` — the\n * console's own brand colours. An unresolved `var()` would paint the\n * console's primary into the site's gradient.\n *\n * Substituting from the site theme's palette is correct in both places, and\n * it makes scheme adaptation free: the leaf resolves against the theme that\n * is already light or dark, so a token stop behaves exactly like\n * `backgroundColor: 'primary.main'` does.\n *\n * The literal fallback is never wasted work — it is what renders if this\n * pass is ever skipped, so the failure mode of the whole feature is a\n * slightly stale colour rather than a dropped declaration.\n *\n * AGL-2486 extends the same mechanism to ALPHA. `rgba(…)` cannot take a\n * colour, only channels, so \"primary.main at 12%\" persists as\n * `rgba(var(--mui-palette-primary-mainChannel, 31 41 55) / 0.12)` and this\n * pass derives the triplet from the palette colour — see\n * {@link readPaletteVarValue}. Flattening to `rgba(31, 41, 55, 0.12)` at\n * author time would have been simpler and wrong: the value stops being a\n * token, so a white-label palette swap silently keeps the old brand colour.\n */\n\n/**\n * Matches one `var(--mui-palette-…[, fallback])` reference. The fallback\n * group allows ONE level of nesting so an `rgb(…)`/`rgba(…)` fallback — what\n * the colour picker emits for a token whose palette entry is not a hex —\n * is captured whole rather than truncated at its first `)`.\n */\nconst PALETTE_VAR_PATTERN =\n /var\\(\\s*(--mui-palette-[a-z0-9-]+)\\s*(?:,((?:[^()]|\\([^()]*\\))*))?\\)/gi\n\nconst isPlainObject = (value: unknown): value is Record<string, unknown> =>\n typeof value === 'object' && value !== null && !Array.isArray(value)\n\n/** Resolves a dot path into a palette object to its colour string. */\nfunction readPaletteToken(\n palette: Record<string, unknown> | undefined,\n path: string,\n): string | undefined {\n if (!palette) return undefined\n const resolved = path\n .split('.')\n .reduce<unknown>(\n (node, key) =>\n node && typeof node === 'object'\n ? (node as Record<string, unknown>)[key]\n : undefined,\n palette,\n )\n return typeof resolved === 'string' ? resolved : undefined\n}\n\n/**\n * What one `--mui-palette-…` custom property stands for in this palette.\n *\n * Two shapes, because MUI publishes two (AGL-2486):\n *\n * - `--mui-palette-primary-main` — the colour itself.\n * - `--mui-palette-primary-mainChannel` — its `31 41 55` RGB triplet, which\n * is how alpha is applied to a TOKEN rather than to a flattened literal:\n * `rgba(var(--mui-palette-primary-mainChannel) / 0.12)`. That is the whole\n * point of the channel form, and it is what the styles panel's opacity\n * control persists.\n *\n * The direct read comes first so a theme that really does define channel\n * entries (anything built through `CssVarsProvider`) wins with its own\n * values. `createResponsiveTheme` is plain `createTheme` and defines none, so\n * for every Aglyn site the triplet is DERIVED here from the colour the token\n * resolves to — which is exactly what keeps an alpha'd token following the\n * palette instead of freezing the colour it had on the day it was authored.\n */\nfunction readPaletteVarValue(\n name: string,\n palette: Record<string, unknown> | undefined,\n): string | undefined {\n const path = cssVarNameToPaletteToken(name)\n const direct = path ? readPaletteToken(palette, path) : undefined\n if (direct) return direct\n const channelPath = channelCssVarNameToPaletteToken(name)\n if (!channelPath) return undefined\n const color = readPaletteToken(palette, channelPath)\n return color ? cssColorToChannel(color) : undefined\n}\n\n/**\n * Substitutes palette `var()` references in one string. Returns the same\n * string (identity) when there is nothing to substitute, so callers can\n * cheaply tell an untouched value from a rewritten one. A reference whose\n * token the palette does not define collapses to its literal fallback —\n * never left as a `var()` that an ancestor provider could hijack.\n */\nexport function resolvePaletteVars(\n value: string,\n palette: Record<string, unknown> | undefined,\n): string {\n if (!value.includes('--mui-palette-')) return value\n return value.replace(\n PALETTE_VAR_PATTERN,\n (match, name: string, fallback?: string) => {\n const resolved = readPaletteVarValue(name, palette)\n if (resolved) return resolved\n const literal = (fallback ?? '').trim()\n return literal || match\n },\n )\n}\n\n/**\n * Walks an sx value substituting palette `var()` references against the\n * active theme's palette. Arrays resolve per entry, theme callbacks are\n * wrapped, nested objects (breakpoint slices, pseudo selectors, custom\n * CSS) resolve recursively, and the input is never mutated. Values with no\n * palette reference come back by identity, so an sx that uses none is not\n * reallocated.\n */\nexport function resolvePaletteVarsSx<T>(\n sx: T,\n palette: Record<string, unknown> | undefined,\n): T {\n if (typeof sx === 'string') return resolvePaletteVars(sx, palette) as T\n if (Array.isArray(sx)) {\n let changed = false\n const next = sx.map((entry) => {\n const resolved = resolvePaletteVarsSx(entry, palette)\n if (resolved !== entry) changed = true\n return resolved\n })\n return (changed ? next : sx) as T\n }\n if (typeof sx === 'function') {\n const callback = sx as (...args: unknown[]) => unknown\n return ((...args: unknown[]) =>\n resolvePaletteVarsSx(callback(...args), palette)) as T\n }\n if (!isPlainObject(sx)) return sx\n\n let changed = false\n const out: Record<string, unknown> = {}\n for (const [key, value] of Object.entries(sx)) {\n const resolved = resolvePaletteVarsSx(value, palette)\n if (resolved !== value) changed = true\n out[key] = resolved\n }\n return (changed ? out : sx) as T\n}\n\nexport default resolvePaletteVarsSx\n"],"names":["channelCssVarNameToPaletteToken","cssColorToChannel","cssVarNameToPaletteToken","PALETTE_VAR_PATTERN","isPlainObject","value","Array","isArray","readPaletteToken","palette","path","undefined","resolved","split","reduce","node","key","readPaletteVarValue","name","direct","channelPath","color","resolvePaletteVars","includes","replace","match","fallback","literal","trim","resolvePaletteVarsSx","sx","changed","next","map","entry","callback","args","out","Object","entries"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GAED,2EAA2E;AAC3E,mEAAmE;AACnE,6EAA6E;AAC7E,6EAA6E;AAC7E,kEAAkE;AAClE,SACEA,+BAA+B,EAC/BC,iBAAiB,EACjBC,wBAAwB,QACnB,iDAAgD;AAEvD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwCC,GAED;;;;;CAKC,GACD,MAAMC,sBACJ;AAEF,MAAMC,gBAAgB,CAACC,QACrB,OAAOA,UAAU,YAAYA,UAAU,QAAQ,CAACC,MAAMC,OAAO,CAACF;AAEhE,oEAAoE,GACpE,SAASG,iBACPC,OAA4C,EAC5CC,IAAY;IAEZ,IAAI,CAACD,SAAS,OAAOE;IACrB,MAAMC,WAAWF,KACdG,KAAK,CAAC,KACNC,MAAM,CACL,CAACC,MAAMC,MACLD,QAAQ,OAAOA,SAAS,WACpB,AAACA,IAAgC,CAACC,IAAI,GACtCL,WACNF;IAEJ,OAAO,OAAOG,aAAa,WAAWA,WAAWD;AACnD;AAEA;;;;;;;;;;;;;;;;;;CAkBC,GACD,SAASM,oBACPC,IAAY,EACZT,OAA4C;IAE5C,MAAMC,OAAOR,yBAAyBgB;IACtC,MAAMC,SAAST,OAAOF,iBAAiBC,SAASC,QAAQC;IACxD,IAAIQ,QAAQ,OAAOA;IACnB,MAAMC,cAAcpB,gCAAgCkB;IACpD,IAAI,CAACE,aAAa,OAAOT;IACzB,MAAMU,QAAQb,iBAAiBC,SAASW;IACxC,OAAOC,QAAQpB,kBAAkBoB,SAASV;AAC5C;AAEA;;;;;;CAMC,GACD,OAAO,SAASW,mBACdjB,KAAa,EACbI,OAA4C;IAE5C,IAAI,CAACJ,MAAMkB,QAAQ,CAAC,mBAAmB,OAAOlB;IAC9C,OAAOA,MAAMmB,OAAO,CAClBrB,qBACA,CAACsB,OAAOP,MAAcQ;QACpB,MAAMd,WAAWK,oBAAoBC,MAAMT;QAC3C,IAAIG,UAAU,OAAOA;QACrB,MAAMe,UAAU,CAACD,mBAAAA,WAAY,IAAIE,IAAI;QACrC,OAAOD,WAAWF;IACpB;AAEJ;AAEA;;;;;;;CAOC,GACD,OAAO,SAASI,qBACdC,EAAK,EACLrB,OAA4C;IAE5C,IAAI,OAAOqB,OAAO,UAAU,OAAOR,mBAAmBQ,IAAIrB;IAC1D,IAAIH,MAAMC,OAAO,CAACuB,KAAK;QACrB,IAAIC,UAAU;QACd,MAAMC,OAAOF,GAAGG,GAAG,CAAC,CAACC;YACnB,MAAMtB,WAAWiB,qBAAqBK,OAAOzB;YAC7C,IAAIG,aAAasB,OAAOH,UAAU;YAClC,OAAOnB;QACT;QACA,OAAQmB,UAAUC,OAAOF;IAC3B;IACA,IAAI,OAAOA,OAAO,YAAY;QAC5B,MAAMK,WAAWL;QACjB,OAAQ,CAAC,GAAGM,OACVP,qBAAqBM,YAAYC,OAAO3B;IAC5C;IACA,IAAI,CAACL,cAAc0B,KAAK,OAAOA;IAE/B,IAAIC,UAAU;IACd,MAAMM,MAA+B,CAAC;IACtC,KAAK,MAAM,CAACrB,KAAKX,MAAM,IAAIiC,OAAOC,OAAO,CAACT,IAAK;QAC7C,MAAMlB,WAAWiB,qBAAqBxB,OAAOI;QAC7C,IAAIG,aAAaP,OAAO0B,UAAU;QAClCM,GAAG,CAACrB,IAAI,GAAGJ;IACb;IACA,OAAQmB,UAAUM,MAAMP;AAC1B;AAEA,eAAeD,qBAAoB"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2026 Aglyn LLC
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
/**
|
|
18
|
+
* Rules for a password an ADMIN chooses on somebody else's behalf
|
|
19
|
+
* (AGL-910). Pure and dependency-free so all three surfaces agree: the
|
|
20
|
+
* console form checks it before a round trip, the Firebase Auth endpoints
|
|
21
|
+
* check it again, and the site-member handler — which lives in the commerce
|
|
22
|
+
* plugin and shares nothing else with them — checks the same thing.
|
|
23
|
+
*
|
|
24
|
+
* Not the policy for passwords people choose for THEMSELVES. This one is
|
|
25
|
+
* stricter on length because the credential is handed over out of band
|
|
26
|
+
* (read aloud, pasted into a ticket) and is meant to be replaced.
|
|
27
|
+
*/
|
|
28
|
+
/** Firebase Auth's own floor is 6; a third party has seen this one. */
|
|
29
|
+
export declare const PASSWORD_MIN_LENGTH = 12;
|
|
30
|
+
export declare const PASSWORD_MAX_LENGTH = 128;
|
|
31
|
+
export interface PasswordValidation {
|
|
32
|
+
/** Message to show the admin, or null when the password is acceptable. */
|
|
33
|
+
error: string | null;
|
|
34
|
+
/** The coerced password. Only meaningful when `error` is null. */
|
|
35
|
+
password: string;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Deliberately shallow — length plus a couple of triviality traps. A
|
|
39
|
+
* composition rulebook (one upper, one digit, one symbol) pushes admins
|
|
40
|
+
* toward `Password1!` shapes without adding real strength; length is what
|
|
41
|
+
* carries here, and the credential is short-lived by design.
|
|
42
|
+
*
|
|
43
|
+
* A nullable `error` rather than an ok/error union: this crosses three
|
|
44
|
+
* project boundaries (console app, commerce plugin, tenant app) and
|
|
45
|
+
* discriminated-union narrowing did not survive the trip.
|
|
46
|
+
*/
|
|
47
|
+
export declare function validateNewPassword(raw: unknown): PasswordValidation;
|
|
@@ -0,0 +1,46 @@
|
|
|
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
|
+
* Rules for a password an ADMIN chooses on somebody else's behalf
|
|
18
|
+
* (AGL-910). Pure and dependency-free so all three surfaces agree: the
|
|
19
|
+
* console form checks it before a round trip, the Firebase Auth endpoints
|
|
20
|
+
* check it again, and the site-member handler — which lives in the commerce
|
|
21
|
+
* plugin and shares nothing else with them — checks the same thing.
|
|
22
|
+
*
|
|
23
|
+
* Not the policy for passwords people choose for THEMSELVES. This one is
|
|
24
|
+
* stricter on length because the credential is handed over out of band
|
|
25
|
+
* (read aloud, pasted into a ticket) and is meant to be replaced.
|
|
26
|
+
*/ /** Firebase Auth's own floor is 6; a third party has seen this one. */ export const PASSWORD_MIN_LENGTH = 12;
|
|
27
|
+
export const PASSWORD_MAX_LENGTH = 128;
|
|
28
|
+
/**
|
|
29
|
+
* Deliberately shallow — length plus a couple of triviality traps. A
|
|
30
|
+
* composition rulebook (one upper, one digit, one symbol) pushes admins
|
|
31
|
+
* toward `Password1!` shapes without adding real strength; length is what
|
|
32
|
+
* carries here, and the credential is short-lived by design.
|
|
33
|
+
*
|
|
34
|
+
* A nullable `error` rather than an ok/error union: this crosses three
|
|
35
|
+
* project boundaries (console app, commerce plugin, tenant app) and
|
|
36
|
+
* discriminated-union narrowing did not survive the trip.
|
|
37
|
+
*/ export function validateNewPassword(raw) {
|
|
38
|
+
const password = String(raw != null ? raw : '');
|
|
39
|
+
const error = password.length < PASSWORD_MIN_LENGTH ? `Passwords must be at least ${PASSWORD_MIN_LENGTH} characters` : password.length > PASSWORD_MAX_LENGTH ? `Passwords can be at most ${PASSWORD_MAX_LENGTH} characters` : password.trim() !== password ? 'Passwords cannot start or end with a space' : new Set(password).size < 5 ? 'That password is too repetitive' : null;
|
|
40
|
+
return {
|
|
41
|
+
error,
|
|
42
|
+
password
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
//# sourceMappingURL=password-policy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../libs/aglyn/src/lib/app-utils/password-policy.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 * Rules for a password an ADMIN chooses on somebody else's behalf\n * (AGL-910). Pure and dependency-free so all three surfaces agree: the\n * console form checks it before a round trip, the Firebase Auth endpoints\n * check it again, and the site-member handler — which lives in the commerce\n * plugin and shares nothing else with them — checks the same thing.\n *\n * Not the policy for passwords people choose for THEMSELVES. This one is\n * stricter on length because the credential is handed over out of band\n * (read aloud, pasted into a ticket) and is meant to be replaced.\n */\n\n/** Firebase Auth's own floor is 6; a third party has seen this one. */\nexport const PASSWORD_MIN_LENGTH = 12\nexport const PASSWORD_MAX_LENGTH = 128\n\nexport interface PasswordValidation {\n /** Message to show the admin, or null when the password is acceptable. */\n error: string | null\n /** The coerced password. Only meaningful when `error` is null. */\n password: string\n}\n\n/**\n * Deliberately shallow — length plus a couple of triviality traps. A\n * composition rulebook (one upper, one digit, one symbol) pushes admins\n * toward `Password1!` shapes without adding real strength; length is what\n * carries here, and the credential is short-lived by design.\n *\n * A nullable `error` rather than an ok/error union: this crosses three\n * project boundaries (console app, commerce plugin, tenant app) and\n * discriminated-union narrowing did not survive the trip.\n */\nexport function validateNewPassword(raw: unknown): PasswordValidation {\n const password = String(raw ?? '')\n const error =\n password.length < PASSWORD_MIN_LENGTH\n ? `Passwords must be at least ${PASSWORD_MIN_LENGTH} characters`\n : password.length > PASSWORD_MAX_LENGTH\n ? `Passwords can be at most ${PASSWORD_MAX_LENGTH} characters`\n : password.trim() !== password\n ? 'Passwords cannot start or end with a space'\n : new Set(password).size < 5\n ? 'That password is too repetitive'\n : null\n return { error, password }\n}\n"],"names":["PASSWORD_MIN_LENGTH","PASSWORD_MAX_LENGTH","validateNewPassword","raw","password","String","error","length","trim","Set","size"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GAED;;;;;;;;;;CAUC,GAED,qEAAqE,GACrE,OAAO,MAAMA,sBAAsB,GAAE;AACrC,OAAO,MAAMC,sBAAsB,IAAG;AAStC;;;;;;;;;CASC,GACD,OAAO,SAASC,oBAAoBC,GAAY;IAC9C,MAAMC,WAAWC,OAAOF,cAAAA,MAAO;IAC/B,MAAMG,QACJF,SAASG,MAAM,GAAGP,sBACd,CAAC,2BAA2B,EAAEA,oBAAoB,WAAW,CAAC,GAC9DI,SAASG,MAAM,GAAGN,sBAChB,CAAC,yBAAyB,EAAEA,oBAAoB,WAAW,CAAC,GAC5DG,SAASI,IAAI,OAAOJ,WAClB,+CACA,IAAIK,IAAIL,UAAUM,IAAI,GAAG,IACvB,oCACA;IACZ,OAAO;QAAEJ;QAAOF;IAAS;AAC3B"}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2026 Aglyn LLC
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
/**
|
|
18
|
+
* "Not configured" is not "failed" (AGL-2019).
|
|
19
|
+
*
|
|
20
|
+
* Every money door in this codebase answers `501` when the deployment has no
|
|
21
|
+
* Stripe key — server-side that is already correct and uniform. The defect was
|
|
22
|
+
* entirely on the client: the storefront cart had a `423` lockdown branch and
|
|
23
|
+
* no `501` branch, so an unconfigured-payments refusal fell through to the
|
|
24
|
+
* generic error tail and rendered as `<Alert severity="error">`. A shopper on a
|
|
25
|
+
* self-hosted store clicked **Checkout** and was shown a RED alert — which says
|
|
26
|
+
* *your payment failed* — for a store that had simply never been set up to take
|
|
27
|
+
* payments. Nothing failed. Nothing was even attempted.
|
|
28
|
+
*
|
|
29
|
+
* This is the same argument `lockdown.ts` makes for its `423`: a refusal that is
|
|
30
|
+
* not a failure needs its own state, not an error with gentler words, because
|
|
31
|
+
* the severity is read before the sentence is. The three states are distinct and
|
|
32
|
+
* must stay distinct:
|
|
33
|
+
*
|
|
34
|
+
* 423 paused the operator switched writes off — info
|
|
35
|
+
* 501 unconfigured this deployment never had payments — info
|
|
36
|
+
* 4xx/5xx error something was tried and went wrong — error
|
|
37
|
+
*
|
|
38
|
+
* The copy is deliberately split by AUDIENCE, and that split is the reason this
|
|
39
|
+
* module exists rather than a bare status check at each call site:
|
|
40
|
+
*
|
|
41
|
+
* - A STOREFRONT VISITOR is a stranger on someone else's site. They get a
|
|
42
|
+
* neutral sentence about the store and NOTHING about the cause. Naming an
|
|
43
|
+
* environment variable to a shopper leaks the operator's deployment shape to
|
|
44
|
+
* the public internet, and there is nothing they could do with it anyway.
|
|
45
|
+
* - A CONSOLE OPERATOR is the person who can fix it, so they are told what to
|
|
46
|
+
* set. They also get `PLATFORM_BRAND_NAME`, because on a self-host install
|
|
47
|
+
* the product is not called Aglyn.
|
|
48
|
+
*/
|
|
49
|
+
/**
|
|
50
|
+
* The status a server uses to say "this deployment has no payments configured".
|
|
51
|
+
* Named so a call site reads as a concept rather than as a magic number.
|
|
52
|
+
*/
|
|
53
|
+
export declare const PAYMENTS_NOT_CONFIGURED_STATUS = 501;
|
|
54
|
+
/**
|
|
55
|
+
* Is this response the not-configured refusal rather than a failure?
|
|
56
|
+
*
|
|
57
|
+
* Deliberately a status-only test. The 501 bodies across commerce and
|
|
58
|
+
* marketplace do not share a machine-readable discriminator — some say
|
|
59
|
+
* "Purchases are not configured on this site.", others "Payments are not
|
|
60
|
+
* configured." — and matching on prose would break the moment one is reworded.
|
|
61
|
+
* The status is the contract.
|
|
62
|
+
*/
|
|
63
|
+
export declare function isPaymentsNotConfigured(status: number | null | undefined): status is 501;
|
|
64
|
+
/**
|
|
65
|
+
* What a STOREFRONT VISITOR is shown. No cause, no variable names, no mention
|
|
66
|
+
* of the platform — from the shopper's side this is a fact about the store.
|
|
67
|
+
*
|
|
68
|
+
* Present tense and permanent-sounding on purpose: "right now" or "temporarily"
|
|
69
|
+
* would imply a transient outage and invite a retry that cannot succeed.
|
|
70
|
+
*/
|
|
71
|
+
export declare function storefrontPaymentsNotConfiguredText(): string;
|
|
72
|
+
/**
|
|
73
|
+
* What a CONSOLE OPERATOR is shown. They can act, so they are told how.
|
|
74
|
+
*
|
|
75
|
+
* `PLATFORM_BRAND_NAME` rather than a literal: a self-hoster who renamed the
|
|
76
|
+
* product should not read our name in an explanation of their own deployment.
|
|
77
|
+
*/
|
|
78
|
+
export declare function operatorPaymentsNotConfiguredText(): string;
|
|
79
|
+
/**
|
|
80
|
+
* The marketplace's own sentence. Browsing works without Stripe; only the
|
|
81
|
+
* money doors do not — so this says what still works, rather than presenting a
|
|
82
|
+
* whole feature as broken.
|
|
83
|
+
*/
|
|
84
|
+
export declare function operatorMarketplaceNotConfiguredText(): string;
|