@protobase/ui 0.39.0 → 0.39.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/dist/app/create/create-values.js +2 -2
- package/dist/app/messages.js +2 -0
- package/dist/app/record-page.js +3 -3
- package/dist/app/sensitive-field.js +5 -2
- package/dist/live/columns-from-model.js +2 -2
- package/dist/live/model-helpers.js +2 -1
- package/dist/package.js +1 -1
- package/dist/shell/assets/app-BpnXvowC.js +9 -0
- package/dist/shell/assets/index-CT-GRDNo.js +2 -0
- package/dist/shell/assets/maplibre-BlwO7zTh.js +815 -0
- package/dist/shell/assets/{markdown-content-CtGUP4W6.js → markdown-content-DOuciTNH.js} +3 -3
- package/dist/shell/assets/preload-helper-C24C2MCK.js +2 -0
- package/dist/shell/assets/react-CR5VJ85Q.js +10 -0
- package/dist/shell/assets/record-map-QajKJid1.js +2 -0
- package/dist/shell/assets/records-map-B-gRc65u.js +2 -0
- package/dist/shell/assets/shared-protobase-ui-DqkWGoXi.js +2 -0
- package/dist/shell/assets/shared-react-CuZpzdyh.js +1 -0
- package/dist/shell/assets/shared-react-dom-BNlY7-7i.js +1 -0
- package/dist/shell/assets/shared-react-jsx-runtime-Csr2Kx2w.js +1 -0
- package/dist/shell/assets/vendor-C4-Hop1T.js +63 -0
- package/dist/shell/index.html +6 -7
- package/dist/shell/protobase.shell.json +1 -1
- package/dist/shell/protobase.sw.js +2 -2
- package/dist/shell-source-maps/assets/app-BpnXvowC.js.map +1 -0
- package/dist/shell-source-maps/assets/index-CT-GRDNo.js.map +1 -0
- package/dist/shell-source-maps/assets/{maplibre-DUTS_eJM.js.map → maplibre-BlwO7zTh.js.map} +1 -1
- package/dist/shell-source-maps/assets/{markdown-content-CtGUP4W6.js.map → markdown-content-DOuciTNH.js.map} +1 -1
- package/dist/shell-source-maps/assets/{preload-helper-BZ3hrQDD.js.map → preload-helper-C24C2MCK.js.map} +1 -1
- package/dist/shell-source-maps/assets/react-CR5VJ85Q.js.map +1 -0
- package/dist/shell-source-maps/assets/{record-map-DFy7sJEU.js.map → record-map-QajKJid1.js.map} +1 -1
- package/dist/shell-source-maps/assets/{records-map-DE5BswCb.js.map → records-map-B-gRc65u.js.map} +1 -1
- package/dist/shell-source-maps/assets/{shared-protobase-ui-D3HUwrUp.js.map → shared-protobase-ui-DqkWGoXi.js.map} +1 -1
- package/dist/shell-source-maps/assets/vendor-C4-Hop1T.js.map +1 -0
- package/package.json +4 -4
- package/dist/shell/assets/app-BCgljtR4.js +0 -70
- package/dist/shell/assets/index-Dfo0EmgH.js +0 -10
- package/dist/shell/assets/jsx-runtime-NZYk81nU.js +0 -2
- package/dist/shell/assets/maplibre-DUTS_eJM.js +0 -815
- package/dist/shell/assets/preload-helper-BZ3hrQDD.js +0 -2
- package/dist/shell/assets/react-Cvdyeg_0.js +0 -2
- package/dist/shell/assets/react-dom-B-VxWsjA.js +0 -2
- package/dist/shell/assets/record-map-DFy7sJEU.js +0 -2
- package/dist/shell/assets/records-map-DE5BswCb.js +0 -2
- package/dist/shell/assets/shared-protobase-ui-D3HUwrUp.js +0 -2
- package/dist/shell/assets/shared-react-DhkZ2M4l.js +0 -1
- package/dist/shell/assets/shared-react-dom-D508a1cq.js +0 -1
- package/dist/shell/assets/shared-react-jsx-runtime-xPQrWk0g.js +0 -1
- package/dist/shell-source-maps/assets/app-BCgljtR4.js.map +0 -1
- package/dist/shell-source-maps/assets/index-Dfo0EmgH.js.map +0 -1
- package/dist/shell-source-maps/assets/jsx-runtime-NZYk81nU.js.map +0 -1
- package/dist/shell-source-maps/assets/react-Cvdyeg_0.js.map +0 -1
- package/dist/shell-source-maps/assets/react-dom-B-VxWsjA.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"preload-helper-BZ3hrQDD.js","names":["createContext","useContext","forwardRef","createElement","forwardRef","createElement","__toESM","cn","require_jsx_runtime","locales","isLocale","value","pickLocale","preferred","tag","import_react","require_react","fallback","app","activeLocale","setFallbackLocale","locale","setAppLocale","browserLocale","languages","formatTags","formatTag","toKebabCase","string","toLucideIconData","iconNode","iconName","aliases","toCamelCase","out","upperNext","ch","toPascalCase","camelCase","mergeClasses","classes","className","array","index","defaultAttributes","isDefined","buildLucideIconNode","attributeNames","params","getAttributeName","attributeName","viewBoxWidth","icon","\"width\"","viewBoxHeight","\"height\"","aliasClassNames","alias","iconClassNames","classNamesFromClassName","calculatedStrokeWidth","attrName","attrs","name","children","child","nextAttrs","buildLucideIconForReact","hasA11yProp","prop","props","LucideContext","useLucideContext","Icon","rest","contextSize","contextStrokeWidth","contextAbsoluteStrokeWidth","contextNonScalingStroke","contextColor","contextClass","hasAccessibleProp","svgAttributes","builtIconNode","color","width","size","height","strokeWidth","absoluteStrokeWidth","nonScalingStroke","createLucideIcon","iconData","iconDataOrName","Component","defineMessages","values","message","catalogue","id","import_jsx_runtime","sizes","segmentedClass","active","Segmented","label","options","option","iconOnly","onChange","guarded","action","error","scriptRel","assetsURL","dep","seen","isCssPreloadUrl","url","__vitePreload","promise","deps","preloadedHrefs","cspNonceMeta","cspNonce","allSettled","promises","p","importMetaResolve","specifier","depString","importerUrl","isCss","links","i","link","res","rej","handlePreloadError","e","err","item","baseModule"],"sources":["../../../../schema/src/locale.ts","../../../src/locale/active-locale.ts","../../../../../node_modules/.bun/lucide-react@1.52.0+0ac650c021fb1b59/node_modules/lucide-react/dist/esm/shared/src/utils/toKebabCase.mjs","../../../../../node_modules/.bun/lucide-react@1.52.0+0ac650c021fb1b59/node_modules/lucide-react/dist/esm/shared/src/utils/toLucideIconData.mjs","../../../../../node_modules/.bun/lucide-react@1.52.0+0ac650c021fb1b59/node_modules/lucide-react/dist/esm/shared/src/utils/toCamelCase.mjs","../../../../../node_modules/.bun/lucide-react@1.52.0+0ac650c021fb1b59/node_modules/lucide-react/dist/esm/shared/src/utils/toPascalCase.mjs","../../../../../node_modules/.bun/lucide-react@1.52.0+0ac650c021fb1b59/node_modules/lucide-react/dist/esm/shared/src/utils/mergeClasses.mjs","../../../../../node_modules/.bun/lucide-react@1.52.0+0ac650c021fb1b59/node_modules/lucide-react/dist/esm/shared/src/build/defaultAttributes.mjs","../../../../../node_modules/.bun/lucide-react@1.52.0+0ac650c021fb1b59/node_modules/lucide-react/dist/esm/shared/src/build/buildLucideIconNode.mjs","../../../../../node_modules/.bun/lucide-react@1.52.0+0ac650c021fb1b59/node_modules/lucide-react/dist/esm/shared/src/build/buildLucideIconForReact.mjs","../../../../../node_modules/.bun/lucide-react@1.52.0+0ac650c021fb1b59/node_modules/lucide-react/dist/esm/shared/src/utils/hasA11yProp.mjs","../../../../../node_modules/.bun/lucide-react@1.52.0+0ac650c021fb1b59/node_modules/lucide-react/dist/esm/context.mjs","../../../../../node_modules/.bun/lucide-react@1.52.0+0ac650c021fb1b59/node_modules/lucide-react/dist/esm/Icon.mjs","../../../../../node_modules/.bun/lucide-react@1.52.0+0ac650c021fb1b59/node_modules/lucide-react/dist/esm/createLucideIcon.mjs","../../../src/locale/messages.ts","../../../src/primitives/segmented.tsx","../../../src/lib/guarded.ts"],"sourcesContent":["/** The languages Protobase's built-in screens come in. */\nexport const locales = ['en', 'nl'] as const\n\nexport type Locale = (typeof locales)[number]\n\nexport const isLocale = (value: unknown): value is Locale => locales.includes(value as Locale)\n\n/**\n * The first of `preferred`, language tags such as the browser's `nl-BE` or `en`, whose language the screens come in;\n * English when none is.\n */\nexport const pickLocale = (preferred: readonly string[]): Locale => {\n const language = preferred.map((tag) => tag.split('-')[0]!.toLowerCase()).find(isLocale)\n return language ?? 'en'\n}\n","import { pickLocale, type Locale } from '@protobase/schema/internal'\n\n// The built-in screens read one locale, so plain functions (formats, messages) need no context: the app's when its\n// `/meta` names one, else the fallback the app starts with, the browser's language unless given. Both only ever get\n// set to what the app decides on each render, so a part of the tree that renders later never sees another one.\nlet fallback: Locale = 'en'\nlet app: Locale | undefined\n\n/** The language the screens are in now. */\nexport const activeLocale = (): Locale => app ?? fallback\n\n/** The language the screens are in when the app sets none: the browser's, or the one the app was given. */\nexport const setFallbackLocale = (locale: Locale) => {\n fallback = locale\n}\n\n/** The language the app sets for everyone, from its `/meta`; undefined when it sets none. */\nexport const setAppLocale = (locale: Locale | undefined) => {\n app = locale\n}\n\n/** The browser's language when the screens come in it, else English. */\nexport const browserLocale = (languages = globalThis.navigator?.languages ?? []) => pickLocale(languages)\n\n// The language tag numbers and dates are written with: English as in Ireland and Britain (`6 Oct 2026`, `1,234.5`).\nconst formatTags: Record<Locale, string> = { en: 'en-GB', nl: 'nl-NL' }\n\n/** The language tag `Intl` formats numbers and dates with, for the active locale. */\nexport const formatTag = () => formatTags[activeLocale()]\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\nconst toKebabCase = (string) => string?.replace(/([a-z0-9])([A-Z])/g, \"$1-$2\").toLowerCase();\n\nexport { toKebabCase };\n//# sourceMappingURL=toKebabCase.mjs.map\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 { toKebabCase } from './toKebabCase.mjs';\n\nfunction toLucideIconData(iconName, iconNode, aliases = []) {\n if (iconNode == null) {\n throw new Error(\"[lucide]: iconNode is required when icon name is used\");\n }\n return {\n name: toKebabCase(iconName),\n size: 24,\n node: iconNode,\n ...aliases.length > 0 ? { aliases } : {}\n };\n}\n\nexport { toLucideIconData };\n//# sourceMappingURL=toLucideIconData.mjs.map\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\nconst toCamelCase = (string) => {\n let out = \"\";\n let upperNext = false;\n for (const ch of string) {\n if (ch === \"-\" || ch === \"_\" || ch <= \" \") {\n upperNext = out.length > 0;\n continue;\n }\n if (out.length === 0) {\n out += ch.toLowerCase();\n } else {\n out += upperNext ? ch.toUpperCase() : ch;\n }\n upperNext = false;\n }\n return out;\n};\n\nexport { toCamelCase };\n//# sourceMappingURL=toCamelCase.mjs.map\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 { toCamelCase } from './toCamelCase.mjs';\n\nconst toPascalCase = (string) => {\n const camelCase = toCamelCase(string);\n return camelCase.charAt(0).toUpperCase() + camelCase.slice(1);\n};\n\nexport { toPascalCase };\n//# sourceMappingURL=toPascalCase.mjs.map\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\nconst mergeClasses = (...classes) => classes.filter((className, index, array) => {\n return Boolean(className) && className.trim() !== \"\" && array.indexOf(className) === index;\n}).join(\" \").trim();\n\nexport { mergeClasses };\n//# sourceMappingURL=mergeClasses.mjs.map\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\nconst defaultAttributes = {\n xmlns: \"http://www.w3.org/2000/svg\",\n width: 24,\n height: 24,\n viewBox: \"0 0 24 24\",\n fill: \"none\",\n stroke: \"currentColor\",\n \"stroke-width\": 2,\n \"stroke-linecap\": \"round\",\n \"stroke-linejoin\": \"round\"\n};\n\nexport { defaultAttributes as default };\n//# sourceMappingURL=defaultAttributes.mjs.map\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 defaultAttributes from './defaultAttributes.mjs';\nimport { mergeClasses } from '../utils/mergeClasses.mjs';\n\nfunction isDefined(value) {\n return value !== null && value !== void 0;\n}\nfunction buildLucideIconNode(icon, params = {}) {\n const attributeNames = params.attributeNames ?? {};\n const getAttributeName = (attributeName) => attributeNames[attributeName] ?? attributeName;\n const viewBoxWidth = icon.size ?? icon.width ?? defaultAttributes[\"width\"];\n const viewBoxHeight = icon.size ?? icon.height ?? defaultAttributes[\"height\"];\n const aliasClassNames = icon.aliases?.filter((alias) => typeof alias === \"string\" && alias.trim() !== \"\").map((alias) => `lucide-${alias}`) ?? [];\n const iconClassNames = [...icon.name ? [`lucide-${icon.name}`] : [], ...aliasClassNames];\n const classNamesFromClassName = params.className?.split(\" \").filter(Boolean) ?? [];\n const className = params.includeDefaultClasses === false ? mergeClasses(...classNamesFromClassName) : mergeClasses(\"lucide\", ...iconClassNames, ...classNamesFromClassName);\n const calculatedStrokeWidth = params.absoluteStrokeWidth ? Number(params.strokeWidth ?? defaultAttributes[\"stroke-width\"]) * Number(icon.size ?? icon.width ?? defaultAttributes[\"width\"]) / Number(params.size ?? params.width ?? defaultAttributes[\"width\"]) : params.strokeWidth ?? defaultAttributes[\"stroke-width\"];\n const attributes = {\n ...Object.entries(defaultAttributes).reduce((attrs, [attrName, value]) => {\n attrs[getAttributeName(attrName)] = value;\n return attrs;\n }, {}),\n ...\"color\" in params && params.color && {\n [getAttributeName(\"stroke\")]: params.color\n },\n ...\"size\" in params && isDefined(params.size) && {\n [getAttributeName(\"width\")]: params.size,\n [getAttributeName(\"height\")]: params.size\n },\n ...\"width\" in params && isDefined(params.width) && {\n [getAttributeName(\"width\")]: params.width\n },\n ...\"height\" in params && isDefined(params.height) && {\n [getAttributeName(\"height\")]: params.height\n },\n [getAttributeName(\"stroke-width\")]: calculatedStrokeWidth,\n ...className && {\n [getAttributeName(\"class\")]: className\n },\n [getAttributeName(\"viewBox\")]: `0 0 ${viewBoxWidth} ${viewBoxHeight}`,\n ...params.hasA11yProp === false ? {\n [getAttributeName(\"aria-hidden\")]: \"true\"\n } : {},\n ...\"attributes\" in params && params.attributes\n };\n return [\n \"svg\",\n attributes,\n icon.node.map((child) => {\n const [name, attrs, children] = child;\n const nextAttrs = params.nonScalingStroke ? { [getAttributeName(\"vector-effect\")]: \"non-scaling-stroke\", ...attrs } : attrs;\n return children ? [name, nextAttrs, children] : [name, nextAttrs];\n })\n ];\n}\n\nexport { buildLucideIconNode as default };\n//# sourceMappingURL=buildLucideIconNode.mjs.map\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 buildLucideIconNode from './buildLucideIconNode.mjs';\n\nfunction buildLucideIconForReact(icon, params = {}) {\n return buildLucideIconNode(icon, {\n ...params,\n attributeNames: {\n ...params.attributeNames,\n class: \"className\",\n \"stroke-width\": \"strokeWidth\",\n \"stroke-linecap\": \"strokeLinecap\",\n \"stroke-linejoin\": \"strokeLinejoin\",\n \"vector-effect\": \"vectorEffect\"\n }\n });\n}\n\nexport { buildLucideIconForReact as default };\n//# sourceMappingURL=buildLucideIconForReact.mjs.map\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\nconst hasA11yProp = (props) => {\n for (const prop in props) {\n if (prop.startsWith(\"aria-\") || prop === \"role\" || prop === \"title\") {\n return true;\n }\n }\n return false;\n};\n\nexport { hasA11yProp };\n//# sourceMappingURL=hasA11yProp.mjs.map\n","\"use strict\";\n\"use client\";\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 { createContext, useContext, useMemo, createElement } from 'react';\n\nconst LucideContext = createContext({});\nfunction LucideProvider({\n children,\n size,\n color,\n strokeWidth,\n absoluteStrokeWidth,\n nonScalingStroke,\n className\n}) {\n const value = useMemo(\n () => ({\n size,\n color,\n strokeWidth,\n absoluteStrokeWidth,\n nonScalingStroke,\n className\n }),\n [size, color, strokeWidth, absoluteStrokeWidth, nonScalingStroke, className]\n );\n return createElement(LucideContext.Provider, { value }, children);\n}\nconst useLucideContext = () => useContext(LucideContext);\n\nexport { LucideProvider, useLucideContext };\n//# sourceMappingURL=context.mjs.map\n","\"use strict\";\n\"use client\";\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 { forwardRef, createElement } from 'react';\nimport { mergeClasses } from './shared/src/utils/mergeClasses.mjs';\nimport buildLucideIconForReact from './shared/src/build/buildLucideIconForReact.mjs';\nimport { hasA11yProp } from './shared/src/utils/hasA11yProp.mjs';\nimport { useLucideContext } from './context.mjs';\n\nconst Icon = forwardRef(\n ({\n color,\n size,\n width,\n height,\n strokeWidth,\n absoluteStrokeWidth,\n nonScalingStroke,\n className = \"\",\n children,\n iconNode = [],\n icon = {\n node: iconNode,\n aliases: [],\n size: 24\n },\n ...rest\n }, ref) => {\n const {\n size: contextSize = 24,\n strokeWidth: contextStrokeWidth = 2,\n absoluteStrokeWidth: contextAbsoluteStrokeWidth = false,\n nonScalingStroke: contextNonScalingStroke = false,\n color: contextColor = \"currentColor\",\n className: contextClass = \"\"\n } = useLucideContext() ?? {};\n const hasAccessibleProp = Boolean(children) || hasA11yProp(rest);\n const [name, svgAttributes, builtIconNode = []] = buildLucideIconForReact(icon, {\n color: color ?? contextColor,\n width: width ?? size ?? contextSize,\n height: height ?? size ?? contextSize,\n strokeWidth: strokeWidth ?? contextStrokeWidth,\n absoluteStrokeWidth: absoluteStrokeWidth ?? contextAbsoluteStrokeWidth,\n nonScalingStroke: nonScalingStroke ?? contextNonScalingStroke,\n className: mergeClasses(contextClass, className),\n hasA11yProp: hasAccessibleProp,\n attributes: rest\n });\n return createElement(\n name,\n {\n ref,\n ...svgAttributes\n },\n [\n ...builtIconNode.map(([tag, attrs]) => createElement(tag, attrs)),\n ...Array.isArray(children) ? children : [children]\n ]\n );\n }\n);\n\nexport { Icon as default };\n//# sourceMappingURL=Icon.mjs.map\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 { forwardRef, createElement } from 'react';\nimport { toLucideIconData } from './shared/src/utils/toLucideIconData.mjs';\nimport { toPascalCase } from './shared/src/utils/toPascalCase.mjs';\nimport Icon from './Icon.mjs';\n\nfunction createLucideIcon(iconDataOrName, iconNode = [], aliases = []) {\n const iconData = typeof iconDataOrName === \"string\" ? toLucideIconData(iconDataOrName, iconNode, aliases) : iconDataOrName;\n const Component = forwardRef(\n ({ className, ...props }, ref) => createElement(Icon, {\n ref,\n icon: iconData,\n className,\n ...props\n })\n );\n if (iconData.name) {\n Component.displayName = toPascalCase(iconData.name);\n }\n return Component;\n}\n\nexport { createLucideIcon as default };\n//# sourceMappingURL=createLucideIcon.mjs.map\n","import type { Locale } from '@protobase/schema/internal'\nimport { activeLocale } from './active-locale'\n\n/** A built-in text: fixed, or made from the values it names, such as a count. */\ntype Message = string | ((...values: never[]) => string)\n\n/** A translation of `M`: every message of it, taking the same values. */\nexport type Translation<M extends Record<string, Message>> = { [K in keyof M]: M[K] extends string ? string : M[K] }\n\ntype Values<T> = T extends (...values: infer V) => string ? V : []\n\n/**\n * An area's built-in texts in every language the screens come in, keyed by id: the lookup returns the one for the\n * active locale, `text('search')` or `text('rows', 3)`. Dutch must translate every English text, which the types check.\n */\nexport const defineMessages = <M extends Record<string, Message>>(catalogue: { en: M } & Record<Exclude<Locale, 'en'>, Translation<M>>) =>\n <K extends keyof M>(id: K, ...values: Values<M[K]>): string => {\n const message = (catalogue[activeLocale()] as M)[id]\n return typeof message === 'function' ? (message as (...values: unknown[]) => string)(...values) : (message as string)\n }\n","import type { ComponentType } from 'react'\nimport { cn } from '../lib/cn'\n\nexport type SegmentedOption<T extends string> = { value: T; label: string; icon?: ComponentType<{ className?: string }> }\n\n/**\n * `md` matches a medium Button, for a switch that sits among buttons. `iconOnly` draws each option as its icon alone,\n * its label the button's name, for a row without room for the words.\n */\nexport type SegmentedProps<T extends string> = { value: T; options: Array<SegmentedOption<T>>; onChange: (value: T) => void; label?: string; size?: 'sm' | 'md'; iconOnly?: boolean }\n\nconst sizes = { sm: { group: 'h-7', option: 'px-2.5 text-body' }, md: { group: 'h-8', option: 'px-3 text-body' } }\n\n/** A segmented switch's classes, for a row of links that looks like one: the group, and each option, `active` the chosen. */\nexport const segmentedClass = {\n group: (size: 'sm' | 'md' = 'sm') => cn('inline-flex', sizes[size].group, 'rounded-md bg-muted p-0.5'),\n option: (active: boolean, size: 'sm' | 'md' = 'sm') =>\n cn('inline-flex items-center gap-1.5 rounded', sizes[size].option, 'font-medium transition-colors', active ? 'bg-background text-foreground shadow-sm' : 'text-muted-foreground hover:text-foreground'),\n}\n\nexport const Segmented = <T extends string>({ value, options, onChange, label, size = 'sm', iconOnly = false }: SegmentedProps<T>) => (\n <span role=\"group\" aria-label={label} className={segmentedClass.group(size)}>\n {options.map((option) => (\n <button\n key={option.value}\n type=\"button\"\n aria-pressed={option.value === value}\n {...(iconOnly && { 'aria-label': option.label, title: option.label })}\n onClick={() => onChange(option.value)}\n className={segmentedClass.option(option.value === value, size)}\n >\n {option.icon && <option.icon className=\"size-3.5\" />}\n {!iconOnly && option.label}\n </button>\n ))}\n </span>\n)\n","/** Runs a storage access; storage can be unavailable (private windows, blocked site data), which is a DOMException. Anything else is a bug. */\nexport const guarded = <T>(action: () => T, fallback: T) => {\n try {\n return action()\n } catch (error) {\n if (!(error instanceof DOMException)) throw error\n return fallback\n }\n}\n"],"ignoreList":[2,3,4,5,6,7,8,9,10,11,12,13],"mappings":"yKACA,IAAaS,EAAU,CAAC,KAAM,IAAI,EAIrBC,EAAY,GAAoCD,EAAQ,SAASE,CAAe,EAMhFC,EAAc,GACRC,EAAU,IAAK,GAAQC,EAAI,MAAM,GAAG,CAAC,CAAC,EAAE,CAAE,YAAY,CAAC,CAAC,CAAC,KAAKJ,CACxE,GAAY,gBCRjBO,EAAmB,KACnBC,EAGSC,MAA6BD,GAAOD,EAGpCG,EAAqB,GAAmB,CACnD,EAAWC,CACb,EAGaC,EAAgB,GAA+B,CAC1D,EAAMD,CACR,EAGaE,GAAiB,EAAY,WAAW,WAAW,WAAa,CAAC,IAAMX,EAAWY,CAAS,EAGlGC,EAAqC,CAAE,GAAI,QAAS,GAAI,OAAQ,EA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cA,EAA6C,GAAGD,CAAM,EAAKC,CACrG,aCRII,EAAQ,CAAE,GAAI,CAAE,MAAO,MAAO,OAAQ,kBAAmB,EAAG,GAAI,CAAE,MAAO,MAAO,OAAQ,gBAAiB,CAAE,EAGpGC,EAAiB,CAC5B,OAAQ,EAAoB,OAAS/F,EAAG,cAAe8F,EAAMf,EAAK,CAAC,MAAO,2BAA2B,EACrG,QAAS,EAAiB,EAAoB,OAC5C/E,EAAG,2CAA4C8F,EAAMf,EAAK,CAAC,OAAQ,gCAAiCiB,EAAS,0CAA4C,6CAA6C,CAC1M,EAEaC,GAA+B,CAAE,QAAO,UAAS,WAAU,QAAO,OAAO,KAAM,WAAW,OACrG,EAAAJ,EAAA,IAAA,CAAC,OAAD,CAAM,KAAK,QAAQ,aAAYK,EAAO,UAAWH,EAAe,MAAMhB,CAAI,EACvE,SAAAoB,EAAQ,IAAK,IACZ,EAAAN,EAAA,KAAA,CAAC,SAAD,CAEE,KAAK,SACL,eAAcO,EAAO,QAAUhG,EAC/B,GAAKiG,GAAY,CAAE,aAAcD,EAAO,MAAO,MAAOA,EAAO,KAAM,EACnE,YAAeE,EAASF,EAAO,KAAK,EACpC,UAAWL,EAAe,OAAOK,EAAO,QAAUhG,EAAO2E,CAAI,EAN/D,SAAA,CAQGqB,EAAO,OAAQ,EAAAP,EAAA,IAAA,CAACO,EAAO,KAAR,CAAa,UAAU,UAAY,CAAA,EAClD,CAACC,GAAYD,EAAO,KACf,CATD,EAAAA,EAAO,KASN,CACT,CACG,CAAA,EClCKG,GAAc,EAAiB,IAAgB,CAC1D,GAAI,CACF,OAAOC,EAAO,CAChB,OAASC,EAAO,CACd,GAAI,EAAEA,aAAiB,cAAe,MAAMA,EAC5C,OAAO/F,CACT,CACF","debugId":"59de1ad0-0c33-46e0-b4ed-990eafdd02c9"}
|
|
1
|
+
{"version":3,"file":"preload-helper-C24C2MCK.js","names":["createContext","useContext","forwardRef","createElement","forwardRef","createElement","__toESM","require_react","require_jsx_runtime","cn","locales","isLocale","value","pickLocale","preferred","tag","import_react","fallback","app","activeLocale","setFallbackLocale","locale","setAppLocale","browserLocale","languages","formatTags","formatTag","toKebabCase","string","toLucideIconData","iconNode","iconName","aliases","toCamelCase","out","upperNext","ch","toPascalCase","camelCase","mergeClasses","classes","className","array","index","defaultAttributes","isDefined","buildLucideIconNode","attributeNames","params","getAttributeName","attributeName","viewBoxWidth","icon","\"width\"","viewBoxHeight","\"height\"","aliasClassNames","alias","iconClassNames","classNamesFromClassName","calculatedStrokeWidth","attrName","attrs","name","children","child","nextAttrs","buildLucideIconForReact","hasA11yProp","prop","props","LucideContext","useLucideContext","Icon","rest","contextSize","contextStrokeWidth","contextAbsoluteStrokeWidth","contextNonScalingStroke","contextColor","contextClass","hasAccessibleProp","svgAttributes","builtIconNode","color","width","size","height","strokeWidth","absoluteStrokeWidth","nonScalingStroke","createLucideIcon","iconData","iconDataOrName","Component","defineMessages","values","message","catalogue","id","import_jsx_runtime","sizes","segmentedClass","active","Segmented","label","options","option","iconOnly","onChange","guarded","action","error","scriptRel","assetsURL","dep","seen","isCssPreloadUrl","url","__vitePreload","promise","deps","preloadedHrefs","cspNonceMeta","cspNonce","allSettled","promises","p","importMetaResolve","specifier","depString","importerUrl","isCss","links","i","link","res","rej","handlePreloadError","e","err","item","baseModule"],"sources":["../../../../schema/src/locale.ts","../../../src/locale/active-locale.ts","../../../../../node_modules/.bun/lucide-react@1.52.0+0ac650c021fb1b59/node_modules/lucide-react/dist/esm/shared/src/utils/toKebabCase.mjs","../../../../../node_modules/.bun/lucide-react@1.52.0+0ac650c021fb1b59/node_modules/lucide-react/dist/esm/shared/src/utils/toLucideIconData.mjs","../../../../../node_modules/.bun/lucide-react@1.52.0+0ac650c021fb1b59/node_modules/lucide-react/dist/esm/shared/src/utils/toCamelCase.mjs","../../../../../node_modules/.bun/lucide-react@1.52.0+0ac650c021fb1b59/node_modules/lucide-react/dist/esm/shared/src/utils/toPascalCase.mjs","../../../../../node_modules/.bun/lucide-react@1.52.0+0ac650c021fb1b59/node_modules/lucide-react/dist/esm/shared/src/utils/mergeClasses.mjs","../../../../../node_modules/.bun/lucide-react@1.52.0+0ac650c021fb1b59/node_modules/lucide-react/dist/esm/shared/src/build/defaultAttributes.mjs","../../../../../node_modules/.bun/lucide-react@1.52.0+0ac650c021fb1b59/node_modules/lucide-react/dist/esm/shared/src/build/buildLucideIconNode.mjs","../../../../../node_modules/.bun/lucide-react@1.52.0+0ac650c021fb1b59/node_modules/lucide-react/dist/esm/shared/src/build/buildLucideIconForReact.mjs","../../../../../node_modules/.bun/lucide-react@1.52.0+0ac650c021fb1b59/node_modules/lucide-react/dist/esm/shared/src/utils/hasA11yProp.mjs","../../../../../node_modules/.bun/lucide-react@1.52.0+0ac650c021fb1b59/node_modules/lucide-react/dist/esm/context.mjs","../../../../../node_modules/.bun/lucide-react@1.52.0+0ac650c021fb1b59/node_modules/lucide-react/dist/esm/Icon.mjs","../../../../../node_modules/.bun/lucide-react@1.52.0+0ac650c021fb1b59/node_modules/lucide-react/dist/esm/createLucideIcon.mjs","../../../src/locale/messages.ts","../../../src/primitives/segmented.tsx","../../../src/lib/guarded.ts"],"sourcesContent":["/** The languages Protobase's built-in screens come in. */\nexport const locales = ['en', 'nl'] as const\n\nexport type Locale = (typeof locales)[number]\n\nexport const isLocale = (value: unknown): value is Locale => locales.includes(value as Locale)\n\n/**\n * The first of `preferred`, language tags such as the browser's `nl-BE` or `en`, whose language the screens come in;\n * English when none is.\n */\nexport const pickLocale = (preferred: readonly string[]): Locale => {\n const language = preferred.map((tag) => tag.split('-')[0]!.toLowerCase()).find(isLocale)\n return language ?? 'en'\n}\n","import { pickLocale, type Locale } from '@protobase/schema/internal'\n\n// The built-in screens read one locale, so plain functions (formats, messages) need no context: the app's when its\n// `/meta` names one, else the fallback the app starts with, the browser's language unless given. Both only ever get\n// set to what the app decides on each render, so a part of the tree that renders later never sees another one.\nlet fallback: Locale = 'en'\nlet app: Locale | undefined\n\n/** The language the screens are in now. */\nexport const activeLocale = (): Locale => app ?? fallback\n\n/** The language the screens are in when the app sets none: the browser's, or the one the app was given. */\nexport const setFallbackLocale = (locale: Locale) => {\n fallback = locale\n}\n\n/** The language the app sets for everyone, from its `/meta`; undefined when it sets none. */\nexport const setAppLocale = (locale: Locale | undefined) => {\n app = locale\n}\n\n/** The browser's language when the screens come in it, else English. */\nexport const browserLocale = (languages = globalThis.navigator?.languages ?? []) => pickLocale(languages)\n\n// The language tag numbers and dates are written with: English as in Ireland and Britain (`6 Oct 2026`, `1,234.5`).\nconst formatTags: Record<Locale, string> = { en: 'en-GB', nl: 'nl-NL' }\n\n/** The language tag `Intl` formats numbers and dates with, for the active locale. */\nexport const formatTag = () => formatTags[activeLocale()]\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\nconst toKebabCase = (string) => string?.replace(/([a-z0-9])([A-Z])/g, \"$1-$2\").toLowerCase();\n\nexport { toKebabCase };\n//# sourceMappingURL=toKebabCase.mjs.map\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 { toKebabCase } from './toKebabCase.mjs';\n\nfunction toLucideIconData(iconName, iconNode, aliases = []) {\n if (iconNode == null) {\n throw new Error(\"[lucide]: iconNode is required when icon name is used\");\n }\n return {\n name: toKebabCase(iconName),\n size: 24,\n node: iconNode,\n ...aliases.length > 0 ? { aliases } : {}\n };\n}\n\nexport { toLucideIconData };\n//# sourceMappingURL=toLucideIconData.mjs.map\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\nconst toCamelCase = (string) => {\n let out = \"\";\n let upperNext = false;\n for (const ch of string) {\n if (ch === \"-\" || ch === \"_\" || ch <= \" \") {\n upperNext = out.length > 0;\n continue;\n }\n if (out.length === 0) {\n out += ch.toLowerCase();\n } else {\n out += upperNext ? ch.toUpperCase() : ch;\n }\n upperNext = false;\n }\n return out;\n};\n\nexport { toCamelCase };\n//# sourceMappingURL=toCamelCase.mjs.map\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 { toCamelCase } from './toCamelCase.mjs';\n\nconst toPascalCase = (string) => {\n const camelCase = toCamelCase(string);\n return camelCase.charAt(0).toUpperCase() + camelCase.slice(1);\n};\n\nexport { toPascalCase };\n//# sourceMappingURL=toPascalCase.mjs.map\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\nconst mergeClasses = (...classes) => classes.filter((className, index, array) => {\n return Boolean(className) && className.trim() !== \"\" && array.indexOf(className) === index;\n}).join(\" \").trim();\n\nexport { mergeClasses };\n//# sourceMappingURL=mergeClasses.mjs.map\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\nconst defaultAttributes = {\n xmlns: \"http://www.w3.org/2000/svg\",\n width: 24,\n height: 24,\n viewBox: \"0 0 24 24\",\n fill: \"none\",\n stroke: \"currentColor\",\n \"stroke-width\": 2,\n \"stroke-linecap\": \"round\",\n \"stroke-linejoin\": \"round\"\n};\n\nexport { defaultAttributes as default };\n//# sourceMappingURL=defaultAttributes.mjs.map\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 defaultAttributes from './defaultAttributes.mjs';\nimport { mergeClasses } from '../utils/mergeClasses.mjs';\n\nfunction isDefined(value) {\n return value !== null && value !== void 0;\n}\nfunction buildLucideIconNode(icon, params = {}) {\n const attributeNames = params.attributeNames ?? {};\n const getAttributeName = (attributeName) => attributeNames[attributeName] ?? attributeName;\n const viewBoxWidth = icon.size ?? icon.width ?? defaultAttributes[\"width\"];\n const viewBoxHeight = icon.size ?? icon.height ?? defaultAttributes[\"height\"];\n const aliasClassNames = icon.aliases?.filter((alias) => typeof alias === \"string\" && alias.trim() !== \"\").map((alias) => `lucide-${alias}`) ?? [];\n const iconClassNames = [...icon.name ? [`lucide-${icon.name}`] : [], ...aliasClassNames];\n const classNamesFromClassName = params.className?.split(\" \").filter(Boolean) ?? [];\n const className = params.includeDefaultClasses === false ? mergeClasses(...classNamesFromClassName) : mergeClasses(\"lucide\", ...iconClassNames, ...classNamesFromClassName);\n const calculatedStrokeWidth = params.absoluteStrokeWidth ? Number(params.strokeWidth ?? defaultAttributes[\"stroke-width\"]) * Number(icon.size ?? icon.width ?? defaultAttributes[\"width\"]) / Number(params.size ?? params.width ?? defaultAttributes[\"width\"]) : params.strokeWidth ?? defaultAttributes[\"stroke-width\"];\n const attributes = {\n ...Object.entries(defaultAttributes).reduce((attrs, [attrName, value]) => {\n attrs[getAttributeName(attrName)] = value;\n return attrs;\n }, {}),\n ...\"color\" in params && params.color && {\n [getAttributeName(\"stroke\")]: params.color\n },\n ...\"size\" in params && isDefined(params.size) && {\n [getAttributeName(\"width\")]: params.size,\n [getAttributeName(\"height\")]: params.size\n },\n ...\"width\" in params && isDefined(params.width) && {\n [getAttributeName(\"width\")]: params.width\n },\n ...\"height\" in params && isDefined(params.height) && {\n [getAttributeName(\"height\")]: params.height\n },\n [getAttributeName(\"stroke-width\")]: calculatedStrokeWidth,\n ...className && {\n [getAttributeName(\"class\")]: className\n },\n [getAttributeName(\"viewBox\")]: `0 0 ${viewBoxWidth} ${viewBoxHeight}`,\n ...params.hasA11yProp === false ? {\n [getAttributeName(\"aria-hidden\")]: \"true\"\n } : {},\n ...\"attributes\" in params && params.attributes\n };\n return [\n \"svg\",\n attributes,\n icon.node.map((child) => {\n const [name, attrs, children] = child;\n const nextAttrs = params.nonScalingStroke ? { [getAttributeName(\"vector-effect\")]: \"non-scaling-stroke\", ...attrs } : attrs;\n return children ? [name, nextAttrs, children] : [name, nextAttrs];\n })\n ];\n}\n\nexport { buildLucideIconNode as default };\n//# sourceMappingURL=buildLucideIconNode.mjs.map\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 buildLucideIconNode from './buildLucideIconNode.mjs';\n\nfunction buildLucideIconForReact(icon, params = {}) {\n return buildLucideIconNode(icon, {\n ...params,\n attributeNames: {\n ...params.attributeNames,\n class: \"className\",\n \"stroke-width\": \"strokeWidth\",\n \"stroke-linecap\": \"strokeLinecap\",\n \"stroke-linejoin\": \"strokeLinejoin\",\n \"vector-effect\": \"vectorEffect\"\n }\n });\n}\n\nexport { buildLucideIconForReact as default };\n//# sourceMappingURL=buildLucideIconForReact.mjs.map\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\nconst hasA11yProp = (props) => {\n for (const prop in props) {\n if (prop.startsWith(\"aria-\") || prop === \"role\" || prop === \"title\") {\n return true;\n }\n }\n return false;\n};\n\nexport { hasA11yProp };\n//# sourceMappingURL=hasA11yProp.mjs.map\n","\"use strict\";\n\"use client\";\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 { createContext, useContext, useMemo, createElement } from 'react';\n\nconst LucideContext = createContext({});\nfunction LucideProvider({\n children,\n size,\n color,\n strokeWidth,\n absoluteStrokeWidth,\n nonScalingStroke,\n className\n}) {\n const value = useMemo(\n () => ({\n size,\n color,\n strokeWidth,\n absoluteStrokeWidth,\n nonScalingStroke,\n className\n }),\n [size, color, strokeWidth, absoluteStrokeWidth, nonScalingStroke, className]\n );\n return createElement(LucideContext.Provider, { value }, children);\n}\nconst useLucideContext = () => useContext(LucideContext);\n\nexport { LucideProvider, useLucideContext };\n//# sourceMappingURL=context.mjs.map\n","\"use strict\";\n\"use client\";\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 { forwardRef, createElement } from 'react';\nimport { mergeClasses } from './shared/src/utils/mergeClasses.mjs';\nimport buildLucideIconForReact from './shared/src/build/buildLucideIconForReact.mjs';\nimport { hasA11yProp } from './shared/src/utils/hasA11yProp.mjs';\nimport { useLucideContext } from './context.mjs';\n\nconst Icon = forwardRef(\n ({\n color,\n size,\n width,\n height,\n strokeWidth,\n absoluteStrokeWidth,\n nonScalingStroke,\n className = \"\",\n children,\n iconNode = [],\n icon = {\n node: iconNode,\n aliases: [],\n size: 24\n },\n ...rest\n }, ref) => {\n const {\n size: contextSize = 24,\n strokeWidth: contextStrokeWidth = 2,\n absoluteStrokeWidth: contextAbsoluteStrokeWidth = false,\n nonScalingStroke: contextNonScalingStroke = false,\n color: contextColor = \"currentColor\",\n className: contextClass = \"\"\n } = useLucideContext() ?? {};\n const hasAccessibleProp = Boolean(children) || hasA11yProp(rest);\n const [name, svgAttributes, builtIconNode = []] = buildLucideIconForReact(icon, {\n color: color ?? contextColor,\n width: width ?? size ?? contextSize,\n height: height ?? size ?? contextSize,\n strokeWidth: strokeWidth ?? contextStrokeWidth,\n absoluteStrokeWidth: absoluteStrokeWidth ?? contextAbsoluteStrokeWidth,\n nonScalingStroke: nonScalingStroke ?? contextNonScalingStroke,\n className: mergeClasses(contextClass, className),\n hasA11yProp: hasAccessibleProp,\n attributes: rest\n });\n return createElement(\n name,\n {\n ref,\n ...svgAttributes\n },\n [\n ...builtIconNode.map(([tag, attrs]) => createElement(tag, attrs)),\n ...Array.isArray(children) ? children : [children]\n ]\n );\n }\n);\n\nexport { Icon as default };\n//# sourceMappingURL=Icon.mjs.map\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 { forwardRef, createElement } from 'react';\nimport { toLucideIconData } from './shared/src/utils/toLucideIconData.mjs';\nimport { toPascalCase } from './shared/src/utils/toPascalCase.mjs';\nimport Icon from './Icon.mjs';\n\nfunction createLucideIcon(iconDataOrName, iconNode = [], aliases = []) {\n const iconData = typeof iconDataOrName === \"string\" ? toLucideIconData(iconDataOrName, iconNode, aliases) : iconDataOrName;\n const Component = forwardRef(\n ({ className, ...props }, ref) => createElement(Icon, {\n ref,\n icon: iconData,\n className,\n ...props\n })\n );\n if (iconData.name) {\n Component.displayName = toPascalCase(iconData.name);\n }\n return Component;\n}\n\nexport { createLucideIcon as default };\n//# sourceMappingURL=createLucideIcon.mjs.map\n","import type { Locale } from '@protobase/schema/internal'\nimport { activeLocale } from './active-locale'\n\n/** A built-in text: fixed, or made from the values it names, such as a count. */\ntype Message = string | ((...values: never[]) => string)\n\n/** A translation of `M`: every message of it, taking the same values. */\nexport type Translation<M extends Record<string, Message>> = { [K in keyof M]: M[K] extends string ? string : M[K] }\n\ntype Values<T> = T extends (...values: infer V) => string ? V : []\n\n/**\n * An area's built-in texts in every language the screens come in, keyed by id: the lookup returns the one for the\n * active locale, `text('search')` or `text('rows', 3)`. Dutch must translate every English text, which the types check.\n */\nexport const defineMessages = <M extends Record<string, Message>>(catalogue: { en: M } & Record<Exclude<Locale, 'en'>, Translation<M>>) =>\n <K extends keyof M>(id: K, ...values: Values<M[K]>): string => {\n const message = (catalogue[activeLocale()] as M)[id]\n return typeof message === 'function' ? (message as (...values: unknown[]) => string)(...values) : (message as string)\n }\n","import type { ComponentType } from 'react'\nimport { cn } from '../lib/cn'\n\nexport type SegmentedOption<T extends string> = { value: T; label: string; icon?: ComponentType<{ className?: string }> }\n\n/**\n * `md` matches a medium Button, for a switch that sits among buttons. `iconOnly` draws each option as its icon alone,\n * its label the button's name, for a row without room for the words.\n */\nexport type SegmentedProps<T extends string> = { value: T; options: Array<SegmentedOption<T>>; onChange: (value: T) => void; label?: string; size?: 'sm' | 'md'; iconOnly?: boolean }\n\nconst sizes = { sm: { group: 'h-7', option: 'px-2.5 text-body' }, md: { group: 'h-8', option: 'px-3 text-body' } }\n\n/** A segmented switch's classes, for a row of links that looks like one: the group, and each option, `active` the chosen. */\nexport const segmentedClass = {\n group: (size: 'sm' | 'md' = 'sm') => cn('inline-flex', sizes[size].group, 'rounded-md bg-muted p-0.5'),\n option: (active: boolean, size: 'sm' | 'md' = 'sm') =>\n cn('inline-flex items-center gap-1.5 rounded', sizes[size].option, 'font-medium transition-colors', active ? 'bg-background text-foreground shadow-sm' : 'text-muted-foreground hover:text-foreground'),\n}\n\nexport const Segmented = <T extends string>({ value, options, onChange, label, size = 'sm', iconOnly = false }: SegmentedProps<T>) => (\n <span role=\"group\" aria-label={label} className={segmentedClass.group(size)}>\n {options.map((option) => (\n <button\n key={option.value}\n type=\"button\"\n aria-pressed={option.value === value}\n {...(iconOnly && { 'aria-label': option.label, title: option.label })}\n onClick={() => onChange(option.value)}\n className={segmentedClass.option(option.value === value, size)}\n >\n {option.icon && <option.icon className=\"size-3.5\" />}\n {!iconOnly && option.label}\n </button>\n ))}\n </span>\n)\n","/** Runs a storage access; storage can be unavailable (private windows, blocked site data), which is a DOMException. Anything else is a bug. */\nexport const guarded = <T>(action: () => T, fallback: T) => {\n try {\n return action()\n } catch (error) {\n if (!(error instanceof DOMException)) throw error\n return fallback\n }\n}\n"],"ignoreList":[2,3,4,5,6,7,8,9,10,11,12,13],"mappings":"uIACA,IAAaU,EAAU,CAAC,KAAM,IAAI,EAIrBC,EAAY,GAAoCD,EAAQ,SAASE,CAAe,EAMhFC,EAAc,GACRC,EAAU,IAAK,GAAQC,EAAI,MAAM,GAAG,CAAC,CAAC,EAAE,CAAE,YAAY,CAAC,CAAC,CAAC,KAAKJ,CACxE,GAAY,gBCRjBM,EAAmB,KACnBC,EAGSC,MAA6BD,GAAOD,EAGpCG,EAAqB,GAAmB,CACnD,EAAWC,CACb,EAGaC,EAAgB,GAA+B,CAC1D,EAAMD,CACR,EAGaE,GAAiB,EAAY,WAAW,WAAW,WAAa,CAAC,IAAMV,EAAWW,CAA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