@the-portland-company/shell 0.85.0 → 0.87.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/native.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- export { BETA_BANNER_DISMISS_KEY, CAMPAIGN_FEATURE_AVAILABILITY, NavAppShell, NavBetaBanner, NavSidebar, NavTabStrip, NavTopBar, clearBetaBannerDismissal, envChipClasses, isNavItemActive, modeIdFromLabel, shortEnvLabel, shortUserName, standardPolitogyNav } from './chunk-OOVS5D2K.js';
2
+ export { BETA_BANNER_DISMISS_KEY, CAMPAIGN_FEATURE_AVAILABILITY, NavAppShell, NavBetaBanner, NavSidebar, NavTabStrip, NavTopBar, clearBetaBannerDismissal, envChipClasses, isNavItemActive, modeIdFromLabel, shortEnvLabel, shortUserName, standardPolitogyNav } from './chunk-3JOLELB4.js';
3
3
  export { CORE_APP_ORIGIN, CORE_BILLING_PATH, CREDIT_TYPE_LABELS, CREDIT_TYPE_ORDER, CreditsAction, FormColumn, FuelAction, NavChromeProvider, NavDisplayAction, NavThemeControl, NotificationsAction, SPECS_ORIGIN, SpecOverlayAction, SupportAction, TopBarCountBadge, TopBarPanelArrow, TopBarPopover, TopBarTooltip, TopBarWidgetSlot, creditGaugeRatio, creditStateWord, creditTooltipLine, creditsAriaLabel, creditsIconState, resolveOrgLogoUrl, topBarIconButtonClass, useChromeMe, useChromeOrgs, useNavChromeDedupedFetch, useNavChromeFetcher, useThemePreference } from './chunk-PRZP2SB6.js';
4
4
  import './chunk-BHRVZPZ7.js';
5
5
  import './chunk-7YVJ7HQG.js';
package/dist/url-state.js CHANGED
@@ -1,92 +1,4 @@
1
- import { orgIdTail } from './chunk-5LO5W7W5.js';
2
-
3
- // src/url-state.ts
4
- var URL_STATE_MODES = ["relationship", "campaign", "petition"];
5
- var URL_STATE_KEYS = ["mode", "page", "tab", "section", "org_id"];
6
- function slugify(label) {
7
- return label.normalize("NFKD").replace(/[̀-ͯ]/g, "").replace(/['’]/g, "").toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "");
8
- }
9
- var SLUG_RE = /^[a-z0-9]+(?:-[a-z0-9]+)*$/;
10
- function isUrlStateMode(v) {
11
- return typeof v === "string" && URL_STATE_MODES.includes(v);
12
- }
13
- function searchOf(input) {
14
- if (input instanceof URLSearchParams) return new URLSearchParams(input);
15
- if (!input) return new URLSearchParams();
16
- const s = input.includes("?") ? input.slice(input.indexOf("?") + 1) : input;
17
- return new URLSearchParams(s);
18
- }
19
- var slugOrNull = (v) => v && SLUG_RE.test(v) ? v : null;
20
- function shortOrgId(v) {
21
- if (!v) return null;
22
- const tail = orgIdTail(v);
23
- if (tail) return tail;
24
- const t = String(v).trim().toLowerCase();
25
- return /^[0-9a-f]{6,7}$/.test(t) ? t : null;
26
- }
27
- function readUrlState(input) {
28
- const params = searchOf(input);
29
- const mode = params.get("mode");
30
- const orgRaw = params.get("org_id");
31
- const feature = new URLSearchParams();
32
- for (const [k, v] of params) if (!URL_STATE_KEYS.includes(k)) feature.append(k, v);
33
- return {
34
- mode: isUrlStateMode(mode) ? mode : null,
35
- page: slugOrNull(params.get("page")),
36
- tab: slugOrNull(params.get("tab")),
37
- section: slugOrNull(params.get("section")),
38
- org_id: shortOrgId(orgRaw),
39
- feature
40
- };
41
- }
42
- function buildSearch(state) {
43
- const out = new URLSearchParams();
44
- for (const key of URL_STATE_KEYS) {
45
- const v = state[key];
46
- if (v) out.set(key, v);
47
- }
48
- for (const [k, v] of state.feature) out.append(k, v);
49
- const s = out.toString();
50
- return s ? `?${s}` : "";
51
- }
52
- function writeUrlState(current, patch) {
53
- const state = readUrlState(current);
54
- if (patch.mode !== void 0) state.mode = patch.mode;
55
- if (patch.page !== void 0) state.page = patch.page;
56
- if (patch.tab !== void 0) state.tab = patch.tab;
57
- if (patch.section !== void 0) state.section = patch.section;
58
- if (patch.org_id !== void 0) state.org_id = shortOrgId(patch.org_id);
59
- if (patch.feature) {
60
- for (const [k, v] of Object.entries(patch.feature)) {
61
- if (URL_STATE_KEYS.includes(k)) continue;
62
- if (v === null) state.feature.delete(k);
63
- else state.feature.set(k, v);
64
- }
65
- }
66
- return buildSearch(state);
67
- }
68
- function normalizeUrlState(current, defaults) {
69
- const before = searchOf(current).toString();
70
- const state = readUrlState(current);
71
- if (!state.page) state.page = defaults.page;
72
- if (!state.mode && defaults.mode) state.mode = defaults.mode;
73
- if (defaults.tabs && defaults.tabs.length > 0) {
74
- if (!state.tab || !defaults.tabs.includes(state.tab)) state.tab = defaults.tabs[0];
75
- } else {
76
- state.tab = null;
77
- }
78
- const sectionsFor = defaults.sections?.[state.tab ?? ""] ?? (state.tab ? void 0 : defaults.sections?.[""]);
79
- if (sectionsFor && sectionsFor.length > 0) {
80
- if (!state.section || !sectionsFor.includes(state.section)) state.section = sectionsFor[0];
81
- }
82
- if (!state.org_id && defaults.org_id) state.org_id = shortOrgId(defaults.org_id);
83
- const search = buildSearch(state);
84
- return { state, search, changed: search.replace(/^\?/, "") !== before };
85
- }
86
- function historyMode(prev, next) {
87
- return prev.mode !== next.mode || prev.org_id !== next.org_id || prev.page !== next.page || prev.tab !== next.tab ? "push" : "replace";
88
- }
89
-
90
- export { URL_STATE_KEYS, URL_STATE_MODES, buildSearch, historyMode, isUrlStateMode, normalizeUrlState, readUrlState, slugify, writeUrlState };
1
+ export { URL_STATE_KEYS, URL_STATE_MODES, buildSearch, historyMode, isUrlStateMode, normalizeUrlState, readUrlState, slugify, writeUrlState } from './chunk-GVQKZI5X.js';
2
+ import './chunk-5LO5W7W5.js';
91
3
  //# sourceMappingURL=url-state.js.map
92
4
  //# sourceMappingURL=url-state.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/url-state.ts"],"names":[],"mappings":";;;AAcO,IAAM,eAAA,GAAkB,CAAC,cAAA,EAAgB,UAAA,EAAY,UAAU;AAI/D,IAAM,iBAAiB,CAAC,MAAA,EAAQ,MAAA,EAAQ,KAA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MAAA,EAAO;AACxE;AAOO,SAAS,WAAA,CAAY,MAAgB,IAAA,EAAoC;AAC9E,EAAA,OAAO,KAAK,IAAA,KAAS,IAAA,CAAK,IAAA,IAAQ,IAAA,CAAK,WAAW,IAAA,CAAK,MAAA,IAAU,IAAA,CAAK,IAAA,KAAS,KAAK,IAAA,IAAQ,IAAA,CAAK,GAAA,KAAQ,IAAA,CAAK,MAAM,MAAA,GAAS,SAAA;AAC/H","file":"url-state.js","sourcesContent":["// URL state (Reference/UI-Platform → \"URL state\", decided 2026-10-06; Global\n// Rules → URL State). Every app that renders shell Navigation carries its view\n// state in five query parameters, in this order, then its own feature\n// parameters:\n//\n// ?mode=<mode>&page=<page>&tab=<tab>&section=<section>&org_id=<7-char org tail>[&feature…]\n//\n// The path carries no view state. This module is the ONE writer of those five\n// parameters: apps read and write them through it and never concatenate them\n// by hand. It is pure (no window, no router) so it runs on the server, in\n// middleware and in the client the same way; the app passes the result to its\n// router (`router.push` / `router.replace`) according to `historyMode`.\nimport { orgIdTail } from './active-org'\n\nexport const URL_STATE_MODES = ['relationship', 'campaign', 'petition'] as const\nexport type UrlStateMode = (typeof URL_STATE_MODES)[number]\n\n/** The five base parameters, in the order the spec fixes. */\nexport const URL_STATE_KEYS = ['mode', 'page', 'tab', 'section', 'org_id'] as const\nexport type UrlStateKey = (typeof URL_STATE_KEYS)[number]\n\nexport type UrlState = {\n mode: UrlStateMode | null\n page: string | null\n tab: string | null\n section: string | null\n /** The short org id (last 7 characters, lowercase) as it appears in the URL. */\n org_id: string | null\n /** Every other parameter (pagination, filters, record ids), in their own order. */\n feature: URLSearchParams\n}\n\n/** Lowercase kebab-case of a label, the spec's default slug (\"Tech Check\" → tech-check, \"This week's stats\" → this-weeks-stats). */\nexport function slugify(label: string): string {\n return label\n .normalize('NFKD')\n .replace(/[̀-ͯ]/g, '')\n .replace(/['’]/g, '')\n .toLowerCase()\n .replace(/[^a-z0-9]+/g, '-')\n .replace(/^-+|-+$/g, '')\n}\n\nconst SLUG_RE = /^[a-z0-9]+(?:-[a-z0-9]+)*$/\n\nexport function isUrlStateMode(v: unknown): v is UrlStateMode {\n return typeof v === 'string' && (URL_STATE_MODES as readonly string[]).includes(v)\n}\n\nfunction searchOf(input: string | URLSearchParams | null | undefined): URLSearchParams {\n if (input instanceof URLSearchParams) return new URLSearchParams(input)\n if (!input) return new URLSearchParams()\n const s = input.includes('?') ? input.slice(input.indexOf('?') + 1) : input\n return new URLSearchParams(s)\n}\n\nconst slugOrNull = (v: string | null): string | null => (v && SLUG_RE.test(v) ? v : null)\n\n/** A full org uuid becomes its 7-character tail; a tail (6–7 hex chars) is kept lowercase; anything else is dropped. */\nfunction shortOrgId(v: string | null | undefined): string | null {\n if (!v) return null\n const tail = orgIdTail(v)\n if (tail) return tail\n const t = String(v).trim().toLowerCase()\n return /^[0-9a-f]{6,7}$/.test(t) ? t : null\n}\n\n/** Reads the five parameters out of a search string, URL or URLSearchParams; the rest stays in `feature`. */\nexport function readUrlState(input: string | URLSearchParams | null | undefined): UrlState {\n const params = searchOf(input)\n const mode = params.get('mode')\n const orgRaw = params.get('org_id')\n const feature = new URLSearchParams()\n for (const [k, v] of params) if (!(URL_STATE_KEYS as readonly string[]).includes(k)) feature.append(k, v)\n return {\n mode: isUrlStateMode(mode) ? mode : null,\n page: slugOrNull(params.get('page')),\n tab: slugOrNull(params.get('tab')),\n section: slugOrNull(params.get('section')),\n org_id: shortOrgId(orgRaw),\n feature,\n }\n}\n\n/** Serializes a state back to a search string: the five parameters first, in order, then the feature parameters. */\nexport function buildSearch(state: UrlState): string {\n const out = new URLSearchParams()\n for (const key of URL_STATE_KEYS) {\n const v = state[key]\n if (v) out.set(key, v)\n }\n for (const [k, v] of state.feature) out.append(k, v)\n const s = out.toString()\n return s ? `?${s}` : ''\n}\n\nexport type UrlStatePatch = Partial<Omit<UrlState, 'feature' | 'org_id'>> & {\n /** A full org uuid or a short id; written as the 7-character tail. */\n org_id?: string | null\n /** Feature parameters to set (null removes one). */\n feature?: Record<string, string | null>\n}\n\n/** Applies a change to the state carried in `current` and returns the new search string. */\nexport function writeUrlState(current: string | URLSearchParams | null | undefined, patch: UrlStatePatch): string {\n const state = readUrlState(current)\n if (patch.mode !== undefined) state.mode = patch.mode\n if (patch.page !== undefined) state.page = patch.page\n if (patch.tab !== undefined) state.tab = patch.tab\n if (patch.section !== undefined) state.section = patch.section\n if (patch.org_id !== undefined) state.org_id = shortOrgId(patch.org_id)\n if (patch.feature) {\n for (const [k, v] of Object.entries(patch.feature)) {\n if ((URL_STATE_KEYS as readonly string[]).includes(k)) continue // never through the back door\n if (v === null) state.feature.delete(k)\n else state.feature.set(k, v)\n }\n }\n return buildSearch(state)\n}\n\nexport type UrlStateDefaults = {\n /** The page's registry slug; always present (UI-Platform: \"Decides the active left-bar row\"). */\n page: string\n mode?: UrlStateMode | null\n /** The page's tabs in order; the first is the default. Omit for a page with no tab strip. */\n tabs?: readonly string[]\n /** Each tab's (or the untabbed page's, under the key \"\") sections in order; the first is the default. */\n sections?: Readonly<Record<string, readonly string[]>>\n /** Full org uuid or short id of the current organization. */\n org_id?: string | null\n}\n\nexport type Normalized = { state: UrlState; search: string; changed: boolean }\n\n/**\n * Fills a missing parameter from the defaults and corrects an unknown `tab` or\n * `section` to the default (\"filled or corrected by the shell with a replace,\n * never an error page\"). `changed` says whether the URL needs rewriting.\n */\nexport function normalizeUrlState(current: string | URLSearchParams | null | undefined, defaults: UrlStateDefaults): Normalized {\n const before = searchOf(current).toString()\n const state = readUrlState(current)\n if (!state.page) state.page = defaults.page\n if (!state.mode && defaults.mode) state.mode = defaults.mode\n if (defaults.tabs && defaults.tabs.length > 0) {\n if (!state.tab || !defaults.tabs.includes(state.tab)) state.tab = defaults.tabs[0]!\n } else {\n state.tab = null\n }\n const sectionsFor = defaults.sections?.[state.tab ?? ''] ?? (state.tab ? undefined : defaults.sections?.[''])\n if (sectionsFor && sectionsFor.length > 0) {\n if (!state.section || !sectionsFor.includes(state.section)) state.section = sectionsFor[0]!\n }\n if (!state.org_id && defaults.org_id) state.org_id = shortOrgId(defaults.org_id)\n const search = buildSearch(state)\n return { state, search, changed: search.replace(/^\\?/, '') !== before }\n}\n\n/**\n * Which history action a change needs: `mode`, `org_id`, `page` and `tab`\n * changes add an entry (Back and Forward work); a `section`-only change, or a\n * normalization, replaces the current one.\n */\nexport function historyMode(prev: UrlState, next: UrlState): 'push' | 'replace' {\n return prev.mode !== next.mode || prev.org_id !== next.org_id || prev.page !== next.page || prev.tab !== next.tab ? 'push' : 'replace'\n}\n"]}
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"url-state.js"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@the-portland-company/shell",
3
- "version": "0.85.0",
3
+ "version": "0.87.1",
4
4
  "description": "Shared chrome (header, sidebar, footer, theme, auth) for politogy apps. Drop into any Vite SPA to inherit the politogy look and signed-in user.",
5
5
  "license": "UNLICENSED",
6
6
  "private": false,