@alfakit/core 0.2.0 → 0.2.2

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @alfakit/core
2
2
 
3
+ ## 0.2.2
4
+
5
+ ### Patch Changes
6
+
7
+ - Starter-kit document direction (`alfakitDocument`, starter-kit-document helpers), `isolationDirection()` for numbers and money in RTL, container-based `contentGridClasses()`, and the reload of a page restored by Back is cancelled on the next Back or Forward.
8
+
3
9
  ## 0.2.0
4
10
 
5
11
  ### Minor Changes
package/dist/i18n.d.ts CHANGED
@@ -97,5 +97,14 @@ export declare function showsLanguageSwitcher(localization: Pick<LocalizationSch
97
97
  export declare function collapsesLanguageSwitcher(localization: Pick<LocalizationSchema, 'switcher' | 'switcherPosition' | 'locales'> | null | undefined, hasUserMenu: boolean): boolean;
98
98
  /** Switch the panel language and reload the current page in it. */
99
99
  export declare function switchLocale(endpoint: string, locale: string): void;
100
+ /**
101
+ * The `dir` for a `<bdi>` around a display value: `auto` (the value's first strong letter
102
+ * decides) when it has right-to-left letters, else `ltr`. Numbers and money formatted for a
103
+ * right-to-left locale start with an invisible right-to-left mark (`‏0.00 US$` in Arabic),
104
+ * which `auto` reads as right to left and reorders into `$US 0.00`; without right-to-left
105
+ * letters the value is laid out as written. Values with them (`٠٫٠٠٠ د.ب.‏`, Arabic
106
+ * text) keep their own direction.
107
+ */
108
+ export declare function isolationDirection(value: unknown): 'ltr' | 'auto';
100
109
  //#endregion
101
110
  //# sourceMappingURL=i18n.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"i18n.d.ts","names":[],"sources":["../src/i18n.ts"],"mappings":";;KASK,eAAe;;;;;qBAMP;UAID;UACA;UAJF;EAGE,YAAA,eAAc,yBACd;EAGV,gBAAgB,cAAc;;EAK9B,UAAU;EAOV;EAIA,IAAI;;EAKJ,EAAE,aAAa,eAAc,cAAmB;;;;;;;EAahD,OAAO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AAQ,eAAe;EAIvB,MAAM,gBAAgB,mBAA8B,UAAS;;EAU7D,KACE,OAAO,wBACP,UAAS,KAAK;EAWhB,SAAS,OAAO;;EAKhB,SAAS,OAAO,wBAAwB,MAAK;EAyB7C,KAAK,iBAAiB,OAAM,KAAK;;EAKjC,gBAAgB;IACd;IACA;IACA;;;EAeF;IAAgB;IAAiB;;;;;;;;EAejC,YAAY;;;wBAuCE,iBAAiB;;wBAmBjB,cAAc;;;;;wBAiBd,cAAc,MAAM,MAAM,gBAAgB;;wBA0D1C,oBACd,cAAc,KAAK;;;;;wBAgBL,sBACd,cACE,KAAK,qFACP;;;;;;;wBAqBc,0BACd,cACE,KAAK,qFACP;;wBAMc,aAAa,kBAAkB;;;;;;;;;wBAqB/B,mBAAmB"}
package/dist/i18n.js CHANGED
@@ -351,7 +351,20 @@ function switchLocale(endpoint, locale) {
351
351
  preserveState: false
352
352
  });
353
353
  }
354
+ /** A letter of a script written right to left (not its digits or separators). */
355
+ const RTL_LETTER = /(?=\p{L})(?:\p{Script=Arabic}|\p{Script=Hebrew}|\p{Script=Syriac}|\p{Script=Thaana}|\p{Script=Nko}|\p{Script=Adlam}|\p{Script=Samaritan}|\p{Script=Mandaic}|\p{Script=Hanifi_Rohingya}|\p{Script=Yezidi}|\p{Script=Mende_Kikakui})/u;
356
+ /**
357
+ * The `dir` for a `<bdi>` around a display value: `auto` (the value's first strong letter
358
+ * decides) when it has right-to-left letters, else `ltr`. Numbers and money formatted for a
359
+ * right-to-left locale start with an invisible right-to-left mark (`‏0.00 US$` in Arabic),
360
+ * which `auto` reads as right to left and reorders into `$US 0.00`; without right-to-left
361
+ * letters the value is laid out as written. Values with them (`٠٫٠٠٠ د.ب.‏`, Arabic
362
+ * text) keep their own direction.
363
+ */
364
+ function isolationDirection(value) {
365
+ return typeof value === "string" && RTL_LETTER.test(value) ? "auto" : "ltr";
366
+ }
354
367
  //#endregion
355
- export { LocaleFormatter, Translator, applyDocumentLocale, collapsesLanguageSwitcher, currencyDecimals, formatPhpDate, selectPlural, showsLanguageSwitcher, switchLocale, t, toAsciiDigits, translator };
368
+ export { LocaleFormatter, Translator, applyDocumentLocale, collapsesLanguageSwitcher, currencyDecimals, formatPhpDate, isolationDirection, selectPlural, showsLanguageSwitcher, switchLocale, t, toAsciiDigits, translator };
356
369
 
357
370
  //# sourceMappingURL=i18n.js.map
package/dist/i18n.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"i18n.js","names":[],"sources":["../src/i18n.ts"],"sourcesContent":["import { router } from '@inertiajs/core'\nimport { lazyComponentCache } from './lazy'\nimport type { LocalizationSchema } from './schema/panel'\nimport { interpolate } from './utils/format'\nimport { getPath } from './utils/path'\n\n/** CLDR plural categories in the order Laravel language files list their forms. */\nconst PLURAL_ORDER: Intl.LDMLPluralRule[] = ['zero', 'one', 'two', 'few', 'many', 'other']\n\ntype Replacements = Record<string, string | number>\n\n/**\n * Translator over the `translations` prop (Laravel's `alfakit::ui` group plus any groups\n * the panel adds with `frontendTranslations()`).\n */\nexport class Translator {\n private pluralRules: Intl.PluralRules | null = null\n\n constructor(\n private translations: Record<string, unknown> = {},\n private locale = 'en',\n ) {}\n\n setTranslations(translations: Record<string, unknown>): void {\n this.translations = translations\n }\n\n /** BCP 47 tag used for plural rules. */\n setLocale(locale: string): void {\n if (locale !== this.locale) {\n this.locale = locale\n this.pluralRules = null\n }\n }\n\n getLocale(): string {\n return this.locale\n }\n\n has(key: string): boolean {\n return typeof getPath<unknown>(this.translations, key) === 'string'\n }\n\n /** `t('table.showing', { first: 1, last: 10, total: 42 })` */\n t(key: string, replacements: Replacements = {}, fallback?: string): string {\n const value = getPath<unknown>(this.translations, key)\n const template = typeof value === 'string' ? value : (fallback ?? key)\n\n return interpolate(template, replacements)\n }\n\n /**\n * Pluralised line, compatible with Laravel's `trans_choice()` syntax:\n * `'{0} No items|{1} One item|[2,*] :count items'` or `'one item|:count items'`.\n * Forms without explicit ranges follow CLDR plural rules for the current locale, in the\n * order zero, one, two, few, many, other (as Laravel language files list them).\n */\n choice(key: string, count: number, replacements: Replacements = {}, fallback?: string): string {\n const value = getPath<unknown>(this.translations, key)\n const line = typeof value === 'string' ? value : (fallback ?? key)\n\n return interpolate(selectPlural(line, count, this.rules()), { count, ...replacements })\n }\n\n private rules(): Intl.PluralRules {\n this.pluralRules ??= new Intl.PluralRules(this.locale)\n\n return this.pluralRules\n }\n}\n\n/** Pick the plural form of a Laravel `trans_choice` line for `count`. */\nexport function selectPlural(line: string, count: number, rules: Intl.PluralRules): string {\n const segments = line.split('|')\n\n for (const segment of segments) {\n const explicit = matchExplicit(segment, count)\n\n if (explicit !== null) {\n return explicit\n }\n }\n\n const forms = segments.map((segment) => segment.replace(/^\\s*[{[][^\\]}]*[}\\]]\\s*/, ''))\n\n if (forms.length === 1) {\n return forms[0] ?? ''\n }\n\n const categories = PLURAL_ORDER.filter((category) =>\n rules.resolvedOptions().pluralCategories.includes(category),\n )\n const index = Math.max(0, categories.indexOf(rules.select(count)))\n\n return forms[Math.min(index, forms.length - 1)] ?? ''\n}\n\nfunction matchExplicit(segment: string, count: number): string | null {\n const match = /^\\s*([{[])([^\\]}]*)([}\\]])\\s*([\\s\\S]*)$/.exec(segment)\n\n if (!match) {\n return null\n }\n\n const [, open, condition = '', , text = ''] = match\n\n if (open === '{') {\n return condition\n .split(',')\n .map((part) => Number(part.trim()))\n .includes(count)\n ? text\n : null\n }\n\n const [from = '*', to = '*'] = condition.split(',').map((part) => part.trim())\n const above = from === '*' || count >= Number(from)\n const below = to === '*' || count <= Number(to)\n\n return above && below ? text : null\n}\n\nexport const translator = new Translator()\n\nexport const t = translator.t.bind(translator)\n\n// ---------------------------------------------------------------------------- Formatting\n\nexport interface MoneyOptions extends Intl.NumberFormatOptions {\n /** The amount is an integer of the smallest unit (cents, fils, yen). */\n minorUnits?: boolean\n}\n\n/**\n * Locale-aware formatting for values rendered in the browser (custom components,\n * charts, inputs). Server-rendered columns and entries are already formatted in PHP.\n */\nexport class LocaleFormatter {\n constructor(\n readonly locale = 'en',\n readonly currencyCode = 'USD',\n readonly timeZone?: string,\n ) {}\n\n static fromSchema(localization: LocalizationSchema | undefined): LocaleFormatter {\n return new LocaleFormatter(\n localization?.tag ?? 'en',\n localization?.currency ?? 'USD',\n localization?.timezone,\n )\n }\n\n number(value: number, options: Intl.NumberFormatOptions = {}): string {\n return new Intl.NumberFormat(this.locale, options).format(value)\n }\n\n percent(value: number, maximumFractionDigits = 0): string {\n return this.number(value, { style: 'percent', maximumFractionDigits })\n }\n\n money(amount: number, currency = this.currencyCode, options: MoneyOptions = {}): string {\n const { minorUnits, ...format } = options\n const value = minorUnits ? amount / 10 ** currencyDecimals(currency) : amount\n\n return new Intl.NumberFormat(this.locale, { style: 'currency', currency, ...format }).format(\n value,\n )\n }\n\n /** Unparseable input is returned unchanged. */\n date(\n value: Date | string | number,\n options: Intl.DateTimeFormatOptions = { dateStyle: 'medium' },\n ): string {\n const date = toDate(value)\n\n if (Number.isNaN(date.getTime())) return String(value)\n\n return new Intl.DateTimeFormat(this.locale, { timeZone: this.timeZone, ...options }).format(\n date,\n )\n }\n\n dateTime(value: Date | string | number): string {\n return this.date(value, { dateStyle: 'medium', timeStyle: 'short' })\n }\n\n /** \"3 days ago\", \"in 2 hours\", in the user's language. */\n relative(value: Date | string | number, now: Date = new Date()): string {\n const time = toDate(value).getTime()\n\n if (Number.isNaN(time)) return String(value)\n\n const seconds = Math.round((time - now.getTime()) / 1000)\n const units: Array<[Intl.RelativeTimeFormatUnit, number]> = [\n ['year', 31_536_000],\n ['month', 2_592_000],\n ['week', 604_800],\n ['day', 86_400],\n ['hour', 3_600],\n ['minute', 60],\n ]\n const formatter = new Intl.RelativeTimeFormat(this.locale, { numeric: 'auto' })\n\n for (const [unit, size] of units) {\n if (Math.abs(seconds) >= size) {\n return formatter.format(Math.round(seconds / size), unit)\n }\n }\n\n return formatter.format(seconds, 'second')\n }\n\n list(items: string[], type: Intl.ListFormatType = 'conjunction'): string {\n return new Intl.ListFormat(this.locale, { type }).format(items)\n }\n\n /** Where the locale writes the currency symbol for `currency`. */\n currencyAffixes(currency = this.currencyCode): {\n prefix: string\n suffix: string\n symbol: string\n } {\n const parts = new Intl.NumberFormat(this.locale, { style: 'currency', currency }).formatToParts(\n 1,\n )\n const symbolIndex = parts.findIndex((part) => part.type === 'currency')\n const numberIndex = parts.findIndex((part) => part.type === 'integer')\n const symbol = parts[symbolIndex]?.value ?? currency\n\n return symbolIndex < numberIndex\n ? { prefix: symbol, suffix: '', symbol }\n : { prefix: '', suffix: symbol, symbol }\n }\n\n /** The locale's decimal and grouping separators. */\n separators(): { decimal: string; group: string } {\n const parts = new Intl.NumberFormat(this.locale).formatToParts(12345.6)\n\n return {\n decimal: parts.find((part) => part.type === 'decimal')?.value ?? '.',\n group: parts.find((part) => part.type === 'group')?.value ?? ',',\n }\n }\n\n /**\n * Parse what a user typed in their locale (\"1.234,5\" in German, \"١٬٢٣٤٫٥\" in Arabic,\n * \"1 234,5\" in French) into a number. A lone dot followed by other than three digits is\n * read as a decimal point even where the locale uses a comma, since that is what people\n * mean when they type \"12.5\". Returns null for empty or invalid input.\n */\n parseNumber(input: string): number | null {\n const { decimal } = this.separators()\n let value = toAsciiDigits(input)\n .replace(/[\\s\\u00a0\\u202f'’]/g, '')\n .replace(/٫/g, decimal)\n .replace(/[٬،]/g, decimal === ',' ? '.' : ',')\n\n // Locales with their own separator (Arabic \"٫\"): ASCII \".\" is the decimal point.\n if (decimal !== '.' && decimal !== ',') {\n value = value.replace(/,/g, '').replace('.', decimal)\n }\n\n if (decimal === ',' && !value.includes(decimal) && /^-?\\d*\\.\\d*$/.test(value)) {\n const fraction = value.split('.')[1] ?? ''\n\n if (fraction.length !== 3) {\n value = value.replace('.', decimal)\n }\n }\n\n const [integer = '', fraction, ...rest] = value.split(decimal)\n\n if (rest.length > 0) {\n return null\n }\n\n const normalised = integer.replace(/[.,]/g, '') + (fraction === undefined ? '' : `.${fraction}`)\n\n if (!/^-?(\\d+\\.?\\d*|\\.\\d+)$/.test(normalised)) {\n return null\n }\n\n const number = Number(normalised)\n\n return Number.isFinite(number) ? number : null\n }\n}\n\n/** Minor-unit digits of an ISO 4217 currency (USD 2, BHD 3, JPY 0). */\nexport function currencyDecimals(currency: string): number {\n try {\n return (\n new Intl.NumberFormat('en', { style: 'currency', currency }).resolvedOptions()\n .maximumFractionDigits ?? 2\n )\n } catch {\n return 2\n }\n}\n\n/** Code points of \"0\" in Unicode decimal digit blocks (Arabic-Indic, Persian, Devanagari, …). */\nconst DIGIT_ZEROS = [\n 0x660, 0x6f0, 0x7c0, 0x966, 0x9e6, 0xa66, 0xae6, 0xb66, 0xbe6, 0xc66, 0xce6, 0xd66, 0xde6, 0xe50,\n 0xed0, 0xf20, 0x1040, 0x1090, 0x17e0, 0x1810, 0x1946, 0x19d0, 0x1a80, 0x1a90, 0x1b50, 0x1bb0,\n 0x1c40, 0x1c50, 0xa620, 0xa8d0, 0xa900, 0xa9d0, 0xa9f0, 0xaa50, 0xabf0, 0xff10,\n]\n\n/** Convert Arabic-Indic, Persian and other Unicode decimal digits to 0-9. */\nexport function toAsciiDigits(input: string): string {\n return input.replace(/\\P{ASCII}/gu, (character) => {\n const code = character.codePointAt(0) ?? 0\n const zero = DIGIT_ZEROS.find((start) => code >= start && code <= start + 9)\n\n return zero === undefined ? character : String(code - zero)\n })\n}\n\nfunction toDate(value: Date | string | number): Date {\n return value instanceof Date ? value : new Date(value)\n}\n\n/**\n * Render a date with a PHP `date()` format string, using the locale's month and weekday\n * names. Numeric tokens keep ASCII digits, like Carbon's `translatedFormat()`.\n */\nexport function formatPhpDate(date: Date, format: string, locale = 'en'): string {\n const name = (options: Intl.DateTimeFormatOptions) =>\n new Intl.DateTimeFormat(locale, options).format(date)\n const pad = (value: number) => String(value).padStart(2, '0')\n const hours = date.getHours()\n const dayPeriod = () =>\n new Intl.DateTimeFormat(locale, { hour: 'numeric', hour12: true })\n .formatToParts(date)\n .find((part) => part.type === 'dayPeriod')?.value ?? (hours < 12 ? 'AM' : 'PM')\n\n const tokens: Record<string, () => string> = {\n d: () => pad(date.getDate()),\n j: () => String(date.getDate()),\n D: () => name({ weekday: 'short' }),\n l: () => name({ weekday: 'long' }),\n N: () => String(date.getDay() === 0 ? 7 : date.getDay()),\n w: () => String(date.getDay()),\n S: () => (locale.startsWith('en') ? ordinalSuffix(date.getDate()) : ''),\n F: () => name({ month: 'long' }),\n M: () => name({ month: 'short' }),\n m: () => pad(date.getMonth() + 1),\n n: () => String(date.getMonth() + 1),\n Y: () => String(date.getFullYear()),\n y: () => String(date.getFullYear()).slice(-2),\n a: () => dayPeriod().toLowerCase(),\n A: () => dayPeriod(),\n g: () => String(hours % 12 || 12),\n G: () => String(hours),\n h: () => pad(hours % 12 || 12),\n H: () => pad(hours),\n i: () => pad(date.getMinutes()),\n s: () => pad(date.getSeconds()),\n }\n\n let output = ''\n\n for (let index = 0; index < format.length; index++) {\n const character = format[index] ?? ''\n\n if (character === '\\\\') {\n output += format[++index] ?? ''\n } else {\n output += tokens[character]?.() ?? character\n }\n }\n\n return output\n}\n\nfunction ordinalSuffix(day: number): string {\n if (day % 100 >= 11 && day % 100 <= 13) return 'th'\n\n return ({ 1: 'st', 2: 'nd', 3: 'rd' } as Record<number, string>)[day % 10] ?? 'th'\n}\n\n// ---------------------------------------------------------------------------- Document\n\n/** Keep `<html lang dir>` in sync after Inertia navigations (e.g. a language switch). */\nexport function applyDocumentLocale(\n localization: Pick<LocalizationSchema, 'tag' | 'direction'> | undefined,\n): void {\n if (typeof document === 'undefined' || !localization) {\n return\n }\n\n const root = document.documentElement\n\n if (root.lang !== localization.tag) root.lang = localization.tag\n if (root.dir !== localization.direction) root.dir = localization.direction\n}\n\n/**\n * Whether a language menu belongs in `place`: the panel has a switcher with two or more\n * languages and `languageSwitcher()` puts it there. Auth pages always show it.\n */\nexport function showsLanguageSwitcher(\n localization:\n Pick<LocalizationSchema, 'switcher' | 'switcherPosition' | 'locales'> | null | undefined,\n place: 'topbar' | 'user-menu' | 'auth',\n): boolean {\n if (!localization?.switcher || (localization.locales?.length ?? 0) < 2) {\n return false\n }\n\n if (place === 'auth') {\n return true\n }\n\n const position = localization.switcherPosition ?? 'user-menu'\n\n return position === 'both' || position === place\n}\n\n/**\n * Whether the top bar's language button collapses into the user menu on phones (below\n * `sm`): with `languageSwitcher('topbar' | 'both')` and a user menu to hold it. The top bar\n * then hides its button below `sm`, and the user menu shows its \"Language\" entry there\n * (always, for `'both'`). Without a user menu (guests, `userMenu(false)`) it stays put.\n */\nexport function collapsesLanguageSwitcher(\n localization:\n Pick<LocalizationSchema, 'switcher' | 'switcherPosition' | 'locales'> | null | undefined,\n hasUserMenu: boolean,\n): boolean {\n return hasUserMenu && showsLanguageSwitcher(localization, 'topbar')\n}\n\n/** Switch the panel language and reload the current page in it. */\nexport function switchLocale(endpoint: string, locale: string): void {\n // Lazy widgets cached in the old language would otherwise show until their deferred\n // schemas arrive in the new one.\n lazyComponentCache.clear()\n router.post(endpoint, { locale }, { preserveScroll: true, preserveState: false })\n}\n"],"mappings":";;;;;;AAOA,MAAM,eAAsC;CAAC;CAAQ;CAAO;CAAO;CAAO;CAAQ;AAAO;;;;;AAQzF,IAAa,aAAb,MAAwB;CAIZ;CACA;CAJV,cAA+C;CAE/C,YACE,eAAgD,CAAC,GACjD,SAAiB,MACjB;EAFQ,KAAA,eAAA;EACA,KAAA,SAAA;CACP;CAEH,gBAAgB,cAA6C;EAC3D,KAAK,eAAe;CACtB;;CAGA,UAAU,QAAsB;EAC9B,IAAI,WAAW,KAAK,QAAQ;GAC1B,KAAK,SAAS;GACd,KAAK,cAAc;EACrB;CACF;CAEA,YAAoB;EAClB,OAAO,KAAK;CACd;CAEA,IAAI,KAAsB;EACxB,OAAO,OAAO,QAAiB,KAAK,cAAc,GAAG,MAAM;CAC7D;;CAGA,EAAE,KAAa,eAA6B,CAAC,GAAG,UAA2B;EACzE,MAAM,QAAQ,QAAiB,KAAK,cAAc,GAAG;EAGrD,OAAO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AO,SAAS;CAEtB,IAAI,KAAK,SAAS,aAAa,KAAK,KAAK,OAAO,aAAa;CAC7D,IAAI,KAAK,QAAQ,aAAa,WAAW,KAAK,MAAM,aAAa;AACnE;;;;;AAMA,SAAgB,sBACd,cAEA,OACS;CACT,IAAI,CAAC,cAAc,aAAa,aAAa,SAAS,UAAU,KAAK,GACnE,OAAO;CAGT,IAAI,UAAU,QACZ,OAAO;CAGT,MAAM,WAAW,aAAa,oBAAoB;CAElD,OAAO,aAAa,UAAU,aAAa;AAC7C;;;;;;;AAQA,SAAgB,0BACd,cAEA,aACS;CACT,OAAO,eAAe,sBAAsB,cAAc,QAAQ;AACpE;;AAGA,SAAgB,aAAa,UAAkB,QAAsB;CAGnE,mBAAmB,MAAM;CACzB,OAAO,KAAK,UAAU,EAAE,OAAO,GAAG;EAAE,gBAAgB;EAAM,eAAe;CAAM,CAAC;AAClF"}
1
+ {"version":3,"file":"i18n.js","names":[],"sources":["../src/i18n.ts"],"sourcesContent":["import { router } from '@inertiajs/core'\nimport { lazyComponentCache } from './lazy'\nimport type { LocalizationSchema } from './schema/panel'\nimport { interpolate } from './utils/format'\nimport { getPath } from './utils/path'\n\n/** CLDR plural categories in the order Laravel language files list their forms. */\nconst PLURAL_ORDER: Intl.LDMLPluralRule[] = ['zero', 'one', 'two', 'few', 'many', 'other']\n\ntype Replacements = Record<string, string | number>\n\n/**\n * Translator over the `translations` prop (Laravel's `alfakit::ui` group plus any groups\n * the panel adds with `frontendTranslations()`).\n */\nexport class Translator {\n private pluralRules: Intl.PluralRules | null = null\n\n constructor(\n private translations: Record<string, unknown> = {},\n private locale = 'en',\n ) {}\n\n setTranslations(translations: Record<string, unknown>): void {\n this.translations = translations\n }\n\n /** BCP 47 tag used for plural rules. */\n setLocale(locale: string): void {\n if (locale !== this.locale) {\n this.locale = locale\n this.pluralRules = null\n }\n }\n\n getLocale(): string {\n return this.locale\n }\n\n has(key: string): boolean {\n return typeof getPath<unknown>(this.translations, key) === 'string'\n }\n\n /** `t('table.showing', { first: 1, last: 10, total: 42 })` */\n t(key: string, replacements: Replacements = {}, fallback?: string): string {\n const value = getPath<unknown>(this.translations, key)\n const template = typeof value === 'string' ? value : (fallback ?? key)\n\n return interpolate(template, replacements)\n }\n\n /**\n * Pluralised line, compatible with Laravel's `trans_choice()` syntax:\n * `'{0} No items|{1} One item|[2,*] :count items'` or `'one item|:count items'`.\n * Forms without explicit ranges follow CLDR plural rules for the current locale, in the\n * order zero, one, two, few, many, other (as Laravel language files list them).\n */\n choice(key: string, count: number, replacements: Replacements = {}, fallback?: string): string {\n const value = getPath<unknown>(this.translations, key)\n const line = typeof value === 'string' ? value : (fallback ?? key)\n\n return interpolate(selectPlural(line, count, this.rules()), { count, ...replacements })\n }\n\n private rules(): Intl.PluralRules {\n this.pluralRules ??= new Intl.PluralRules(this.locale)\n\n return this.pluralRules\n }\n}\n\n/** Pick the plural form of a Laravel `trans_choice` line for `count`. */\nexport function selectPlural(line: string, count: number, rules: Intl.PluralRules): string {\n const segments = line.split('|')\n\n for (const segment of segments) {\n const explicit = matchExplicit(segment, count)\n\n if (explicit !== null) {\n return explicit\n }\n }\n\n const forms = segments.map((segment) => segment.replace(/^\\s*[{[][^\\]}]*[}\\]]\\s*/, ''))\n\n if (forms.length === 1) {\n return forms[0] ?? ''\n }\n\n const categories = PLURAL_ORDER.filter((category) =>\n rules.resolvedOptions().pluralCategories.includes(category),\n )\n const index = Math.max(0, categories.indexOf(rules.select(count)))\n\n return forms[Math.min(index, forms.length - 1)] ?? ''\n}\n\nfunction matchExplicit(segment: string, count: number): string | null {\n const match = /^\\s*([{[])([^\\]}]*)([}\\]])\\s*([\\s\\S]*)$/.exec(segment)\n\n if (!match) {\n return null\n }\n\n const [, open, condition = '', , text = ''] = match\n\n if (open === '{') {\n return condition\n .split(',')\n .map((part) => Number(part.trim()))\n .includes(count)\n ? text\n : null\n }\n\n const [from = '*', to = '*'] = condition.split(',').map((part) => part.trim())\n const above = from === '*' || count >= Number(from)\n const below = to === '*' || count <= Number(to)\n\n return above && below ? text : null\n}\n\nexport const translator = new Translator()\n\nexport const t = translator.t.bind(translator)\n\n// ---------------------------------------------------------------------------- Formatting\n\nexport interface MoneyOptions extends Intl.NumberFormatOptions {\n /** The amount is an integer of the smallest unit (cents, fils, yen). */\n minorUnits?: boolean\n}\n\n/**\n * Locale-aware formatting for values rendered in the browser (custom components,\n * charts, inputs). Server-rendered columns and entries are already formatted in PHP.\n */\nexport class LocaleFormatter {\n constructor(\n readonly locale = 'en',\n readonly currencyCode = 'USD',\n readonly timeZone?: string,\n ) {}\n\n static fromSchema(localization: LocalizationSchema | undefined): LocaleFormatter {\n return new LocaleFormatter(\n localization?.tag ?? 'en',\n localization?.currency ?? 'USD',\n localization?.timezone,\n )\n }\n\n number(value: number, options: Intl.NumberFormatOptions = {}): string {\n return new Intl.NumberFormat(this.locale, options).format(value)\n }\n\n percent(value: number, maximumFractionDigits = 0): string {\n return this.number(value, { style: 'percent', maximumFractionDigits })\n }\n\n money(amount: number, currency = this.currencyCode, options: MoneyOptions = {}): string {\n const { minorUnits, ...format } = options\n const value = minorUnits ? amount / 10 ** currencyDecimals(currency) : amount\n\n return new Intl.NumberFormat(this.locale, { style: 'currency', currency, ...format }).format(\n value,\n )\n }\n\n /** Unparseable input is returned unchanged. */\n date(\n value: Date | string | number,\n options: Intl.DateTimeFormatOptions = { dateStyle: 'medium' },\n ): string {\n const date = toDate(value)\n\n if (Number.isNaN(date.getTime())) return String(value)\n\n return new Intl.DateTimeFormat(this.locale, { timeZone: this.timeZone, ...options }).format(\n date,\n )\n }\n\n dateTime(value: Date | string | number): string {\n return this.date(value, { dateStyle: 'medium', timeStyle: 'short' })\n }\n\n /** \"3 days ago\", \"in 2 hours\", in the user's language. */\n relative(value: Date | string | number, now: Date = new Date()): string {\n const time = toDate(value).getTime()\n\n if (Number.isNaN(time)) return String(value)\n\n const seconds = Math.round((time - now.getTime()) / 1000)\n const units: Array<[Intl.RelativeTimeFormatUnit, number]> = [\n ['year', 31_536_000],\n ['month', 2_592_000],\n ['week', 604_800],\n ['day', 86_400],\n ['hour', 3_600],\n ['minute', 60],\n ]\n const formatter = new Intl.RelativeTimeFormat(this.locale, { numeric: 'auto' })\n\n for (const [unit, size] of units) {\n if (Math.abs(seconds) >= size) {\n return formatter.format(Math.round(seconds / size), unit)\n }\n }\n\n return formatter.format(seconds, 'second')\n }\n\n list(items: string[], type: Intl.ListFormatType = 'conjunction'): string {\n return new Intl.ListFormat(this.locale, { type }).format(items)\n }\n\n /** Where the locale writes the currency symbol for `currency`. */\n currencyAffixes(currency = this.currencyCode): {\n prefix: string\n suffix: string\n symbol: string\n } {\n const parts = new Intl.NumberFormat(this.locale, { style: 'currency', currency }).formatToParts(\n 1,\n )\n const symbolIndex = parts.findIndex((part) => part.type === 'currency')\n const numberIndex = parts.findIndex((part) => part.type === 'integer')\n const symbol = parts[symbolIndex]?.value ?? currency\n\n return symbolIndex < numberIndex\n ? { prefix: symbol, suffix: '', symbol }\n : { prefix: '', suffix: symbol, symbol }\n }\n\n /** The locale's decimal and grouping separators. */\n separators(): { decimal: string; group: string } {\n const parts = new Intl.NumberFormat(this.locale).formatToParts(12345.6)\n\n return {\n decimal: parts.find((part) => part.type === 'decimal')?.value ?? '.',\n group: parts.find((part) => part.type === 'group')?.value ?? ',',\n }\n }\n\n /**\n * Parse what a user typed in their locale (\"1.234,5\" in German, \"١٬٢٣٤٫٥\" in Arabic,\n * \"1 234,5\" in French) into a number. A lone dot followed by other than three digits is\n * read as a decimal point even where the locale uses a comma, since that is what people\n * mean when they type \"12.5\". Returns null for empty or invalid input.\n */\n parseNumber(input: string): number | null {\n const { decimal } = this.separators()\n let value = toAsciiDigits(input)\n .replace(/[\\s\\u00a0\\u202f'’]/g, '')\n .replace(/٫/g, decimal)\n .replace(/[٬،]/g, decimal === ',' ? '.' : ',')\n\n // Locales with their own separator (Arabic \"٫\"): ASCII \".\" is the decimal point.\n if (decimal !== '.' && decimal !== ',') {\n value = value.replace(/,/g, '').replace('.', decimal)\n }\n\n if (decimal === ',' && !value.includes(decimal) && /^-?\\d*\\.\\d*$/.test(value)) {\n const fraction = value.split('.')[1] ?? ''\n\n if (fraction.length !== 3) {\n value = value.replace('.', decimal)\n }\n }\n\n const [integer = '', fraction, ...rest] = value.split(decimal)\n\n if (rest.length > 0) {\n return null\n }\n\n const normalised = integer.replace(/[.,]/g, '') + (fraction === undefined ? '' : `.${fraction}`)\n\n if (!/^-?(\\d+\\.?\\d*|\\.\\d+)$/.test(normalised)) {\n return null\n }\n\n const number = Number(normalised)\n\n return Number.isFinite(number) ? number : null\n }\n}\n\n/** Minor-unit digits of an ISO 4217 currency (USD 2, BHD 3, JPY 0). */\nexport function currencyDecimals(currency: string): number {\n try {\n return (\n new Intl.NumberFormat('en', { style: 'currency', currency }).resolvedOptions()\n .maximumFractionDigits ?? 2\n )\n } catch {\n return 2\n }\n}\n\n/** Code points of \"0\" in Unicode decimal digit blocks (Arabic-Indic, Persian, Devanagari, …). */\nconst DIGIT_ZEROS = [\n 0x660, 0x6f0, 0x7c0, 0x966, 0x9e6, 0xa66, 0xae6, 0xb66, 0xbe6, 0xc66, 0xce6, 0xd66, 0xde6, 0xe50,\n 0xed0, 0xf20, 0x1040, 0x1090, 0x17e0, 0x1810, 0x1946, 0x19d0, 0x1a80, 0x1a90, 0x1b50, 0x1bb0,\n 0x1c40, 0x1c50, 0xa620, 0xa8d0, 0xa900, 0xa9d0, 0xa9f0, 0xaa50, 0xabf0, 0xff10,\n]\n\n/** Convert Arabic-Indic, Persian and other Unicode decimal digits to 0-9. */\nexport function toAsciiDigits(input: string): string {\n return input.replace(/\\P{ASCII}/gu, (character) => {\n const code = character.codePointAt(0) ?? 0\n const zero = DIGIT_ZEROS.find((start) => code >= start && code <= start + 9)\n\n return zero === undefined ? character : String(code - zero)\n })\n}\n\nfunction toDate(value: Date | string | number): Date {\n return value instanceof Date ? value : new Date(value)\n}\n\n/**\n * Render a date with a PHP `date()` format string, using the locale's month and weekday\n * names. Numeric tokens keep ASCII digits, like Carbon's `translatedFormat()`.\n */\nexport function formatPhpDate(date: Date, format: string, locale = 'en'): string {\n const name = (options: Intl.DateTimeFormatOptions) =>\n new Intl.DateTimeFormat(locale, options).format(date)\n const pad = (value: number) => String(value).padStart(2, '0')\n const hours = date.getHours()\n const dayPeriod = () =>\n new Intl.DateTimeFormat(locale, { hour: 'numeric', hour12: true })\n .formatToParts(date)\n .find((part) => part.type === 'dayPeriod')?.value ?? (hours < 12 ? 'AM' : 'PM')\n\n const tokens: Record<string, () => string> = {\n d: () => pad(date.getDate()),\n j: () => String(date.getDate()),\n D: () => name({ weekday: 'short' }),\n l: () => name({ weekday: 'long' }),\n N: () => String(date.getDay() === 0 ? 7 : date.getDay()),\n w: () => String(date.getDay()),\n S: () => (locale.startsWith('en') ? ordinalSuffix(date.getDate()) : ''),\n F: () => name({ month: 'long' }),\n M: () => name({ month: 'short' }),\n m: () => pad(date.getMonth() + 1),\n n: () => String(date.getMonth() + 1),\n Y: () => String(date.getFullYear()),\n y: () => String(date.getFullYear()).slice(-2),\n a: () => dayPeriod().toLowerCase(),\n A: () => dayPeriod(),\n g: () => String(hours % 12 || 12),\n G: () => String(hours),\n h: () => pad(hours % 12 || 12),\n H: () => pad(hours),\n i: () => pad(date.getMinutes()),\n s: () => pad(date.getSeconds()),\n }\n\n let output = ''\n\n for (let index = 0; index < format.length; index++) {\n const character = format[index] ?? ''\n\n if (character === '\\\\') {\n output += format[++index] ?? ''\n } else {\n output += tokens[character]?.() ?? character\n }\n }\n\n return output\n}\n\nfunction ordinalSuffix(day: number): string {\n if (day % 100 >= 11 && day % 100 <= 13) return 'th'\n\n return ({ 1: 'st', 2: 'nd', 3: 'rd' } as Record<number, string>)[day % 10] ?? 'th'\n}\n\n// ---------------------------------------------------------------------------- Document\n\n/** Keep `<html lang dir>` in sync after Inertia navigations (e.g. a language switch). */\nexport function applyDocumentLocale(\n localization: Pick<LocalizationSchema, 'tag' | 'direction'> | undefined,\n): void {\n if (typeof document === 'undefined' || !localization) {\n return\n }\n\n const root = document.documentElement\n\n if (root.lang !== localization.tag) root.lang = localization.tag\n if (root.dir !== localization.direction) root.dir = localization.direction\n}\n\n/**\n * Whether a language menu belongs in `place`: the panel has a switcher with two or more\n * languages and `languageSwitcher()` puts it there. Auth pages always show it.\n */\nexport function showsLanguageSwitcher(\n localization:\n Pick<LocalizationSchema, 'switcher' | 'switcherPosition' | 'locales'> | null | undefined,\n place: 'topbar' | 'user-menu' | 'auth',\n): boolean {\n if (!localization?.switcher || (localization.locales?.length ?? 0) < 2) {\n return false\n }\n\n if (place === 'auth') {\n return true\n }\n\n const position = localization.switcherPosition ?? 'user-menu'\n\n return position === 'both' || position === place\n}\n\n/**\n * Whether the top bar's language button collapses into the user menu on phones (below\n * `sm`): with `languageSwitcher('topbar' | 'both')` and a user menu to hold it. The top bar\n * then hides its button below `sm`, and the user menu shows its \"Language\" entry there\n * (always, for `'both'`). Without a user menu (guests, `userMenu(false)`) it stays put.\n */\nexport function collapsesLanguageSwitcher(\n localization:\n Pick<LocalizationSchema, 'switcher' | 'switcherPosition' | 'locales'> | null | undefined,\n hasUserMenu: boolean,\n): boolean {\n return hasUserMenu && showsLanguageSwitcher(localization, 'topbar')\n}\n\n/** Switch the panel language and reload the current page in it. */\nexport function switchLocale(endpoint: string, locale: string): void {\n // Lazy widgets cached in the old language would otherwise show until their deferred\n // schemas arrive in the new one.\n lazyComponentCache.clear()\n router.post(endpoint, { locale }, { preserveScroll: true, preserveState: false })\n}\n\n// ---------------------------------------------------------------------------- Bidi\n\n/** A letter of a script written right to left (not its digits or separators). */\nconst RTL_LETTER =\n /(?=\\p{L})(?:\\p{Script=Arabic}|\\p{Script=Hebrew}|\\p{Script=Syriac}|\\p{Script=Thaana}|\\p{Script=Nko}|\\p{Script=Adlam}|\\p{Script=Samaritan}|\\p{Script=Mandaic}|\\p{Script=Hanifi_Rohingya}|\\p{Script=Yezidi}|\\p{Script=Mende_Kikakui})/u\n\n/**\n * The `dir` for a `<bdi>` around a display value: `auto` (the value's first strong letter\n * decides) when it has right-to-left letters, else `ltr`. Numbers and money formatted for a\n * right-to-left locale start with an invisible right-to-left mark (`‏0.00 US$` in Arabic),\n * which `auto` reads as right to left and reorders into `$US 0.00`; without right-to-left\n * letters the value is laid out as written. Values with them (`٠٫٠٠٠ د.ب.‏`, Arabic\n * text) keep their own direction.\n */\nexport function isolationDirection(value: unknown): 'ltr' | 'auto' {\n return typeof value === 'string' && RTL_LETTER.test(value) ? 'auto' : 'ltr'\n}\n"],"mappings":";;;;;;AAOA,MAAM,eAAsC;CAAC;CAAQ;CAAO;CAAO;CAAO;CAAQ;AAAO;;;;;AAQzF,IAAa,aAAb,MAAwB;CAIZ;CACA;CAJV,cAA+C;CAE/C,YACE,eAAgD,CAAC,GACjD,SAAiB,MACjB;EAFQ,KAAA,eAAA;EACA,KAAA,SAAA;CACP;CAEH,gBAAgB,cAA6C;EAC3D,KAAK,eAAe;CACtB;;CAGA,UAAU,QAAsB;EAC9B,IAAI,WAAW,KAAK,QAAQ;GAC1B,KAAK,SAAS;GACd,KAAK,cAAc;EACrB;CACF;CAEA,YAAoB;EAClB,OAAO,KAAK;CACd;CAEA,IAAI,KAAsB;EACxB,OAAO,OAAO,QAAiB,KAAK,cAAc,GAAG,MAAM;CAC7D;;CAGA,EAAE,KAAa,eAA6B,CAAC,GAAG,UAA2B;EACzE,MAAM,QAAQ,QAAiB,KAAK,cAAc,GAAG;EAGrD,OAAO,YAFU,OAAO,UAAU,WAAW,QAAS,YAAY,KAErC,YAAY;CAC3C;;;;;;;CAQA,OAAO,KAAa,OAAe,eAA6B,CAAC,GAAG,UAA2B;EAC7F,MAAM,QAAQ,QAAiB,KAAK,cAAc,GAAG;EAGrD,OAAO,YAAY,aAFN,OAAO,UAAU,WAAW,QAAS,YAAY,KAExB,OAAO,KAAK,MAAM,CAAC,GAAG;GAAE;GAAO,GAAG;EAAa,CAAC;CACxF;CAEA,QAAkC;EAChC,KAAK,gB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AAa;AAC7C;;;;;;;AAQA,SAAgB,0BACd,cAEA,aACS;CACT,OAAO,eAAe,sBAAsB,cAAc,QAAQ;AACpE;;AAGA,SAAgB,aAAa,UAAkB,QAAsB;CAGnE,mBAAmB,MAAM;CACzB,OAAO,KAAK,UAAU,EAAE,OAAO,GAAG;EAAE,gBAAgB;EAAM,eAAe;CAAM,CAAC;AAClF;;AAKA,MAAM,aACJ;;;;;;;;;AAUF,SAAgB,mBAAmB,OAAgC;CACjE,OAAO,OAAO,UAAU,YAAY,WAAW,KAAK,KAAK,IAAI,SAAS;AACxE"}
package/dist/index.d.ts CHANGED
@@ -32,8 +32,8 @@ import { DebugClosure, DebugDeprecation, DebugNode, DebugSchema, DebugServerTimi
32
32
  import { DevToolsClass, DevToolsContext, DevToolsSchema } from "./schema/dev-tools.js";
33
33
  import { PwaPushSchema, PwaSchema } from "./schema/pwa.js";
34
34
  import { StandaloneComponentSchema, isStandaloneComponent } from "./schema/standalone.js";
35
- import { AlfakitPageProps, BreadcrumbSchema, ContentBlock, DefaultActionSchema, ErrorNotificationEntrySchema, ErrorNotificationsSchema, ImpersonationSchema, LanguageSwitcherPosition, LocaleSchema, LocalizationSchema, MenuItemSchema, NavigationBadgeSchema, NavigationGroupSchema, NavigationItemSchema, NavigationStateSchema, PageLayout, PageSchema, PanelDesignSchema, PanelEndpoints, PanelSchema, PanelThemeSchema, PanelUserSchema, PolledComponents, SlotDataValue, SlotItemSchema, StarterKitDashboardWidgetsSchema, StarterKitNavigationSchema, StarterKitWidgetsSchema, SubNavigationSchema, TENANT_MENU_COMPONENT, TenantSchema, ToastPosition, USER_MENU_COMPONENT } from "./schema/panel.js";
36
- import { LocaleFormatter, MoneyOptions, Translator, applyDocumentLocale, collapsesLanguageSwitcher, currencyDecimals, formatPhpDate, selectPlural, showsLanguageSwitcher, switchLocale, t, toAsciiDigits, translator } from "./i18n.js";
35
+ import { AlfakitPageProps, BreadcrumbSchema, ContentBlock, DefaultActionSchema, ErrorNotificationEntrySchema, ErrorNotificationsSchema, ImpersonationSchema, LanguageSwitcherPosition, LocaleSchema, LocalizationSchema, MenuItemSchema, NavigationBadgeSchema, NavigationGroupSchema, NavigationItemSchema, NavigationStateSchema, PageLayout, PageSchema, PanelDesignSchema, PanelEndpoints, PanelSchema, PanelThemeSchema, PanelUserSchema, PolledComponents, SlotDataValue, SlotItemSchema, StarterKitDashboardWidgetsSchema, StarterKitDocumentSchema, StarterKitNavigationSchema, StarterKitWidgetsSchema, SubNavigationSchema, TENANT_MENU_COMPONENT, TenantSchema, ToastPosition, USER_MENU_COMPONENT } from "./schema/panel.js";
36
+ import { LocaleFormatter, MoneyOptions, Translator, applyDocumentLocale, collapsesLanguageSwitcher, currencyDecimals, formatPhpDate, isolationDirection, selectPlural, showsLanguageSwitcher, switchLocale, t, toAsciiDigits, translator } from "./i18n.js";
37
37
  import { CALENDAR_ARGUMENTS_KEY, CALENDAR_EVENT_DROP_ACTION, CALENDAR_EVENT_RESIZE_ACTION, CALENDAR_FETCH_EVENTS_ACTION, CALENDAR_REGISTRY_KEY, CalendarEnvironment, CalendarEventApi, CalendarEventChangeInfo, CalendarEventClickInfo, CalendarFetchInfo, CalendarSelectInfo, calendarActionContext, calendarIdentity, calendarOptions, calendarWallTime, clientErrorNotification } from "./calendar.js";
38
38
  import { ChartConfigInput, ChartConfigOutput, ChartFormatter, buildChartConfig, chartColorVariable, configureCharts, getChartFormatters, getChartPlugins, mergeChartOptions, observeThemeChanges, registerChartFormatters, registerChartPlugins, resetChartRegistrations, resolveChartCallbacks, resolveCssColor, withAlpha } from "./chart.js";
39
39
  import { CmsAdminBarSchema, CmsAlternateSchema, CmsAspectRatio, CmsAutosaveResult, CmsBlockSchema, CmsBlockStyle, CmsBreadcrumbSchema, CmsBuiltInBlocks, CmsCallToActionBlockData, CmsColumnsBlockData, CmsEditorStatusSchema, CmsEmbedBlockData, CmsFaqBlockData, CmsFeatureSchema, CmsFeaturesBlockData, CmsFormBlockData, CmsGalleryBlockData, CmsHeroBlockData, CmsImageBlockData, CmsImageSchema, CmsLinkSchema, CmsLivePreviewSchema, CmsMenuItemSchema, CmsMenuSchema, CmsPageProps, CmsPageSchema, CmsPayload, CmsRichTextBlockData, CmsSectionBlockData, CmsSeoSchema, CmsSiteDesign, CmsSiteSchema, CmsTestimonialSchema, CmsTestimonialsBlockData } from "./schema/cms.js";
@@ -108,6 +108,7 @@ import { GridBounds, GridCell, PastePlan, SPREADSHEET_CLASSES, SPREADSHEET_ISSUE
108
108
  import { registerStandaloneProp, resolvePartialProps } from "./partial-props.js";
109
109
  import { StandaloneComponentState, StandaloneDefaults, fetchStandaloneComponents, findStandalonePropName, markFailedLazyWidgets, standaloneDirection, standalonePageSchema, standalonePanelSchema } from "./standalone.js";
110
110
  import { STARTER_KIT_TOASTER_ID, StarterKitBreadcrumb, StarterKitNavGroup, StarterKitNavItem, StarterKitUserMenuItem, currentStarterKitPanel, currentStarterKitPanelId, customPageProps, installStarterKitRuntime, isStarterKitPanel, preferCurrentStarterKitPanel, starterKitBreadcrumbsFromProps, starterKitNavigation, starterKitNavigations, syncStarterKitPage, toStarterKitBreadcrumbs, toStarterKitNavGroups, toStarterKitUserMenuItems, usesStarterKitHostLayout } from "./starter-kit.js";
111
+ import { applyStarterKitDocument, installStarterKitDocument, starterKitDirection, starterKitDocument, starterKitSidebarSide } from "./starter-kit-document.js";
111
112
  import { STARTER_KIT_COPILOT_SHORTCUT, StarterKitWidgets, isAlfakitPage, loadStarterKitPanel, loadedStarterKitPanel, openRequestedStarterKitSearch, registerStarterKitCopilotShortcut, registerStarterKitSearchShortcut, requestStarterKitCopilot, requestStarterKitLanguages, requestStarterKitSearch, resetStarterKitPanels, standaloneWidgetCount, starterKitCopilot, starterKitDashboardWidgets, starterKitPanelLocale, starterKitWidgets, starterKitWidgetsPage, starterKitWidgetsPanel, takeRequestedStarterKitCopilot, takeRequestedStarterKitLanguages } from "./starter-kit-widgets.js";
112
113
  import { GroupedTableRow, groupTableRows, initialCollapsedGroups, toggleCollapsedGroup } from "./table-grouping.js";
113
114
  import { ColumnGroupHeaderCell, ColumnManagerPosition, columnGroupHeaderRow, columnManagerPosition, columnOrderChanged, columnVisibilityClasses, isAppendingPagination, isGroupedColumn, keepMoveButtonFocus, layoutColumnNames, layoutNodeGrows, layoutVisibilityClasses, moveColumn, moveColumnInManager, moveColumnTo, nextPageQuery, orderColumnsBy, paginationTotal, previousPageQuery, recordActionsAtStart, saveColumnOrder, splitClasses, stackClasses } from "./table-layout.js";
@@ -123,7 +124,7 @@ import { Direction, FieldAriaAttributes, FieldAriaSource, FieldDescriptionIds, K
123
124
  import { EditorAttachments } from "./utils/attachments.js";
124
125
  import { columnSpanClasses, columnStartClasses, gridColumnsClasses, maxColumns } from "./utils/breakpoints.js";
125
126
  import { ColorFormat, colorAlpha, colorToHex, formatColor, withColorAlpha } from "./utils/color.js";
126
- import { CONTAINER_BREAKPOINTS, containerColumnSpanClasses, containerGridColumnsClasses, flexItemClasses, flexLayoutClasses, hasContainerBreakpoints } from "./utils/container-breakpoints.js";
127
+ import { CONTAINER_BREAKPOINTS, containerColumnSpanClasses, containerGridColumnsClasses, contentGridClasses, flexItemClasses, flexLayoutClasses, hasContainerBreakpoints } from "./utils/container-breakpoints.js";
127
128
  import { wallClockNow } from "./utils/datetime.js";
128
129
  import { Debounced, debounce } from "./utils/debounce.js";
129
130
  import { formatBytes, initials, interpolate, parseInterval, uniqueId } from "./utils/format.js";
@@ -133,4 +134,4 @@ import { applyMask } from "./utils/mask.js";
133
134
  import { PathSegment, deletePath, getPath, hasPath, joinPath, parentPath, replacePlaceholder, setPath, splitPath, templateForIndex } from "./utils/path.js";
134
135
  import { DEFAULT_VIRTUALIZE_THRESHOLD, VIRTUAL_ESTIMATES, VirtualList, VirtualListOptions, VirtualRange, firstErroredItemIndex, hasNewErrors, virtualizeOptions } from "./virtual.js";
135
136
  import { WIZARD_STEP_QUERY_KEY, completedStepIcon, initialWizardStep, persistWizardStep, wizardRequestedStepIndex, wizardStepFieldPaths, wizardStepQueryKey } from "./wizard.js";
136
- export { ACTION_PATH_SEPARATOR, ACTIVE_TAB_QUERY_KEY, AI_COPILOT_REGISTRY_KEY, AI_STREAM_REGISTRY_KEY, ALL_SELECTED_RECORDS_ARGUMENT, ActionButtonSize, ActionContext, ActionGroupSchema, ActionModalCancelledResponse, ActionModalSchema, ActionResultEditor, ActionResultFlash, ActionRunner, ActionRunnerOptions, ActionRunnerState, ActionSchema, ActionVariant, ActionsComponentSchema, Affixes, AiActionStatus, AiConversationSchema, AiCopilotSchema, AiMessageRole, AiMessageSchema, AiProposedActionSchema, AiSetupNoticeSchema, AiStreamController, AiStreamOptions, AiStreamSchema, AiStreamState, AiStreamStatus, AlfakitFlash, AlfakitOptions, AlfakitPageProps, Alignment, AnalyticsBreakdownRowSchema, AnalyticsBreakdownTabSchema, AnalyticsBreakdownWidgetSchema, AnalyticsTracker, AnalyticsTrackerOptions, AnyActionSchema, AnyPaginationSchema, Appearance, AppendingPaginationSchema, Attributes, BOTTOM_NAVIGATION_SLOTS, BROADCAST_NOTIFICATION, BUILT_IN_COLORS, BUILT_IN_WIDGET_TYPES, BaseColumnSchema, BaseComponent, BaseEntry, BaseField, BaseWidgetSchema, BlockProps, BottomNavigationItems, BreadcrumbSchema, Breakpoint, Breakpoints, BuilderBlockGroup, BuilderBlockSchema, BuilderItemSchema, BuilderItemState, BuilderPickerRect, BuilderSchema, BulkToggleActionSchema, CALENDAR_ARGUMENTS_KEY, CALENDAR_EVENT_DROP_ACTION, CALENDAR_EVENT_RESIZE_ACTION, CALENDAR_FETCH_EVENTS_ACTION, CALENDAR_REGISTRY_KEY, CLOSE_NOTIFICATION_EVENT, CMS_BLOCK_PREFIX, CMS_BUILT_IN_BLOCKS, CMS_FOOTER_KEY, CMS_FORM_KEY, CMS_HEADER_KEY, CMS_PAGE_COMPONENT, CMS_PREVIEW_DEVICES, CMS_PREVIEW_STORAGE_KEY, COMMANDS_COMPONENT, CONFLICT_ERROR_KEY, CONSTRAINT_PICKER_WIDTH_CLASSES, CONTAINER_BREAKPOINTS, CREATE_ANOTHER_ARGUMENT, CalendarChangeResult, CalendarEnvironment, CalendarEventApi, CalendarEventChangeInfo, CalendarEventClickInfo, CalendarEventSchema, CalendarFetchInfo, CalendarSelectInfo, CalendarView, CalendarWidgetSchema, CallPageMethodOptions, CalloutSchema, CellSchema, ChartConfigInput, ChartConfigOutput, ChartEmptyStateSchema, ChartFiltersFormSchema, ChartFormatter, ChartWidgetSchema, CheckboxColumnSchema, CheckboxListSchema, CheckboxSchema, CmsAdminBarSchema, CmsAlternateSchema, CmsAspectRatio, CmsAutosave, CmsAutosaveOptions, CmsAutosaveResult, CmsAutosaveSnapshot, CmsAutosaveStatus, CmsBlockSchema, CmsBlockStyle, CmsBreadcrumbSchema, CmsBuiltInBlocks, CmsCallToActionBlockData, CmsColumnsBlockData, CmsEditorStatusSchema, CmsEmbedBlockData, CmsFaqBlockData, CmsFeatureSchema, CmsFeaturesBlockData, CmsFormBlockData, CmsGalleryBlockData, CmsHeadTags, CmsHeroBlockData, CmsImageBlockData, CmsImageSchema, CmsLinkSchema, CmsLinkTag, CmsLivePreviewSchema, CmsMenuItemSchema, CmsMenuSchema, CmsMetaTag, CmsPageProps, CmsPageSchema, CmsPayload, CmsPreviewDevice, CmsRichTextBlockData, CmsSectionBlockData, CmsSeoSchema, CmsSiteDesign, CmsSiteSchema, CmsTestimonialSchema, CmsTestimonialsBlockData, CodeEditorSchema, CodeEntrySchema, CodeToken, CodeTokenKind, Color, ColorColumnSchema, ColorEntrySchema, ColorFormat, ColorPickerSchema, ColumnGroupHeaderCell, ColumnGroupSchema, ColumnLayoutColumnRef, ColumnLayoutNode, ColumnLayoutSchema, ColumnManagerPosition, ColumnProps, ColumnSchema, ColumnSpanValue, ColumnSummariesSchema, CommandPaletteLinkSchema, CommandPaletteResponse, CommandPaletteSchema, CommandSchema, ComponentDiscovery, ComponentRegistry, ConflictField, ConflictMonitor, ConflictMonitorOptions, ConflictMonitorState, ConflictsSchema, ConstraintPickerSection, ContainerBreakpoint, ContentBlock, ContentSlotItem, ContentSlotName, ContentSlotSchema, ContentSlots, CopilotController, CopilotControllerOptions, CopilotState, CopilotTotals, CopilotView, CropHandle, CropRect, CursorPaginationSchema, CustomBlockGroup, CustomBlockNodeOptions, CustomBlockPreview, CustomBlockResult, CustomWidgetSchema, DATABASE_NOTIFICATIONS_EVENT, DATABASE_NOTIFICATIONS_SENT, DEFAULT_ACTION_QUERY_KEYS, DEFAULT_LINK_PROTOCOLS, DEFAULT_VIRTUALIZE_THRESHOLD, DISCOVERY_FOLDERS, DashboardCustomizeSchema, DashboardEditor, DashboardEditorOptions, DashboardEditorState, DashboardLayoutEntry, DashboardLibraryWidget, DashboardMove, DashboardSpanOption, DashboardTranslator, DatabaseNotificationsResponse, DatePickerSchema, Debounced, DebugClosure, DebugDeprecation, DebugNode, DebugRecorder, DebugRequest, DebugRequestOutcome, DebugSchema, DebugServerTimings, DebugState, DefaultActionOpener, DefaultActionSchema, DeferredBadgeSchema, DeferredRequestOptions, DeferredTabBadges, DeprecationOptions, DevToolsClass, DevToolsContext, DevToolsSchema, Direction, DiscoveredEntry, DiscoveryFolder, DiscoveryKey, DiscoveryModules, DiscoveryOptions, DropdownPlacement, EchoChannelLike, EchoConnectionOptions, EchoEventChannel, EchoFactory, EchoLike, EchoPresenceChannelLike, EchoWithChannels, EditConflict, EditableColumnSchema, EditorAttachments, EditorSuggestions, EmptyStateComponentSchema, EmptyStateSchema, EntryProps, EntrySchema, ErrorNotificationEntrySchema, ErrorNotificationsSchema, ExecuteOptions, FIELD_ACTION_PREFIX, FIELD_TYPES, FILAMENT_CLOSE_NOTIFICATION_EVENT, FILE_MANAGER_DRAG_TYPE, FILE_MANAGER_PICKER_REGISTRY_KEY, FILE_MANAGER_REGISTRY_KEY, FILTERS_FORM_WIDTH_CLASSES, FILTERS_MODAL_WIDTH_CLASSES, FILTERS_SIDEBAR_WIDTH_CLASSES, FieldActionContextOptions, FieldActionResponse, FieldActions, FieldAriaAttributes, FieldAriaSource, FieldDescriptionIds, FieldProps, FieldSchema, FieldsetSchema, FileManagerActionNames, FileManagerBreadcrumbSchema, FileManagerClick, FileManagerController, FileManagerDataTransfer, FileManagerDetailsSchema, FileManagerDialog, FileManagerEntrySchema, FileManagerEnvironment, FileManagerFolderSchema, FileManagerKeyEvent, FileManagerKeyResult, FileManagerKind, FileManagerLinkSchema, FileManagerListingSchema, FileManagerPermissionsSchema, FileManagerPickedFileSchema, FileManagerPickerSchema, FileManagerPreviewSchema, FileManagerPreviewState, FileManagerResult, FileManagerSchema, FileManagerSort, FileManagerSortField, FileManagerState, FileManagerUpload, FileManagerUploader, FileUploadImageEditorSchema, FileUploadPositions, FileUploadSchema, FilterFormSync, FilterIndicator, FilterSchema, FiltersFormWidth, FiltersPlacement, FlashNotificationTracker, FlatNavigationItem, FlexSchema, FloatingToolbarEditor, FloatingToolbarState, FormBlock, FormPayload, FormState, FormStore, FormStoreOptions, FormattedStateProps, FusedGroupSchema, GLOBAL_SEARCH_DEBOUNCE, GRID_MAX_COLUMNS, GRID_MIN_COLUMNS, GlobalSearchGroupSchema, GlobalSearchResultSchema, GridBounds, GridCell, GridLayoutSchema, GridSchema, GroupSchema, GroupedTableRow, GuardedVisit, HELPDESK_ACTIVITY_EVENT, HELPDESK_SHORTCUTS, HELPDESK_TYPING_MS, HeadingTag, HelpdeskActivity, HelpdeskAttachment, HelpdeskBadge, HelpdeskChatClient, HelpdeskChatConfig, HelpdeskChatConversation, HelpdeskChatMessage, HelpdeskChatOptions, HelpdeskChatResponse, HelpdeskChatState, HelpdeskComposerMode, HelpdeskInboxController, HelpdeskInboxEnvironment, HelpdeskInboxList, HelpdeskInboxSchema, HelpdeskInboxState, HelpdeskMessage, HelpdeskSla, HelpdeskTicket, HelpdeskTicketSummary, HelpdeskView, HiddenSchema, HtmlSchema, HttpError, IMAGE_EDITOR_ZOOM_STEP, ITEM_MOVE_ATTRIBUTE, IconCellItem, IconColumnSchema, IconEntrySchema, IconName, IconPickerOption, IconPickerResponse, IconPickerSchema, IconPickerSearch, IconPickerSearchState, IconPickerSetSchema, IconPickerSource, IconPosition, IconSchema, IconSource, ImageCellSchema, ImageColumnSchema, ImageEditor, ImageEditorData, ImageEditorDragMode, ImageEditorMode, ImageEditorOptions, ImageEditorPoint, ImageEditorState, ImageEntrySchema, ImageGeometry, ImageSchema, ImageStackProps, ImageTransformOptions, ImpersonationSchema, ImplicitSubmitEvent, IndexedState, InfolistBlock, ItemActionFallback, ItemActionName, ItemActionSchema, ItemActionsItemProps, ItemActionsProps, ItemActionsSchema, ItemMoveDirection, ItemMoveTracker, JsonEntry, JsonKind, JsonRequestOptions, JsonSearchResult, KANBAN_NO_LANE, KANBAN_REGISTRY_KEY, KanbanAssigneeSchema, KanbanBadgeSchema, KanbanCardSchema, KanbanColumnSchema, KanbanController, KanbanEnvironment, KanbanFetchResult, KanbanFiltersSchema, KanbanKeyResult, KanbanLaneSchema, KanbanLocation, KanbanMoveResult, KanbanPicked, KanbanPointerOptions, KanbanRefusal, KanbanSchema, KanbanState, KanbanTarget, KanbanWidgetSchema, KeyLike, KeyValueEntrySchema, KeyValueSchema, KeyboardShortcutsSchema, LABEL_SLOTS, LAZY_PROP, LanguageSwitcherPosition, LatestRequest, LayoutSchema, LazyComponentCache, LazyRelationManagerSchema, LazyWidgetSchema, LinksBlock, ListTabSchema, ListTabsProps, Listener, LiveConfig, LivePropsOptions, LiveUpdates, LiveUpdatesOptions, LiveUpdatesSchema, LiveUpdatesState, LoadTableTotalsOptions, LoadedRichEditorExtensions, LocaleFormatter, LocaleSchema, LocalizationSchema, MAX_DEBUG_REQUESTS, MERGE_TAG_TRIGGER, MenuItemSchema, MergedRefresh, ModalTablePaging, ModalTableSelectResponse, ModalTableSelectSchema, MoneyInputSchema, MoneyOptions, NOT_PROSE_CLASS, NavigationBadgeSchema, NavigationGroupSchema, NavigationItemSchema, NavigationStateSchema, NotificationActionSchema, NotificationCenter, NotificationCenterState, NotificationEndpoints, NotificationSchema, NotificationUndoSchema, OPEN_DATABASE_NOTIFICATIONS_EVENT, OneTimeCodeInputSchema, OneTimeCodeSubmitter, OpenModal, Operation, Option, OptionGroup, OptionOrGroup, OptionsGridDirection, PAGE_EXPIRED_STATUS, PALETTE_GROUP_ORDER, PANEL_TOAST_OFFSET, PASSWORD_CONFIRMATION_INPUT, POLL_HEADER, POLL_PROP, PREFETCH_CACHE_FOR, PRESENCE_STATE_WHISPER, PageComponentProps, PageEventsOptions, PageLayout, PageMethodArguments, PageMethodCallOptions, PageMethodError, PageMethodResponse, PageMethodRuntime, PageSchema, PaginationSchema, PaletteGroup, PaletteItem, PaletteItemKind, PaletteLabels, PaletteSources, PanelDesignSchema, PanelEndpoints, PanelLayoutSchema, PanelSchema, PanelThemeSchema, PanelUserSchema, ParsedKeyBinding, PartialFormPayload, PastePlan, PathSegment, PersistStorage, PlaceholderSchema, PollScheduler, PolledComponents, PresenceMember, PresenceRoom, PresenceRoomOptions, PresenceRoomState, PresenceSchema, PresenceState, PwaInstallOutcome, PwaPushOutcome, PwaPushSchema, PwaPushStatus, PwaSchema, PwaState, QueryBuilderConstraintRule, QueryBuilderConstraintSchema, QueryBuilderGroup, QueryBuilderGroupRule, QueryBuilderInput, QueryBuilderOperatorSchema, QueryBuilderRule, QueryBuilderRulesSchema, RECORD_CHANGED_EVENT, RECORD_VERSION_INPUT, RELATION_MANAGERS_CONTENT_TAB, RELATION_QUERY_KEY, REMAINING_TEXT_SIZE_CLASSES, RadioSchema, RealtimeConfig, RealtimeSchema, RealtimeSubscriptionOptions, RecordChange, RecordKey, RecordVersionChangeSchema, RecordVersionSchema, RecordVersionsSchema, RegisteredShortcut, RelationGroupSchema, RelationManagerSchema, RelationManagerTab, RelationManagersBlock, RelationManagersContentTabSchema, RepeatableEntrySchema, RepeaterItemSchema, RepeaterItemState, RepeaterSchema, RichEditorCustomBlockSchema, RichEditorExtensionLoader, RichEditorMentionSchema, RichEditorMergeTagSchema, RichEditorPanel, RichEditorRemote, RichEditorSchema, RichEditorToolSchema, RichEditorToolbarGroupSchema, RulePath, SCHEMA_CONTRACT_VERSION, SELECTED_RECORDS_ARGUMENT, SEMANTIC_COLORS, SHORTCUT_IDS, SPREADSHEET_CLASSES, SPREADSHEET_ISSUE_MESSAGES, STACKED_TABLE_CLASSES, STARTER_KIT_COPILOT_SHORTCUT, STARTER_KIT_TOASTER_ID, SchemaBlock, SchemaComponent, SchemaComponentContext, SchemaComponentContextValue, SchemaComponentProps, SchemaContractCheck, SchemaPatch, SchemaRefreshResponse, SectionSchema, SelectColumnSchema, SelectOptionsResponse, SelectSchema, SelectionLimits, SelectionState, ShortcutDefinition, ShortcutGroup, ShortcutListGroup, ShortcutListItem, ShortcutOptions, ShortcutRecorder, ShortcutRegistry, ShortcutRegistryOptions, SimplePaginationSchema, Size, SliderBehavior, SliderNonLinearPoint, SliderPip, SliderPipSchema, SliderSchema, SlotDataValue, SlotItemSchema, SonnerPosition, SplitLayoutSchema, SpreadsheetAnnouncement, SpreadsheetCellKind, SpreadsheetChange, SpreadsheetColumn, SpreadsheetEdit, SpreadsheetGrid, SpreadsheetKey, SpreadsheetKeyResult, SpreadsheetRow, SpreadsheetSaveResult, SpreadsheetState, StackLayoutSchema, StandaloneComponentSchema, StandaloneComponentState, StandaloneDefaults, StarterKitBreadcrumb, StarterKitDashboardWidgetsSchema, StarterKitNavGroup, StarterKitNavItem, StarterKitNavigationSchema, StarterKitUserMenuItem, StarterKitWidgets, StarterKitWidgetsSchema, StatSchema, StatsOverviewWidgetSchema, StepSchema, StepValidationHaltedResponse, Store, StreamAnnouncer, StreamEvent, SubNavigationSchema, SuggestionEditor, SuggestionItem, SuggestionMatch, SuggestionState, SummaryValueSchema, TABLE_TOOLBAR_BUTTONS, TENANT_MENU_COMPONENT, TOOLBAR_COMMANDS, TRANSLATION_MANAGER_REGISTRY_KEY, TREE_REGISTRY_KEY, TabSchema, TableBlock, TableColumnSchema, TableDeferredTotalsSchema, TableEndpoints, TableGroupOptionSchema, TableGroupingSchema, TablePersistedStateKey, TableQuery, TableRecordGroupSchema, TableRecordSchema, TableSchema, TableSelection, TableSortSchema, TableSpreadsheetSchema, TableSummariesSchema, TableSummaryRowSchema, TableTotalsSchema, TableTriggerActionKey, TableTriggerActionSchema, TableTriggerModalSchema, TableViewItemSchema, TableViewOperation, TableViewResponse, TableViewsSchema, TableVisitCallbacks, TableWidgetSchema, TabsSchema, TagsInputSchema, TemporaryUploadOptions, TemporaryUploadResult, TenantSchema, TextAlignment, TextColumnSchema, TextEdit, TextEntrySchema, TextInputColumnSchema, TextInputSchema, TextSchema, TextStyleProps, TextareaSchema, ToastPosition, ToggleButtonsSchema, ToggleColumnSchema, ToggleSchema, ToolCommandContext, ToolbarCommand, ToolbarContext, ToolbarEditor, ToolbarKeyboardOptions, TranslatableLocaleSchema, TranslatableSchema, TranslationCellRef, TranslationCellSchema, TranslationFilter, TranslationHistoryEntry, TranslationHistoryState, TranslationKeyResult, TranslationLocaleSchema, TranslationManagerController, TranslationManagerEnvironment, TranslationManagerSchema, TranslationManagerState, TranslationProgressSchema, TranslationRowSchema, TranslationRowsResult, TranslationSaveResult, TranslationSuggestionSchema, Translator, TreeController, TreeDropPosition, TreeEnvironment, TreeKeyResult, TreeMove, TreeNodeSchema, TreeRow, TreeSaveResult, TreeSchema, TreeState, TreeStructureItem, TreeWidgetSchema, TriggerButtonDefaults, TriggerButtonView, USER_MENU_COMPONENT, UndoShortcuts, UnorderedListSchema, UploadedFile, VIRTUAL_ESTIMATES, VerticalAlignment, ViewColumnSchema, ViewEntrySchema, ViewSchema, VirtualList, VirtualListOptions, VirtualRange, VirtualizeSchema, WIZARD_STEP_QUERY_KEY, WidgetProps, WidgetSchema, WidgetsBlock, Width, WizardProgress, WizardSchema, acquireChannel, actionEndpoint, actionFormComponent, actionFormParams, actionPath, actionsAccessSelectedRecords, actionsAlignmentClass, activeTableView, addActionJustify, addGroup, addRule, allToolbarButtons, analyticsAllowed, analyticsChangeColor, analyticsInitialTab, announceDatabaseNotificationsSent, appendRepeaterItem, applyAppearance, applyBodyAttributes, applyDocumentLocale, applyEditorActionResult, applyFormRefresh, applyMask, applyPanelColors, applyPanelFavicon, applyPanelTheme, applyPwaUpdate, applySchemaPatches, ariaSort, asHelpdeskActivity, attachKanbanPointer, attachToolbarKeyboard, beginTableLoading, bindUndo, bindingFromEvent, bindsKeyBindings, bottomNavigationItems, buildChartConfig, buildQuery, buildTableUrl, builderBlockCounts, builderItemLabel, builderItemSchema, builderItems, builderPickerMove, byteLength, cachedTableTotals, calendarActionContext, calendarIdentity, calendarOptions, calendarWallTime, callCmsAutosave, callPageMethod, canAddBuilderBlock, canEditImage, canEditImageName, canInstallPwa, canNestGroup, canSelectAllRecords, cancelChunkedUpload, chartColorVariable, chartFiltersUrl, checkSchemaContract, clearRichEditorExtensions, clientErrorNotification, cloneIndexedState, cloneRepeaterItem, cloneTreeNodes, closeNotification, cmsAspectClass, cmsBlockAttributes, cmsBlockKey, cmsBlocks, cmsColumnsClass, cmsDesignCss, cmsDesignLinks, cmsGridClass, cmsHeadTags, cmsLinkRel, cmsPayload, cmsPreviewFitsBeside, cmsPreviewOpensByDefault, cmsPreviewOpensOnLoad, cmsPreviewPaneWidth, cmsWidthClass, coerceSpreadsheetValue, collapsesLanguageSwitcher, collectFieldStatePaths, collectFields, colorAlpha, colorToHex, columnDraftChanged, columnGroupHeaderRow, columnManagerPosition, columnOrderChanged, columnOrderClasses, columnRegistryKey, columnSpanClasses, columnStartClasses, columnVisibilityClasses, commandLabel, commandPaletteItems, commandShortcutId, completedStepIcon, componentHasErrors, concurrencyLimiter, configureCharts, configureRealtime, confirmModalClose, conflictMessage, constraintPickerClasses, constraintPickerSections, containerColumnSpanClasses, containerGridColumnsClasses, copilotBlocks, countCodeLines, createAnalyticsTracker, createAnotherState, createCmsTranslator, createKanbanFiltersStore, createLatestRequest, createRule, createSchemaComponentContext, createStore, csrfHeader, cssAspectRatio, currencyDecimals, currentPageQuery, currentRecordVersion, currentSocketId, currentStarterKitPanel, currentStarterKitPanelId, customBlockNodeConfig, customColorClasses, customPageProps, dashboardMoveForKey, debounce, debugRecorder, defaultActionContext, defaultActionKey, defaultVisibleColumns, deferredComponentReference, deferredHasErrors, deletePath, deprecate, deprecationMessage, derived, detailsNodeConfigs, discoveryKey, distributePageFormErrors, documentNonce, dropTreeNode, editableImageName, effectiveErrorNotifications, endTableLoading, errorNotificationOutcome, extremePageLinks, fetchEditableImage, fetchStandaloneComponents, fieldActionComponent, fieldActionContext, fieldAria, fieldDomId, fieldError, fieldIds, fieldMemory, fileAttachmentError, fileManagerAcceptAttribute, fileManagerAccepts, fileManagerErrorMessage, fileManagerExpiry, fileManagerSize, fileUploadAccept, fileUploadEntries, fileUploadPaths, filesFromClipboard, filterBuilderBlocks, filterCommandPalette, filterFormComponents, filterQueryBuilderOptions, filterSelectColumnOptions, filterSuggestionItems, filterTenants, filtersAreDeferred, filtersCollapsible, filtersFormWidthClass, filtersPlacement, findAutofocusField, findConstraint, findFieldByPath, findGridContext, findOperator, findPageFormBlock, findStandalonePropName, findSuggestionMatch, firstErroredItemIndex, firstErrors, fixedContainingBlockOffset, flattenActionGroup, flattenNavigationItems, flattenTreeStructure, flexItemClasses, flexLayoutClasses, floatingToolbarStyle, focusAutofocusField, focusMovedItem, focusTableSearch, focusToolbar, forgetFieldMemory, formActionsVisible, formIdPrefix, formIdentity, formRefreshFor, formatBytes, formatColor, formatKeyBinding, formatPhpDate, formatShortcut, fuzzyScore, getChartFormatters, getChartPlugins, getConflictForm, getEcho, getPageForm, getPath, getScriptData, getStoredAppearance, globalSearchDebounce, globalSearchStatus, globalSearchSuffix, gridColumnsClasses, gridContent, gridNodeConfigs, groupAt, groupBuilderBlocks, groupCustomBlocks, groupMenuItems, groupTableRows, groupTableViews, groupTriggerButton, guardModalUnload, hasActiveNavigationItem, hasCommandPalette, hasContainerBreakpoints, hasDevTools, hasMobilePreset, hasNewErrors, hasPath, hasRelationManagerTabs, hasRichEditorExtension, hasSlots, hasThemeSwitcher, hasTopbar, headingTag, helpdeskChatString, helpdeskFileSize, helpdeskSlaTone, highlightCode, highlightMarkConfig, htmlLabelToText, htmlToMarkdown, iconAlias, iconAliasOverride, iconButtonSize, iconGridMove, iconPickerPreview, iconSource, imageEditorOptionsKey, imageGeometry, indentCode, inertiaPost, inertiaReload, inertiaVisit, initialCollapsedGroups, initialTranslatableLocale, initialWizardStep, initializeAppearance, initials, insertBuilderItem, insertUploadedFile, inspectableProps, installErrorNotifications, installPrefetchInvalidation, installSpaUrlExceptions, installStarterKitRuntime, interpolate, invalidatePrefetchedPages, invalidateTableTotals, isActionGroup, isActionLoading, isActionProcessing, isAlfakitPage, isAllowedLinkUrl, isAppendingPagination, isCustomBlockResult, isCustomColorName, isCustomSvgIcon, isDeferredPlaceholder, isEditableTarget, isField, isFieldActionContext, isGroupedColumn, isHighlightedLanguage, isIconAlias, isImplicitSubmit, isIosSafari, isLazyPlaceholder, isLeavingVisit, isMacLike, isModalHiddenByChild, isModalSubmitVisible, isMutatingRequest, isNavigationItemActive, isOptionGroup, isPageFullySelected, isPartialFormPayload, isRealtimeEnabled, isRightToLeft, isSafeColor, isStandalone, isStandaloneComponent, isStarterKitPanel, isTableLoading, isToolbarGroup, isToolbarShortcut, isUndoFinished, isUndoShortcut, isValidShortcut, itemActionContext, itemActionIcon, itemExtraActions, joinPath, jsonEntries, jsonKind, jsonScalar, jsonSize, kanbanActiveFilters, kanbanCardPosition, kanbanCardsIn, kanbanInitials, kanbanMovePayload, kanbanRefusal, kanbanWipState, keepMoveButtonFocus, latestServerTiming, layoutColumnNames, layoutNodeGrows, layoutVisibilityClasses, lazyComponentCache, lazyComponents, leadExtensionConfig, limitedListItems, linkExtensionOptions, listTabIds, listTabUrl, listenForPageEvents, listenForRecordChanges, loadDeferredBadge, loadDeferredComponent, loadEditorImage, loadRichEditorExtensions, loadScript, loadStarterKitPanel, loadStyle, loadTableTotals, loadedStarterKitPanel, locateKanbanCard, logicalArrowKey, markFailedLazyWidgets, markRecordSubmitted, matchesKeyBinding, matchesShortcutStep, matchesUrlPattern, maxColumns, mentionNodeConfig, mentionText, menuActionContext, mergeAttributes, mergeChartOptions, mergeDeferredComponent, mergePolledComponents, mergeRefreshResponse, mergeStatePatch, mergeTagNodeConfig, mergeTagText, mobileCardLayout, mobileTable, modalFooterAlignment, modalTablePaging, modalTableQuery, modalTableSelected, moveColumn, moveColumnInManager, moveColumnTo, moveIndexedState, moveKanbanCard, moveListItem, moveRepeaterItem, moveTreeNode, navigationItemText, navigationItemUrl, nestedActionContext, newlineWithIndent, nextPageQuery, nextToolbarItem, normalizeRichEditorExtensions, normalizeRuleTree, notificationTintStyles, observeThemeChanges, onCloseNotification, onDatabaseNotificationsSent, onOpenDatabaseNotifications, onPageFormsChanged, onSaveConflict, oneTimeCodeDigits, openDatabaseNotifications, openDefaultAction, openRequestedStarterKitSearch, optimistic, optionText, orderColumnsBy, overlayPlacementDirection, pageFlash, pageFormName, pageSelectionState, paginationTotal, paletteGroupKey, panelAppearance, panelUploadOptions, parentPath, parseAspectRatio, parseDropdownPlacement, parseEventStream, parseGridColumns, parseInterval, parseKeyBinding, parseServerTiming, parseTsv, performUndo, persistWizardStep, pickerFilterFormOptions, pollComponent, pollPageProps, pollScheduler, postFormWithProgress, preferCurrentStarterKitPanel, prefetchTablePage, presenceInitials, prettyJson, previousPageQuery, primaryColumnName, promptPwaInstall, propsPollScheduler, pwaStore, queryBuilderInputType, queryBuilderOptions, readEventStream, readPersisted, realtimeHeaders, realtimeSettings, recordActionsAtStart, registerChartFormatters, registerChartPlugins, registerConflictForm, registerFormSubmitter, registerKeyBindings, registerPageForm, registerRichEditorExtensions, registerShortcut, registerStandaloneProp, registerStarterKitCopilotShortcut, registerStarterKitSearchShortcut, registerTablePersistence, relationGroupBadgeTarget, relationManagerBadgeTarget, relationManagerTabs, relationTabFromQuery, relationTabSlug, reloadExpiredPage, reloadOnExpiredPage, reloadPageProps, reloadPolledComponents, remainingTextSizeClass, rememberedCmsPreview, removeAllFilterIndicators, removeFilterIndicator, removeIndexedState, removeRepeaterItem, removeRule, reorderOffset, reorderTable, reorderedItemKeys, reorderingListsAllRecords, replaceComponentByKey, replacePlaceholder, reportRequestError, reportSaveConflict, reportSchemaContractMismatch, reportWizardProgress, reportedDeprecations, requestJson, requestStarterKitCopilot, requestStarterKitLanguages, requestStarterKitSearch, requestTableView, requiresFullPageLoad, reserveCmsPreviewSpace, resetChartRegistrations, resetDeprecations, resetPwa, resetRealtime, resetSchemaContractReports, resetStarterKitPanels, resetTableTotals, resizableImageAttributes, resizableImageOptions, resolveActionSize, resolveAppearance, resolveChartCallbacks, resolveContainerStatePath, resolveCssColor, resolveDeferredBadge, resolveDeferredGroupBadge, resolveEcho, resolveErrorNotification, resolveFirst, resolveFloatingToolbar, resolveItemAction, resolveLazyComponents, resolveNavigation, resolvePanelNavigation, resolvePartialProps, resolveRequestErrorNotification, resolveStatePath, resolveStickyOffset, resolveToastPosition, revealAutofocusField, router, runEditorCommands, runPageMethod, runsItemActionOnServer, saveColumnOrder, saveShortcutOverrides, saveSpreadsheetChanges, scheduleAutofocus, schemaComponentNames, schemaContractMajor, schemaContractMismatchMessage, schemaGapClass, scorePaletteItem, searchJson, searchTableColumnOptions, selectAllState, selectColumnEmptyMessage, selectPlural, selectedRecordsArguments, setAppearance, setCombinator, setIconAliases, setPath, setRecordVersion, setRequestErrorReporter, setTextColor, shortcutOverlayGroups, shortcutSteps, shortcuts, shortcutsClash, shouldChunkUpload, shouldConfirmModalClose, shouldResyncForm, shownRecordKeys, showsLanguageSwitcher, showsTableToolbar, sidebarDefaultOpen, sidebarWidthStyle, skeletonRowCount, slideOverSide, sliderBehavior, sliderBlocksTap, sliderBounds, sliderDirection, sliderFillSections, sliderFillStyle, sliderFromPrimitive, sliderHasTooltips, sliderNextValues, sliderPercent, sliderPips, sliderPrimitive, sliderShift, sliderShowsTooltip, sliderSnap, sliderState, sliderToPrimitive, sliderValueAt, sliderValues, slotAlignmentClass, slotDataMatches, slotItems, smallMarkConfig, splitClasses, splitPath, spreadsheetAnnouncement, spreadsheetAria, spreadsheetCellClass, spreadsheetCellId, spreadsheetCellKey, spreadsheetCellKind, spreadsheetColumns, spreadsheetRows, spreadsheetSelectionSize, stackClasses, stackedCellClasses, stackedImageStyle, standaloneDirection, standalonePageSchema, standalonePanelSchema, standaloneWidgetCount, startAnalytics, startDownload, startPwa, startSliderRangeDrag, startTableReordering, startUndoCountdown, starterKitBreadcrumbsFromProps, starterKitCopilot, starterKitDashboardWidgets, starterKitNavigation, starterKitNavigations, starterKitPanelLocale, starterKitWidgets, starterKitWidgetsPage, starterKitWidgetsPanel, stickyCollisionPadding, stopTableReordering, submitFormById, subscribeToNotifications, subscribeToPush, subscriptMarkConfig, superscriptMarkConfig, switchLocale, syncStarterKitPage, syncToolbarTabStops, t, tabFromQuery, tabKeyTarget, tabQueryValue, tabToReveal, tableColumnAlignmentClass, tableColumnCells, tableLoadingStore, tableQueryKey, tableTotalsFailed, tableTotalsStore, tableViewError, tableViewFollowUp, tableViewUrl, takeRequestedStarterKitCopilot, takeRequestedStarterKitLanguages, templateForIndex, tenantNameText, textAlignExtensionConfig, textColorMarkConfig, timeInputStep, toAsciiDigits, toEditorDocument, toStarterKitBreadcrumbs, toStarterKitNavGroups, toStarterKitUserMenuItems, toTsv, toggleButtonsNext, toggleButtonsSelected, toggleCollapsedGroup, toggleModalTableKey, togglePushNotifications, toggleVisibleColumn, toolCommand, toolbarButtonLabel, toolbarCommands, toolbarItems, toolbarPanel, trackAnalyticsEvent, transformImage, translatableLocaleField, translatableLocalesWithErrors, translationCellValue, translator, treeParentKeys, treeSubtreeHeight, triggerButtonView, undoShortcuts, uniqueId, unsubscribeFromPush, updateGroup, updateRule, updateTableCell, uploadPageMethodFiles, uploadTemporaryFile, uploadWithProgress, uploadedFileLinks, urlBase64ToUint8Array, usesDefaultImageStack, usesStarterKitHostLayout, virtualizeOptions, visibleColumns, visiblePresenceMembers, visibleTreeRows, visitTable, visitTableView, wallClockNow, watchPageProps, whenIdle, whenVisible, widgetPollTarget, widgetRegistryKeys, withAlpha, withColorAlpha, withDeferredTabBadges, withEcho, withItemActionState, withTableTotals, withoutDefaultActionQuery, withoutRequired, wizardProgressStore, wizardRequestedStepIndex, wizardStepFieldPaths, wizardStepQueryKey, wizardStepToReveal, writePersisted };
137
+ export { ACTION_PATH_SEPARATOR, ACTIVE_TAB_QUERY_KEY, AI_COPILOT_REGISTRY_KEY, AI_STREAM_REGISTRY_KEY, ALL_SELECTED_RECORDS_ARGUMENT, ActionButtonSize, ActionContext, ActionGroupSchema, ActionModalCancelledResponse, ActionModalSchema, ActionResultEditor, ActionResultFlash, ActionRunner, ActionRunnerOptions, ActionRunnerState, ActionSchema, ActionVariant, ActionsComponentSchema, Affixes, AiActionStatus, AiConversationSchema, AiCopilotSchema, AiMessageRole, AiMessageSchema, AiProposedActionSchema, AiSetupNoticeSchema, AiStreamController, AiStreamOptions, AiStreamSchema, AiStreamState, AiStreamStatus, AlfakitFlash, AlfakitOptions, AlfakitPageProps, Alignment, AnalyticsBreakdownRowSchema, AnalyticsBreakdownTabSchema, AnalyticsBreakdownWidgetSchema, AnalyticsTracker, AnalyticsTrackerOptions, AnyActionSchema, AnyPaginationSchema, Appearance, AppendingPaginationSchema, Attributes, BOTTOM_NAVIGATION_SLOTS, BROADCAST_NOTIFICATION, BUILT_IN_COLORS, BUILT_IN_WIDGET_TYPES, BaseColumnSchema, BaseComponent, BaseEntry, BaseField, BaseWidgetSchema, BlockProps, BottomNavigationItems, BreadcrumbSchema, Breakpoint, Breakpoints, BuilderBlockGroup, BuilderBlockSchema, BuilderItemSchema, BuilderItemState, BuilderPickerRect, BuilderSchema, BulkToggleActionSchema, CALENDAR_ARGUMENTS_KEY, CALENDAR_EVENT_DROP_ACTION, CALENDAR_EVENT_RESIZE_ACTION, CALENDAR_FETCH_EVENTS_ACTION, CALENDAR_REGISTRY_KEY, CLOSE_NOTIFICATION_EVENT, CMS_BLOCK_PREFIX, CMS_BUILT_IN_BLOCKS, CMS_FOOTER_KEY, CMS_FORM_KEY, CMS_HEADER_KEY, CMS_PAGE_COMPONENT, CMS_PREVIEW_DEVICES, CMS_PREVIEW_STORAGE_KEY, COMMANDS_COMPONENT, CONFLICT_ERROR_KEY, CONSTRAINT_PICKER_WIDTH_CLASSES, CONTAINER_BREAKPOINTS, CREATE_ANOTHER_ARGUMENT, CalendarChangeResult, CalendarEnvironment, CalendarEventApi, CalendarEventChangeInfo, CalendarEventClickInfo, CalendarEventSchema, CalendarFetchInfo, CalendarSelectInfo, CalendarView, CalendarWidgetSchema, CallPageMethodOptions, CalloutSchema, CellSchema, ChartConfigInput, ChartConfigOutput, ChartEmptyStateSchema, ChartFiltersFormSchema, ChartFormatter, ChartWidgetSchema, CheckboxColumnSchema, CheckboxListSchema, CheckboxSchema, CmsAdminBarSchema, CmsAlternateSchema, CmsAspectRatio, CmsAutosave, CmsAutosaveOptions, CmsAutosaveResult, CmsAutosaveSnapshot, CmsAutosaveStatus, CmsBlockSchema, CmsBlockStyle, CmsBreadcrumbSchema, CmsBuiltInBlocks, CmsCallToActionBlockData, CmsColumnsBlockData, CmsEditorStatusSchema, CmsEmbedBlockData, CmsFaqBlockData, CmsFeatureSchema, CmsFeaturesBlockData, CmsFormBlockData, CmsGalleryBlockData, CmsHeadTags, CmsHeroBlockData, CmsImageBlockData, CmsImageSchema, CmsLinkSchema, CmsLinkTag, CmsLivePreviewSchema, CmsMenuItemSchema, CmsMenuSchema, CmsMetaTag, CmsPageProps, CmsPageSchema, CmsPayload, CmsPreviewDevice, CmsRichTextBlockData, CmsSectionBlockData, CmsSeoSchema, CmsSiteDesign, CmsSiteSchema, CmsTestimonialSchema, CmsTestimonialsBlockData, CodeEditorSchema, CodeEntrySchema, CodeToken, CodeTokenKind, Color, ColorColumnSchema, ColorEntrySchema, ColorFormat, ColorPickerSchema, ColumnGroupHeaderCell, ColumnGroupSchema, ColumnLayoutColumnRef, ColumnLayoutNode, ColumnLayoutSchema, ColumnManagerPosition, ColumnProps, ColumnSchema, ColumnSpanValue, ColumnSummariesSchema, CommandPaletteLinkSchema, CommandPaletteResponse, CommandPaletteSchema, CommandSchema, ComponentDiscovery, ComponentRegistry, ConflictField, ConflictMonitor, ConflictMonitorOptions, ConflictMonitorState, ConflictsSchema, ConstraintPickerSection, ContainerBreakpoint, ContentBlock, ContentSlotItem, ContentSlotName, ContentSlotSchema, ContentSlots, CopilotController, CopilotControllerOptions, CopilotState, CopilotTotals, CopilotView, CropHandle, CropRect, CursorPaginationSchema, CustomBlockGroup, CustomBlockNodeOptions, CustomBlockPreview, CustomBlockResult, CustomWidgetSchema, DATABASE_NOTIFICATIONS_EVENT, DATABASE_NOTIFICATIONS_SENT, DEFAULT_ACTION_QUERY_KEYS, DEFAULT_LINK_PROTOCOLS, DEFAULT_VIRTUALIZE_THRESHOLD, DISCOVERY_FOLDERS, DashboardCustomizeSchema, DashboardEditor, DashboardEditorOptions, DashboardEditorState, DashboardLayoutEntry, DashboardLibraryWidget, DashboardMove, DashboardSpanOption, DashboardTranslator, DatabaseNotificationsResponse, DatePickerSchema, Debounced, DebugClosure, DebugDeprecation, DebugNode, DebugRecorder, DebugRequest, DebugRequestOutcome, DebugSchema, DebugServerTimings, DebugState, DefaultActionOpener, DefaultActionSchema, DeferredBadgeSchema, DeferredRequestOptions, DeferredTabBadges, DeprecationOptions, DevToolsClass, DevToolsContext, DevToolsSchema, Direction, DiscoveredEntry, DiscoveryFolder, DiscoveryKey, DiscoveryModules, DiscoveryOptions, DropdownPlacement, EchoChannelLike, EchoConnectionOptions, EchoEventChannel, EchoFactory, EchoLike, EchoPresenceChannelLike, EchoWithChannels, EditConflict, EditableColumnSchema, EditorAttachments, EditorSuggestions, EmptyStateComponentSchema, EmptyStateSchema, EntryProps, EntrySchema, ErrorNotificationEntrySchema, ErrorNotificationsSchema, ExecuteOptions, FIELD_ACTION_PREFIX, FIELD_TYPES, FILAMENT_CLOSE_NOTIFICATION_EVENT, FILE_MANAGER_DRAG_TYPE, FILE_MANAGER_PICKER_REGISTRY_KEY, FILE_MANAGER_REGISTRY_KEY, FILTERS_FORM_WIDTH_CLASSES, FILTERS_MODAL_WIDTH_CLASSES, FILTERS_SIDEBAR_WIDTH_CLASSES, FieldActionContextOptions, FieldActionResponse, FieldActions, FieldAriaAttributes, FieldAriaSource, FieldDescriptionIds, FieldProps, FieldSchema, FieldsetSchema, FileManagerActionNames, FileManagerBreadcrumbSchema, FileManagerClick, FileManagerController, FileManagerDataTransfer, FileManagerDetailsSchema, FileManagerDialog, FileManagerEntrySchema, FileManagerEnvironment, FileManagerFolderSchema, FileManagerKeyEvent, FileManagerKeyResult, FileManagerKind, FileManagerLinkSchema, FileManagerListingSchema, FileManagerPermissionsSchema, FileManagerPickedFileSchema, FileManagerPickerSchema, FileManagerPreviewSchema, FileManagerPreviewState, FileManagerResult, FileManagerSchema, FileManagerSort, FileManagerSortField, FileManagerState, FileManagerUpload, FileManagerUploader, FileUploadImageEditorSchema, FileUploadPositions, FileUploadSchema, FilterFormSync, FilterIndicator, FilterSchema, FiltersFormWidth, FiltersPlacement, FlashNotificationTracker, FlatNavigationItem, FlexSchema, FloatingToolbarEditor, FloatingToolbarState, FormBlock, FormPayload, FormState, FormStore, FormStoreOptions, FormattedStateProps, FusedGroupSchema, GLOBAL_SEARCH_DEBOUNCE, GRID_MAX_COLUMNS, GRID_MIN_COLUMNS, GlobalSearchGroupSchema, GlobalSearchResultSchema, GridBounds, GridCell, GridLayoutSchema, GridSchema, GroupSchema, GroupedTableRow, GuardedVisit, HELPDESK_ACTIVITY_EVENT, HELPDESK_SHORTCUTS, HELPDESK_TYPING_MS, HeadingTag, HelpdeskActivity, HelpdeskAttachment, HelpdeskBadge, HelpdeskChatClient, HelpdeskChatConfig, HelpdeskChatConversation, HelpdeskChatMessage, HelpdeskChatOptions, HelpdeskChatResponse, HelpdeskChatState, HelpdeskComposerMode, HelpdeskInboxController, HelpdeskInboxEnvironment, HelpdeskInboxList, HelpdeskInboxSchema, HelpdeskInboxState, HelpdeskMessage, HelpdeskSla, HelpdeskTicket, HelpdeskTicketSummary, HelpdeskView, HiddenSchema, HtmlSchema, HttpError, IMAGE_EDITOR_ZOOM_STEP, ITEM_MOVE_ATTRIBUTE, IconCellItem, IconColumnSchema, IconEntrySchema, IconName, IconPickerOption, IconPickerResponse, IconPickerSchema, IconPickerSearch, IconPickerSearchState, IconPickerSetSchema, IconPickerSource, IconPosition, IconSchema, IconSource, ImageCellSchema, ImageColumnSchema, ImageEditor, ImageEditorData, ImageEditorDragMode, ImageEditorMode, ImageEditorOptions, ImageEditorPoint, ImageEditorState, ImageEntrySchema, ImageGeometry, ImageSchema, ImageStackProps, ImageTransformOptions, ImpersonationSchema, ImplicitSubmitEvent, IndexedState, InfolistBlock, ItemActionFallback, ItemActionName, ItemActionSchema, ItemActionsItemProps, ItemActionsProps, ItemActionsSchema, ItemMoveDirection, ItemMoveTracker, JsonEntry, JsonKind, JsonRequestOptions, JsonSearchResult, KANBAN_NO_LANE, KANBAN_REGISTRY_KEY, KanbanAssigneeSchema, KanbanBadgeSchema, KanbanCardSchema, KanbanColumnSchema, KanbanController, KanbanEnvironment, KanbanFetchResult, KanbanFiltersSchema, KanbanKeyResult, KanbanLaneSchema, KanbanLocation, KanbanMoveResult, KanbanPicked, KanbanPointerOptions, KanbanRefusal, KanbanSchema, KanbanState, KanbanTarget, KanbanWidgetSchema, KeyLike, KeyValueEntrySchema, KeyValueSchema, KeyboardShortcutsSchema, LABEL_SLOTS, LAZY_PROP, LanguageSwitcherPosition, LatestRequest, LayoutSchema, LazyComponentCache, LazyRelationManagerSchema, LazyWidgetSchema, LinksBlock, ListTabSchema, ListTabsProps, Listener, LiveConfig, LivePropsOptions, LiveUpdates, LiveUpdatesOptions, LiveUpdatesSchema, LiveUpdatesState, LoadTableTotalsOptions, LoadedRichEditorExtensions, LocaleFormatter, LocaleSchema, LocalizationSchema, MAX_DEBUG_REQUESTS, MERGE_TAG_TRIGGER, MenuItemSchema, MergedRefresh, ModalTablePaging, ModalTableSelectResponse, ModalTableSelectSchema, MoneyInputSchema, MoneyOptions, NOT_PROSE_CLASS, NavigationBadgeSchema, NavigationGroupSchema, NavigationItemSchema, NavigationStateSchema, NotificationActionSchema, NotificationCenter, NotificationCenterState, NotificationEndpoints, NotificationSchema, NotificationUndoSchema, OPEN_DATABASE_NOTIFICATIONS_EVENT, OneTimeCodeInputSchema, OneTimeCodeSubmitter, OpenModal, Operation, Option, OptionGroup, OptionOrGroup, OptionsGridDirection, PAGE_EXPIRED_STATUS, PALETTE_GROUP_ORDER, PANEL_TOAST_OFFSET, PASSWORD_CONFIRMATION_INPUT, POLL_HEADER, POLL_PROP, PREFETCH_CACHE_FOR, PRESENCE_STATE_WHISPER, PageComponentProps, PageEventsOptions, PageLayout, PageMethodArguments, PageMethodCallOptions, PageMethodError, PageMethodResponse, PageMethodRuntime, PageSchema, PaginationSchema, PaletteGroup, PaletteItem, PaletteItemKind, PaletteLabels, PaletteSources, PanelDesignSchema, PanelEndpoints, PanelLayoutSchema, PanelSchema, PanelThemeSchema, PanelUserSchema, ParsedKeyBinding, PartialFormPayload, PastePlan, PathSegment, PersistStorage, PlaceholderSchema, PollScheduler, PolledComponents, PresenceMember, PresenceRoom, PresenceRoomOptions, PresenceRoomState, PresenceSchema, PresenceState, PwaInstallOutcome, PwaPushOutcome, PwaPushSchema, PwaPushStatus, PwaSchema, PwaState, QueryBuilderConstraintRule, QueryBuilderConstraintSchema, QueryBuilderGroup, QueryBuilderGroupRule, QueryBuilderInput, QueryBuilderOperatorSchema, QueryBuilderRule, QueryBuilderRulesSchema, RECORD_CHANGED_EVENT, RECORD_VERSION_INPUT, RELATION_MANAGERS_CONTENT_TAB, RELATION_QUERY_KEY, REMAINING_TEXT_SIZE_CLASSES, RadioSchema, RealtimeConfig, RealtimeSchema, RealtimeSubscriptionOptions, RecordChange, RecordKey, RecordVersionChangeSchema, RecordVersionSchema, RecordVersionsSchema, RegisteredShortcut, RelationGroupSchema, RelationManagerSchema, RelationManagerTab, RelationManagersBlock, RelationManagersContentTabSchema, RepeatableEntrySchema, RepeaterItemSchema, RepeaterItemState, RepeaterSchema, RichEditorCustomBlockSchema, RichEditorExtensionLoader, RichEditorMentionSchema, RichEditorMergeTagSchema, RichEditorPanel, RichEditorRemote, RichEditorSchema, RichEditorToolSchema, RichEditorToolbarGroupSchema, RulePath, SCHEMA_CONTRACT_VERSION, SELECTED_RECORDS_ARGUMENT, SEMANTIC_COLORS, SHORTCUT_IDS, SPREADSHEET_CLASSES, SPREADSHEET_ISSUE_MESSAGES, STACKED_TABLE_CLASSES, STARTER_KIT_COPILOT_SHORTCUT, STARTER_KIT_TOASTER_ID, SchemaBlock, SchemaComponent, SchemaComponentContext, SchemaComponentContextValue, SchemaComponentProps, SchemaContractCheck, SchemaPatch, SchemaRefreshResponse, SectionSchema, SelectColumnSchema, SelectOptionsResponse, SelectSchema, SelectionLimits, SelectionState, ShortcutDefinition, ShortcutGroup, ShortcutListGroup, ShortcutListItem, ShortcutOptions, ShortcutRecorder, ShortcutRegistry, ShortcutRegistryOptions, SimplePaginationSchema, Size, SliderBehavior, SliderNonLinearPoint, SliderPip, SliderPipSchema, SliderSchema, SlotDataValue, SlotItemSchema, SonnerPosition, SplitLayoutSchema, SpreadsheetAnnouncement, SpreadsheetCellKind, SpreadsheetChange, SpreadsheetColumn, SpreadsheetEdit, SpreadsheetGrid, SpreadsheetKey, SpreadsheetKeyResult, SpreadsheetRow, SpreadsheetSaveResult, SpreadsheetState, StackLayoutSchema, StandaloneComponentSchema, StandaloneComponentState, StandaloneDefaults, StarterKitBreadcrumb, StarterKitDashboardWidgetsSchema, StarterKitDocumentSchema, StarterKitNavGroup, StarterKitNavItem, StarterKitNavigationSchema, StarterKitUserMenuItem, StarterKitWidgets, StarterKitWidgetsSchema, StatSchema, StatsOverviewWidgetSchema, StepSchema, StepValidationHaltedResponse, Store, StreamAnnouncer, StreamEvent, SubNavigationSchema, SuggestionEditor, SuggestionItem, SuggestionMatch, SuggestionState, SummaryValueSchema, TABLE_TOOLBAR_BUTTONS, TENANT_MENU_COMPONENT, TOOLBAR_COMMANDS, TRANSLATION_MANAGER_REGISTRY_KEY, TREE_REGISTRY_KEY, TabSchema, TableBlock, TableColumnSchema, TableDeferredTotalsSchema, TableEndpoints, TableGroupOptionSchema, TableGroupingSchema, TablePersistedStateKey, TableQuery, TableRecordGroupSchema, TableRecordSchema, TableSchema, TableSelection, TableSortSchema, TableSpreadsheetSchema, TableSummariesSchema, TableSummaryRowSchema, TableTotalsSchema, TableTriggerActionKey, TableTriggerActionSchema, TableTriggerModalSchema, TableViewItemSchema, TableViewOperation, TableViewResponse, TableViewsSchema, TableVisitCallbacks, TableWidgetSchema, TabsSchema, TagsInputSchema, TemporaryUploadOptions, TemporaryUploadResult, TenantSchema, TextAlignment, TextColumnSchema, TextEdit, TextEntrySchema, TextInputColumnSchema, TextInputSchema, TextSchema, TextStyleProps, TextareaSchema, ToastPosition, ToggleButtonsSchema, ToggleColumnSchema, ToggleSchema, ToolCommandContext, ToolbarCommand, ToolbarContext, ToolbarEditor, ToolbarKeyboardOptions, TranslatableLocaleSchema, TranslatableSchema, TranslationCellRef, TranslationCellSchema, TranslationFilter, TranslationHistoryEntry, TranslationHistoryState, TranslationKeyResult, TranslationLocaleSchema, TranslationManagerController, TranslationManagerEnvironment, TranslationManagerSchema, TranslationManagerState, TranslationProgressSchema, TranslationRowSchema, TranslationRowsResult, TranslationSaveResult, TranslationSuggestionSchema, Translator, TreeController, TreeDropPosition, TreeEnvironment, TreeKeyResult, TreeMove, TreeNodeSchema, TreeRow, TreeSaveResult, TreeSchema, TreeState, TreeStructureItem, TreeWidgetSchema, TriggerButtonDefaults, TriggerButtonView, USER_MENU_COMPONENT, UndoShortcuts, UnorderedListSchema, UploadedFile, VIRTUAL_ESTIMATES, VerticalAlignment, ViewColumnSchema, ViewEntrySchema, ViewSchema, VirtualList, VirtualListOptions, VirtualRange, VirtualizeSchema, WIZARD_STEP_QUERY_KEY, WidgetProps, WidgetSchema, WidgetsBlock, Width, WizardProgress, WizardSchema, acquireChannel, actionEndpoint, actionFormComponent, actionFormParams, actionPath, actionsAccessSelectedRecords, actionsAlignmentClass, activeTableView, addActionJustify, addGroup, addRule, allToolbarButtons, analyticsAllowed, analyticsChangeColor, analyticsInitialTab, announceDatabaseNotificationsSent, appendRepeaterItem, applyAppearance, applyBodyAttributes, applyDocumentLocale, applyEditorActionResult, applyFormRefresh, applyMask, applyPanelColors, applyPanelFavicon, applyPanelTheme, applyPwaUpdate, applySchemaPatches, applyStarterKitDocument, ariaSort, asHelpdeskActivity, attachKanbanPointer, attachToolbarKeyboard, beginTableLoading, bindUndo, bindingFromEvent, bindsKeyBindings, bottomNavigationItems, buildChartConfig, buildQuery, buildTableUrl, builderBlockCounts, builderItemLabel, builderItemSchema, builderItems, builderPickerMove, byteLength, cachedTableTotals, calendarActionContext, calendarIdentity, calendarOptions, calendarWallTime, callCmsAutosave, callPageMethod, canAddBuilderBlock, canEditImage, canEditImageName, canInstallPwa, canNestGroup, canSelectAllRecords, cancelChunkedUpload, chartColorVariable, chartFiltersUrl, checkSchemaContract, clearRichEditorExtensions, clientErrorNotification, cloneIndexedState, cloneRepeaterItem, cloneTreeNodes, closeNotification, cmsAspectClass, cmsBlockAttributes, cmsBlockKey, cmsBlocks, cmsColumnsClass, cmsDesignCss, cmsDesignLinks, cmsGridClass, cmsHeadTags, cmsLinkRel, cmsPayload, cmsPreviewFitsBeside, cmsPreviewOpensByDefault, cmsPreviewOpensOnLoad, cmsPreviewPaneWidth, cmsWidthClass, coerceSpreadsheetValue, collapsesLanguageSwitcher, collectFieldStatePaths, collectFields, colorAlpha, colorToHex, columnDraftChanged, columnGroupHeaderRow, columnManagerPosition, columnOrderChanged, columnOrderClasses, columnRegistryKey, columnSpanClasses, columnStartClasses, columnVisibilityClasses, commandLabel, commandPaletteItems, commandShortcutId, completedStepIcon, componentHasErrors, concurrencyLimiter, configureCharts, configureRealtime, confirmModalClose, conflictMessage, constraintPickerClasses, constraintPickerSections, containerColumnSpanClasses, containerGridColumnsClasses, contentGridClasses, copilotBlocks, countCodeLines, createAnalyticsTracker, createAnotherState, createCmsTranslator, createKanbanFiltersStore, createLatestRequest, createRule, createSchemaComponentContext, createStore, csrfHeader, cssAspectRatio, currencyDecimals, currentPageQuery, currentRecordVersion, currentSocketId, currentStarterKitPanel, currentStarterKitPanelId, customBlockNodeConfig, customColorClasses, customPageProps, dashboardMoveForKey, debounce, debugRecorder, defaultActionContext, defaultActionKey, defaultVisibleColumns, deferredComponentReference, deferredHasErrors, deletePath, deprecate, deprecationMessage, derived, detailsNodeConfigs, discoveryKey, distributePageFormErrors, documentNonce, dropTreeNode, editableImageName, effectiveErrorNotifications, endTableLoading, errorNotificationOutcome, extremePageLinks, fetchEditableImage, fetchStandaloneComponents, fieldActionComponent, fieldActionContext, fieldAria, fieldDomId, fieldError, fieldIds, fieldMemory, fileAttachmentError, fileManagerAcceptAttribute, fileManagerAccepts, fileManagerErrorMessage, fileManagerExpiry, fileManagerSize, fileUploadAccept, fileUploadEntries, fileUploadPaths, filesFromClipboard, filterBuilderBlocks, filterCommandPalette, filterFormComponents, filterQueryBuilderOptions, filterSelectColumnOptions, filterSuggestionItems, filterTenants, filtersAreDeferred, filtersCollapsible, filtersFormWidthClass, filtersPlacement, findAutofocusField, findConstraint, findFieldByPath, findGridContext, findOperator, findPageFormBlock, findStandalonePropName, findSuggestionMatch, firstErroredItemIndex, firstErrors, fixedContainingBlockOffset, flattenActionGroup, flattenNavigationItems, flattenTreeStructure, flexItemClasses, flexLayoutClasses, floatingToolbarStyle, focusAutofocusField, focusMovedItem, focusTableSearch, focusToolbar, forgetFieldMemory, formActionsVisible, formIdPrefix, formIdentity, formRefreshFor, formatBytes, formatColor, formatKeyBinding, formatPhpDate, formatShortcut, fuzzyScore, getChartFormatters, getChartPlugins, getConflictForm, getEcho, getPageForm, getPath, getScriptData, getStoredAppearance, globalSearchDebounce, globalSearchStatus, globalSearchSuffix, gridColumnsClasses, gridContent, gridNodeConfigs, groupAt, groupBuilderBlocks, groupCustomBlocks, groupMenuItems, groupTableRows, groupTableViews, groupTriggerButton, guardModalUnload, hasActiveNavigationItem, hasCommandPalette, hasContainerBreakpoints, hasDevTools, hasMobilePreset, hasNewErrors, hasPath, hasRelationManagerTabs, hasRichEditorExtension, hasSlots, hasThemeSwitcher, hasTopbar, headingTag, helpdeskChatString, helpdeskFileSize, helpdeskSlaTone, highlightCode, highlightMarkConfig, htmlLabelToText, htmlToMarkdown, iconAlias, iconAliasOverride, iconButtonSize, iconGridMove, iconPickerPreview, iconSource, imageEditorOptionsKey, imageGeometry, indentCode, inertiaPost, inertiaReload, inertiaVisit, initialCollapsedGroups, initialTranslatableLocale, initialWizardStep, initializeAppearance, initials, insertBuilderItem, insertUploadedFile, inspectableProps, installErrorNotifications, installPrefetchInvalidation, installSpaUrlExceptions, installStarterKitDocument, installStarterKitRuntime, interpolate, invalidatePrefetchedPages, invalidateTableTotals, isActionGroup, isActionLoading, isActionProcessing, isAlfakitPage, isAllowedLinkUrl, isAppendingPagination, isCustomBlockResult, isCustomColorName, isCustomSvgIcon, isDeferredPlaceholder, isEditableTarget, isField, isFieldActionContext, isGroupedColumn, isHighlightedLanguage, isIconAlias, isImplicitSubmit, isIosSafari, isLazyPlaceholder, isLeavingVisit, isMacLike, isModalHiddenByChild, isModalSubmitVisible, isMutatingRequest, isNavigationItemActive, isOptionGroup, isPageFullySelected, isPartialFormPayload, isRealtimeEnabled, isRightToLeft, isSafeColor, isStandalone, isStandaloneComponent, isStarterKitPanel, isTableLoading, isToolbarGroup, isToolbarShortcut, isUndoFinished, isUndoShortcut, isValidShortcut, isolationDirection, itemActionContext, itemActionIcon, itemExtraActions, joinPath, jsonEntries, jsonKind, jsonScalar, jsonSize, kanbanActiveFilters, kanbanCardPosition, kanbanCardsIn, kanbanInitials, kanbanMovePayload, kanbanRefusal, kanbanWipState, keepMoveButtonFocus, latestServerTiming, layoutColumnNames, layoutNodeGrows, layoutVisibilityClasses, lazyComponentCache, lazyComponents, leadExtensionConfig, limitedListItems, linkExtensionOptions, listTabIds, listTabUrl, listenForPageEvents, listenForRecordChanges, loadDeferredBadge, loadDeferredComponent, loadEditorImage, loadRichEditorExtensions, loadScript, loadStarterKitPanel, loadStyle, loadTableTotals, loadedStarterKitPanel, locateKanbanCard, logicalArrowKey, markFailedLazyWidgets, markRecordSubmitted, matchesKeyBinding, matchesShortcutStep, matchesUrlPattern, maxColumns, mentionNodeConfig, mentionText, menuActionContext, mergeAttributes, mergeChartOptions, mergeDeferredComponent, mergePolledComponents, mergeRefreshResponse, mergeStatePatch, mergeTagNodeConfig, mergeTagText, mobileCardLayout, mobileTable, modalFooterAlignment, modalTablePaging, modalTableQuery, modalTableSelected, moveColumn, moveColumnInManager, moveColumnTo, moveIndexedState, moveKanbanCard, moveListItem, moveRepeaterItem, moveTreeNode, navigationItemText, navigationItemUrl, nestedActionContext, newlineWithIndent, nextPageQuery, nextToolbarItem, normalizeRichEditorExtensions, normalizeRuleTree, notificationTintStyles, observeThemeChanges, onCloseNotification, onDatabaseNotificationsSent, onOpenDatabaseNotifications, onPageFormsChanged, onSaveConflict, oneTimeCodeDigits, openDatabaseNotifications, openDefaultAction, openRequestedStarterKitSearch, optimistic, optionText, orderColumnsBy, overlayPlacementDirection, pageFlash, pageFormName, pageSelectionState, paginationTotal, paletteGroupKey, panelAppearance, panelUploadOptions, parentPath, parseAspectRatio, parseDropdownPlacement, parseEventStream, parseGridColumns, parseInterval, parseKeyBinding, parseServerTiming, parseTsv, performUndo, persistWizardStep, pickerFilterFormOptions, pollComponent, pollPageProps, pollScheduler, postFormWithProgress, preferCurrentStarterKitPanel, prefetchTablePage, presenceInitials, prettyJson, previousPageQuery, primaryColumnName, promptPwaInstall, propsPollScheduler, pwaStore, queryBuilderInputType, queryBuilderOptions, readEventStream, readPersisted, realtimeHeaders, realtimeSettings, recordActionsAtStart, registerChartFormatters, registerChartPlugins, registerConflictForm, registerFormSubmitter, registerKeyBindings, registerPageForm, registerRichEditorExtensions, registerShortcut, registerStandaloneProp, registerStarterKitCopilotShortcut, registerStarterKitSearchShortcut, registerTablePersistence, relationGroupBadgeTarget, relationManagerBadgeTarget, relationManagerTabs, relationTabFromQuery, relationTabSlug, reloadExpiredPage, reloadOnExpiredPage, reloadPageProps, reloadPolledComponents, remainingTextSizeClass, rememberedCmsPreview, removeAllFilterIndicators, removeFilterIndicator, removeIndexedState, removeRepeaterItem, removeRule, reorderOffset, reorderTable, reorderedItemKeys, reorderingListsAllRecords, replaceComponentByKey, replacePlaceholder, reportRequestError, reportSaveConflict, reportSchemaContractMismatch, reportWizardProgress, reportedDeprecations, requestJson, requestStarterKitCopilot, requestStarterKitLanguages, requestStarterKitSearch, requestTableView, requiresFullPageLoad, reserveCmsPreviewSpace, resetChartRegistrations, resetDeprecations, resetPwa, resetRealtime, resetSchemaContractReports, resetStarterKitPanels, resetTableTotals, resizableImageAttributes, resizableImageOptions, resolveActionSize, resolveAppearance, resolveChartCallbacks, resolveContainerStatePath, resolveCssColor, resolveDeferredBadge, resolveDeferredGroupBadge, resolveEcho, resolveErrorNotification, resolveFirst, resolveFloatingToolbar, resolveItemAction, resolveLazyComponents, resolveNavigation, resolvePanelNavigation, resolvePartialProps, resolveRequestErrorNotification, resolveStatePath, resolveStickyOffset, resolveToastPosition, revealAutofocusField, router, runEditorCommands, runPageMethod, runsItemActionOnServer, saveColumnOrder, saveShortcutOverrides, saveSpreadsheetChanges, scheduleAutofocus, schemaComponentNames, schemaContractMajor, schemaContractMismatchMessage, schemaGapClass, scorePaletteItem, searchJson, searchTableColumnOptions, selectAllState, selectColumnEmptyMessage, selectPlural, selectedRecordsArguments, setAppearance, setCombinator, setIconAliases, setPath, setRecordVersion, setRequestErrorReporter, setTextColor, shortcutOverlayGroups, shortcutSteps, shortcuts, shortcutsClash, shouldChunkUpload, shouldConfirmModalClose, shouldResyncForm, shownRecordKeys, showsLanguageSwitcher, showsTableToolbar, sidebarDefaultOpen, sidebarWidthStyle, skeletonRowCount, slideOverSide, sliderBehavior, sliderBlocksTap, sliderBounds, sliderDirection, sliderFillSections, sliderFillStyle, sliderFromPrimitive, sliderHasTooltips, sliderNextValues, sliderPercent, sliderPips, sliderPrimitive, sliderShift, sliderShowsTooltip, sliderSnap, sliderState, sliderToPrimitive, sliderValueAt, sliderValues, slotAlignmentClass, slotDataMatches, slotItems, smallMarkConfig, splitClasses, splitPath, spreadsheetAnnouncement, spreadsheetAria, spreadsheetCellClass, spreadsheetCellId, spreadsheetCellKey, spreadsheetCellKind, spreadsheetColumns, spreadsheetRows, spreadsheetSelectionSize, stackClasses, stackedCellClasses, stackedImageStyle, standaloneDirection, standalonePageSchema, standalonePanelSchema, standaloneWidgetCount, startAnalytics, startDownload, startPwa, startSliderRangeDrag, startTableReordering, startUndoCountdown, starterKitBreadcrumbsFromProps, starterKitCopilot, starterKitDashboardWidgets, starterKitDirection, starterKitDocument, starterKitNavigation, starterKitNavigations, starterKitPanelLocale, starterKitSidebarSide, starterKitWidgets, starterKitWidgetsPage, starterKitWidgetsPanel, stickyCollisionPadding, stopTableReordering, submitFormById, subscribeToNotifications, subscribeToPush, subscriptMarkConfig, superscriptMarkConfig, switchLocale, syncStarterKitPage, syncToolbarTabStops, t, tabFromQuery, tabKeyTarget, tabQueryValue, tabToReveal, tableColumnAlignmentClass, tableColumnCells, tableLoadingStore, tableQueryKey, tableTotalsFailed, tableTotalsStore, tableViewError, tableViewFollowUp, tableViewUrl, takeRequestedStarterKitCopilot, takeRequestedStarterKitLanguages, templateForIndex, tenantNameText, textAlignExtensionConfig, textColorMarkConfig, timeInputStep, toAsciiDigits, toEditorDocument, toStarterKitBreadcrumbs, toStarterKitNavGroups, toStarterKitUserMenuItems, toTsv, toggleButtonsNext, toggleButtonsSelected, toggleCollapsedGroup, toggleModalTableKey, togglePushNotifications, toggleVisibleColumn, toolCommand, toolbarButtonLabel, toolbarCommands, toolbarItems, toolbarPanel, trackAnalyticsEvent, transformImage, translatableLocaleField, translatableLocalesWithErrors, translationCellValue, translator, treeParentKeys, treeSubtreeHeight, triggerButtonView, undoShortcuts, uniqueId, unsubscribeFromPush, updateGroup, updateRule, updateTableCell, uploadPageMethodFiles, uploadTemporaryFile, uploadWithProgress, uploadedFileLinks, urlBase64ToUint8Array, usesDefaultImageStack, usesStarterKitHostLayout, virtualizeOptions, visibleColumns, visiblePresenceMembers, visibleTreeRows, visitTable, visitTableView, wallClockNow, watchPageProps, whenIdle, whenVisible, widgetPollTarget, widgetRegistryKeys, withAlpha, withColorAlpha, withDeferredTabBadges, withEcho, withItemActionState, withTableTotals, withoutDefaultActionQuery, withoutRequired, wizardProgressStore, wizardRequestedStepIndex, wizardStepFieldPaths, wizardStepQueryKey, wizardStepToReveal, writePersisted };
package/dist/index.js CHANGED
@@ -35,7 +35,7 @@ import { CALENDAR_ARGUMENTS_KEY, CALENDAR_EVENT_DROP_ACTION, CALENDAR_EVENT_RESI
35
35
  import { buildChartConfig, chartColorVariable, configureCharts, getChartFormatters, getChartPlugins, mergeChartOptions, observeThemeChanges, registerChartFormatters, registerChartPlugins, resetChartRegistrations, resolveChartCallbacks, resolveCssColor, withAlpha } from "./chart.js";
36
36
  import { POLL_HEADER, POLL_PROP, PollScheduler, mergePolledComponents, pollComponent, pollScheduler, reloadPolledComponents, widgetPollTarget } from "./poll.js";
37
37
  import { LAZY_PROP, LazyComponentCache, isLazyPlaceholder, lazyComponentCache, relationGroupBadgeTarget, relationManagerBadgeTarget, resolveDeferredBadge, resolveDeferredGroupBadge, resolveLazyComponents } from "./lazy.js";
38
- import { LocaleFormatter, Translator, applyDocumentLocale, collapsesLanguageSwitcher, currencyDecimals, formatPhpDate, selectPlural, showsLanguageSwitcher, switchLocale, t, toAsciiDigits, translator } from "./i18n.js";
38
+ import { LocaleFormatter, Translator, applyDocumentLocale, collapsesLanguageSwitcher, currencyDecimals, formatPhpDate, isolationDirection, selectPlural, showsLanguageSwitcher, switchLocale, t, toAsciiDigits, translator } from "./i18n.js";
39
39
  import { CMS_BLOCK_PREFIX, CMS_BUILT_IN_BLOCKS, CMS_FOOTER_KEY, CMS_FORM_KEY, CMS_HEADER_KEY, CMS_PAGE_COMPONENT, cmsAspectClass, cmsBlockAttributes, cmsBlockKey, cmsBlocks, cmsColumnsClass, cmsDesignCss, cmsDesignLinks, cmsGridClass, cmsHeadTags, cmsLinkRel, cmsPayload, cmsWidthClass, createCmsTranslator } from "./cms.js";
40
40
  import { PageMethodError, callPageMethod, distributePageFormErrors, firstErrors, getPageForm, onPageFormsChanged, optimistic, pageFormName, registerPageForm, uploadPageMethodFiles } from "./page-methods.js";
41
41
  import { CMS_PREVIEW_DEVICES, CMS_PREVIEW_STORAGE_KEY, CmsAutosave, callCmsAutosave, cmsPreviewFitsBeside, cmsPreviewOpensByDefault, cmsPreviewOpensOnLoad, cmsPreviewPaneWidth, rememberedCmsPreview, reserveCmsPreviewSpace } from "./cms-live-preview.js";
@@ -94,6 +94,7 @@ import { UndoShortcuts, bindUndo, isUndoFinished, isUndoShortcut, performUndo, s
94
94
  import { SPREADSHEET_CLASSES, SPREADSHEET_ISSUE_MESSAGES, SpreadsheetGrid, coerceSpreadsheetValue, parseTsv, saveSpreadsheetChanges, spreadsheetAnnouncement, spreadsheetAria, spreadsheetCellClass, spreadsheetCellId, spreadsheetCellKey, spreadsheetCellKind, spreadsheetColumns, spreadsheetRows, spreadsheetSelectionSize, toTsv } from "./spreadsheet.js";
95
95
  import { StandaloneComponentState, fetchStandaloneComponents, findStandalonePropName, markFailedLazyWidgets, standaloneDirection, standalonePageSchema, standalonePanelSchema } from "./standalone.js";
96
96
  import { STARTER_KIT_TOASTER_ID, currentStarterKitPanel, currentStarterKitPanelId, customPageProps, installStarterKitRuntime, isStarterKitPanel, preferCurrentStarterKitPanel, starterKitBreadcrumbsFromProps, starterKitNavigation, starterKitNavigations, syncStarterKitPage, toStarterKitBreadcrumbs, toStarterKitNavGroups, toStarterKitUserMenuItems, usesStarterKitHostLayout } from "./starter-kit.js";
97
+ import { applyStarterKitDocument, installStarterKitDocument, starterKitDirection, starterKitDocument, starterKitSidebarSide } from "./starter-kit-document.js";
97
98
  import { STARTER_KIT_COPILOT_SHORTCUT, isAlfakitPage, loadStarterKitPanel, loadedStarterKitPanel, openRequestedStarterKitSearch, registerStarterKitCopilotShortcut, registerStarterKitSearchShortcut, requestStarterKitCopilot, requestStarterKitLanguages, requestStarterKitSearch, resetStarterKitPanels, standaloneWidgetCount, starterKitCopilot, starterKitDashboardWidgets, starterKitPanelLocale, starterKitWidgets, starterKitWidgetsPage, starterKitWidgetsPanel, takeRequestedStarterKitCopilot, takeRequestedStarterKitLanguages } from "./starter-kit-widgets.js";
98
99
  import { groupTableRows, initialCollapsedGroups, toggleCollapsedGroup } from "./table-grouping.js";
99
100
  import { columnGroupHeaderRow, columnManagerPosition, columnOrderChanged, columnVisibilityClasses, isAppendingPagination, isGroupedColumn, keepMoveButtonFocus, layoutColumnNames, layoutNodeGrows, layoutVisibilityClasses, moveColumn, moveColumnInManager, moveColumnTo, nextPageQuery, orderColumnsBy, paginationTotal, previousPageQuery, recordActionsAtStart, saveColumnOrder, splitClasses, stackClasses } from "./table-layout.js";
@@ -105,10 +106,10 @@ import { TREE_REGISTRY_KEY, TreeController, cloneTreeNodes, dropTreeNode, flatte
105
106
  import { ariaSort, fieldAria, fieldIds, logicalArrowKey, moveListItem, pageSelectionState, primaryColumnName, reorderOffset, selectAllState, withoutRequired } from "./utils/a11y.js";
106
107
  import { EditorAttachments } from "./utils/attachments.js";
107
108
  import { colorAlpha, colorToHex, formatColor, withColorAlpha } from "./utils/color.js";
108
- import { CONTAINER_BREAKPOINTS, containerColumnSpanClasses, containerGridColumnsClasses, flexItemClasses, flexLayoutClasses, hasContainerBreakpoints } from "./utils/container-breakpoints.js";
109
+ import { CONTAINER_BREAKPOINTS, containerColumnSpanClasses, containerGridColumnsClasses, contentGridClasses, flexItemClasses, flexLayoutClasses, hasContainerBreakpoints } from "./utils/container-breakpoints.js";
109
110
  import { wallClockNow } from "./utils/datetime.js";
110
111
  import { createLatestRequest } from "./utils/latest.js";
111
112
  import { applyMask } from "./utils/mask.js";
112
113
  import { DEFAULT_VIRTUALIZE_THRESHOLD, VIRTUAL_ESTIMATES, VirtualList, firstErroredItemIndex, hasNewErrors, virtualizeOptions } from "./virtual.js";
113
114
  import { WIZARD_STEP_QUERY_KEY, completedStepIcon, initialWizardStep, persistWizardStep, wizardRequestedStepIndex, wizardStepFieldPaths, wizardStepQueryKey } from "./wizard.js";
114
- export { ACTION_PATH_SEPARATOR, ACTIVE_TAB_QUERY_KEY, AI_COPILOT_REGISTRY_KEY, AI_STREAM_REGISTRY_KEY, ALL_SELECTED_RECORDS_ARGUMENT, ActionRunner, AiStreamController, BOTTOM_NAVIGATION_SLOTS, BROADCAST_NOTIFICATION, BUILT_IN_COLORS, BUILT_IN_WIDGET_TYPES, CALENDAR_ARGUMENTS_KEY, CALENDAR_EVENT_DROP_ACTION, CALENDAR_EVENT_RESIZE_ACTION, CALENDAR_FETCH_EVENTS_ACTION, CALENDAR_REGISTRY_KEY, CLOSE_NOTIFICATION_EVENT, CMS_BLOCK_PREFIX, CMS_BUILT_IN_BLOCKS, CMS_FOOTER_KEY, CMS_FORM_KEY, CMS_HEADER_KEY, CMS_PAGE_COMPONENT, CMS_PREVIEW_DEVICES, CMS_PREVIEW_STORAGE_KEY, COMMANDS_COMPONENT, CONFLICT_ERROR_KEY, CONSTRAINT_PICKER_WIDTH_CLASSES, CONTAINER_BREAKPOINTS, CREATE_ANOTHER_ARGUMENT, CmsAutosave, ComponentDiscovery, ComponentRegistry, ConflictMonitor, CopilotController, DATABASE_NOTIFICATIONS_EVENT, DATABASE_NOTIFICATIONS_SENT, DEFAULT_ACTION_QUERY_KEYS, DEFAULT_LINK_PROTOCOLS, DEFAULT_VIRTUALIZE_THRESHOLD, DISCOVERY_FOLDERS, DashboardEditor, DebugRecorder, EditorAttachments, EditorSuggestions, FIELD_ACTION_PREFIX, FIELD_TYPES, FILAMENT_CLOSE_NOTIFICATION_EVENT, FILE_MANAGER_DRAG_TYPE, FILE_MANAGER_PICKER_REGISTRY_KEY, FILE_MANAGER_REGISTRY_KEY, FILTERS_FORM_WIDTH_CLASSES, FILTERS_MODAL_WIDTH_CLASSES, FILTERS_SIDEBAR_WIDTH_CLASSES, FileManagerController, FilterFormSync, FlashNotificationTracker, FormStore, GLOBAL_SEARCH_DEBOUNCE, GRID_MAX_COLUMNS, GRID_MIN_COLUMNS, HELPDESK_ACTIVITY_EVENT, HELPDESK_SHORTCUTS, HELPDESK_TYPING_MS, HelpdeskChatClient, HelpdeskInboxController, HttpError, IMAGE_EDITOR_ZOOM_STEP, ITEM_MOVE_ATTRIBUTE, IconPickerSearch, ImageEditor, ItemMoveTracker, KANBAN_NO_LANE, KANBAN_REGISTRY_KEY, KanbanController, LABEL_SLOTS, LAZY_PROP, LazyComponentCache, LiveUpdates, LocaleFormatter, MAX_DEBUG_REQUESTS, MERGE_TAG_TRIGGER, NOT_PROSE_CLASS, NotificationCenter, OPEN_DATABASE_NOTIFICATIONS_EVENT, OneTimeCodeSubmitter, PAGE_EXPIRED_STATUS, PALETTE_GROUP_ORDER, PANEL_TOAST_OFFSET, PASSWORD_CONFIRMATION_INPUT, POLL_HEADER, POLL_PROP, PREFETCH_CACHE_FOR, PRESENCE_STATE_WHISPER, PageMethodError, PollScheduler, PresenceRoom, RECORD_CHANGED_EVENT, RECORD_VERSION_INPUT, RELATION_MANAGERS_CONTENT_TAB, RELATION_QUERY_KEY, REMAINING_TEXT_SIZE_CLASSES, RichEditorRemote, SCHEMA_CONTRACT_VERSION, SELECTED_RECORDS_ARGUMENT, SEMANTIC_COLORS, SHORTCUT_IDS, SPREADSHEET_CLASSES, SPREADSHEET_ISSUE_MESSAGES, STACKED_TABLE_CLASSES, STARTER_KIT_COPILOT_SHORTCUT, STARTER_KIT_TOASTER_ID, ShortcutRecorder, ShortcutRegistry, SpreadsheetGrid, StandaloneComponentState, StreamAnnouncer, TABLE_TOOLBAR_BUTTONS, TENANT_MENU_COMPONENT, TOOLBAR_COMMANDS, TRANSLATION_MANAGER_REGISTRY_KEY, TREE_REGISTRY_KEY, TableSelection, TranslationManagerController, Translator, TreeController, USER_MENU_COMPONENT, UndoShortcuts, VIRTUAL_ESTIMATES, VirtualList, WIZARD_STEP_QUERY_KEY, acquireChannel, actionEndpoint, actionFormComponent, actionFormParams, actionPath, actionsAccessSelectedRecords, actionsAlignmentClass, activeTableView, addActionJustify, addGroup, addRule, allToolbarButtons, analyticsAllowed, analyticsChangeColor, analyticsInitialTab, announceDatabaseNotificationsSent, appendRepeaterItem, applyAppearance, applyBodyAttributes, applyDocumentLocale, applyEditorActionResult, applyFormRefresh, applyMask, applyPanelColors, applyPanelFavicon, applyPanelTheme, applyPwaUpdate, applySchemaPatches, ariaSort, asHelpdeskActivity, attachKanbanPointer, attachToolbarKeyboard, beginTableLoading, bindUndo, bindingFromEvent, bindsKeyBindings, bottomNavigationItems, buildChartConfig, buildQuery, buildTableUrl, builderBlockCounts, builderItemLabel, builderItemSchema, builderItems, builderPickerMove, byteLength, cachedTableTotals, calendarActionContext, calendarIdentity, calendarOptions, calendarWallTime, callCmsAutosave, callPageMethod, canAddBuilderBlock, canEditImage, canEditImageName, canInstallPwa, canNestGroup, canSelectAllRecords, cancelChunkedUpload, chartColorVariable, chartFiltersUrl, checkSchemaContract, clearRichEditorExtensions, clientErrorNotification, cloneIndexedState, cloneRepeaterItem, cloneTreeNodes, closeNotification, cmsAspectClass, cmsBlockAttributes, cmsBlockKey, cmsBlocks, cmsColumnsClass, cmsDesignCss, cmsDesignLinks, cmsGridClass, cmsHeadTags, cmsLinkRel, cmsPayload, cmsPreviewFitsBeside, cmsPreviewOpensByDefault, cmsPreviewOpensOnLoad, cmsPreviewPaneWidth, cmsWidthClass, coerceSpreadsheetValue, collapsesLanguageSwitcher, collectFieldStatePaths, collectFields, colorAlpha, colorToHex, columnDraftChanged, columnGroupHeaderRow, columnManagerPosition, columnOrderChanged, columnOrderClasses, columnRegistryKey, columnSpanClasses, columnStartClasses, columnVisibilityClasses, commandLabel, commandPaletteItems, commandShortcutId, completedStepIcon, componentHasErrors, concurrencyLimiter, configureCharts, configureRealtime, confirmModalClose, conflictMessage, constraintPickerClasses, constraintPickerSections, containerColumnSpanClasses, containerGridColumnsClasses, copilotBlocks, countCodeLines, createAnalyticsTracker, createAnotherState, createCmsTranslator, createKanbanFiltersStore, createLatestRequest, createRule, createSchemaComponentContext, createStore, csrfHeader, cssAspectRatio, currencyDecimals, currentPageQuery, currentRecordVersion, currentSocketId, currentStarterKitPanel, currentStarterKitPanelId, customBlockNodeConfig, customColorClasses, customPageProps, dashboardMoveForKey, debounce, debugRecorder, defaultActionContext, defaultActionKey, defaultVisibleColumns, deferredComponentReference, deferredHasErrors, deletePath, deprecate, deprecationMessage, derived, detailsNodeConfigs, discoveryKey, distributePageFormErrors, documentNonce, dropTreeNode, editableImageName, effectiveErrorNotifications, endTableLoading, errorNotificationOutcome, extremePageLinks, fetchEditableImage, fetchStandaloneComponents, fieldActionComponent, fieldActionContext, fieldAria, fieldDomId, fieldError, fieldIds, fieldMemory, fileAttachmentError, fileManagerAcceptAttribute, fileManagerAccepts, fileManagerErrorMessage, fileManagerExpiry, fileManagerSize, fileUploadAccept, fileUploadEntries, fileUploadPaths, filesFromClipboard, filterBuilderBlocks, filterCommandPalette, filterFormComponents, filterQueryBuilderOptions, filterSelectColumnOptions, filterSuggestionItems, filterTenants, filtersAreDeferred, filtersCollapsible, filtersFormWidthClass, filtersPlacement, findAutofocusField, findConstraint, findFieldByPath, findGridContext, findOperator, findPageFormBlock, findStandalonePropName, findSuggestionMatch, firstErroredItemIndex, firstErrors, fixedContainingBlockOffset, flattenActionGroup, flattenNavigationItems, flattenTreeStructure, flexItemClasses, flexLayoutClasses, floatingToolbarStyle, focusAutofocusField, focusMovedItem, focusTableSearch, focusToolbar, forgetFieldMemory, formActionsVisible, formIdPrefix, formIdentity, formRefreshFor, formatBytes, formatColor, formatKeyBinding, formatPhpDate, formatShortcut, fuzzyScore, getChartFormatters, getChartPlugins, getConflictForm, getEcho, getPageForm, getPath, getScriptData, getStoredAppearance, globalSearchDebounce, globalSearchStatus, globalSearchSuffix, gridColumnsClasses, gridContent, gridNodeConfigs, groupAt, groupBuilderBlocks, groupCustomBlocks, groupMenuItems, groupTableRows, groupTableViews, groupTriggerButton, guardModalUnload, hasActiveNavigationItem, hasCommandPalette, hasContainerBreakpoints, hasDevTools, hasMobilePreset, hasNewErrors, hasPath, hasRelationManagerTabs, hasRichEditorExtension, hasSlots, hasThemeSwitcher, hasTopbar, headingTag, helpdeskChatString, helpdeskFileSize, helpdeskSlaTone, highlightCode, highlightMarkConfig, htmlLabelToText, htmlToMarkdown, iconAlias, iconAliasOverride, iconButtonSize, iconGridMove, iconPickerPreview, iconSource, imageEditorOptionsKey, imageGeometry, indentCode, inertiaPost, inertiaReload, inertiaVisit, initialCollapsedGroups, initialTranslatableLocale, initialWizardStep, initializeAppearance, initials, insertBuilderItem, insertUploadedFile, inspectableProps, installErrorNotifications, installPrefetchInvalidation, installSpaUrlExceptions, installStarterKitRuntime, interpolate, invalidatePrefetchedPages, invalidateTableTotals, isActionGroup, isActionLoading, isActionProcessing, isAlfakitPage, isAllowedLinkUrl, isAppendingPagination, isCustomBlockResult, isCustomColorName, isCustomSvgIcon, isDeferredPlaceholder, isEditableTarget, isField, isFieldActionContext, isGroupedColumn, isHighlightedLanguage, isIconAlias, isImplicitSubmit, isIosSafari, isLazyPlaceholder, isLeavingVisit, isMacLike, isModalHiddenByChild, isModalSubmitVisible, isMutatingRequest, isNavigationItemActive, isOptionGroup, isPageFullySelected, isPartialFormPayload, isRealtimeEnabled, isRightToLeft, isSafeColor, isStandalone, isStandaloneComponent, isStarterKitPanel, isTableLoading, isToolbarGroup, isToolbarShortcut, isUndoFinished, isUndoShortcut, isValidShortcut, itemActionContext, itemActionIcon, itemExtraActions, joinPath, jsonEntries, jsonKind, jsonScalar, jsonSize, kanbanActiveFilters, kanbanCardPosition, kanbanCardsIn, kanbanInitials, kanbanMovePayload, kanbanRefusal, kanbanWipState, keepMoveButtonFocus, latestServerTiming, layoutColumnNames, layoutNodeGrows, layoutVisibilityClasses, lazyComponentCache, lazyComponents, leadExtensionConfig, limitedListItems, linkExtensionOptions, listTabIds, listTabUrl, listenForPageEvents, listenForRecordChanges, loadDeferredBadge, loadDeferredComponent, loadEditorImage, loadRichEditorExtensions, loadScript, loadStarterKitPanel, loadStyle, loadTableTotals, loadedStarterKitPanel, locateKanbanCard, logicalArrowKey, markFailedLazyWidgets, markRecordSubmitted, matchesKeyBinding, matchesShortcutStep, matchesUrlPattern, maxColumns, mentionNodeConfig, mentionText, menuActionContext, mergeAttributes, mergeChartOptions, mergeDeferredComponent, mergePolledComponents, mergeRefreshResponse, mergeStatePatch, mergeTagNodeConfig, mergeTagText, mobileCardLayout, mobileTable, modalFooterAlignment, modalTablePaging, modalTableQuery, modalTableSelected, moveColumn, moveColumnInManager, moveColumnTo, moveIndexedState, moveKanbanCard, moveListItem, moveRepeaterItem, moveTreeNode, navigationItemText, navigationItemUrl, nestedActionContext, newlineWithIndent, nextPageQuery, nextToolbarItem, normalizeRichEditorExtensions, normalizeRuleTree, notificationTintStyles, observeThemeChanges, onCloseNotification, onDatabaseNotificationsSent, onOpenDatabaseNotifications, onPageFormsChanged, onSaveConflict, oneTimeCodeDigits, openDatabaseNotifications, openDefaultAction, openRequestedStarterKitSearch, optimistic, optionText, orderColumnsBy, overlayPlacementDirection, pageFlash, pageFormName, pageSelectionState, paginationTotal, paletteGroupKey, panelAppearance, panelUploadOptions, parentPath, parseAspectRatio, parseDropdownPlacement, parseEventStream, parseGridColumns, parseInterval, parseKeyBinding, parseServerTiming, parseTsv, performUndo, persistWizardStep, pickerFilterFormOptions, pollComponent, pollPageProps, pollScheduler, postFormWithProgress, preferCurrentStarterKitPanel, prefetchTablePage, presenceInitials, prettyJson, previousPageQuery, primaryColumnName, promptPwaInstall, propsPollScheduler, pwaStore, queryBuilderInputType, queryBuilderOptions, readEventStream, readPersisted, realtimeHeaders, realtimeSettings, recordActionsAtStart, registerChartFormatters, registerChartPlugins, registerConflictForm, registerFormSubmitter, registerKeyBindings, registerPageForm, registerRichEditorExtensions, registerShortcut, registerStandaloneProp, registerStarterKitCopilotShortcut, registerStarterKitSearchShortcut, registerTablePersistence, relationGroupBadgeTarget, relationManagerBadgeTarget, relationManagerTabs, relationTabFromQuery, relationTabSlug, reloadExpiredPage, reloadOnExpiredPage, reloadPageProps, reloadPolledComponents, remainingTextSizeClass, rememberedCmsPreview, removeAllFilterIndicators, removeFilterIndicator, removeIndexedState, removeRepeaterItem, removeRule, reorderOffset, reorderTable, reorderedItemKeys, reorderingListsAllRecords, replaceComponentByKey, replacePlaceholder, reportRequestError, reportSaveConflict, reportSchemaContractMismatch, reportWizardProgress, reportedDeprecations, requestJson, requestStarterKitCopilot, requestStarterKitLanguages, requestStarterKitSearch, requestTableView, requiresFullPageLoad, reserveCmsPreviewSpace, resetChartRegistrations, resetDeprecations, resetPwa, resetRealtime, resetSchemaContractReports, resetStarterKitPanels, resetTableTotals, resizableImageAttributes, resizableImageOptions, resolveActionSize, resolveAppearance, resolveChartCallbacks, resolveContainerStatePath, resolveCssColor, resolveDeferredBadge, resolveDeferredGroupBadge, resolveEcho, resolveErrorNotification, resolveFirst, resolveFloatingToolbar, resolveItemAction, resolveLazyComponents, resolveNavigation, resolvePanelNavigation, resolvePartialProps, resolveRequestErrorNotification, resolveStatePath, resolveStickyOffset, resolveToastPosition, revealAutofocusField, router, runEditorCommands, runPageMethod, runsItemActionOnServer, saveColumnOrder, saveShortcutOverrides, saveSpreadsheetChanges, scheduleAutofocus, schemaComponentNames, schemaContractMajor, schemaContractMismatchMessage, schemaGapClass, scorePaletteItem, searchJson, searchTableColumnOptions, selectAllState, selectColumnEmptyMessage, selectPlural, selectedRecordsArguments, setAppearance, setCombinator, setIconAliases, setPath, setRecordVersion, setRequestErrorReporter, setTextColor, shortcutOverlayGroups, shortcutSteps, shortcuts, shortcutsClash, shouldChunkUpload, shouldConfirmModalClose, shouldResyncForm, shownRecordKeys, showsLanguageSwitcher, showsTableToolbar, sidebarDefaultOpen, sidebarWidthStyle, skeletonRowCount, slideOverSide, sliderBehavior, sliderBlocksTap, sliderBounds, sliderDirection, sliderFillSections, sliderFillStyle, sliderFromPrimitive, sliderHasTooltips, sliderNextValues, sliderPercent, sliderPips, sliderPrimitive, sliderShift, sliderShowsTooltip, sliderSnap, sliderState, sliderToPrimitive, sliderValueAt, sliderValues, slotAlignmentClass, slotDataMatches, slotItems, smallMarkConfig, splitClasses, splitPath, spreadsheetAnnouncement, spreadsheetAria, spreadsheetCellClass, spreadsheetCellId, spreadsheetCellKey, spreadsheetCellKind, spreadsheetColumns, spreadsheetRows, spreadsheetSelectionSize, stackClasses, stackedCellClasses, stackedImageStyle, standaloneDirection, standalonePageSchema, standalonePanelSchema, standaloneWidgetCount, startAnalytics, startDownload, startPwa, startSliderRangeDrag, startTableReordering, startUndoCountdown, starterKitBreadcrumbsFromProps, starterKitCopilot, starterKitDashboardWidgets, starterKitNavigation, starterKitNavigations, starterKitPanelLocale, starterKitWidgets, starterKitWidgetsPage, starterKitWidgetsPanel, stickyCollisionPadding, stopTableReordering, submitFormById, subscribeToNotifications, subscribeToPush, subscriptMarkConfig, superscriptMarkConfig, switchLocale, syncStarterKitPage, syncToolbarTabStops, t, tabFromQuery, tabKeyTarget, tabQueryValue, tabToReveal, tableColumnAlignmentClass, tableColumnCells, tableLoadingStore, tableQueryKey, tableTotalsFailed, tableTotalsStore, tableViewError, tableViewFollowUp, tableViewUrl, takeRequestedStarterKitCopilot, takeRequestedStarterKitLanguages, templateForIndex, tenantNameText, textAlignExtensionConfig, textColorMarkConfig, timeInputStep, toAsciiDigits, toEditorDocument, toStarterKitBreadcrumbs, toStarterKitNavGroups, toStarterKitUserMenuItems, toTsv, toggleButtonsNext, toggleButtonsSelected, toggleCollapsedGroup, toggleModalTableKey, togglePushNotifications, toggleVisibleColumn, toolCommand, toolbarButtonLabel, toolbarCommands, toolbarItems, toolbarPanel, trackAnalyticsEvent, transformImage, translatableLocaleField, translatableLocalesWithErrors, translationCellValue, translator, treeParentKeys, treeSubtreeHeight, triggerButtonView, undoShortcuts, uniqueId, unsubscribeFromPush, updateGroup, updateRule, updateTableCell, uploadPageMethodFiles, uploadTemporaryFile, uploadWithProgress, uploadedFileLinks, urlBase64ToUint8Array, usesDefaultImageStack, usesStarterKitHostLayout, virtualizeOptions, visibleColumns, visiblePresenceMembers, visibleTreeRows, visitTable, visitTableView, wallClockNow, watchPageProps, whenIdle, whenVisible, widgetPollTarget, widgetRegistryKeys, withAlpha, withColorAlpha, withDeferredTabBadges, withEcho, withItemActionState, withTableTotals, withoutDefaultActionQuery, withoutRequired, wizardProgressStore, wizardRequestedStepIndex, wizardStepFieldPaths, wizardStepQueryKey, wizardStepToReveal, writePersisted };
115
+ export { ACTION_PATH_SEPARATOR, ACTIVE_TAB_QUERY_KEY, AI_COPILOT_REGISTRY_KEY, AI_STREAM_REGISTRY_KEY, ALL_SELECTED_RECORDS_ARGUMENT, ActionRunner, AiStreamController, BOTTOM_NAVIGATION_SLOTS, BROADCAST_NOTIFICATION, BUILT_IN_COLORS, BUILT_IN_WIDGET_TYPES, CALENDAR_ARGUMENTS_KEY, CALENDAR_EVENT_DROP_ACTION, CALENDAR_EVENT_RESIZE_ACTION, CALENDAR_FETCH_EVENTS_ACTION, CALENDAR_REGISTRY_KEY, CLOSE_NOTIFICATION_EVENT, CMS_BLOCK_PREFIX, CMS_BUILT_IN_BLOCKS, CMS_FOOTER_KEY, CMS_FORM_KEY, CMS_HEADER_KEY, CMS_PAGE_COMPONENT, CMS_PREVIEW_DEVICES, CMS_PREVIEW_STORAGE_KEY, COMMANDS_COMPONENT, CONFLICT_ERROR_KEY, CONSTRAINT_PICKER_WIDTH_CLASSES, CONTAINER_BREAKPOINTS, CREATE_ANOTHER_ARGUMENT, CmsAutosave, ComponentDiscovery, ComponentRegistry, ConflictMonitor, CopilotController, DATABASE_NOTIFICATIONS_EVENT, DATABASE_NOTIFICATIONS_SENT, DEFAULT_ACTION_QUERY_KEYS, DEFAULT_LINK_PROTOCOLS, DEFAULT_VIRTUALIZE_THRESHOLD, DISCOVERY_FOLDERS, DashboardEditor, DebugRecorder, EditorAttachments, EditorSuggestions, FIELD_ACTION_PREFIX, FIELD_TYPES, FILAMENT_CLOSE_NOTIFICATION_EVENT, FILE_MANAGER_DRAG_TYPE, FILE_MANAGER_PICKER_REGISTRY_KEY, FILE_MANAGER_REGISTRY_KEY, FILTERS_FORM_WIDTH_CLASSES, FILTERS_MODAL_WIDTH_CLASSES, FILTERS_SIDEBAR_WIDTH_CLASSES, FileManagerController, FilterFormSync, FlashNotificationTracker, FormStore, GLOBAL_SEARCH_DEBOUNCE, GRID_MAX_COLUMNS, GRID_MIN_COLUMNS, HELPDESK_ACTIVITY_EVENT, HELPDESK_SHORTCUTS, HELPDESK_TYPING_MS, HelpdeskChatClient, HelpdeskInboxController, HttpError, IMAGE_EDITOR_ZOOM_STEP, ITEM_MOVE_ATTRIBUTE, IconPickerSearch, ImageEditor, ItemMoveTracker, KANBAN_NO_LANE, KANBAN_REGISTRY_KEY, KanbanController, LABEL_SLOTS, LAZY_PROP, LazyComponentCache, LiveUpdates, LocaleFormatter, MAX_DEBUG_REQUESTS, MERGE_TAG_TRIGGER, NOT_PROSE_CLASS, NotificationCenter, OPEN_DATABASE_NOTIFICATIONS_EVENT, OneTimeCodeSubmitter, PAGE_EXPIRED_STATUS, PALETTE_GROUP_ORDER, PANEL_TOAST_OFFSET, PASSWORD_CONFIRMATION_INPUT, POLL_HEADER, POLL_PROP, PREFETCH_CACHE_FOR, PRESENCE_STATE_WHISPER, PageMethodError, PollScheduler, PresenceRoom, RECORD_CHANGED_EVENT, RECORD_VERSION_INPUT, RELATION_MANAGERS_CONTENT_TAB, RELATION_QUERY_KEY, REMAINING_TEXT_SIZE_CLASSES, RichEditorRemote, SCHEMA_CONTRACT_VERSION, SELECTED_RECORDS_ARGUMENT, SEMANTIC_COLORS, SHORTCUT_IDS, SPREADSHEET_CLASSES, SPREADSHEET_ISSUE_MESSAGES, STACKED_TABLE_CLASSES, STARTER_KIT_COPILOT_SHORTCUT, STARTER_KIT_TOASTER_ID, ShortcutRecorder, ShortcutRegistry, SpreadsheetGrid, StandaloneComponentState, StreamAnnouncer, TABLE_TOOLBAR_BUTTONS, TENANT_MENU_COMPONENT, TOOLBAR_COMMANDS, TRANSLATION_MANAGER_REGISTRY_KEY, TREE_REGISTRY_KEY, TableSelection, TranslationManagerController, Translator, TreeController, USER_MENU_COMPONENT, UndoShortcuts, VIRTUAL_ESTIMATES, VirtualList, WIZARD_STEP_QUERY_KEY, acquireChannel, actionEndpoint, actionFormComponent, actionFormParams, actionPath, actionsAccessSelectedRecords, actionsAlignmentClass, activeTableView, addActionJustify, addGroup, addRule, allToolbarButtons, analyticsAllowed, analyticsChangeColor, analyticsInitialTab, announceDatabaseNotificationsSent, appendRepeaterItem, applyAppearance, applyBodyAttributes, applyDocumentLocale, applyEditorActionResult, applyFormRefresh, applyMask, applyPanelColors, applyPanelFavicon, applyPanelTheme, applyPwaUpdate, applySchemaPatches, applyStarterKitDocument, ariaSort, asHelpdeskActivity, attachKanbanPointer, attachToolbarKeyboard, beginTableLoading, bindUndo, bindingFromEvent, bindsKeyBindings, bottomNavigationItems, buildChartConfig, buildQuery, buildTableUrl, builderBlockCounts, builderItemLabel, builderItemSchema, builderItems, builderPickerMove, byteLength, cachedTableTotals, calendarActionContext, calendarIdentity, calendarOptions, calendarWallTime, callCmsAutosave, callPageMethod, canAddBuilderBlock, canEditImage, canEditImageName, canInstallPwa, canNestGroup, canSelectAllRecords, cancelChunkedUpload, chartColorVariable, chartFiltersUrl, checkSchemaContract, clearRichEditorExtensions, clientErrorNotification, cloneIndexedState, cloneRepeaterItem, cloneTreeNodes, closeNotification, cmsAspectClass, cmsBlockAttributes, cmsBlockKey, cmsBlocks, cmsColumnsClass, cmsDesignCss, cmsDesignLinks, cmsGridClass, cmsHeadTags, cmsLinkRel, cmsPayload, cmsPreviewFitsBeside, cmsPreviewOpensByDefault, cmsPreviewOpensOnLoad, cmsPreviewPaneWidth, cmsWidthClass, coerceSpreadsheetValue, collapsesLanguageSwitcher, collectFieldStatePaths, collectFields, colorAlpha, colorToHex, columnDraftChanged, columnGroupHeaderRow, columnManagerPosition, columnOrderChanged, columnOrderClasses, columnRegistryKey, columnSpanClasses, columnStartClasses, columnVisibilityClasses, commandLabel, commandPaletteItems, commandShortcutId, completedStepIcon, componentHasErrors, concurrencyLimiter, configureCharts, configureRealtime, confirmModalClose, conflictMessage, constraintPickerClasses, constraintPickerSections, containerColumnSpanClasses, containerGridColumnsClasses, contentGridClasses, copilotBlocks, countCodeLines, createAnalyticsTracker, createAnotherState, createCmsTranslator, createKanbanFiltersStore, createLatestRequest, createRule, createSchemaComponentContext, createStore, csrfHeader, cssAspectRatio, currencyDecimals, currentPageQuery, currentRecordVersion, currentSocketId, currentStarterKitPanel, currentStarterKitPanelId, customBlockNodeConfig, customColorClasses, customPageProps, dashboardMoveForKey, debounce, debugRecorder, defaultActionContext, defaultActionKey, defaultVisibleColumns, deferredComponentReference, deferredHasErrors, deletePath, deprecate, deprecationMessage, derived, detailsNodeConfigs, discoveryKey, distributePageFormErrors, documentNonce, dropTreeNode, editableImageName, effectiveErrorNotifications, endTableLoading, errorNotificationOutcome, extremePageLinks, fetchEditableImage, fetchStandaloneComponents, fieldActionComponent, fieldActionContext, fieldAria, fieldDomId, fieldError, fieldIds, fieldMemory, fileAttachmentError, fileManagerAcceptAttribute, fileManagerAccepts, fileManagerErrorMessage, fileManagerExpiry, fileManagerSize, fileUploadAccept, fileUploadEntries, fileUploadPaths, filesFromClipboard, filterBuilderBlocks, filterCommandPalette, filterFormComponents, filterQueryBuilderOptions, filterSelectColumnOptions, filterSuggestionItems, filterTenants, filtersAreDeferred, filtersCollapsible, filtersFormWidthClass, filtersPlacement, findAutofocusField, findConstraint, findFieldByPath, findGridContext, findOperator, findPageFormBlock, findStandalonePropName, findSuggestionMatch, firstErroredItemIndex, firstErrors, fixedContainingBlockOffset, flattenActionGroup, flattenNavigationItems, flattenTreeStructure, flexItemClasses, flexLayoutClasses, floatingToolbarStyle, focusAutofocusField, focusMovedItem, focusTableSearch, focusToolbar, forgetFieldMemory, formActionsVisible, formIdPrefix, formIdentity, formRefreshFor, formatBytes, formatColor, formatKeyBinding, formatPhpDate, formatShortcut, fuzzyScore, getChartFormatters, getChartPlugins, getConflictForm, getEcho, getPageForm, getPath, getScriptData, getStoredAppearance, globalSearchDebounce, globalSearchStatus, globalSearchSuffix, gridColumnsClasses, gridContent, gridNodeConfigs, groupAt, groupBuilderBlocks, groupCustomBlocks, groupMenuItems, groupTableRows, groupTableViews, groupTriggerButton, guardModalUnload, hasActiveNavigationItem, hasCommandPalette, hasContainerBreakpoints, hasDevTools, hasMobilePreset, hasNewErrors, hasPath, hasRelationManagerTabs, hasRichEditorExtension, hasSlots, hasThemeSwitcher, hasTopbar, headingTag, helpdeskChatString, helpdeskFileSize, helpdeskSlaTone, highlightCode, highlightMarkConfig, htmlLabelToText, htmlToMarkdown, iconAlias, iconAliasOverride, iconButtonSize, iconGridMove, iconPickerPreview, iconSource, imageEditorOptionsKey, imageGeometry, indentCode, inertiaPost, inertiaReload, inertiaVisit, initialCollapsedGroups, initialTranslatableLocale, initialWizardStep, initializeAppearance, initials, insertBuilderItem, insertUploadedFile, inspectableProps, installErrorNotifications, installPrefetchInvalidation, installSpaUrlExceptions, installStarterKitDocument, installStarterKitRuntime, interpolate, invalidatePrefetchedPages, invalidateTableTotals, isActionGroup, isActionLoading, isActionProcessing, isAlfakitPage, isAllowedLinkUrl, isAppendingPagination, isCustomBlockResult, isCustomColorName, isCustomSvgIcon, isDeferredPlaceholder, isEditableTarget, isField, isFieldActionContext, isGroupedColumn, isHighlightedLanguage, isIconAlias, isImplicitSubmit, isIosSafari, isLazyPlaceholder, isLeavingVisit, isMacLike, isModalHiddenByChild, isModalSubmitVisible, isMutatingRequest, isNavigationItemActive, isOptionGroup, isPageFullySelected, isPartialFormPayload, isRealtimeEnabled, isRightToLeft, isSafeColor, isStandalone, isStandaloneComponent, isStarterKitPanel, isTableLoading, isToolbarGroup, isToolbarShortcut, isUndoFinished, isUndoShortcut, isValidShortcut, isolationDirection, itemActionContext, itemActionIcon, itemExtraActions, joinPath, jsonEntries, jsonKind, jsonScalar, jsonSize, kanbanActiveFilters, kanbanCardPosition, kanbanCardsIn, kanbanInitials, kanbanMovePayload, kanbanRefusal, kanbanWipState, keepMoveButtonFocus, latestServerTiming, layoutColumnNames, layoutNodeGrows, layoutVisibilityClasses, lazyComponentCache, lazyComponents, leadExtensionConfig, limitedListItems, linkExtensionOptions, listTabIds, listTabUrl, listenForPageEvents, listenForRecordChanges, loadDeferredBadge, loadDeferredComponent, loadEditorImage, loadRichEditorExtensions, loadScript, loadStarterKitPanel, loadStyle, loadTableTotals, loadedStarterKitPanel, locateKanbanCard, logicalArrowKey, markFailedLazyWidgets, markRecordSubmitted, matchesKeyBinding, matchesShortcutStep, matchesUrlPattern, maxColumns, mentionNodeConfig, mentionText, menuActionContext, mergeAttributes, mergeChartOptions, mergeDeferredComponent, mergePolledComponents, mergeRefreshResponse, mergeStatePatch, mergeTagNodeConfig, mergeTagText, mobileCardLayout, mobileTable, modalFooterAlignment, modalTablePaging, modalTableQuery, modalTableSelected, moveColumn, moveColumnInManager, moveColumnTo, moveIndexedState, moveKanbanCard, moveListItem, moveRepeaterItem, moveTreeNode, navigationItemText, navigationItemUrl, nestedActionContext, newlineWithIndent, nextPageQuery, nextToolbarItem, normalizeRichEditorExtensions, normalizeRuleTree, notificationTintStyles, observeThemeChanges, onCloseNotification, onDatabaseNotificationsSent, onOpenDatabaseNotifications, onPageFormsChanged, onSaveConflict, oneTimeCodeDigits, openDatabaseNotifications, openDefaultAction, openRequestedStarterKitSearch, optimistic, optionText, orderColumnsBy, overlayPlacementDirection, pageFlash, pageFormName, pageSelectionState, paginationTotal, paletteGroupKey, panelAppearance, panelUploadOptions, parentPath, parseAspectRatio, parseDropdownPlacement, parseEventStream, parseGridColumns, parseInterval, parseKeyBinding, parseServerTiming, parseTsv, performUndo, persistWizardStep, pickerFilterFormOptions, pollComponent, pollPageProps, pollScheduler, postFormWithProgress, preferCurrentStarterKitPanel, prefetchTablePage, presenceInitials, prettyJson, previousPageQuery, primaryColumnName, promptPwaInstall, propsPollScheduler, pwaStore, queryBuilderInputType, queryBuilderOptions, readEventStream, readPersisted, realtimeHeaders, realtimeSettings, recordActionsAtStart, registerChartFormatters, registerChartPlugins, registerConflictForm, registerFormSubmitter, registerKeyBindings, registerPageForm, registerRichEditorExtensions, registerShortcut, registerStandaloneProp, registerStarterKitCopilotShortcut, registerStarterKitSearchShortcut, registerTablePersistence, relationGroupBadgeTarget, relationManagerBadgeTarget, relationManagerTabs, relationTabFromQuery, relationTabSlug, reloadExpiredPage, reloadOnExpiredPage, reloadPageProps, reloadPolledComponents, remainingTextSizeClass, rememberedCmsPreview, removeAllFilterIndicators, removeFilterIndicator, removeIndexedState, removeRepeaterItem, removeRule, reorderOffset, reorderTable, reorderedItemKeys, reorderingListsAllRecords, replaceComponentByKey, replacePlaceholder, reportRequestError, reportSaveConflict, reportSchemaContractMismatch, reportWizardProgress, reportedDeprecations, requestJson, requestStarterKitCopilot, requestStarterKitLanguages, requestStarterKitSearch, requestTableView, requiresFullPageLoad, reserveCmsPreviewSpace, resetChartRegistrations, resetDeprecations, resetPwa, resetRealtime, resetSchemaContractReports, resetStarterKitPanels, resetTableTotals, resizableImageAttributes, resizableImageOptions, resolveActionSize, resolveAppearance, resolveChartCallbacks, resolveContainerStatePath, resolveCssColor, resolveDeferredBadge, resolveDeferredGroupBadge, resolveEcho, resolveErrorNotification, resolveFirst, resolveFloatingToolbar, resolveItemAction, resolveLazyComponents, resolveNavigation, resolvePanelNavigation, resolvePartialProps, resolveRequestErrorNotification, resolveStatePath, resolveStickyOffset, resolveToastPosition, revealAutofocusField, router, runEditorCommands, runPageMethod, runsItemActionOnServer, saveColumnOrder, saveShortcutOverrides, saveSpreadsheetChanges, scheduleAutofocus, schemaComponentNames, schemaContractMajor, schemaContractMismatchMessage, schemaGapClass, scorePaletteItem, searchJson, searchTableColumnOptions, selectAllState, selectColumnEmptyMessage, selectPlural, selectedRecordsArguments, setAppearance, setCombinator, setIconAliases, setPath, setRecordVersion, setRequestErrorReporter, setTextColor, shortcutOverlayGroups, shortcutSteps, shortcuts, shortcutsClash, shouldChunkUpload, shouldConfirmModalClose, shouldResyncForm, shownRecordKeys, showsLanguageSwitcher, showsTableToolbar, sidebarDefaultOpen, sidebarWidthStyle, skeletonRowCount, slideOverSide, sliderBehavior, sliderBlocksTap, sliderBounds, sliderDirection, sliderFillSections, sliderFillStyle, sliderFromPrimitive, sliderHasTooltips, sliderNextValues, sliderPercent, sliderPips, sliderPrimitive, sliderShift, sliderShowsTooltip, sliderSnap, sliderState, sliderToPrimitive, sliderValueAt, sliderValues, slotAlignmentClass, slotDataMatches, slotItems, smallMarkConfig, splitClasses, splitPath, spreadsheetAnnouncement, spreadsheetAria, spreadsheetCellClass, spreadsheetCellId, spreadsheetCellKey, spreadsheetCellKind, spreadsheetColumns, spreadsheetRows, spreadsheetSelectionSize, stackClasses, stackedCellClasses, stackedImageStyle, standaloneDirection, standalonePageSchema, standalonePanelSchema, standaloneWidgetCount, startAnalytics, startDownload, startPwa, startSliderRangeDrag, startTableReordering, startUndoCountdown, starterKitBreadcrumbsFromProps, starterKitCopilot, starterKitDashboardWidgets, starterKitDirection, starterKitDocument, starterKitNavigation, starterKitNavigations, starterKitPanelLocale, starterKitSidebarSide, starterKitWidgets, starterKitWidgetsPage, starterKitWidgetsPanel, stickyCollisionPadding, stopTableReordering, submitFormById, subscribeToNotifications, subscribeToPush, subscriptMarkConfig, superscriptMarkConfig, switchLocale, syncStarterKitPage, syncToolbarTabStops, t, tabFromQuery, tabKeyTarget, tabQueryValue, tabToReveal, tableColumnAlignmentClass, tableColumnCells, tableLoadingStore, tableQueryKey, tableTotalsFailed, tableTotalsStore, tableViewError, tableViewFollowUp, tableViewUrl, takeRequestedStarterKitCopilot, takeRequestedStarterKitLanguages, templateForIndex, tenantNameText, textAlignExtensionConfig, textColorMarkConfig, timeInputStep, toAsciiDigits, toEditorDocument, toStarterKitBreadcrumbs, toStarterKitNavGroups, toStarterKitUserMenuItems, toTsv, toggleButtonsNext, toggleButtonsSelected, toggleCollapsedGroup, toggleModalTableKey, togglePushNotifications, toggleVisibleColumn, toolCommand, toolbarButtonLabel, toolbarCommands, toolbarItems, toolbarPanel, trackAnalyticsEvent, transformImage, translatableLocaleField, translatableLocalesWithErrors, translationCellValue, translator, treeParentKeys, treeSubtreeHeight, triggerButtonView, undoShortcuts, uniqueId, unsubscribeFromPush, updateGroup, updateRule, updateTableCell, uploadPageMethodFiles, uploadTemporaryFile, uploadWithProgress, uploadedFileLinks, urlBase64ToUint8Array, usesDefaultImageStack, usesStarterKitHostLayout, virtualizeOptions, visibleColumns, visiblePresenceMembers, visibleTreeRows, visitTable, visitTableView, wallClockNow, watchPageProps, whenIdle, whenVisible, widgetPollTarget, widgetRegistryKeys, withAlpha, withColorAlpha, withDeferredTabBadges, withEcho, withItemActionState, withTableTotals, withoutDefaultActionQuery, withoutRequired, wizardProgressStore, wizardRequestedStepIndex, wizardStepFieldPaths, wizardStepQueryKey, wizardStepToReveal, writePersisted };
package/dist/prefetch.js CHANGED
@@ -60,8 +60,11 @@ function installPrefetchInvalidation() {
60
60
  if (typeof window === "undefined" || installed) return () => {};
61
61
  installed = true;
62
62
  let restoring = false;
63
+ let pendingReload = null;
63
64
  const onPopstate = () => {
64
65
  restoring = true;
66
+ pendingReload?.cancel();
67
+ pendingReload = null;
65
68
  };
66
69
  window.addEventListener("popstate", onPopstate);
67
70
  const removeStart = router.on("start", () => {
@@ -80,7 +83,13 @@ function installPrefetchInvalidation() {
80
83
  preserveState: false,
81
84
  replace: true,
82
85
  async: true,
83
- headers: { "Cache-Control": "no-cache" }
86
+ headers: { "Cache-Control": "no-cache" },
87
+ onCancelToken: (token) => {
88
+ pendingReload = token;
89
+ },
90
+ onFinish: () => {
91
+ pendingReload = null;
92
+ }
84
93
  });
85
94
  return;
86
95
  }
@@ -88,6 +97,8 @@ function installPrefetchInvalidation() {
88
97
  });
89
98
  return () => {
90
99
  installed = false;
100
+ pendingReload?.cancel();
101
+ pendingReload = null;
91
102
  window.removeEventListener("popstate", onPopstate);
92
103
  removeStart();
93
104
  removeFinish();
@@ -1 +1 @@
1
- {"version":3,"file":"prefetch.js","names":[],"sources":["../src/prefetch.ts"],"sourcesContent":["import { router } from '@inertiajs/core'\nimport { resolvePartialProps } from './partial-props'\nimport { buildTableUrl, type TableQuery } from './table'\nimport { invalidateTableTotals } from './table-totals'\n\n/**\n * How long a prefetched page is reused: navigation links (Inertia `<Link prefetch>`) and\n * a table's next page. Short, and dropped after every mutation.\n */\nexport const PREFETCH_CACHE_FOR = '10s'\n\n/**\n * Prefetch a table page (hovering or focusing \"next\") with the same visit `visitTable()`\n * makes, so the click is answered from the cache. Browser only.\n */\nexport function prefetchTablePage(\n identifier: string | undefined,\n changes: TableQuery,\n only: string[] = ['page'],\n): void {\n if (typeof window === 'undefined') return\n\n const resolved = resolvePartialProps(only)\n\n router.prefetch(\n buildTableUrl(window.location.href, identifier, changes),\n {\n preserveState: true,\n preserveScroll: true,\n replace: true,\n ...(resolved === undefined ? {} : { only: resolved }),\n },\n { cacheFor: PREFETCH_CACHE_FOR },\n )\n}\n\n/** Mutations so far; a page last shown before the latest one has stale props. */\nlet mutationCount = 0\n\n/** The mutation count when each URL was last shown. */\nconst shownAt = new Map<string, number>()\n\n/**\n * Drop prefetched pages and mark deferred table totals stale: records may have changed.\n */\nexport function invalidatePrefetchedPages(): void {\n if (typeof window === 'undefined') return\n\n mutationCount++\n router.flushAll()\n invalidateTableTotals()\n}\n\n/**\n * Internal endpoints that change records or what a page shows (actions, inline edits,\n * reordering, undo, page methods, saved views and column order: W-S2-14).\n */\nconst MUTATING_ENDPOINT =\n /\\/(?:actions(?:\\/undo)?|table\\/(?:cell|cells|reorder|views|columns)|pages\\/call)\\/?$/\n\n/** Whether a successful request to `url` with `method` may have changed records. */\nexport function isMutatingRequest(url: string, method: string): boolean {\n if (method.toUpperCase() === 'GET') return false\n\n try {\n return MUTATING_ENDPOINT.test(new URL(url, 'http://localhost').pathname)\n } catch {\n return false\n }\n}\n\nlet installed = false\n\n/**\n * Invalidate prefetched pages and table totals after every Inertia visit that is not a\n * GET (actions, form saves), and reload a page the browser's Back or Forward button\n * restores from history when records changed since it was shown: Inertia restores the\n * saved props without asking the server. Returns a function that removes the listeners.\n */\nexport function installPrefetchInvalidation(): () => void {\n // Panels and standalone components on one page share the listeners.\n if (typeof window === 'undefined' || installed) return () => {}\n\n installed = true\n let restoring = false\n const onPopstate = (): void => {\n restoring = true\n }\n window.addEventListener('popstate', onPopstate)\n\n // A visit started after the popstate (a hash-only change fires no navigate) is not a restore.\n const removeStart = router.on('start', () => {\n restoring = false\n })\n const removeFinish = router.on('finish', (event) => {\n if (event.detail.visit.method !== 'get') invalidatePrefetchedPages()\n })\n const removeNavigate = router.on('navigate', (event) => {\n const url = event.detail.page.url\n const restored = restoring\n restoring = false\n\n // A URL never shown in this page load may come from before it: reload it too.\n if (restored && (shownAt.get(url) ?? -1) < mutationCount) {\n // Without the restored state: forms fill their inputs when they mount, so a reload that\n // kept it showed the saved page's old values (a restored page has no unsaved input).\n // `router.reload()` always keeps the state, hence the visit.\n router.visit(window.location.href, {\n preserveScroll: true,\n preserveState: false,\n replace: true,\n async: true,\n headers: { 'Cache-Control': 'no-cache' },\n })\n return\n }\n\n shownAt.set(url, mutationCount)\n })\n\n return () => {\n installed = false\n window.removeEventListener('popstate', onPopstate)\n removeStart()\n removeFinish()\n removeNavigate()\n }\n}\n"],"mappings":";;;;;;;;;AASA,MAAa,qBAAqB;;;;;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O,MAAM,OAAO,SAAS,MAAM;IACjC,gBAAgB;IAChB,eAAe;IACf,SAAS;IACT,OAAO;IACP,SAAS,EAAE,iBAAiB,WAAW;GACzC,CAAC;GACD;EACF;EAEA,QAAQ,IAAI,KAAK,aAAa;CAChC,CAAC;CAED,aAAa;EACX,YAAY;EACZ,OAAO,oBAAoB,YAAY,UAAU;EACjD,YAAY;EACZ,aAAa;EACb,eAAe;CACjB;AACF"}
1
+ {"version":3,"file":"prefetch.js","names":[],"sources":["../src/prefetch.ts"],"sourcesContent":["import { router } from '@inertiajs/core'\nimport { resolvePartialProps } from './partial-props'\nimport { buildTableUrl, type TableQuery } from './table'\nimport { invalidateTableTotals } from './table-totals'\n\n/**\n * How long a prefetched page is reused: navigation links (Inertia `<Link prefetch>`) and\n * a table's next page. Short, and dropped after every mutation.\n */\nexport const PREFETCH_CACHE_FOR = '10s'\n\n/**\n * Prefetch a table page (hovering or focusing \"next\") with the same visit `visitTable()`\n * makes, so the click is answered from the cache. Browser only.\n */\nexport function prefetchTablePage(\n identifier: string | undefined,\n changes: TableQuery,\n only: string[] = ['page'],\n): void {\n if (typeof window === 'undefined') return\n\n const resolved = resolvePartialProps(only)\n\n router.prefetch(\n buildTableUrl(window.location.href, identifier, changes),\n {\n preserveState: true,\n preserveScroll: true,\n replace: true,\n ...(resolved === undefined ? {} : { only: resolved }),\n },\n { cacheFor: PREFETCH_CACHE_FOR },\n )\n}\n\n/** Mutations so far; a page last shown before the latest one has stale props. */\nlet mutationCount = 0\n\n/** The mutation count when each URL was last shown. */\nconst shownAt = new Map<string, number>()\n\n/**\n * Drop prefetched pages and mark deferred table totals stale: records may have changed.\n */\nexport function invalidatePrefetchedPages(): void {\n if (typeof window === 'undefined') return\n\n mutationCount++\n router.flushAll()\n invalidateTableTotals()\n}\n\n/**\n * Internal endpoints that change records or what a page shows (actions, inline edits,\n * reordering, undo, page methods, saved views and column order: W-S2-14).\n */\nconst MUTATING_ENDPOINT =\n /\\/(?:actions(?:\\/undo)?|table\\/(?:cell|cells|reorder|views|columns)|pages\\/call)\\/?$/\n\n/** Whether a successful request to `url` with `method` may have changed records. */\nexport function isMutatingRequest(url: string, method: string): boolean {\n if (method.toUpperCase() === 'GET') return false\n\n try {\n return MUTATING_ENDPOINT.test(new URL(url, 'http://localhost').pathname)\n } catch {\n return false\n }\n}\n\nlet installed = false\n\n/**\n * Invalidate prefetched pages and table totals after every Inertia visit that is not a\n * GET (actions, form saves), and reload a page the browser's Back or Forward button\n * restores from history when records changed since it was shown: Inertia restores the\n * saved props without asking the server. Returns a function that removes the listeners.\n */\nexport function installPrefetchInvalidation(): () => void {\n // Panels and standalone components on one page share the listeners.\n if (typeof window === 'undefined' || installed) return () => {}\n\n installed = true\n let restoring = false\n // The reload of a restored page still in flight. Another Back or Forward cancels it: its\n // response would replace the history entry the browser has moved on to.\n let pendingReload: { cancel(): void } | null = null\n const onPopstate = (): void => {\n restoring = true\n pendingReload?.cancel()\n pendingReload = null\n }\n window.addEventListener('popstate', onPopstate)\n\n // A visit started after the popstate (a hash-only change fires no navigate) is not a restore.\n const removeStart = router.on('start', () => {\n restoring = false\n })\n const removeFinish = router.on('finish', (event) => {\n if (event.detail.visit.method !== 'get') invalidatePrefetchedPages()\n })\n const removeNavigate = router.on('navigate', (event) => {\n const url = event.detail.page.url\n const restored = restoring\n restoring = false\n\n // A URL never shown in this page load may come from before it: reload it too.\n if (restored && (shownAt.get(url) ?? -1) < mutationCount) {\n // Without the restored state: forms fill their inputs when they mount, so a reload that\n // kept it showed the saved page's old values (a restored page has no unsaved input).\n // `router.reload()` always keeps the state, hence the visit.\n router.visit(window.location.href, {\n preserveScroll: true,\n preserveState: false,\n replace: true,\n async: true,\n headers: { 'Cache-Control': 'no-cache' },\n onCancelToken: (token) => {\n pendingReload = token\n },\n onFinish: () => {\n pendingReload = null\n },\n })\n return\n }\n\n shownAt.set(url, mutationCount)\n })\n\n return () => {\n installed = false\n pendingReload?.cancel()\n pendingReload = null\n window.removeEventListener('popstate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aAAa,UAAU;EACtD,MAAM,MAAM,MAAM,OAAO,KAAK;EAC9B,MAAM,WAAW;EACjB,YAAY;EAGZ,IAAI,aAAa,QAAQ,IAAI,GAAG,KAAK,MAAM,eAAe;GAIxD,OAAO,MAAM,OAAO,SAAS,MAAM;IACjC,gBAAgB;IAChB,eAAe;IACf,SAAS;IACT,OAAO;IACP,SAAS,EAAE,iBAAiB,WAAW;IACvC,gBAAgB,UAAU;KACxB,gBAAgB;IAClB;IACA,gBAAgB;KACd,gBAAgB;IAClB;GACF,CAAC;GACD;EACF;EAEA,QAAQ,IAAI,KAAK,aAAa;CAChC,CAAC;CAED,aAAa;EACX,YAAY;EACZ,eAAe,OAAO;EACtB,gBAAgB;EAChB,OAAO,oBAAoB,YAAY,UAAU;EACjD,YAAY;EACZ,aAAa;EACb,eAAe;CACjB;AACF"}
@@ -147,9 +147,9 @@ export type SonnerPosition = 'top-left' | 'top-center' | 'top-right' | 'bottom-l
147
147
  /**
148
148
  * The direction overlays anchored to a screen edge (the toaster, the schema inspector's
149
149
  * sheet) are placed by: the panel's reading direction, except in starter kit mode, where
150
- * the host app owns `<html dir>` and its layout (the kit's sidebar stays on the left in a
151
- * right-to-left panel language). There they take the document's side, so "top end" never
152
- * lands on the kit's sidebar, while their content keeps the panel's direction (W-D-03).
150
+ * they take the document's side (`<html dir>`, from the shared `alfakitDocument`; an app
151
+ * whose root view or sidebar was not updated may still be left to right), so "top end"
152
+ * never lands on the kit's sidebar, while their content keeps the panel's direction (W-D-03).
153
153
  */
154
154
  export declare function overlayPlacementDirection(direction: 'ltr' | 'rtl', starterKit: boolean | undefined): 'ltr' | 'rtl';
155
155
  /**
package/dist/realtime.js CHANGED
@@ -241,9 +241,9 @@ const PANEL_TOAST_OFFSET = { top: "4.5rem" };
241
241
  /**
242
242
  * The direction overlays anchored to a screen edge (the toaster, the schema inspector's
243
243
  * sheet) are placed by: the panel's reading direction, except in starter kit mode, where
244
- * the host app owns `<html dir>` and its layout (the kit's sidebar stays on the left in a
245
- * right-to-left panel language). There they take the document's side, so "top end" never
246
- * lands on the kit's sidebar, while their content keeps the panel's direction (W-D-03).
244
+ * they take the document's side (`<html dir>`, from the shared `alfakitDocument`; an app
245
+ * whose root view or sidebar was not updated may still be left to right), so "top end"
246
+ * never lands on the kit's sidebar, while their content keeps the panel's direction (W-D-03).
247
247
  */
248
248
  function overlayPlacementDirection(direction, starterKit) {
249
249
  if (starterKit !== true) return direction;
@@ -1 +1 @@
1
- {"version":3,"file":"realtime.js","names":[],"sources":["../src/realtime.ts"],"sourcesContent":["import type { NotificationSchema } from './schema/notifications'\nimport type { ToastPosition } from './schema/panel'\nimport type { RealtimeSchema } from './schema/realtime'\n\n/** Broadcast type of a toast pushed with `Notification::broadcast()`. */\nexport const BROADCAST_NOTIFICATION = 'alfakit.notification'\n\n/** Broadcast type sent by `sendToDatabase(..., isEventDispatched: true)`. */\nexport const DATABASE_NOTIFICATIONS_SENT = 'alfakit.database-notifications.sent'\n\n/** Window event the notifications menu listens to, to reload itself. */\nexport const DATABASE_NOTIFICATIONS_EVENT = 'alfakit:database-notifications-sent'\n\ntype NotificationCallback = (payload: Record<string, unknown>) => void\ntype EventCallback = (payload: Record<string, unknown>) => void\n\n/** The part of a Laravel Echo private channel Alfakit uses. */\nexport interface EchoChannelLike {\n notification(callback: NotificationCallback): unknown\n stopListeningForNotification?(callback: NotificationCallback): unknown\n listen?(event: string, callback: EventCallback): unknown\n stopListening?(event: string, callback?: EventCallback): unknown\n}\n\n/** The part of a Laravel Echo presence channel Alfakit uses (`Echo.join()`). */\nexport interface EchoPresenceChannelLike extends EchoChannelLike {\n here(callback: (members: unknown[]) => void): unknown\n joining(callback: (member: unknown) => void): unknown\n leaving(callback: (member: unknown) => void): unknown\n whisper?(event: string, data: Record<string, unknown>): unknown\n listenForWhisper?(event: string, callback: (data: Record<string, unknown>) => void): unknown\n}\n\n/** The part of Laravel Echo Alfakit uses (`window.Echo`). */\nexport interface EchoLike {\n private(channel: string): EchoChannelLike\n join?(channel: string): EchoPresenceChannelLike\n leave?(channel: string): void\n socketId?(): string | undefined\n}\n\n/**\n * The app's Laravel Echo instance, when one is set up as `window.Echo` (or was created by\n * `resolveEcho()`). Always null on the server, so SSR never touches it.\n */\nexport function getEcho(): EchoLike | null {\n if (typeof window === 'undefined') {\n return null\n }\n\n const echo = (window as unknown as { Echo?: unknown }).Echo\n\n if (echo && typeof (echo as EchoLike).private === 'function') {\n return echo as EchoLike\n }\n\n return createdEcho\n}\n\n// ---------------------------------------------------------------- Connection\n\n/** The settings `configureRealtime()` takes (`PanelSchema.realtime`). */\nexport type RealtimeConfig = RealtimeSchema\n\n/** Options for creating Echo: the panel's Echo options plus its auth endpoint and CSRF token. */\nexport type EchoConnectionOptions = Record<string, unknown> & {\n authEndpoint?: string\n csrfToken?: string\n}\n\n/**\n * Creates the Echo instance when the app has no `window.Echo` (`createAlfakit({ echo })`),\n * e.g. `(options) => new Echo({ ...options, broadcaster: 'reverb', Pusher })`.\n */\nexport type EchoFactory = (\n options: EchoConnectionOptions,\n) => EchoLike | null | undefined | Promise<EchoLike | null | undefined>\n\ntype ModuleLoader = (specifier: string) => Promise<Record<string, unknown>>\n\nlet realtimeConfig: (RealtimeConfig & { csrfToken?: string }) | null = null\nlet echoFactory: EchoFactory | null = null\nlet createdEcho: EchoLike | null = null\nlet pendingEcho: Promise<EchoLike | null> | null = null\n\n// The packages are optional peers the app installs: the specifier is a variable so bundlers\n// don't require them, and a missing package just means \"no Echo\".\nlet loadModule: ModuleLoader = (specifier) =>\n import(/* @vite-ignore */ /* webpackIgnore: true */ specifier) as Promise<Record<string, unknown>>\n\n/**\n * Set the panel's realtime settings (renderers call this with `panel.realtime` and the\n * CSRF token) and, optionally, an Echo instance or factory from `createAlfakit({ echo })`.\n */\nexport function configureRealtime(\n config: RealtimeConfig | null | undefined,\n options: { echo?: EchoLike | EchoFactory | null; csrfToken?: string } = {},\n): void {\n realtimeConfig = config ? { ...config, csrfToken: options.csrfToken } : null\n\n if (options.echo !== undefined) {\n if (typeof options.echo === 'function') {\n echoFactory = options.echo\n } else {\n createdEcho = options.echo\n echoFactory = null\n }\n }\n}\n\n/** The settings given to `configureRealtime()`. */\nexport function realtimeSettings(): RealtimeConfig | null {\n return realtimeConfig\n}\n\n/** Whether `Panel::realtime()` is on for this page. */\nexport function isRealtimeEnabled(): boolean {\n return Boolean(realtimeConfig?.live)\n}\n\n/**\n * The Echo instance to use: `window.Echo`, one made by the `createAlfakit({ echo })`\n * factory, or (with `config('alfakit.broadcasting.echo')`) one made from `laravel-echo`\n * and `pusher-js` if the app installed them. Null when none is available or on the server.\n */\nexport function resolveEcho(): Promise<EchoLike | null> {\n const existing = getEcho()\n\n if (existing || typeof window === 'undefined') {\n return Promise.resolve(existing)\n }\n\n pendingEcho ??= createEcho().then((echo) => {\n createdEcho = echo ?? null\n\n // Try again on the next call when nothing could be created.\n if (!createdEcho) pendingEcho = null\n\n return createdEcho\n })\n\n return pendingEcho\n}\n\nasync function createEcho(): Promise<EchoLike | null> {\n const config = realtimeConfig\n const options: EchoConnectionOptions = {\n ...(config?.echo ?? {}),\n ...(config?.authEndpoint ? { authEndpoint: config.authEndpoint } : {}),\n ...(config?.csrfToken ? { csrfToken: config.csrfToken } : {}),\n }\n\n try {\n if (echoFactory) {\n return (await echoFactory(options)) ?? null\n }\n\n if (!config?.live || !config.echo) {\n return null\n }\n\n const [echoModule, pusherModule] = await Promise.all([\n loadModule('laravel-echo'),\n loadModule('pusher-js'),\n ])\n const Echo = (echoModule.default ?? echoModule.Echo) as\n (new (options: Record<string, unknown>) => EchoLike) | undefined\n const Pusher = pusherModule.default ?? pusherModule.Pusher\n\n if (typeof Echo !== 'function') {\n return null\n }\n\n ;(window as unknown as { Pusher?: unknown }).Pusher ??= Pusher\n\n return new Echo({ broadcaster: 'reverb', ...options, Pusher })\n } catch {\n return null\n }\n}\n\n/** The socket id of the current Echo connection, sent as `X-Socket-ID` so Laravel's `toOthers()` skips this tab. */\nexport function currentSocketId(): string | undefined {\n try {\n return getEcho()?.socketId?.() || undefined\n } catch {\n return undefined\n }\n}\n\n/** `X-Socket-ID` when connected (merged into the requests of the renderers). */\nexport function realtimeHeaders(): Record<string, string> {\n const id = currentSocketId()\n\n return id ? { 'X-Socket-ID': id } : {}\n}\n\n/** Forget the connection and settings (tests). */\nexport function resetRealtime(options: { loader?: ModuleLoader } = {}): void {\n realtimeConfig = null\n echoFactory = null\n createdEcho = null\n pendingEcho = null\n channelRefs.clear()\n\n if (options.loader) loadModule = options.loader\n}\n\n// ---------------------------------------------------------------- Shared channels\n\nconst channelRefs = new Map<string, number>()\n\n/**\n * Use a channel of `echo` until the returned release function is called. Echo shares a\n * channel object per name, so it is left only when its last user releases it (a record's\n * presence avatars and conflict banner share its presence channel).\n */\nexport function acquireChannel<T extends 'private' | 'presence'>(\n echo: EchoLike,\n kind: T,\n name: string,\n): {\n channel: T extends 'presence' ? EchoPresenceChannelLike : EchoChannelLike\n release: () => void\n} | null {\n const channel = kind === 'presence' ? echo.join?.(name) : echo.private(name)\n\n if (!channel) return null\n\n const key = name\n channelRefs.set(key, (channelRefs.get(key) ?? 0) + 1)\n let released = false\n\n return {\n channel: channel as T extends 'presence' ? EchoPresenceChannelLike : EchoChannelLike,\n release: () => {\n if (released) return\n released = true\n\n const count = (channelRefs.get(key) ?? 1) - 1\n\n if (count <= 0) {\n channelRefs.delete(key)\n echo.leave?.(name)\n } else {\n channelRefs.set(key, count)\n }\n },\n }\n}\n\n/**\n * Run `connect` with Echo as soon as it is available: right away with `window.Echo`, else\n * once `resolveEcho()` settles. `onUnavailable` runs when there is no Echo. Returns the\n * cleanup, which also cancels a pending connection.\n */\nexport function withEcho(\n connect: (echo: EchoLike) => (() => void) | void,\n options: { echo?: EchoLike | null; onUnavailable?: () => (() => void) | void } = {},\n): () => void {\n let cleanup: (() => void) | void\n let active = true\n\n const start = (echo: EchoLike | null) => {\n if (!active) return\n\n cleanup = echo ? connect(echo) : options.onUnavailable?.()\n }\n\n if (options.echo !== undefined) {\n start(options.echo)\n } else {\n const echo = getEcho()\n\n if (echo || typeof window === 'undefined') {\n start(echo)\n } else {\n void resolveEcho().then(start)\n }\n }\n\n return () => {\n active = false\n cleanup?.()\n }\n}\n\n// ---------------------------------------------------------------- Record changes\n\n/** Echo event of `RecordChanged` (`broadcastAs()` is `alfakit.record`). */\nexport const RECORD_CHANGED_EVENT = '.alfakit.record'\n\n/** A record was created, updated, deleted or restored. Keys only: refetch to see the data. */\nexport interface RecordChange {\n event: 'created' | 'updated' | 'deleted' | 'restored'\n /** The model class with `-` for `\\\\`. */\n model: string\n key: string | number\n /** The user who changed it, when known. */\n by?: string | number | null\n /** Milliseconds since the epoch. */\n at?: number\n}\n\nfunction asRecordChange(payload: Record<string, unknown>): RecordChange | null {\n const event = payload.event\n const key = payload.key\n\n if (\n (event !== 'created' && event !== 'updated' && event !== 'deleted' && event !== 'restored') ||\n (typeof key !== 'string' && typeof key !== 'number')\n ) {\n return null\n }\n\n return {\n event,\n key,\n model: typeof payload.model === 'string' ? payload.model : '',\n by: typeof payload.by === 'string' || typeof payload.by === 'number' ? payload.by : null,\n at: typeof payload.at === 'number' ? payload.at : Date.now(),\n }\n}\n\n/**\n * Listen for record changes on a channel (`private` for models, `presence` for a record).\n * Returns the cleanup (a no-op without Echo).\n */\nexport function listenForRecordChanges(\n channelName: string,\n callback: (change: RecordChange) => void,\n options: { kind?: 'private' | 'presence'; echo?: EchoLike | null } = {},\n): () => void {\n return withEcho(\n (echo) => {\n const acquired = acquireChannel(echo, options.kind ?? 'private', channelName)\n\n if (!acquired) return\n\n const listener: EventCallback = (payload) => {\n const change = asRecordChange(payload)\n\n if (change) callback(change)\n }\n\n acquired.channel.listen?.(RECORD_CHANGED_EVENT, listener)\n\n return () => {\n acquired.channel.stopListening?.(RECORD_CHANGED_EVENT, listener)\n acquired.release()\n }\n },\n { echo: options.echo },\n )\n}\n\n// ---------------------------------------------------------------- Notifications\n\nexport interface RealtimeSubscriptionOptions {\n /** The user's private channel (`PanelSchema.realtime.channel`). */\n channel: string\n /** Defaults to `window.Echo`, or the Echo `resolveEcho()` creates. */\n echo?: EchoLike | null\n /** A broadcast toast arrived. */\n onNotification: (notification: NotificationSchema) => void\n /** A database notification was stored: reload the bell. */\n onDatabaseNotificationsSent?: () => void\n}\n\n/**\n * Listen for the user's broadcast notifications. Returns the unsubscribe function (a no-op\n * when Echo is missing). Each toast is delivered once, even if Echo reconnects or the\n * subscription is made twice (React strict mode).\n */\nexport function subscribeToNotifications(options: RealtimeSubscriptionOptions): () => void {\n if (!options.channel) {\n return () => {}\n }\n\n const seen = new Set<string>()\n\n return withEcho(\n (echo) => {\n let active = true\n\n const callback: NotificationCallback = (payload) => {\n if (!active) return\n\n if (payload.type === DATABASE_NOTIFICATIONS_SENT) {\n options.onDatabaseNotificationsSent?.()\n\n return\n }\n\n if (payload.format !== 'alfakit') return\n\n const id = typeof payload.id === 'string' ? payload.id : ''\n\n if (id !== '' && seen.has(id)) return\n if (id !== '') seen.add(id)\n\n const { type: _type, ...notification } = payload\n\n options.onNotification(notification as unknown as NotificationSchema)\n }\n\n const channel = echo.private(options.channel)\n channel.notification(callback)\n\n return () => {\n active = false\n channel.stopListeningForNotification?.(callback)\n }\n },\n { echo: options.echo },\n )\n}\n\n/** Tell mounted notification menus to reload (`DATABASE_NOTIFICATIONS_EVENT`). */\nexport function announceDatabaseNotificationsSent(): void {\n if (typeof window !== 'undefined') {\n window.dispatchEvent(new CustomEvent(DATABASE_NOTIFICATIONS_EVENT))\n }\n}\n\n/** Run `callback` whenever a database notification is announced. Returns the cleanup. */\nexport function onDatabaseNotificationsSent(callback: () => void): () => void {\n if (typeof window === 'undefined') {\n return () => {}\n }\n\n window.addEventListener(DATABASE_NOTIFICATIONS_EVENT, callback)\n\n return () => window.removeEventListener(DATABASE_NOTIFICATIONS_EVENT, callback)\n}\n\n/**\n * Offset of the panel's toaster: toasts at the top start below the sticky top bar (3.5rem\n * high) instead of covering the breadcrumbs, search and switchers, on phones too (where they\n * span the screen). The other sides keep sonner's defaults.\n */\nexport const PANEL_TOAST_OFFSET: { top: string } = { top: '4.5rem' }\n\nexport type SonnerPosition =\n 'top-left' | 'top-center' | 'top-right' | 'bottom-left' | 'bottom-center' | 'bottom-right'\n\n/**\n * The direction overlays anchored to a screen edge (the toaster, the schema inspector's\n * sheet) are placed by: the panel's reading direction, except in starter kit mode, where\n * the host app owns `<html dir>` and its layout (the kit's sidebar stays on the left in a\n * right-to-left panel language). There they take the document's side, so \"top end\" never\n * lands on the kit's sidebar, while their content keeps the panel's direction (W-D-03).\n */\nexport function overlayPlacementDirection(\n direction: 'ltr' | 'rtl',\n starterKit: boolean | undefined,\n): 'ltr' | 'rtl' {\n if (starterKit !== true) return direction\n if (typeof document === 'undefined') return 'ltr'\n\n return document.documentElement.dir.toLowerCase() === 'rtl' ? 'rtl' : 'ltr'\n}\n\n/**\n * The toaster position for the panel's `toastPosition()` (logical: `start`/`end`) in the\n * current reading direction. Defaults to the top end.\n */\nexport function resolveToastPosition(\n position: ToastPosition | null | undefined,\n direction: 'ltr' | 'rtl',\n): SonnerPosition {\n const [vertical, horizontal] = (position ?? 'top-end').split('-') as [\n 'top' | 'bottom',\n 'start' | 'center' | 'end',\n ]\n\n if (horizontal === 'center') {\n return `${vertical}-center`\n }\n\n const isLeft = (horizontal === 'start') === (direction === 'ltr')\n\n return `${vertical}-${isLeft ? 'left' : 'right'}`\n}\n"],"mappings":";;AAKA,MAAa,yBAAyB;;AAGtC,MAAa,8BAA8B;;AAG3C,MAAa,+BAA+B;;;;;AAkC5C,SAAgB,UAA2B;CACzC,IAAI,OAAO,WAAW,aACpB,OAAO;CAGT,MAAM,OAAQ,OAAyC;CAEvD,IAAI,QAAQ,OAAQ,KAAkB,YAAY,YAChD,OAAO;CAGT,OAAO;AACT;AAuBA,IAAI,iBAAmE;AACvE,IAAI,cAAkC;AACtC,IAAI,cAA+B;AACnC,IAAI,cAA+C;AAInD,IAAI,cAA4B,cAC9B;;;CAAo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IAAI,QAAQ,WAAW,WAAW;GAElC,MAAM,KAAK,OAAO,QAAQ,OAAO,WAAW,QAAQ,KAAK;GAEzD,IAAI,OAAO,MAAM,KAAK,IAAI,EAAE,GAAG;GAC/B,IAAI,OAAO,IAAI,KAAK,IAAI,EAAE;GAE1B,MAAM,EAAE,MAAM,OAAO,GAAG,iBAAiB;GAEzC,QAAQ,eAAe,YAA6C;EACtE;EAEA,MAAM,UAAU,KAAK,QAAQ,QAAQ,OAAO;EAC5C,QAAQ,aAAa,QAAQ;EAE7B,aAAa;GACX,SAAS;GACT,QAAQ,+BAA+B,QAAQ;EACjD;CACF,GACA,EAAE,MAAM,QAAQ,KAAK,CACvB;AACF;;AAGA,SAAgB,oCAA0C;CACxD,IAAI,OAAO,WAAW,aACpB,OAAO,cAAc,IAAI,YAAY,4BAA4B,CAAC;AAEtE;;AAGA,SAAgB,4BAA4B,UAAkC;CAC5E,IAAI,OAAO,WAAW,aACpB,aAAa,CAAC;CAGhB,OAAO,iBAAiB,8BAA8B,QAAQ;CAE9D,aAAa,OAAO,oBAAoB,8BAA8B,QAAQ;AAChF;;;;;;AAOA,MAAa,qBAAsC,EAAE,KAAK,SAAS;;;;;;;;AAYnE,SAAgB,0BACd,WACA,YACe;CACf,IAAI,eAAe,MAAM,OAAO;CAChC,IAAI,OAAO,aAAa,aAAa,OAAO;CAE5C,OAAO,SAAS,gBAAgB,IAAI,YAAY,MAAM,QAAQ,QAAQ;AACxE;;;;;AAMA,SAAgB,qBACd,UACA,WACgB;CAChB,MAAM,CAAC,UAAU,eAAe,YAAY,UAAA,CAAW,MAAM,GAAG;CAKhE,IAAI,eAAe,UACjB,OAAO,GAAG,SAAS;CAKrB,OAAO,GAAG,SAAS,GAFH,eAAe,aAAc,cAAc,SAE5B,SAAS;AAC1C"}
1
+ {"version":3,"file":"realtime.js","names":[],"sources":["../src/realtime.ts"],"sourcesContent":["import type { NotificationSchema } from './schema/notifications'\nimport type { ToastPosition } from './schema/panel'\nimport type { RealtimeSchema } from './schema/realtime'\n\n/** Broadcast type of a toast pushed with `Notification::broadcast()`. */\nexport const BROADCAST_NOTIFICATION = 'alfakit.notification'\n\n/** Broadcast type sent by `sendToDatabase(..., isEventDispatched: true)`. */\nexport const DATABASE_NOTIFICATIONS_SENT = 'alfakit.database-notifications.sent'\n\n/** Window event the notifications menu listens to, to reload itself. */\nexport const DATABASE_NOTIFICATIONS_EVENT = 'alfakit:database-notifications-sent'\n\ntype NotificationCallback = (payload: Record<string, unknown>) => void\ntype EventCallback = (payload: Record<string, unknown>) => void\n\n/** The part of a Laravel Echo private channel Alfakit uses. */\nexport interface EchoChannelLike {\n notification(callback: NotificationCallback): unknown\n stopListeningForNotification?(callback: NotificationCallback): unknown\n listen?(event: string, callback: EventCallback): unknown\n stopListening?(event: string, callback?: EventCallback): unknown\n}\n\n/** The part of a Laravel Echo presence channel Alfakit uses (`Echo.join()`). */\nexport interface EchoPresenceChannelLike extends EchoChannelLike {\n here(callback: (members: unknown[]) => void): unknown\n joining(callback: (member: unknown) => void): unknown\n leaving(callback: (member: unknown) => void): unknown\n whisper?(event: string, data: Record<string, unknown>): unknown\n listenForWhisper?(event: string, callback: (data: Record<string, unknown>) => void): unknown\n}\n\n/** The part of Laravel Echo Alfakit uses (`window.Echo`). */\nexport interface EchoLike {\n private(channel: string): EchoChannelLike\n join?(channel: string): EchoPresenceChannelLike\n leave?(channel: string): void\n socketId?(): string | undefined\n}\n\n/**\n * The app's Laravel Echo instance, when one is set up as `window.Echo` (or was created by\n * `resolveEcho()`). Always null on the server, so SSR never touches it.\n */\nexport function getEcho(): EchoLike | null {\n if (typeof window === 'undefined') {\n return null\n }\n\n const echo = (window as unknown as { Echo?: unknown }).Echo\n\n if (echo && typeof (echo as EchoLike).private === 'function') {\n return echo as EchoLike\n }\n\n return createdEcho\n}\n\n// ---------------------------------------------------------------- Connection\n\n/** The settings `configureRealtime()` takes (`PanelSchema.realtime`). */\nexport type RealtimeConfig = RealtimeSchema\n\n/** Options for creating Echo: the panel's Echo options plus its auth endpoint and CSRF token. */\nexport type EchoConnectionOptions = Record<string, unknown> & {\n authEndpoint?: string\n csrfToken?: string\n}\n\n/**\n * Creates the Echo instance when the app has no `window.Echo` (`createAlfakit({ echo })`),\n * e.g. `(options) => new Echo({ ...options, broadcaster: 'reverb', Pusher })`.\n */\nexport type EchoFactory = (\n options: EchoConnectionOptions,\n) => EchoLike | null | undefined | Promise<EchoLike | null | undefined>\n\ntype ModuleLoader = (specifier: string) => Promise<Record<string, unknown>>\n\nlet realtimeConfig: (RealtimeConfig & { csrfToken?: string }) | null = null\nlet echoFactory: EchoFactory | null = null\nlet createdEcho: EchoLike | null = null\nlet pendingEcho: Promise<EchoLike | null> | null = null\n\n// The packages are optional peers the app installs: the specifier is a variable so bundlers\n// don't require them, and a missing package just means \"no Echo\".\nlet loadModule: ModuleLoader = (specifier) =>\n import(/* @vite-ignore */ /* webpackIgnore: true */ specifier) as Promise<Record<string, unknown>>\n\n/**\n * Set the panel's realtime settings (renderers call this with `panel.realtime` and the\n * CSRF token) and, optionally, an Echo instance or factory from `createAlfakit({ echo })`.\n */\nexport function configureRealtime(\n config: RealtimeConfig | null | undefined,\n options: { echo?: EchoLike | EchoFactory | null; csrfToken?: string } = {},\n): void {\n realtimeConfig = config ? { ...config, csrfToken: options.csrfToken } : null\n\n if (options.echo !== undefined) {\n if (typeof options.echo === 'function') {\n echoFactory = options.echo\n } else {\n createdEcho = options.echo\n echoFactory = null\n }\n }\n}\n\n/** The settings given to `configureRealtime()`. */\nexport function realtimeSettings(): RealtimeConfig | null {\n return realtimeConfig\n}\n\n/** Whether `Panel::realtime()` is on for this page. */\nexport function isRealtimeEnabled(): boolean {\n return Boolean(realtimeConfig?.live)\n}\n\n/**\n * The Echo instance to use: `window.Echo`, one made by the `createAlfakit({ echo })`\n * factory, or (with `config('alfakit.broadcasting.echo')`) one made from `laravel-echo`\n * and `pusher-js` if the app installed them. Null when none is available or on the server.\n */\nexport function resolveEcho(): Promise<EchoLike | null> {\n const existing = getEcho()\n\n if (existing || typeof window === 'undefined') {\n return Promise.resolve(existing)\n }\n\n pendingEcho ??= createEcho().then((echo) => {\n createdEcho = echo ?? null\n\n // Try again on the next call when nothing could be created.\n if (!createdEcho) pendingEcho = null\n\n return createdEcho\n })\n\n return pendingEcho\n}\n\nasync function createEcho(): Promise<EchoLike | null> {\n const config = realtimeConfig\n const options: EchoConnectionOptions = {\n ...(config?.echo ?? {}),\n ...(config?.authEndpoint ? { authEndpoint: config.authEndpoint } : {}),\n ...(config?.csrfToken ? { csrfToken: config.csrfToken } : {}),\n }\n\n try {\n if (echoFactory) {\n return (await echoFactory(options)) ?? null\n }\n\n if (!config?.live || !config.echo) {\n return null\n }\n\n const [echoModule, pusherModule] = await Promise.all([\n loadModule('laravel-echo'),\n loadModule('pusher-js'),\n ])\n const Echo = (echoModule.default ?? echoModule.Echo) as\n (new (options: Record<string, unknown>) => EchoLike) | undefined\n const Pusher = pusherModule.default ?? pusherModule.Pusher\n\n if (typeof Echo !== 'function') {\n return null\n }\n\n ;(window as unknown as { Pusher?: unknown }).Pusher ??= Pusher\n\n return new Echo({ broadcaster: 'reverb', ...options, Pusher })\n } catch {\n return null\n }\n}\n\n/** The socket id of the current Echo connection, sent as `X-Socket-ID` so Laravel's `toOthers()` skips this tab. */\nexport function currentSocketId(): string | undefined {\n try {\n return getEcho()?.socketId?.() || undefined\n } catch {\n return undefined\n }\n}\n\n/** `X-Socket-ID` when connected (merged into the requests of the renderers). */\nexport function realtimeHeaders(): Record<string, string> {\n const id = currentSocketId()\n\n return id ? { 'X-Socket-ID': id } : {}\n}\n\n/** Forget the connection and settings (tests). */\nexport function resetRealtime(options: { loader?: ModuleLoader } = {}): void {\n realtimeConfig = null\n echoFactory = null\n createdEcho = null\n pendingEcho = null\n channelRefs.clear()\n\n if (options.loader) loadModule = options.loader\n}\n\n// ---------------------------------------------------------------- Shared channels\n\nconst channelRefs = new Map<string, number>()\n\n/**\n * Use a channel of `echo` until the returned release function is called. Echo shares a\n * channel object per name, so it is left only when its last user releases it (a record's\n * presence avatars and conflict banner share its presence channel).\n */\nexport function acquireChannel<T extends 'private' | 'presence'>(\n echo: EchoLike,\n kind: T,\n name: string,\n): {\n channel: T extends 'presence' ? EchoPresenceChannelLike : EchoChannelLike\n release: () => void\n} | null {\n const channel = kind === 'presence' ? echo.join?.(name) : echo.private(name)\n\n if (!channel) return null\n\n const key = name\n channelRefs.set(key, (channelRefs.get(key) ?? 0) + 1)\n let released = false\n\n return {\n channel: channel as T extends 'presence' ? EchoPresenceChannelLike : EchoChannelLike,\n release: () => {\n if (released) return\n released = true\n\n const count = (channelRefs.get(key) ?? 1) - 1\n\n if (count <= 0) {\n channelRefs.delete(key)\n echo.leave?.(name)\n } else {\n channelRefs.set(key, count)\n }\n },\n }\n}\n\n/**\n * Run `connect` with Echo as soon as it is available: right away with `window.Echo`, else\n * once `resolveEcho()` settles. `onUnavailable` runs when there is no Echo. Returns the\n * cleanup, which also cancels a pending connection.\n */\nexport function withEcho(\n connect: (echo: EchoLike) => (() => void) | void,\n options: { echo?: EchoLike | null; onUnavailable?: () => (() => void) | void } = {},\n): () => void {\n let cleanup: (() => void) | void\n let active = true\n\n const start = (echo: EchoLike | null) => {\n if (!active) return\n\n cleanup = echo ? connect(echo) : options.onUnavailable?.()\n }\n\n if (options.echo !== undefined) {\n start(options.echo)\n } else {\n const echo = getEcho()\n\n if (echo || typeof window === 'undefined') {\n start(echo)\n } else {\n void resolveEcho().then(start)\n }\n }\n\n return () => {\n active = false\n cleanup?.()\n }\n}\n\n// ---------------------------------------------------------------- Record changes\n\n/** Echo event of `RecordChanged` (`broadcastAs()` is `alfakit.record`). */\nexport const RECORD_CHANGED_EVENT = '.alfakit.record'\n\n/** A record was created, updated, deleted or restored. Keys only: refetch to see the data. */\nexport interface RecordChange {\n event: 'created' | 'updated' | 'deleted' | 'restored'\n /** The model class with `-` for `\\\\`. */\n model: string\n key: string | number\n /** The user who changed it, when known. */\n by?: string | number | null\n /** Milliseconds since the epoch. */\n at?: number\n}\n\nfunction asRecordChange(payload: Record<string, unknown>): RecordChange | null {\n const event = payload.event\n const key = payload.key\n\n if (\n (event !== 'created' && event !== 'updated' && event !== 'deleted' && event !== 'restored') ||\n (typeof key !== 'string' && typeof key !== 'number')\n ) {\n return null\n }\n\n return {\n event,\n key,\n model: typeof payload.model === 'string' ? payload.model : '',\n by: typeof payload.by === 'string' || typeof payload.by === 'number' ? payload.by : null,\n at: typeof payload.at === 'number' ? payload.at : Date.now(),\n }\n}\n\n/**\n * Listen for record changes on a channel (`private` for models, `presence` for a record).\n * Returns the cleanup (a no-op without Echo).\n */\nexport function listenForRecordChanges(\n channelName: string,\n callback: (change: RecordChange) => void,\n options: { kind?: 'private' | 'presence'; echo?: EchoLike | null } = {},\n): () => void {\n return withEcho(\n (echo) => {\n const acquired = acquireChannel(echo, options.kind ?? 'private', channelName)\n\n if (!acquired) return\n\n const listener: EventCallback = (payload) => {\n const change = asRecordChange(payload)\n\n if (change) callback(change)\n }\n\n acquired.channel.listen?.(RECORD_CHANGED_EVENT, listener)\n\n return () => {\n acquired.channel.stopListening?.(RECORD_CHANGED_EVENT, listener)\n acquired.release()\n }\n },\n { echo: options.echo },\n )\n}\n\n// ---------------------------------------------------------------- Notifications\n\nexport interface RealtimeSubscriptionOptions {\n /** The user's private channel (`PanelSchema.realtime.channel`). */\n channel: string\n /** Defaults to `window.Echo`, or the Echo `resolveEcho()` creates. */\n echo?: EchoLike | null\n /** A broadcast toast arrived. */\n onNotification: (notification: NotificationSchema) => void\n /** A database notification was stored: reload the bell. */\n onDatabaseNotificationsSent?: () => void\n}\n\n/**\n * Listen for the user's broadcast notifications. Returns the unsubscribe function (a no-op\n * when Echo is missing). Each toast is delivered once, even if Echo reconnects or the\n * subscription is made twice (React strict mode).\n */\nexport function subscribeToNotifications(options: RealtimeSubscriptionOptions): () => void {\n if (!options.channel) {\n return () => {}\n }\n\n const seen = new Set<string>()\n\n return withEcho(\n (echo) => {\n let active = true\n\n const callback: NotificationCallback = (payload) => {\n if (!active) return\n\n if (payload.type === DATABASE_NOTIFICATIONS_SENT) {\n options.onDatabaseNotificationsSent?.()\n\n return\n }\n\n if (payload.format !== 'alfakit') return\n\n const id = typeof payload.id === 'string' ? payload.id : ''\n\n if (id !== '' && seen.has(id)) return\n if (id !== '') seen.add(id)\n\n const { type: _type, ...notification } = payload\n\n options.onNotification(notification as unknown as NotificationSchema)\n }\n\n const channel = echo.private(options.channel)\n channel.notification(callback)\n\n return () => {\n active = false\n channel.stopListeningForNotification?.(callback)\n }\n },\n { echo: options.echo },\n )\n}\n\n/** Tell mounted notification menus to reload (`DATABASE_NOTIFICATIONS_EVENT`). */\nexport function announceDatabaseNotificationsSent(): void {\n if (typeof window !== 'undefined') {\n window.dispatchEvent(new CustomEvent(DATABASE_NOTIFICATIONS_EVENT))\n }\n}\n\n/** Run `callback` whenever a database notification is announced. Returns the cleanup. */\nexport function onDatabaseNotificationsSent(callback: () => void): () => void {\n if (typeof window === 'undefined') {\n return () => {}\n }\n\n window.addEventListener(DATABASE_NOTIFICATIONS_EVENT, callback)\n\n return () => window.removeEventListener(DATABASE_NOTIFICATIONS_EVENT, callback)\n}\n\n/**\n * Offset of the panel's toaster: toasts at the top start below the sticky top bar (3.5rem\n * high) instead of covering the breadcrumbs, search and switchers, on phones too (where they\n * span the screen). The other sides keep sonner's defaults.\n */\nexport const PANEL_TOAST_OFFSET: { top: string } = { top: '4.5rem' }\n\nexport type SonnerPosition =\n 'top-left' | 'top-center' | 'top-right' | 'bottom-left' | 'bottom-center' | 'bottom-right'\n\n/**\n * The direction overlays anchored to a screen edge (the toaster, the schema inspector's\n * sheet) are placed by: the panel's reading direction, except in starter kit mode, where\n * they take the document's side (`<html dir>`, from the shared `alfakitDocument`; an app\n * whose root view or sidebar was not updated may still be left to right), so \"top end\"\n * never lands on the kit's sidebar, while their content keeps the panel's direction (W-D-03).\n */\nexport function overlayPlacementDirection(\n direction: 'ltr' | 'rtl',\n starterKit: boolean | undefined,\n): 'ltr' | 'rtl' {\n if (starterKit !== true) return direction\n if (typeof document === 'undefined') return 'ltr'\n\n return document.documentElement.dir.toLowerCase() === 'rtl' ? 'rtl' : 'ltr'\n}\n\n/**\n * The toaster position for the panel's `toastPosition()` (logical: `start`/`end`) in the\n * current reading direction. Defaults to the top end.\n */\nexport function resolveToastPosition(\n position: ToastPosition | null | undefined,\n direction: 'ltr' | 'rtl',\n): SonnerPosition {\n const [vertical, horizontal] = (position ?? 'top-end').split('-') as [\n 'top' | 'bottom',\n 'start' | 'center' | 'end',\n ]\n\n if (horizontal === 'center') {\n return `${vertical}-center`\n }\n\n const isLeft = (horizontal === 'start') === (direction === 'ltr')\n\n return `${vertical}-${isLeft ? 'left' : 'right'}`\n}\n"],"mappings":";;AAKA,MAAa,yBAAyB;;AAGtC,MAAa,8BAA8B;;AAG3C,MAAa,+BAA+B;;;;;AAkC5C,SAAgB,UAA2B;CACzC,IAAI,OAAO,WAAW,aACpB,OAAO;CAGT,MAAM,OAAQ,OAAyC;CAEvD,IAAI,QAAQ,OAAQ,KAAkB,YAAY,YAChD,OAAO;CAGT,OAAO;AACT;AAuBA,IAAI,iBAAmE;AACvE,IAAI,cAAkC;AACtC,IAAI,cAA+B;AACnC,IAAI,cAA+C;AAInD,IAAI,cAA4B,cAC9B;;;CAAoD;;;;;;AAMtD,SAAgB,kBACd,QACA,UAAwE,CAAC,GACnE;CACN,iBAAiB,SAAS;EAAE,GAAG;EAAQ,WAAW,QAAQ;CAAU,IAAI;CAExE,IAAI,QAAQ,SAAS,KAAA,GAAW;EAC9B,IAAI,OAAO,QAAQ,SAAS,YAC1B,cAAc,QAAQ;OACjB;GACL,cAAc,QAAQ;GACtB,cAAc;EAChB;CACF;AACF;;AAGA,SAAgB,mBAA0C;CACxD,OAAO;AACT;;AAGA,SAAgB,oBAA6B;CAC3C,OAAO,QAAQ,gBAAgB,IAAI;AACrC;;;;;;AAOA,SAAgB,cAAwC;CACtD,MAAM,WAAW,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AAQ,KAAK,CACvB;AACF;;AAGA,SAAgB,oCAA0C;CACxD,IAAI,OAAO,WAAW,aACpB,OAAO,cAAc,IAAI,YAAY,4BAA4B,CAAC;AAEtE;;AAGA,SAAgB,4BAA4B,UAAkC;CAC5E,IAAI,OAAO,WAAW,aACpB,aAAa,CAAC;CAGhB,OAAO,iBAAiB,8BAA8B,QAAQ;CAE9D,aAAa,OAAO,oBAAoB,8BAA8B,QAAQ;AAChF;;;;;;AAOA,MAAa,qBAAsC,EAAE,KAAK,SAAS;;;;;;;;AAYnE,SAAgB,0BACd,WACA,YACe;CACf,IAAI,eAAe,MAAM,OAAO;CAChC,IAAI,OAAO,aAAa,aAAa,OAAO;CAE5C,OAAO,SAAS,gBAAgB,IAAI,YAAY,MAAM,QAAQ,QAAQ;AACxE;;;;;AAMA,SAAgB,qBACd,UACA,WACgB;CAChB,MAAM,CAAC,UAAU,eAAe,YAAY,UAAA,CAAW,MAAM,GAAG;CAKhE,IAAI,eAAe,UACjB,OAAO,GAAG,SAAS;CAKrB,OAAO,GAAG,SAAS,GAFH,eAAe,aAAc,cAAc,SAE5B,SAAS;AAC1C"}
@@ -21,9 +21,9 @@ import { DebugClosure, DebugDeprecation, DebugNode, DebugSchema, DebugServerTimi
21
21
  import { DevToolsClass, DevToolsContext, DevToolsSchema } from "./dev-tools.js";
22
22
  import { PwaPushSchema, PwaSchema } from "./pwa.js";
23
23
  import { StandaloneComponentSchema, isStandaloneComponent } from "./standalone.js";
24
- import { AlfakitPageProps, BreadcrumbSchema, ContentBlock, DefaultActionSchema, ErrorNotificationEntrySchema, ErrorNotificationsSchema, ImpersonationSchema, LanguageSwitcherPosition, LocaleSchema, LocalizationSchema, MenuItemSchema, NavigationBadgeSchema, NavigationGroupSchema, NavigationItemSchema, NavigationStateSchema, PageLayout, PageSchema, PanelDesignSchema, PanelEndpoints, PanelSchema, PanelThemeSchema, PanelUserSchema, PolledComponents, SlotDataValue, SlotItemSchema, StarterKitDashboardWidgetsSchema, StarterKitNavigationSchema, StarterKitWidgetsSchema, SubNavigationSchema, TENANT_MENU_COMPONENT, TenantSchema, ToastPosition, USER_MENU_COMPONENT } from "./panel.js";
24
+ import { AlfakitPageProps, BreadcrumbSchema, ContentBlock, DefaultActionSchema, ErrorNotificationEntrySchema, ErrorNotificationsSchema, ImpersonationSchema, LanguageSwitcherPosition, LocaleSchema, LocalizationSchema, MenuItemSchema, NavigationBadgeSchema, NavigationGroupSchema, NavigationItemSchema, NavigationStateSchema, PageLayout, PageSchema, PanelDesignSchema, PanelEndpoints, PanelSchema, PanelThemeSchema, PanelUserSchema, PolledComponents, SlotDataValue, SlotItemSchema, StarterKitDashboardWidgetsSchema, StarterKitDocumentSchema, StarterKitNavigationSchema, StarterKitWidgetsSchema, SubNavigationSchema, TENANT_MENU_COMPONENT, TenantSchema, ToastPosition, USER_MENU_COMPONENT } from "./panel.js";
25
25
  import { CmsAdminBarSchema, CmsAlternateSchema, CmsAspectRatio, CmsAutosaveResult, CmsBlockSchema, CmsBlockStyle, CmsBreadcrumbSchema, CmsBuiltInBlocks, CmsCallToActionBlockData, CmsColumnsBlockData, CmsEditorStatusSchema, CmsEmbedBlockData, CmsFaqBlockData, CmsFeatureSchema, CmsFeaturesBlockData, CmsFormBlockData, CmsGalleryBlockData, CmsHeroBlockData, CmsImageBlockData, CmsImageSchema, CmsLinkSchema, CmsLivePreviewSchema, CmsMenuItemSchema, CmsMenuSchema, CmsPageProps, CmsPageSchema, CmsPayload, CmsRichTextBlockData, CmsSectionBlockData, CmsSeoSchema, CmsSiteDesign, CmsSiteSchema, CmsTestimonialSchema, CmsTestimonialsBlockData } from "./cms.js";
26
26
  import { HelpdeskActivity, HelpdeskAttachment, HelpdeskBadge, HelpdeskChatConfig, HelpdeskChatConversation, HelpdeskChatMessage, HelpdeskChatResponse, HelpdeskInboxList, HelpdeskInboxSchema, HelpdeskMessage, HelpdeskSla, HelpdeskTicket, HelpdeskTicketSummary, HelpdeskView } from "./helpdesk.js";
27
27
  import { TranslationCellSchema, TranslationFilter, TranslationHistoryEntry, TranslationLocaleSchema, TranslationManagerSchema, TranslationProgressSchema, TranslationRowSchema, TranslationRowsResult, TranslationSaveResult, TranslationSuggestionSchema } from "./translation-manager.js";
28
28
  import { RecordVersionChangeSchema, RecordVersionSchema, RecordVersionsSchema } from "./versions.js";
29
- export { ActionGroupSchema, ActionModalCancelledResponse, ActionModalSchema, ActionResultFlash, ActionSchema, ActionVariant, ActionsComponentSchema, Affixes, AiActionStatus, AiConversationSchema, AiCopilotSchema, AiMessageRole, AiMessageSchema, AiProposedActionSchema, AiSetupNoticeSchema, AiStreamSchema, AlfakitPageProps, Alignment, AnalyticsBreakdownRowSchema, AnalyticsBreakdownTabSchema, AnalyticsBreakdownWidgetSchema, AnyActionSchema, AnyPaginationSchema, AppendingPaginationSchema, Attributes, BaseColumnSchema, BaseComponent, BaseEntry, BaseField, BaseWidgetSchema, BreadcrumbSchema, Breakpoint, Breakpoints, BuilderBlockSchema, BuilderItemSchema, BuilderItemState, BuilderSchema, BulkToggleActionSchema, COMMANDS_COMPONENT, CalendarChangeResult, CalendarEventSchema, CalendarView, CalendarWidgetSchema, CalloutSchema, CellSchema, ChartEmptyStateSchema, ChartFiltersFormSchema, ChartWidgetSchema, CheckboxColumnSchema, CheckboxListSchema, CheckboxSchema, CmsAdminBarSchema, CmsAlternateSchema, CmsAspectRatio, CmsAutosaveResult, CmsBlockSchema, CmsBlockStyle, CmsBreadcrumbSchema, CmsBuiltInBlocks, CmsCallToActionBlockData, CmsColumnsBlockData, CmsEditorStatusSchema, CmsEmbedBlockData, CmsFaqBlockData, CmsFeatureSchema, CmsFeaturesBlockData, CmsFormBlockData, CmsGalleryBlockData, CmsHeroBlockData, CmsImageBlockData, CmsImageSchema, CmsLinkSchema, CmsLivePreviewSchema, CmsMenuItemSchema, CmsMenuSchema, CmsPageProps, CmsPageSchema, CmsPayload, CmsRichTextBlockData, CmsSectionBlockData, CmsSeoSchema, CmsSiteDesign, CmsSiteSchema, CmsTestimonialSchema, CmsTestimonialsBlockData, CodeEditorSchema, CodeEntrySchema, Color, ColorColumnSchema, ColorEntrySchema, ColorPickerSchema, ColumnGroupSchema, ColumnLayoutColumnRef, ColumnLayoutNode, ColumnLayoutSchema, ColumnSchema, ColumnSpanValue, ColumnSummariesSchema, CommandPaletteLinkSchema, CommandPaletteResponse, CommandPaletteSchema, CommandSchema, ConflictsSchema, ContainerBreakpoint, ContentBlock, ContentSlotItem, ContentSlotName, ContentSlotSchema, ContentSlots, CursorPaginationSchema, CustomWidgetSchema, DashboardCustomizeSchema, DashboardLayoutEntry, DashboardLibraryWidget, DashboardSpanOption, DatabaseNotificationsResponse, DatePickerSchema, DebugClosure, DebugDeprecation, DebugNode, DebugSchema, DebugServerTimings, DefaultActionSchema, DeferredBadgeSchema, DeferredTabBadges, DevToolsClass, DevToolsContext, DevToolsSchema, EditableColumnSchema, EmptyStateComponentSchema, EmptyStateSchema, EntrySchema, ErrorNotificationEntrySchema, ErrorNotificationsSchema, FIELD_TYPES, FieldActionResponse, FieldActions, FieldSchema, FieldsetSchema, FileManagerActionNames, FileManagerBreadcrumbSchema, FileManagerDetailsSchema, FileManagerEntrySchema, FileManagerFolderSchema, FileManagerKind, FileManagerLinkSchema, FileManagerListingSchema, FileManagerPermissionsSchema, FileManagerPickedFileSchema, FileManagerPickerSchema, FileManagerPreviewSchema, FileManagerResult, FileManagerSchema, FileUploadImageEditorSchema, FileUploadPositions, FileUploadSchema, FilterIndicator, FilterSchema, FiltersFormWidth, FlexSchema, FormBlock, FormPayload, FormattedStateProps, FusedGroupSchema, GlobalSearchGroupSchema, GlobalSearchResultSchema, GridLayoutSchema, GridSchema, GroupSchema, HelpdeskActivity, HelpdeskAttachment, HelpdeskBadge, HelpdeskChatConfig, HelpdeskChatConversation, HelpdeskChatMessage, HelpdeskChatResponse, HelpdeskInboxList, HelpdeskInboxSchema, HelpdeskMessage, HelpdeskSla, HelpdeskTicket, HelpdeskTicketSummary, HelpdeskView, HiddenSchema, HtmlSchema, IconCellItem, IconColumnSchema, IconEntrySchema, IconName, IconPickerOption, IconPickerResponse, IconPickerSchema, IconPickerSetSchema, IconPosition, IconSchema, ImageCellSchema, ImageColumnSchema, ImageEntrySchema, ImageSchema, ImageStackProps, ImpersonationSchema, InfolistBlock, ItemActionName, ItemActionSchema, ItemActionsItemProps, ItemActionsProps, ItemActionsSchema, KanbanAssigneeSchema, KanbanBadgeSchema, KanbanCardSchema, KanbanColumnSchema, KanbanFetchResult, KanbanFiltersSchema, KanbanLaneSchema, KanbanMoveResult, KanbanSchema, KanbanWidgetSchema, KeyValueEntrySchema, KeyValueSchema, KeyboardShortcutsSchema, LanguageSwitcherPosition, LayoutSchema, LazyRelationManagerSchema, LazyWidgetSchema, LinksBlock, ListTabSchema, ListTabsProps, LiveConfig, LiveUpdatesSchema, LocaleSchema, LocalizationSchema, MenuItemSchema, ModalTableSelectResponse, ModalTableSelectSchema, MoneyInputSchema, NavigationBadgeSchema, NavigationGroupSchema, NavigationItemSchema, NavigationStateSchema, NotificationActionSchema, NotificationSchema, NotificationUndoSchema, OneTimeCodeInputSchema, Operation, Option, OptionGroup, OptionOrGroup, OptionsGridDirection, PageLayout, PageSchema, PaginationSchema, PanelDesignSchema, PanelEndpoints, PanelLayoutSchema, PanelSchema, PanelThemeSchema, PanelUserSchema, PartialFormPayload, PlaceholderSchema, PolledComponents, PresenceSchema, PresenceState, PwaPushSchema, PwaSchema, QueryBuilderConstraintRule, QueryBuilderConstraintSchema, QueryBuilderGroup, QueryBuilderGroupRule, QueryBuilderInput, QueryBuilderOperatorSchema, QueryBuilderRule, QueryBuilderRulesSchema, RadioSchema, RealtimeSchema, RecordKey, RecordVersionChangeSchema, RecordVersionSchema, RecordVersionsSchema, RelationGroupSchema, RelationManagerSchema, RelationManagersBlock, RelationManagersContentTabSchema, RepeatableEntrySchema, RepeaterItemSchema, RepeaterSchema, RichEditorCustomBlockSchema, RichEditorMentionSchema, RichEditorMergeTagSchema, RichEditorSchema, RichEditorToolSchema, RichEditorToolbarGroupSchema, SchemaBlock, SchemaComponent, SchemaComponentContext, SchemaPatch, SchemaRefreshResponse, SectionSchema, SelectColumnSchema, SelectOptionsResponse, SelectSchema, SimplePaginationSchema, Size, SliderBehavior, SliderNonLinearPoint, SliderPipSchema, SliderSchema, SlotDataValue, SlotItemSchema, SplitLayoutSchema, StackLayoutSchema, StandaloneComponentSchema, StarterKitDashboardWidgetsSchema, StarterKitNavigationSchema, StarterKitWidgetsSchema, StatSchema, StatsOverviewWidgetSchema, StepSchema, StepValidationHaltedResponse, SubNavigationSchema, SummaryValueSchema, TENANT_MENU_COMPONENT, TabSchema, TableBlock, TableColumnSchema, TableDeferredTotalsSchema, TableGroupOptionSchema, TableGroupingSchema, TablePersistedStateKey, TableRecordGroupSchema, TableRecordSchema, TableSchema, TableSortSchema, TableSpreadsheetSchema, TableSummariesSchema, TableSummaryRowSchema, TableTotalsSchema, TableTriggerActionKey, TableTriggerActionSchema, TableTriggerModalSchema, TableViewItemSchema, TableViewsSchema, TableWidgetSchema, TabsSchema, TagsInputSchema, TenantSchema, TextColumnSchema, TextEntrySchema, TextInputColumnSchema, TextInputSchema, TextSchema, TextStyleProps, TextareaSchema, ToastPosition, ToggleButtonsSchema, ToggleColumnSchema, ToggleSchema, TranslatableLocaleSchema, TranslatableSchema, TranslationCellSchema, TranslationFilter, TranslationHistoryEntry, TranslationLocaleSchema, TranslationManagerSchema, TranslationProgressSchema, TranslationRowSchema, TranslationRowsResult, TranslationSaveResult, TranslationSuggestionSchema, TreeNodeSchema, TreeSchema, TreeStructureItem, TreeWidgetSchema, USER_MENU_COMPONENT, UnorderedListSchema, UploadedFile, VerticalAlignment, ViewColumnSchema, ViewEntrySchema, ViewSchema, VirtualizeSchema, WidgetSchema, WidgetsBlock, Width, WizardSchema, isActionGroup, isField, isOptionGroup, isPartialFormPayload, isStandaloneComponent };
29
+ export { ActionGroupSchema, ActionModalCancelledResponse, ActionModalSchema, ActionResultFlash, ActionSchema, ActionVariant, ActionsComponentSchema, Affixes, AiActionStatus, AiConversationSchema, AiCopilotSchema, AiMessageRole, AiMessageSchema, AiProposedActionSchema, AiSetupNoticeSchema, AiStreamSchema, AlfakitPageProps, Alignment, AnalyticsBreakdownRowSchema, AnalyticsBreakdownTabSchema, AnalyticsBreakdownWidgetSchema, AnyActionSchema, AnyPaginationSchema, AppendingPaginationSchema, Attributes, BaseColumnSchema, BaseComponent, BaseEntry, BaseField, BaseWidgetSchema, BreadcrumbSchema, Breakpoint, Breakpoints, BuilderBlockSchema, BuilderItemSchema, BuilderItemState, BuilderSchema, BulkToggleActionSchema, COMMANDS_COMPONENT, CalendarChangeResult, CalendarEventSchema, CalendarView, CalendarWidgetSchema, CalloutSchema, CellSchema, ChartEmptyStateSchema, ChartFiltersFormSchema, ChartWidgetSchema, CheckboxColumnSchema, CheckboxListSchema, CheckboxSchema, CmsAdminBarSchema, CmsAlternateSchema, CmsAspectRatio, CmsAutosaveResult, CmsBlockSchema, CmsBlockStyle, CmsBreadcrumbSchema, CmsBuiltInBlocks, CmsCallToActionBlockData, CmsColumnsBlockData, CmsEditorStatusSchema, CmsEmbedBlockData, CmsFaqBlockData, CmsFeatureSchema, CmsFeaturesBlockData, CmsFormBlockData, CmsGalleryBlockData, CmsHeroBlockData, CmsImageBlockData, CmsImageSchema, CmsLinkSchema, CmsLivePreviewSchema, CmsMenuItemSchema, CmsMenuSchema, CmsPageProps, CmsPageSchema, CmsPayload, CmsRichTextBlockData, CmsSectionBlockData, CmsSeoSchema, CmsSiteDesign, CmsSiteSchema, CmsTestimonialSchema, CmsTestimonialsBlockData, CodeEditorSchema, CodeEntrySchema, Color, ColorColumnSchema, ColorEntrySchema, ColorPickerSchema, ColumnGroupSchema, ColumnLayoutColumnRef, ColumnLayoutNode, ColumnLayoutSchema, ColumnSchema, ColumnSpanValue, ColumnSummariesSchema, CommandPaletteLinkSchema, CommandPaletteResponse, CommandPaletteSchema, CommandSchema, ConflictsSchema, ContainerBreakpoint, ContentBlock, ContentSlotItem, ContentSlotName, ContentSlotSchema, ContentSlots, CursorPaginationSchema, CustomWidgetSchema, DashboardCustomizeSchema, DashboardLayoutEntry, DashboardLibraryWidget, DashboardSpanOption, DatabaseNotificationsResponse, DatePickerSchema, DebugClosure, DebugDeprecation, DebugNode, DebugSchema, DebugServerTimings, DefaultActionSchema, DeferredBadgeSchema, DeferredTabBadges, DevToolsClass, DevToolsContext, DevToolsSchema, EditableColumnSchema, EmptyStateComponentSchema, EmptyStateSchema, EntrySchema, ErrorNotificationEntrySchema, ErrorNotificationsSchema, FIELD_TYPES, FieldActionResponse, FieldActions, FieldSchema, FieldsetSchema, FileManagerActionNames, FileManagerBreadcrumbSchema, FileManagerDetailsSchema, FileManagerEntrySchema, FileManagerFolderSchema, FileManagerKind, FileManagerLinkSchema, FileManagerListingSchema, FileManagerPermissionsSchema, FileManagerPickedFileSchema, FileManagerPickerSchema, FileManagerPreviewSchema, FileManagerResult, FileManagerSchema, FileUploadImageEditorSchema, FileUploadPositions, FileUploadSchema, FilterIndicator, FilterSchema, FiltersFormWidth, FlexSchema, FormBlock, FormPayload, FormattedStateProps, FusedGroupSchema, GlobalSearchGroupSchema, GlobalSearchResultSchema, GridLayoutSchema, GridSchema, GroupSchema, HelpdeskActivity, HelpdeskAttachment, HelpdeskBadge, HelpdeskChatConfig, HelpdeskChatConversation, HelpdeskChatMessage, HelpdeskChatResponse, HelpdeskInboxList, HelpdeskInboxSchema, HelpdeskMessage, HelpdeskSla, HelpdeskTicket, HelpdeskTicketSummary, HelpdeskView, HiddenSchema, HtmlSchema, IconCellItem, IconColumnSchema, IconEntrySchema, IconName, IconPickerOption, IconPickerResponse, IconPickerSchema, IconPickerSetSchema, IconPosition, IconSchema, ImageCellSchema, ImageColumnSchema, ImageEntrySchema, ImageSchema, ImageStackProps, ImpersonationSchema, InfolistBlock, ItemActionName, ItemActionSchema, ItemActionsItemProps, ItemActionsProps, ItemActionsSchema, KanbanAssigneeSchema, KanbanBadgeSchema, KanbanCardSchema, KanbanColumnSchema, KanbanFetchResult, KanbanFiltersSchema, KanbanLaneSchema, KanbanMoveResult, KanbanSchema, KanbanWidgetSchema, KeyValueEntrySchema, KeyValueSchema, KeyboardShortcutsSchema, LanguageSwitcherPosition, LayoutSchema, LazyRelationManagerSchema, LazyWidgetSchema, LinksBlock, ListTabSchema, ListTabsProps, LiveConfig, LiveUpdatesSchema, LocaleSchema, LocalizationSchema, MenuItemSchema, ModalTableSelectResponse, ModalTableSelectSchema, MoneyInputSchema, NavigationBadgeSchema, NavigationGroupSchema, NavigationItemSchema, NavigationStateSchema, NotificationActionSchema, NotificationSchema, NotificationUndoSchema, OneTimeCodeInputSchema, Operation, Option, OptionGroup, OptionOrGroup, OptionsGridDirection, PageLayout, PageSchema, PaginationSchema, PanelDesignSchema, PanelEndpoints, PanelLayoutSchema, PanelSchema, PanelThemeSchema, PanelUserSchema, PartialFormPayload, PlaceholderSchema, PolledComponents, PresenceSchema, PresenceState, PwaPushSchema, PwaSchema, QueryBuilderConstraintRule, QueryBuilderConstraintSchema, QueryBuilderGroup, QueryBuilderGroupRule, QueryBuilderInput, QueryBuilderOperatorSchema, QueryBuilderRule, QueryBuilderRulesSchema, RadioSchema, RealtimeSchema, RecordKey, RecordVersionChangeSchema, RecordVersionSchema, RecordVersionsSchema, RelationGroupSchema, RelationManagerSchema, RelationManagersBlock, RelationManagersContentTabSchema, RepeatableEntrySchema, RepeaterItemSchema, RepeaterSchema, RichEditorCustomBlockSchema, RichEditorMentionSchema, RichEditorMergeTagSchema, RichEditorSchema, RichEditorToolSchema, RichEditorToolbarGroupSchema, SchemaBlock, SchemaComponent, SchemaComponentContext, SchemaPatch, SchemaRefreshResponse, SectionSchema, SelectColumnSchema, SelectOptionsResponse, SelectSchema, SimplePaginationSchema, Size, SliderBehavior, SliderNonLinearPoint, SliderPipSchema, SliderSchema, SlotDataValue, SlotItemSchema, SplitLayoutSchema, StackLayoutSchema, StandaloneComponentSchema, StarterKitDashboardWidgetsSchema, StarterKitDocumentSchema, StarterKitNavigationSchema, StarterKitWidgetsSchema, StatSchema, StatsOverviewWidgetSchema, StepSchema, StepValidationHaltedResponse, SubNavigationSchema, SummaryValueSchema, TENANT_MENU_COMPONENT, TabSchema, TableBlock, TableColumnSchema, TableDeferredTotalsSchema, TableGroupOptionSchema, TableGroupingSchema, TablePersistedStateKey, TableRecordGroupSchema, TableRecordSchema, TableSchema, TableSortSchema, TableSpreadsheetSchema, TableSummariesSchema, TableSummaryRowSchema, TableTotalsSchema, TableTriggerActionKey, TableTriggerActionSchema, TableTriggerModalSchema, TableViewItemSchema, TableViewsSchema, TableWidgetSchema, TabsSchema, TagsInputSchema, TenantSchema, TextColumnSchema, TextEntrySchema, TextInputColumnSchema, TextInputSchema, TextSchema, TextStyleProps, TextareaSchema, ToastPosition, ToggleButtonsSchema, ToggleColumnSchema, ToggleSchema, TranslatableLocaleSchema, TranslatableSchema, TranslationCellSchema, TranslationFilter, TranslationHistoryEntry, TranslationLocaleSchema, TranslationManagerSchema, TranslationProgressSchema, TranslationRowSchema, TranslationRowsResult, TranslationSaveResult, TranslationSuggestionSchema, TreeNodeSchema, TreeSchema, TreeStructureItem, TreeWidgetSchema, USER_MENU_COMPONENT, UnorderedListSchema, UploadedFile, VerticalAlignment, ViewColumnSchema, ViewEntrySchema, ViewSchema, VirtualizeSchema, WidgetSchema, WidgetsBlock, Width, WizardSchema, isActionGroup, isField, isOptionGroup, isPartialFormPayload, isStandaloneComponent };
@@ -73,6 +73,13 @@ export interface StarterKitDashboardWidgetsSchema {
73
73
  /** A standalone widgets payload bound to the panel (lazy loading and polling included). */
74
74
  component: StandaloneComponentSchema;
75
75
  }
76
+ /** `<html lang dir>` of a page in a starter kit app (`alfakitDocument`). */
77
+ export interface StarterKitDocumentSchema {
78
+ /** BCP 47 tag of the page's language (`ar`, `en-GB`). */
79
+ tag: string;
80
+ /** The direction of the language picked for the `starterKit()` panel. */
81
+ direction: 'ltr' | 'rtl';
82
+ }
76
83
  export interface StarterKitNavigationSchema {
77
84
  /** The panel id. */
78
85
  id: string;
@@ -597,6 +604,13 @@ export interface AlfakitPageProps {
597
604
  * page (the host's own pages too) for the host sidebar. Null for guests.
598
605
  */
599
606
  alfakitNavigation?: StarterKitNavigationSchema[] | null;
607
+ /**
608
+ * `<html lang dir>` while the app has a `starterKit()` panel, shared with every Inertia page
609
+ * (the host's own pages and guests too): the app's current language and the direction of
610
+ * the language picked for the panel, so the whole page flips in a right-to-left language.
611
+ * Null on pages of other panels, which set the document themselves.
612
+ */
613
+ alfakitDocument?: StarterKitDocumentSchema | null;
600
614
  /**
601
615
  * `starterKit()` panels: their dashboard widgets on the host's dashboard
602
616
  * (`starterKitDashboard()`), for `<AlfakitWidgets />`. Null on other pages, for guests
@@ -1 +1 @@
1
- {"version":3,"file":"panel.d.ts","names":[],"sources":["../../src/schema/panel.ts"],"mappings":";;;;;;;;;;;;;;;iBAeiB;;EAEf;;EAEA;EACA,OAAO;;;;;EAKP,aAAa;EACb;EACA;EACA;EACA;EACA,aAAa;EACb;;EAEA;;EAEA;;EAEA,kBAAkB;EAClB,WAAW;;iBAGI;EACf;EACA,OAAO;EACP;EACA;EACA,OAAO;;EAEP,yBAAyB;;EAEzB,wBAAwB;;;iBAIT;EACf;EACA,aAAa;EACb;;;;;;iBAOe;;EAEf;;EAEA,SAAS,eAAe;;;;iBAKT;;EAEf;;EAEA,WAAW;;iBAGI;;EAEf;;EAEA;EACA;;EAEA,QAAQ;;;;;;;EAOR,WAAW;;EAEX,UAAU;;;;;;;iBAQK;;EAEf;;EAEA;IAAW;IAAuB;;;EAElC;IAAkB;IAAe;;;EAEjC;IACE,UAAU;IACV,SAAS;IACT;;IAEA;IACA;;;;;;;EAOF;IAAa;IAAe,SAAS;;;EAErC,gBAAgB;;;;;;EAMhB;IAAY;IAAe;;;;iBAIZ;EACf;EACA,QAAQ;;;;;;;iBAQO;EACf;EACA,OAAO;EACP;EACA;EACA,QAAQ;EACR;EACA,SAAS;;EAET;;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U;IACV,OAAO;;IAEP;;IAEA;;EAEF;IACE;IACA;;;;;IAKA;;EAEF;IACE;IACA;;IAEA;;IAEA;;IAEA;;;;;IAKA;;EAEF,WAAW,QAAQ;IAAoB;;;EAEvC;EACA;IAAQ;IAAgB;IAAmB;;EAC3C;;EAEA,gBAAgB;;;;;EAKhB,WAAW;;EAEX,gBAAgB;;EAEhB,iBAAiB;;EAEjB,oBAAoB;;EAEpB,MAAM;EACN,cAAc;EACd;EACA,cAAc;;iBAGC;EACf;EACA;;YAGU,eACR,YACA,gBACA,cACA,aACA,wBACA,eACA;EACE;EAAc;GAAc;;YAEtB;;iBAGK;EACf;EACA,QAAQ;EACR;EACA;EACA;EACA,cAAc;EACd,kBAAkB;;EAElB;IAAe;IAAiB;;;EAEhC,gBAAgB;EAChB,gBAAgB;;EAEhB;;EAEA,sBAAsB;EACtB,SAAS;;EAET;EACA,SAAS;EACT;IAAS;IAAmB,OAAO;;;;;;EAKnC,gBAAgB;;;;;;EAMhB,qBAAqB;;EAErB,WAAW;;EAEX,YAAY;;;iBAIG;EACf,QAAQ;;EAER;EACA,SAAS;EACT,YAAY;;;;;;YAOF,mBAAmB,eAAe,eAAe,eAAe;;iBAG3D;EACf,SAAS;EACT,OAAO;;EAEP,cAAc;;;;;EAKd,cAAc;;EAEd,mBAAmB;;;;;EAKnB,0BAA0B,eAAe;EACzC;;EAEA;;;;;EAKA,oBAAoB;;;;;;EAMpB,iBAAiB;;;;;;EAMjB,eAAe;;;;;EAKf,kBAAkB;EAClB;IACE,uBAAuB;IACvB;MACE;MACA;MACA;MACA;;MAEA;;KAED;;EAEH,SAAS;GACR"}
1
+ {"version":3,"file":"panel.d.ts","names":[],"sources":["../../src/schema/panel.ts"],"mappings":";;;;;;;;;;;;;;;iBAeiB;;EAEf;;EAEA;EACA,OAAO;;;;;EAKP,aAAa;EACb;EACA;EACA;EACA;EACA,aAAa;EACb;;EAEA;;EAEA;;EAEA,kBAAkB;EAClB,WAAW;;iBAGI;EACf;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A,SAAS;EACT,YAAY;;;;;;YAOF,mBAAmB,eAAe,eAAe,eAAe;;iBAG3D;EACf,SAAS;EACT,OAAO;;EAEP,cAAc;;;;;EAKd,cAAc;;EAEd,mBAAmB;;;;;EAKnB,0BAA0B,eAAe;EACzC;;EAEA;;;;;EAKA,oBAAoB;;;;;;;EAOpB,kBAAkB;;;;;;EAMlB,iBAAiB;;;;;;EAMjB,eAAe;;;;;EAKf,kBAAkB;EAClB;IACE,uBAAuB;IACvB;MACE;MACA;MACA;MACA;;MAEA;;KAED;;EAEH,SAAS;GACR"}
@@ -1 +1 @@
1
- {"version":3,"file":"panel.js","names":[],"sources":["../../src/schema/panel.ts"],"sourcesContent":["import type { ActionSchema, AnyActionSchema } from './actions'\nimport type { CommandPaletteSchema, KeyboardShortcutsSchema } from './command-palette'\nimport type { Color, IconName, RecordKey, Width } from './common'\nimport type { SchemaComponent } from './components'\nimport type { DebugSchema } from './debug'\nimport type { DevToolsSchema } from './dev-tools'\nimport type { FormBlock, InfolistBlock, LinksBlock, SchemaBlock } from './form'\nimport type { NotificationSchema } from './notifications'\nimport type { PwaSchema } from './pwa'\nimport type { ConflictsSchema, PresenceSchema, RealtimeSchema } from './realtime'\nimport type { DeferredTabBadges } from './resources'\nimport type { StandaloneComponentSchema } from './standalone'\nimport type { RelationManagerSchema, RelationManagersBlock, TableBlock } from './table'\nimport type { WidgetSchema, WidgetsBlock } from './widgets'\n\nexport interface NavigationItemSchema {\n /** Text, or sanitised HTML when `labelHtml` is true (an `Htmlable` label). */\n label: string\n /** `label` is sanitised HTML: render it as markup (use `htmlLabelToText()` for text). */\n labelHtml?: boolean\n icon?: IconName\n /**\n * Split navigation (`alfakit.navigation` is an Inertia once prop): the icon of the item\n * while active, swapped in by `resolvePanelNavigation()`.\n */\n activeIcon?: IconName\n url?: string\n openInNewTab?: boolean\n active?: boolean\n badge?: string | number\n badgeColor?: Color\n badgeTooltip?: string\n /** `Panel::deferNavigationBadges()`: the item has a badge that loads after the page. */\n deferredBadge?: boolean\n /** Set by `resolvePanelNavigation()` while a deferred badge is loading (show a placeholder). */\n badgePending?: boolean\n /** `NavigationItem::extraAttributes()`: HTML attributes for the item's link (`class` merges). */\n extraAttributes?: Record<string, string | number | boolean | null>\n children?: NavigationItemSchema[]\n}\n\nexport interface NavigationGroupSchema {\n label?: string | null\n icon?: IconName\n collapsible: boolean\n collapsed?: boolean\n items: NavigationItemSchema[]\n /** `NavigationGroup::extraSidebarAttributes()`: HTML attributes for the group in the sidebar. */\n extraSidebarAttributes?: Record<string, string | number | boolean | null>\n /** `NavigationGroup::extraTopbarAttributes()`: HTML attributes for the group in the top navigation. */\n extraTopbarAttributes?: Record<string, string | number | boolean | null>\n}\n\n/** A navigation item's badge, from `navigationState` or the deferred `alfakitNavigationBadges` prop. */\nexport interface NavigationBadgeSchema {\n badge: string | number\n badgeColor?: Color\n badgeTooltip?: string\n}\n\n/**\n * The per-request part of the panel navigation, whose structure (`navigation`) is an\n * Inertia once prop. Items are addressed by position: `group.item[.child…]` (`0.2.1`).\n */\nexport interface NavigationStateSchema {\n /** The active items (an active child's ancestors included). */\n active?: string[]\n /** Badges, unless `Panel::deferNavigationBadges()` defers them. */\n badges?: Record<string, NavigationBadgeSchema>\n}\n\n/** One `starterKit()` panel's navigation, as shared with the host application's pages. */\n/** One `starterKit()` panel's dashboard widgets on a host page (`alfakitWidgets` prop). */\nexport interface StarterKitDashboardWidgetsSchema {\n /** The panel id. */\n id: string\n /** A standalone widgets payload bound to the panel (lazy loading and polling included). */\n component: StandaloneComponentSchema\n}\n\nexport interface StarterKitNavigationSchema {\n /** The panel id. */\n id: string\n /** The panel's home URL. */\n url: string\n brandName: string\n /** Empty for tenancy panels outside a tenant (their items link to tenant routes). */\n groups: NavigationGroupSchema[]\n /**\n * The panel's own user menu links (`userMenuItems()`, plugin entries such as Billing's),\n * for `<AlfakitUserMenuItems />` in the kit's user menu. Links only (entries with server\n * logic or a modal need an AlfaKit page); omitted when there are none, and for tenancy\n * panels outside a tenant.\n */\n userMenu?: MenuItemSchema[]\n /** What the drop-in header components render before they load. */\n widgets?: StarterKitWidgetsSchema\n}\n\n/**\n * The `widgets` of a `starterKit()` panel's shared navigation: what `<AlfakitSearch />`,\n * `<AlfakitNotifications />`, `<AlfakitTenantSwitcher />` and `<AlfakitLanguageSwitcher />`\n * show on any host page before their code and the panel data (`endpoint`) have loaded.\n */\nexport interface StarterKitWidgetsSchema {\n /** GET: the panel data the components render with (the `alfakit` prop of the panel's pages). */\n endpoint: string\n /** Global search or the command palette (tenancy panels: only inside a tenant). */\n search?: { keyBindings: string[]; placeholder: string }\n /** `databaseNotifications()`: the bell's label and the user's unread count. */\n notifications?: { label: string; unreadCount: number }\n /** Tenancy panels: the user's tenants; `current` is null on the host's own pages. */\n tenancy?: {\n current?: TenantSchema | null\n tenants: TenantSchema[]\n registrationUrl?: string\n /** The registration page's own label (`RegisterTenant::getLabel()`). */\n registrationLabel?: string\n searchable?: true\n }\n /**\n * `<AlfakitLanguageSwitcher />`: the button's label (\"Change language\") and the current\n * language, when the panel has a language switcher with two or more languages\n * (`locales()`). The languages and the locale endpoint come with the panel data.\n */\n language?: { label: string; current: LocaleSchema }\n /** While impersonating: the banner the header components show on the host's own pages. */\n impersonation?: ImpersonationSchema\n /**\n * `AiPlugin::copilot()` (alfasix/alfakit-ai, `$panel->starterKitWidget('copilot')`): the\n * label and shortcuts of `<AlfakitCopilot />` before its code loads. Tenancy panels: only\n * inside a tenant.\n */\n copilot?: { label: string; keyBindings: string[] }\n}\n\n/** A page's secondary navigation: cluster pages or a record's pages. */\nexport interface SubNavigationSchema {\n position: 'start' | 'end' | 'top'\n groups: NavigationGroupSchema[]\n}\n\n/**\n * An entry of the user or tenant menu: a link (`url`, `method: 'post'` for POST links) or\n * an `Action` with server logic or a modal (`action`), run through the action endpoint\n * with the component `userMenu` / `tenantMenu` and the page's token.\n */\nexport interface MenuItemSchema {\n label?: string\n icon?: IconName\n url?: string\n openInNewTab?: boolean\n color?: Color\n method?: 'post'\n action?: ActionSchema\n /** Group index (nested arrays in `userMenuItems()`); a separator divides groups. */\n group?: number\n}\n\n/** Action endpoint components of the menus (`Panel::USER_MENU_COMPONENT`, …). */\nexport const USER_MENU_COMPONENT = 'userMenu'\nexport const TENANT_MENU_COMPONENT = 'tenantMenu'\n\nexport interface PanelUserSchema {\n id: RecordKey\n name: string\n email?: string | null\n avatar?: string | null\n}\n\nexport interface TenantSchema {\n id: RecordKey\n /** Text, or sanitised HTML when `nameHtml` is true (an `Htmlable` `getAlfakitName()`). */\n name: string\n /** `name` is sanitised HTML: render it as markup (use `htmlLabelToText()` for text). */\n nameHtml?: boolean\n avatar?: string | null\n url: string\n /** `HasCurrentTenantLabel`: a caption shown with the current tenant (\"Active team\"). */\n label?: string | null\n}\n\n/** The panel's design, see `Panel::theme()`. */\nexport interface PanelThemeSchema {\n name: string\n /** Value of `data-alfakit-theme`, base theme first: `\"alfakit acme\"`. */\n attribute: string\n sidebar: 'inset' | 'floating' | 'flush'\n density: 'comfortable' | 'compact'\n radius?: string | null\n font?: string | null\n /** CSS value for `--alfakit-font`. */\n fontCss?: string | null\n /** CSS value for `--alfakit-heading-font`. */\n headingFontCss?: string | null\n /** Stylesheet that loads the font, if any. */\n fontUrl?: string | null\n /** Every font stylesheet to load (body and heading fonts). */\n fontUrls?: string[]\n /** Structure and component styles; mirrored as `data-*` attributes on `<html>`. */\n design: PanelDesignSchema\n /**\n * Icon aliases replaced with `Icons::register()` (`alfakit::panels.sidebar.collapse-button`\n * → a Lucide name, image URL or sanitised SVG). The chrome falls back to its own icon.\n */\n icons?: Record<string, string> | null\n}\n\nexport interface PanelDesignSchema {\n layout: 'sidebar' | 'topbar' | 'rail'\n nav: 'soft' | 'pill' | 'bar' | 'underline'\n header: 'plain' | 'banner' | 'band' | 'compact'\n surfaces: 'bordered' | 'elevated' | 'flat' | 'ring'\n inputs: 'outline' | 'filled' | 'underline'\n buttons: 'rounded' | 'pill' | 'square'\n tables: 'lined' | 'striped' | 'minimal'\n /**\n * Below the `md` breakpoint: `drawer` (default) or the `bottom` mobile preset (bottom\n * navigation bar, tables as stacked cards, slide-over modals, 44px touch targets and\n * sticky form actions). See `Panel::mobile()`.\n */\n mobile?: 'drawer' | 'bottom'\n}\n\n/**\n * One piece of slot content: server-rendered HTML or a schema component. `for` lists the\n * components (`relationManager:<class>`, `widget:<id>`) it is scoped to: such items only\n * render in a `<Slot scope=\"…\">` of a matching component. `when` (`Panel::slot(…, when:)`)\n * limits it to renders whose slot data matches: `{ column: 'title' }` only renders in the\n * `table.header-cell` slot of the `title` column; a list value matches any of its entries.\n */\nexport type SlotItemSchema = (\n { type: 'html'; html: string } | { type: 'component'; component: SchemaComponent }\n) & { for?: string[]; when?: Record<string, SlotDataValue | SlotDataValue[]> }\n\n/** A value in a slot's render data (`<Slot data={{ column: 'title' }}>`). */\nexport type SlotDataValue = string | number | boolean | null\n\n/** A language the panel can be displayed in. */\nexport interface LocaleSchema {\n /** Laravel-style code: `en`, `pt_BR`, `zh_Hant`. */\n code: string\n /** BCP 47 tag for `Intl` and the `lang` attribute: `pt-BR`. */\n tag: string\n /** The language's own name: `Deutsch`, `العربية`. */\n label: string\n direction: 'ltr' | 'rtl'\n}\n\n/** The current request's language, formats and the panel's language list. */\nexport interface LocalizationSchema extends LocaleSchema {\n fallbackLocale: string\n /** 0 = Sunday … 6 = Saturday. */\n firstDayOfWeek: number\n /** Default ISO 4217 currency. */\n currency: string\n /** IANA timezone dates are displayed in. */\n timezone: string\n /** Whether to show a language menu. */\n switcher: boolean\n /**\n * Where panel pages offer the menu (`Panel::languageSwitcher()`): the user menu (default\n * when absent), a top bar button, both, or neither. Auth pages keep their switcher.\n */\n switcherPosition?: LanguageSwitcherPosition\n /** Languages to offer in the menu (empty when the switcher is off). */\n locales: LocaleSchema[]\n}\n\nexport type LanguageSwitcherPosition = 'user-menu' | 'topbar' | 'both' | 'hidden'\n\nexport interface PanelEndpoints {\n action: string\n modal: string\n schemaRefresh: string\n schemaOptions: string\n /** Validates one wizard step's fields (`step` = the Step component's key). */\n schemaValidate?: string\n /** Loads `deferLoading()` children and `Tab::deferBadge()` badges (`{schema}::{key}`). */\n schemaDeferred?: string\n tableCell: string\n tableReorder: string\n /** Stores a user's column order (`reorderableColumns()`). */\n tableColumns?: string\n /** `Table::deferTotals()`: the record count and summaries, loaded after the rows. */\n tableTotals?: string\n /** `Table::savedViews()`: save, share, rename, delete and pick a default view. */\n tableViews?: string\n /** `Table::spreadsheet()`: batch save (or validate) grid edits. */\n tableCells?: string\n /** Fresh schemas of lazy and polled components by token (components outside panels). */\n components?: string\n locale: string\n /** Calls `#[Expose]` methods of custom pages (`usePageMethod()`). */\n pageCall?: string\n /** Edit pages: what changed since the form was loaded (`detectConflicts()`). */\n conflicts?: string\n upload: string\n uploadDestroy: string\n /** Starts a resumable chunked upload (`{uploadChunks}/{id}` takes chunks, `/complete` finishes). */\n uploadChunks?: string\n globalSearch: string\n /** Command palette: \"create\" links and recent records (GET). */\n commandPalette?: string\n /** Stores the user's customised keyboard shortcuts (POST `{shortcuts}`). */\n shortcuts?: string\n /** `Action::undoable()`: undoes an action from its toast (POST `{undo}`). */\n undo?: string\n /** `Dashboard::customizable()`: saves or resets the user's layout (POST `{token, layout}`). */\n dashboardLayout?: string\n notifications: string\n notificationsReadAll: string\n notificationsDestroyAll: string\n logout: string\n}\n\n/** Where toasts appear (`Panel::toastPosition()`); `start`/`end` follow the reading direction. */\nexport type ToastPosition =\n 'top-start' | 'top-center' | 'top-end' | 'bottom-start' | 'bottom-center' | 'bottom-end'\n\n/** Shown while impersonating another user (`ImpersonateAction`). */\nexport interface ImpersonationSchema {\n /** \"You are signed in as …\", translated on the server. */\n label: string\n leaveLabel: string\n /** POST here to return to the real user. */\n leaveUrl: string\n}\n\n/** The `alfakit` prop shared with every page of a panel. */\n/**\n * One `errorNotifications` entry: the text to show, or `hidden` (caught, nothing shown,\n * `hiddenErrorNotification()`) or `disabled` (default handling, `disabledErrorNotification()`).\n */\nexport interface ErrorNotificationEntrySchema {\n title?: string\n body?: string | null\n icon?: IconName\n hidden?: boolean\n disabled?: boolean\n}\n\n/** `errorNotifications`, keyed by HTTP status plus `default`. */\nexport type ErrorNotificationsSchema = Record<string, ErrorNotificationEntrySchema>\n\nexport interface PanelSchema {\n id: string\n /**\n * The schema contract version the server serialised (`SchemaContract::VERSION`). Renderers\n * compare its major part with `SCHEMA_CONTRACT_VERSION`; absent on servers before 1.0.\n */\n schemaContract?: string\n path: string\n url?: string\n /** Where \"G then D\" goes when it isn't `url`: the app's `/dashboard` for a starter kit panel without a dashboard page. */\n dashboardUrl?: string\n brandName: string\n brandLogo?: string\n darkModeBrandLogo?: string\n brandLogoHeight?: string\n favicon?: string\n /**\n * Colour custom properties without the `--alfakit-` prefix: `primary`, its readable\n * `primary-foreground` and, for palettes (`Color::Indigo`), `primary-50` … `primary-950`.\n */\n colors?: Record<string, string>\n /**\n * CSS for custom colour names (`colors(['brand' => …])`): `.alfakit-color-{name}` rules\n * that point the generic colour utilities of themes.css at `--alfakit-{name}`.\n */\n colorCss?: string\n darkMode: {\n enabled: boolean\n forced: boolean\n /** `defaultThemeMode()`; absent for `system`. */\n default?: 'light' | 'dark'\n /** `false` when `themeSwitcher(false)`: no switcher, always the default mode. */\n switcher?: false\n }\n /** `false` when `topbar(false)`: sidebar layouts render no top bar (a slim bar on phones). */\n topbar?: false\n sidebarCollapsibleOnDesktop: boolean\n sidebarFullyCollapsibleOnDesktop?: boolean\n topNavigation?: boolean\n maxContentWidth?: Width | string\n breadcrumbs: boolean\n unsavedChangesAlerts?: boolean\n /** `false` when `collapsibleNavigationGroups(false)`: groups never collapse. */\n collapsibleNavigationGroups?: false\n /** CSS lengths for the open and icon-only sidebar (`--sidebar-width`, `--sidebar-width-icon`). */\n sidebarWidth?: string\n collapsedSidebarWidth?: string\n /** Max width of `auth` layout pages (login, registration…). */\n simplePageMaxContentWidth?: Width | string\n /** `false` when `spa(false)`: every link loads a full page. */\n spa?: false\n /** URL patterns (`*` wildcard) that load with a full page request. */\n spaUrlExceptions?: string[]\n /**\n * Notifications shown instead of Inertia's error modal, keyed by HTTP status plus\n * `default`. Absent when disabled or in debug mode. A page's own `errorNotifications`\n * replaces it while that page is open.\n */\n errorNotifications?: ErrorNotificationsSchema\n theme: PanelThemeSchema\n /** Content inserted with `Panel::slot()`, keyed by slot name. */\n slots?: Record<string, SlotItemSchema[]>\n /**\n * Empty for `starterKit()` panels: their navigation is the `alfakitNavigation` page prop,\n * which every page of the host application carries (not only the panel's).\n */\n navigation: NavigationGroupSchema[]\n /**\n * The active items and badges of this request; `navigation` holds only the structure\n * (sent once). Read the navigation through `usePanel()`, which merges the two.\n */\n navigationState?: NavigationStateSchema\n /**\n * `Panel::starterKit()`: the panel runs inside a Laravel starter kit app. Its pages render\n * in the host's own layout (sidebar, header, appearance) and the host's shadcn tokens;\n * the panel's own chrome, theme attributes and colour scheme are not applied.\n */\n starterKit?: true\n user?: PanelUserSchema\n userMenu?: {\n items: MenuItemSchema[]\n profileUrl?: string\n logoutUrl: string\n /** The `profile` entry as customised in `userMenuItems()` (replaces the built-in link). */\n profile?: MenuItemSchema\n /** The customised `logout` entry, or `false` when it is hidden. */\n logout?: MenuItemSchema | false\n /**\n * `topbar` when `userMenu(position: UserMenuPosition::Topbar)`: sidebar layouts show the\n * menu in the top bar instead of the sidebar footer. Omitted for the sidebar.\n */\n position?: 'topbar'\n }\n tenancy?: {\n current?: TenantSchema | null\n tenants: TenantSchema[]\n registrationUrl?: string\n profileUrl?: string\n /** The registration page's own label (`RegisterTenant::getLabel()`); else \"New\". */\n registrationLabel?: string\n /** The profile page's own label (`EditTenantProfile::getLabel()`); else \"Settings\". */\n profileLabel?: string\n /** The customised `register` entry of `tenantMenuItems()`. */\n registration?: MenuItemSchema\n /** The customised `profile` entry of `tenantMenuItems()`. */\n profile?: MenuItemSchema\n menu?: MenuItemSchema[]\n /** `false` when `tenantSwitcher(false)`: `tenants` is empty and the menu lists no others. */\n switcher?: false\n /** `searchableTenantMenu()`, or more than 10 tenants: show a search field in the menu. */\n searchable?: boolean\n }\n databaseNotifications?: {\n pollingInterval?: string\n unreadCount: number\n /**\n * `sidebar` when `databaseNotifications(position: 'sidebar')` or `topbar(false)`: sidebar\n * layouts show the bell in the sidebar instead of the top bar. Omitted for the top bar.\n */\n position?: 'sidebar'\n }\n globalSearch?: {\n keyBindings: string[]\n placeholder: string\n /** `globalSearchDebounce()` in milliseconds; renderers default to 250. */\n debounce?: number\n /** `globalSearchFieldSuffix()`: text shown at the end of the field instead of the key hint. */\n suffix?: string\n /** `false` when `globalSearchFieldKeyBindingSuffix(false)`: no key binding hint. */\n keyBindingSuffix?: false\n /**\n * `sidebar` when `globalSearch(position: GlobalSearchPosition::Sidebar)` or\n * `topbar(false)`: sidebar layouts show the field in the sidebar header. Omitted for the top bar.\n */\n position?: 'sidebar'\n }\n endpoints: Partial<PanelEndpoints> & { logout: string }\n /** `alfakit.uploads.chunk_size` in bytes: larger files are uploaded in chunks. */\n uploadChunkSize?: number\n auth: { login?: string; register?: string; passwordReset?: string }\n flashKey: string\n /** Present while impersonating: render a banner with a way back. */\n impersonation?: ImpersonationSchema\n /**\n * `Panel::realtimeNotifications()`: the private channel to listen on with Laravel Echo;\n * with `Panel::realtime()` also the connection (`live`, `authEndpoint`, `echo`).\n */\n realtime?: RealtimeSchema\n /** Omitted for the default (`top-end`). */\n toastPosition?: ToastPosition\n /** The command palette's extras: page actions, panel commands, navigation, create links, recent records. */\n commandPalette?: CommandPaletteSchema\n /** Keyboard shortcuts (`false` with `keyboardShortcuts(false)`); absent for guests. */\n keyboardShortcuts?: KeyboardShortcutsSchema | false\n /** `Panel::pwa()`: service worker, install prompt and Web Push; absent when off. */\n pwa?: PwaSchema\n localization: LocalizationSchema\n csrf: string\n translations: Record<string, unknown>\n}\n\nexport interface BreadcrumbSchema {\n label: string\n url?: string\n}\n\nexport type ContentBlock =\n | FormBlock\n | InfolistBlock\n | SchemaBlock\n | TableBlock\n | RelationManagersBlock\n | WidgetsBlock\n | LinksBlock\n | { type: string; key: string; [key: string]: unknown }\n\nexport type PageLayout = 'app' | 'auth' | 'blank' | 'fullscreen'\n\n/** The `page` prop rendered by `Alfakit/Page`. */\nexport interface PageSchema {\n class: string\n layout: PageLayout\n title: string\n heading?: string\n subheading?: string\n breadcrumbs?: BreadcrumbSchema[]\n maxContentWidth?: Width | string\n /** `fullscreen` layout: whether to show the slim header, and where its exit link goes. */\n fullscreen?: { header: boolean; exitUrl?: string }\n /** Cluster or record sub-navigation. */\n subNavigation?: SubNavigationSchema\n headerActions?: AnyActionSchema[]\n /** `$headerActionsAlignment`; absent for `end` (the default). */\n headerActionsAlignment?: 'start' | 'center' | 'end' | 'between' | 'justify'\n /** `$extraBodyAttributes` / `getExtraBodyAttributes()`: set on `<body>` while the page is open. */\n extraBodyAttributes?: Record<string, string>\n content: ContentBlock[]\n /** Encrypted context token for internal endpoints. */\n token: string\n record?: RecordKey\n view?: { component: string; props: Record<string, unknown> }\n /**\n * An action whose modal the renderer opens once the page hydrated (`$defaultAction`,\n * `?defaultAction=`, `?tableAction=&tableActionRecord=`).\n */\n defaultAction?: DefaultActionSchema\n /**\n * Page override of the panel's `errorNotifications` (`$hasErrorNotifications`,\n * `setUpErrorNotifications()`): `false` turns them off on this page. Absent when the\n * page follows the panel.\n */\n errorNotifications?: ErrorNotificationsSchema | false\n /** Record pages with `Panel::realtime()`: who else is on the record. */\n presence?: PresenceSchema\n /** Edit pages with `detectConflicts()`: the version the form was loaded from. */\n conflicts?: ConflictsSchema\n}\n\n/** `PageSchema::defaultAction`: what to open and in which context. */\nexport interface DefaultActionSchema {\n action: ActionSchema\n /** Context component: `page`, `table`, `relationManager:…`. */\n component: string\n record?: RecordKey\n arguments?: Record<string, unknown>\n}\n\n/**\n * Fresh schemas returned by a poll, keyed by poll target: `table`, `relationManager:Class`\n * or `widget:<id or class>`.\n */\nexport type PolledComponents = Record<string, ContentBlock | WidgetSchema | RelationManagerSchema>\n\n/** Shape of `usePage().props` on an Alfakit page. */\nexport interface AlfakitPageProps {\n alfakit: PanelSchema\n page?: PageSchema\n /** Components refreshed by a poll (only present after one); merged into `page`. */\n alfakitPoll?: PolledComponents\n /**\n * Lazy widgets and relation managers (`Page::LAZY_PROP`), an Inertia deferred prop that\n * arrives right after the first response; `resolveLazyComponents()` puts them in `page`.\n */\n alfakitLazy?: PolledComponents\n /** Badges of `Tab::deferBadge()` list tabs, a deferred prop loaded after the page. */\n alfakitTabBadges?: DeferredTabBadges\n /**\n * `Panel::deferNavigationBadges()`: the navigation badges keyed by item id\n * (`navigationState`), a deferred prop loaded after the page.\n */\n alfakitNavigationBadges?: Record<string, NavigationBadgeSchema>\n alfakitAppearance?: 'light' | 'dark' | 'system'\n /** The stored sidebar state (`alfakit_sidebar_state` cookie); null when never toggled. */\n alfakitSidebarOpen?: boolean | null\n /**\n * The navigation of the application's `starterKit()` panels, shared with every Inertia\n * page (the host's own pages too) for the host sidebar. Null for guests.\n */\n alfakitNavigation?: StarterKitNavigationSchema[] | null\n /**\n * `starterKit()` panels: their dashboard widgets on the host's dashboard\n * (`starterKitDashboard()`), for `<AlfakitWidgets />`. Null on other pages, for guests\n * and users who may not open the panel.\n */\n alfakitWidgets?: StarterKitDashboardWidgetsSchema[] | null\n /**\n * The developer debug panel's data (`Page::DEBUG_PROP`): schema tree with visibility and\n * authorisation, evaluated closures and server timings. Only present while the panel's\n * debug panel is active; never in production.\n */\n alfakitDebug?: DebugSchema\n /**\n * The schema inspector's data (context identity, class links). Only present while the\n * panel's dev tools are on (`Panel::devTools()` with `app.debug`); never in production.\n */\n alfakitDevTools?: DevToolsSchema\n flash?: {\n alfakitNotifications?: NotificationSchema[]\n alfakitAction?: {\n name: string\n status: 'success' | 'halted' | 'cancelled'\n closeModal?: boolean\n deselectRecords?: boolean | null\n /** A file the handler returned: a signed, one-time link to save it from. */\n download?: string\n }\n [key: string]: unknown\n }\n errors?: Record<string, string>\n [key: string]: unknown\n}\n\nexport type { ActionSchema }\n"],"mappings":";;AAgKA,MAAa,sBAAsB;AACnC,MAAa,wBAAwB"}
1
+ {"version":3,"file":"panel.js","names":[],"sources":["../../src/schema/panel.ts"],"sourcesContent":["import type { ActionSchema, AnyActionSchema } from './actions'\nimport type { CommandPaletteSchema, KeyboardShortcutsSchema } from './command-palette'\nimport type { Color, IconName, RecordKey, Width } from './common'\nimport type { SchemaComponent } from './components'\nimport type { DebugSchema } from './debug'\nimport type { DevToolsSchema } from './dev-tools'\nimport type { FormBlock, InfolistBlock, LinksBlock, SchemaBlock } from './form'\nimport type { NotificationSchema } from './notifications'\nimport type { PwaSchema } from './pwa'\nimport type { ConflictsSchema, PresenceSchema, RealtimeSchema } from './realtime'\nimport type { DeferredTabBadges } from './resources'\nimport type { StandaloneComponentSchema } from './standalone'\nimport type { RelationManagerSchema, RelationManagersBlock, TableBlock } from './table'\nimport type { WidgetSchema, WidgetsBlock } from './widgets'\n\nexport interface NavigationItemSchema {\n /** Text, or sanitised HTML when `labelHtml` is true (an `Htmlable` label). */\n label: string\n /** `label` is sanitised HTML: render it as markup (use `htmlLabelToText()` for text). */\n labelHtml?: boolean\n icon?: IconName\n /**\n * Split navigation (`alfakit.navigation` is an Inertia once prop): the icon of the item\n * while active, swapped in by `resolvePanelNavigation()`.\n */\n activeIcon?: IconName\n url?: string\n openInNewTab?: boolean\n active?: boolean\n badge?: string | number\n badgeColor?: Color\n badgeTooltip?: string\n /** `Panel::deferNavigationBadges()`: the item has a badge that loads after the page. */\n deferredBadge?: boolean\n /** Set by `resolvePanelNavigation()` while a deferred badge is loading (show a placeholder). */\n badgePending?: boolean\n /** `NavigationItem::extraAttributes()`: HTML attributes for the item's link (`class` merges). */\n extraAttributes?: Record<string, string | number | boolean | null>\n children?: NavigationItemSchema[]\n}\n\nexport interface NavigationGroupSchema {\n label?: string | null\n icon?: IconName\n collapsible: boolean\n collapsed?: boolean\n items: NavigationItemSchema[]\n /** `NavigationGroup::extraSidebarAttributes()`: HTML attributes for the group in the sidebar. */\n extraSidebarAttributes?: Record<string, string | number | boolean | null>\n /** `NavigationGroup::extraTopbarAttributes()`: HTML attributes for the group in the top navigation. */\n extraTopbarAttributes?: Record<string, string | number | boolean | null>\n}\n\n/** A navigation item's badge, from `navigationState` or the deferred `alfakitNavigationBadges` prop. */\nexport interface NavigationBadgeSchema {\n badge: string | number\n badgeColor?: Color\n badgeTooltip?: string\n}\n\n/**\n * The per-request part of the panel navigation, whose structure (`navigation`) is an\n * Inertia once prop. Items are addressed by position: `group.item[.child…]` (`0.2.1`).\n */\nexport interface NavigationStateSchema {\n /** The active items (an active child's ancestors included). */\n active?: string[]\n /** Badges, unless `Panel::deferNavigationBadges()` defers them. */\n badges?: Record<string, NavigationBadgeSchema>\n}\n\n/** One `starterKit()` panel's navigation, as shared with the host application's pages. */\n/** One `starterKit()` panel's dashboard widgets on a host page (`alfakitWidgets` prop). */\nexport interface StarterKitDashboardWidgetsSchema {\n /** The panel id. */\n id: string\n /** A standalone widgets payload bound to the panel (lazy loading and polling included). */\n component: StandaloneComponentSchema\n}\n\n/** `<html lang dir>` of a page in a starter kit app (`alfakitDocument`). */\nexport interface StarterKitDocumentSchema {\n /** BCP 47 tag of the page's language (`ar`, `en-GB`). */\n tag: string\n /** The direction of the language picked for the `starterKit()` panel. */\n direction: 'ltr' | 'rtl'\n}\n\nexport interface StarterKitNavigationSchema {\n /** The panel id. */\n id: string\n /** The panel's home URL. */\n url: string\n brandName: string\n /** Empty for tenancy panels outside a tenant (their items link to tenant routes). */\n groups: NavigationGroupSchema[]\n /**\n * The panel's own user menu links (`userMenuItems()`, plugin entries such as Billing's),\n * for `<AlfakitUserMenuItems />` in the kit's user menu. Links only (entries with server\n * logic or a modal need an AlfaKit page); omitted when there are none, and for tenancy\n * panels outside a tenant.\n */\n userMenu?: MenuItemSchema[]\n /** What the drop-in header components render before they load. */\n widgets?: StarterKitWidgetsSchema\n}\n\n/**\n * The `widgets` of a `starterKit()` panel's shared navigation: what `<AlfakitSearch />`,\n * `<AlfakitNotifications />`, `<AlfakitTenantSwitcher />` and `<AlfakitLanguageSwitcher />`\n * show on any host page before their code and the panel data (`endpoint`) have loaded.\n */\nexport interface StarterKitWidgetsSchema {\n /** GET: the panel data the components render with (the `alfakit` prop of the panel's pages). */\n endpoint: string\n /** Global search or the command palette (tenancy panels: only inside a tenant). */\n search?: { keyBindings: string[]; placeholder: string }\n /** `databaseNotifications()`: the bell's label and the user's unread count. */\n notifications?: { label: string; unreadCount: number }\n /** Tenancy panels: the user's tenants; `current` is null on the host's own pages. */\n tenancy?: {\n current?: TenantSchema | null\n tenants: TenantSchema[]\n registrationUrl?: string\n /** The registration page's own label (`RegisterTenant::getLabel()`). */\n registrationLabel?: string\n searchable?: true\n }\n /**\n * `<AlfakitLanguageSwitcher />`: the button's label (\"Change language\") and the current\n * language, when the panel has a language switcher with two or more languages\n * (`locales()`). The languages and the locale endpoint come with the panel data.\n */\n language?: { label: string; current: LocaleSchema }\n /** While impersonating: the banner the header components show on the host's own pages. */\n impersonation?: ImpersonationSchema\n /**\n * `AiPlugin::copilot()` (alfasix/alfakit-ai, `$panel->starterKitWidget('copilot')`): the\n * label and shortcuts of `<AlfakitCopilot />` before its code loads. Tenancy panels: only\n * inside a tenant.\n */\n copilot?: { label: string; keyBindings: string[] }\n}\n\n/** A page's secondary navigation: cluster pages or a record's pages. */\nexport interface SubNavigationSchema {\n position: 'start' | 'end' | 'top'\n groups: NavigationGroupSchema[]\n}\n\n/**\n * An entry of the user or tenant menu: a link (`url`, `method: 'post'` for POST links) or\n * an `Action` with server logic or a modal (`action`), run through the action endpoint\n * with the component `userMenu` / `tenantMenu` and the page's token.\n */\nexport interface MenuItemSchema {\n label?: string\n icon?: IconName\n url?: string\n openInNewTab?: boolean\n color?: Color\n method?: 'post'\n action?: ActionSchema\n /** Group index (nested arrays in `userMenuItems()`); a separator divides groups. */\n group?: number\n}\n\n/** Action endpoint components of the menus (`Panel::USER_MENU_COMPONENT`, …). */\nexport const USER_MENU_COMPONENT = 'userMenu'\nexport const TENANT_MENU_COMPONENT = 'tenantMenu'\n\nexport interface PanelUserSchema {\n id: RecordKey\n name: string\n email?: string | null\n avatar?: string | null\n}\n\nexport interface TenantSchema {\n id: RecordKey\n /** Text, or sanitised HTML when `nameHtml` is true (an `Htmlable` `getAlfakitName()`). */\n name: string\n /** `name` is sanitised HTML: render it as markup (use `htmlLabelToText()` for text). */\n nameHtml?: boolean\n avatar?: string | null\n url: string\n /** `HasCurrentTenantLabel`: a caption shown with the current tenant (\"Active team\"). */\n label?: string | null\n}\n\n/** The panel's design, see `Panel::theme()`. */\nexport interface PanelThemeSchema {\n name: string\n /** Value of `data-alfakit-theme`, base theme first: `\"alfakit acme\"`. */\n attribute: string\n sidebar: 'inset' | 'floating' | 'flush'\n density: 'comfortable' | 'compact'\n radius?: string | null\n font?: string | null\n /** CSS value for `--alfakit-font`. */\n fontCss?: string | null\n /** CSS value for `--alfakit-heading-font`. */\n headingFontCss?: string | null\n /** Stylesheet that loads the font, if any. */\n fontUrl?: string | null\n /** Every font stylesheet to load (body and heading fonts). */\n fontUrls?: string[]\n /** Structure and component styles; mirrored as `data-*` attributes on `<html>`. */\n design: PanelDesignSchema\n /**\n * Icon aliases replaced with `Icons::register()` (`alfakit::panels.sidebar.collapse-button`\n * → a Lucide name, image URL or sanitised SVG). The chrome falls back to its own icon.\n */\n icons?: Record<string, string> | null\n}\n\nexport interface PanelDesignSchema {\n layout: 'sidebar' | 'topbar' | 'rail'\n nav: 'soft' | 'pill' | 'bar' | 'underline'\n header: 'plain' | 'banner' | 'band' | 'compact'\n surfaces: 'bordered' | 'elevated' | 'flat' | 'ring'\n inputs: 'outline' | 'filled' | 'underline'\n buttons: 'rounded' | 'pill' | 'square'\n tables: 'lined' | 'striped' | 'minimal'\n /**\n * Below the `md` breakpoint: `drawer` (default) or the `bottom` mobile preset (bottom\n * navigation bar, tables as stacked cards, slide-over modals, 44px touch targets and\n * sticky form actions). See `Panel::mobile()`.\n */\n mobile?: 'drawer' | 'bottom'\n}\n\n/**\n * One piece of slot content: server-rendered HTML or a schema component. `for` lists the\n * components (`relationManager:<class>`, `widget:<id>`) it is scoped to: such items only\n * render in a `<Slot scope=\"…\">` of a matching component. `when` (`Panel::slot(…, when:)`)\n * limits it to renders whose slot data matches: `{ column: 'title' }` only renders in the\n * `table.header-cell` slot of the `title` column; a list value matches any of its entries.\n */\nexport type SlotItemSchema = (\n { type: 'html'; html: string } | { type: 'component'; component: SchemaComponent }\n) & { for?: string[]; when?: Record<string, SlotDataValue | SlotDataValue[]> }\n\n/** A value in a slot's render data (`<Slot data={{ column: 'title' }}>`). */\nexport type SlotDataValue = string | number | boolean | null\n\n/** A language the panel can be displayed in. */\nexport interface LocaleSchema {\n /** Laravel-style code: `en`, `pt_BR`, `zh_Hant`. */\n code: string\n /** BCP 47 tag for `Intl` and the `lang` attribute: `pt-BR`. */\n tag: string\n /** The language's own name: `Deutsch`, `العربية`. */\n label: string\n direction: 'ltr' | 'rtl'\n}\n\n/** The current request's language, formats and the panel's language list. */\nexport interface LocalizationSchema extends LocaleSchema {\n fallbackLocale: string\n /** 0 = Sunday … 6 = Saturday. */\n firstDayOfWeek: number\n /** Default ISO 4217 currency. */\n currency: string\n /** IANA timezone dates are displayed in. */\n timezone: string\n /** Whether to show a language menu. */\n switcher: boolean\n /**\n * Where panel pages offer the menu (`Panel::languageSwitcher()`): the user menu (default\n * when absent), a top bar button, both, or neither. Auth pages keep their switcher.\n */\n switcherPosition?: LanguageSwitcherPosition\n /** Languages to offer in the menu (empty when the switcher is off). */\n locales: LocaleSchema[]\n}\n\nexport type LanguageSwitcherPosition = 'user-menu' | 'topbar' | 'both' | 'hidden'\n\nexport interface PanelEndpoints {\n action: string\n modal: string\n schemaRefresh: string\n schemaOptions: string\n /** Validates one wizard step's fields (`step` = the Step component's key). */\n schemaValidate?: string\n /** Loads `deferLoading()` children and `Tab::deferBadge()` badges (`{schema}::{key}`). */\n schemaDeferred?: string\n tableCell: string\n tableReorder: string\n /** Stores a user's column order (`reorderableColumns()`). */\n tableColumns?: string\n /** `Table::deferTotals()`: the record count and summaries, loaded after the rows. */\n tableTotals?: string\n /** `Table::savedViews()`: save, share, rename, delete and pick a default view. */\n tableViews?: string\n /** `Table::spreadsheet()`: batch save (or validate) grid edits. */\n tableCells?: string\n /** Fresh schemas of lazy and polled components by token (components outside panels). */\n components?: string\n locale: string\n /** Calls `#[Expose]` methods of custom pages (`usePageMethod()`). */\n pageCall?: string\n /** Edit pages: what changed since the form was loaded (`detectConflicts()`). */\n conflicts?: string\n upload: string\n uploadDestroy: string\n /** Starts a resumable chunked upload (`{uploadChunks}/{id}` takes chunks, `/complete` finishes). */\n uploadChunks?: string\n globalSearch: string\n /** Command palette: \"create\" links and recent records (GET). */\n commandPalette?: string\n /** Stores the user's customised keyboard shortcuts (POST `{shortcuts}`). */\n shortcuts?: string\n /** `Action::undoable()`: undoes an action from its toast (POST `{undo}`). */\n undo?: string\n /** `Dashboard::customizable()`: saves or resets the user's layout (POST `{token, layout}`). */\n dashboardLayout?: string\n notifications: string\n notificationsReadAll: string\n notificationsDestroyAll: string\n logout: string\n}\n\n/** Where toasts appear (`Panel::toastPosition()`); `start`/`end` follow the reading direction. */\nexport type ToastPosition =\n 'top-start' | 'top-center' | 'top-end' | 'bottom-start' | 'bottom-center' | 'bottom-end'\n\n/** Shown while impersonating another user (`ImpersonateAction`). */\nexport interface ImpersonationSchema {\n /** \"You are signed in as …\", translated on the server. */\n label: string\n leaveLabel: string\n /** POST here to return to the real user. */\n leaveUrl: string\n}\n\n/** The `alfakit` prop shared with every page of a panel. */\n/**\n * One `errorNotifications` entry: the text to show, or `hidden` (caught, nothing shown,\n * `hiddenErrorNotification()`) or `disabled` (default handling, `disabledErrorNotification()`).\n */\nexport interface ErrorNotificationEntrySchema {\n title?: string\n body?: string | null\n icon?: IconName\n hidden?: boolean\n disabled?: boolean\n}\n\n/** `errorNotifications`, keyed by HTTP status plus `default`. */\nexport type ErrorNotificationsSchema = Record<string, ErrorNotificationEntrySchema>\n\nexport interface PanelSchema {\n id: string\n /**\n * The schema contract version the server serialised (`SchemaContract::VERSION`). Renderers\n * compare its major part with `SCHEMA_CONTRACT_VERSION`; absent on servers before 1.0.\n */\n schemaContract?: string\n path: string\n url?: string\n /** Where \"G then D\" goes when it isn't `url`: the app's `/dashboard` for a starter kit panel without a dashboard page. */\n dashboardUrl?: string\n brandName: string\n brandLogo?: string\n darkModeBrandLogo?: string\n brandLogoHeight?: string\n favicon?: string\n /**\n * Colour custom properties without the `--alfakit-` prefix: `primary`, its readable\n * `primary-foreground` and, for palettes (`Color::Indigo`), `primary-50` … `primary-950`.\n */\n colors?: Record<string, string>\n /**\n * CSS for custom colour names (`colors(['brand' => …])`): `.alfakit-color-{name}` rules\n * that point the generic colour utilities of themes.css at `--alfakit-{name}`.\n */\n colorCss?: string\n darkMode: {\n enabled: boolean\n forced: boolean\n /** `defaultThemeMode()`; absent for `system`. */\n default?: 'light' | 'dark'\n /** `false` when `themeSwitcher(false)`: no switcher, always the default mode. */\n switcher?: false\n }\n /** `false` when `topbar(false)`: sidebar layouts render no top bar (a slim bar on phones). */\n topbar?: false\n sidebarCollapsibleOnDesktop: boolean\n sidebarFullyCollapsibleOnDesktop?: boolean\n topNavigation?: boolean\n maxContentWidth?: Width | string\n breadcrumbs: boolean\n unsavedChangesAlerts?: boolean\n /** `false` when `collapsibleNavigationGroups(false)`: groups never collapse. */\n collapsibleNavigationGroups?: false\n /** CSS lengths for the open and icon-only sidebar (`--sidebar-width`, `--sidebar-width-icon`). */\n sidebarWidth?: string\n collapsedSidebarWidth?: string\n /** Max width of `auth` layout pages (login, registration…). */\n simplePageMaxContentWidth?: Width | string\n /** `false` when `spa(false)`: every link loads a full page. */\n spa?: false\n /** URL patterns (`*` wildcard) that load with a full page request. */\n spaUrlExceptions?: string[]\n /**\n * Notifications shown instead of Inertia's error modal, keyed by HTTP status plus\n * `default`. Absent when disabled or in debug mode. A page's own `errorNotifications`\n * replaces it while that page is open.\n */\n errorNotifications?: ErrorNotificationsSchema\n theme: PanelThemeSchema\n /** Content inserted with `Panel::slot()`, keyed by slot name. */\n slots?: Record<string, SlotItemSchema[]>\n /**\n * Empty for `starterKit()` panels: their navigation is the `alfakitNavigation` page prop,\n * which every page of the host application carries (not only the panel's).\n */\n navigation: NavigationGroupSchema[]\n /**\n * The active items and badges of this request; `navigation` holds only the structure\n * (sent once). Read the navigation through `usePanel()`, which merges the two.\n */\n navigationState?: NavigationStateSchema\n /**\n * `Panel::starterKit()`: the panel runs inside a Laravel starter kit app. Its pages render\n * in the host's own layout (sidebar, header, appearance) and the host's shadcn tokens;\n * the panel's own chrome, theme attributes and colour scheme are not applied.\n */\n starterKit?: true\n user?: PanelUserSchema\n userMenu?: {\n items: MenuItemSchema[]\n profileUrl?: string\n logoutUrl: string\n /** The `profile` entry as customised in `userMenuItems()` (replaces the built-in link). */\n profile?: MenuItemSchema\n /** The customised `logout` entry, or `false` when it is hidden. */\n logout?: MenuItemSchema | false\n /**\n * `topbar` when `userMenu(position: UserMenuPosition::Topbar)`: sidebar layouts show the\n * menu in the top bar instead of the sidebar footer. Omitted for the sidebar.\n */\n position?: 'topbar'\n }\n tenancy?: {\n current?: TenantSchema | null\n tenants: TenantSchema[]\n registrationUrl?: string\n profileUrl?: string\n /** The registration page's own label (`RegisterTenant::getLabel()`); else \"New\". */\n registrationLabel?: string\n /** The profile page's own label (`EditTenantProfile::getLabel()`); else \"Settings\". */\n profileLabel?: string\n /** The customised `register` entry of `tenantMenuItems()`. */\n registration?: MenuItemSchema\n /** The customised `profile` entry of `tenantMenuItems()`. */\n profile?: MenuItemSchema\n menu?: MenuItemSchema[]\n /** `false` when `tenantSwitcher(false)`: `tenants` is empty and the menu lists no others. */\n switcher?: false\n /** `searchableTenantMenu()`, or more than 10 tenants: show a search field in the menu. */\n searchable?: boolean\n }\n databaseNotifications?: {\n pollingInterval?: string\n unreadCount: number\n /**\n * `sidebar` when `databaseNotifications(position: 'sidebar')` or `topbar(false)`: sidebar\n * layouts show the bell in the sidebar instead of the top bar. Omitted for the top bar.\n */\n position?: 'sidebar'\n }\n globalSearch?: {\n keyBindings: string[]\n placeholder: string\n /** `globalSearchDebounce()` in milliseconds; renderers default to 250. */\n debounce?: number\n /** `globalSearchFieldSuffix()`: text shown at the end of the field instead of the key hint. */\n suffix?: string\n /** `false` when `globalSearchFieldKeyBindingSuffix(false)`: no key binding hint. */\n keyBindingSuffix?: false\n /**\n * `sidebar` when `globalSearch(position: GlobalSearchPosition::Sidebar)` or\n * `topbar(false)`: sidebar layouts show the field in the sidebar header. Omitted for the top bar.\n */\n position?: 'sidebar'\n }\n endpoints: Partial<PanelEndpoints> & { logout: string }\n /** `alfakit.uploads.chunk_size` in bytes: larger files are uploaded in chunks. */\n uploadChunkSize?: number\n auth: { login?: string; register?: string; passwordReset?: string }\n flashKey: string\n /** Present while impersonating: render a banner with a way back. */\n impersonation?: ImpersonationSchema\n /**\n * `Panel::realtimeNotifications()`: the private channel to listen on with Laravel Echo;\n * with `Panel::realtime()` also the connection (`live`, `authEndpoint`, `echo`).\n */\n realtime?: RealtimeSchema\n /** Omitted for the default (`top-end`). */\n toastPosition?: ToastPosition\n /** The command palette's extras: page actions, panel commands, navigation, create links, recent records. */\n commandPalette?: CommandPaletteSchema\n /** Keyboard shortcuts (`false` with `keyboardShortcuts(false)`); absent for guests. */\n keyboardShortcuts?: KeyboardShortcutsSchema | false\n /** `Panel::pwa()`: service worker, install prompt and Web Push; absent when off. */\n pwa?: PwaSchema\n localization: LocalizationSchema\n csrf: string\n translations: Record<string, unknown>\n}\n\nexport interface BreadcrumbSchema {\n label: string\n url?: string\n}\n\nexport type ContentBlock =\n | FormBlock\n | InfolistBlock\n | SchemaBlock\n | TableBlock\n | RelationManagersBlock\n | WidgetsBlock\n | LinksBlock\n | { type: string; key: string; [key: string]: unknown }\n\nexport type PageLayout = 'app' | 'auth' | 'blank' | 'fullscreen'\n\n/** The `page` prop rendered by `Alfakit/Page`. */\nexport interface PageSchema {\n class: string\n layout: PageLayout\n title: string\n heading?: string\n subheading?: string\n breadcrumbs?: BreadcrumbSchema[]\n maxContentWidth?: Width | string\n /** `fullscreen` layout: whether to show the slim header, and where its exit link goes. */\n fullscreen?: { header: boolean; exitUrl?: string }\n /** Cluster or record sub-navigation. */\n subNavigation?: SubNavigationSchema\n headerActions?: AnyActionSchema[]\n /** `$headerActionsAlignment`; absent for `end` (the default). */\n headerActionsAlignment?: 'start' | 'center' | 'end' | 'between' | 'justify'\n /** `$extraBodyAttributes` / `getExtraBodyAttributes()`: set on `<body>` while the page is open. */\n extraBodyAttributes?: Record<string, string>\n content: ContentBlock[]\n /** Encrypted context token for internal endpoints. */\n token: string\n record?: RecordKey\n view?: { component: string; props: Record<string, unknown> }\n /**\n * An action whose modal the renderer opens once the page hydrated (`$defaultAction`,\n * `?defaultAction=`, `?tableAction=&tableActionRecord=`).\n */\n defaultAction?: DefaultActionSchema\n /**\n * Page override of the panel's `errorNotifications` (`$hasErrorNotifications`,\n * `setUpErrorNotifications()`): `false` turns them off on this page. Absent when the\n * page follows the panel.\n */\n errorNotifications?: ErrorNotificationsSchema | false\n /** Record pages with `Panel::realtime()`: who else is on the record. */\n presence?: PresenceSchema\n /** Edit pages with `detectConflicts()`: the version the form was loaded from. */\n conflicts?: ConflictsSchema\n}\n\n/** `PageSchema::defaultAction`: what to open and in which context. */\nexport interface DefaultActionSchema {\n action: ActionSchema\n /** Context component: `page`, `table`, `relationManager:…`. */\n component: string\n record?: RecordKey\n arguments?: Record<string, unknown>\n}\n\n/**\n * Fresh schemas returned by a poll, keyed by poll target: `table`, `relationManager:Class`\n * or `widget:<id or class>`.\n */\nexport type PolledComponents = Record<string, ContentBlock | WidgetSchema | RelationManagerSchema>\n\n/** Shape of `usePage().props` on an Alfakit page. */\nexport interface AlfakitPageProps {\n alfakit: PanelSchema\n page?: PageSchema\n /** Components refreshed by a poll (only present after one); merged into `page`. */\n alfakitPoll?: PolledComponents\n /**\n * Lazy widgets and relation managers (`Page::LAZY_PROP`), an Inertia deferred prop that\n * arrives right after the first response; `resolveLazyComponents()` puts them in `page`.\n */\n alfakitLazy?: PolledComponents\n /** Badges of `Tab::deferBadge()` list tabs, a deferred prop loaded after the page. */\n alfakitTabBadges?: DeferredTabBadges\n /**\n * `Panel::deferNavigationBadges()`: the navigation badges keyed by item id\n * (`navigationState`), a deferred prop loaded after the page.\n */\n alfakitNavigationBadges?: Record<string, NavigationBadgeSchema>\n alfakitAppearance?: 'light' | 'dark' | 'system'\n /** The stored sidebar state (`alfakit_sidebar_state` cookie); null when never toggled. */\n alfakitSidebarOpen?: boolean | null\n /**\n * The navigation of the application's `starterKit()` panels, shared with every Inertia\n * page (the host's own pages too) for the host sidebar. Null for guests.\n */\n alfakitNavigation?: StarterKitNavigationSchema[] | null\n /**\n * `<html lang dir>` while the app has a `starterKit()` panel, shared with every Inertia page\n * (the host's own pages and guests too): the app's current language and the direction of\n * the language picked for the panel, so the whole page flips in a right-to-left language.\n * Null on pages of other panels, which set the document themselves.\n */\n alfakitDocument?: StarterKitDocumentSchema | null\n /**\n * `starterKit()` panels: their dashboard widgets on the host's dashboard\n * (`starterKitDashboard()`), for `<AlfakitWidgets />`. Null on other pages, for guests\n * and users who may not open the panel.\n */\n alfakitWidgets?: StarterKitDashboardWidgetsSchema[] | null\n /**\n * The developer debug panel's data (`Page::DEBUG_PROP`): schema tree with visibility and\n * authorisation, evaluated closures and server timings. Only present while the panel's\n * debug panel is active; never in production.\n */\n alfakitDebug?: DebugSchema\n /**\n * The schema inspector's data (context identity, class links). Only present while the\n * panel's dev tools are on (`Panel::devTools()` with `app.debug`); never in production.\n */\n alfakitDevTools?: DevToolsSchema\n flash?: {\n alfakitNotifications?: NotificationSchema[]\n alfakitAction?: {\n name: string\n status: 'success' | 'halted' | 'cancelled'\n closeModal?: boolean\n deselectRecords?: boolean | null\n /** A file the handler returned: a signed, one-time link to save it from. */\n download?: string\n }\n [key: string]: unknown\n }\n errors?: Record<string, string>\n [key: string]: unknown\n}\n\nexport type { ActionSchema }\n"],"mappings":";;AAwKA,MAAa,sBAAsB;AACnC,MAAa,wBAAwB"}
@@ -0,0 +1,32 @@
1
+ import { StarterKitDocumentSchema } from "./schema/panel.js";
2
+ //#region src/starter-kit-document.d.ts
3
+ /**
4
+ * `<html lang dir>` in a starter kit app. The server shares `alfakitDocument` with every
5
+ * Inertia page while a `starterKit()` panel exists: in a right-to-left panel language the
6
+ * whole page (the kit's sidebar, header and own pages too) is laid out right to left. The
7
+ * kit's root view renders the same `dir` (`StarterKitDocument::direction()`), so these keep
8
+ * it in step after visits and language switches.
9
+ *
10
+ * Its own small module: the host's sidebar and header call it on every page, without the
11
+ * panel runtime.
12
+ */
13
+ /** The shared `alfakitDocument` prop of a page, or null (pages of other panels, older servers). */
14
+ export declare function starterKitDocument(props: unknown): StarterKitDocumentSchema | null;
15
+ /** The page's reading direction in a starter kit app: `rtl` in a right-to-left panel language. */
16
+ export declare function starterKitDirection(props: unknown): 'ltr' | 'rtl';
17
+ /**
18
+ * Which side the kit's shadcn `<Sidebar>` docks on: the end of the line, so the right in a
19
+ * right-to-left language (`side` is physical in shadcn).
20
+ */
21
+ export declare function starterKitSidebarSide(props: unknown): 'left' | 'right';
22
+ /** Put a page's `alfakitDocument` on `<html lang dir>`; nothing without it. */
23
+ export declare function applyStarterKitDocument(props: unknown): void;
24
+ /**
25
+ * Apply `props` (the current page's) to `<html lang dir>` and, once per page load, follow
26
+ * every later visit (a language switch is one: it redirects back). Called by the starter
27
+ * kit's entry points (the sidebar navigation and direction hooks, the header components, the
28
+ * dashboard widgets, AlfaKit pages), so whichever renders first starts it. No-op on the server.
29
+ */
30
+ export declare function installStarterKitDocument(props: unknown): void;
31
+ //#endregion
32
+ //# sourceMappingURL=starter-kit-document.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"starter-kit-document.d.ts","names":[],"sources":["../src/starter-kit-document.ts"],"mappings":";;;;;;;;;;;;;wBAgBgB,mBAAmB,iBAAiB;;wBAapC,oBAAoB;;;;;wBAQpB,sBAAsB;;wBAKtB,wBAAwB;;;;;;;wBAcxB,0BAA0B"}
@@ -0,0 +1,57 @@
1
+ import { applyDocumentLocale } from "./i18n.js";
2
+ import { router } from "@inertiajs/core";
3
+ //#region src/starter-kit-document.ts
4
+ /**
5
+ * `<html lang dir>` in a starter kit app. The server shares `alfakitDocument` with every
6
+ * Inertia page while a `starterKit()` panel exists: in a right-to-left panel language the
7
+ * whole page (the kit's sidebar, header and own pages too) is laid out right to left. The
8
+ * kit's root view renders the same `dir` (`StarterKitDocument::direction()`), so these keep
9
+ * it in step after visits and language switches.
10
+ *
11
+ * Its own small module: the host's sidebar and header call it on every page, without the
12
+ * panel runtime.
13
+ */
14
+ /** The shared `alfakitDocument` prop of a page, or null (pages of other panels, older servers). */
15
+ function starterKitDocument(props) {
16
+ const value = props?.alfakitDocument;
17
+ if (!value || typeof value !== "object") return null;
18
+ const { tag, direction } = value;
19
+ return typeof tag === "string" && (direction === "ltr" || direction === "rtl") ? {
20
+ tag,
21
+ direction
22
+ } : null;
23
+ }
24
+ /** The page's reading direction in a starter kit app: `rtl` in a right-to-left panel language. */
25
+ function starterKitDirection(props) {
26
+ return starterKitDocument(props)?.direction ?? "ltr";
27
+ }
28
+ /**
29
+ * Which side the kit's shadcn `<Sidebar>` docks on: the end of the line, so the right in a
30
+ * right-to-left language (`side` is physical in shadcn).
31
+ */
32
+ function starterKitSidebarSide(props) {
33
+ return starterKitDirection(props) === "rtl" ? "right" : "left";
34
+ }
35
+ /** Put a page's `alfakitDocument` on `<html lang dir>`; nothing without it. */
36
+ function applyStarterKitDocument(props) {
37
+ const document = starterKitDocument(props);
38
+ if (document) applyDocumentLocale(document);
39
+ }
40
+ let listening = false;
41
+ /**
42
+ * Apply `props` (the current page's) to `<html lang dir>` and, once per page load, follow
43
+ * every later visit (a language switch is one: it redirects back). Called by the starter
44
+ * kit's entry points (the sidebar navigation and direction hooks, the header components, the
45
+ * dashboard widgets, AlfaKit pages), so whichever renders first starts it. No-op on the server.
46
+ */
47
+ function installStarterKitDocument(props) {
48
+ if (typeof window === "undefined") return;
49
+ applyStarterKitDocument(props);
50
+ if (listening) return;
51
+ listening = true;
52
+ router.on("navigate", (event) => applyStarterKitDocument(event.detail.page.props));
53
+ }
54
+ //#endregion
55
+ export { applyStarterKitDocument, installStarterKitDocument, starterKitDirection, starterKitDocument, starterKitSidebarSide };
56
+
57
+ //# sourceMappingURL=starter-kit-document.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"starter-kit-document.js","names":[],"sources":["../src/starter-kit-document.ts"],"sourcesContent":["import { router } from '@inertiajs/core'\nimport { applyDocumentLocale } from './i18n'\nimport type { StarterKitDocumentSchema } from './schema/panel'\n\n/**\n * `<html lang dir>` in a starter kit app. The server shares `alfakitDocument` with every\n * Inertia page while a `starterKit()` panel exists: in a right-to-left panel language the\n * whole page (the kit's sidebar, header and own pages too) is laid out right to left. The\n * kit's root view renders the same `dir` (`StarterKitDocument::direction()`), so these keep\n * it in step after visits and language switches.\n *\n * Its own small module: the host's sidebar and header call it on every page, without the\n * panel runtime.\n */\n\n/** The shared `alfakitDocument` prop of a page, or null (pages of other panels, older servers). */\nexport function starterKitDocument(props: unknown): StarterKitDocumentSchema | null {\n const value = (props as { alfakitDocument?: unknown } | null | undefined)?.alfakitDocument\n\n if (!value || typeof value !== 'object') return null\n\n const { tag, direction } = value as Partial<StarterKitDocumentSchema>\n\n return typeof tag === 'string' && (direction === 'ltr' || direction === 'rtl')\n ? { tag, direction }\n : null\n}\n\n/** The page's reading direction in a starter kit app: `rtl` in a right-to-left panel language. */\nexport function starterKitDirection(props: unknown): 'ltr' | 'rtl' {\n return starterKitDocument(props)?.direction ?? 'ltr'\n}\n\n/**\n * Which side the kit's shadcn `<Sidebar>` docks on: the end of the line, so the right in a\n * right-to-left language (`side` is physical in shadcn).\n */\nexport function starterKitSidebarSide(props: unknown): 'left' | 'right' {\n return starterKitDirection(props) === 'rtl' ? 'right' : 'left'\n}\n\n/** Put a page's `alfakitDocument` on `<html lang dir>`; nothing without it. */\nexport function applyStarterKitDocument(props: unknown): void {\n const document = starterKitDocument(props)\n\n if (document) applyDocumentLocale(document)\n}\n\nlet listening = false\n\n/**\n * Apply `props` (the current page's) to `<html lang dir>` and, once per page load, follow\n * every later visit (a language switch is one: it redirects back). Called by the starter\n * kit's entry points (the sidebar navigation and direction hooks, the header components, the\n * dashboard widgets, AlfaKit pages), so whichever renders first starts it. No-op on the server.\n */\nexport function installStarterKitDocument(props: unknown): void {\n if (typeof window === 'undefined') return\n\n applyStarterKitDocument(props)\n\n if (listening) return\n\n listening = true\n router.on('navigate', (event) => applyStarterKitDocument(event.detail.page.props))\n}\n"],"mappings":";;;;;;;;;;;;;;AAgBA,SAAgB,mBAAmB,OAAiD;CAClF,MAAM,QAAS,OAA4D;CAE3E,IAAI,CAAC,SAAS,OAAO,UAAU,UAAU,OAAO;CAEhD,MAAM,EAAE,KAAK,cAAc;CAE3B,OAAO,OAAO,QAAQ,aAAa,cAAc,SAAS,cAAc,SACpE;EAAE;EAAK;CAAU,IACjB;AACN;;AAGA,SAAgB,oBAAoB,OAA+B;CACjE,OAAO,mBAAmB,KAAK,CAAC,EAAE,aAAa;AACjD;;;;;AAMA,SAAgB,sBAAsB,OAAkC;CACtE,OAAO,oBAAoB,KAAK,MAAM,QAAQ,UAAU;AAC1D;;AAGA,SAAgB,wBAAwB,OAAsB;CAC5D,MAAM,WAAW,mBAAmB,KAAK;CAEzC,IAAI,UAAU,oBAAoB,QAAQ;AAC5C;AAEA,IAAI,YAAY;;;;;;;AAQhB,SAAgB,0BAA0B,OAAsB;CAC9D,IAAI,OAAO,WAAW,aAAa;CAEnC,wBAAwB,KAAK;CAE7B,IAAI,WAAW;CAEf,YAAY;CACZ,OAAO,GAAG,aAAa,UAAU,wBAAwB,MAAM,OAAO,KAAK,KAAK,CAAC;AACnF"}
@@ -12,6 +12,15 @@ export declare function hasContainerBreakpoints(map: Breakpoints<unknown> | unde
12
12
  export declare function containerGridColumnsClasses(columns: Breakpoints | undefined): string;
13
13
  /** `@md:col-span-2`-style classes for the container keys of a `columnSpan` map. */
14
14
  export declare function containerColumnSpanClasses(span: Breakpoints<ColumnSpanValue> | undefined): string;
15
+ /**
16
+ * Classes for a table's `contentGrid()`: one column, then `@…:grid-cols-N` container-query
17
+ * classes relative to the `@container` around the card grid. A column count applies from
18
+ * the wider of its key's size (`CONTENT_GRID_FROM`) and the size that fits that many cards
19
+ * (`CONTENT_GRID_MIN`), so cards get fewer columns instead of getting narrow. Container
20
+ * keys (`'@lg' => 2`) are used as given; when two keys land on the same size, the later
21
+ * (wider) key wins.
22
+ */
23
+ export declare function contentGridClasses(grid: Breakpoints | undefined | null): string;
15
24
  /**
16
25
  * Classes for a `Flex` schema component: stacked, then a row (and the vertical alignment)
17
26
  * from its `from` breakpoint. Force-generated with `@source inline(...)` in each renderer.
@@ -1 +1 @@
1
- {"version":3,"file":"container-breakpoints.d.ts","names":[],"sources":["../../src/utils/container-breakpoints.ts"],"mappings":";;;;;;;qBAOa,gCAAgC;;wBAkC7B,wBAAwB,KAAK;;wBAK7B,4BAA4B,SAAS;;wBAarC,2BAA2B,MAAM,YAAY;;;;;wBA6D7C,kBAAkB;EAChC;EACA;EACA;;;wBAYc,gBAAgB;EAAa"}
1
+ {"version":3,"file":"container-breakpoints.d.ts","names":[],"sources":["../../src/utils/container-breakpoints.ts"],"mappings":";;;;;;;qBAOa,gCAAgC;;wBAkC7B,wBAAwB,KAAK;;wBAK7B,4BAA4B,SAAS;;wBAarC,2BAA2B,MAAM,YAAY;;;;;;;;;wBA2D7C,mBAAmB,MAAM;;;;;wBA4EzB,kBAAkB;EAChC;EACA;EACA;;;wBAYc,gBAAgB;EAAa"}
@@ -58,6 +58,68 @@ function containerColumnSpanClasses(span) {
58
58
  return value ? CONTAINER_COL_SPAN[breakpoint]?.[String(value)] : void 0;
59
59
  }).filter(Boolean).join(" ");
60
60
  }
61
+ /**
62
+ * `contentGrid()` breakpoints, read against the width of the table rather than the
63
+ * viewport: the table sits beside the panel sidebar (and a cluster's sub-navigation), so a
64
+ * viewport breakpoint says little about the room the cards have. Each viewport key maps to
65
+ * the largest container size at or below that viewport minus 24rem (a 16rem sidebar plus
66
+ * the page's gutters): `md` 48rem → `@sm` 24rem, `xl` 80rem → `@4xl` 56rem.
67
+ */
68
+ const CONTENT_GRID_FROM = {
69
+ default: null,
70
+ sm: "@3xs",
71
+ md: "@sm",
72
+ lg: "@xl",
73
+ xl: "@4xl",
74
+ "2xl": "@6xl"
75
+ };
76
+ /**
77
+ * The smallest container size that keeps `n` cards at least 15rem wide, with the grid's
78
+ * `p-4` and `gap-4`: 16rem per column plus 1rem. Five or more columns need `@7xl` (80rem).
79
+ */
80
+ const CONTENT_GRID_MIN = {
81
+ 1: null,
82
+ 2: "@xl",
83
+ 3: "@4xl",
84
+ 4: "@6xl"
85
+ };
86
+ const CONTENT_GRID_KEYS = [
87
+ "default",
88
+ "sm",
89
+ "md",
90
+ "lg",
91
+ "xl",
92
+ "2xl"
93
+ ];
94
+ function widerBreakpoint(a, b) {
95
+ if (!a) return b;
96
+ if (!b) return a;
97
+ return CONTAINER_BREAKPOINTS.indexOf(a) >= CONTAINER_BREAKPOINTS.indexOf(b) ? a : b;
98
+ }
99
+ /**
100
+ * Classes for a table's `contentGrid()`: one column, then `@…:grid-cols-N` container-query
101
+ * classes relative to the `@container` around the card grid. A column count applies from
102
+ * the wider of its key's size (`CONTENT_GRID_FROM`) and the size that fits that many cards
103
+ * (`CONTENT_GRID_MIN`), so cards get fewer columns instead of getting narrow. Container
104
+ * keys (`'@lg' => 2`) are used as given; when two keys land on the same size, the later
105
+ * (wider) key wins.
106
+ */
107
+ function contentGridClasses(grid) {
108
+ const classes = /* @__PURE__ */ new Map();
109
+ for (const key of CONTENT_GRID_KEYS) {
110
+ const value = grid?.[key];
111
+ if (!value) continue;
112
+ const count = Math.min(Math.max(Math.trunc(value), 1), 12);
113
+ const at = widerBreakpoint(CONTENT_GRID_FROM[key] ?? null, CONTENT_GRID_MIN[count] ?? "@7xl");
114
+ const cls = at ? CONTAINER_GRID_COLS[at]?.[String(count)] : void 0;
115
+ if (at && cls) classes.set(at, cls);
116
+ }
117
+ for (const breakpoint of CONTAINER_BREAKPOINTS) {
118
+ const cls = CONTAINER_GRID_COLS[breakpoint]?.[String(grid?.[breakpoint] ?? "")];
119
+ if (cls) classes.set(breakpoint, cls);
120
+ }
121
+ return ["grid-cols-1", ...CONTAINER_BREAKPOINTS.map((breakpoint) => classes.get(breakpoint)).filter(Boolean)].join(" ");
122
+ }
61
123
  const FLEX_ROW = {
62
124
  default: "flex-row",
63
125
  sm: "sm:flex-row",
@@ -120,6 +182,6 @@ function flexItemClasses(component) {
120
182
  return component.grow === false ? "min-w-0 shrink-0" : "min-w-0 flex-1";
121
183
  }
122
184
  //#endregion
123
- export { CONTAINER_BREAKPOINTS, containerColumnSpanClasses, containerGridColumnsClasses, flexItemClasses, flexLayoutClasses, hasContainerBreakpoints };
185
+ export { CONTAINER_BREAKPOINTS, containerColumnSpanClasses, containerGridColumnsClasses, contentGridClasses, flexItemClasses, flexLayoutClasses, hasContainerBreakpoints };
124
186
 
125
187
  //# sourceMappingURL=container-breakpoints.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"container-breakpoints.js","names":[],"sources":["../../src/utils/container-breakpoints.ts"],"sourcesContent":["import type { Breakpoints, ColumnSpanValue, ContainerBreakpoint } from '../schema/common'\n\n/**\n * Container-query variants of the grid classes: a `columns` map with `@md`-style keys\n * follows the width of the surrounding `@container` instead of the viewport. Classes are\n * spelled out in full so Tailwind's scanner (and `@source inline`) can see them.\n */\nexport const CONTAINER_BREAKPOINTS: readonly ContainerBreakpoint[] = [\n '@3xs',\n '@2xs',\n '@xs',\n '@sm',\n '@md',\n '@lg',\n '@xl',\n '@2xl',\n '@3xl',\n '@4xl',\n '@5xl',\n '@6xl',\n '@7xl',\n]\n\nconst SPANS = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12] as const\n\nfunction table(prefix: string, values: readonly (number | string)[]): Record<string, string> {\n return Object.fromEntries(values.map((value) => [String(value), `${prefix}${value}`]))\n}\n\nconst CONTAINER_GRID_COLS: Record<string, Record<string, string>> = Object.fromEntries(\n CONTAINER_BREAKPOINTS.map((breakpoint) => [breakpoint, table(`${breakpoint}:grid-cols-`, SPANS)]),\n)\n\nconst CONTAINER_COL_SPAN: Record<string, Record<string, string>> = Object.fromEntries(\n CONTAINER_BREAKPOINTS.map((breakpoint) => [\n breakpoint,\n table(`${breakpoint}:col-span-`, [...SPANS, 'full']),\n ]),\n)\n\n/** Whether a responsive map uses container sizes (`@md`) and so needs an `@container` parent. */\nexport function hasContainerBreakpoints(map: Breakpoints<unknown> | undefined | null): boolean {\n return !!map && Object.keys(map).some((key) => key.startsWith('@'))\n}\n\n/** `@md:grid-cols-3`-style classes for the container keys of a `columns` map. */\nexport function containerGridColumnsClasses(columns: Breakpoints | undefined): string {\n if (!columns) return ''\n\n return CONTAINER_BREAKPOINTS.map((breakpoint) => {\n const value = columns[breakpoint]\n\n return value ? CONTAINER_GRID_COLS[breakpoint]?.[String(value)] : undefined\n })\n .filter(Boolean)\n .join(' ')\n}\n\n/** `@md:col-span-2`-style classes for the container keys of a `columnSpan` map. */\nexport function containerColumnSpanClasses(span: Breakpoints<ColumnSpanValue> | undefined): string {\n if (!span) return ''\n\n return CONTAINER_BREAKPOINTS.map((breakpoint) => {\n const value = span[breakpoint]\n\n return value ? CONTAINER_COL_SPAN[breakpoint]?.[String(value)] : undefined\n })\n .filter(Boolean)\n .join(' ')\n}\n\nconst FLEX_ROW: Record<string, string> = {\n default: 'flex-row',\n sm: 'sm:flex-row',\n md: 'md:flex-row',\n lg: 'lg:flex-row',\n xl: 'xl:flex-row',\n '2xl': '2xl:flex-row',\n}\n\n/** `Flex::alignment()`: main-axis alignment (logical, so `start` follows the direction). */\nconst FLEX_JUSTIFY: Record<string, string> = {\n start: 'justify-start',\n center: 'justify-center',\n end: 'justify-end',\n between: 'justify-between',\n justify: 'justify-between',\n}\n\nconst FLEX_ALIGN: Record<string, Record<string, string>> = {\n start: {\n default: 'items-start',\n sm: 'sm:items-start',\n md: 'md:items-start',\n lg: 'lg:items-start',\n xl: 'xl:items-start',\n '2xl': '2xl:items-start',\n },\n center: {\n default: 'items-center',\n sm: 'sm:items-center',\n md: 'md:items-center',\n lg: 'lg:items-center',\n xl: 'xl:items-center',\n '2xl': '2xl:items-center',\n },\n end: {\n default: 'items-end',\n sm: 'sm:items-end',\n md: 'md:items-end',\n lg: 'lg:items-end',\n xl: 'xl:items-end',\n '2xl': '2xl:items-end',\n },\n}\n\n/**\n * Classes for a `Flex` schema component: stacked, then a row (and the vertical alignment)\n * from its `from` breakpoint. Force-generated with `@source inline(...)` in each renderer.\n */\nexport function flexLayoutClasses(flex: {\n from?: string | null\n verticalAlignment?: string | null\n alignment?: string | null\n}): string {\n const from = flex.from ?? 'default'\n const align = flex.verticalAlignment ? FLEX_ALIGN[flex.verticalAlignment]?.[from] : undefined\n const justify = flex.alignment ? FLEX_JUSTIFY[flex.alignment] : undefined\n\n return ['flex flex-col gap-6', FLEX_ROW[from] ?? 'flex-row', align, justify]\n .filter(Boolean)\n .join(' ')\n}\n\n/** Width behaviour of a child inside a `Flex`: share the row, or keep its natural width. */\nexport function flexItemClasses(component: { grow?: boolean }): string {\n return component.grow === false ? 'min-w-0 shrink-0' : 'min-w-0 flex-1'\n}\n"],"mappings":";;;;;;AAOA,MAAa,wBAAwD;CACnE;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AAEA,MAAM,QAAQ;CAAC;CAAG;CAAG;CAAG;CAAG;CAAG;CAAG;CAAG;CAAG;CAAG;CAAI;CAAI;AAAE;AAEpD,SAAS,MAAM,QAAgB,QAA8D;CAC3F,OAAO,OAAO,YAAY,OAAO,KAAK,UAAU,CAAC,OAAO,KAAK,GAAG,GAAG,SAAS,OAAO,CAA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;EACJ,IAAI;EACJ,OAAO;CACT;CACA,KAAK;EACH,SAAS;EACT,IAAI;EACJ,IAAI;EACJ,IAAI;EACJ,IAAI;EACJ,OAAO;CACT;AACF;;;;;AAMA,SAAgB,kBAAkB,MAIvB;CACT,MAAM,OAAO,KAAK,QAAQ;CAC1B,MAAM,QAAQ,KAAK,oBAAoB,WAAW,KAAK,kBAAkB,GAAG,QAAQ,KAAA;CACpF,MAAM,UAAU,KAAK,YAAY,aAAa,KAAK,aAAa,KAAA;CAEhE,OAAO;EAAC;EAAuB,SAAS,SAAS;EAAY;EAAO;CAAO,CAAC,CACzE,OAAO,OAAO,CAAC,CACf,KAAK,GAAG;AACb;;AAGA,SAAgB,gBAAgB,WAAuC;CACrE,OAAO,UAAU,SAAS,QAAQ,qBAAqB;AACzD"}
1
+ {"version":3,"file":"container-breakpoints.js","names":[],"sources":["../../src/utils/container-breakpoints.ts"],"sourcesContent":["import type { Breakpoints, ColumnSpanValue, ContainerBreakpoint } from '../schema/common'\n\n/**\n * Container-query variants of the grid classes: a `columns` map with `@md`-style keys\n * follows the width of the surrounding `@container` instead of the viewport. Classes are\n * spelled out in full so Tailwind's scanner (and `@source inline`) can see them.\n */\nexport const CONTAINER_BREAKPOINTS: readonly ContainerBreakpoint[] = [\n '@3xs',\n '@2xs',\n '@xs',\n '@sm',\n '@md',\n '@lg',\n '@xl',\n '@2xl',\n '@3xl',\n '@4xl',\n '@5xl',\n '@6xl',\n '@7xl',\n]\n\nconst SPANS = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12] as const\n\nfunction table(prefix: string, values: readonly (number | string)[]): Record<string, string> {\n return Object.fromEntries(values.map((value) => [String(value), `${prefix}${value}`]))\n}\n\nconst CONTAINER_GRID_COLS: Record<string, Record<string, string>> = Object.fromEntries(\n CONTAINER_BREAKPOINTS.map((breakpoint) => [breakpoint, table(`${breakpoint}:grid-cols-`, SPANS)]),\n)\n\nconst CONTAINER_COL_SPAN: Record<string, Record<string, string>> = Object.fromEntries(\n CONTAINER_BREAKPOINTS.map((breakpoint) => [\n breakpoint,\n table(`${breakpoint}:col-span-`, [...SPANS, 'full']),\n ]),\n)\n\n/** Whether a responsive map uses container sizes (`@md`) and so needs an `@container` parent. */\nexport function hasContainerBreakpoints(map: Breakpoints<unknown> | undefined | null): boolean {\n return !!map && Object.keys(map).some((key) => key.startsWith('@'))\n}\n\n/** `@md:grid-cols-3`-style classes for the container keys of a `columns` map. */\nexport function containerGridColumnsClasses(columns: Breakpoints | undefined): string {\n if (!columns) return ''\n\n return CONTAINER_BREAKPOINTS.map((breakpoint) => {\n const value = columns[breakpoint]\n\n return value ? CONTAINER_GRID_COLS[breakpoint]?.[String(value)] : undefined\n })\n .filter(Boolean)\n .join(' ')\n}\n\n/** `@md:col-span-2`-style classes for the container keys of a `columnSpan` map. */\nexport function containerColumnSpanClasses(span: Breakpoints<ColumnSpanValue> | undefined): string {\n if (!span) return ''\n\n return CONTAINER_BREAKPOINTS.map((breakpoint) => {\n const value = span[breakpoint]\n\n return value ? CONTAINER_COL_SPAN[breakpoint]?.[String(value)] : undefined\n })\n .filter(Boolean)\n .join(' ')\n}\n\n/**\n * `contentGrid()` breakpoints, read against the width of the table rather than the\n * viewport: the table sits beside the panel sidebar (and a cluster's sub-navigation), so a\n * viewport breakpoint says little about the room the cards have. Each viewport key maps to\n * the largest container size at or below that viewport minus 24rem (a 16rem sidebar plus\n * the page's gutters): `md` 48rem → `@sm` 24rem, `xl` 80rem → `@4xl` 56rem.\n */\nconst CONTENT_GRID_FROM: Record<string, ContainerBreakpoint | null> = {\n default: null,\n sm: '@3xs',\n md: '@sm',\n lg: '@xl',\n xl: '@4xl',\n '2xl': '@6xl',\n}\n\n/**\n * The smallest container size that keeps `n` cards at least 15rem wide, with the grid's\n * `p-4` and `gap-4`: 16rem per column plus 1rem. Five or more columns need `@7xl` (80rem).\n */\nconst CONTENT_GRID_MIN: Record<number, ContainerBreakpoint | null> = {\n 1: null,\n 2: '@xl', // 33rem → 36rem\n 3: '@4xl', // 49rem → 56rem\n 4: '@6xl', // 65rem → 72rem\n}\n\nconst CONTENT_GRID_KEYS = ['default', 'sm', 'md', 'lg', 'xl', '2xl'] as const\n\nfunction widerBreakpoint(\n a: ContainerBreakpoint | null,\n b: ContainerBreakpoint | null,\n): ContainerBreakpoint | null {\n if (!a) return b\n if (!b) return a\n\n return CONTAINER_BREAKPOINTS.indexOf(a) >= CONTAINER_BREAKPOINTS.indexOf(b) ? a : b\n}\n\n/**\n * Classes for a table's `contentGrid()`: one column, then `@…:grid-cols-N` container-query\n * classes relative to the `@container` around the card grid. A column count applies from\n * the wider of its key's size (`CONTENT_GRID_FROM`) and the size that fits that many cards\n * (`CONTENT_GRID_MIN`), so cards get fewer columns instead of getting narrow. Container\n * keys (`'@lg' => 2`) are used as given; when two keys land on the same size, the later\n * (wider) key wins.\n */\nexport function contentGridClasses(grid: Breakpoints | undefined | null): string {\n const classes = new Map<ContainerBreakpoint, string>()\n\n for (const key of CONTENT_GRID_KEYS) {\n const value = grid?.[key]\n\n if (!value) continue\n\n const count = Math.min(Math.max(Math.trunc(value), 1), 12)\n const at = widerBreakpoint(CONTENT_GRID_FROM[key] ?? null, CONTENT_GRID_MIN[count] ?? '@7xl')\n const cls = at ? CONTAINER_GRID_COLS[at]?.[String(count)] : undefined\n\n if (at && cls) classes.set(at, cls)\n }\n\n for (const breakpoint of CONTAINER_BREAKPOINTS) {\n const cls = CONTAINER_GRID_COLS[breakpoint]?.[String(grid?.[breakpoint] ?? '')]\n\n if (cls) classes.set(breakpoint, cls)\n }\n\n return [\n 'grid-cols-1',\n ...CONTAINER_BREAKPOINTS.map((breakpoint) => classes.get(breakpoint)).filter(Boolean),\n ].join(' ')\n}\n\nconst FLEX_ROW: Record<string, string> = {\n default: 'flex-row',\n sm: 'sm:flex-row',\n md: 'md:flex-row',\n lg: 'lg:flex-row',\n xl: 'xl:flex-row',\n '2xl': '2xl:flex-row',\n}\n\n/** `Flex::alignment()`: main-axis alignment (logical, so `start` follows the direction). */\nconst FLEX_JUSTIFY: Record<string, string> = {\n start: 'justify-start',\n center: 'justify-center',\n end: 'justify-end',\n between: 'justify-between',\n justify: 'justify-between',\n}\n\nconst FLEX_ALIGN: Record<string, Record<string, string>> = {\n start: {\n default: 'items-start',\n sm: 'sm:items-start',\n md: 'md:items-start',\n lg: 'lg:items-start',\n xl: 'xl:items-start',\n '2xl': '2xl:items-start',\n },\n center: {\n default: 'items-center',\n sm: 'sm:items-center',\n md: 'md:items-center',\n lg: 'lg:items-center',\n xl: 'xl:items-center',\n '2xl': '2xl:items-center',\n },\n end: {\n default: 'items-end',\n sm: 'sm:items-end',\n md: 'md:items-end',\n lg: 'lg:items-end',\n xl: 'xl:items-end',\n '2xl': '2xl:items-end',\n },\n}\n\n/**\n * Classes for a `Flex` schema component: stacked, then a row (and the vertical alignment)\n * from its `from` breakpoint. Force-generated with `@source inline(...)` in each renderer.\n */\nexport function flexLayoutClasses(flex: {\n from?: string | null\n verticalAlignment?: string | null\n alignment?: string | null\n}): string {\n const from = flex.from ?? 'default'\n const align = flex.verticalAlignment ? FLEX_ALIGN[flex.verticalAlignment]?.[from] : undefined\n const justify = flex.alignment ? FLEX_JUSTIFY[flex.alignment] : undefined\n\n return ['flex flex-col gap-6', FLEX_ROW[from] ?? 'flex-row', align, justify]\n .filter(Boolean)\n .join(' ')\n}\n\n/** Width behaviour of a child inside a `Flex`: share the row, or keep its natural width. */\nexport function flexItemClasses(component: { grow?: boolean }): string {\n return component.grow === false ? 'min-w-0 shrink-0' : 'min-w-0 flex-1'\n}\n"],"mappings":";;;;;;AAOA,MAAa,wBAAwD;CACnE;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AAEA,MAAM,QAAQ;CAAC;CAAG;CAAG;CAAG;CAAG;CAAG;CAAG;CAAG;CAAG;CAAG;CAAI;CAAI;AAAE;AAEpD,SAAS,MAAM,QAAgB,QAA8D;CAC3F,OAAO,OAAO,YAA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K;EACH,SAAS;EACT,IAAI;EACJ,IAAI;EACJ,IAAI;EACJ,IAAI;EACJ,OAAO;CACT;AACF;;;;;AAMA,SAAgB,kBAAkB,MAIvB;CACT,MAAM,OAAO,KAAK,QAAQ;CAC1B,MAAM,QAAQ,KAAK,oBAAoB,WAAW,KAAK,kBAAkB,GAAG,QAAQ,KAAA;CACpF,MAAM,UAAU,KAAK,YAAY,aAAa,KAAK,aAAa,KAAA;CAEhE,OAAO;EAAC;EAAuB,SAAS,SAAS;EAAY;EAAO;CAAO,CAAC,CACzE,OAAO,OAAO,CAAC,CACf,KAAK,GAAG;AACb;;AAGA,SAAgB,gBAAgB,WAAuC;CACrE,OAAO,UAAU,SAAS,QAAQ,qBAAqB;AACzD"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alfakit/core",
3
- "version": "0.2.0",
3
+ "version": "0.2.2",
4
4
  "description": "Framework-agnostic schema types and state management for Alfakit, the Laravel admin panel builder by Alfa Six.",
5
5
  "license": "MIT",
6
6
  "author": "Alfa Six (https://alfasixbh.com)",