@wow-two-beta/fe 0.0.42 → 0.0.44

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/README.md +21 -3
  2. package/dist/auth/BffSession.d.ts +4 -0
  3. package/dist/auth/BffSession.js +8 -3
  4. package/dist/auth/BffSession.js.map +1 -1
  5. package/dist/foundation/net/hooks/UseRunningVersion.d.ts +30 -0
  6. package/dist/foundation/net/hooks/UseRunningVersion.js +19 -0
  7. package/dist/foundation/net/hooks/UseRunningVersion.js.map +1 -0
  8. package/dist/foundation/net/index.d.ts +1 -0
  9. package/dist/foundation/net/index.js +2 -0
  10. package/dist/foundation/net/index.js.map +1 -1
  11. package/dist/foundation/themes/constants/Authored.js +21 -0
  12. package/dist/foundation/themes/constants/Authored.js.map +1 -1
  13. package/dist/index.css +16 -0
  14. package/dist/index.js +812 -806
  15. package/dist/index.js.map +1 -1
  16. package/dist/presentation/actions/refreshButton/RefreshButton.vue.js.map +1 -1
  17. package/dist/presentation/display/dataTable/DataTable.vue.js.map +1 -1
  18. package/dist/presentation/display/index.d.ts +1 -0
  19. package/dist/presentation/display/index.js +6 -4
  20. package/dist/presentation/display/index.js.map +1 -1
  21. package/dist/presentation/display/versionBadge/VersionBadge.vue.d.ts +27 -0
  22. package/dist/presentation/display/versionBadge/VersionBadge.vue.js +80 -0
  23. package/dist/presentation/display/versionBadge/VersionBadge.vue.js.map +1 -0
  24. package/dist/presentation/display/versionBadge/VersionBadge2.vue.js +5 -0
  25. package/dist/presentation/display/versionBadge/VersionBadge2.vue.js.map +1 -0
  26. package/dist/presentation/display/versionBadge/VersionBadgeExtensions.d.ts +9 -0
  27. package/dist/presentation/display/versionBadge/VersionBadgeExtensions.js +21 -0
  28. package/dist/presentation/display/versionBadge/VersionBadgeExtensions.js.map +1 -0
  29. package/dist/presentation/display/versionBadge/index.d.ts +1 -0
  30. package/dist/presentation/forms/imageEditor/ImageEditor.vue.d.ts +1 -1
  31. package/dist/presentation/layout/appFrame/AppFrame.vue.d.ts +168 -0
  32. package/dist/presentation/layout/appFrame/AppFrame.vue.js +408 -0
  33. package/dist/presentation/layout/appFrame/AppFrame.vue.js.map +1 -0
  34. package/dist/presentation/layout/appFrame/AppFrame2.vue.js +8 -0
  35. package/dist/presentation/layout/appFrame/AppFrame2.vue.js.map +1 -0
  36. package/dist/presentation/layout/appFrame/index.d.ts +1 -0
  37. package/dist/presentation/layout/index.d.ts +1 -0
  38. package/dist/presentation/layout/index.js +90 -86
  39. package/dist/presentation/layout/index.js.map +1 -1
  40. package/dist/presentation/nav/accountMenu/AccountMenu.vue.d.ts +2 -2
  41. package/dist/presentation/nav/appSwitcherMenu/AppSwitcherMenu.vue.d.ts +2 -0
  42. package/dist/presentation/nav/appSwitcherMenu/AppSwitcherMenu.vue.js +15 -8
  43. package/dist/presentation/nav/appSwitcherMenu/AppSwitcherMenu.vue.js.map +1 -1
  44. package/dist/presentation/nav/breadcrumb/Breadcrumb.vue.d.ts +8 -1
  45. package/dist/presentation/nav/breadcrumb/Breadcrumb.vue.js +38 -19
  46. package/dist/presentation/nav/breadcrumb/Breadcrumb.vue.js.map +1 -1
  47. package/dist/themes.css +14 -0
  48. package/package.json +1 -1
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"RefreshButton.vue.js","sources":["../../../../src/presentation/actions/refreshButton/RefreshButton.vue"],"sourcesContent":["<script lang=\"ts\">\nimport type { ButtonProps } from '../button';\n\n/** @internal The `ButtonProps` this preset decides itself. */\ntype OwnedButtonProp = keyof Pick<ButtonProps, 'isLoading' | 'shape' | 'leadingSlot'>;\n\n/** Defines the forwarded `ButtonProps`, minus the ones the refresh preset sets. */\ntype RefreshButtonAttributes = Omit<ButtonProps, OwnedButtonProp>;\n\n/** Defines props for the one refresh control a region shows. */\nexport interface RefreshButtonProps extends /* @vue-ignore */ RefreshButtonAttributes {\n /** True from the click until the refresh settles — `useRefresh`'s `refreshing`; the icon spins and clicks wait. */\n readonly isRefreshing?: boolean;\n\n /** The visible label, or the accessible name of an icon-only button. Default `\"Refresh\"`, localized. */\n readonly label?: string;\n\n /** Renders the icon alone, square at its size, named by `label`. */\n readonly isIconOnly?: boolean;\n\n /** The visual surface style. Default `outline`; `ghost` inside a panel header. */\n readonly variant?: ButtonProps['variant'];\n\n /** The size step. Default `sm`; `md` beside page-level controls. */\n readonly size?: ButtonProps['size'];\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs } from 'vue';\nimport { RefreshCw } from 'lucide-vue-next';\nimport { useLocaleDefaults } from '../../../foundation/i18n';\nimport { Icon } from '../../../foundation/icons';\nimport Button from '../button/Button.vue';\n\n/**\n * Renders the refresh control a region reruns its reads with — a `Button` preset that swaps the refresh icon for the\n * spinner while `isRefreshing`, keeps its label and width, and swallows repeat clicks until the refresh settles. Pair\n * it with `useRefresh` from `@wow-two-beta/fe/query`, which also drives the region's placeholders.\n */\ndefineOptions({ name: 'RefreshButton', inheritAttrs: false });\n\nconst componentProps = withDefaults(defineProps<RefreshButtonProps>(), {\n isRefreshing: false,\n label: undefined,\n isIconOnly: false,\n variant: 'outline',\n size: 'sm',\n});\nconst props = useLocaleDefaults(componentProps, 'RefreshButton', { label: 'Refresh' });\n\nconst attrs = useAttrs();\n\n/** The icon-only form names itself through `aria-label`, and `title` shows the name on hover. */\nconst naming = computed(() =>\n props.isIconOnly ? { 'aria-label': props.label, title: props.label } : ({} as Record<string, string>),\n);\n</script>\n\n<template>\n <Button\n tone=\"neutral\"\n :variant=\"props.variant\"\n :size=\"props.size\"\n :shape=\"props.isIconOnly ? 'square' : 'default'\"\n :is-loading=\"props.isRefreshing\"\n v-bind=\"{ ...naming, ...attrs }\"\n >\n <template #leading><Icon :icon=\"RefreshCw\" :size=\"14\" /></template>\n <template v-if=\"!props.isIconOnly\">{{ props.label }}</template>\n </Button>\n</template>\n"],"names":["_openBlock","_createBlock","Button","_mergeProps","_unref","_createVNode","Icon","_createElementBlock","_Fragment","_createTextVNode","_toDisplayString"],"mappings":";;;;;;;;;;;;;;;;AA0CA,UAAM,iBAAiB;AAOvB,UAAM,QAAQ,kBAAkB,gBAAgB,iBAAiB,EAAE,OAAO,WAAW;AAErF,UAAM,QAAQ,SAAA;AAGd,UAAM,SAAS;AAAA,MAAS,MACtB,MAAM,aAAa,EAAE,cAAc,MAAM,OAAO,OAAO,MAAM,UAAW,CAAA;AAAA,IAAC;;AAKzE,aAAAA,UAAA,GAAAC,YAUSC,aAVTC,WAUS;AAAA,QATP,MAAK;AAAA,QACJ,SAASC,MAAA,KAAA,EAAM;AAAA,QACf,MAAMA,MAAA,KAAA,EAAM;AAAA,QACZ,OAAOA,MAAA,KAAA,EAAM,aAAU,WAAA;AAAA,QACvB,cAAYA,MAAA,KAAA,EAAM;AAAA,MAAA,GACN,EAAA,GAAA,OAAA,UAAWA,MAAA,KAAA,EAAA,CAAK,GAAA;AAAA,QAElB,iBAAQ,MAAqC;AAAA,UAArCC,YAAqCD,MAAAE,WAAA,GAAA;AAAA,YAA9B,MAAMF,MAAA,SAAA;AAAA,YAAY,MAAM;AAAA,UAAA;;yBAClD,MAA+D;AAAA,UAA9C,CAAAA,MAAA,KAAA,EAAM,2BAAvBG,mBAA+DC,UAAA,EAAA,KAAA,KAAA;AAAA,YAAzBC,gBAAAC,gBAAAN,MAAA,KAAA,EAAM,KAAK,GAAA,CAAA;AAAA,UAAA;;;;;;;"}
1
+ {"version":3,"file":"RefreshButton.vue.js","sources":["../../../../src/presentation/actions/refreshButton/RefreshButton.vue"],"sourcesContent":["<script lang=\"ts\">\nimport type { ButtonProps } from '../button';\n\n/** @internal The `ButtonProps` this preset decides itself. */\ntype OwnedButtonProp = keyof Pick<ButtonProps, 'isLoading' | 'shape' | 'leadingSlot'>;\n\n/** Defines the forwarded `ButtonProps`, minus the ones the refresh preset sets. */\ntype RefreshButtonAttributes = Omit<ButtonProps, OwnedButtonProp>;\n\n/** Defines props for the one refresh control a region shows. */\nexport interface RefreshButtonProps extends /* @vue-ignore */ RefreshButtonAttributes {\n /** True from the click until the refresh settles — `useRefresh`'s `refreshing`; the icon spins and clicks wait. */\n readonly isRefreshing?: boolean;\n\n /** The visible label, or the accessible name of an icon-only button. Default `\"Refresh\"`, localized. */\n readonly label?: string;\n\n /** Renders the icon alone, square at its size, named by `label`. */\n readonly isIconOnly?: boolean;\n\n /** The visual surface style. Default `outline`; `ghost` inside a panel header. */\n readonly variant?: ButtonProps['variant'];\n\n /** The size step. Default `sm`; `md` beside page-level controls. */\n readonly size?: ButtonProps['size'];\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs } from 'vue';\nimport { RefreshCw } from 'lucide-vue-next';\nimport { useLocaleDefaults } from '../../../foundation/i18n';\nimport { Icon } from '../../../foundation/icons';\nimport Button from '../button/Button.vue';\n\n/**\n * Renders the refresh control a region reruns its reads with — a `Button` preset that swaps the refresh icon for the\n * spinner while `isRefreshing`, keeps its label and width, and swallows repeat clicks until the refresh settles. Pair\n * it with `useRefresh` from `@wow-two-beta/fe/query`, which also drives the region's placeholders.\n */\ndefineOptions({ name: 'RefreshButton', inheritAttrs: false });\n\nconst componentProps = withDefaults(defineProps<RefreshButtonProps>(), {\n isRefreshing: false,\n label: undefined,\n isIconOnly: false,\n variant: 'outline',\n size: 'sm',\n});\nconst props = useLocaleDefaults(componentProps, 'RefreshButton', { label: 'Refresh' });\n\nconst attrs = useAttrs();\n\n/** The icon-only form names itself through `aria-label`, and `title` shows the name on hover. */\nconst naming = computed(() =>\n props.isIconOnly ? { 'aria-label': props.label, title: props.label } : ({} as Record<string, string>),\n);\n</script>\n\n<template>\n <Button\n tone=\"neutral\"\n :variant=\"props.variant\"\n :size=\"props.size\"\n :shape=\"props.isIconOnly ? 'square' : 'default'\"\n :is-loading=\"props.isRefreshing\"\n v-bind=\"{ ...naming, ...attrs }\"\n >\n <template #leading><Icon :icon=\"RefreshCw\" :size=\"14\" /></template>\n <template v-if=\"!props.isIconOnly\">{{ props.label }}</template>\n </Button>\n</template>\n"],"names":["_openBlock","_createBlock","Button","_mergeProps","_unref","_createVNode","Icon","_createElementBlock","_Fragment","_createTextVNode","_toDisplayString"],"mappings":";;;;;;;;;;;;;;;;AA0CA,UAAM,iBAAiB;AAOvB,UAAM,QAAQ,kBAAkB,gBAAgB,iBAAiB,EAAE,OAAO,WAAW;AAErF,UAAM,QAAQ,SAAA;AAGd,UAAM,SAAS;AAAA,MAAS,MACtB,MAAM,aAAa,EAAE,cAAc,MAAM,OAAO,OAAO,MAAM,UAAW,CAAA;AAAA,IAAC;;AAKzE,aAAAA,UAAA,GAAAC,YAUSC,aAVTC,WAUS;AAAA,QATP,MAAK;AAAA,QACJ,SAASC,MAAA,KAAA,EAAM;AAAA,QACf,MAAMA,MAAA,KAAA,EAAM;AAAA,QACZ,OAAOA,MAAA,KAAA,EAAM,aAAU,WAAA;AAAA,QACvB,cAAYA,MAAA,KAAA,EAAM;AAAA,MAAA,GACN,EAAA,GAAA,OAAA,UAAWA,MAAA,KAAA,EAAA,CAAK,GAAA;AAAA,QAElB,iBAAQ,MAAqC;AAAA,UAArCC,YAAqCD,MAAAE,WAAA,GAAA;AAAA,YAA9B,MAAMF,MAAA,SAAA;AAAA,YAAY,MAAM;AAAA,UAAA;;yBATuC,MAGjF;AAAA,UAOS,CAAAA,MAAA,KAAA,EAAM,2BAAvBG,mBAA+DC,UAAA,EAAA,KAAA,KAAA;AAAA,YAAzBC,gBAAAC,gBAAAN,MAAA,KAAA,EAAM,KAAK,GAAA,CAAA;AAAA,UAAA;;;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"DataTable.vue.js","sources":["../../../../src/presentation/display/dataTable/DataTable.vue"],"sourcesContent":["<script lang=\"ts\">\nimport type { SelectionKey, SelectionMode } from '../../../foundation/selection';\nimport type { Breakpoint } from '../../layout/appShell/AppShell.vue';\nimport type { TableDensity, TablePhoneLayout } from '../table';\n\n/** Defines the sort order of a DataTable column. */\nexport const SortDirection = {\n /** Refers to ascending order. */\n Asc: 'asc',\n /** Refers to descending order. */\n Desc: 'desc',\n} as const;\n\nexport type SortDirection = (typeof SortDirection)[keyof typeof SortDirection];\n\n/** Defines the horizontal text alignment of a DataTable column. */\nexport const DataTableColumnAlign = {\n /** Refers to left alignment. */\n Left: 'left',\n /** Refers to centered alignment. */\n Center: 'center',\n /** Refers to right alignment. */\n Right: 'right',\n} as const;\n\nexport type DataTableColumnAlign = (typeof DataTableColumnAlign)[keyof typeof DataTableColumnAlign];\n\nexport interface DataTableSort {\n readonly columnKey: string;\n readonly direction: SortDirection;\n}\n\nexport interface DataTableColumn<T> {\n readonly key: string;\n /**\n * The header label. React took a `ReactNode`; a column is an array entry and\n * cannot become its own slot, so the scalar stays here and the `header`\n * scoped slot is the rich override.\n */\n readonly header: string | number;\n readonly accessor?: (row: T) => unknown;\n /**\n * The per-cell renderer — this column's rich override. Returns text, a number, a VNode (`h(Badge, …)`) or an\n * array of VNodes; any other value renders as its display string. The `cell` scoped slot overrides every\n * column at once.\n */\n readonly cell?: (row: T, index: number) => unknown;\n readonly isSortable?: boolean;\n /** Custom row comparison; takes precedence over accessor-based sorting. */\n readonly compare?: (left: T, right: T) => number;\n readonly align?: DataTableColumnAlign;\n readonly width?: string;\n /** The skeleton bar's width in this column, any CSS length; defaults to a varied share of the cell. */\n readonly skeletonWidth?: string;\n}\n\nexport interface DataTableProps<T> {\n readonly columns: ReadonlyArray<DataTableColumn<T>>;\n readonly data: ReadonlyArray<T>;\n readonly rowKey?: (row: T, index: number) => string | number;\n /**\n * Fires with the clicked row and its index.\n *\n * Kept a prop rather than an emit because its *presence* is load-bearing — it\n * seeds `isHoverable` and the `cursor-pointer` class, and Vue strips declared\n * emit listeners out of `useAttrs()`.\n */\n readonly onRowClick?: (row: T, index: number) => void;\n readonly sortBy?: DataTableSort | null;\n readonly defaultSortBy?: DataTableSort | null;\n readonly isStriped?: boolean;\n readonly isHoverable?: boolean;\n readonly density?: TableDensity;\n readonly isBare?: boolean;\n /** The empty-state text. Default `No results.`; override richly via the `emptyContent` slot. */\n readonly emptyContent?: string | number;\n\n /** How many rows the reader may select. Default `none`; `single` and `multiple` add a checkbox column. */\n readonly selectionMode?: SelectionMode;\n\n /** The selected row keys, controlled. The `v-model:selection` binding target. */\n readonly selection?: ReadonlyArray<SelectionKey>;\n\n /** The initially selected row keys when uncontrolled. Default none. */\n readonly defaultSelection?: ReadonlyArray<SelectionKey>;\n\n /** Whether a row can be selected, given its data index. Default every row. */\n readonly isRowSelectable?: (row: T, index: number) => boolean;\n\n /** The expanded row keys, controlled. The `v-model:expanded` binding target. */\n readonly expanded?: ReadonlyArray<SelectionKey>;\n\n /** The initially expanded row keys when uncontrolled. Default none. */\n readonly defaultExpanded?: ReadonlyArray<SelectionKey>;\n\n /** Whether a row can expand when the `expanded` slot is set, given its data index. Default every row. */\n readonly isRowExpandable?: (row: T, index: number) => boolean;\n\n /** Whether the header row stays pinned while the body scrolls inside `containerClassName`'s height. */\n readonly hasStickyHeader?: boolean;\n\n /** Whether data is loading — marks the table busy and draws skeleton rows while it is empty. */\n readonly isLoading?: boolean;\n\n /** The skeleton rows drawn while an empty table loads or its `DataRegion` first-loads. Default 5. */\n readonly skeletonRows?: number;\n\n /** @deprecated Use `skeletonRows`; this alias is removed next release. */\n readonly loadingRowCount?: number;\n\n /** Classes for the scroll container — a height such as `max-h-96` lets a sticky header pin. */\n readonly containerClassName?: string;\n\n /**\n * The layout below `stackBreakpoint`. Default `stack`: one card per row, each value beside its column's `header`,\n * with the sort and select-all controls in a bar above. `scroll` keeps the table and scrolls it sideways.\n */\n readonly phoneLayout?: TablePhoneLayout;\n\n /** Rows stack into cards below this breakpoint. Default `md`. */\n readonly stackBreakpoint?: Breakpoint;\n}\n\n/** @internal A row-control cell when stacked: inline at the head of its card, with no label. */\nconst StackedControlClass = 'w-10 table-stacked:inline-flex table-stacked:w-auto';\n\n/** @internal The skeleton rows drawn while an empty table loads, when `skeletonRows` is not set. */\nconst DefaultSkeletonRows = 5;\n\n/** @internal Bar widths a loading cell cycles through, so placeholder rows read as varied text, not a grid of bars. */\nconst SkeletonLineWidths = ['min(75%, 12rem)', 'min(50%, 8rem)', 'min(83%, 14rem)', 'min(66%, 10rem)'] as const;\n\n/** @internal Whether two key lists hold the same members. */\nfunction sameKeys(a: ReadonlyArray<SelectionKey>, b: ReadonlyArray<SelectionKey>): boolean {\n if (a.length !== b.length) return false;\n const lookup = new Set(b);\n return a.every((key) => lookup.has(key));\n}\n</script>\n\n<script setup lang=\"ts\" generic=\"T\">\nimport { computed, isVNode, toDisplayString, type FunctionalComponent, type VNodeChild } from 'vue';\nimport { useLocale } from '../../../foundation/i18n';\nimport { ArrowDown, ArrowUp, ArrowUpDown, ChevronRight } from 'lucide-vue-next';\nimport { useId } from '../../../foundation/identifiers';\nimport {\n compareValues,\n createSelection,\n deselect,\n extendSelection,\n isNullish,\n isSelected,\n select,\n selectionStatus,\n toggle,\n toggleAll,\n SelectionMode as SelectionModeToken,\n SelectionStatus,\n type SelectionState,\n} from '../../../foundation/selection';\nimport { cn } from '../../../foundation/styles';\nimport { useControlled } from '../../../foundation/state';\nimport CheckboxInput from '../../forms/checkboxInput/CheckboxInput.vue';\nimport { useSkeletonState } from '../../feedback/skeletonState/SkeletonStateContext';\nimport { SkeletonStateLine } from '../../feedback/skeletonState/SkeletonStateLine';\nimport { skeletonBoxClass } from '../../feedback/skeletonState/SkeletonState.variants';\nimport { Table, TableBody, TableCell, TableHead, TableHeaderCell, TableRow } from '../table';\n\n/**\n * Renders a sortable table from a `columns` descriptor, wrapping the `Table` primitives, with optional row\n * selection, expandable detail rows, a pinned header and a loading state.\n *\n * `class` and `aria-label` reach the inner `<table>` by fallthrough, which is why this component keeps `inheritAttrs`\n * on.\n */\ndefineOptions({ name: 'DataTable' });\n\nconst props = withDefaults(defineProps<DataTableProps<T>>(), {\n rowKey: undefined,\n onRowClick: undefined,\n sortBy: undefined,\n defaultSortBy: undefined,\n // Explicit `undefined` so an absent Boolean prop is not cast to `false` and\n // each one keeps deferring to `Table`'s own default.\n isStriped: undefined,\n isHoverable: undefined,\n density: undefined,\n isBare: undefined,\n selectionMode: SelectionModeToken.None,\n selection: undefined,\n defaultSelection: undefined,\n isRowSelectable: undefined,\n expanded: undefined,\n defaultExpanded: undefined,\n isRowExpandable: undefined,\n hasStickyHeader: false,\n isLoading: false,\n skeletonRows: undefined,\n loadingRowCount: undefined,\n containerClassName: undefined,\n phoneLayout: undefined,\n stackBreakpoint: undefined,\n});\n\nconst emit = defineEmits<{\n /** Fires when the reader clicks a sortable header, with the next sort or `null` once cleared. */\n 'update:sortBy': [sort: DataTableSort | null];\n\n /** Fires when the reader selects or deselects rows, with every selected row key. */\n 'update:selection': [keys: SelectionKey[]];\n\n /** Fires when the reader expands or collapses a row, with every expanded row key. */\n 'update:expanded': [keys: SelectionKey[]];\n}>();\n\nconst slots = defineSlots<{\n /** Overrides a column header. Falls back to the column's own `header`. */\n header(props: { column: DataTableColumn<T> }): unknown;\n /** Overrides a body cell. Falls back to the column's `cell`, then its `accessor`. */\n cell(props: { row: T; column: DataTableColumn<T>; index: number }): unknown;\n /** Overrides the empty-state content. Falls back to the `emptyContent` prop. */\n emptyContent(): unknown;\n /** The detail row under an expanded row; its presence adds the expand toggle column. */\n expanded?(props: { row: T; index: number }): unknown;\n /** Replaces the skeleton rows drawn while an empty table loads. */\n loading?(): unknown;\n}>();\n\nconst locale = useLocale();\nconst tableId = useId();\n\nconst emptyText = computed(() => props.emptyContent ?? locale.t('DataTable.emptyContent', undefined, 'No results.'));\n\nconst { value: sort, setValue: setSort } = useControlled<DataTableSort | null>({\n controlled: () => props.sortBy,\n default: props.defaultSortBy ?? null,\n onChange: (next) => emit('update:sortBy', next),\n});\n\nconst { value: selectedKeys, setValue: setSelectedKeys } = useControlled<ReadonlyArray<SelectionKey>>({\n controlled: () => props.selection,\n default: props.defaultSelection ?? [],\n onChange: (next) => emit('update:selection', [...next]),\n});\n\nconst { value: expandedKeys, setValue: setExpandedKeys } = useControlled<ReadonlyArray<SelectionKey>>({\n controlled: () => props.expanded,\n default: props.defaultExpanded ?? [],\n onChange: (next) => emit('update:expanded', [...next]),\n});\n\n/** @internal The fixed end of a shift-click range — interaction state, never part of the model. */\nlet selectionAnchor: SelectionKey | null = null;\n\n/** @internal Whether the pointer press that toggles a row checkbox held Shift. */\nlet isRangeGesture = false;\n\n/** React seeded `isHoverable` from `!!onRowClick`; kept as an explicit fallback. */\nconst resolvedHoverable = computed(() => props.isHoverable ?? props.onRowClick != null);\n\nconst hasSelection = computed(() => props.selectionMode !== SelectionModeToken.None);\nconst hasExpansion = computed(() => slots.expanded !== undefined);\n\n/** Every body column, including the selection and expansion control columns. */\nconst columnCount = computed(() => props.columns.length + (hasSelection.value ? 1 : 0) + (hasExpansion.value ? 1 : 0));\n\nconst selectedLookup = computed(() => new Set(selectedKeys.value));\nconst expandedLookup = computed(() => new Set(expandedKeys.value));\n\n/** The rows with their stable keys, which come from the data order so sorting never changes them. */\nconst keyedRows = computed(() =>\n props.data.map((row, dataIndex) => ({\n row,\n dataIndex,\n key: props.rowKey ? props.rowKey(row, dataIndex) : dataIndex,\n })),\n);\n\nconst sortedRows = computed(() => {\n const active = sort.value;\n if (!active) return keyedRows.value;\n const column = props.columns.find((entry) => entry.key === active.columnKey);\n const accessor = column?.accessor;\n if (!accessor && !column?.compare) return keyedRows.value;\n return keyedRows.value\n .map((entry) => ({ entry, value: column?.compare ? undefined : accessor?.(entry.row) }))\n .sort((a, b) => {\n if (column?.compare) {\n const result = column.compare(a.entry.row, b.entry.row);\n return active.direction === SortDirection.Asc ? result : -result;\n }\n /* The shared foundation ordering: absent values land last in both directions, outside the flip. */\n const isLeftAbsent = isNullish(a.value);\n const isRightAbsent = isNullish(b.value);\n if (isLeftAbsent || isRightAbsent) return isLeftAbsent === isRightAbsent ? 0 : isLeftAbsent ? 1 : -1;\n const result = compareValues(a.value, b.value, { locale: locale.locale.value });\n return active.direction === SortDirection.Asc ? result : -result;\n })\n .map(({ entry }) => entry);\n});\n\nconst rows = computed(() =>\n sortedRows.value.map(({ row, key, dataIndex }, index) => {\n const isRowSelected = selectedLookup.value.has(key);\n return {\n key,\n row,\n index,\n isSelected: isRowSelected,\n isSelectable: hasSelection.value && (props.isRowSelectable?.(row, dataIndex) ?? true),\n isExpandable: hasExpansion.value && (props.isRowExpandable?.(row, dataIndex) ?? true),\n isExpanded: expandedLookup.value.has(key),\n detailId: `${tableId}-detail-${dataIndex}`,\n /* `onClick` only exists when a handler was supplied — React's `onClick={onRowClick ? … : undefined}`. */\n attrs: {\n ...(hasSelection.value\n ? { 'aria-selected': isRowSelected, 'data-selected': isRowSelected ? '' : undefined }\n : {}),\n ...(props.onRowClick\n ? {\n tabindex: 0,\n onClick: (event: MouseEvent): void => {\n if (event.defaultPrevented || (event.target as Element | null)?.closest('[data-row-control]')) return;\n props.onRowClick?.(row, index);\n },\n onKeydown: (event: KeyboardEvent): void => {\n if (\n event.target !== event.currentTarget ||\n event.defaultPrevented ||\n !['Enter', ' '].includes(event.key)\n )\n return;\n event.preventDefault();\n props.onRowClick?.(row, index);\n },\n }\n : {}),\n },\n class: cn(\n props.onRowClick &&\n 'cursor-pointer focus-visible:outline-2 focus-visible:outline-ring focus-visible:-outline-offset-2',\n isRowSelected && 'bg-primary-soft/40 hover:bg-primary-soft/60',\n ),\n };\n }),\n);\n\n/** The keys of every selectable row, in display order — the scope of select-all and shift ranges. */\nconst selectableKeys = computed(() => rows.value.filter((entry) => entry.isSelectable).map((entry) => entry.key));\n\n/** The header checkbox's tri-state over the selectable rows. */\nconst headerStatus = computed(() =>\n selectionStatus(createSelection(SelectionModeToken.Multiple, selectedKeys.value), selectableKeys.value),\n);\n\nconst skeletonRowKeys = computed(() => {\n const count = Math.round(props.skeletonRows ?? props.loadingRowCount ?? DefaultSkeletonRows);\n return Array.from({ length: Math.max(1, count || DefaultSkeletonRows) }, (_, index) => index);\n});\n\n/* A `DataRegion` first load draws placeholder rows whatever the data holds; on its own the table draws them while an\n empty table loads. */\nconst regionSkeleton = useSkeletonState();\nconst isShowingSkeleton = computed(\n () => regionSkeleton.isSkeleton.value || (props.isLoading && rows.value.length === 0),\n);\n\nfunction cycleSort(columnKey: string): void {\n const active = sort.value;\n if (!active || active.columnKey !== columnKey) {\n setSort({ columnKey, direction: SortDirection.Asc });\n } else if (active.direction === SortDirection.Asc) {\n setSort({ columnKey, direction: SortDirection.Desc });\n } else {\n setSort(null);\n }\n}\n\nfunction alignClass(align: DataTableColumn<T>['align']): string {\n if (align === DataTableColumnAlign.Right) return 'text-right';\n if (align === DataTableColumnAlign.Center) return 'text-center';\n return 'text-left';\n}\n\n/** A loading cell's bar width: the column's own, else a varied share of the cell. The cell's alignment places it. */\nfunction skeletonLineWidth(column: DataTableColumn<T>, row: number, position: number): string {\n return column.skeletonWidth ?? SkeletonLineWidths[(row + position) % SkeletonLineWidths.length]!;\n}\n\n/** The expand control's own box, drawn as its placeholder. */\nconst skeletonControlClass = computed(() =>\n cn('inline-flex size-6 rounded-sm align-middle', skeletonBoxClass(regionSkeleton.animation.value)),\n);\n\nconst headerCells = computed(() =>\n props.columns.map((column) => {\n const active = sort.value;\n const isSorted = active?.columnKey === column.key;\n return {\n key: column.key,\n column,\n isSorted,\n isAscending: isSorted && active?.direction === SortDirection.Asc,\n ariaSort: isSorted\n ? active?.direction === SortDirection.Asc\n ? 'ascending'\n : 'descending'\n : column.isSortable\n ? 'none'\n : undefined,\n style: column.width ? { width: column.width } : undefined,\n class: alignClass(column.align),\n };\n }),\n);\n\n/** The column's own renderer, then its accessor — the fallback under the `cell` slot. */\nfunction renderCell(column: DataTableColumn<T>, row: T, index: number): unknown {\n if (column.cell) return column.cell(row, index);\n if (column.accessor) return column.accessor(row);\n return null;\n}\n\n/*\n * Renders a cell value: VNodes (and arrays of them) mount as markup, everything else as its display string.\n * Interpolating a VNode instead would JSON-stringify it — which throws on the VNode's circular component link.\n */\nconst CellContent: FunctionalComponent<{ value: unknown }> = ({ value }): VNodeChild => {\n if (isVNode(value)) return value;\n if (Array.isArray(value) && value.length > 0 && value.every((item) => isVNode(item))) return value as VNodeChild;\n return toDisplayString(value);\n};\nCellContent.props = ['value'];\n\n/** The current selection as a model state, carrying the range anchor. */\nfunction selectionState(): SelectionState<SelectionKey> {\n return createSelection(props.selectionMode, selectedKeys.value, selectionAnchor);\n}\n\n/** Requests the next selection, keeping its anchor and emitting only a real change. */\nfunction commitSelection(next: SelectionState<SelectionKey>): void {\n selectionAnchor = next.anchor;\n const keys = [...next.keys];\n if (!sameKeys(keys, selectedKeys.value)) setSelectedKeys(keys);\n}\n\n/** Records whether the press about to toggle a row checkbox held Shift. */\nfunction rememberGesture(event: MouseEvent): void {\n isRangeGesture = event.shiftKey;\n}\n\n/** Toggles one row — a Shift press in multiple mode selects the range from the anchor. */\nfunction toggleRow(key: SelectionKey): void {\n const state = selectionState();\n const isRange = isRangeGesture && props.selectionMode === SelectionModeToken.Multiple;\n isRangeGesture = false;\n if (isRange) commitSelection(extendSelection(state, key, selectableKeys.value));\n else if (props.selectionMode === SelectionModeToken.Single)\n commitSelection(isSelected(state, key) ? deselect(state, key) : select(state, key));\n else commitSelection(toggle(state, key));\n}\n\n/** Selects every selectable row, or clears them when all are selected. */\nfunction toggleAllRows(): void {\n commitSelection(toggleAll(selectionState(), selectableKeys.value));\n}\n\n/** Expands a collapsed row or collapses an expanded one. */\nfunction toggleExpanded(key: SelectionKey): void {\n const next = new Set(expandedKeys.value);\n if (next.has(key)) next.delete(key);\n else next.add(key);\n setExpandedKeys([...next]);\n}\n\n/** The expand chevron's classes — it points down once its row is expanded, and mirrors right to left. */\nfunction expandIconClass(isExpanded: boolean): string {\n return cn('size-4 transition-transform rtl:-scale-x-100', isExpanded && 'rotate-90 rtl:scale-x-100');\n}\n\nconst SortButtonClass =\n 'inline-flex items-center gap-1 rounded-sm transition-colors hover:text-foreground focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring';\n\nconst ExpandButtonClass =\n 'inline-flex size-6 items-center justify-center rounded-sm text-muted-foreground hover:text-foreground focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring';\n</script>\n\n<template>\n <Table\n :is-striped=\"isStriped\"\n :is-hoverable=\"resolvedHoverable\"\n :density=\"density\"\n :is-bare=\"isBare\"\n :container-class-name=\"containerClassName\"\n :has-sticky-header=\"hasStickyHeader\"\n :phone-layout=\"phoneLayout\"\n :stack-breakpoint=\"stackBreakpoint\"\n :aria-busy=\"isLoading || isShowingSkeleton || undefined\"\n >\n <!-- The heading stays as it is through a first load; only the body draws placeholder rows. -->\n <TableHead>\n <TableRow>\n <TableHeaderCell v-if=\"hasExpansion\" class=\"w-10\">\n <span class=\"sr-only\">{{ locale.t('DataTable.expandColumn', undefined, 'Details') }}</span>\n </TableHeaderCell>\n <TableHeaderCell v-if=\"hasSelection\" class=\"w-10\" data-row-control>\n <CheckboxInput\n v-if=\"selectionMode === SelectionModeToken.Multiple\"\n size=\"sm\"\n :model-value=\"headerStatus === SelectionStatus.All\"\n :is-indeterminate=\"headerStatus === SelectionStatus.Some\"\n :is-disabled=\"selectableKeys.length === 0\"\n :is-skeleton=\"false\"\n :aria-label=\"locale.t('DataTable.selectAll', undefined, 'Select all rows')\"\n @update:model-value=\"toggleAllRows\"\n />\n <span v-else class=\"sr-only\">{{ locale.t('DataTable.selectColumn', undefined, 'Select') }}</span>\n </TableHeaderCell>\n <TableHeaderCell\n v-for=\"cell in headerCells\"\n :key=\"cell.key\"\n :aria-sort=\"cell.ariaSort\"\n :style=\"cell.style\"\n :class=\"cell.class\"\n >\n <button v-if=\"cell.column.isSortable\" type=\"button\" :class=\"SortButtonClass\" @click=\"cycleSort(cell.key)\">\n <span>\n <slot name=\"header\" :column=\"cell.column\">{{ cell.column.header }}</slot>\n </span>\n <ArrowUp v-if=\"cell.isSorted && cell.isAscending\" class=\"h-3.5 w-3.5\" />\n <ArrowDown v-else-if=\"cell.isSorted\" class=\"h-3.5 w-3.5\" />\n <ArrowUpDown v-else class=\"h-3.5 w-3.5 opacity-50\" />\n </button>\n <slot v-else name=\"header\" :column=\"cell.column\">{{ cell.column.header }}</slot>\n </TableHeaderCell>\n </TableRow>\n </TableHead>\n <TableBody>\n <template v-if=\"isShowingSkeleton\">\n <slot name=\"loading\">\n <TableRow v-for=\"index in skeletonRowKeys\" :key=\"`skeleton-${index}`\" data-skeleton-row>\n <TableCell v-if=\"hasExpansion\" :class=\"StackedControlClass\" label=\"\" data-row-control>\n <span aria-hidden=\"true\" :class=\"skeletonControlClass\" />\n </TableCell>\n <TableCell v-if=\"hasSelection\" :class=\"StackedControlClass\" label=\"\" data-row-control>\n <CheckboxInput size=\"sm\" is-skeleton />\n </TableCell>\n <TableCell\n v-for=\"(column, position) in columns\"\n :key=\"column.key\"\n :label=\"String(column.header)\"\n :class=\"alignClass(column.align)\"\n >\n <SkeletonStateLine is-skeleton :width=\"skeletonLineWidth(column, index, position)\" />\n </TableCell>\n </TableRow>\n </slot>\n </template>\n <template v-else-if=\"rows.length === 0\">\n <TableRow>\n <TableCell :colspan=\"columnCount\" label=\"\" class=\"py-8 text-center text-muted-foreground\">\n <slot name=\"emptyContent\">{{ emptyText }}</slot>\n </TableCell>\n </TableRow>\n </template>\n <template v-else>\n <template v-for=\"row in rows\" :key=\"row.key\">\n <TableRow v-bind=\"row.attrs\" :class=\"row.class\">\n <TableCell v-if=\"hasExpansion\" :class=\"StackedControlClass\" label=\"\" data-row-control>\n <button\n v-if=\"row.isExpandable\"\n type=\"button\"\n :class=\"ExpandButtonClass\"\n :aria-expanded=\"row.isExpanded\"\n :aria-controls=\"row.isExpanded ? row.detailId : undefined\"\n :aria-label=\"\n row.isExpanded\n ? locale.t('DataTable.collapseRow', undefined, 'Hide details')\n : locale.t('DataTable.expandRow', undefined, 'Show details')\n \"\n @click=\"toggleExpanded(row.key)\"\n >\n <ChevronRight :class=\"expandIconClass(row.isExpanded)\" />\n </button>\n </TableCell>\n <TableCell\n v-if=\"hasSelection\"\n :class=\"StackedControlClass\"\n label=\"\"\n data-row-control\n @click.capture=\"rememberGesture\"\n >\n <CheckboxInput\n size=\"sm\"\n :model-value=\"row.isSelected\"\n :is-disabled=\"!row.isSelectable\"\n :aria-label=\"locale.t('DataTable.selectRow', undefined, 'Select row')\"\n @update:model-value=\"toggleRow(row.key)\"\n />\n </TableCell>\n <TableCell\n v-for=\"column in columns\"\n :key=\"column.key\"\n :label=\"String(column.header)\"\n :class=\"alignClass(column.align)\"\n >\n <slot name=\"cell\" :row=\"row.row\" :column=\"column\" :index=\"row.index\"\n ><CellContent :value=\"renderCell(column, row.row, row.index)\"\n /></slot>\n </TableCell>\n </TableRow>\n <TableRow v-if=\"row.isExpandable && row.isExpanded\" :id=\"row.detailId\" data-detail-row>\n <TableCell :colspan=\"columnCount\" label=\"\" class=\"bg-muted/30\">\n <slot name=\"expanded\" :row=\"row.row\" :index=\"row.index\" />\n </TableCell>\n </TableRow>\n </template>\n </template>\n </TableBody>\n </Table>\n</template>\n"],"names":["_useSlots","SelectionModeToken","result","_createBlock","_unref","Table","_createVNode","TableHead","TableRow","TableHeaderCell","_createElementVNode","_toDisplayString","CheckboxInput","_openBlock","_createElementBlock","_Fragment","_renderList","_normalizeStyle","_normalizeClass","_renderSlot","TableBody","TableCell","_mergeProps"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAMO,MAAM,gBAAgB;AAAA;AAAA,EAE3B,KAAK;AAAA;AAAA,EAEL,MAAM;AACR;AAKO,MAAM,uBAAuB;AAAA;AAAA,EAElC,MAAM;AAAA;AAAA,EAEN,QAAQ;AAAA;AAAA,EAER,OAAO;AACT;AAqGA,MAAM,sBAAsB;AAG5B,MAAM,sBAAsB;AAG5B,MAAM,qBAAqB,CAAC,mBAAmB,kBAAkB,mBAAmB,iBAAiB;AAGrG,SAAS,SAAS,GAAgC,GAAyC;AACz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AAA;AAAA,kBAAA;qCACrE,MAEY;AAAA,sBAFZF,YAEYF,MAAAiB,WAAA,GAAA;AAAA,wBAFA,SAAS,YAAA;AAAA,wBAAa,OAAM;AAAA,wBAAG,OAAM;AAAA,sBAAA;yCAC/C,MAA0D;AAAA,0BAA1DF,WAA0D,KAAA,QAAA,YAAA;AAAA,4BAAnC,KAAK,IAAI;AAAA,4BAAM,OAAO,IAAI;AAAA,0BAAA;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"DataTable.vue.js","sources":["../../../../src/presentation/display/dataTable/DataTable.vue"],"sourcesContent":["<script lang=\"ts\">\nimport type { SelectionKey, SelectionMode } from '../../../foundation/selection';\nimport type { Breakpoint } from '../../layout/appShell/AppShell.vue';\nimport type { TableDensity, TablePhoneLayout } from '../table';\n\n/** Defines the sort order of a DataTable column. */\nexport const SortDirection = {\n /** Refers to ascending order. */\n Asc: 'asc',\n /** Refers to descending order. */\n Desc: 'desc',\n} as const;\n\nexport type SortDirection = (typeof SortDirection)[keyof typeof SortDirection];\n\n/** Defines the horizontal text alignment of a DataTable column. */\nexport const DataTableColumnAlign = {\n /** Refers to left alignment. */\n Left: 'left',\n /** Refers to centered alignment. */\n Center: 'center',\n /** Refers to right alignment. */\n Right: 'right',\n} as const;\n\nexport type DataTableColumnAlign = (typeof DataTableColumnAlign)[keyof typeof DataTableColumnAlign];\n\nexport interface DataTableSort {\n readonly columnKey: string;\n readonly direction: SortDirection;\n}\n\nexport interface DataTableColumn<T> {\n readonly key: string;\n /**\n * The header label. React took a `ReactNode`; a column is an array entry and\n * cannot become its own slot, so the scalar stays here and the `header`\n * scoped slot is the rich override.\n */\n readonly header: string | number;\n readonly accessor?: (row: T) => unknown;\n /**\n * The per-cell renderer — this column's rich override. Returns text, a number, a VNode (`h(Badge, …)`) or an\n * array of VNodes; any other value renders as its display string. The `cell` scoped slot overrides every\n * column at once.\n */\n readonly cell?: (row: T, index: number) => unknown;\n readonly isSortable?: boolean;\n /** Custom row comparison; takes precedence over accessor-based sorting. */\n readonly compare?: (left: T, right: T) => number;\n readonly align?: DataTableColumnAlign;\n readonly width?: string;\n /** The skeleton bar's width in this column, any CSS length; defaults to a varied share of the cell. */\n readonly skeletonWidth?: string;\n}\n\nexport interface DataTableProps<T> {\n readonly columns: ReadonlyArray<DataTableColumn<T>>;\n readonly data: ReadonlyArray<T>;\n readonly rowKey?: (row: T, index: number) => string | number;\n /**\n * Fires with the clicked row and its index.\n *\n * Kept a prop rather than an emit because its *presence* is load-bearing — it\n * seeds `isHoverable` and the `cursor-pointer` class, and Vue strips declared\n * emit listeners out of `useAttrs()`.\n */\n readonly onRowClick?: (row: T, index: number) => void;\n readonly sortBy?: DataTableSort | null;\n readonly defaultSortBy?: DataTableSort | null;\n readonly isStriped?: boolean;\n readonly isHoverable?: boolean;\n readonly density?: TableDensity;\n readonly isBare?: boolean;\n /** The empty-state text. Default `No results.`; override richly via the `emptyContent` slot. */\n readonly emptyContent?: string | number;\n\n /** How many rows the reader may select. Default `none`; `single` and `multiple` add a checkbox column. */\n readonly selectionMode?: SelectionMode;\n\n /** The selected row keys, controlled. The `v-model:selection` binding target. */\n readonly selection?: ReadonlyArray<SelectionKey>;\n\n /** The initially selected row keys when uncontrolled. Default none. */\n readonly defaultSelection?: ReadonlyArray<SelectionKey>;\n\n /** Whether a row can be selected, given its data index. Default every row. */\n readonly isRowSelectable?: (row: T, index: number) => boolean;\n\n /** The expanded row keys, controlled. The `v-model:expanded` binding target. */\n readonly expanded?: ReadonlyArray<SelectionKey>;\n\n /** The initially expanded row keys when uncontrolled. Default none. */\n readonly defaultExpanded?: ReadonlyArray<SelectionKey>;\n\n /** Whether a row can expand when the `expanded` slot is set, given its data index. Default every row. */\n readonly isRowExpandable?: (row: T, index: number) => boolean;\n\n /** Whether the header row stays pinned while the body scrolls inside `containerClassName`'s height. */\n readonly hasStickyHeader?: boolean;\n\n /** Whether data is loading — marks the table busy and draws skeleton rows while it is empty. */\n readonly isLoading?: boolean;\n\n /** The skeleton rows drawn while an empty table loads or its `DataRegion` first-loads. Default 5. */\n readonly skeletonRows?: number;\n\n /** @deprecated Use `skeletonRows`; this alias is removed next release. */\n readonly loadingRowCount?: number;\n\n /** Classes for the scroll container — a height such as `max-h-96` lets a sticky header pin. */\n readonly containerClassName?: string;\n\n /**\n * The layout below `stackBreakpoint`. Default `stack`: one card per row, each value beside its column's `header`,\n * with the sort and select-all controls in a bar above. `scroll` keeps the table and scrolls it sideways.\n */\n readonly phoneLayout?: TablePhoneLayout;\n\n /** Rows stack into cards below this breakpoint. Default `md`. */\n readonly stackBreakpoint?: Breakpoint;\n}\n\n/** @internal A row-control cell when stacked: inline at the head of its card, with no label. */\nconst StackedControlClass = 'w-10 table-stacked:inline-flex table-stacked:w-auto';\n\n/** @internal The skeleton rows drawn while an empty table loads, when `skeletonRows` is not set. */\nconst DefaultSkeletonRows = 5;\n\n/** @internal Bar widths a loading cell cycles through, so placeholder rows read as varied text, not a grid of bars. */\nconst SkeletonLineWidths = ['min(75%, 12rem)', 'min(50%, 8rem)', 'min(83%, 14rem)', 'min(66%, 10rem)'] as const;\n\n/** @internal Whether two key lists hold the same members. */\nfunction sameKeys(a: ReadonlyArray<SelectionKey>, b: ReadonlyArray<SelectionKey>): boolean {\n if (a.length !== b.length) return false;\n const lookup = new Set(b);\n return a.every((key) => lookup.has(key));\n}\n</script>\n\n<script setup lang=\"ts\" generic=\"T\">\nimport { computed, isVNode, toDisplayString, type FunctionalComponent, type VNodeChild } from 'vue';\nimport { useLocale } from '../../../foundation/i18n';\nimport { ArrowDown, ArrowUp, ArrowUpDown, ChevronRight } from 'lucide-vue-next';\nimport { useId } from '../../../foundation/identifiers';\nimport {\n compareValues,\n createSelection,\n deselect,\n extendSelection,\n isNullish,\n isSelected,\n select,\n selectionStatus,\n toggle,\n toggleAll,\n SelectionMode as SelectionModeToken,\n SelectionStatus,\n type SelectionState,\n} from '../../../foundation/selection';\nimport { cn } from '../../../foundation/styles';\nimport { useControlled } from '../../../foundation/state';\nimport CheckboxInput from '../../forms/checkboxInput/CheckboxInput.vue';\nimport { useSkeletonState } from '../../feedback/skeletonState/SkeletonStateContext';\nimport { SkeletonStateLine } from '../../feedback/skeletonState/SkeletonStateLine';\nimport { skeletonBoxClass } from '../../feedback/skeletonState/SkeletonState.variants';\nimport { Table, TableBody, TableCell, TableHead, TableHeaderCell, TableRow } from '../table';\n\n/**\n * Renders a sortable table from a `columns` descriptor, wrapping the `Table` primitives, with optional row\n * selection, expandable detail rows, a pinned header and a loading state.\n *\n * `class` and `aria-label` reach the inner `<table>` by fallthrough, which is why this component keeps `inheritAttrs`\n * on.\n */\ndefineOptions({ name: 'DataTable' });\n\nconst props = withDefaults(defineProps<DataTableProps<T>>(), {\n rowKey: undefined,\n onRowClick: undefined,\n sortBy: undefined,\n defaultSortBy: undefined,\n // Explicit `undefined` so an absent Boolean prop is not cast to `false` and\n // each one keeps deferring to `Table`'s own default.\n isStriped: undefined,\n isHoverable: undefined,\n density: undefined,\n isBare: undefined,\n selectionMode: SelectionModeToken.None,\n selection: undefined,\n defaultSelection: undefined,\n isRowSelectable: undefined,\n expanded: undefined,\n defaultExpanded: undefined,\n isRowExpandable: undefined,\n hasStickyHeader: false,\n isLoading: false,\n skeletonRows: undefined,\n loadingRowCount: undefined,\n containerClassName: undefined,\n phoneLayout: undefined,\n stackBreakpoint: undefined,\n});\n\nconst emit = defineEmits<{\n /** Fires when the reader clicks a sortable header, with the next sort or `null` once cleared. */\n 'update:sortBy': [sort: DataTableSort | null];\n\n /** Fires when the reader selects or deselects rows, with every selected row key. */\n 'update:selection': [keys: SelectionKey[]];\n\n /** Fires when the reader expands or collapses a row, with every expanded row key. */\n 'update:expanded': [keys: SelectionKey[]];\n}>();\n\nconst slots = defineSlots<{\n /** Overrides a column header. Falls back to the column's own `header`. */\n header(props: { column: DataTableColumn<T> }): unknown;\n /** Overrides a body cell. Falls back to the column's `cell`, then its `accessor`. */\n cell(props: { row: T; column: DataTableColumn<T>; index: number }): unknown;\n /** Overrides the empty-state content. Falls back to the `emptyContent` prop. */\n emptyContent(): unknown;\n /** The detail row under an expanded row; its presence adds the expand toggle column. */\n expanded?(props: { row: T; index: number }): unknown;\n /** Replaces the skeleton rows drawn while an empty table loads. */\n loading?(): unknown;\n}>();\n\nconst locale = useLocale();\nconst tableId = useId();\n\nconst emptyText = computed(() => props.emptyContent ?? locale.t('DataTable.emptyContent', undefined, 'No results.'));\n\nconst { value: sort, setValue: setSort } = useControlled<DataTableSort | null>({\n controlled: () => props.sortBy,\n default: props.defaultSortBy ?? null,\n onChange: (next) => emit('update:sortBy', next),\n});\n\nconst { value: selectedKeys, setValue: setSelectedKeys } = useControlled<ReadonlyArray<SelectionKey>>({\n controlled: () => props.selection,\n default: props.defaultSelection ?? [],\n onChange: (next) => emit('update:selection', [...next]),\n});\n\nconst { value: expandedKeys, setValue: setExpandedKeys } = useControlled<ReadonlyArray<SelectionKey>>({\n controlled: () => props.expanded,\n default: props.defaultExpanded ?? [],\n onChange: (next) => emit('update:expanded', [...next]),\n});\n\n/** @internal The fixed end of a shift-click range — interaction state, never part of the model. */\nlet selectionAnchor: SelectionKey | null = null;\n\n/** @internal Whether the pointer press that toggles a row checkbox held Shift. */\nlet isRangeGesture = false;\n\n/** React seeded `isHoverable` from `!!onRowClick`; kept as an explicit fallback. */\nconst resolvedHoverable = computed(() => props.isHoverable ?? props.onRowClick != null);\n\nconst hasSelection = computed(() => props.selectionMode !== SelectionModeToken.None);\nconst hasExpansion = computed(() => slots.expanded !== undefined);\n\n/** Every body column, including the selection and expansion control columns. */\nconst columnCount = computed(() => props.columns.length + (hasSelection.value ? 1 : 0) + (hasExpansion.value ? 1 : 0));\n\nconst selectedLookup = computed(() => new Set(selectedKeys.value));\nconst expandedLookup = computed(() => new Set(expandedKeys.value));\n\n/** The rows with their stable keys, which come from the data order so sorting never changes them. */\nconst keyedRows = computed(() =>\n props.data.map((row, dataIndex) => ({\n row,\n dataIndex,\n key: props.rowKey ? props.rowKey(row, dataIndex) : dataIndex,\n })),\n);\n\nconst sortedRows = computed(() => {\n const active = sort.value;\n if (!active) return keyedRows.value;\n const column = props.columns.find((entry) => entry.key === active.columnKey);\n const accessor = column?.accessor;\n if (!accessor && !column?.compare) return keyedRows.value;\n return keyedRows.value\n .map((entry) => ({ entry, value: column?.compare ? undefined : accessor?.(entry.row) }))\n .sort((a, b) => {\n if (column?.compare) {\n const result = column.compare(a.entry.row, b.entry.row);\n return active.direction === SortDirection.Asc ? result : -result;\n }\n /* The shared foundation ordering: absent values land last in both directions, outside the flip. */\n const isLeftAbsent = isNullish(a.value);\n const isRightAbsent = isNullish(b.value);\n if (isLeftAbsent || isRightAbsent) return isLeftAbsent === isRightAbsent ? 0 : isLeftAbsent ? 1 : -1;\n const result = compareValues(a.value, b.value, { locale: locale.locale.value });\n return active.direction === SortDirection.Asc ? result : -result;\n })\n .map(({ entry }) => entry);\n});\n\nconst rows = computed(() =>\n sortedRows.value.map(({ row, key, dataIndex }, index) => {\n const isRowSelected = selectedLookup.value.has(key);\n return {\n key,\n row,\n index,\n isSelected: isRowSelected,\n isSelectable: hasSelection.value && (props.isRowSelectable?.(row, dataIndex) ?? true),\n isExpandable: hasExpansion.value && (props.isRowExpandable?.(row, dataIndex) ?? true),\n isExpanded: expandedLookup.value.has(key),\n detailId: `${tableId}-detail-${dataIndex}`,\n /* `onClick` only exists when a handler was supplied — React's `onClick={onRowClick ? … : undefined}`. */\n attrs: {\n ...(hasSelection.value\n ? { 'aria-selected': isRowSelected, 'data-selected': isRowSelected ? '' : undefined }\n : {}),\n ...(props.onRowClick\n ? {\n tabindex: 0,\n onClick: (event: MouseEvent): void => {\n if (event.defaultPrevented || (event.target as Element | null)?.closest('[data-row-control]')) return;\n props.onRowClick?.(row, index);\n },\n onKeydown: (event: KeyboardEvent): void => {\n if (\n event.target !== event.currentTarget ||\n event.defaultPrevented ||\n !['Enter', ' '].includes(event.key)\n )\n return;\n event.preventDefault();\n props.onRowClick?.(row, index);\n },\n }\n : {}),\n },\n class: cn(\n props.onRowClick &&\n 'cursor-pointer focus-visible:outline-2 focus-visible:outline-ring focus-visible:-outline-offset-2',\n isRowSelected && 'bg-primary-soft/40 hover:bg-primary-soft/60',\n ),\n };\n }),\n);\n\n/** The keys of every selectable row, in display order — the scope of select-all and shift ranges. */\nconst selectableKeys = computed(() => rows.value.filter((entry) => entry.isSelectable).map((entry) => entry.key));\n\n/** The header checkbox's tri-state over the selectable rows. */\nconst headerStatus = computed(() =>\n selectionStatus(createSelection(SelectionModeToken.Multiple, selectedKeys.value), selectableKeys.value),\n);\n\nconst skeletonRowKeys = computed(() => {\n const count = Math.round(props.skeletonRows ?? props.loadingRowCount ?? DefaultSkeletonRows);\n return Array.from({ length: Math.max(1, count || DefaultSkeletonRows) }, (_, index) => index);\n});\n\n/* A `DataRegion` first load draws placeholder rows whatever the data holds; on its own the table draws them while an\n empty table loads. */\nconst regionSkeleton = useSkeletonState();\nconst isShowingSkeleton = computed(\n () => regionSkeleton.isSkeleton.value || (props.isLoading && rows.value.length === 0),\n);\n\nfunction cycleSort(columnKey: string): void {\n const active = sort.value;\n if (!active || active.columnKey !== columnKey) {\n setSort({ columnKey, direction: SortDirection.Asc });\n } else if (active.direction === SortDirection.Asc) {\n setSort({ columnKey, direction: SortDirection.Desc });\n } else {\n setSort(null);\n }\n}\n\nfunction alignClass(align: DataTableColumn<T>['align']): string {\n if (align === DataTableColumnAlign.Right) return 'text-right';\n if (align === DataTableColumnAlign.Center) return 'text-center';\n return 'text-left';\n}\n\n/** A loading cell's bar width: the column's own, else a varied share of the cell. The cell's alignment places it. */\nfunction skeletonLineWidth(column: DataTableColumn<T>, row: number, position: number): string {\n return column.skeletonWidth ?? SkeletonLineWidths[(row + position) % SkeletonLineWidths.length]!;\n}\n\n/** The expand control's own box, drawn as its placeholder. */\nconst skeletonControlClass = computed(() =>\n cn('inline-flex size-6 rounded-sm align-middle', skeletonBoxClass(regionSkeleton.animation.value)),\n);\n\nconst headerCells = computed(() =>\n props.columns.map((column) => {\n const active = sort.value;\n const isSorted = active?.columnKey === column.key;\n return {\n key: column.key,\n column,\n isSorted,\n isAscending: isSorted && active?.direction === SortDirection.Asc,\n ariaSort: isSorted\n ? active?.direction === SortDirection.Asc\n ? 'ascending'\n : 'descending'\n : column.isSortable\n ? 'none'\n : undefined,\n style: column.width ? { width: column.width } : undefined,\n class: alignClass(column.align),\n };\n }),\n);\n\n/** The column's own renderer, then its accessor — the fallback under the `cell` slot. */\nfunction renderCell(column: DataTableColumn<T>, row: T, index: number): unknown {\n if (column.cell) return column.cell(row, index);\n if (column.accessor) return column.accessor(row);\n return null;\n}\n\n/*\n * Renders a cell value: VNodes (and arrays of them) mount as markup, everything else as its display string.\n * Interpolating a VNode instead would JSON-stringify it — which throws on the VNode's circular component link.\n */\nconst CellContent: FunctionalComponent<{ value: unknown }> = ({ value }): VNodeChild => {\n if (isVNode(value)) return value;\n if (Array.isArray(value) && value.length > 0 && value.every((item) => isVNode(item))) return value as VNodeChild;\n return toDisplayString(value);\n};\nCellContent.props = ['value'];\n\n/** The current selection as a model state, carrying the range anchor. */\nfunction selectionState(): SelectionState<SelectionKey> {\n return createSelection(props.selectionMode, selectedKeys.value, selectionAnchor);\n}\n\n/** Requests the next selection, keeping its anchor and emitting only a real change. */\nfunction commitSelection(next: SelectionState<SelectionKey>): void {\n selectionAnchor = next.anchor;\n const keys = [...next.keys];\n if (!sameKeys(keys, selectedKeys.value)) setSelectedKeys(keys);\n}\n\n/** Records whether the press about to toggle a row checkbox held Shift. */\nfunction rememberGesture(event: MouseEvent): void {\n isRangeGesture = event.shiftKey;\n}\n\n/** Toggles one row — a Shift press in multiple mode selects the range from the anchor. */\nfunction toggleRow(key: SelectionKey): void {\n const state = selectionState();\n const isRange = isRangeGesture && props.selectionMode === SelectionModeToken.Multiple;\n isRangeGesture = false;\n if (isRange) commitSelection(extendSelection(state, key, selectableKeys.value));\n else if (props.selectionMode === SelectionModeToken.Single)\n commitSelection(isSelected(state, key) ? deselect(state, key) : select(state, key));\n else commitSelection(toggle(state, key));\n}\n\n/** Selects every selectable row, or clears them when all are selected. */\nfunction toggleAllRows(): void {\n commitSelection(toggleAll(selectionState(), selectableKeys.value));\n}\n\n/** Expands a collapsed row or collapses an expanded one. */\nfunction toggleExpanded(key: SelectionKey): void {\n const next = new Set(expandedKeys.value);\n if (next.has(key)) next.delete(key);\n else next.add(key);\n setExpandedKeys([...next]);\n}\n\n/** The expand chevron's classes — it points down once its row is expanded, and mirrors right to left. */\nfunction expandIconClass(isExpanded: boolean): string {\n return cn('size-4 transition-transform rtl:-scale-x-100', isExpanded && 'rotate-90 rtl:scale-x-100');\n}\n\nconst SortButtonClass =\n 'inline-flex items-center gap-1 rounded-sm transition-colors hover:text-foreground focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring';\n\nconst ExpandButtonClass =\n 'inline-flex size-6 items-center justify-center rounded-sm text-muted-foreground hover:text-foreground focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring';\n</script>\n\n<template>\n <Table\n :is-striped=\"isStriped\"\n :is-hoverable=\"resolvedHoverable\"\n :density=\"density\"\n :is-bare=\"isBare\"\n :container-class-name=\"containerClassName\"\n :has-sticky-header=\"hasStickyHeader\"\n :phone-layout=\"phoneLayout\"\n :stack-breakpoint=\"stackBreakpoint\"\n :aria-busy=\"isLoading || isShowingSkeleton || undefined\"\n >\n <!-- The heading stays as it is through a first load; only the body draws placeholder rows. -->\n <TableHead>\n <TableRow>\n <TableHeaderCell v-if=\"hasExpansion\" class=\"w-10\">\n <span class=\"sr-only\">{{ locale.t('DataTable.expandColumn', undefined, 'Details') }}</span>\n </TableHeaderCell>\n <TableHeaderCell v-if=\"hasSelection\" class=\"w-10\" data-row-control>\n <CheckboxInput\n v-if=\"selectionMode === SelectionModeToken.Multiple\"\n size=\"sm\"\n :model-value=\"headerStatus === SelectionStatus.All\"\n :is-indeterminate=\"headerStatus === SelectionStatus.Some\"\n :is-disabled=\"selectableKeys.length === 0\"\n :is-skeleton=\"false\"\n :aria-label=\"locale.t('DataTable.selectAll', undefined, 'Select all rows')\"\n @update:model-value=\"toggleAllRows\"\n />\n <span v-else class=\"sr-only\">{{ locale.t('DataTable.selectColumn', undefined, 'Select') }}</span>\n </TableHeaderCell>\n <TableHeaderCell\n v-for=\"cell in headerCells\"\n :key=\"cell.key\"\n :aria-sort=\"cell.ariaSort\"\n :style=\"cell.style\"\n :class=\"cell.class\"\n >\n <button v-if=\"cell.column.isSortable\" type=\"button\" :class=\"SortButtonClass\" @click=\"cycleSort(cell.key)\">\n <span>\n <slot name=\"header\" :column=\"cell.column\">{{ cell.column.header }}</slot>\n </span>\n <ArrowUp v-if=\"cell.isSorted && cell.isAscending\" class=\"h-3.5 w-3.5\" />\n <ArrowDown v-else-if=\"cell.isSorted\" class=\"h-3.5 w-3.5\" />\n <ArrowUpDown v-else class=\"h-3.5 w-3.5 opacity-50\" />\n </button>\n <slot v-else name=\"header\" :column=\"cell.column\">{{ cell.column.header }}</slot>\n </TableHeaderCell>\n </TableRow>\n </TableHead>\n <TableBody>\n <template v-if=\"isShowingSkeleton\">\n <slot name=\"loading\">\n <TableRow v-for=\"index in skeletonRowKeys\" :key=\"`skeleton-${index}`\" data-skeleton-row>\n <TableCell v-if=\"hasExpansion\" :class=\"StackedControlClass\" label=\"\" data-row-control>\n <span aria-hidden=\"true\" :class=\"skeletonControlClass\" />\n </TableCell>\n <TableCell v-if=\"hasSelection\" :class=\"StackedControlClass\" label=\"\" data-row-control>\n <CheckboxInput size=\"sm\" is-skeleton />\n </TableCell>\n <TableCell\n v-for=\"(column, position) in columns\"\n :key=\"column.key\"\n :label=\"String(column.header)\"\n :class=\"alignClass(column.align)\"\n >\n <SkeletonStateLine is-skeleton :width=\"skeletonLineWidth(column, index, position)\" />\n </TableCell>\n </TableRow>\n </slot>\n </template>\n <template v-else-if=\"rows.length === 0\">\n <TableRow>\n <TableCell :colspan=\"columnCount\" label=\"\" class=\"py-8 text-center text-muted-foreground\">\n <slot name=\"emptyContent\">{{ emptyText }}</slot>\n </TableCell>\n </TableRow>\n </template>\n <template v-else>\n <template v-for=\"row in rows\" :key=\"row.key\">\n <TableRow v-bind=\"row.attrs\" :class=\"row.class\">\n <TableCell v-if=\"hasExpansion\" :class=\"StackedControlClass\" label=\"\" data-row-control>\n <button\n v-if=\"row.isExpandable\"\n type=\"button\"\n :class=\"ExpandButtonClass\"\n :aria-expanded=\"row.isExpanded\"\n :aria-controls=\"row.isExpanded ? row.detailId : undefined\"\n :aria-label=\"\n row.isExpanded\n ? locale.t('DataTable.collapseRow', undefined, 'Hide details')\n : locale.t('DataTable.expandRow', undefined, 'Show details')\n \"\n @click=\"toggleExpanded(row.key)\"\n >\n <ChevronRight :class=\"expandIconClass(row.isExpanded)\" />\n </button>\n </TableCell>\n <TableCell\n v-if=\"hasSelection\"\n :class=\"StackedControlClass\"\n label=\"\"\n data-row-control\n @click.capture=\"rememberGesture\"\n >\n <CheckboxInput\n size=\"sm\"\n :model-value=\"row.isSelected\"\n :is-disabled=\"!row.isSelectable\"\n :aria-label=\"locale.t('DataTable.selectRow', undefined, 'Select row')\"\n @update:model-value=\"toggleRow(row.key)\"\n />\n </TableCell>\n <TableCell\n v-for=\"column in columns\"\n :key=\"column.key\"\n :label=\"String(column.header)\"\n :class=\"alignClass(column.align)\"\n >\n <slot name=\"cell\" :row=\"row.row\" :column=\"column\" :index=\"row.index\"\n ><CellContent :value=\"renderCell(column, row.row, row.index)\"\n /></slot>\n </TableCell>\n </TableRow>\n <TableRow v-if=\"row.isExpandable && row.isExpanded\" :id=\"row.detailId\" data-detail-row>\n <TableCell :colspan=\"columnCount\" label=\"\" class=\"bg-muted/30\">\n <slot name=\"expanded\" :row=\"row.row\" :index=\"row.index\" />\n </TableCell>\n </TableRow>\n </template>\n </template>\n </TableBody>\n </Table>\n</template>\n"],"names":["_useSlots","SelectionModeToken","result","_createBlock","_unref","Table","_createVNode","TableHead","TableRow","TableHeaderCell","_createElementVNode","_toDisplayString","CheckboxInput","_openBlock","_createElementBlock","_Fragment","_renderList","_normalizeStyle","_normalizeClass","_renderSlot","TableBody","TableCell","_mergeProps"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAMO,MAAM,gBAAgB;AAAA;AAAA,EAE3B,KAAK;AAAA;AAAA,EAEL,MAAM;AACR;AAKO,MAAM,uBAAuB;AAAA;AAAA,EAElC,MAAM;AAAA;AAAA,EAEN,QAAQ;AAAA;AAAA,EAER,OAAO;AACT;AAqGA,MAAM,sBAAsB;AAG5B,MAAM,sBAAsB;AAG5B,MAAM,qBAAqB,CAAC,mBAAmB,kBAAkB,mBAAmB,iBAAiB;AAGrG,SAAS,SAAS,GAAgC,GAAyC;AACzF,MAAI,EAAE,WAAW,EAAE,OAAQ,QAAO;AAClC,QAAM,SAAS,IAAI,IAAI,CAAC;AACxB,SAAO,EAAE,MAAM,CAAC,QAAQ,OAAO,IAAI,GAAG,CAAC;AACzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwCA,UAAM,QAAQ;AA2Bd,UAAM,OAAO;AAWb,UAAM,QAAQA,SAAA;AAad,UAAM,SAAS,UAAA;AACf,UAAM,UAAU,MAAA;AAEhB,UAAM,YAAY,SAAS,MAAM,MAAM,gBAAgB,OAAO,EAAE,0BAA0B,QAAW,aAAa,CAAC;AAEnH,UAAM,EAAE,OAAO,MAAM,UAAU,QAAA,IAAY,cAAoC;AAAA,MAC7E,YAAY,MAAM,MAAM;AAAA,MACxB,SAAS,MAAM,iBAAiB;AAAA,MAChC,UAAU,CAAC,SAAS,KAAK,iBAAiB,IAAI;AAAA,IAAA,CAC/C;AAED,UAAM,EAAE,OAAO,cAAc,UAAU,gBAAA,IAAoB,cAA2C;AAAA,MACpG,YAAY,MAAM,MAAM;AAAA,MACxB,SAAS,MAAM,oBAAoB,CAAA;AAAA,MACnC,UAAU,CAAC,SAAS,KAAK,oBAAoB,CAAC,GAAG,IAAI,CAAC;AAAA,IAAA,CACvD;AAED,UAAM,EAA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,QAAA;AAAA,8BAFU,KAAK,IAAI;AAAA,8BAAM;AAAA,8BAAiB,OAAO,IAAI;AAAA,4BAAA,GAA9D,MAES;AAAA,8BADNb,YACD,aAAA;AAAA,gCADe,OAAO,WAAW,QAAQ,IAAI,KAAK,IAAI,KAAK;AAAA,8BAAA;;;;;;;;;kBAIjD,IAAI,gBAAgB,IAAI,2BAAxCH,YAIWC,MAAAI,WAAA,GAAA;AAAA;oBAJ0C,IAAI,IAAI;AAAA,oBAAU,mBAAA;AAAA,kBAAA;qCACrE,MAEY;AAAA,sBAFZF,YAEYF,MAAAiB,WAAA,GAAA;AAAA,wBAFA,SAAS,YAAA;AAAA,wBAAa,OAAM;AAAA,wBAAG,OAAM;AAAA,sBAAA;yCAC/C,MAA0D;AAAA,0BAA1DF,WAA0D,KAAA,QAAA,YAAA;AAAA,4BAAnC,KAAK,IAAI;AAAA,4BAAM,OAAO,IAAI;AAAA,0BAAA;;;;;;;;;;;;;;;;;;"}
@@ -76,3 +76,4 @@ export * from './truncatedText';
76
76
  export * from './countdownText';
77
77
  export * from './overflowGroup';
78
78
  export * from './kanbanBoard';
79
+ export * from './versionBadge';
@@ -121,8 +121,9 @@ import { default as default121 } from "./treeViewer/TreeViewerGroup.vue.js";
121
121
  import { default as default122 } from "./treeViewer/TreeViewerItem.vue.js";
122
122
  import { default as default123 } from "./truncatedText/TruncatedText.vue.js";
123
123
  import { default as default124 } from "./typewriterText/TypewriterText.vue.js";
124
- import { default as default125 } from "./moduleGlyphs/VerticalBarsGlyph.vue.js";
125
- import { default as default126, VideoTrackKind } from "./videoPlayer/VideoPlayer.vue.js";
124
+ import { default as default125 } from "./versionBadge/VersionBadge.vue.js";
125
+ import { default as default126 } from "./moduleGlyphs/VerticalBarsGlyph.vue.js";
126
+ import { default as default127, VideoTrackKind } from "./videoPlayer/VideoPlayer.vue.js";
126
127
  import { AccordionGroupType, useAccordionContext, useAccordionItemContext } from "./accordionGroup/AccordionGroupContext.js";
127
128
  import { AvatarBackground, AvatarRing, AvatarShape, AvatarTone, avatarVariants } from "./avatar/Avatar.variants.js";
128
129
  import { BadgeBorderStyle, BadgeVariant, badgeVariants } from "./badge/Badge.variants.js";
@@ -325,8 +326,9 @@ export {
325
326
  default122 as TreeViewerItem,
326
327
  default123 as TruncatedText,
327
328
  default124 as TypewriterText,
328
- default125 as VerticalBarsGlyph,
329
- default126 as VideoPlayer,
329
+ default125 as VersionBadge,
330
+ default126 as VerticalBarsGlyph,
331
+ default127 as VideoPlayer,
330
332
  VideoTrackKind,
331
333
  avatarVariants,
332
334
  badgeVariants,
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -0,0 +1,27 @@
1
+ /** Defines props for the badge that names an app's version beside its logo. */
2
+ export interface VersionBadgeProps {
3
+ /** The version this tab loaded — `0.15.4`, `0.15.4+abc1234` or `dev`. Build metadata after `+` is not shown. */
4
+ readonly version: string;
5
+ /**
6
+ * The version the host serves now, from `useRunningVersion`. While it differs from `version` the badge names it
7
+ * and becomes a button that asks for a reload; `null` or omitted, the badge shows `version`.
8
+ */
9
+ readonly runningVersion?: string | null;
10
+ /** The badge's tooltip; `{version}` becomes the shown version. Default `"Version {version}"`. */
11
+ readonly label?: string;
12
+ /**
13
+ * The stale badge's tooltip and accessible name; `{version}` is the loaded version and `{running}` the served one.
14
+ * Default `"Version {running} is live; this tab runs {version}. Reload to update."`.
15
+ */
16
+ readonly updateLabel?: string;
17
+ }
18
+ declare const _default: import('vue').DefineComponent<VersionBadgeProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
19
+ reload: () => any;
20
+ }, string, import('vue').PublicProps, Readonly<VersionBadgeProps> & Readonly<{
21
+ onReload?: (() => any) | undefined;
22
+ }>, {
23
+ readonly label: string;
24
+ readonly runningVersion: string | null;
25
+ readonly updateLabel: string;
26
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
27
+ export default _default;
@@ -0,0 +1,80 @@
1
+ import { defineComponent, useAttrs, computed, openBlock, createElementBlock, mergeProps, createVNode, unref, createElementVNode, toDisplayString } from "vue";
2
+ import { RefreshCw } from "lucide-vue-next";
3
+ import { useLocale } from "../../../foundation/i18n/providers/LocaleContext.js";
4
+ import { cn } from "../../../foundation/styles/Cn.js";
5
+ import { VersionBadgeExtensions } from "./VersionBadgeExtensions.js";
6
+ import _sfc_main$1 from "../../../foundation/icons/icon/Icon.vue.js";
7
+ const _hoisted_1 = ["title", "aria-label"];
8
+ const _hoisted_2 = ["title"];
9
+ const _sfc_main = /* @__PURE__ */ defineComponent({
10
+ ...{ name: "VersionBadge", inheritAttrs: false },
11
+ __name: "VersionBadge",
12
+ props: {
13
+ version: {},
14
+ runningVersion: { default: void 0 },
15
+ label: { default: void 0 },
16
+ updateLabel: { default: void 0 }
17
+ },
18
+ emits: ["reload"],
19
+ setup(__props, { emit: __emit }) {
20
+ const props = __props;
21
+ const emit = __emit;
22
+ const attrs = useAttrs();
23
+ const locale = useLocale();
24
+ const isStale = computed(() => VersionBadgeExtensions.isStale(props.version, props.runningVersion));
25
+ const loaded = computed(() => VersionBadgeExtensions.display(props.version));
26
+ const shown = computed(
27
+ () => isStale.value ? VersionBadgeExtensions.display(props.runningVersion ?? props.version) : loaded.value
28
+ );
29
+ const name = computed(() => {
30
+ if (isStale.value) {
31
+ const variables = { version: loaded.value, running: shown.value };
32
+ return props.updateLabel === void 0 ? locale.t(
33
+ "VersionBadge.updateLabel",
34
+ variables,
35
+ "Version {running} is live; this tab runs {version}. Reload to update."
36
+ ) : props.updateLabel.replaceAll("{version}", variables.version).replaceAll("{running}", variables.running);
37
+ }
38
+ return props.label === void 0 ? locale.t("VersionBadge.label", { version: shown.value }, "Version {version}") : props.label.replaceAll("{version}", shown.value);
39
+ });
40
+ const classes = computed(
41
+ () => cn(
42
+ "inline-flex shrink-0 items-center gap-1 rounded-md px-1.5 py-0.5 font-mono text-[11px] font-medium leading-4",
43
+ isStale.value ? "bg-warning-soft text-warning-soft-foreground transition-colors hover:bg-warning/20 focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring motion-reduce:transition-none" : "bg-muted text-muted-foreground",
44
+ attrs.class
45
+ )
46
+ );
47
+ const rest = computed(() => {
48
+ const { class: _class, ...others } = attrs;
49
+ return others;
50
+ });
51
+ return (_ctx, _cache) => {
52
+ return isStale.value ? (openBlock(), createElementBlock("button", mergeProps({
53
+ key: 0,
54
+ type: "button",
55
+ "data-version-badge": "",
56
+ "data-stale": "",
57
+ title: name.value,
58
+ "aria-label": name.value
59
+ }, rest.value, {
60
+ class: classes.value,
61
+ onClick: _cache[0] || (_cache[0] = ($event) => emit("reload"))
62
+ }), [
63
+ createVNode(unref(_sfc_main$1), {
64
+ icon: unref(RefreshCw),
65
+ size: 11,
66
+ "aria-hidden": "true"
67
+ }, null, 8, ["icon"]),
68
+ createElementVNode("span", null, toDisplayString(shown.value), 1)
69
+ ], 16, _hoisted_1)) : (openBlock(), createElementBlock("span", mergeProps({
70
+ key: 1,
71
+ "data-version-badge": "",
72
+ title: name.value
73
+ }, rest.value, { class: classes.value }), toDisplayString(shown.value), 17, _hoisted_2));
74
+ };
75
+ }
76
+ });
77
+ export {
78
+ _sfc_main as default
79
+ };
80
+ //# sourceMappingURL=VersionBadge.vue.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"VersionBadge.vue.js","sources":["../../../../src/presentation/display/versionBadge/VersionBadge.vue"],"sourcesContent":["<script lang=\"ts\">\n/** Defines props for the badge that names an app's version beside its logo. */\nexport interface VersionBadgeProps {\n /** The version this tab loaded — `0.15.4`, `0.15.4+abc1234` or `dev`. Build metadata after `+` is not shown. */\n readonly version: string;\n\n /**\n * The version the host serves now, from `useRunningVersion`. While it differs from `version` the badge names it\n * and becomes a button that asks for a reload; `null` or omitted, the badge shows `version`.\n */\n readonly runningVersion?: string | null;\n\n /** The badge's tooltip; `{version}` becomes the shown version. Default `\"Version {version}\"`. */\n readonly label?: string;\n\n /**\n * The stale badge's tooltip and accessible name; `{version}` is the loaded version and `{running}` the served one.\n * Default `\"Version {running} is live; this tab runs {version}. Reload to update.\"`.\n */\n readonly updateLabel?: string;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs } from 'vue';\nimport type { ClassValue } from 'clsx';\nimport { RefreshCw } from 'lucide-vue-next';\nimport { Icon } from '../../../foundation/icons';\nimport { useLocale } from '../../../foundation/i18n';\nimport { cn } from '../../../foundation/styles';\nimport { VersionBadgeExtensions } from './VersionBadgeExtensions';\n\n/**\n * Renders the app version beside a logo. It follows the running version: once the host serves a newer release than\n * the tab loaded, the badge names that release and offers the reload that brings the tab up to it.\n */\ndefineOptions({ name: 'VersionBadge', inheritAttrs: false });\n\nconst props = withDefaults(defineProps<VersionBadgeProps>(), {\n runningVersion: undefined,\n label: undefined,\n updateLabel: undefined,\n});\n\nconst emit = defineEmits<{\n /** Fires when the reader asks for the newer release — the caller reloads the page. */\n reload: [];\n}>();\n\nconst attrs = useAttrs();\nconst locale = useLocale();\n\nconst isStale = computed(() => VersionBadgeExtensions.isStale(props.version, props.runningVersion));\nconst loaded = computed(() => VersionBadgeExtensions.display(props.version));\nconst shown = computed(() =>\n isStale.value ? VersionBadgeExtensions.display(props.runningVersion ?? props.version) : loaded.value,\n);\n\nconst name = computed(() => {\n if (isStale.value) {\n const variables = { version: loaded.value, running: shown.value };\n return props.updateLabel === undefined\n ? locale.t(\n 'VersionBadge.updateLabel',\n variables,\n 'Version {running} is live; this tab runs {version}. Reload to update.',\n )\n : props.updateLabel.replaceAll('{version}', variables.version).replaceAll('{running}', variables.running);\n }\n return props.label === undefined\n ? locale.t('VersionBadge.label', { version: shown.value }, 'Version {version}')\n : props.label.replaceAll('{version}', shown.value);\n});\n\nconst classes = computed(() =>\n cn(\n 'inline-flex shrink-0 items-center gap-1 rounded-md px-1.5 py-0.5 font-mono text-[11px] font-medium leading-4',\n isStale.value\n ? 'bg-warning-soft text-warning-soft-foreground transition-colors hover:bg-warning/20 focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring motion-reduce:transition-none'\n : 'bg-muted text-muted-foreground',\n attrs.class as ClassValue,\n ),\n);\n\n/** Everything but `class`, which is re-applied through `cn` above. */\nconst rest = computed(() => {\n const { class: _class, ...others } = attrs;\n return others;\n});\n</script>\n\n<template>\n <button\n v-if=\"isStale\"\n type=\"button\"\n data-version-badge\n data-stale\n :title=\"name\"\n :aria-label=\"name\"\n v-bind=\"rest\"\n :class=\"classes\"\n @click=\"emit('reload')\"\n >\n <Icon :icon=\"RefreshCw\" :size=\"11\" aria-hidden=\"true\" />\n <span>{{ shown }}</span>\n </button>\n <span v-else data-version-badge :title=\"name\" v-bind=\"rest\" :class=\"classes\">{{ shown }}</span>\n</template>\n"],"names":["_openBlock","_createElementBlock","_mergeProps","_createVNode","_unref","Icon","_createElementVNode"],"mappings":";;;;;;;;;;;;;;;;;;;AAsCA,UAAM,QAAQ;AAMd,UAAM,OAAO;AAKb,UAAM,QAAQ,SAAA;AACd,UAAM,SAAS,UAAA;AAEf,UAAM,UAAU,SAAS,MAAM,uBAAuB,QAAQ,MAAM,SAAS,MAAM,cAAc,CAAC;AAClG,UAAM,SAAS,SAAS,MAAM,uBAAuB,QAAQ,MAAM,OAAO,CAAC;AAC3E,UAAM,QAAQ;AAAA,MAA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oB,OAAO,KAAA;AAAA,MAAA,GAAc,KAAA,OAAI,EAAG,OAAO,QAAA,MAAA,oBAAY,MAAA,KAAK,GAAA,IAAA,UAAA;AAAA;;;"}
@@ -0,0 +1,5 @@
1
+ import _sfc_main from "./VersionBadge.vue.js";
2
+ export {
3
+ _sfc_main as default
4
+ };
5
+ //# sourceMappingURL=VersionBadge2.vue.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"VersionBadge2.vue.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -0,0 +1,9 @@
1
+ /** Reads and compares the version strings a `VersionBadge` shows. */
2
+ export declare const VersionBadgeExtensions: {
3
+ /** The release part of a version — `0.15.4+abc1234` gives `0.15.4`; build metadata never reaches the badge. */
4
+ readonly release: (version: string) => string;
5
+ /** The badge text — a numbered release shows as `v0.15.4`; a named build (`dev`) shows as it is. */
6
+ readonly display: (version: string) => string;
7
+ /** Whether the host serves another release than the one this tab loaded. Without a running version, never. */
8
+ readonly isStale: (version: string, runningVersion: string | null | undefined) => boolean;
9
+ };
@@ -0,0 +1,21 @@
1
+ const VersionBadgeExtensions = {
2
+ /** The release part of a version — `0.15.4+abc1234` gives `0.15.4`; build metadata never reaches the badge. */
3
+ release(version) {
4
+ return version.trim().split("+")[0] ?? "";
5
+ },
6
+ /** The badge text — a numbered release shows as `v0.15.4`; a named build (`dev`) shows as it is. */
7
+ display(version) {
8
+ const release = VersionBadgeExtensions.release(version).replace(/^v(?=\d)/u, "");
9
+ return /^\d/u.test(release) ? `v${release}` : release;
10
+ },
11
+ /** Whether the host serves another release than the one this tab loaded. Without a running version, never. */
12
+ isStale(version, runningVersion) {
13
+ if (runningVersion === null || runningVersion === void 0) return false;
14
+ const running = VersionBadgeExtensions.display(runningVersion);
15
+ return running !== "" && running !== VersionBadgeExtensions.display(version);
16
+ }
17
+ };
18
+ export {
19
+ VersionBadgeExtensions
20
+ };
21
+ //# sourceMappingURL=VersionBadgeExtensions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"VersionBadgeExtensions.js","sources":["../../../../src/presentation/display/versionBadge/VersionBadgeExtensions.ts"],"sourcesContent":["/** Reads and compares the version strings a `VersionBadge` shows. */\nexport const VersionBadgeExtensions = {\n /** The release part of a version — `0.15.4+abc1234` gives `0.15.4`; build metadata never reaches the badge. */\n release(version: string): string {\n return version.trim().split('+')[0] ?? '';\n },\n\n /** The badge text — a numbered release shows as `v0.15.4`; a named build (`dev`) shows as it is. */\n display(version: string): string {\n const release = VersionBadgeExtensions.release(version).replace(/^v(?=\\d)/u, '');\n return /^\\d/u.test(release) ? `v${release}` : release;\n },\n\n /** Whether the host serves another release than the one this tab loaded. Without a running version, never. */\n isStale(version: string, runningVersion: string | null | undefined): boolean {\n if (runningVersion === null || runningVersion === undefined) return false;\n const running = VersionBadgeExtensions.display(runningVersion);\n return running !== '' && running !== VersionBadgeExtensions.display(version);\n },\n} as const;\n"],"names":[],"mappings":"AACO,MAAM,yBAAyB;AAAA;AAAA,EAEpC,QAAQ,SAAyB;AAC/B,WAAO,QAAQ,OAAO,MAAM,GAAG,EAAE,CAAC,KAAK;AAAA,EACzC;AAAA;AAAA,EAGA,QAAQ,SAAyB;AAC/B,UAAM,UAAU,uBAAuB,QAAQ,OAAO,EAAE,QAAQ,aAAa,EAAE;AAC/E,WAAO,OAAO,KAAK,OAAO,IAAI,IAAI,OAAO,KAAK;AAAA,EAChD;AAAA;AAAA,EAGA,QAAQ,SAAiB,gBAAoD;AAC3E,QAAI,mBAAmB,QAAQ,mBAAmB,OAAW,QAAO;AACpE,UAAM,UAAU,uBAAuB,QAAQ,cAAc;AAC7D,WAAO,YAAY,MAAM,YAAY,uBAAuB,QAAQ,OAAO;AAAA,EAC7E;AACF;"}
@@ -0,0 +1 @@
1
+ export { default as VersionBadge, type VersionBadgeProps } from './VersionBadge.vue';
@@ -31,10 +31,10 @@ declare const _default: import('vue').DefineComponent<ImageEditorProps, {}, {},
31
31
  readonly isReadOnly: boolean;
32
32
  readonly defaultValue: ImageEditRecipe;
33
33
  readonly modelValue: ImageEditRecipe;
34
+ readonly isBusy: boolean;
34
35
  readonly maxDimension: number;
35
36
  readonly maxPixels: number;
36
37
  readonly previewSrc: string;
37
38
  readonly canRemoveBackground: boolean;
38
- readonly isBusy: boolean;
39
39
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
40
40
  export default _default;