@protobase/ui 0.113.1 → 0.114.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/account/messages.d.ts +2 -2
- package/dist/app/app.d.ts +4 -1
- package/dist/app/app.js +9 -7
- package/dist/app/charts/messages.d.ts +2 -2
- package/dist/app/comments/messages.d.ts +2 -2
- package/dist/app/confirm-sign-in-messages.d.ts +2 -2
- package/dist/app/create/messages.d.ts +2 -2
- package/dist/app/delete/messages.d.ts +2 -2
- package/dist/app/displays/messages.d.ts +2 -2
- package/dist/app/displays/virtual-cards.js +1 -0
- package/dist/app/embedded-list/messages.d.ts +2 -2
- package/dist/app/export/messages.d.ts +2 -2
- package/dist/app/field-messages.d.ts +2 -2
- package/dist/app/field-types/workflow/messages.d.ts +2 -2
- package/dist/app/field-types/workflow-page/messages.d.ts +2 -2
- package/dist/app/field-types/workflow-run/messages.d.ts +2 -2
- package/dist/app/first-frame.d.ts +13 -0
- package/dist/app/first-frame.js +23 -0
- package/dist/app/focus/messages.d.ts +2 -2
- package/dist/app/gallery/gallery-layout.d.ts +2 -2
- package/dist/app/gallery/messages.d.ts +2 -2
- package/dist/app/hand-order/messages.d.ts +2 -2
- package/dist/app/import/messages.d.ts +2 -2
- package/dist/app/index.html +0 -17
- package/dist/app/list-messages.d.ts +2 -2
- package/dist/app/main.js +19 -7
- package/dist/app/messages.d.ts +2 -2
- package/dist/app/pages/messages.d.ts +2 -2
- package/dist/app/record-chart/messages.d.ts +2 -2
- package/dist/app/record-messages.d.ts +2 -2
- package/dist/app/record-mode/shown-layout.d.ts +1 -1
- package/dist/app/record-row/messages.d.ts +2 -2
- package/dist/app/record-row/record-row.js +1 -0
- package/dist/app/refresh-mark.d.ts +2 -1
- package/dist/app/refresh-mark.js +3 -1
- package/dist/app/reveal-when-loaded.d.ts +8 -2
- package/dist/app/reveal-when-loaded.js +12 -5
- package/dist/app/runtime/messages.d.ts +2 -2
- package/dist/app/saved/messages.d.ts +2 -2
- package/dist/app/searches/messages.d.ts +2 -2
- package/dist/app/splash-hold.d.ts +0 -1
- package/dist/app/splash-hold.js +1 -1
- package/dist/app/start-screen.d.ts +0 -9
- package/dist/app/start-screen.js +1 -10
- package/dist/app/ui-ready.d.ts +11 -0
- package/dist/app/ui-ready.js +12 -0
- package/dist/app-shell/app-shell.js +3 -1
- package/dist/app-shell/close-sidebar.d.ts +10 -0
- package/dist/app-shell/close-sidebar.js +17 -0
- package/dist/app-shell/drawer.d.ts +7 -1
- package/dist/app-shell/drawer.js +26 -7
- package/dist/app-shell/index.d.ts +2 -1
- package/dist/app-shell/index.js +2 -1
- package/dist/app-shell/messages.d.ts +2 -2
- package/dist/app-shell/top-bar.js +4 -4
- package/dist/assistant-dock/messages.d.ts +2 -2
- package/dist/auth/messages.d.ts +2 -2
- package/dist/calls/messages.d.ts +2 -2
- package/dist/chat/messages.d.ts +2 -2
- package/dist/data/query-keys.d.ts +6 -0
- package/dist/data/query-keys.js +10 -0
- package/dist/data/start-cache/cached-plugins.d.ts +6 -0
- package/dist/data/start-cache/cached-plugins.js +10 -0
- package/dist/data-grid/data-grid.js +1 -0
- package/dist/data-grid/messages.d.ts +2 -2
- package/dist/data-grid/row-source.d.ts +5 -0
- package/dist/data-grid/use-paged-rows.d.ts +5 -3
- package/dist/data-grid/use-paged-rows.js +21 -6
- package/dist/filter-panel/messages.d.ts +2 -2
- package/dist/index.d.ts +4 -1
- package/dist/index.js +4 -1
- package/dist/inline-child-table/messages.d.ts +2 -2
- package/dist/live/grid-loader.d.ts +1 -0
- package/dist/live/grid-loader.js +3 -1
- package/dist/live/use-live-rows.js +1 -0
- package/dist/mocks/orders.d.ts +1 -1
- package/dist/notifications/bell/messages.d.ts +2 -2
- package/dist/organizations/members-page.js +13 -7
- package/dist/organizations/messages.d.ts +2 -2
- package/dist/organizations/use-organizations.d.ts +4 -1
- package/dist/organizations/use-organizations.js +25 -19
- package/dist/package.js +1 -1
- package/dist/plugins/plugin-source.d.ts +24 -4
- package/dist/plugins/plugin-source.js +48 -14
- package/dist/plugins/use-plugin-loads.d.ts +3 -1
- package/dist/plugins/use-plugin-loads.js +24 -7
- package/dist/primitives/skeleton.js +1 -0
- package/dist/roles/use-active-role.d.ts +4 -1
- package/dist/roles/use-active-role.js +18 -13
- package/dist/shell/assets/api-provider-BJJrOoO4.js +2 -0
- package/dist/shell/assets/app-VoTi41IN.js +16 -0
- package/dist/shell/assets/badge-OU9hb6yQ.js +2 -0
- package/dist/shell/assets/checkbox-DFfK432Y.js +2 -0
- package/dist/shell/assets/createLucideIcon-DGm8SdFI.js +2 -0
- package/dist/shell/assets/display-value-CIH2qfgQ.js +2 -0
- package/dist/shell/assets/{field-badge-3QmjR1r3.js → field-badge-DX2Mc_fH.js} +2 -2
- package/dist/shell/assets/{graph-view-CIk96BRv.js → graph-view-CY9LPr0B.js} +2 -2
- package/dist/shell/assets/{html-viewer-ATz2AVBi.js → html-viewer-BPGMH_GA.js} +2 -2
- package/dist/shell/assets/{in-place-form-frfvnKaj.js → in-place-form-RWSQGEg4.js} +2 -2
- package/dist/shell/assets/index-Bzb-O7ER.js +2 -0
- package/dist/shell/assets/index-HnFovy2Q.css +2 -0
- package/dist/shell/assets/{intl-cache-bXVNV0Yq.js → intl-cache-D4doUjK1.js} +2 -2
- package/dist/shell/assets/{lib-d3-interpolate-Cl0dHO4f.js → lib-d3-interpolate-D3u38iyJ.js} +2 -2
- package/dist/shell/assets/{lib-d3-transition-DUHAGQ8z.js → lib-d3-transition-BUpPvFvt.js} +2 -2
- package/dist/shell/assets/{lib-d3-zoom-gQh2osrj.js → lib-d3-zoom-BF7SPKNh.js} +2 -2
- package/dist/shell/assets/{lib-vis.gl-react-maplibre-CU7gWYjg.js → lib-vis.gl-react-maplibre-C7-0xNFC.js} +2 -2
- package/dist/shell/assets/{lib-xyflow-react-DGg_5r7u.js → lib-xyflow-react-CKyW7szC.js} +2 -2
- package/dist/shell/assets/maplibre-9ViQO48S.js +2 -0
- package/dist/shell/assets/{markdown-content-mNJHzGOa.js → markdown-content-DTB9RQDs.js} +2 -2
- package/dist/shell/assets/{record-map-BsXXSshB.js → record-map-CVqCWtfe.js} +2 -2
- package/dist/shell/assets/{records-map-D8EBzOu8.js → records-map-ClYSxrVR.js} +2 -2
- package/dist/shell/assets/{run-trace-view-Tf6Jwd46.js → run-trace-view-CN16MiXg.js} +2 -2
- package/dist/shell/assets/search-picker-BGpvJQRD.js +2 -0
- package/dist/shell/assets/shared-protobase-ui-BC8LqGQB.js +2 -0
- package/dist/shell/assets/step-catalog-CZY0ZpCC.js +2 -0
- package/dist/shell/assets/step-panel-DhD80lsJ.js +2 -0
- package/dist/shell/assets/use-app-address-B4Uk3nWy.js +2 -0
- package/dist/shell/assets/{use-meta-BqEqOLNe.js → use-meta-D5kYywHm.js} +2 -2
- package/dist/shell/assets/{use-sibling-page-Dm7aUfaa.js → use-sibling-page-BJ81HcOP.js} +3 -3
- package/dist/shell/assets/value-badge-Dpd8dRqq.js +2 -0
- package/dist/shell/assets/{vendor-WWp_xlp2.js → vendor-3etemhgS.js} +4 -4
- package/dist/shell/assets/{workflow-canvas-B8ciy9xI.js → workflow-canvas-C1nGpi5w.js} +2 -2
- package/dist/shell/assets/{workflow-graph-editor-QT-3e-M9.js → workflow-graph-editor-DAJa4lq6.js} +2 -2
- package/dist/shell/assets/workflow-workbench-HramVZEJ.js +4 -0
- package/dist/shell/assets/{workflows-Bku4o2su.js → workflows-DlvOln9v.js} +2 -2
- package/dist/shell/assets/{workflows-start-kl7rSSay.js → workflows-start-QUKfwFqf.js} +2 -2
- package/dist/shell/index.html +16 -19
- package/dist/shell/protobase.shell.json +2 -2
- package/dist/shell/protobase.sw.js +2 -2
- package/dist/shell-source-maps/assets/api-provider-BJJrOoO4.js.map +1 -0
- package/dist/shell-source-maps/assets/app-VoTi41IN.js.map +1 -0
- package/dist/shell-source-maps/assets/{badge-ChHXC28D.js.map → badge-OU9hb6yQ.js.map} +1 -1
- package/dist/shell-source-maps/assets/{checkbox-COOOlJPG.js.map → checkbox-DFfK432Y.js.map} +1 -1
- package/dist/shell-source-maps/assets/createLucideIcon-DGm8SdFI.js.map +1 -0
- package/dist/shell-source-maps/assets/display-value-CIH2qfgQ.js.map +1 -0
- package/dist/shell-source-maps/assets/{field-badge-3QmjR1r3.js.map → field-badge-DX2Mc_fH.js.map} +1 -1
- package/dist/shell-source-maps/assets/{graph-view-CIk96BRv.js.map → graph-view-CY9LPr0B.js.map} +1 -1
- package/dist/shell-source-maps/assets/{html-viewer-ATz2AVBi.js.map → html-viewer-BPGMH_GA.js.map} +1 -1
- package/dist/shell-source-maps/assets/{in-place-form-frfvnKaj.js.map → in-place-form-RWSQGEg4.js.map} +1 -1
- package/dist/shell-source-maps/assets/index-Bzb-O7ER.js.map +1 -0
- package/dist/shell-source-maps/assets/{intl-cache-bXVNV0Yq.js.map → intl-cache-D4doUjK1.js.map} +1 -1
- package/dist/shell-source-maps/assets/{lib-d3-interpolate-Cl0dHO4f.js.map → lib-d3-interpolate-D3u38iyJ.js.map} +1 -1
- package/dist/shell-source-maps/assets/{lib-d3-transition-DUHAGQ8z.js.map → lib-d3-transition-BUpPvFvt.js.map} +1 -1
- package/dist/shell-source-maps/assets/{lib-d3-zoom-gQh2osrj.js.map → lib-d3-zoom-BF7SPKNh.js.map} +1 -1
- package/dist/shell-source-maps/assets/{lib-vis.gl-react-maplibre-CU7gWYjg.js.map → lib-vis.gl-react-maplibre-C7-0xNFC.js.map} +1 -1
- package/dist/shell-source-maps/assets/{lib-xyflow-react-DGg_5r7u.js.map → lib-xyflow-react-CKyW7szC.js.map} +1 -1
- package/dist/shell-source-maps/assets/{maplibre-BufRSV4y.js.map → maplibre-9ViQO48S.js.map} +1 -1
- package/dist/shell-source-maps/assets/{markdown-content-mNJHzGOa.js.map → markdown-content-DTB9RQDs.js.map} +1 -1
- package/dist/shell-source-maps/assets/{record-map-BsXXSshB.js.map → record-map-CVqCWtfe.js.map} +1 -1
- package/dist/shell-source-maps/assets/{records-map-D8EBzOu8.js.map → records-map-ClYSxrVR.js.map} +1 -1
- package/dist/shell-source-maps/assets/{run-trace-view-Tf6Jwd46.js.map → run-trace-view-CN16MiXg.js.map} +1 -1
- package/dist/shell-source-maps/assets/{search-picker-BHmYOFF8.js.map → search-picker-BGpvJQRD.js.map} +1 -1
- package/dist/shell-source-maps/assets/shared-protobase-ui-BC8LqGQB.js.map +1 -0
- package/dist/shell-source-maps/assets/{step-catalog-DZNovnPL.js.map → step-catalog-CZY0ZpCC.js.map} +1 -1
- package/dist/shell-source-maps/assets/{step-panel-3aRZ2Dlj.js.map → step-panel-DhD80lsJ.js.map} +1 -1
- package/dist/shell-source-maps/assets/{use-app-address-B6k3dkV0.js.map → use-app-address-B4Uk3nWy.js.map} +1 -1
- package/dist/shell-source-maps/assets/{use-meta-BqEqOLNe.js.map → use-meta-D5kYywHm.js.map} +1 -1
- package/dist/shell-source-maps/assets/{use-sibling-page-Dm7aUfaa.js.map → use-sibling-page-BJ81HcOP.js.map} +1 -1
- package/dist/shell-source-maps/assets/{value-badge-BKLV4otJ.js.map → value-badge-Dpd8dRqq.js.map} +1 -1
- package/dist/shell-source-maps/assets/{vendor-WWp_xlp2.js.map → vendor-3etemhgS.js.map} +1 -1
- package/dist/shell-source-maps/assets/{workflow-canvas-B8ciy9xI.js.map → workflow-canvas-C1nGpi5w.js.map} +1 -1
- package/dist/shell-source-maps/assets/{workflow-graph-editor-QT-3e-M9.js.map → workflow-graph-editor-DAJa4lq6.js.map} +1 -1
- package/dist/shell-source-maps/assets/{workflow-workbench-C5eHhxQh.js.map → workflow-workbench-HramVZEJ.js.map} +1 -1
- package/dist/shell-source-maps/assets/{workflows-Bku4o2su.js.map → workflows-DlvOln9v.js.map} +1 -1
- package/dist/shell-source-maps/assets/{workflows-start-kl7rSSay.js.map → workflows-start-QUKfwFqf.js.map} +1 -1
- package/dist/status/messages.d.ts +2 -2
- package/dist/styles.css +14 -0
- package/package.json +5 -5
- package/dist/app/hold-start-for-first-loads.d.ts +0 -12
- package/dist/app/hold-start-for-first-loads.js +0 -43
- package/dist/shell/assets/api-provider-CcDtTh0D.js +0 -2
- package/dist/shell/assets/app-C1xWr51x.js +0 -16
- package/dist/shell/assets/badge-ChHXC28D.js +0 -2
- package/dist/shell/assets/checkbox-COOOlJPG.js +0 -2
- package/dist/shell/assets/display-value-fDiKbfJO.js +0 -2
- package/dist/shell/assets/index-BkCaPeOq.css +0 -2
- package/dist/shell/assets/index-C4cMQVG2.js +0 -2
- package/dist/shell/assets/maplibre-BufRSV4y.js +0 -2
- package/dist/shell/assets/messages-ClKBpZlk.js +0 -2
- package/dist/shell/assets/search-picker-BHmYOFF8.js +0 -2
- package/dist/shell/assets/shared-protobase-ui-C1jBhoci.js +0 -2
- package/dist/shell/assets/step-catalog-DZNovnPL.js +0 -2
- package/dist/shell/assets/step-panel-3aRZ2Dlj.js +0 -2
- package/dist/shell/assets/use-app-address-B6k3dkV0.js +0 -2
- package/dist/shell/assets/value-badge-BKLV4otJ.js +0 -2
- package/dist/shell/assets/workflow-workbench-C5eHhxQh.js +0 -4
- package/dist/shell-source-maps/assets/api-provider-CcDtTh0D.js.map +0 -1
- package/dist/shell-source-maps/assets/app-C1xWr51x.js.map +0 -1
- package/dist/shell-source-maps/assets/display-value-fDiKbfJO.js.map +0 -1
- package/dist/shell-source-maps/assets/index-C4cMQVG2.js.map +0 -1
- package/dist/shell-source-maps/assets/messages-ClKBpZlk.js.map +0 -1
- package/dist/shell-source-maps/assets/shared-protobase-ui-C1jBhoci.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"display-value-fDiKbfJO.js","names":["text","text","text","text","text","units","message","n","a","t","__toESM","formatTag","createLucideIcon","cn","cachedFormat","name","segments","pathSource","wholePath","placeholder","parseTemplatePath","text","variable","names","rest","up","templatePlaceholders","match","fillPlaceholders","value","path","wholePlaceholder","recordValueAt","parsed","key","record","resourceField","to","filterField","templated","resource","part","addressPlaceholders","textPlaceholders","hrefPlaceholders","fillText","valueText","fill","lookup","filterPlaceholder","comparedValue","afterComparison","fillFilter","filter","quote","quoted","bare","at","fillAddressFrom","fillAddress","bareFilterFields","quotedLiteral","wholeQuoted","embeddedFilterFields","literal","leavesApp","href","appHrefError","hrefField","hostPlaceholder","linkActionError","run","label","enumLabel","labels","__iconData","ChevronRight","import_jsx_runtime","require_jsx_runtime","Skeleton","skeletonMotion","className","revealLate","text$3","messages","inApp","event","Breadcrumb","parts","last","index","content","loading","current","above","onNavigate","RouteLink","newTab","onClick","onFollow","text$2","isLayoutNode","text$1","viewerZone","partsFormats","partsFormat","known","zone","format","wallClock","ms","zoneOffset","clock","pad","dayIn","instantAt","wall","startOfDayIn","day","zoneLabel","tag","dateFormat","options","dayShort","month","monthName","weekday","weekdayDate","formatDate","formatDayShort","zonedFormats","formatDateTime","formats","formatMonth","formatMonthName","formatMonthRange","from","formatWeekday","formatWeekdayDate","formatDayRange","formatTime","formatAgo","seconds","relative","units$1","formatRelativeTime","away","unit","size","isStoredFile","isFileDraft","fileShown","units","formatSize","bytes","isPreviewable","type","density","unbounded","covers","variant","box","area","shownImage","file","b","acceptOf","accept","field","filePatchValue","draft","fileDiffers","uri","stored","keyPart","model","recordId","recordKey","affixed","hints","displayValue","now","valueTitle"],"sources":["../../../../schema/src/template-path.ts","../../../../schema/src/address-template.ts","../../../../schema/src/enum-label.ts","../../../../../node_modules/.bun/lucide-react@1.52.0+0ac650c021fb1b59/node_modules/lucide-react/dist/esm/icons/chevron-right.mjs","../../../src/primitives/skeleton.tsx","../../../src/app-shell/messages.ts","../../../src/app-shell/breadcrumb.tsx","../../../src/primitives/route-link.tsx","../../../src/app/messages.ts","../../../../layout/src/node.ts","../../../src/format/messages.ts","../../../src/format/zone.ts","../../../src/format/date.ts","../../../src/live/messages.ts","../../../src/live/file-values.ts","../../../src/live/model-helpers.ts","../../../src/live/display-value.ts"],"sourcesContent":["// Handlebars path expressions, the subset a placeholder `{{path}}` and a layout's `source` take: no helpers,\n// subexpressions, literals or `@key`. https://handlebarsjs.com/guide/expressions.html#path-expressions\n\nconst name = '[A-Za-z_][A-Za-z0-9_]*'\nconst segments = `${name}(?:\\\\.${name})*`\nconst pathSource = `@(?:root|params)(?:\\\\.${segments})?|@index|@first|@last|(?:\\\\.\\\\./)*(?:this(?:\\\\.${segments})?|\\\\./${segments}|${segments})`\n\nconst wholePath = new RegExp(`^(?:${pathSource})$`)\n\n/** A `{{…}}` with anything inside but braces, so a placeholder that is no path is found and refused, not left as text. */\nconst placeholder = /\\{\\{\\s*([^{}]*?)\\s*\\}\\}/g\n\n/** A data variable the renderer supplies (`@root`, `@params`, `@index`, `@first`, `@last`), or a name in the context stack. */\nexport type TemplatePath =\n | { kind: 'data'; variable: 'root' | 'params' | 'index' | 'first' | 'last'; names: string[] }\n /**\n * `up` is how many `../` lead it; `explicit` is true for `this`, `./` and any `../`, which read one context only, where\n * a bare name searches the stack. `names` is empty for `this` alone.\n */\n | { kind: 'context'; up: number; explicit: boolean; names: string[] }\n\n/** The path `text` is, or `undefined` when it is none, such as `a b`, `@key` or `../@root`. */\nexport const parseTemplatePath = (text: string): TemplatePath | undefined => {\n if (!wholePath.test(text)) return\n if (text.startsWith('@')) {\n const [variable, ...names] = text.slice(1).split('.')\n return { kind: 'data', variable: variable as 'root' | 'params' | 'index' | 'first' | 'last', names }\n }\n let rest = text\n let up = 0\n while (rest.startsWith('../')) {\n rest = rest.slice(3)\n up += 1\n }\n if (rest === 'this') return { kind: 'context', up, explicit: true, names: [] }\n if (rest.startsWith('this.')) return { kind: 'context', up, explicit: true, names: rest.slice(5).split('.') }\n if (rest.startsWith('./')) return { kind: 'context', up, explicit: true, names: rest.slice(2).split('.') }\n return { kind: 'context', up, explicit: up > 0, names: rest.split('.') }\n}\n\n/** Each `{{…}}` in `text`, as written between the braces, in order and repeated as often as it is. */\nexport const templatePlaceholders = (text: string) => [...text.matchAll(placeholder)].map((match) => match[1]!)\n\n/** `text` with every `{{path}}` replaced by `value(path)`; a placeholder that is no path is replaced too, by what `value` gives it. */\nexport const fillPlaceholders = (text: string, value: (path: string) => string) => text.replace(placeholder, (_, path: string) => value(path))\n\n/** A placeholder holding only a path, such as `{{website}}`: the path, or `undefined` when `text` is more than that. */\nexport const wholePlaceholder = (text: string) => {\n const match = /^\\{\\{\\s*([^{}]*?)\\s*\\}\\}$/.exec(text)\n return match && parseTemplatePath(match[1]!) ? match[1] : undefined\n}\n\n/**\n * The value at `path` in one record, as Mustache reads a single context: the first name from the record, the rest from\n * that value only. Anything that needs another context (`../`, `@root`) has none here, so it is `undefined`.\n */\nexport const recordValueAt = (record: Record<string, unknown>, path: string): unknown => {\n const parsed = parseTemplatePath(path)\n if (!parsed || parsed.kind !== 'context' || parsed.up > 0) return\n return parsed.names.reduce<unknown>((value, key) => (typeof value === 'object' && value !== null && Object.hasOwn(value, key) ? (value as Record<string, unknown>)[key] : undefined), record)\n}\n","import type { AppAddress } from './model'\nimport { fillPlaceholders, recordValueAt, templatePlaceholders, wholePlaceholder } from './template-path'\n\n/** How a filler reads the value at a path, such as `recordValueAt` on one record, or a layout's stack of records. */\nexport type PathLookup = (path: string) => unknown\n\nconst names = templatePlaceholders\n\n/** The path a link's address takes its resource from, when its `resource` is only `{{path}}`, as `'{{name}}'`. */\nexport const resourceField = (to: AppAddress) => (to.kind === 'page' ? undefined : wholePlaceholder(to.resource))\n\n/** The path a list address takes its whole filter from, when its `filter` is only `{{path}}`, as `'{{lever_filter}}'`: the record holds the filter's text. */\nexport const filterField = (to: AppAddress) => (to.kind === 'list' && to.filter !== undefined ? wholePlaceholder(to.filter) : undefined)\n\n// The parts of an address a `{{path}}` may stand in: a page's tab and parameters, the resource, the record key, tab, run and panel, the list's filter and order, a create form's values.\nconst templated = (to: AppAddress): string[] => {\n if (to.kind === 'page') return [...(to.tab === undefined ? [] : [to.tab]), ...Object.values(to.params ?? {})]\n const resource = resourceField(to) === undefined ? [] : [to.resource]\n if (to.kind === 'record') return [...resource, ...(Array.isArray(to.key) ? to.key : [to.key]).filter((part): part is string => typeof part === 'string'), ...[to.tab, to.run, to.panel].filter((part) => part !== undefined)]\n if (to.kind === 'list') return [...resource, ...[to.filter, to.orderBy].filter((part): part is string => part !== undefined)]\n return [...resource, ...Object.values(to.values ?? {})]\n}\n\n/** The paths whose values a link's address takes from the record, from its `{{path}}` placeholders. */\nexport const addressPlaceholders = (to: AppAddress) => [...new Set(templated(to).flatMap(names))]\n\n/** The paths a text, such as an href or a label, takes from the record, from its `{{path}}` placeholders. */\nexport const textPlaceholders = (text: string) => [...new Set(names(text))]\n\n/** The paths an href takes from the record, from its `{{path}}` placeholders. */\nexport const hrefPlaceholders = textPlaceholders\n\n/** `text` with every `{{path}}` replaced by `value(path)`, such as a button's label by the row's values as shown. */\nexport const fillText = fillPlaceholders\n\n/** A value as a placeholder writes it: a missing one empty. */\nexport const valueText = (value: unknown) => (value === null || value === undefined ? '' : String(value))\n\nconst fill = (text: string, lookup: PathLookup) => fillText(text, (path) => valueText(lookup(path)))\n\nconst filterPlaceholder = /([\"'])\\{\\{\\s*([^{}]*?)\\s*\\}\\}\\1|\\{\\{\\s*([^{}]*?)\\s*\\}\\}/g\n\n// A bare placeholder that is a comparison's value, as a typed layout writes `f.title.eq(data.title)`, or a function's\n// argument after the first, as in `in(title, {{title}})`: one bare word, such\n// as a number, a key or true, as it is; text that would break into more, such as a name with a space, quoted, so it\n// stays one value. Any other bare placeholder, a whole filter or a duration, goes in as it is.\nconst comparedValue = (value: unknown) => (typeof value === 'string' && value !== '' && !/^[\\w.:+-]+$/.test(value) ? JSON.stringify(value) : valueText(value))\n\nconst afterComparison = /(?:[=<>:,]|!=)\\s*$/\n\n/**\n * `filter` with every `{{path}}` replaced by its value. A quoted `'{{path}}'` takes the value as a string, its\n * backslashes and quotes escaped, so any text stays one value; Handlebars escapes for HTML instead, where this lands in\n * a filter or condition. A bare `{{path}}` that is a comparison's value, as a typed layout writes `f.title.eq(data.title)`,\n * takes one bare word as it is, such as a number or a key, and text with spaces or quotes quoted; any other bare one,\n * such as a whole filter or a duration, goes in as it is.\n */\nexport const fillFilter = (filter: string, lookup: PathLookup) =>\n filter.replace(filterPlaceholder, (_, quote: string | undefined, quoted: string | undefined, bare: string | undefined, at: number) => {\n if (quote) return `${quote}${valueText(lookup(quoted!)).replace(/\\\\/g, '\\\\\\\\').replaceAll(quote, `\\\\${quote}`)}${quote}`\n const value = lookup(bare!)\n return afterComparison.test(filter.slice(0, at)) ? comparedValue(value) : valueText(value)\n })\n\n/**\n * `to` with every `{{path}}` in its page parameters, resource, key, tab, run, panel, filter, order or values replaced by the value\n * `lookup` gives; a missing value becomes empty, and one quoted in a filter is escaped.\n */\nexport const fillAddressFrom = (to: AppAddress, lookup: PathLookup): AppAddress => {\n if (to.kind === 'page') return { ...to, ...(to.tab !== undefined && { tab: fill(to.tab, lookup) }), ...(to.params && { params: Object.fromEntries(Object.entries(to.params).map(([name, value]) => [name, fill(value, lookup)])) }) }\n const resource = resourceField(to) === undefined ? to.resource : fill(to.resource, lookup)\n if (to.kind === 'record') {\n const part = (value: string | number) => (typeof value === 'string' ? fill(value, lookup) : value)\n return { ...to, resource, key: Array.isArray(to.key) ? to.key.map(part) : part(to.key as string | number), ...(to.tab !== undefined && { tab: fill(to.tab, lookup) }), ...(to.run !== undefined && { run: fill(to.run, lookup) }), ...(to.panel !== undefined && { panel: fill(to.panel, lookup) }) }\n }\n if (to.kind === 'create') return { ...to, resource, ...(to.values && { values: Object.fromEntries(Object.entries(to.values).map(([name, value]) => [name, fill(value, lookup)])) }) }\n return { ...to, resource, ...(to.filter !== undefined && { filter: fillFilter(to.filter, lookup) }), ...(to.orderBy !== undefined && { orderBy: fill(to.orderBy, lookup) }) }\n}\n\n/** `to` with every `{{path}}` replaced by the record's value at that path. */\nexport const fillAddress = (to: AppAddress, record: Record<string, unknown> = {}): AppAddress => fillAddressFrom(to, (path) => recordValueAt(record, path))\n\n/** The paths a list address's filter takes outside quotes, whose values go into the filter as they are, such as `{{task_id}}` in `task_id = {{task_id}}`. */\nexport const bareFilterFields = (to: AppAddress) =>\n to.kind === 'list' && to.filter !== undefined ? [...new Set([...to.filter.matchAll(filterPlaceholder)].flatMap((match) => (match[3] === undefined ? [] : [match[3]])))] : []\n\nconst quotedLiteral = /([\"'])(?:\\\\[\\s\\S]|(?!\\1)[^\\\\])*\\1/g\n\nconst wholeQuoted = /^([\"'])\\{\\{\\s*[^{}]*?\\s*\\}\\}\\1$/\n\n/**\n * The paths a filter takes inside a longer quoted value, such as `{{name}}` in `title = 'abc{{name}}'`; only a quoted\n * value that is the placeholder alone is escaped when filled, so these are refused.\n */\nexport const embeddedFilterFields = (filter: string) => [...new Set([...filter.matchAll(quotedLiteral)].flatMap(([literal]) => (wholeQuoted.test(literal) ? [] : names(literal))))]\n\n/**\n * Whether an href leaves the app: it starts with a scheme (`https:`, `mailto:`) or `//`. A path inside the app is an\n * address, given as `to`, so that it is written one way everywhere.\n */\nexport const leavesApp = (href: string) => /^([a-z][a-z0-9+.-]*:|\\/\\/)/i.test(href)\n\n/** Why an href cannot be a link's `href`: it points inside the app, which takes an address in `to`. */\nexport const appHrefError = (href: string) =>\n leavesApp(href) ? undefined : `href \"${href}\" points inside the app; give the link \\`to\\` instead, an address such as { kind: 'record', resource: 'orders', key: '{{order_id}}' }`\n\n/** The path an action's href is made of alone, `{{field}}`: the record's value is the whole URL, as it is stored. */\nexport const hrefField = wholePlaceholder\n\n/** What a link action's label writes for the host its target opens. */\nexport const hostPlaceholder = '{{host}}'\n\n/**\n * Why a link action cannot be built: an `href` that points inside the app (one that is a single `{{field}}`, the URL the\n * record holds, is fine), or `{{host}}` in the label of a link that goes `to` an address in the app, which has no host.\n */\nexport const linkActionError = (label: string, run: { to: AppAddress } | { href: string }) => {\n if ('href' in run) return hrefField(run.href) ? undefined : appHrefError(run.href)\n return label.includes(hostPlaceholder) ? `the label names ${hostPlaceholder}, which only a link with an href has` : undefined\n}\n","/** How an enum value reads: its label from the view's `valueLabels`, else the stored value unchanged (`co_signer`). */\nexport const enumLabel = (value: string, labels?: Record<string, string>) => labels?.[value] ?? value\n","/**\n * @license lucide-react v1.52.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.mjs';\n\nconst __iconData = {\n name: \"chevron-right\",\n size: 24,\n node: [[\"path\", { d: \"m9 18 6-6-6-6\", key: \"mthhwq\" }]]\n};\n__iconData.node;\nconst ChevronRight = createLucideIcon(__iconData);\n\nexport { __iconData, ChevronRight as default };\n//# sourceMappingURL=chevron-right.mjs.map\n","import type { CSSProperties } from 'react'\nimport { cn } from '../lib/cn'\n\n/**\n * A placeholder shaped like what is loading, which keeps that content's room. It stays blank for its first 180 ms, so a\n * load that quick shows no flash, then shimmers, or stays still when less motion is asked for.\n */\nexport const Skeleton = ({ className, style }: { className?: string; style?: CSSProperties }) => (\n <span className={cn('block h-3 rounded bg-muted', skeletonMotion, className)} style={style} />\n)\n\n/** Blank for the first 180 ms, for a loading notice such as a spinner, so a quick load never flashes it. */\nexport const revealLate = '[animation:pb-reveal_1ms_180ms_backwards]'\n\nconst skeletonMotion = '[animation:pb-reveal_1ms_180ms_backwards,pb-shimmer_1.4s_180ms_ease-in-out_infinite] motion-reduce:[animation:pb-reveal_1ms_180ms_backwards]'\n","import { messages } from '../locale/messages'\n\nexport const text = messages('app-shell')\n","import { ChevronRight } from 'lucide-react'\nimport type { MouseEvent } from 'react'\nimport { cn } from '../lib/cn'\nimport { Skeleton } from '../primitives/skeleton'\nimport { text } from './messages'\n\n/**\n * One step of the top bar's trail: plain text, or a link when it has a page of its own. A loading crumb shows a skeleton,\n * with its label for screen readers. A last crumb marked `above` is the page the shown one sits under, as a list is\n * above its record: it is not the current page, and on a phone the back button, which goes to it, shows its label.\n */\nexport type Crumb = string | { label: string; href?: string; loading?: boolean; above?: boolean }\n\nexport type BreadcrumbProps = {\n parts: Crumb[]\n /** Follows a crumb's link in the app; modified and middle clicks are left to the browser, so they open a new tab. */\n onNavigate?: (href: string) => void\n}\n\n/** A plain left click, which the app follows itself; others open a new tab. */\nexport const inApp = (event: MouseEvent) => event.button === 0 && !event.metaKey && !event.ctrlKey && !event.shiftKey && !event.altKey\n\n/** The trail of where you are; the current page, the last crumb unless it is `above`, shows on phones too. */\nexport const Breadcrumb = ({ parts, onNavigate }: BreadcrumbProps) => (\n <nav aria-label={text('breadcrumb')} className=\"flex min-w-0 items-center gap-1.5\">\n {parts.map((part, index) => {\n const last = index === parts.length - 1\n const { label, href, loading, above } = typeof part === 'string' ? { label: part, href: undefined, loading: false, above: false } : part\n const content = loading ? <Skeleton className=\"w-24\" /> : label\n const current = last && !above\n const text = cn('truncate', current ? 'font-semibold' : 'text-muted-foreground')\n return (\n <span key={`${index}-${label}`} className={cn('min-w-0 items-center gap-1.5', current ? 'flex' : 'hidden md:flex')}>\n {index > 0 && <ChevronRight className=\"hidden size-3.5 shrink-0 text-faint-foreground md:block\" />}\n {href ? (\n <a\n href={href}\n aria-current={current ? 'page' : undefined}\n aria-label={loading ? label : undefined}\n aria-busy={loading || undefined}\n onClick={(event) => {\n if (!onNavigate || !inApp(event)) return\n event.preventDefault()\n onNavigate(href)\n }}\n className={cn(text, 'rounded-sm hover:text-foreground hover:underline')}\n >\n {content}\n </a>\n ) : (\n <span className={text} aria-label={loading ? label : undefined} aria-busy={loading || undefined}>\n {content}\n </span>\n )}\n </span>\n )\n })}\n </nav>\n)\n","import type { AnchorHTMLAttributes } from 'react'\nimport { inApp } from '../app-shell/breadcrumb'\n\n/**\n * Where a link goes: the `href` the browser shows and opens, and how the app follows it in place. One without\n * `onFollow`, a page outside the app, the browser follows itself, in a new tab without the app's window or address\n * with `newTab`.\n */\nexport type RouteTarget = { href: string; onFollow?: () => void; newTab?: boolean }\n\n/**\n * An ordinary anchor to `to.href`: a plain click follows it in place with `to.onFollow`, while a middle click or one\n * with Ctrl, Cmd, Shift or Alt opens it in a new tab or window, or saves it, as on any link. Every navigation a click\n * starts is one of these, never a button that moves the page, so the browser shows where it goes and can open it.\n */\nexport const RouteLink = ({ to, onClick, ...rest }: AnchorHTMLAttributes<HTMLAnchorElement> & { to: RouteTarget }) => {\n const { href, onFollow, newTab } = to\n return (\n <a\n href={href}\n {...(newTab && { target: '_blank', rel: 'noreferrer' })}\n onClick={(event) => {\n onClick?.(event)\n if (!onFollow || event.defaultPrevented || !inApp(event)) return\n event.preventDefault()\n onFollow()\n }}\n {...rest}\n />\n )\n}\n","import { messages } from '../locale/messages'\n\n// Texts the app's pages share: the notices of an address that leads nowhere, and an error without words of its own\nexport const text = messages('app')\n","/** A static value a layout prop may hold: what survives `JSON.stringify` unchanged, plus elements (also plain data). */\nexport type LayoutValue = string | number | boolean | null | LayoutValue[] | { [key: string]: LayoutValue }\n\n/**\n * Which props of a block that reads records name what it reads: the resource, its filter, its sort, the fields it\n * draws and how many records it reads, so a page's reads can be planned from the tree. A block without one reads\n * nothing of its own. `fields` is a prop, or several, each holding a field name or a list of them. `select` is the\n * prop naming the page parameter that holds the key of the record chosen among them, inside which its children draw.\n */\nexport type BlockReads = { resource: string; filter?: string; sort?: string; fields?: string | string[]; limit?: string; select?: string }\n\n/**\n * What a custom component reads: one read, or several, each named by the prop of its resource (`nodes`, `edges`), as\n * the page's plan names them.\n */\nexport type ComponentReads = BlockReads | BlockReads[]\n\n/** One element of a layout tree. Plain data: it is sent to the browser as JSON and rendered there. */\nexport type LayoutNode = {\n /** A built-in block (`Table`) or a custom component's registered name. */\n type: string\n props: Record<string, LayoutValue>\n children: LayoutChild[]\n /** Set on custom components, which the app renders with the React component registered under `type`. */\n custom?: true\n /**\n * What a client draws in place of a custom component it does not have, or that fails to draw: elements and text,\n * or none to draw nothing. Absent when the component declares no fallback.\n */\n fallback?: LayoutChild[]\n /** Which of a custom component's props name what it reads, as its `component()` declares, so the page's plan reads it. */\n reads?: ComponentReads\n}\n\nexport type LayoutChild = LayoutNode | string\n\n/** What JSX accepts as children; `null`, `undefined` and booleans render nothing, like in React. */\nexport type LayoutChildren = LayoutChild | number | boolean | null | undefined | LayoutChildren[]\n\n/** A block as JSX sees it: called by the runtime with its props, it describes one element. */\nexport type Block<P> = ((props: P) => LayoutNode) & { readonly blockName: string; readonly custom: boolean; readonly fallback?: LayoutChild[]; readonly reads?: ComponentReads }\n\nexport const isLayoutNode = (value: unknown): value is LayoutNode =>\n typeof value === 'object' && value !== null && !Array.isArray(value) && typeof (value as LayoutNode).type === 'string' && Array.isArray((value as LayoutNode).children)\n\n/** An element's props without the elements it holds (`actions={...}`), which are walked as elements of their own. */\nexport const dataProps = (node: LayoutNode) =>\n Object.fromEntries(Object.entries(node.props).filter(([, value]) => !isLayoutNode(value) && !(Array.isArray(value) && value.length > 0 && value.every(isLayoutNode))))\n","import { messages } from '../locale/messages'\n\nexport const text = messages('format')\n","import { cachedFormat } from './intl-cache'\n\n// Times show in the viewer's time zone, the browser's; dates (`YYYY-MM-DD`, no time) have no zone and never shift.\n\n/** The viewer's IANA time zone, such as `Europe/Amsterdam`. */\nexport const viewerZone = () => Intl.DateTimeFormat().resolvedOptions().timeZone\n\nconst partsFormats = new Map<string, Intl.DateTimeFormat>()\n\nconst partsFormat = (zone: string) => {\n const known = partsFormats.get(zone)\n if (known) return known\n const format = new Intl.DateTimeFormat('en-US', { timeZone: zone, hourCycle: 'h23', year: 'numeric', month: '2-digit', day: '2-digit', hour: '2-digit', minute: '2-digit', second: '2-digit' })\n partsFormats.set(zone, format)\n return format\n}\n\n// The wall clock of `zone` at `ms`, as numbers\nconst wallClock = (ms: number, zone: string) => {\n const parts = Object.fromEntries(partsFormat(zone).formatToParts(ms).map((part) => [part.type, part.value]))\n return { year: Number(parts.year), month: Number(parts.month), day: Number(parts.day), hour: Number(parts.hour), minute: Number(parts.minute), second: Number(parts.second) }\n}\n\n/** How far `zone`'s clock is ahead of UTC at `ms`, in milliseconds: 7 200 000 for Amsterdam in summer. */\nexport const zoneOffset = (ms: number, zone: string) => {\n const clock = wallClock(ms, zone)\n const asUtc = Date.UTC(clock.year, clock.month - 1, clock.day, clock.hour, clock.minute, clock.second)\n return asUtc - Math.floor(ms / 1000) * 1000\n}\n\nconst pad = (value: number) => String(value).padStart(2, '0')\n\n/** The day `ms` falls on in `zone`, as `YYYY-MM-DD`. */\nexport const dayIn = (ms: number, zone: string) => {\n const clock = wallClock(ms, zone)\n return `${clock.year}-${pad(clock.month)}-${pad(clock.day)}`\n}\n\n/** The instant `zone`'s clock reads `wall`, a wall-clock time written as if it were UTC milliseconds. */\nexport const instantAt = (wall: number, zone: string) => {\n // The offset at `wall` read as UTC is right unless the zone changes its clock in the hours between; a second pass fixes that\n const guess = wall - zoneOffset(wall, zone)\n return wall - zoneOffset(guess, zone)\n}\n\n/** The instant `day` (`YYYY-MM-DD`) starts in `zone`: its local midnight. */\nexport const startOfDayIn = (day: string, zone: string) => instantAt(Date.parse(`${day}T00:00:00Z`), zone)\n\n/** The zone a time is shown in, as its hover label says: \"Europe/Amsterdam (GMT+2)\", or \"UTC\". */\nexport const zoneLabel = (ms: number, zone: string) => {\n const named = cachedFormat(`zoneName:${zone}`, (tag) => new Intl.DateTimeFormat(tag, { timeZone: zone, timeZoneName: 'shortOffset' }))\n const name = named.formatToParts(ms).find((part) => part.type === 'timeZoneName')?.value ?? zone\n return zone === 'UTC' || zone === 'Etc/UTC' ? 'UTC' : `${zone} (${name})`\n}\n","import { cachedFormat } from './intl-cache'\nimport { text } from './messages'\nimport { viewerZone } from './zone'\n\n// Dates, months and weekdays are zone-free days, kept in UTC; times are the viewer's, in `zone`.\nconst dateFormat = (name: string, options: Intl.DateTimeFormatOptions) => () => cachedFormat(`date:${name}`, (tag) => new Intl.DateTimeFormat(tag, { ...options, timeZone: 'UTC' }))\nconst day = dateFormat('day', { day: 'numeric', month: 'short', year: 'numeric' })\nconst dayShort = dateFormat('dayShort', { day: 'numeric', month: 'short' })\nconst month = dateFormat('month', { month: 'long', year: 'numeric' })\nconst monthName = dateFormat('monthName', { month: 'long' })\nconst weekday = dateFormat('weekday', { weekday: 'short' })\nconst weekdayDate = dateFormat('weekdayDate', { weekday: 'long', day: 'numeric', month: 'short', year: 'numeric' })\n\nexport const formatDate = (ms: number) => day().format(ms)\n\nexport const formatDayShort = (ms: number) => dayShort().format(ms)\n\nconst zonedFormats = (zone: string) =>\n cachedFormat(`zoned:${zone}`, (tag) => ({\n day: new Intl.DateTimeFormat(tag, { day: 'numeric', month: 'short', year: 'numeric', timeZone: zone }),\n time: new Intl.DateTimeFormat(tag, { hour: '2-digit', minute: '2-digit', hour12: false, timeZone: zone }),\n }))\n\n/** \"6 Oct 2026, 16:32\": an instant on the clock of `zone`, the viewer's unless given. */\nexport const formatDateTime = (ms: number, zone = viewerZone()) => {\n const formats = zonedFormats(zone)\n return `${formats.day.format(ms)}, ${formats.time.format(ms)}`\n}\n\n/** \"October 2026\". */\nexport const formatMonth = (ms: number) => month().format(ms)\n\n/** \"October\". */\nexport const formatMonthName = (ms: number) => monthName().format(ms)\n\n/** \"October – December 2026\": the months from `from` to `to`, both included. */\nexport const formatMonthRange = (from: number, to: number) => month().formatRange(from, to)\n\n/** \"Mon\". */\nexport const formatWeekday = (ms: number) => weekday().format(ms)\n\n/** \"Monday, 12 Oct 2026\". */\nexport const formatWeekdayDate = (ms: number) => weekdayDate().format(ms)\n\n/** \"12–18 Oct 2026\", \"28 Dec 2026 – 3 Jan 2027\": the days from `from` to `to`, both included. */\nexport const formatDayRange = (from: number, to: number) => day().formatRange(from, to)\n\n/** \"09:30\": an instant's time on the clock of `zone`, the viewer's unless given. */\nexport const formatTime = (ms: number, zone = viewerZone()) => zonedFormats(zone).time.format(ms)\n\nexport const formatAgo = (seconds: number) => {\n if (seconds < 60) return text('secondsAgo', { count: seconds })\n if (seconds < 3600) return text('minutesAgo', { count: Math.floor(seconds / 60) })\n if (seconds < 86_400) return text('hoursAgo', { count: Math.floor(seconds / 3600) })\n return text('daysAgo', { count: Math.floor(seconds / 86_400) })\n}\n\nconst relative = () => cachedFormat('relative', (tag) => new Intl.RelativeTimeFormat(tag, { numeric: 'auto' }))\n\nconst units: Array<[Intl.RelativeTimeFormatUnit, number]> = [\n ['year', 31_536_000],\n ['month', 2_592_000],\n ['day', 86_400],\n ['hour', 3600],\n ['minute', 60],\n]\n\n/** \"5 minutes ago\", \"yesterday\", \"in 3 hours\"; `seconds` is how long ago it was, negative for a time to come. */\nexport const formatRelativeTime = (seconds: number) => {\n const away = Math.abs(seconds)\n const [unit, size] = units.find(([, size]) => away >= size) ?? ['second', 1]\n if (unit === 'second' && away < 45) return text('justNow')\n return relative().format(-Math.sign(seconds) * Math.floor(away / size), unit)\n}\n","import { messages } from '../locale/messages'\n\nexport const text = messages('live')\n","import type { StoredFile, UploadResult } from '@protobase/client'\nimport type { FieldModel } from '@protobase/schema'\nimport { text } from './messages'\n\n/** A file uploaded in the form and not yet saved: the ticket the save sends, and a local preview while there is one. */\nexport type FileDraft = { uploaded: UploadResult; preview?: string }\n\nexport const isStoredFile = (value: unknown): value is StoredFile =>\n typeof value === 'object' && value !== null && typeof (value as { uri?: unknown }).uri === 'string'\n\nexport const isFileDraft = (value: unknown): value is FileDraft =>\n typeof value === 'object' && value !== null && typeof (value as { uploaded?: { value?: unknown } }).uploaded?.value === 'string'\n\n/** What a file field shows: its name, type and size, whether stored or just uploaded; `undefined` when empty. */\nexport const fileShown = (value: unknown) => {\n if (isFileDraft(value)) return { ...value.uploaded.file, ...(value.preview && { url: value.preview }), corrected: value.uploaded.corrected }\n if (!isStoredFile(value)) return undefined\n if ('missing' in value) return { name: text('fileMissing'), type: '', missing: true as const }\n return value\n}\n\nconst units = ['bytes', 'kB', 'MB', 'GB']\n\n/** `48 kB`, `1.2 MB`: decimal units, like the field's `maxSize`. */\nexport const formatSize = (bytes: number) => {\n let size = bytes\n let unit = 0\n while (size >= 1000 && unit < units.length - 1) {\n size /= 1000\n unit += 1\n }\n return unit === 0 ? `${bytes} ${bytes === 1 ? 'byte' : 'bytes'}` : `${size < 10 ? size.toFixed(1) : Math.round(size)} ${units[unit]}`\n}\n\n/** Raster images the browser shows; SVG is never shown, since it can carry scripts. */\nexport const isPreviewable = (type: string) => type.startsWith('image/') && type !== 'image/svg+xml'\n\n/** Where a picture is drawn, in CSS pixels. */\nexport type ImageBox = { width: number; height: number }\n\n// An image for a box needs this many pixels per CSS pixel to stay sharp on a high-density screen.\nconst density = 2\n// A side a variant leaves unbounded counts as larger than any image.\nconst unbounded = 100_000\n\ntype Variant = { url: string; width?: number; height?: number }\n\nconst covers = (variant: Variant, box: ImageBox) =>\n (variant.width !== undefined || variant.height !== undefined) &&\n (variant.width ?? unbounded) >= box.width * density &&\n (variant.height ?? unbounded) >= box.height * density\n\nconst area = (variant: Variant) => (variant.width ?? unbounded) * (variant.height ?? unbounded)\n\n/**\n * The picture of a file for `box`: the link of its smallest variant large enough for it, else the file's own, with its\n * placeholder; `undefined` for a file that is no raster image with a link.\n */\nexport const shownImage = (value: unknown, box: ImageBox) => {\n const file = fileShown(value)\n if (!file || 'missing' in file || !file.url || !isPreviewable(file.type)) return undefined\n const variants: Variant[] = 'variants' in file && file.variants ? Object.values(file.variants) : []\n const best = variants.filter((variant) => covers(variant, box)).sort((a, b) => area(a) - area(b))[0]\n return { url: best?.url ?? file.url, ...('placeholder' in file && file.placeholder !== undefined && { placeholder: file.placeholder }) }\n}\n\n/** The file input's `accept`: the field's allowed types, or nothing when it takes any. */\nexport const acceptOf = (field: FieldModel) => {\n const accept = field.file?.accept ?? []\n return accept.length === 0 || accept.includes('*/*') ? undefined : accept.join(',')\n}\n\n/** What a save sends for a file field: the ticket of a new upload, `null` to clear it, the stored URI to keep it. */\nexport const filePatchValue = (draft: unknown) => {\n if (isFileDraft(draft)) return draft.uploaded.value\n if (isStoredFile(draft)) return draft.uri\n return null\n}\n\n/** Whether a file field's draft changes what is stored. */\nexport const fileDiffers = (draft: unknown, stored: unknown) => {\n if (isFileDraft(draft)) return true\n const uri = (value: unknown) => (isStoredFile(value) ? value.uri : null)\n return uri(draft) !== uri(stored)\n}\n","import type { ResourceModel } from '@protobase/schema'\n\nexport { labelFieldOf, recordTitle, recordTitleField } from '@protobase/schema/internal'\n\n// A key part of a record; a list row holds a relation as `{ id, name }`, so a relation key part is its `id`.\nconst keyPart = (model: ResourceModel, record: Record<string, unknown>, name: string) => {\n const value = record[name]\n const labelled = model.fields[name]?.type === 'relation' && typeof value === 'object' && value !== null && 'id' in value\n return (labelled ? value.id : value) as string | number\n}\n\nexport const recordId = (model: ResourceModel, record: Record<string, unknown>) =>\n model.primaryKey.map((name) => String(keyPart(model, record, name))).join(',')\n\n/** The key as the URL carries it, for `get` and `update`, from a stored record or a list row. */\nexport const recordKey = (model: ResourceModel, record: Record<string, unknown>) => {\n const parts = model.primaryKey.map((name) => keyPart(model, record, name))\n return parts.length === 1 ? parts[0]! : parts\n}\n","import { enumLabel, type FieldModel, type FieldViewModel } from '@protobase/schema'\nimport { formatDate, formatDateTime, formatRelativeTime } from '../format/date'\nimport { viewerZone, zoneLabel } from '../format/zone'\nimport { fileShown } from './file-values'\nimport { formatTag } from '../locale/active-locale'\nimport { text as message } from './messages'\n\n// A number with the view's prefix before it and suffix after it, such as `€1,200` or `120 m²`.\nconst affixed = (text: string, hints: FieldViewModel) => `${hints.prefix ?? ''}${text}${hints.suffix ?? ''}`\n\n/**\n * A read-only rendering of a stored value, following the view's prefix, suffix, decimals, format and value label hints; a\n * timestamp on the clock of `zone`, the viewer's unless given.\n */\nexport const displayValue = (field: FieldModel, value: unknown, hints: FieldViewModel = {}, zone = viewerZone(), now = Date.now()) => {\n if (value === null || value === undefined || value === '') return '—'\n switch (field.type) {\n case 'boolean':\n return value ? message('yes') : message('no')\n case 'file':\n return fileShown(value)?.name ?? '—'\n case 'enum':\n return enumLabel(String(value), hints.valueLabels)\n case 'timestamp': {\n const ms = Date.parse(String(value))\n return hints.format === 'relative' ? formatRelativeTime(Math.round((now - ms) / 1000)) : formatDateTime(ms, zone)\n }\n case 'date':\n return formatDate(Date.parse(String(value)))\n case 'decimal': {\n const text = hints.decimals === undefined ? String(value) : Number(value).toFixed(hints.decimals)\n if (hints.format === 'percent') return `${Number(value)}%`\n return affixed(Number(text).toLocaleString(formatTag(), { minimumFractionDigits: hints.decimals ?? 0, maximumFractionDigits: hints.decimals ?? 20 }), hints)\n }\n case 'integer':\n case 'bigint':\n return affixed(String(value), hints)\n default:\n return typeof value === 'object' ? JSON.stringify(value) : String(value)\n }\n}\n\n/** The hover label of a shown value: the time zone a timestamp is shown in, or its exact time when shown relative; nothing for other values. */\nexport const valueTitle = (field: FieldModel, value: unknown, zone = viewerZone(), hints: FieldViewModel = {}) => {\n if (field.type !== 'timestamp' || typeof value !== 'string') return undefined\n const ms = Date.parse(value)\n if (Number.isNaN(ms)) return undefined\n if (hints.format === 'relative') return formatDateTime(ms, zone)\n return message('shownIn', { zone: zoneLabel(ms, zone) })\n}\n"],"ignoreList":[3],"mappings":"mrBAGA,IAAMe,EAAO,yBACPC,EAAW,GAAGD,EAAK,QAAQA,EAAK,IAChCE,EAAa,yBAAyBD,EAAS,kDAAkDA,EAAS,SAASA,EAAS,GAAGA,EAAS,GAExIE,EAAgB,OAAO,OAAOD,EAAW,GAAG,EAG5CE,EAAc,2BAYPC,EAAqB,GAA2C,CAC3E,GAAI,CAACF,EAAU,KAAKG,CAAI,EAAG,OAC3B,GAAIA,EAAK,WAAW,GAAG,EAAG,CACxB,GAAM,CAACC,EAAU,GAAGC,GAASF,EAAK,MAAM,CAAC,CAAC,CAAC,MAAM,GAAG,EACpD,MAAO,CAAE,KAAM,OAAkB,WAA4D,OAAM,CACrG,CACA,IAAIG,EAAOH,EACPI,EAAK,EACT,KAAOD,EAAK,WAAW,KAAK,GAC1B,EAAOA,EAAK,MAAM,CAAC,EACnB,GAAM,EAKR,OAHIA,IAAS,OAAe,CAAE,KAAM,UAAW,KAAI,SAAU,GAAM,MAAO,CAAC,CAAE,EACzEA,EAAK,WAAW,OAAO,EAAU,CAAE,KAAM,UAAW,KAAI,SAAU,GAAM,MAAOA,EA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,CAAC,EAAGA,CAAK,CAC7J,CACA,IAAK,UACL,IAAK,SACH,OAAOD,GAAQ,OAAOrJ,CAAK,EAAGsJ,CAAK,EACrC,QACE,OAAO,OAAOtJ,GAAU,SAAW,KAAK,UAAUA,CAAK,EAAI,OAAOA,CAAK,CAC3E,CACF,EAGayJ,IAAc,EAAmB,EAAgB,EAAO/E,EAAW,EAAG,EAAwB,CAAC,IAAM,CAChH,GAAIiE,EAAM,OAAS,aAAe,OAAO3I,GAAU,SAAU,OAC7D,IAAMiF,EAAK,KAAK,MAAMjF,CAAK,EAC3B,GAAI,QAAO,MAAMiF,CAAE,EAEnB,OADIqE,EAAM,SAAW,WAAmBhD,EAAerB,EAAIH,CAAI,EACxDrG,EAAQ,UAAW,CAAE,KAAMiH,EAAUT,EAAIH,CAAI,CAAE,CAAC,CACzD","debugId":"1f0e229b-7c93-438f-a500-bb252c4d8719"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-C4cMQVG2.js","names":["createRoot","StrictMode","projectUi","n","a","t","__toESM","__exportAll","require_react","require_client","require_jsx_runtime","guarded","uiFromModule","restorePage","protobaseVersion","loadStartCache","nativeBridgeOf","App","browserLocale","relList","link","processPreload","mutation","mutations","node","getFetchOpts","fetchOpts","import_react","import_client","_virtual_protobase_project_ui_exports","_virtual_protobase_project_ui_default","listenForPresses","doc","noop","apiOriginMeta","databaseName","storeName","indexedDbStartCacheStore","opened","open","request","factory","reject","resolve","run","db","transaction","mode","act","store","key","value","keys","openStartCache","error","showKeyboardAccessoryBar","bridge","applyNativeTextSize","platform","nativeViewport","content","part","applyNativeViewport","meta","apiOriginOf","contents","url","pageApiOrigin","import_jsx_runtime","root","nativeBridge","storage"],"sources":["../../../src/lib/press-feedback.ts","../../../../schema/src/api-origin-meta.ts","../../../src/data/start-cache/start-cache-store.ts","../../../src/data/start-cache/open-start-cache.ts","../../../src/app/native-keyboard.ts","../../../src/app/native-text-size.ts","../../../src/app/native-viewport.ts","../../../src/app/page-api-origin.ts","../../../src/app/main.tsx"],"sourcesContent":["/**\n * Lets the pressed look in `press.css` show on iOS, whose WebKit applies `:active` on touch only while a touch listener\n * is on the page. The listener does nothing and is passive, so scrolling never waits for it.\n */\nexport const listenForPresses = (doc: Document) => doc.addEventListener('touchstart', noop, { passive: true })\n\nconst noop = () => {}\n","/**\n * The `<meta name>` whose `content` names the origin of the API the shell calls, such as `https://shop.example.com`, for\n * a page served from elsewhere: `protobase mobile` writes it into the app's `index.html`. Without it, the shell calls\n * the API on its own origin.\n */\nexport const apiOriginMeta = 'protobase-api-origin'\n","/** Where the start cache keeps its records: a few values by key, structured-cloned as IndexedDB stores them. */\nexport type StartCacheStore = {\n read: (key: string) => Promise<unknown>\n write: (key: string, value: unknown) => Promise<void>\n remove: (keys: readonly string[]) => Promise<void>\n}\n\nconst databaseName = 'protobase-start-cache'\nconst storeName = 'records'\n\n/**\n * The start cache in this origin's IndexedDB: in the iOS and Android app the web view's storage inside the app's\n * sandbox, which a fresh install's purge removes. One connection serves the page. Each call is a transaction of its own,\n * and IndexedDB runs them in the order they were made, so a removal after a write always wins.\n */\nexport const indexedDbStartCacheStore = (factory: IDBFactory = indexedDB): StartCacheStore => {\n let opened: Promise<IDBDatabase> | undefined\n const open = () =>\n (opened ??= new Promise<IDBDatabase>((resolve, reject) => {\n const request = factory.open(databaseName, 1)\n request.onupgradeneeded = () => request.result.createObjectStore(storeName)\n request.onerror = () => reject(request.error)\n request.onsuccess = () => resolve(request.result)\n }))\n const run = async <T>(mode: IDBTransactionMode, act: (store: IDBObjectStore) => IDBRequest<T> | undefined) => {\n const db = await open()\n return new Promise<T | undefined>((resolve, reject) => {\n const transaction = db.transaction(storeName, mode)\n const request = act(transaction.objectStore(storeName))\n // A failed request aborts its transaction, which then holds the error; the error event comes before it has it\n transaction.oncomplete = () => resolve(request?.result)\n transaction.onabort = () => reject(transaction.error ?? new DOMException('The start cache transaction was aborted', 'AbortError'))\n })\n }\n return {\n read: (key) => run('readonly', (store) => store.get(key)),\n write: async (key, value) => void (await run('readwrite', (store) => store.put(value, key))),\n remove: async (keys) =>\n void (await run('readwrite', (store) => {\n for (const key of keys) store.delete(key)\n return undefined\n })),\n }\n}\n","import { protobaseVersion } from '../../plugins/plugin-api'\nimport { loadStartCache } from './start-cache'\nimport { indexedDbStartCacheStore } from './start-cache-store'\n\n/**\n * The page's start cache in IndexedDB, for this shell's Protobase version. A browser that keeps no IndexedDB, or refuses\n * to open it, such as some private windows, starts without one.\n */\nexport const openStartCache = async () => {\n if (typeof indexedDB === 'undefined') return\n try {\n return await loadStartCache(indexedDbStartCacheStore(), protobaseVersion)\n } catch (error) {\n if (error instanceof DOMException) return\n throw error\n }\n}\n","import type { NativeBridge } from './native-auth-fetch'\n\n/**\n * Gives the iOS app's keyboard back the bar above it, with the arrows to the previous and next field and Done, which\n * Capacitor's keyboard plugin hides when it loads and has no setting for. A binary built before it had the plugin,\n * and Android, which has no such bar, are left as they are.\n */\nexport const showKeyboardAccessoryBar = async (bridge: NativeBridge) => {\n if (bridge.getPlatform() !== 'ios' || !bridge.isPluginAvailable('Keyboard')) return\n await bridge.nativePromise('Keyboard', 'setAccessoryBarVisible', { isVisible: true })\n}\n","/**\n * Marks the iOS app's document, whose root text size then follows the phone's text size (Dynamic Type) through\n * `styles.css`. Android's WebView follows it by its text zoom, which the shell sets, and a browser by its own setting.\n */\nexport const applyNativeTextSize = (root: Pick<HTMLElement, 'dataset'>, platform: string) => {\n if (platform !== 'ios') return\n root.dataset.pbTextSize = 'system'\n}\n","/**\n * The viewport of the iOS and Android app: as the page's, at a scale of one. Safari on iOS zooms into an input whose\n * text is smaller than 16px when it is focused, and in the app the page then stays zoomed with its right side cut off;\n * an app does not zoom, so its viewport stays at that scale, under a pinch too. The page in a browser keeps its zoom.\n */\nexport const nativeViewport = (content: string) => {\n const kept = content.split(',').map((part) => part.trim()).filter((part) => part && !/^maximum-scale\\s*=/.test(part))\n return [...kept, 'maximum-scale=1'].join(', ')\n}\n\n/** Gives the document's viewport the app's scale; a document without a viewport tag needs none. */\nexport const applyNativeViewport = (doc: Document) => {\n const meta = doc.querySelector('meta[name=\"viewport\"]')\n if (!meta) return\n meta.setAttribute('content', nativeViewport(meta.getAttribute('content') ?? ''))\n}\n","import { apiOriginMeta } from '@protobase/schema/internal'\n\n/**\n * The API origin the page's `<meta name=\"protobase-api-origin\">` tags name: `undefined` without one. Anything but one\n * tag holding exactly an http or https origin, such as `https://shop.example.com`, is an error.\n */\nexport const apiOriginOf = (contents: string[]) => {\n if (contents.length === 0) return undefined\n if (contents.length > 1) throw new Error(`The page has ${contents.length} ${apiOriginMeta} meta tags; it may have one`)\n const value = contents[0]!\n const url = URL.canParse(value) ? new URL(value) : undefined\n if (!url || (url.protocol !== 'http:' && url.protocol !== 'https:') || url.origin !== value) {\n throw new Error(`The page's ${apiOriginMeta} meta tag holds \"${value}\", which is not an http or https origin such as https://shop.example.com`)\n }\n return value\n}\n\n/** The API origin this page names in its `<meta name=\"protobase-api-origin\">` (see `apiOriginOf`). */\nexport const pageApiOrigin = () =>\n apiOriginOf([...document.querySelectorAll<HTMLMetaElement>(`meta[name=\"${apiOriginMeta}\"]`)].map((meta) => meta.content))\n","import { StrictMode } from 'react'\nimport { createRoot } from 'react-dom/client'\nimport * as projectUi from 'virtual:protobase-project-ui'\nimport '../styles.css'\nimport { guarded } from '../lib/guarded'\nimport { listenForPresses } from '../lib/press-feedback'\nimport { browserLocale } from '../locale/active-locale'\nimport { openStartCache } from '../data/start-cache/open-start-cache'\nimport { App } from './app'\nimport { restorePage } from './live-update/kept-page'\nimport { nativeBridgeOf, type NativeBridge } from './native-auth-fetch'\nimport { showKeyboardAccessoryBar } from './native-keyboard'\nimport { applyNativeTextSize } from './native-text-size'\nimport { applyNativeViewport } from './native-viewport'\nimport { pageApiOrigin } from './page-api-origin'\nimport { uiFromModule } from './pages/ui-from-module'\n\nconst root = document.getElementById('root')\nif (!root) throw new Error('index.html needs an element with id \"root\"')\n\nlistenForPresses(document)\n\nconst nativeBridge = nativeBridgeOf(window as { Capacitor?: NativeBridge })\nif (nativeBridge) {\n applyNativeViewport(document)\n applyNativeTextSize(document.documentElement, nativeBridge.getPlatform())\n void showKeyboardAccessoryBar(nativeBridge)\n // Back on the page the app showed before a live update reloaded it\n const storage = guarded(() => window.sessionStorage, undefined)\n if (storage) restorePage(storage, window.history)\n}\n\n// The first render already has what the app showed last time, read from the start cache\nvoid openStartCache().then((startCache) =>\n createRoot(root).render(\n <StrictMode>\n <App baseUrl={`${pageApiOrigin() ?? ''}/api/v1`} ui={uiFromModule(projectUi)} locale={browserLocale()} nativeBridge={nativeBridge} startCache={startCache} />\n </StrictMode>,\n ),\n)\n"],"mappings":"s7CAIa+B,EAAoB,GAAkBC,EAAI,iBAAiB,aAAcC,EAAM,CAAE,QAAS,EAAK,CAAC,EAEvGA,MAAa,CAAC,ECDPC,EAAgB,uBCEvBC,EAAe,wBACfC,EAAY,UAOLC,GAA4B,EAAsB,YAA+B,CAC5F,IAAIC,EACEC,MACH,IAAW,IAAI,SAAsB,EAAS,IAAW,CACxD,IAAMC,EAAUC,EAAQ,KAAKN,EAAc,CAAC,EAC5C,EAAQ,oBAAwBK,EAAQ,OAAO,kBAAkBJ,CAAS,EAC1E,EAAQ,YAAgBM,EAAOF,EAAQ,KAAK,EAC5C,EAAQ,cAAkBG,EAAQH,EAAQ,MAAM,CAClD,CAAC,EACGI,EAAM,MAAU,EAA0B,IAA8D,CAC5G,IAAMC,EAAK,MAAMN,EAAK,EACtB,OAAO,IAAI,SAAwB,EAAS,IAAW,CACrD,IAAMO,EAAcD,EAAG,YAAYT,EAAWW,CAAI,EAC5CP,EAAUQ,EAAIF,EAAY,YAAYV,CAAS,CAAC,EAEtD,EAAY,eAAmBO,EAAQH,GAAS,MAAM,EACtD,EAAY,YAAgBE,EAAOI,EAAY,OAAS,IAAI,aAAa,0CAA2C,YAAY,CAAC,CACnI,CAAC,CACH,EACA,MAAO,CACL,KAAO,GAAQF,EAAI,WA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