@aglyn/aglyn 1.24.0 → 1.26.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. package/package.json +11 -11
  2. package/src/lib/app-utils/activity-labels.js +4 -1
  3. package/src/lib/app-utils/activity-labels.js.map +1 -1
  4. package/src/lib/app-utils/bandwidth-cap.d.ts +99 -1
  5. package/src/lib/app-utils/bandwidth-cap.js +148 -4
  6. package/src/lib/app-utils/bandwidth-cap.js.map +1 -1
  7. package/src/lib/app-utils/business-details.d.ts +5 -0
  8. package/src/lib/app-utils/business-details.js +4 -0
  9. package/src/lib/app-utils/business-details.js.map +1 -1
  10. package/src/lib/app-utils/crm.d.ts +17 -30
  11. package/src/lib/app-utils/crm.js +139 -3
  12. package/src/lib/app-utils/crm.js.map +1 -1
  13. package/src/lib/app-utils/docs-help-sections.generated.js +4 -1
  14. package/src/lib/app-utils/docs-help-sections.generated.js.map +1 -1
  15. package/src/lib/app-utils/docs-help.generated.d.ts +1 -1
  16. package/src/lib/app-utils/docs-help.generated.js +7 -0
  17. package/src/lib/app-utils/docs-help.generated.js.map +1 -1
  18. package/src/lib/app-utils/docs-index.generated.js +95 -11
  19. package/src/lib/app-utils/docs-index.generated.js.map +1 -1
  20. package/src/lib/app-utils/host-tokens.d.ts +17 -0
  21. package/src/lib/app-utils/host-tokens.js +18 -0
  22. package/src/lib/app-utils/host-tokens.js.map +1 -1
  23. package/src/lib/app-utils/native-app-association.d.ts +5 -3
  24. package/src/lib/app-utils/native-app-association.js +5 -3
  25. package/src/lib/app-utils/native-app-association.js.map +1 -1
  26. package/src/lib/app-utils/native-nav.js +1 -1
  27. package/src/lib/app-utils/native-nav.js.map +1 -1
  28. package/src/lib/app-utils/notifications.js +5 -0
  29. package/src/lib/app-utils/notifications.js.map +1 -1
  30. package/src/lib/app-utils/plan-entitlements.d.ts +227 -36
  31. package/src/lib/app-utils/plan-entitlements.js +339 -45
  32. package/src/lib/app-utils/plan-entitlements.js.map +1 -1
  33. package/src/lib/app-utils/reusable-component-keys.d.ts +9 -0
  34. package/src/lib/app-utils/reusable-component-keys.js +9 -0
  35. package/src/lib/app-utils/reusable-component-keys.js.map +1 -1
  36. package/src/lib/app-utils/server.d.ts +1 -0
  37. package/src/lib/app-utils/server.js +1 -0
  38. package/src/lib/app-utils/server.js.map +1 -1
  39. package/src/lib/app-utils/sign-in-hint-cookie.d.ts +58 -0
  40. package/src/lib/app-utils/sign-in-hint-cookie.js +71 -0
  41. package/src/lib/app-utils/sign-in-hint-cookie.js.map +1 -0
  42. package/src/lib/app-utils/sign-in-visibility.d.ts +75 -0
  43. package/src/lib/app-utils/sign-in-visibility.js +79 -0
  44. package/src/lib/app-utils/sign-in-visibility.js.map +1 -0
  45. package/src/lib/app-utils/site-live-url.d.ts +4 -1
  46. package/src/lib/app-utils/site-live-url.js +17 -3
  47. package/src/lib/app-utils/site-live-url.js.map +1 -1
  48. package/src/lib/app-utils/usage-level.d.ts +50 -0
  49. package/src/lib/app-utils/usage-level.js +94 -0
  50. package/src/lib/app-utils/usage-level.js.map +1 -0
  51. package/src/lib/foundation/definitions/org-billing.types.d.ts +45 -2
  52. package/src/lib/foundation/definitions/org-billing.types.js.map +1 -1
  53. package/src/lib/foundation/definitions/platform.types.d.ts +9 -0
  54. package/src/lib/foundation/definitions/platform.types.js.map +1 -1
@@ -130,6 +130,15 @@ export declare const NODE_HIDE_IF_PROP = "hideIf";
130
130
  * Persisted in component documents — never rename.
131
131
  */
132
132
  export declare const NODE_HIDE_UNLESS_PROP = "hideUnless";
133
+ /**
134
+ * Node prop: which visitors see the element (`signedIn`, `signedOut`; unset or
135
+ * `everyone` is all of them) — "Sign in" in a header for visitors, "Account"
136
+ * for the site's signed-in members. Read in the visitor's browser, because a
137
+ * published page is one cached page for everybody; see `sign-in-visibility`.
138
+ *
139
+ * Persisted in screen and component documents — never rename.
140
+ */
141
+ export declare const NODE_SHOW_TO_PROP = "showTo";
133
142
  /**
134
143
  * Instance props that move onto the definition's root when the two collapse
135
144
  * into one element (AGL-2521).
@@ -122,6 +122,14 @@
122
122
  *
123
123
  * Persisted in component documents — never rename.
124
124
  */ export const NODE_HIDE_UNLESS_PROP = 'hideUnless';
125
+ /**
126
+ * Node prop: which visitors see the element (`signedIn`, `signedOut`; unset or
127
+ * `everyone` is all of them) — "Sign in" in a header for visitors, "Account"
128
+ * for the site's signed-in members. Read in the visitor's browser, because a
129
+ * published page is one cached page for everybody; see `sign-in-visibility`.
130
+ *
131
+ * Persisted in screen and component documents — never rename.
132
+ */ export const NODE_SHOW_TO_PROP = 'showTo';
125
133
  /**
126
134
  * Instance props that move onto the definition's root when the two collapse
127
135
  * into one element (AGL-2521).
@@ -139,6 +147,7 @@
139
147
  */ export const INSTANCE_CARRIED_PROPS = [
140
148
  NODE_HIDE_IF_PROP,
141
149
  NODE_HIDE_UNLESS_PROP,
150
+ NODE_SHOW_TO_PROP,
142
151
  NODE_ANIMATION_PROP,
143
152
  NODE_ANIMATION_TRIGGER_PROP,
144
153
  NODE_ANIMATION_DURATION_PROP,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../../libs/aglyn/src/lib/app-utils/reusable-component-keys.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 NODE_ANIMATION_DELAY_PROP,\n NODE_ANIMATION_DURATION_PROP,\n NODE_ANIMATION_EASE_PROP,\n NODE_ANIMATION_PROP,\n NODE_ANIMATION_REPEAT_PROP,\n NODE_ANIMATION_STAGGER_PROP,\n NODE_ANIMATION_STAGGER_STEP_PROP,\n NODE_ANIMATION_TRIGGER_PROP,\n} from './element-animation'\n\n/**\n * The persisted keys, id prefixes and prop names of a reusable-component\n * instance.\n *\n * A separate module from the graft that reads them because these are the part\n * every OTHER surface needs: the renderer reads the two visibility directives,\n * the element-id helpers read the graft prefix, and the canvas reads the\n * instance component id. `compose-reusable-components.ts` beside it is the\n * composition itself — the graft, the prune, detach, and the reference walk —\n * which only an authoring surface and the server-side compose ever run, and\n * which a bundler cannot drop around a named import of one constant.\n *\n * Every value here is persisted in screen or component documents. Never\n * rename one.\n */\n\n/**\n * Persisted component id of a reusable-component instance node. Persisted in\n * screen documents — never rename (cf. `layoutSlot`, legacy `muiXxx` ids).\n */\nexport const REUSABLE_INSTANCE_COMPONENT_ID = 'reusableInstance'\n\n/**\n * Prop key on an instance node holding its per-instance prop values, keyed\n * by declared prop name (AGL-1247).\n *\n * Nested under one key rather than spread across the instance's own props\n * so a prop named `refId` or `name` cannot shadow the reference itself, and\n * so the string-prop walkers (`resolveNodesBindings`, the sanitizers) skip\n * the whole object — values reach a page only through the graft below.\n */\nexport const REUSABLE_INSTANCE_PROP_VALUES_KEY = 'propValues'\n\n/**\n * Prop key on an instance node holding the FORMATTED text of its text props,\n * keyed by declared prop name: the sanitized markup bold, italic, links and\n * lists were typed into on the canvas.\n *\n * The same split a text node makes between `children` and `html`: the plain\n * reading stays in {@link REUSABLE_INSTANCE_PROP_VALUES_KEY}, where the\n * Attributes field, the AI checks and every text walker read it, and the\n * markup rides beside it for the renderer alone. The graft hands it to each\n * element the prop fills as that element's own `html` — see\n * `applyDeclaredProps`. Nested under one key for the reasons the values are.\n */\nexport const REUSABLE_INSTANCE_PROP_HTML_KEY = 'propHtml'\n\n/**\n * `styleOverrides` key addressing the component ROOT (AGL-1306). Persisted\n * in screen documents — never rename. Component-internal node ids key the\n * per-leaf overrides beside it (AGL-1332); the definition root is addressed\n * by this constant rather than its id so the same override survives a\n * republish that reroots the definition.\n */\nexport const STYLE_OVERRIDES_ROOT_KEY = 'root'\n\n/**\n * Node-level fields that ride from the instance onto the definition's root\n * when the two collapse into one element (AGL-2521).\n *\n * These sit beside `sx` on the node, not in `props`, so no renderer spreads\n * them at an element and carrying them costs nothing in the DOM. They are\n * document state the author set on THIS placement: dropping them would make a\n * composed map that is saved back lose every per-instance override.\n */\nexport const INSTANCE_CARRIED_NODE_FIELDS: readonly string[] = [\n 'styleOverrides',\n 'attrOverrides',\n]\n\n/**\n * Token namespace a definition uses to reference its own declared props:\n * `{{prop.headline}}`. Mirrors `{{entry.*}}` and `{{host.*}}` so authors\n * meet one token syntax, not a second one invented for components.\n */\nexport const COMPONENT_PROP_TOKEN_PREFIX = 'prop.'\n\n/**\n * Declared prop names must be plain identifiers (AGL-1247).\n *\n * Load-bearing rather than cosmetic, which is why it lives beside the\n * storage contract instead of in whichever form happens to edit it: the\n * Attributes panel names its field for the nested path\n * `propValues.<name>`, and final-form splits that on dots — so a prop\n * called `hero.title` would address a level that does not exist and its\n * value would silently never reach the node. The editor that declares\n * props and the panel that fills them in must agree on this, so they read\n * the same constant.\n */\nexport const COMPONENT_PROP_NAME_PATTERN = /^[A-Za-z_][A-Za-z0-9_]*$/\n\n/**\n * Prefix namespacing a grafted definition's node ids per instance, so the\n * same definition can appear many times in one tree without id collisions.\n */\nexport const COMPONENT_NODE_ID_PREFIX = 'cmp__'\n\n/**\n * Node prop a definition sets to drop part of itself when a value is\n * TRUTHY (AGL-1314) — the \"hide the mockup\" toggle: the hero's media\n * column carries `hideIf: '{{prop.hideMedia}}'`, and a page that wants no\n * illustration ticks one checkbox.\n *\n * Persisted in component documents — never rename.\n */\nexport const NODE_HIDE_IF_PROP = 'hideIf'\n\n/**\n * The other polarity (AGL-1314): drop the node when the value is FALSY.\n *\n * This is what keeps an unfinished CTA from shipping as a dead control. A\n * button whose link is unset renders as a labelled thing you can tab to\n * that goes nowhere — seven of them nearly shipped in the footer\n * (AGL-1348). Binding `hideUnless: '{{prop.secondaryCtaLink}}'` on the\n * button means \"no destination, no button\": the node is gone before any\n * renderer sees it, so there is no anchor, no `<button>`, and no keyboard\n * stop.\n *\n * Note what it is bound to: the AUTHORED prop value, never whether a\n * screen id RESOLVES. Resolution happens later (`useLinkTarget`) against\n * the screens map, and the map behind an ISR render is not the map behind\n * the hydration that follows it — pruning on resolution would be the\n * element-switch hazard AGL-1357 lints for, one level up the pipeline.\n * Prop values ride in the page document, so server and client prune\n * identically.\n *\n * Persisted in component documents — never rename.\n */\nexport const NODE_HIDE_UNLESS_PROP = 'hideUnless'\n\n/**\n * Instance props that move onto the definition's root when the two collapse\n * into one element (AGL-2521).\n *\n * The universal directives, and only those: they are authored against \"this\n * placement\", which after the collapse IS the root. Everything else an\n * instance carries — `refId`, `name`, {@link REUSABLE_INSTANCE_PROP_VALUES_KEY},\n * the override slices — is bookkeeping the graft has already consumed, and\n * spreading it onto a real element is how `propvalues=\"[object Object]\"`\n * reached a published page once before (AGL-2486).\n *\n * Listed rather than derived by exclusion: a new instance-only prop must not\n * start leaking onto every component's root because nobody remembered to add\n * it to a deny-list.\n */\nexport const INSTANCE_CARRIED_PROPS: readonly string[] = [\n NODE_HIDE_IF_PROP,\n NODE_HIDE_UNLESS_PROP,\n NODE_ANIMATION_PROP,\n NODE_ANIMATION_TRIGGER_PROP,\n NODE_ANIMATION_DURATION_PROP,\n NODE_ANIMATION_DELAY_PROP,\n NODE_ANIMATION_REPEAT_PROP,\n NODE_ANIMATION_EASE_PROP,\n NODE_ANIMATION_STAGGER_PROP,\n NODE_ANIMATION_STAGGER_STEP_PROP,\n]\n"],"names":["NODE_ANIMATION_DELAY_PROP","NODE_ANIMATION_DURATION_PROP","NODE_ANIMATION_EASE_PROP","NODE_ANIMATION_PROP","NODE_ANIMATION_REPEAT_PROP","NODE_ANIMATION_STAGGER_PROP","NODE_ANIMATION_STAGGER_STEP_PROP","NODE_ANIMATION_TRIGGER_PROP","REUSABLE_INSTANCE_COMPONENT_ID","REUSABLE_INSTANCE_PROP_VALUES_KEY","REUSABLE_INSTANCE_PROP_HTML_KEY","STYLE_OVERRIDES_ROOT_KEY","INSTANCE_CARRIED_NODE_FIELDS","COMPONENT_PROP_TOKEN_PREFIX","COMPONENT_PROP_NAME_PATTERN","COMPONENT_NODE_ID_PREFIX","NODE_HIDE_IF_PROP","NODE_HIDE_UNLESS_PROP","INSTANCE_CARRIED_PROPS"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GAED,SACEA,yBAAyB,EACzBC,4BAA4B,EAC5BC,wBAAwB,EACxBC,mBAAmB,EACnBC,0BAA0B,EAC1BC,2BAA2B,EAC3BC,gCAAgC,EAChCC,2BAA2B,QACtB,yBAAqB;AAE5B;;;;;;;;;;;;;;CAcC,GAED;;;CAGC,GACD,OAAO,MAAMC,iCAAiC,mBAAkB;AAEhE;;;;;;;;CAQC,GACD,OAAO,MAAMC,oCAAoC,aAAY;AAE7D;;;;;;;;;;;CAWC,GACD,OAAO,MAAMC,kCAAkC,WAAU;AAEzD;;;;;;CAMC,GACD,OAAO,MAAMC,2BAA2B,OAAM;AAE9C;;;;;;;;CAQC,GACD,OAAO,MAAMC,+BAAkD;IAC7D;IACA;CACD,CAAA;AAED;;;;CAIC,GACD,OAAO,MAAMC,8BAA8B,QAAO;AAElD;;;;;;;;;;;CAWC,GACD,OAAO,MAAMC,8BAA8B,2BAA0B;AAErE;;;CAGC,GACD,OAAO,MAAMC,2BAA2B,QAAO;AAE/C;;;;;;;CAOC,GACD,OAAO,MAAMC,oBAAoB,SAAQ;AAEzC;;;;;;;;;;;;;;;;;;;;CAoBC,GACD,OAAO,MAAMC,wBAAwB,aAAY;AAEjD;;;;;;;;;;;;;;CAcC,GACD,OAAO,MAAMC,yBAA4C;IACvDF;IACAC;IACAd;IACAI;IACAN;IACAD;IACAI;IACAF;IACAG;IACAC;CACD,CAAA"}
1
+ {"version":3,"sources":["../../../../../../libs/aglyn/src/lib/app-utils/reusable-component-keys.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 NODE_ANIMATION_DELAY_PROP,\n NODE_ANIMATION_DURATION_PROP,\n NODE_ANIMATION_EASE_PROP,\n NODE_ANIMATION_PROP,\n NODE_ANIMATION_REPEAT_PROP,\n NODE_ANIMATION_STAGGER_PROP,\n NODE_ANIMATION_STAGGER_STEP_PROP,\n NODE_ANIMATION_TRIGGER_PROP,\n} from './element-animation'\n\n/**\n * The persisted keys, id prefixes and prop names of a reusable-component\n * instance.\n *\n * A separate module from the graft that reads them because these are the part\n * every OTHER surface needs: the renderer reads the two visibility directives,\n * the element-id helpers read the graft prefix, and the canvas reads the\n * instance component id. `compose-reusable-components.ts` beside it is the\n * composition itself — the graft, the prune, detach, and the reference walk —\n * which only an authoring surface and the server-side compose ever run, and\n * which a bundler cannot drop around a named import of one constant.\n *\n * Every value here is persisted in screen or component documents. Never\n * rename one.\n */\n\n/**\n * Persisted component id of a reusable-component instance node. Persisted in\n * screen documents — never rename (cf. `layoutSlot`, legacy `muiXxx` ids).\n */\nexport const REUSABLE_INSTANCE_COMPONENT_ID = 'reusableInstance'\n\n/**\n * Prop key on an instance node holding its per-instance prop values, keyed\n * by declared prop name (AGL-1247).\n *\n * Nested under one key rather than spread across the instance's own props\n * so a prop named `refId` or `name` cannot shadow the reference itself, and\n * so the string-prop walkers (`resolveNodesBindings`, the sanitizers) skip\n * the whole object — values reach a page only through the graft below.\n */\nexport const REUSABLE_INSTANCE_PROP_VALUES_KEY = 'propValues'\n\n/**\n * Prop key on an instance node holding the FORMATTED text of its text props,\n * keyed by declared prop name: the sanitized markup bold, italic, links and\n * lists were typed into on the canvas.\n *\n * The same split a text node makes between `children` and `html`: the plain\n * reading stays in {@link REUSABLE_INSTANCE_PROP_VALUES_KEY}, where the\n * Attributes field, the AI checks and every text walker read it, and the\n * markup rides beside it for the renderer alone. The graft hands it to each\n * element the prop fills as that element's own `html` — see\n * `applyDeclaredProps`. Nested under one key for the reasons the values are.\n */\nexport const REUSABLE_INSTANCE_PROP_HTML_KEY = 'propHtml'\n\n/**\n * `styleOverrides` key addressing the component ROOT (AGL-1306). Persisted\n * in screen documents — never rename. Component-internal node ids key the\n * per-leaf overrides beside it (AGL-1332); the definition root is addressed\n * by this constant rather than its id so the same override survives a\n * republish that reroots the definition.\n */\nexport const STYLE_OVERRIDES_ROOT_KEY = 'root'\n\n/**\n * Node-level fields that ride from the instance onto the definition's root\n * when the two collapse into one element (AGL-2521).\n *\n * These sit beside `sx` on the node, not in `props`, so no renderer spreads\n * them at an element and carrying them costs nothing in the DOM. They are\n * document state the author set on THIS placement: dropping them would make a\n * composed map that is saved back lose every per-instance override.\n */\nexport const INSTANCE_CARRIED_NODE_FIELDS: readonly string[] = [\n 'styleOverrides',\n 'attrOverrides',\n]\n\n/**\n * Token namespace a definition uses to reference its own declared props:\n * `{{prop.headline}}`. Mirrors `{{entry.*}}` and `{{host.*}}` so authors\n * meet one token syntax, not a second one invented for components.\n */\nexport const COMPONENT_PROP_TOKEN_PREFIX = 'prop.'\n\n/**\n * Declared prop names must be plain identifiers (AGL-1247).\n *\n * Load-bearing rather than cosmetic, which is why it lives beside the\n * storage contract instead of in whichever form happens to edit it: the\n * Attributes panel names its field for the nested path\n * `propValues.<name>`, and final-form splits that on dots — so a prop\n * called `hero.title` would address a level that does not exist and its\n * value would silently never reach the node. The editor that declares\n * props and the panel that fills them in must agree on this, so they read\n * the same constant.\n */\nexport const COMPONENT_PROP_NAME_PATTERN = /^[A-Za-z_][A-Za-z0-9_]*$/\n\n/**\n * Prefix namespacing a grafted definition's node ids per instance, so the\n * same definition can appear many times in one tree without id collisions.\n */\nexport const COMPONENT_NODE_ID_PREFIX = 'cmp__'\n\n/**\n * Node prop a definition sets to drop part of itself when a value is\n * TRUTHY (AGL-1314) — the \"hide the mockup\" toggle: the hero's media\n * column carries `hideIf: '{{prop.hideMedia}}'`, and a page that wants no\n * illustration ticks one checkbox.\n *\n * Persisted in component documents — never rename.\n */\nexport const NODE_HIDE_IF_PROP = 'hideIf'\n\n/**\n * The other polarity (AGL-1314): drop the node when the value is FALSY.\n *\n * This is what keeps an unfinished CTA from shipping as a dead control. A\n * button whose link is unset renders as a labelled thing you can tab to\n * that goes nowhere — seven of them nearly shipped in the footer\n * (AGL-1348). Binding `hideUnless: '{{prop.secondaryCtaLink}}'` on the\n * button means \"no destination, no button\": the node is gone before any\n * renderer sees it, so there is no anchor, no `<button>`, and no keyboard\n * stop.\n *\n * Note what it is bound to: the AUTHORED prop value, never whether a\n * screen id RESOLVES. Resolution happens later (`useLinkTarget`) against\n * the screens map, and the map behind an ISR render is not the map behind\n * the hydration that follows it — pruning on resolution would be the\n * element-switch hazard AGL-1357 lints for, one level up the pipeline.\n * Prop values ride in the page document, so server and client prune\n * identically.\n *\n * Persisted in component documents — never rename.\n */\nexport const NODE_HIDE_UNLESS_PROP = 'hideUnless'\n\n/**\n * Node prop: which visitors see the element (`signedIn`, `signedOut`; unset or\n * `everyone` is all of them) — \"Sign in\" in a header for visitors, \"Account\"\n * for the site's signed-in members. Read in the visitor's browser, because a\n * published page is one cached page for everybody; see `sign-in-visibility`.\n *\n * Persisted in screen and component documents — never rename.\n */\nexport const NODE_SHOW_TO_PROP = 'showTo'\n\n/**\n * Instance props that move onto the definition's root when the two collapse\n * into one element (AGL-2521).\n *\n * The universal directives, and only those: they are authored against \"this\n * placement\", which after the collapse IS the root. Everything else an\n * instance carries — `refId`, `name`, {@link REUSABLE_INSTANCE_PROP_VALUES_KEY},\n * the override slices — is bookkeeping the graft has already consumed, and\n * spreading it onto a real element is how `propvalues=\"[object Object]\"`\n * reached a published page once before (AGL-2486).\n *\n * Listed rather than derived by exclusion: a new instance-only prop must not\n * start leaking onto every component's root because nobody remembered to add\n * it to a deny-list.\n */\nexport const INSTANCE_CARRIED_PROPS: readonly string[] = [\n NODE_HIDE_IF_PROP,\n NODE_HIDE_UNLESS_PROP,\n NODE_SHOW_TO_PROP,\n NODE_ANIMATION_PROP,\n NODE_ANIMATION_TRIGGER_PROP,\n NODE_ANIMATION_DURATION_PROP,\n NODE_ANIMATION_DELAY_PROP,\n NODE_ANIMATION_REPEAT_PROP,\n NODE_ANIMATION_EASE_PROP,\n NODE_ANIMATION_STAGGER_PROP,\n NODE_ANIMATION_STAGGER_STEP_PROP,\n]\n"],"names":["NODE_ANIMATION_DELAY_PROP","NODE_ANIMATION_DURATION_PROP","NODE_ANIMATION_EASE_PROP","NODE_ANIMATION_PROP","NODE_ANIMATION_REPEAT_PROP","NODE_ANIMATION_STAGGER_PROP","NODE_ANIMATION_STAGGER_STEP_PROP","NODE_ANIMATION_TRIGGER_PROP","REUSABLE_INSTANCE_COMPONENT_ID","REUSABLE_INSTANCE_PROP_VALUES_KEY","REUSABLE_INSTANCE_PROP_HTML_KEY","STYLE_OVERRIDES_ROOT_KEY","INSTANCE_CARRIED_NODE_FIELDS","COMPONENT_PROP_TOKEN_PREFIX","COMPONENT_PROP_NAME_PATTERN","COMPONENT_NODE_ID_PREFIX","NODE_HIDE_IF_PROP","NODE_HIDE_UNLESS_PROP","NODE_SHOW_TO_PROP","INSTANCE_CARRIED_PROPS"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GAED,SACEA,yBAAyB,EACzBC,4BAA4B,EAC5BC,wBAAwB,EACxBC,mBAAmB,EACnBC,0BAA0B,EAC1BC,2BAA2B,EAC3BC,gCAAgC,EAChCC,2BAA2B,QACtB,yBAAqB;AAE5B;;;;;;;;;;;;;;CAcC,GAED;;;CAGC,GACD,OAAO,MAAMC,iCAAiC,mBAAkB;AAEhE;;;;;;;;CAQC,GACD,OAAO,MAAMC,oCAAoC,aAAY;AAE7D;;;;;;;;;;;CAWC,GACD,OAAO,MAAMC,kCAAkC,WAAU;AAEzD;;;;;;CAMC,GACD,OAAO,MAAMC,2BAA2B,OAAM;AAE9C;;;;;;;;CAQC,GACD,OAAO,MAAMC,+BAAkD;IAC7D;IACA;CACD,CAAA;AAED;;;;CAIC,GACD,OAAO,MAAMC,8BAA8B,QAAO;AAElD;;;;;;;;;;;CAWC,GACD,OAAO,MAAMC,8BAA8B,2BAA0B;AAErE;;;CAGC,GACD,OAAO,MAAMC,2BAA2B,QAAO;AAE/C;;;;;;;CAOC,GACD,OAAO,MAAMC,oBAAoB,SAAQ;AAEzC;;;;;;;;;;;;;;;;;;;;CAoBC,GACD,OAAO,MAAMC,wBAAwB,aAAY;AAEjD;;;;;;;CAOC,GACD,OAAO,MAAMC,oBAAoB,SAAQ;AAEzC;;;;;;;;;;;;;;CAcC,GACD,OAAO,MAAMC,yBAA4C;IACvDH;IACAC;IACAC;IACAf;IACAI;IACAN;IACAD;IACAI;IACAF;IACAG;IACAC;CACD,CAAA"}
@@ -74,6 +74,7 @@ export * from './merge-node-sx';
74
74
  export * from './palette-sx';
75
75
  export * from './scheme-sx';
76
76
  export * from './element-color-scheme';
77
+ export * from './sign-in-visibility';
77
78
  export * from './create-resource-uid';
78
79
  export * from './decompress';
79
80
  export * from './stored-nodes';
@@ -154,6 +154,7 @@ export * from "./palette-sx.js";
154
154
  export * from "./scheme-sx.js";
155
155
  // An element pinned to one color scheme (AGL-3284).
156
156
  export * from "./element-color-scheme.js";
157
+ export * from "./sign-in-visibility.js";
157
158
  export * from "./create-resource-uid.js";
158
159
  export * from "./decompress.js";
159
160
  export * from "./stored-nodes.js";
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../../libs/aglyn/src/lib/app-utils/server.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2022 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 * Server-safe app-utils: every app-util EXCEPT the client-only React\n * contexts (see ./contexts). Nothing here calls `createContext` at module\n * scope, so this barrel — re-exported by `@aglyn/aglyn/server` — is safe to\n * import from tenant Server Components (AGL-405). The full `./index` barrel\n * re-adds the contexts for client consumers.\n */\nexport * from './binding-token-catalog'\nexport * from './binding-tokens'\nexport * from './breadcrumb-json-ld'\n// What a search listing holds and how long each field may be (AGL-2910):\n// the SEO editors and anything that proposes a value read one catalog.\nexport * from './seo-listing-fields'\n// `VideoObject` for the Video elements a page actually ships (AGL-2747).\n// Beside the other structured-data builders, and server-only like them: only\n// the route emits JSON-LD, and a crawler-facing block has no client caller.\nexport * from './video-object'\n// `FAQPage` for the FAQ section a page draws (AGL-3574): the same input, the\n// same reason, and server-only for the same one — only the route emits it.\nexport * from './faq-page'\nexport * from './collection-delete'\nexport * from './collection-entries'\nexport * from './collection-kind'\nexport * from './collection-slug'\nexport * from './content-authors'\n// NOT re-exported: `./local-business` and `./site-entity-json-ld` (AGL-3383).\n// This barrel is the whole namespace a realm bundle is handed and part of the\n// runtime a published page loads (`check:tenant-wire-weight`); the site\n// entity's JSON-LD and the LocalBusiness allow-list are read only by the\n// tenant page's server render and the console's Setup → SEO card, which import\n// them by path (`@aglyn/aglyn/app-utils/...`).\nexport * from './content-query-fields'\nexport * from './content-schema-type'\nexport * from './content-author-profile'\nexport * from './url-slug'\nexport * from './child-contract'\nexport * from './child-contract-compose'\n// The one reading of `restrictChildren`/`restrictParent`, shared by the\n// besigner's drop check and the AI plugin's node-tree validator (AGL-2905).\nexport * from './lineal-order'\n// What a portable node tree must satisfy before it lands on a canvas that did\n// not author it (AGL-2939): a tree installed from another workspace and a tree\n// a model generated both pass through it.\nexport * from './node-definition-sanitizer'\nexport * from './console-routes'\n// What a stored screen-link value means, with no React attached — the\n// where-used scan reads these on the server (AGL-703).\nexport * from './screen-link-value'\n// Which entries a page's links name (AGL-3118). The tenant render reads\n// exactly those entry documents, so the walk runs on the server.\nexport * from './link-references'\nexport * from './analytics-path-key'\nexport * from './contacts'\n// A lead's or a contact's email state (AGL-3245): the last verdict on its\n// address, in words a person can act on, mirrored from the senders' lists.\nexport * from './email-state'\n// A field whose choices an admin keeps (AGL-3510): standard values built in,\n// the organization's own beside them, and the judge every write asks. Pure,\n// and named for no plugin — a plugin's registry of picklists sits on top.\nexport * from './picklists'\n// The records that sit beside a contact — companies, pipelines, deals, tasks,\n// activities, field definitions (AGL-2595). Pure like `contacts`, and beside\n// it because `ContactFacet` names its lifecycle stage and custom-value types;\n// the scope stamp every CRM creator writes lives here too.\nexport * from './crm'\n// Email templates, snippets and the merge-field resolver (AGL-2658): the\n// letter a rep keeps under a name, and the one grammar the send route and\n// the dialog fill it in by. Pure like `crm`, and beside it because a\n// template is scoped the way a task is.\nexport * from './crm-email-templates'\n// A person's privacy erasure from one workspace (AGL-2623): the request's\n// shape and id, the marker a record carries while it waits, and the lists\n// the dialog and the docs share. Pure like `crm`; the sweep is server-side.\nexport * from './person-erasure'\n// A task's reminder at its own time (AGL-2659): which reminder a save\n// leaves, whether one is owed, and the words the notification and the mail\n// say. Pure like `crm`, read by the hourly route and by every writer of the\n// field.\n// Reading a received email (AGL-2657): the address in a header, the thread\n// a subject belongs to, the reply above the quoted history — and the domain\n// the platform receives mail on. Pure; every surface that reads mail it was\n// sent reads it this way.\nexport * from './email-text'\nexport * from './inbound-mail-domain'\n// A member's own addresses in a workspace (AGL-2975): the ones they have\n// confirmed count as theirs wherever the roster is asked who wrote a\n// message. Pure; the store and the confirmation link are server-side.\nexport * from './member-email-aliases'\n// The CSV cell grammar the exports write with (AGL-2621), and the target a\n// mapped column names for a custom field — named rather than starred, because\n// an importer built on this file exports the shared ceilings under its own\n// names.\nexport {\n csvCell,\n csvDocument,\n customImportTarget,\n customImportTargetKey,\n importNoMailServerSentence,\n} from './csv-import'\nexport type {\n ImportChunkResult,\n ImportDroppedValue,\n ImportSkippedRow,\n} from './csv-import'\n// What a VALUE under a custom contact field may be, and the coercion every\n// door applies to one (AGL-2601): a mapped form field, an API `custom` body,\n// and the carry-over that keeps a mapping across a publish. Pure like `crm`.\nexport * from './contact-custom-fields'\n// The consent JOIN (`docs/specs/email-overhaul.md` §3f). Pure, and it composes\n// `contacts` for the normalizer, so it sits directly beside it. No Node\n// builtin, which is what keeps it out of the `/server`-only group `person-key`\n// belongs to.\nexport * from './consent-groups'\nexport * from './marketing-consent'\n// A refusal kept after the record it was written on is deleted (AGL-3338),\n// read back through the same parser as the record's own.\nexport * from './retained-refusals'\n// The ENROLLMENT-time half of the same question, beside its reader for the\n// same reason: `marketing-consent` decides whether a recorded basis lets us\n// mail somebody, and this decides what basis putting them on a list may\n// record. Two enrollment surfaces import it — the Inbox assignment route and\n// the Emails console's audience card — and neither could import the other.\nexport * from './enrollment-basis'\n// Reading the FILE a merchant arrives with (`docs/specs/email-competitive-gaps.md`\n// G5/P4), directly after the policy it hands its addresses to: parsing and\n// mechanical screening only, so that an import asks the enrollment question\n// through the same module the one-address add path asks it through rather\n// than answering it a second way.\n// The dynamic-list rule (§3b/§3c), beside it for the same reasons: pure, and\n// it composes `contacts` for the segment vocabulary rather than restating it.\nexport * from './dynamic-list-rule'\n// The subscribable streams a recipient can leave one at a time\n// (`docs/specs/email-competitive-gaps.md` §1f). Pure, and read from all three\n// sides of the feature: the composer picks one, the send path signs it into\n// the unsubscribe link, and the unauthenticated preference page renders the\n// catalog. No Node builtin, so it stays out of the `/server`-only group.\nexport * from './subscription-topics'\nexport * from './compose-layout-nodes'\n// Layout properties applied through the chain (AGL-2893).\nexport * from './compose-layout-props'\n// A screen's per-page restyling of its layout's elements (AGL-3286).\nexport * from './layout-style-overrides'\nexport * from './document-landmark'\nexport * from './functions'\nexport * from './compose-reusable-components'\n// Where a reusable component is placed — pages or emails (AGL-3287).\nexport * from './reusable-component-kind'\nexport * from './compress'\nexport * from './merge-node-sx'\nexport * from './palette-sx'\nexport * from './scheme-sx'\n// An element pinned to one color scheme (AGL-3284).\nexport * from './element-color-scheme'\nexport * from './create-resource-uid'\nexport * from './decompress'\nexport * from './stored-nodes'\nexport * from './strip-undefined'\nexport * from './organizations'\nexport * from './org-permissions'\n// The AI verdict on either membership axis (AGL-2927). After both modules it\n// composes: the org catalog for org-wide members, the host role for site\n// collaborators.\nexport * from './host-permissions'\nexport * from './password-policy'\nexport * from './idp-profile'\nexport * from './onboarding-deep-link'\n// The platform team's ask that a workspace buy a plan (AGL-3466), beside the\n// plan intent its button carries into Billing.\nexport * from './upgrade-proposal'\n// Where an account came from (AGL-1731). Beside the plan intent because\n// they are the same hop — the marketing CTA's query string — and both are\n// remembered on `users/{uid}` across the verification wall.\nexport * from './utm-attribution'\n// What a record is filed under: the edge between a container a plugin keeps\n// (a campaign) and the forms, screens and contacts it gathers. Beside the\n// attribution above because the two answer opposite questions: attribution\n// records where somebody CAME from, this records what a merchant DECLARED\n// belongs together.\nexport * from './container-membership'\nexport * from './deployment-shape'\n// Which browser origins may complete a signed direct-to-GCS upload (AGL-1452).\n// GCS matches the origin list EXACTLY, so every serving console name needs its\n// own entry — the rule nobody could be expected to remember at attach time.\nexport * from './upload-cors'\n// The docs-help subset the first-party plugin consoles read (AGL-2213) — the\n// console's own registry lives in apps/console/constants and a lib cannot\n// import an app.\nexport * from './docs-help'\nexport * from './platform-brand'\nexport * from './plan-entitlements'\n// No site checkout offers buy-now-pay-later (AGL-4198).\nexport * from './buy-now-pay-later'\n// Aglyn AI credits by the block (AGL-4144): the block and the arithmetic\n// `plan-entitlements` folds into the plan's included credits.\nexport * from './ai-credit-blocks'\n// The free plan's bandwidth hard cap (AGL-1967/2070/2155). After\n// `plan-entitlements`, which owns the predicate it keys off.\nexport * from './bandwidth-cap'\n// Video and file delivery as bandwidth (AGL-3474), in the band's own units.\nexport * from './media-bandwidth'\n// The month every monthly counter is keyed by, and the boundary it lifts on.\nexport * from './utc-month'\nexport * from './forms'\n// What a form's DESIGN must still satisfy for its submissions to arrive.\n// After `forms`, whose field walk it reads the drawn fields with.\nexport * from './form-contract'\nexport * from './visitor-record-ceiling'\nexport * from './health-report'\n// Did a webhook delivery actually DO anything (AGL-1954)? After\n// `health-report`, whose billing verdict consumes the counts this produces.\nexport * from './webhook-delivery'\nexport * from './support-tiers'\n// Site Care requests (AGL-3959): the arithmetic, and the two modules any\n// staff-recorded, approval-gated charge reuses (AGL-3970).\nexport * from './site-care'\nexport * from './owner-approval-record'\nexport * from './append-only-history'\n// Site Care projects (AGL-3970): the flat quote, its split and its record.\nexport * from './site-care-project'\nexport * from './release-flags'\n// Who runs THIS deployment, and where its notices go (AGL-2016). Ordered\n// before the four surfaces that print it, all of which used to declare their\n// own `support@aglyn.com` literal.\nexport * from './operator-identity'\nexport * from './lockdown'\nexport * from './media-quarantine'\nexport * from './media-takedown-reach'\nexport * from './upload-inspection'\nexport * from './abuse-report'\n// The other three quarters of §512 (AGL-1983): the put-back procedure that\n// answers a notice, and the strike ledger that conditions the safe harbour.\nexport * from './dmca-counter-notice'\nexport * from './repeat-infringer'\n// `addBusinessDays` briefly existed TWICE — once here in './support-tiers'\n// and once in './dmca-counter-notice' — and two `export *` made the name\n// ambiguous, TS2308'ing this barrel and every tsconfig that reads it. The\n// interleave was fixed twice in parallel: once by naming a winner here, and\n// once by deleting the second definition so './dmca-counter-notice' imports\n// this one. Only the deletion survives, so the disambiguating re-export that\n// stood on this line is gone with it — `export *` is unambiguous again.\n//\n// The concern that argued for keeping two copies is worth answering rather\n// than dropping: a later tweak to the SUPPORT SLA window must never silently\n// move the §512(g)(2)(C) put-back deadline. It cannot. This function embeds\n// no window — it is \"add N business days\", and N is the argument. The two\n// windows live in their own constants (`SUPPORT_*` there,\n// `COUNTER_NOTICE_*_BUSINESS_DAYS` in the DMCA module) and never meet. What\n// SHOULD stay shared is the day arithmetic itself: two copies of a weekend\n// rule are two chances to disagree about which day a deadline falls on.\nexport * from './org-override-reason'\nexport * from './host-tokens'\nexport * from './variables'\n// What happened on a site that an automation can start on: the platform's\n// own event and the ones plugins declare (AGL-3080).\nexport * from './host-events'\nexport * from './expand-repeatables'\nexport * from './org-roles'\nexport * from './markdown-lite'\nexport * from './notifications'\n// The operator alert registry (AGL-3377); OPERATOR_ALERT_NOTIFICATION_TYPES\n// lives here now, derived from it.\nexport * from './operator-alerts'\nexport * from './definition-canvas-tree'\nexport * from './ensure-canvas-root'\nexport * from './repair-canvas-nodes'\nexport * from './detect-template-placeholders'\nexport * from './guarded-version-save'\nexport * from './version-draft'\nexport * from './local-storage-budget'\nexport * from './measure-node-map'\nexport * from './resolve-named-tokens'\nexport * from './screen-route'\nexport * from './host-naming'\nexport * from './name-search'\nexport * from './artifact-list-keys'\nexport * from './name-match'\nexport * from './api-plugins'\nexport * from './plugin-api-rate-limit'\n// The same-origin gate on visitor-facing plugin writes (AGL-1880). After\n// `plugin-api-rate-limit`, whose `isMachinePluginApiPath` it reuses so the\n// two gates exempt exactly the same machine surfaces.\nexport * from './plugin-api-cross-origin'\n// What a published page does when a visitor does something (AGL-3080): the\n// platform's interaction vocabulary, which the workflows plugin builds its\n// automations on.\nexport * from './site-interactions'\nexport * from './element-animation'\nexport * from './attribution-guard'\nexport * from './node-interactions'\nexport * from './element-ui'\nexport * from './image-upload-types'\nexport * from './site-brand-files'\nexport * from './sanitize-svg'\nexport * from './media-folders'\nexport * from './media-metadata'\nexport * from './media-ref'\nexport * from './rendered-widths'\n// After `media-ref`, whose reference grammar it reads stored URLs with.\nexport * from './paid-media-source'\nexport * from './author-css'\n// The isomorphic HTML rule (AGL-1901), after the CSS one it depends on.\nexport * from './author-html'\nexport * from './csv'\nexport * from './csv-upload'\nexport * from './artifact-provenance'\nexport * from './repeat-query'\nexport * from './plugin-manifest'\n// After `plugin-manifest`, whose revocation predicates it asks the kill\n// question with, and after `media-ref`, whose grammar decides what counts as a\n// first-party image.\nexport * from './email-starter-policy'\nexport * from './safe-json-ld'\n// Agent readiness (AGL-2716): content negotiation, the Markdown rendering of a\n// page, `/llms.txt` and the per-site OpenAPI document. All pure, all server-safe.\nexport * from './accept-negotiation'\nexport * from './agent-api-catalog'\nexport * from './agent-openapi'\nexport * from './author-html-markdown'\nexport * from './llms-txt'\nexport * from './page-markdown'\nexport * from './request-geo'\nexport * from './request-ip'\nexport * from './search-indexing'\n// Preview: a site or page only its team can see (AGL-4086).\nexport * from './site-preview'\nexport * from './seo-title'\nexport * from './sitemap'\nexport * from './visitor-consent'\nexport * from './social-image'\nexport * from './scope-tokens'\nexport * from './org-billing-doc'\nexport * from './stripe-deployment-mode'\nexport * from './deferred-image'\n"],"names":["csvCell","csvDocument","customImportTarget","customImportTargetKey","importNoMailServerSentence"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GAED;;;;;;CAMC,GACD,cAAc,6BAAyB;AACvC,cAAc,sBAAkB;AAChC,cAAc,0BAAsB;AACpC,yEAAyE;AACzE,uEAAuE;AACvE,cAAc,0BAAsB;AACpC,yEAAyE;AACzE,6EAA6E;AAC7E,4EAA4E;AAC5E,cAAc,oBAAgB;AAC9B,6EAA6E;AAC7E,2EAA2E;AAC3E,cAAc,gBAAY;AAC1B,cAAc,yBAAqB;AACnC,cAAc,0BAAsB;AACpC,cAAc,uBAAmB;AACjC,cAAc,uBAAmB;AACjC,cAAc,uBAAmB;AACjC,8EAA8E;AAC9E,8EAA8E;AAC9E,wEAAwE;AACxE,yEAAyE;AACzE,+EAA+E;AAC/E,+CAA+C;AAC/C,cAAc,4BAAwB;AACtC,cAAc,2BAAuB;AACrC,cAAc,8BAA0B;AACxC,cAAc,gBAAY;AAC1B,cAAc,sBAAkB;AAChC,cAAc,8BAA0B;AACxC,wEAAwE;AACxE,4EAA4E;AAC5E,cAAc,oBAAgB;AAC9B,8EAA8E;AAC9E,+EAA+E;AAC/E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AAC3B,cAAc,eAAW;AACzB,cAAc,uBAAmB;AACjC,cAAc,oBAAgB;AAC9B,cAAc,oBAAgB;AAC9B,cAAc,uBAAmB;AACjC,cAAc,8BAA0B;AACxC,cAAc,sBAAkB"}
1
+ {"version":3,"sources":["../../../../../../libs/aglyn/src/lib/app-utils/server.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2022 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 * Server-safe app-utils: every app-util EXCEPT the client-only React\n * contexts (see ./contexts). Nothing here calls `createContext` at module\n * scope, so this barrel — re-exported by `@aglyn/aglyn/server` — is safe to\n * import from tenant Server Components (AGL-405). The full `./index` barrel\n * re-adds the contexts for client consumers.\n */\nexport * from './binding-token-catalog'\nexport * from './binding-tokens'\nexport * from './breadcrumb-json-ld'\n// What a search listing holds and how long each field may be (AGL-2910):\n// the SEO editors and anything that proposes a value read one catalog.\nexport * from './seo-listing-fields'\n// `VideoObject` for the Video elements a page actually ships (AGL-2747).\n// Beside the other structured-data builders, and server-only like them: only\n// the route emits JSON-LD, and a crawler-facing block has no client caller.\nexport * from './video-object'\n// `FAQPage` for the FAQ section a page draws (AGL-3574): the same input, the\n// same reason, and server-only for the same one — only the route emits it.\nexport * from './faq-page'\nexport * from './collection-delete'\nexport * from './collection-entries'\nexport * from './collection-kind'\nexport * from './collection-slug'\nexport * from './content-authors'\n// NOT re-exported: `./local-business` and `./site-entity-json-ld` (AGL-3383).\n// This barrel is the whole namespace a realm bundle is handed and part of the\n// runtime a published page loads (`check:tenant-wire-weight`); the site\n// entity's JSON-LD and the LocalBusiness allow-list are read only by the\n// tenant page's server render and the console's Setup → SEO card, which import\n// them by path (`@aglyn/aglyn/app-utils/...`).\nexport * from './content-query-fields'\nexport * from './content-schema-type'\nexport * from './content-author-profile'\nexport * from './url-slug'\nexport * from './child-contract'\nexport * from './child-contract-compose'\n// The one reading of `restrictChildren`/`restrictParent`, shared by the\n// besigner's drop check and the AI plugin's node-tree validator (AGL-2905).\nexport * from './lineal-order'\n// What a portable node tree must satisfy before it lands on a canvas that did\n// not author it (AGL-2939): a tree installed from another workspace and a tree\n// a model generated both pass through it.\nexport * from './node-definition-sanitizer'\nexport * from './console-routes'\n// What a stored screen-link value means, with no React attached — the\n// where-used scan reads these on the server (AGL-703).\nexport * from './screen-link-value'\n// Which entries a page's links name (AGL-3118). The tenant render reads\n// exactly those entry documents, so the walk runs on the server.\nexport * from './link-references'\nexport * from './analytics-path-key'\nexport * from './contacts'\n// A lead's or a contact's email state (AGL-3245): the last verdict on its\n// address, in words a person can act on, mirrored from the senders' lists.\nexport * from './email-state'\n// A field whose choices an admin keeps (AGL-3510): standard values built in,\n// the organization's own beside them, and the judge every write asks. Pure,\n// and named for no plugin — a plugin's registry of picklists sits on top.\nexport * from './picklists'\n// The records that sit beside a contact — companies, pipelines, deals, tasks,\n// activities, field definitions (AGL-2595). Pure like `contacts`, and beside\n// it because `ContactFacet` names its lifecycle stage and custom-value types;\n// the scope stamp every CRM creator writes lives here too.\nexport * from './crm'\n// Email templates, snippets and the merge-field resolver (AGL-2658): the\n// letter a rep keeps under a name, and the one grammar the send route and\n// the dialog fill it in by. Pure like `crm`, and beside it because a\n// template is scoped the way a task is.\nexport * from './crm-email-templates'\n// A person's privacy erasure from one workspace (AGL-2623): the request's\n// shape and id, the marker a record carries while it waits, and the lists\n// the dialog and the docs share. Pure like `crm`; the sweep is server-side.\nexport * from './person-erasure'\n// A task's reminder at its own time (AGL-2659): which reminder a save\n// leaves, whether one is owed, and the words the notification and the mail\n// say. Pure like `crm`, read by the hourly route and by every writer of the\n// field.\n// Reading a received email (AGL-2657): the address in a header, the thread\n// a subject belongs to, the reply above the quoted history — and the domain\n// the platform receives mail on. Pure; every surface that reads mail it was\n// sent reads it this way.\nexport * from './email-text'\nexport * from './inbound-mail-domain'\n// A member's own addresses in a workspace (AGL-2975): the ones they have\n// confirmed count as theirs wherever the roster is asked who wrote a\n// message. Pure; the store and the confirmation link are server-side.\nexport * from './member-email-aliases'\n// The CSV cell grammar the exports write with (AGL-2621), and the target a\n// mapped column names for a custom field — named rather than starred, because\n// an importer built on this file exports the shared ceilings under its own\n// names.\nexport {\n csvCell,\n csvDocument,\n customImportTarget,\n customImportTargetKey,\n importNoMailServerSentence,\n} from './csv-import'\nexport type {\n ImportChunkResult,\n ImportDroppedValue,\n ImportSkippedRow,\n} from './csv-import'\n// What a VALUE under a custom contact field may be, and the coercion every\n// door applies to one (AGL-2601): a mapped form field, an API `custom` body,\n// and the carry-over that keeps a mapping across a publish. Pure like `crm`.\nexport * from './contact-custom-fields'\n// The consent JOIN (`docs/specs/email-overhaul.md` §3f). Pure, and it composes\n// `contacts` for the normalizer, so it sits directly beside it. No Node\n// builtin, which is what keeps it out of the `/server`-only group `person-key`\n// belongs to.\nexport * from './consent-groups'\nexport * from './marketing-consent'\n// A refusal kept after the record it was written on is deleted (AGL-3338),\n// read back through the same parser as the record's own.\nexport * from './retained-refusals'\n// The ENROLLMENT-time half of the same question, beside its reader for the\n// same reason: `marketing-consent` decides whether a recorded basis lets us\n// mail somebody, and this decides what basis putting them on a list may\n// record. Two enrollment surfaces import it — the Inbox assignment route and\n// the Emails console's audience card — and neither could import the other.\nexport * from './enrollment-basis'\n// Reading the FILE a merchant arrives with (`docs/specs/email-competitive-gaps.md`\n// G5/P4), directly after the policy it hands its addresses to: parsing and\n// mechanical screening only, so that an import asks the enrollment question\n// through the same module the one-address add path asks it through rather\n// than answering it a second way.\n// The dynamic-list rule (§3b/§3c), beside it for the same reasons: pure, and\n// it composes `contacts` for the segment vocabulary rather than restating it.\nexport * from './dynamic-list-rule'\n// The subscribable streams a recipient can leave one at a time\n// (`docs/specs/email-competitive-gaps.md` §1f). Pure, and read from all three\n// sides of the feature: the composer picks one, the send path signs it into\n// the unsubscribe link, and the unauthenticated preference page renders the\n// catalog. No Node builtin, so it stays out of the `/server`-only group.\nexport * from './subscription-topics'\nexport * from './compose-layout-nodes'\n// Layout properties applied through the chain (AGL-2893).\nexport * from './compose-layout-props'\n// A screen's per-page restyling of its layout's elements (AGL-3286).\nexport * from './layout-style-overrides'\nexport * from './document-landmark'\nexport * from './functions'\nexport * from './compose-reusable-components'\n// Where a reusable component is placed — pages or emails (AGL-3287).\nexport * from './reusable-component-kind'\nexport * from './compress'\nexport * from './merge-node-sx'\nexport * from './palette-sx'\nexport * from './scheme-sx'\n// An element pinned to one color scheme (AGL-3284).\nexport * from './element-color-scheme'\nexport * from './sign-in-visibility'\nexport * from './create-resource-uid'\nexport * from './decompress'\nexport * from './stored-nodes'\nexport * from './strip-undefined'\nexport * from './organizations'\nexport * from './org-permissions'\n// The AI verdict on either membership axis (AGL-2927). After both modules it\n// composes: the org catalog for org-wide members, the host role for site\n// collaborators.\nexport * from './host-permissions'\nexport * from './password-policy'\nexport * from './idp-profile'\nexport * from './onboarding-deep-link'\n// The platform team's ask that a workspace buy a plan (AGL-3466), beside the\n// plan intent its button carries into Billing.\nexport * from './upgrade-proposal'\n// Where an account came from (AGL-1731). Beside the plan intent because\n// they are the same hop — the marketing CTA's query string — and both are\n// remembered on `users/{uid}` across the verification wall.\nexport * from './utm-attribution'\n// What a record is filed under: the edge between a container a plugin keeps\n// (a campaign) and the forms, screens and contacts it gathers. Beside the\n// attribution above because the two answer opposite questions: attribution\n// records where somebody CAME from, this records what a merchant DECLARED\n// belongs together.\nexport * from './container-membership'\nexport * from './deployment-shape'\n// Which browser origins may complete a signed direct-to-GCS upload (AGL-1452).\n// GCS matches the origin list EXACTLY, so every serving console name needs its\n// own entry — the rule nobody could be expected to remember at attach time.\nexport * from './upload-cors'\n// The docs-help subset the first-party plugin consoles read (AGL-2213) — the\n// console's own registry lives in apps/console/constants and a lib cannot\n// import an app.\nexport * from './docs-help'\nexport * from './platform-brand'\nexport * from './plan-entitlements'\n// No site checkout offers buy-now-pay-later (AGL-4198).\nexport * from './buy-now-pay-later'\n// Aglyn AI credits by the block (AGL-4144): the block and the arithmetic\n// `plan-entitlements` folds into the plan's included credits.\nexport * from './ai-credit-blocks'\n// The free plan's bandwidth hard cap (AGL-1967/2070/2155). After\n// `plan-entitlements`, which owns the predicate it keys off.\nexport * from './bandwidth-cap'\n// Video and file delivery as bandwidth (AGL-3474), in the band's own units.\nexport * from './media-bandwidth'\n// The month every monthly counter is keyed by, and the boundary it lifts on.\nexport * from './utc-month'\nexport * from './forms'\n// What a form's DESIGN must still satisfy for its submissions to arrive.\n// After `forms`, whose field walk it reads the drawn fields with.\nexport * from './form-contract'\nexport * from './visitor-record-ceiling'\nexport * from './health-report'\n// Did a webhook delivery actually DO anything (AGL-1954)? After\n// `health-report`, whose billing verdict consumes the counts this produces.\nexport * from './webhook-delivery'\nexport * from './support-tiers'\n// Site Care requests (AGL-3959): the arithmetic, and the two modules any\n// staff-recorded, approval-gated charge reuses (AGL-3970).\nexport * from './site-care'\nexport * from './owner-approval-record'\nexport * from './append-only-history'\n// Site Care projects (AGL-3970): the flat quote, its split and its record.\nexport * from './site-care-project'\nexport * from './release-flags'\n// Who runs THIS deployment, and where its notices go (AGL-2016). Ordered\n// before the four surfaces that print it, all of which used to declare their\n// own `support@aglyn.com` literal.\nexport * from './operator-identity'\nexport * from './lockdown'\nexport * from './media-quarantine'\nexport * from './media-takedown-reach'\nexport * from './upload-inspection'\nexport * from './abuse-report'\n// The other three quarters of §512 (AGL-1983): the put-back procedure that\n// answers a notice, and the strike ledger that conditions the safe harbour.\nexport * from './dmca-counter-notice'\nexport * from './repeat-infringer'\n// `addBusinessDays` briefly existed TWICE — once here in './support-tiers'\n// and once in './dmca-counter-notice' — and two `export *` made the name\n// ambiguous, TS2308'ing this barrel and every tsconfig that reads it. The\n// interleave was fixed twice in parallel: once by naming a winner here, and\n// once by deleting the second definition so './dmca-counter-notice' imports\n// this one. Only the deletion survives, so the disambiguating re-export that\n// stood on this line is gone with it — `export *` is unambiguous again.\n//\n// The concern that argued for keeping two copies is worth answering rather\n// than dropping: a later tweak to the SUPPORT SLA window must never silently\n// move the §512(g)(2)(C) put-back deadline. It cannot. This function embeds\n// no window — it is \"add N business days\", and N is the argument. The two\n// windows live in their own constants (`SUPPORT_*` there,\n// `COUNTER_NOTICE_*_BUSINESS_DAYS` in the DMCA module) and never meet. What\n// SHOULD stay shared is the day arithmetic itself: two copies of a weekend\n// rule are two chances to disagree about which day a deadline falls on.\nexport * from './org-override-reason'\nexport * from './host-tokens'\nexport * from './variables'\n// What happened on a site that an automation can start on: the platform's\n// own event and the ones plugins declare (AGL-3080).\nexport * from './host-events'\nexport * from './expand-repeatables'\nexport * from './org-roles'\nexport * from './markdown-lite'\nexport * from './notifications'\n// The operator alert registry (AGL-3377); OPERATOR_ALERT_NOTIFICATION_TYPES\n// lives here now, derived from it.\nexport * from './operator-alerts'\nexport * from './definition-canvas-tree'\nexport * from './ensure-canvas-root'\nexport * from './repair-canvas-nodes'\nexport * from './detect-template-placeholders'\nexport * from './guarded-version-save'\nexport * from './version-draft'\nexport * from './local-storage-budget'\nexport * from './measure-node-map'\nexport * from './resolve-named-tokens'\nexport * from './screen-route'\nexport * from './host-naming'\nexport * from './name-search'\nexport * from './artifact-list-keys'\nexport * from './name-match'\nexport * from './api-plugins'\nexport * from './plugin-api-rate-limit'\n// The same-origin gate on visitor-facing plugin writes (AGL-1880). After\n// `plugin-api-rate-limit`, whose `isMachinePluginApiPath` it reuses so the\n// two gates exempt exactly the same machine surfaces.\nexport * from './plugin-api-cross-origin'\n// What a published page does when a visitor does something (AGL-3080): the\n// platform's interaction vocabulary, which the workflows plugin builds its\n// automations on.\nexport * from './site-interactions'\nexport * from './element-animation'\nexport * from './attribution-guard'\nexport * from './node-interactions'\nexport * from './element-ui'\nexport * from './image-upload-types'\nexport * from './site-brand-files'\nexport * from './sanitize-svg'\nexport * from './media-folders'\nexport * from './media-metadata'\nexport * from './media-ref'\nexport * from './rendered-widths'\n// After `media-ref`, whose reference grammar it reads stored URLs with.\nexport * from './paid-media-source'\nexport * from './author-css'\n// The isomorphic HTML rule (AGL-1901), after the CSS one it depends on.\nexport * from './author-html'\nexport * from './csv'\nexport * from './csv-upload'\nexport * from './artifact-provenance'\nexport * from './repeat-query'\nexport * from './plugin-manifest'\n// After `plugin-manifest`, whose revocation predicates it asks the kill\n// question with, and after `media-ref`, whose grammar decides what counts as a\n// first-party image.\nexport * from './email-starter-policy'\nexport * from './safe-json-ld'\n// Agent readiness (AGL-2716): content negotiation, the Markdown rendering of a\n// page, `/llms.txt` and the per-site OpenAPI document. All pure, all server-safe.\nexport * from './accept-negotiation'\nexport * from './agent-api-catalog'\nexport * from './agent-openapi'\nexport * from './author-html-markdown'\nexport * from './llms-txt'\nexport * from './page-markdown'\nexport * from './request-geo'\nexport * from './request-ip'\nexport * from './search-indexing'\n// Preview: a site or page only its team can see (AGL-4086).\nexport * from './site-preview'\nexport * from './seo-title'\nexport * from './sitemap'\nexport * from './visitor-consent'\nexport * from './social-image'\nexport * from './scope-tokens'\nexport * from './org-billing-doc'\nexport * from './stripe-deployment-mode'\nexport * from './deferred-image'\n"],"names":["csvCell","csvDocument","customImportTarget","customImportTargetKey","importNoMailServerSentence"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GAED;;;;;;CAMC,GACD,cAAc,6BAAyB;AACvC,cAAc,sBAAkB;AAChC,cAAc,0BAAsB;AACpC,yEAAyE;AACzE,uEAAuE;AACvE,cAAc,0BAAsB;AACpC,yEAAyE;AACzE,6EAA6E;AAC7E,4EAA4E;AAC5E,cAAc,oBAAgB;AAC9B,6EAA6E;AAC7E,2EAA2E;AAC3E,cAAc,gBAAY;AAC1B,cAAc,yBAAqB;AACnC,cAAc,0BAAsB;AACpC,cAAc,uBAAmB;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mB;AACjC,wEAAwE;AACxE,+EAA+E;AAC/E,qBAAqB;AACrB,cAAc,4BAAwB;AACtC,cAAc,oBAAgB;AAC9B,+EAA+E;AAC/E,kFAAkF;AAClF,cAAc,0BAAsB;AACpC,cAAc,yBAAqB;AACnC,cAAc,qBAAiB;AAC/B,cAAc,4BAAwB;AACtC,cAAc,gBAAY;AAC1B,cAAc,qBAAiB;AAC/B,cAAc,mBAAe;AAC7B,cAAc,kBAAc;AAC5B,cAAc,uBAAmB;AACjC,4DAA4D;AAC5D,cAAc,oBAAgB;AAC9B,cAAc,iBAAa;AAC3B,cAAc,eAAW;AACzB,cAAc,uBAAmB;AACjC,cAAc,oBAAgB;AAC9B,cAAc,oBAAgB;AAC9B,cAAc,uBAAmB;AACjC,cAAc,8BAA0B;AACxC,cAAc,sBAAkB"}
@@ -0,0 +1,58 @@
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
+ * The cookie names behind "Show to" signed-in or signed-out visitors
19
+ * (AGL-4231), and the repair the tenant middleware makes on every page
20
+ * request. No imports, so the middleware can take it whole.
21
+ *
22
+ * The hint is written when a visitor signs in. A visitor who signed in BEFORE
23
+ * the hint existed, or whose hint went missing, still holds a member session
24
+ * and would see "Sign in" on every page. And a hint can outlive its session
25
+ * (the session expired or was cleared by something other than sign-out). So
26
+ * the middleware, which sees every page request before the cached page, keeps
27
+ * the two in step: a session with no hint gets one, a hint with no session
28
+ * loses it. The page's inline script then reads the corrected cookie, because
29
+ * a browser applies a response's cookies before it runs the page's scripts.
30
+ *
31
+ * Presence of the session cookie is enough here: the hint only decides what
32
+ * shows. Whether the session is valid is checked by every endpoint that acts
33
+ * on it, exactly as before.
34
+ */
35
+ /** The member session cookie's name prefix; the site's id follows. HttpOnly. */
36
+ export declare const MEMBER_SESSION_COOKIE_PREFIX = "aglyn_member_";
37
+ /** The readable sign-in hint's name prefix; the site's id follows, as the session's does. */
38
+ export declare const SIGNED_IN_HINT_COOKIE_PREFIX = "aglyn_signed_in_";
39
+ /** How long a hint the middleware writes lasts: a session's own lifetime. */
40
+ export declare const SIGNED_IN_HINT_MAX_AGE_SECONDS: number;
41
+ /** The suffix both cookies share for one site. */
42
+ export declare function siteCookieSuffix(hostId: string): string;
43
+ /** The member session cookie for one site. */
44
+ export declare function memberSessionCookieName(hostId: string): string;
45
+ /** The readable "signed in" hint cookie for one site. */
46
+ export declare function signedInHintCookieName(hostId: string): string;
47
+ /**
48
+ * The hint cookies to write (`set`) and to clear (`clear`) so that each site's
49
+ * hint matches whether the request carries that site's member session.
50
+ * Empty lists for the overwhelmingly common request: no session and no hint.
51
+ */
52
+ export declare function signedInHintCorrections(cookies: Iterable<{
53
+ name: string;
54
+ value: string;
55
+ }>): {
56
+ set: string[];
57
+ clear: string[];
58
+ };
@@ -0,0 +1,71 @@
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
+ * The cookie names behind "Show to" signed-in or signed-out visitors
18
+ * (AGL-4231), and the repair the tenant middleware makes on every page
19
+ * request. No imports, so the middleware can take it whole.
20
+ *
21
+ * The hint is written when a visitor signs in. A visitor who signed in BEFORE
22
+ * the hint existed, or whose hint went missing, still holds a member session
23
+ * and would see "Sign in" on every page. And a hint can outlive its session
24
+ * (the session expired or was cleared by something other than sign-out). So
25
+ * the middleware, which sees every page request before the cached page, keeps
26
+ * the two in step: a session with no hint gets one, a hint with no session
27
+ * loses it. The page's inline script then reads the corrected cookie, because
28
+ * a browser applies a response's cookies before it runs the page's scripts.
29
+ *
30
+ * Presence of the session cookie is enough here: the hint only decides what
31
+ * shows. Whether the session is valid is checked by every endpoint that acts
32
+ * on it, exactly as before.
33
+ */ /** The member session cookie's name prefix; the site's id follows. HttpOnly. */ export const MEMBER_SESSION_COOKIE_PREFIX = 'aglyn_member_';
34
+ /** The readable sign-in hint's name prefix; the site's id follows, as the session's does. */ export const SIGNED_IN_HINT_COOKIE_PREFIX = 'aglyn_signed_in_';
35
+ /** How long a hint the middleware writes lasts: a session's own lifetime. */ export const SIGNED_IN_HINT_MAX_AGE_SECONDS = 30 * 24 * 60 * 60;
36
+ /** The suffix both cookies share for one site. */ export function siteCookieSuffix(hostId) {
37
+ return hostId.replace(/[^A-Za-z0-9_-]/g, '');
38
+ }
39
+ /** The member session cookie for one site. */ export function memberSessionCookieName(hostId) {
40
+ return `${MEMBER_SESSION_COOKIE_PREFIX}${siteCookieSuffix(hostId)}`;
41
+ }
42
+ /** The readable "signed in" hint cookie for one site. */ export function signedInHintCookieName(hostId) {
43
+ return `${SIGNED_IN_HINT_COOKIE_PREFIX}${siteCookieSuffix(hostId)}`;
44
+ }
45
+ /**
46
+ * The hint cookies to write (`set`) and to clear (`clear`) so that each site's
47
+ * hint matches whether the request carries that site's member session.
48
+ * Empty lists for the overwhelmingly common request: no session and no hint.
49
+ */ export function signedInHintCorrections(cookies) {
50
+ const sessions = new Set();
51
+ const hints = new Map();
52
+ for (const { name, value } of cookies){
53
+ if (name.startsWith(MEMBER_SESSION_COOKIE_PREFIX) && value) {
54
+ sessions.add(name.slice(MEMBER_SESSION_COOKIE_PREFIX.length));
55
+ } else if (name.startsWith(SIGNED_IN_HINT_COOKIE_PREFIX)) {
56
+ hints.set(name.slice(SIGNED_IN_HINT_COOKIE_PREFIX.length), value);
57
+ }
58
+ }
59
+ const set = [
60
+ ...sessions
61
+ ].filter((suffix)=>hints.get(suffix) !== '1').map((suffix)=>`${SIGNED_IN_HINT_COOKIE_PREFIX}${suffix}`);
62
+ const clear = [
63
+ ...hints
64
+ ].filter(([suffix, value])=>value && !sessions.has(suffix)).map(([suffix])=>`${SIGNED_IN_HINT_COOKIE_PREFIX}${suffix}`);
65
+ return {
66
+ set,
67
+ clear
68
+ };
69
+ }
70
+
71
+ //# sourceMappingURL=sign-in-hint-cookie.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../libs/aglyn/src/lib/app-utils/sign-in-hint-cookie.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 * The cookie names behind \"Show to\" signed-in or signed-out visitors\n * (AGL-4231), and the repair the tenant middleware makes on every page\n * request. No imports, so the middleware can take it whole.\n *\n * The hint is written when a visitor signs in. A visitor who signed in BEFORE\n * the hint existed, or whose hint went missing, still holds a member session\n * and would see \"Sign in\" on every page. And a hint can outlive its session\n * (the session expired or was cleared by something other than sign-out). So\n * the middleware, which sees every page request before the cached page, keeps\n * the two in step: a session with no hint gets one, a hint with no session\n * loses it. The page's inline script then reads the corrected cookie, because\n * a browser applies a response's cookies before it runs the page's scripts.\n *\n * Presence of the session cookie is enough here: the hint only decides what\n * shows. Whether the session is valid is checked by every endpoint that acts\n * on it, exactly as before.\n */\n\n/** The member session cookie's name prefix; the site's id follows. HttpOnly. */\nexport const MEMBER_SESSION_COOKIE_PREFIX = 'aglyn_member_'\n\n/** The readable sign-in hint's name prefix; the site's id follows, as the session's does. */\nexport const SIGNED_IN_HINT_COOKIE_PREFIX = 'aglyn_signed_in_'\n\n/** How long a hint the middleware writes lasts: a session's own lifetime. */\nexport const SIGNED_IN_HINT_MAX_AGE_SECONDS = 30 * 24 * 60 * 60\n\n/** The suffix both cookies share for one site. */\nexport function siteCookieSuffix(hostId: string): string {\n return hostId.replace(/[^A-Za-z0-9_-]/g, '')\n}\n\n/** The member session cookie for one site. */\nexport function memberSessionCookieName(hostId: string): string {\n return `${MEMBER_SESSION_COOKIE_PREFIX}${siteCookieSuffix(hostId)}`\n}\n\n/** The readable \"signed in\" hint cookie for one site. */\nexport function signedInHintCookieName(hostId: string): string {\n return `${SIGNED_IN_HINT_COOKIE_PREFIX}${siteCookieSuffix(hostId)}`\n}\n\n/**\n * The hint cookies to write (`set`) and to clear (`clear`) so that each site's\n * hint matches whether the request carries that site's member session.\n * Empty lists for the overwhelmingly common request: no session and no hint.\n */\nexport function signedInHintCorrections(\n cookies: Iterable<{ name: string; value: string }>,\n): { set: string[]; clear: string[] } {\n const sessions = new Set<string>()\n const hints = new Map<string, string>()\n for (const { name, value } of cookies) {\n if (name.startsWith(MEMBER_SESSION_COOKIE_PREFIX) && value) {\n sessions.add(name.slice(MEMBER_SESSION_COOKIE_PREFIX.length))\n } else if (name.startsWith(SIGNED_IN_HINT_COOKIE_PREFIX)) {\n hints.set(name.slice(SIGNED_IN_HINT_COOKIE_PREFIX.length), value)\n }\n }\n const set = [...sessions]\n .filter((suffix) => hints.get(suffix) !== '1')\n .map((suffix) => `${SIGNED_IN_HINT_COOKIE_PREFIX}${suffix}`)\n const clear = [...hints]\n .filter(([suffix, value]) => value && !sessions.has(suffix))\n .map(([suffix]) => `${SIGNED_IN_HINT_COOKIE_PREFIX}${suffix}`)\n return { set, clear }\n}\n"],"names":["MEMBER_SESSION_COOKIE_PREFIX","SIGNED_IN_HINT_COOKIE_PREFIX","SIGNED_IN_HINT_MAX_AGE_SECONDS","siteCookieSuffix","hostId","replace","memberSessionCookieName","signedInHintCookieName","signedInHintCorrections","cookies","sessions","Set","hints","Map","name","value","startsWith","add","slice","length","set","filter","suffix","get","map","clear","has"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GAED;;;;;;;;;;;;;;;;;CAiBC,GAED,8EAA8E,GAC9E,OAAO,MAAMA,+BAA+B,gBAAe;AAE3D,2FAA2F,GAC3F,OAAO,MAAMC,+BAA+B,mBAAkB;AAE9D,2EAA2E,GAC3E,OAAO,MAAMC,iCAAiC,KAAK,KAAK,KAAK,GAAE;AAE/D,gDAAgD,GAChD,OAAO,SAASC,iBAAiBC,MAAc;IAC7C,OAAOA,OAAOC,OAAO,CAAC,mBAAmB;AAC3C;AAEA,4CAA4C,GAC5C,OAAO,SAASC,wBAAwBF,MAAc;IACpD,OAAO,GAAGJ,+BAA+BG,iBAAiBC,SAAS;AACrE;AAEA,uDAAuD,GACvD,OAAO,SAASG,uBAAuBH,MAAc;IACnD,OAAO,GAAGH,+BAA+BE,iBAAiBC,SAAS;AACrE;AAEA;;;;CAIC,GACD,OAAO,SAASI,wBACdC,OAAkD;IAElD,MAAMC,WAAW,IAAIC;IACrB,MAAMC,QAAQ,IAAIC;IAClB,KAAK,MAAM,EAAEC,IAAI,EAAEC,KAAK,EAAE,IAAIN,QAAS;QACrC,IAAIK,KAAKE,UAAU,CAAChB,iCAAiCe,OAAO;YAC1DL,SAASO,GAAG,CAACH,KAAKI,KAAK,CAAClB,6BAA6BmB,MAAM;QAC7D,OAAO,IAAIL,KAAKE,UAAU,CAACf,+BAA+B;YACxDW,MAAMQ,GAAG,CAACN,KAAKI,KAAK,CAACjB,6BAA6BkB,MAAM,GAAGJ;QAC7D;IACF;IACA,MAAMK,MAAM;WAAIV;KAAS,CACtBW,MAAM,CAAC,CAACC,SAAWV,MAAMW,GAAG,CAACD,YAAY,KACzCE,GAAG,CAAC,CAACF,SAAW,GAAGrB,+BAA+BqB,QAAQ;IAC7D,MAAMG,QAAQ;WAAIb;KAAM,CACrBS,MAAM,CAAC,CAAC,CAACC,QAAQP,MAAM,GAAKA,SAAS,CAACL,SAASgB,GAAG,CAACJ,SACnDE,GAAG,CAAC,CAAC,CAACF,OAAO,GAAK,GAAGrB,+BAA+BqB,QAAQ;IAC/D,OAAO;QAAEF;QAAKK;IAAM;AACtB"}
@@ -0,0 +1,75 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2026 Aglyn LLC
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ import { NODE_SHOW_TO_PROP } from './reusable-component-keys';
18
+ /**
19
+ * SHOW AN ELEMENT TO SIGNED-IN OR SIGNED-OUT VISITORS (AGL-4231).
20
+ *
21
+ * A site with accounts wants "Sign in" in its header for visitors and
22
+ * "Account" for members, a "Join" banner only for people who have not, a
23
+ * "Welcome back" only for those who have. Any element can say which of the two
24
+ * it is for, with its `showTo` setting.
25
+ *
26
+ * A published page is ONE cached page for every visitor, so the server cannot
27
+ * decide this. The browser does, before the first paint, and nothing moves:
28
+ *
29
+ * - the renderer writes the setting onto the element as {@link SHOW_TO_ATTRIBUTE};
30
+ * - signing in sets a second, readable cookie beside the member session
31
+ * ({@link signedInHintCookieName}: a `1`, nothing more — the session itself
32
+ * stays HttpOnly);
33
+ * - a page that uses the setting carries a tiny inline script that marks
34
+ * `<html>` with {@link SIGNED_IN_ROOT_ATTRIBUTE} when that cookie is there, and
35
+ * a style rule that hides each element from the visitors it is not for.
36
+ *
37
+ * It decides what shows, never what anyone may see: the hint is a cookie any
38
+ * visitor can set. Content for members only belongs on a members-only page,
39
+ * and the Attributes panel says so.
40
+ */
41
+ export { NODE_SHOW_TO_PROP };
42
+ /** Shown to every visitor: the setting's "nothing chosen". */
43
+ export declare const SHOW_TO_EVERYONE = "everyone";
44
+ /** Shown only to a visitor signed in to the site's account. */
45
+ export declare const SHOW_TO_SIGNED_IN = "signedIn";
46
+ /** Shown only to a visitor who is not signed in. */
47
+ export declare const SHOW_TO_SIGNED_OUT = "signedOut";
48
+ export type ShowToAudience = typeof SHOW_TO_SIGNED_IN | typeof SHOW_TO_SIGNED_OUT;
49
+ /** The attribute the renderer writes on an element that is not for everyone. */
50
+ export declare const SHOW_TO_ATTRIBUTE = "data-aglyn-show-to";
51
+ /** The attribute on `<html>` while the visitor is signed in. */
52
+ export declare const SIGNED_IN_ROOT_ATTRIBUTE = "data-aglyn-signed-in";
53
+ export { MEMBER_SESSION_COOKIE_PREFIX, memberSessionCookieName, SIGNED_IN_HINT_COOKIE_PREFIX, SIGNED_IN_HINT_MAX_AGE_SECONDS, signedInHintCookieName, signedInHintCorrections, } from './sign-in-hint-cookie';
54
+ /** A stored `showTo` as one of the two audiences, or `undefined` for everyone. */
55
+ export declare function resolveShowTo(value: unknown): ShowToAudience | undefined;
56
+ /** Whether any element of a page is shown to one audience only. */
57
+ export declare function nodesUseShowTo(nodes: Record<string, unknown> | null | undefined): boolean;
58
+ /**
59
+ * The style a page that uses the setting carries. `!important` because an
60
+ * element's own `display` (a flex row, a grid) is an author's style and must
61
+ * not decide whether a signed-out visitor sees "Account".
62
+ */
63
+ export declare const SIGN_IN_VISIBILITY_STYLE: string;
64
+ /**
65
+ * The inline script, run before the first paint. A constant of ours: no
66
+ * author input reaches it. The cookie is any site's hint, because a page
67
+ * is only ever read with its own site's cookies.
68
+ */
69
+ export declare const SIGN_IN_VISIBILITY_SCRIPT: string;
70
+ /**
71
+ * Flips the page to signed in or out without a reload: called where a visitor
72
+ * signs in, signs up or signs out, and where the account page learns the
73
+ * session was gone all along. A no-op outside a browser.
74
+ */
75
+ export declare function markSignedIn(signedIn: boolean): void;
@@ -0,0 +1,79 @@
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 { NODE_SHOW_TO_PROP } from "./reusable-component-keys.js";
17
+ /**
18
+ * SHOW AN ELEMENT TO SIGNED-IN OR SIGNED-OUT VISITORS (AGL-4231).
19
+ *
20
+ * A site with accounts wants "Sign in" in its header for visitors and
21
+ * "Account" for members, a "Join" banner only for people who have not, a
22
+ * "Welcome back" only for those who have. Any element can say which of the two
23
+ * it is for, with its `showTo` setting.
24
+ *
25
+ * A published page is ONE cached page for every visitor, so the server cannot
26
+ * decide this. The browser does, before the first paint, and nothing moves:
27
+ *
28
+ * - the renderer writes the setting onto the element as {@link SHOW_TO_ATTRIBUTE};
29
+ * - signing in sets a second, readable cookie beside the member session
30
+ * ({@link signedInHintCookieName}: a `1`, nothing more — the session itself
31
+ * stays HttpOnly);
32
+ * - a page that uses the setting carries a tiny inline script that marks
33
+ * `<html>` with {@link SIGNED_IN_ROOT_ATTRIBUTE} when that cookie is there, and
34
+ * a style rule that hides each element from the visitors it is not for.
35
+ *
36
+ * It decides what shows, never what anyone may see: the hint is a cookie any
37
+ * visitor can set. Content for members only belongs on a members-only page,
38
+ * and the Attributes panel says so.
39
+ */ export { NODE_SHOW_TO_PROP };
40
+ /** Shown to every visitor: the setting's "nothing chosen". */ export const SHOW_TO_EVERYONE = 'everyone';
41
+ /** Shown only to a visitor signed in to the site's account. */ export const SHOW_TO_SIGNED_IN = 'signedIn';
42
+ /** Shown only to a visitor who is not signed in. */ export const SHOW_TO_SIGNED_OUT = 'signedOut';
43
+ /** The attribute the renderer writes on an element that is not for everyone. */ export const SHOW_TO_ATTRIBUTE = 'data-aglyn-show-to';
44
+ /** The attribute on `<html>` while the visitor is signed in. */ export const SIGNED_IN_ROOT_ATTRIBUTE = 'data-aglyn-signed-in';
45
+ // The cookie names, and the middleware's repair of a missing or stale hint,
46
+ // live in a module with no imports so the tenant middleware can take it whole.
47
+ export { MEMBER_SESSION_COOKIE_PREFIX, memberSessionCookieName, SIGNED_IN_HINT_COOKIE_PREFIX, SIGNED_IN_HINT_MAX_AGE_SECONDS, signedInHintCookieName, signedInHintCorrections } from "./sign-in-hint-cookie.js";
48
+ import { SIGNED_IN_HINT_COOKIE_PREFIX } from "./sign-in-hint-cookie.js";
49
+ /** A stored `showTo` as one of the two audiences, or `undefined` for everyone. */ export function resolveShowTo(value) {
50
+ return value === SHOW_TO_SIGNED_IN || value === SHOW_TO_SIGNED_OUT ? value : undefined;
51
+ }
52
+ /** Whether any element of a page is shown to one audience only. */ export function nodesUseShowTo(nodes) {
53
+ for (const node of Object.values(nodes != null ? nodes : {})){
54
+ const props = node == null ? void 0 : node.props;
55
+ if (props && resolveShowTo(props[NODE_SHOW_TO_PROP])) return true;
56
+ }
57
+ return false;
58
+ }
59
+ /**
60
+ * The style a page that uses the setting carries. `!important` because an
61
+ * element's own `display` (a flex row, a grid) is an author's style and must
62
+ * not decide whether a signed-out visitor sees "Account".
63
+ */ export const SIGN_IN_VISIBILITY_STYLE = `html:not([${SIGNED_IN_ROOT_ATTRIBUTE}]) [${SHOW_TO_ATTRIBUTE}="${SHOW_TO_SIGNED_IN}"]{display:none!important}` + `html[${SIGNED_IN_ROOT_ATTRIBUTE}] [${SHOW_TO_ATTRIBUTE}="${SHOW_TO_SIGNED_OUT}"]{display:none!important}`;
64
+ /**
65
+ * The inline script, run before the first paint. A constant of ours: no
66
+ * author input reaches it. The cookie is any site's hint, because a page
67
+ * is only ever read with its own site's cookies.
68
+ */ export const SIGN_IN_VISIBILITY_SCRIPT = `try{if(/(?:^|;\\s*)${SIGNED_IN_HINT_COOKIE_PREFIX}[A-Za-z0-9_-]+=1(?:;|$)/.test(document.cookie))` + `document.documentElement.setAttribute('${SIGNED_IN_ROOT_ATTRIBUTE}','')}catch(e){}`;
69
+ /**
70
+ * Flips the page to signed in or out without a reload: called where a visitor
71
+ * signs in, signs up or signs out, and where the account page learns the
72
+ * session was gone all along. A no-op outside a browser.
73
+ */ export function markSignedIn(signedIn) {
74
+ if (typeof document === 'undefined') return;
75
+ if (signedIn) document.documentElement.setAttribute(SIGNED_IN_ROOT_ATTRIBUTE, '');
76
+ else document.documentElement.removeAttribute(SIGNED_IN_ROOT_ATTRIBUTE);
77
+ }
78
+
79
+ //# sourceMappingURL=sign-in-visibility.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../libs/aglyn/src/lib/app-utils/sign-in-visibility.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 { NODE_SHOW_TO_PROP } from './reusable-component-keys'\n\n/**\n * SHOW AN ELEMENT TO SIGNED-IN OR SIGNED-OUT VISITORS (AGL-4231).\n *\n * A site with accounts wants \"Sign in\" in its header for visitors and\n * \"Account\" for members, a \"Join\" banner only for people who have not, a\n * \"Welcome back\" only for those who have. Any element can say which of the two\n * it is for, with its `showTo` setting.\n *\n * A published page is ONE cached page for every visitor, so the server cannot\n * decide this. The browser does, before the first paint, and nothing moves:\n *\n * - the renderer writes the setting onto the element as {@link SHOW_TO_ATTRIBUTE};\n * - signing in sets a second, readable cookie beside the member session\n * ({@link signedInHintCookieName}: a `1`, nothing more — the session itself\n * stays HttpOnly);\n * - a page that uses the setting carries a tiny inline script that marks\n * `<html>` with {@link SIGNED_IN_ROOT_ATTRIBUTE} when that cookie is there, and\n * a style rule that hides each element from the visitors it is not for.\n *\n * It decides what shows, never what anyone may see: the hint is a cookie any\n * visitor can set. Content for members only belongs on a members-only page,\n * and the Attributes panel says so.\n */\n\nexport { NODE_SHOW_TO_PROP }\n\n/** Shown to every visitor: the setting's \"nothing chosen\". */\nexport const SHOW_TO_EVERYONE = 'everyone'\n/** Shown only to a visitor signed in to the site's account. */\nexport const SHOW_TO_SIGNED_IN = 'signedIn'\n/** Shown only to a visitor who is not signed in. */\nexport const SHOW_TO_SIGNED_OUT = 'signedOut'\n\nexport type ShowToAudience = typeof SHOW_TO_SIGNED_IN | typeof SHOW_TO_SIGNED_OUT\n\n/** The attribute the renderer writes on an element that is not for everyone. */\nexport const SHOW_TO_ATTRIBUTE = 'data-aglyn-show-to'\n\n/** The attribute on `<html>` while the visitor is signed in. */\nexport const SIGNED_IN_ROOT_ATTRIBUTE = 'data-aglyn-signed-in'\n\n// The cookie names, and the middleware's repair of a missing or stale hint,\n// live in a module with no imports so the tenant middleware can take it whole.\nexport {\n MEMBER_SESSION_COOKIE_PREFIX,\n memberSessionCookieName,\n SIGNED_IN_HINT_COOKIE_PREFIX,\n SIGNED_IN_HINT_MAX_AGE_SECONDS,\n signedInHintCookieName,\n signedInHintCorrections,\n} from './sign-in-hint-cookie'\nimport { SIGNED_IN_HINT_COOKIE_PREFIX } from './sign-in-hint-cookie'\n\n/** A stored `showTo` as one of the two audiences, or `undefined` for everyone. */\nexport function resolveShowTo(value: unknown): ShowToAudience | undefined {\n return value === SHOW_TO_SIGNED_IN || value === SHOW_TO_SIGNED_OUT ? value : undefined\n}\n\n/** Whether any element of a page is shown to one audience only. */\nexport function nodesUseShowTo(nodes: Record<string, unknown> | null | undefined): boolean {\n for (const node of Object.values(nodes ?? {})) {\n const props = (node as { props?: Record<string, unknown> } | null)?.props\n if (props && resolveShowTo(props[NODE_SHOW_TO_PROP])) return true\n }\n return false\n}\n\n/**\n * The style a page that uses the setting carries. `!important` because an\n * element's own `display` (a flex row, a grid) is an author's style and must\n * not decide whether a signed-out visitor sees \"Account\".\n */\nexport const SIGN_IN_VISIBILITY_STYLE =\n `html:not([${SIGNED_IN_ROOT_ATTRIBUTE}]) [${SHOW_TO_ATTRIBUTE}=\"${SHOW_TO_SIGNED_IN}\"]{display:none!important}` +\n `html[${SIGNED_IN_ROOT_ATTRIBUTE}] [${SHOW_TO_ATTRIBUTE}=\"${SHOW_TO_SIGNED_OUT}\"]{display:none!important}`\n\n/**\n * The inline script, run before the first paint. A constant of ours: no\n * author input reaches it. The cookie is any site's hint, because a page\n * is only ever read with its own site's cookies.\n */\nexport const SIGN_IN_VISIBILITY_SCRIPT =\n `try{if(/(?:^|;\\\\s*)${SIGNED_IN_HINT_COOKIE_PREFIX}[A-Za-z0-9_-]+=1(?:;|$)/.test(document.cookie))` +\n `document.documentElement.setAttribute('${SIGNED_IN_ROOT_ATTRIBUTE}','')}catch(e){}`\n\n/**\n * Flips the page to signed in or out without a reload: called where a visitor\n * signs in, signs up or signs out, and where the account page learns the\n * session was gone all along. A no-op outside a browser.\n */\nexport function markSignedIn(signedIn: boolean): void {\n if (typeof document === 'undefined') return\n if (signedIn) document.documentElement.setAttribute(SIGNED_IN_ROOT_ATTRIBUTE, '')\n else document.documentElement.removeAttribute(SIGNED_IN_ROOT_ATTRIBUTE)\n}\n"],"names":["NODE_SHOW_TO_PROP","SHOW_TO_EVERYONE","SHOW_TO_SIGNED_IN","SHOW_TO_SIGNED_OUT","SHOW_TO_ATTRIBUTE","SIGNED_IN_ROOT_ATTRIBUTE","MEMBER_SESSION_COOKIE_PREFIX","memberSessionCookieName","SIGNED_IN_HINT_COOKIE_PREFIX","SIGNED_IN_HINT_MAX_AGE_SECONDS","signedInHintCookieName","signedInHintCorrections","resolveShowTo","value","undefined","nodesUseShowTo","nodes","node","Object","values","props","SIGN_IN_VISIBILITY_STYLE","SIGN_IN_VISIBILITY_SCRIPT","markSignedIn","signedIn","document","documentElement","setAttribute","removeAttribute"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GAED,SAASA,iBAAiB,QAAQ,+BAA2B;AAE7D;;;;;;;;;;;;;;;;;;;;;;CAsBC,GAED,SAASA,iBAAiB,GAAE;AAE5B,4DAA4D,GAC5D,OAAO,MAAMC,mBAAmB,WAAU;AAC1C,6DAA6D,GAC7D,OAAO,MAAMC,oBAAoB,WAAU;AAC3C,kDAAkD,GAClD,OAAO,MAAMC,qBAAqB,YAAW;AAI7C,8EAA8E,GAC9E,OAAO,MAAMC,oBAAoB,qBAAoB;AAErD,8DAA8D,GAC9D,OAAO,MAAMC,2BAA2B,uBAAsB;AAE9D,4EAA4E;AAC5E,+EAA+E;AAC/E,SACEC,4BAA4B,EAC5BC,uBAAuB,EACvBC,4BAA4B,EAC5BC,8BAA8B,EAC9BC,sBAAsB,EACtBC,uBAAuB,QAClB,2BAAuB;AAC9B,SAASH,4BAA4B,QAAQ,2BAAuB;AAEpE,gFAAgF,GAChF,OAAO,SAASI,cAAcC,KAAc;IAC1C,OAAOA,UAAUX,qBAAqBW,UAAUV,qBAAqBU,QAAQC;AAC/E;AAEA,iEAAiE,GACjE,OAAO,SAASC,eAAeC,KAAiD;IAC9E,KAAK,MAAMC,QAAQC,OAAOC,MAAM,CAACH,gBAAAA,QAAS,CAAC,GAAI;QAC7C,MAAMI,QAASH,wBAAD,AAACA,KAAqDG,KAAK;QACzE,IAAIA,SAASR,cAAcQ,KAAK,CAACpB,kBAAkB,GAAG,OAAO;IAC/D;IACA,OAAO;AACT;AAEA;;;;CAIC,GACD,OAAO,MAAMqB,2BACX,CAAC,UAAU,EAAEhB,yBAAyB,IAAI,EAAED,kBAAkB,EAAE,EAAEF,kBAAkB,0BAA0B,CAAC,GAC/G,CAAC,KAAK,EAAEG,yBAAyB,GAAG,EAAED,kBAAkB,EAAE,EAAED,mBAAmB,0BAA0B,CAAC,CAAA;AAE5G;;;;CAIC,GACD,OAAO,MAAMmB,4BACX,CAAC,mBAAmB,EAAEd,6BAA6B,+CAA+C,CAAC,GACnG,CAAC,uCAAuC,EAAEH,yBAAyB,gBAAgB,CAAC,CAAA;AAEtF;;;;CAIC,GACD,OAAO,SAASkB,aAAaC,QAAiB;IAC5C,IAAI,OAAOC,aAAa,aAAa;IACrC,IAAID,UAAUC,SAASC,eAAe,CAACC,YAAY,CAACtB,0BAA0B;SACzEoB,SAASC,eAAe,CAACE,eAAe,CAACvB;AAChD"}
@@ -14,7 +14,10 @@
14
14
  * See the License for the specific language governing permissions and
15
15
  * limitations under the License.
16
16
  */
17
- /** True for `localhost` and `*.localhost`, which have a local tenant to use. */
17
+ /**
18
+ * True for `localhost`, `*.localhost` and the loopback addresses, which have
19
+ * a local tenant to use.
20
+ */
18
21
  export declare function isLocalConsole(hostname: string): boolean;
19
22
  export declare function isPreviewConsole(hostname: string): boolean;
20
23
  /** The live URL for a site-relative slug on this host's real origin. */
@@ -32,11 +32,25 @@ const TENANT_PREVIEW_HOST = process.env.NEXT_PUBLIC_AGLYN_TENANT_PREVIEW_HOST ||
32
32
  * normal state of the work you are doing on localhost. `nx serve tenant`
33
33
  * listens on 4500; override for a different port.
34
34
  */ const TENANT_LOCAL_ORIGIN = process.env.NEXT_PUBLIC_AGLYN_TENANT_LOCAL_ORIGIN || 'http://localhost:4500';
35
- /** True for `localhost` and `*.localhost`, which have a local tenant to use. */ export function isLocalConsole(hostname) {
36
- return hostname === 'localhost' || hostname.endsWith('.localhost');
35
+ /**
36
+ * Loopback addresses a console is reached at on a developer's machine, which
37
+ * are never a deployment: the IPv4 and IPv6 loopbacks, and `10.0.2.2`, the
38
+ * address the Android emulator gives the machine it runs on, which is how the
39
+ * Android app on a local stack reaches the local console.
40
+ */ const LOCAL_CONSOLE_ADDRESSES = new Set([
41
+ '127.0.0.1',
42
+ '::1',
43
+ '[::1]',
44
+ '10.0.2.2'
45
+ ]);
46
+ /**
47
+ * True for `localhost`, `*.localhost` and the loopback addresses, which have
48
+ * a local tenant to use.
49
+ */ export function isLocalConsole(hostname) {
50
+ return hostname === 'localhost' || hostname.endsWith('.localhost') || LOCAL_CONSOLE_ADDRESSES.has(hostname);
37
51
  }
38
52
  export function isPreviewConsole(hostname) {
39
- return hostname.endsWith('.vercel.app') || hostname === 'localhost' || hostname.endsWith('.localhost');
53
+ return hostname.endsWith('.vercel.app') || isLocalConsole(hostname);
40
54
  }
41
55
  /** The live URL for a site-relative slug on this host's real origin. */ export function siteLiveUrlForSlug(host, slug, consoleHostname = typeof window !== 'undefined' ? window.location.hostname : undefined) {
42
56
  if (!host) return undefined;