@hjmds/design-contracts 1.47.0 → 1.48.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/dist/catalog.d.ts +22 -18
  2. package/dist/catalog.d.ts.map +1 -1
  3. package/dist/catalog.js +11 -11
  4. package/dist/catalog.js.map +1 -1
  5. package/dist/component-recipes.d.ts +5 -1
  6. package/dist/component-recipes.d.ts.map +1 -1
  7. package/dist/component-recipes.js +4 -2
  8. package/dist/component-recipes.js.map +1 -1
  9. package/dist/data-table.d.ts +12 -0
  10. package/dist/data-table.d.ts.map +1 -1
  11. package/dist/data-table.js +2 -0
  12. package/dist/data-table.js.map +1 -1
  13. package/dist/share-sheet.d.ts +115 -0
  14. package/dist/share-sheet.d.ts.map +1 -0
  15. package/dist/share-sheet.js +62 -0
  16. package/dist/share-sheet.js.map +1 -0
  17. package/dist/version.d.ts +1 -1
  18. package/dist/version.js +1 -1
  19. package/dist/version.js.map +1 -1
  20. package/docs/dialog.md +2 -3
  21. package/docs/generated/component-maturity.md +12 -12
  22. package/docs/generated/renderer-evidence.json +16 -16
  23. package/docs/generated/renderer-evidence.md +14 -14
  24. package/docs/generated/showcase-manifest.json +19 -19
  25. package/docs/optional-adapters.md +21 -5
  26. package/docs/stable-core.md +37 -0
  27. package/docs/usage/README.md +12 -11
  28. package/docs/usage/components/badge.md +10 -1
  29. package/docs/usage/components/data-table.md +2 -0
  30. package/docs/usage/components/dialog.md +3 -3
  31. package/docs/usage/components/follow-list-screen.md +3 -3
  32. package/docs/usage/components/share-sheet.md +139 -0
  33. package/docs/usage/components/shared-transition-element.md +1 -1
  34. package/docs/usage/compositions/interaction-adapters.md +2 -2
  35. package/docs/usage/compositions/optional-adapters.md +2 -2
  36. package/docs/usage/screens/common-follow-list.md +3 -3
  37. package/package.json +7 -1
@@ -384,6 +384,18 @@ export declare const dataTableFamilyRecipe: {
384
384
  alpha?: number;
385
385
  }>;
386
386
  };
387
+ readonly currentPeriod: {
388
+ readonly background: Readonly<{
389
+ source: "theme";
390
+ key: "surfaceSelected";
391
+ alpha?: number;
392
+ }>;
393
+ readonly color: Readonly<{
394
+ source: "theme";
395
+ key: "text";
396
+ alpha?: number;
397
+ }>;
398
+ };
387
399
  };
388
400
  export type LineScoreTeam = Readonly<{
389
401
  id: string;
@@ -1 +1 @@
1
- {"version":3,"file":"data-table.d.ts","sourceRoot":"","sources":["../src/data-table.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,oBAAoB,EAEpB,aAAa,EACb,aAAa,EACb,wBAAwB,EACzB,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAAsD,KAAK,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAGxG,MAAM,MAAM,cAAc,GAAG,OAAO,GAAG,QAAQ,GAAG,KAAK,CAAC;AAExD,MAAM,MAAM,yBAAyB,CAAC,GAAG,SAAS,aAAa,GAAG,aAAa,IAAI,QAAQ,CAAC;IAC1F,EAAE,EAAE,GAAG,CAAC;IACR,2EAA2E;IAC3E,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,cAAc,CAAC;IACvB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,6EAA6E;IAC7E,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB;;;OAGG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB,CAAC,CAAC;AAEH,eAAO,MAAM,uBAAuB;;;CAGuC,CAAC;AAQ5E,wBAAgB,wBAAwB,CAAC,GAAG,SAAS,aAAa,EAChE,OAAO,EAAE,SAAS,yBAAyB,CAAC,GAAG,CAAC,EAAE,GACjD,IAAI,CAgBN;AAED;;;;;;GAMG;AACH,MAAM,MAAM,sBAAsB,CAAC,GAAG,SAAS,aAAa,GAAG,aAAa,IAAI,QAAQ,CAAC;IACvF,EAAE,EAAE,GAAG,CAAC;IACR,QAAQ,CAAC,E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,GAAG,QAAQ,CAAC;IAAE,MAAM,EAAE,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC;IAAC,MAAM,EAAE,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CAAE,CAAC,CAO9H"}
@@ -367,6 +367,8 @@ export const dataTableFamilyRecipe = {
367
367
  * canvas-colored selected row read as a white gap that split the table (2026-10-17 review E17).
368
368
  */
369
369
  highlight: { background: semanticColors.surface.brand },
370
+ // 2026-10-26: current inning follows category selection; my-team emphasis retains its brand role.
371
+ currentPeriod: { background: semanticColors.selection.background, color: semanticColors.selection.content },
370
372
  };
371
373
  /**
372
374
  * Period columns are padded to `minPeriods` (9 innings) and extend for extra innings; totals follow.
@@ -1 +1 @@
1
- {"version":3,"file":"data-table.js","sourceRoot":"","sources":["../src/data-table.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,UAAU,EAAuB,MAAM,uBAAuB,CAAC;AAQrF,OAAO,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAC1F,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,OAAO,EAA0C,MAAM,kBAAkB,CAAC;AACxG,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAwBtD,MAAM,CAAC,MAAM,uBAAuB,GAAG;IACrC,KAAK,EAAE,OAAO;IACd,QAAQ,EAAE,KAAK;CAC0D,CAAC;AAE5E,SAAS,cAAc,CAAC,KAAa,EAAE,KAAa;IAClD,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,IAAI,EAAE,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC3D,MAAM,IAAI,SAAS,CAAC,aAAa,KAAK,oBAAoB,CAAC,CAAC;IAC9D,CAAC;AACH,CAAC;AAED,MAAM,UAAU,wBAAwB,CACtC,OAAkD;IAElD,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACzB,MAAM,IAAI,SAAS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port type {\n AsyncCollectionState,\n BehaviorContract,\n CheckboxState,\n CollectionKey,\n CollectionSelectionModel,\n} from \"./behaviors.js\";\nimport { collectionItemContract, focusIndicatorContract } from \"./component-contracts.js\";\nimport { control, fontWeight, spacing, type FontWeightValue, type TextVariant } from \"./foundations.js\";\nimport { semanticColors } from \"./semantic-colors.js\";\n\nexport type DataTableAlign = \"start\" | \"center\" | \"end\";\n\nexport type DataTableColumnDescriptor<Key extends CollectionKey = CollectionKey> = Readonly<{\n id: Key;\n /** Visible column header text; also the columnheader's accessible name. */\n header: string;\n align?: DataTableAlign;\n sortable?: boolean;\n /** Layout hint only (px or flex-basis); renderers may ignore or clamp it. */\n width?: number;\n /**\n * First press sorts descending (TanStack Table `sortDescFirst`). Stat tables read \"highest first\";\n * lower-is-better columns (ERA, rank) leave it false. Added 2026-10-14 with the Native renderer.\n */\n sortDescFirst?: boolean;\n /**\n * Keeps the column visible while the others scroll horizontally (AG Grid / TanStack column\n * pinning, start edge only). Only a leading run of pinned columns is honored.\n */\n pinned?: \"start\";\n}>;\n\nexport const dataTableColumnDefaults = {\n align: \"start\",\n sortable: false,\n} as const satisfies Readonly<{ align: DataTableAlign; sortable: boolean }>;\n\nfunction assertNonEmpty(value: string, field: string): void {\n if (typeof value !== \"string\" || value.trim().length === 0) {\n throw new TypeError(`DataTable ${field} must not be empty`);\n }\n}\n\nexport function validateDataTableColumns<Key extends CollectionKey>(\n columns: readonly DataTableColumnDescriptor<Key>[],\n): void {\n if (columns.length === 0) {\n throw new TypeError(\"DataTable must declare at least one column\");\n }\n const ids = new Set<Key>();\n for (const column of columns) {\n assertNonEmpty(column.id, \"column id\");\n if (ids.has(column.id)) {\n throw new TypeError(`Duplicate DataTable column id: ${column.id}`);\n }\n ids.add(column.id);\n assertNonEmpty(column.header, `column \"${column.id}\" header`);\n if (column.width !== undefined && (!Number.isFinite(column.width) || column.width <= 0)) {\n throw new RangeError(`DataTable column \"${column.id}\" width must be a positive finite number`);\n }\n }\n}\n\n/**\n * Row identity and selection deliberately do NOT reuse `CollectionItemDescriptor`\n * verbatim: a table row has no single visible `label`/`textValue` the way a\n * Menu or Select item does — its \"content\" is however many columns the\n * product renders per row. Only the parts of the Collection base contract\n * that are genuinely row-shaped (`CollectionKey` identity, `disabled`) apply.\n */\nexport type DataTableRowDescriptor<Key extends CollectionKey = CollectionKey> = Readonly<{\n id: Key;\n disabled?: boolean;\n /** Sub-row nesting (TanStack `depth`): 1 indents a substitute under a starter. 0–3. */\n depth?: number;\n}>;\n\nexport function validateDataTableRows<Key extends CollectionKey>(\n rows: readonly DataTableRowDescriptor<Key>[],\n): void {\n const ids = new Set<Key>();\n for (const row of rows) {\n assertNonEmpty(row.id, \"row id\");\n if (ids.has(row.id)) {\n throw new TypeError(`Duplicate DataTable row id: ${row.id}`);\n }\n ids.add(row.id);\n if (row.depth !== undefined && (!Number.isInteger(row.depth) || row.depth < 0 || row.depth > 3)) {\n throw new RangeError(`DataTable row \"${String(row.id)}\" depth must be an integer from 0 to 3`);\n }\n }\n}\n\n/** Row selection is the unmodified Collection base contract — no DataTable-only selection shape. */\nexport type DataTableSelection<Key extends CollectionKey = CollectionKey> =\n CollectionSelectionModel<Key>;\n\n/**\n * Header \"select all\" state as the same tri-state `CheckboxState` the\n * selection column's checkbox already renders (check/dash), instead of a new\n * `\"none\" | \"some\" | \"all\"` enum the recipe would have to translate again.\n * Disabled rows are excluded from both the denominator and the count.\n */\nexport function resolveDataTableSelectAllState<Key extends CollectionKey>(\n rows: readonly DataTableRowDescriptor<Key>[],\n selectedKeys: ReadonlySet<Key>,\n): CheckboxState {\n const selectable = rows.filter((row) => !row.disabled);\n if (selectable.length === 0) return false;\n const selectedCount = selectable.filter((row) => selectedKeys.has(row.id)).length;\n if (selectedCount === 0) return false;\n if (selectedCount === selectable.length) return true;\n return \"mixed\";\n}\n\n/**\n * Values are the literal `aria-sort` vocabulary (minus `\"none\"`, which is\n * `null`) so the Web renderer passes them through without a translation\n * table — the same \"pass the platform value through\" choice Slider makes\n * for `valueText`.\n */\nexport type DataTableSortDirection = \"ascending\" | \"descending\";\n\nexport type DataTableSortState<Key extends CollectionKey = CollectionKey> = Readonly<{\n columnId: Key;\n direction: DataTableSortDirection;\n}> | null;\n\nexport type DataTableSortCycle = \"two-state\" | \"three-state\";\n\nexport const dataTableDefaults = {\n sortCycle: \"three-state\",\n} as const satisfies Readonly<{ sortCycle: DataTableSortCycle }>;\n\nexport function validateDataTableSortState<Key extends CollectionKey>(\n state: DataTableSortState<Key>,\n columns: readonly DataTableColumnDescriptor<Key>[],\n): void {\n if (state === null) return;\n if (state.direction !== \"ascending\" && state.direction !== \"descending\") {\n throw new TypeError(`Unsupported DataTable sort direction: ${String(state.direction)}`);\n }\n const column = columns.find((candidate) => candidate.id === state.columnId);\n if (!column) {\n throw new TypeError(`DataTable sort references unknown column id: ${String(state.columnId)}`);\n }\n if (!column.sortable) {\n throw new TypeError(`DataTable column \"${String(state.columnId)}\" is not sortable`);\n }\n}\n\n/**\n * Pure toggle: does not read or write product data. The product still owns\n * actually re-sorting rows (Combobox's local/external filtering split is the\n * same boundary — HJM judges intent, never executes the data operation).\n */\nexport function getNextDataTableSortState<Key extends CollectionKey>(\n current: DataTableSortState<Key>,\n columnId: Key,\n cycle: DataTableSortCycle = dataTableDefaults.sortCycle,\n firstDirection: DataTableSortDirection = \"ascending\",\n): DataTableSortState<Key> {\n const second: DataTableSortDirection = firstDirection === \"ascending\" ? \"descending\" : \"ascending\";\n if (current === null || current.columnId !== columnId) {\n return { columnId, direction: firstDirection };\n }\n if (current.direction === firstDirection) {\n return { columnId, direction: second };\n }\n return cycle === \"three-state\" ? null : { columnId, direction: firstDirection };\n}\n\n/** The first direction a column's header applies, from `sortDescFirst`. */\nexport function dataTableFirstSortDirection(column: Pick<DataTableColumnDescriptor, \"sortDescFirst\">): DataTableSortDirection {\n return column.sortDescFirst ? \"descending\" : \"ascending\";\n}\n\nexport type DataTableSortValue = number | string | null | undefined;\n\n/**\n * Sort key for a displayed cell string: \"0.340\", \".340\", \"36 ⅓\", \"13.5억\", \"61.0%\" → numbers;\n * text such as \"7승0무3패\" or names stay strings; \"—\", \"-\" and \"\" are missing.\n */\nexport function toDataTableSortValue(value: unknown): DataTableSortValue {\n if (value === null || value === undefined) return null;\n if (typeof value === \"number\") return Number.isFinite(value) ? value : null;\n const text = String(value).trim();\n if (!text || text === \"—\" || text === \"-\" || text === \"–\") return null;\n // Two or more letters (any script) mean a label, not a number with a unit.\n if (/\\p{L}.*\\p{L}/u.test(text.replace(/[⅓⅔]/g, \"\"))) return text;\n const number = Number.parseFloat(text.replace(/[^0-9.+-]/g, \"\"));\n return Number.isFinite(number) ? number : text;\n}\n\n/**\n * Pure comparison: numbers numerically, strings with `localeCompare`, numbers before strings.\n * Missing values are not compared here; `sortDataTableRows` always sinks them.\n */\nexport function compareDataTableValues(a: Exclude<DataTableSortValue, null | undefined>, b: Exclude<DataTableSortValue, null | undefined>, locale?: string): number {\n if (typeof a === \"number\" && typeof b === \"number\") return a - b;\n if (typeof a === \"number\") return -1;\n if (typeof b === \"number\") return 1;\n return a.localeCompare(b, locale);\n}\n\n/**\n * Optional row-model helper (TanStack `getSortedRowModel` with `sortUndefined: \"last\"`): stable,\n * missing values always last in both directions. 1.20 left all sorting to products; Yajalal and\n * other stat tables reimplemented the same rules, so the shared helper exists now. Products with\n * server-side sorting keep calling `getNextDataTableSortState` only.\n */\nexport function sortDataTableRows<Row, Key extends CollectionKey>(\n rows: readonly Row[],\n sort: DataTableSortState<Key>,\n getValue: (row: Row, columnId: Key) => DataTableSortValue,\n options: Readonly<{ locale?: string }> = {},\n): Row[] {\n const indexed = rows.map((row, index) => ({ row, index }));\n if (!sort) return indexed.map(item => item.row);\n const sign = sort.direction === \"ascending\" ? 1 : -1;\n return indexed.sort((x, y) => {\n const a = getValue(x.row, sort.columnId), b = getValue(y.row, sort.columnId);\n const missingA = a === null || a === undefined, missingB = b === null || b === undefined;\n if (missingA || missingB) return missingA === missingB ? x.index - y.index : missingA ? 1 : -1;\n return sign * compareDataTableValues(a, b, options.locale) || x.index - y.index;\n }).map(item => item.row);\n}\n\n/** Leading pinned columns (only an unbroken run from the start is pinned). */\nexport function splitPinnedDataTableColumns<Column extends Pick<DataTableColumnDescriptor, \"pinned\">>(columns: readonly Column[]): Readonly<{ pinned: readonly Column[]; scrolling: readonly Column[] }> {\n let count = 0;\n while (count < columns.length && columns[count]!.pinned === \"start\") count++;\n return { pinned: columns.slice(0, count), scrolling: columns.slice(count) };\n}\n\n/** The whole table's row-loading status — the unmodified Collection base async contract. */\nexport type DataTableAsyncState = AsyncCollectionState;\n\nexport type DataTableDensity = \"compact\" | \"regular\";\n\n/**\n * Reuses `collectionItemContract`'s hover/selected/focus tokens instead of a\n * second set of row-interaction colors — Menu, Select, and DataTable rows\n * stay one visual vocabulary.\n */\nexport const dataTableRecipe = {\n slots: [\n \"root\",\n \"header\",\n \"headerCell\",\n \"sortButton\",\n \"sortIcon\",\n \"row\",\n \"cell\",\n \"selectionCell\",\n \"emptyState\",\n \"errorState\",\n ] as const,\n defaults: { density: \"regular\" },\n density: {\n compact: { paddingVertical: spacing.xs, paddingHorizontal: spacing.sm },\n regular: { paddingVertical: spacing.sm, paddingHorizontal: spacing.md },\n },\n header: {\n background: semanticColors.canvas,\n color: semanticColors.content.secondary,\n textVariant: \"label\",\n fontWeight: fontWeight.medium,\n borderBottom: semanticColors.border.default,\n },\n row: {\n borderBottom: semanticColors.border.subtle,\n hoverBackground: collectionItemContract.highlightedBackground,\n selectedBackground: collectionItemContract.selectedBackground,\n },\n cell: {\n color: semanticColors.content.body,\n textVariant: \"body\",\n },\n sortButton: {\n minTarget: control.minTouchTarget,\n color: semanticColors.content.secondary,\n activeColor: semanticColors.content.brand,\n },\n selectionCell: {\n width: control.minTouchTarget,\n },\n emptyState: {\n color: semanticColors.content.secondary,\n textVariant: \"body\",\n },\n errorState: {\n color: semanticColors.content.danger,\n textVariant: \"body\",\n },\n states: {\n focus: focusIndicatorContract,\n },\n} as const satisfies {\n slots: readonly [\n \"root\",\n \"header\",\n \"headerCell\",\n \"sortButton\",\n \"sortIcon\",\n \"row\",\n \"cell\",\n \"selectionCell\",\n \"emptyState\",\n \"errorState\",\n ];\n defaults: { density: DataTableDensity };\n density: Record<DataTableDensity, { paddingVertical: number; paddingHorizontal: number }>;\n header: {\n background: ColorReference;\n color: ColorReference;\n textVariant: TextVariant;\n fontWeight: FontWeightValue;\n borderBottom: ColorReference;\n };\n row: {\n borderBottom: ColorReference;\n hoverBackground: ColorReference;\n selectedBackground: ColorReference;\n };\n cell: { color: ColorReference; textVariant: TextVariant };\n sortButton: { minTarget: number; color: ColorReference; activeColor: ColorReference };\n selectionCell: { width: number };\n emptyState: { color: ColorReference; textVariant: TextVariant };\n errorState: { color: ColorReference; textVariant: TextVariant };\n states: { focus: typeof focusIndicatorContract };\n};\n\nexport const dataTableFamilyScenarios = [\n \"header-groups-span-contiguous-leaf-columns-and-pad-ungrouped-columns\",\n \"row-groups-insert-a-section-label-before-their-rows\",\n \"cell-tone-and-heat-are-product-decided-semantic-emphasis\",\n \"percentile-rank-flips-for-lower-is-better-stats-and-ties-take-the-midpoint\",\n \"bounded-height-tables-keep-the-header-fixed-while-the-body-scrolls\",\n \"line-score-pads-to-nine-periods-and-extends-for-extra-periods\",\n \"matrix-diagonal-is-a-blank-self-cell\",\n \"comparison-bars-favor-the-better-side-even-when-lower-is-better\",\n] as const;\n\n/**\n * No roving-tabindex grid keyboard navigation (arrow keys between cells):\n * no product using this contract has measured demand for full ARIA-grid\n * traversal, and it is a materially bigger accessibility surface than a\n * sortable header button plus native checkbox/radio tab stops.\n */\nexport const dataTableBehavior = {\n controlled: [\"selection\"],\n inputs: [\"columns\", \"rows\", \"sortState\", \"asyncState\"],\n events: [\"onSortChange\"],\n configuration: { sortCycle: [\"two-state\", \"three-state\"] },\n defaults: dataTableDefaults,\n stateAxes: {\n value: [\"selected\"],\n content: [\"idle\", \"loading\", \"loadingMore\", \"empty\", \"error\"],\n },\n web: {\n roles: [\"table\", \"row\", \"columnheader\", \"cell\", \"button\", \"checkbox\", \"radio\"],\n keyboard: [\"Tab\", \"Enter\", \"Space\"],\n focus: \"native\",\n },\n native: { roles: [\"button\", \"header\"], states: [\"selected\"], actions: [\"activate\"] },\n scenarios: [\n \"sort-desc-first-columns-start-descending-and-cycle-back\",\n \"missing-values-sink-to-the-bottom-in-both-directions\",\n \"pinned-start-columns-stay-visible-while-the-rest-scrolls\",\n \"row-selection-reuses-the-shared-collection-selection-model-unchanged\",\n \"select-all-reuses-the-shared-tri-state-checkbox-value\",\n \"async-state-reuses-the-shared-collection-async-state-unchanged\",\n \"sortable-header-is-a-button-inside-the-columnheader-not-the-header-itself\",\n \"sort-direction-values-pass-through-to-aria-sort-without-translation\",\n \"disabled-rows-are-excluded-from-select-all-accounting\",\n \"pagination-or-load-more-is-composed-beneath-the-table-not-owned-by-it\",\n \"row-expansion-is-not-owned-here-compose-the-disclosure-group-contract-per-row\",\n \"a-data-cell-exposes-at-most-one-focusable-control\",\n \"no-roving-tabindex-grid-navigation-is-implied\",\n ...dataTableFamilyScenarios,\n ],\n} as const satisfies BehaviorContract;\n\n/* ------------------------------------------------------------------------------------------------\n * Table family, 2026-10-14 (user request: research table libraries and absorb several table types).\n * Concepts re-derived, nothing vendored:\n * - column header groups (TanStack Table `getHeaderGroups`, AG Grid column groups),\n * - row groups with a section label and indented sub-rows (AG Grid row grouping, TanStack expanding),\n * - conditional cell tone and percentile heat (AG Grid `cellClassRules`/cellStyle heatmaps,\n * Baseball Savant percentile color: deeper red toward the best, deeper blue toward the worst),\n * - a vertically bounded body with a fixed header (react-native-sticky-table, CSS sticky headers),\n * - sports layouts that products kept hand-building: line score (period columns + totals, MLB/ESPN),\n * cross-table matrix (head-to-head records), and two-sided comparison rows (ESPN matchup).\n * ---------------------------------------------------------------------------------------------- */\n\n/** One header band above leaf columns. Columns not listed in any group get an empty placeholder cell. */\nexport type DataTableColumnGroup<Key extends CollectionKey = CollectionKey> = Readonly<{\n id: string;\n header: string;\n columns: readonly Key[];\n}>;\n\nexport type DataTableHeaderBand = Readonly<{ id: string; header: string | null; span: number; columnIds: readonly string[] }>;\n\n/**\n * Resolves group bands over the given (already pinned-split) column order. A group must cover a\n * contiguous run; columns outside every group become placeholder bands so leaf widths still line up.\n */\nexport function resolveDataTableHeaderBands<Key extends CollectionKey>(\n columns: readonly Pick<DataTableColumnDescriptor<Key>, \"id\">[],\n groups: readonly DataTableColumnGroup<Key>[],\n): DataTableHeaderBand[] {\n const owner = new Map<Key, DataTableColumnGroup<Key>>();\n for (const group of groups) {\n assertNonEmpty(group.id, \"column group id\");\n assertNonEmpty(group.header, `column group \"${group.id}\" header`);\n for (const id of group.columns) {\n if (owner.has(id)) throw new TypeError(`DataTable column \"${String(id)}\" belongs to two groups`);\n owner.set(id, group);\n }\n }\n const bands: { id: string; header: string | null; columnIds: string[] }[] = [];\n for (const column of columns) {\n const group = owner.get(column.id) ?? null;\n const last = bands.at(-1);\n if (group && last && last.id === group.id) { last.columnIds.push(column.id); continue; }\n if (group && bands.some((band) => band.id === group.id)) throw new TypeError(`DataTable column group \"${group.id}\" must be contiguous`);\n bands.push({ id: group ? group.id : `placeholder-${column.id}`, header: group ? group.header : null, columnIds: [column.id] });\n }\n return bands.map((band) => ({ ...band, span: band.columnIds.length }));\n}\n\n/** Labeled row section (e.g. 선발 / 교체, 동부 / 서부). Rows not in any group render first, ungrouped. */\nexport type DataTableRowGroup<Key extends CollectionKey = CollectionKey> = Readonly<{\n id: string;\n label: string;\n rows: readonly Key[];\n}>;\n\nexport type DataTableBodyItem<Key extends CollectionKey = CollectionKey> =\n | Readonly<{ kind: \"group\"; id: string; label: string }>\n | Readonly<{ kind: \"row\"; id: Key }>;\n\n/** Flattens rows + groups into the body order renderers draw. Unknown or duplicated ids throw. */\nexport function resolveDataTableBody<Key extends CollectionKey>(\n rows: readonly DataTableRowDescriptor<Key>[],\n groups: readonly DataTableRowGroup<Key>[] = [],\n): DataTableBodyItem<Key>[] {\n if (groups.length === 0) return rows.map((row) => ({ kind: \"row\", id: row.id }));\n const known = new Set(rows.map((row) => row.id)), placed = new Set<Key>();\n const grouped: DataTableBodyItem<Key>[] = [];\n for (const group of groups) {\n assertNonEmpty(group.id, \"row group id\");\n assertNonEmpty(group.label, `row group \"${group.id}\" label`);\n grouped.push({ kind: \"group\", id: group.id, label: group.label });\n for (const id of group.rows) {\n if (!known.has(id)) throw new TypeError(`DataTable row group \"${group.id}\" references unknown row id: ${String(id)}`);\n if (placed.has(id)) throw new TypeError(`DataTable row \"${String(id)}\" belongs to two row groups`);\n placed.add(id);\n grouped.push({ kind: \"row\", id });\n }\n }\n const loose: DataTableBodyItem<Key>[] = rows.filter((row) => !placed.has(row.id)).map((row) => ({ kind: \"row\", id: row.id }));\n return [...loose, ...grouped];\n}\n\n/**\n * Semantic cell emphasis, decided by the product per cell (AG Grid cellClassRules):\n * `leader` marks a league/table best, `positive`/`negative` a direction, `muted` a non-qualifying value.\n */\nexport type DataTableCellTone = \"leader\" | \"positive\" | \"negative\" | \"muted\";\n\n/** Percentile heat (Savant): `high` side toward the best values, `low` toward the worst; strength 1–3. */\nexport type DataTableCellHeat = Readonly<{ side: \"high\" | \"low\"; strength: 1 | 2 | 3 }>;\n\n/**\n * Percentile rank (0–100, best = 100) of `value` among `sample`. `lowerIsBetter` flips ERA-style stats.\n * Ties take the midpoint rank, missing values return null. A one-value sample is the 50th percentile.\n */\nexport function percentileRank(value: number | null | undefined, sample: readonly (number | null | undefined)[], options: Readonly<{ lowerIsBetter?: boolean }> = {}): number | null {\n if (value === null || value === undefined || !Number.isFinite(value)) return null;\n const values = sample.filter((item): item is number => item !== null && item !== undefined && Number.isFinite(item));\n if (values.length <= 1) return 50;\n let below = 0, equal = 0;\n for (const item of values) {\n const better = options.lowerIsBetter ? item > value : item < value;\n if (item === value) equal++;\n else if (better) below++;\n }\n return Math.round(((below + (equal - 1) / 2) / (values.length - 1)) * 100);\n}\n\n/** Maps a percentile to heat: ≥90/≥75/≥60 high, ≤10/≤25/≤40 low, the middle stays neutral (null). */\nexport function percentileHeat(percentile: number | null): DataTableCellHeat | null {\n if (percentile === null) return null;\n if (percentile >= 90) return { side: \"high\", strength: 3 };\n if (percentile >= 75) return { side: \"high\", strength: 2 };\n if (percentile >= 60) return { side: \"high\", strength: 1 };\n if (percentile <= 10) return { side: \"low\", strength: 3 };\n if (percentile <= 25) return { side: \"low\", strength: 2 };\n if (percentile <= 40) return { side: \"low\", strength: 1 };\n return null;\n}\n\nexport const dataTableFamilyRecipe = {\n /** Heat background alpha per strength, over the high/low base colors. */\n heatAlpha: { 1: 0.14, 2: 0.26, 3: 0.42 },\n heat: { high: themeColor(\"danger\"), low: accentColor(\"info\") },\n tone: {\n leader: { color: semanticColors.content.primary, fontWeight: fontWeight.medium },\n positive: { color: themeColor(\"danger\"), fontWeight: fontWeight.medium },\n negative: { color: accentColor(\"info\"), fontWeight: fontWeight.medium },\n muted: { color: semanticColors.content.tertiary, fontWeight: fontWeight.regular },\n },\n groupRow: { background: semanticColors.surface.sunken, color: semanticColors.content.secondary, textVariant: \"label\" as TextVariant },\n /** Indent per sub-row depth level (substitutes under a starter, players under a team). */\n depthIndent: spacing.md,\n headerBand: { color: semanticColors.content.secondary, borderBottom: semanticColors.border.subtle },\n /**\n * Live period (LineScore) and \"my team\" row (MatrixTable). These tables sit on the surface tone, where DataTable's\n * canvas-colored selected row read as a white gap that split the table (2026-10-17 review E17).\n */\n highlight: { background: semanticColors.surface.brand },\n} as const;\n\n/* ---------------------------------------------- Line score ------------------------------------- */\n\nexport type LineScoreTeam = Readonly<{\n id: string;\n name: string;\n /** Runs per period; null = not played yet, \"X\" = home team did not bat in the last inning. */\n periods: readonly (number | \"X\" | null)[];\n /** Totals in display order, e.g. { R: 5, H: 9, E: 0, B: 4 }. */\n totals: Readonly<Record<string, number | null>>;\n}>;\n\nexport type LineScoreColumn = Readonly<{ id: string; header: string; kind: \"period\" | \"total\" }>;\n\n/**\n * Period columns are padded to `minPeriods` (9 innings) and extend for extra innings; totals follow.\n * The current period (live game) is reported so renderers can highlight it.\n */\nexport function resolveLineScore(teams: readonly LineScoreTeam[], options: Readonly<{ minPeriods?: number; totals: readonly string[]; currentPeriod?: number | null }>): Readonly<{ columns: LineScoreColumn[]; currentPeriod: number | null; leaderId: string | null }> {\n if (teams.length < 2) throw new TypeError(\"LineScore needs at least two teams\");\n const ids = new Set<string>();\n for (const team of teams) {\n assertNonEmpty(team.id, \"line score team id\");\n if (ids.has(team.id)) throw new TypeError(`Duplicate LineScore team id: ${team.id}`);\n ids.add(team.id);\n }\n const played = Math.max(...teams.map((team) => team.periods.length));\n const count = Math.max(options.minPeriods ?? 9, played);\n const columns: LineScoreColumn[] = Array.from({ length: count }, (_, i) => ({ id: `p${i + 1}`, header: String(i + 1), kind: \"period\" }));\n for (const total of options.totals) columns.push({ id: `t-${total}`, header: total, kind: \"total\" });\n const runs = options.totals[0];\n let leaderId: string | null = null;\n if (runs) {\n const scores = teams.map((team) => ({ id: team.id, value: team.totals[runs] ?? null }));\n const best = Math.max(...scores.map((score) => score.value ?? -Infinity));\n const leaders = scores.filter((score) => score.value === best && Number.isFinite(best));\n leaderId = leaders.length === 1 ? leaders[0]!.id : null;\n }\n const current = options.currentPeriod ?? null;\n return { columns, currentPeriod: current !== null && current >= 1 && current <= count ? current : null, leaderId };\n}\n\nexport function formatLineScoreCell(value: number | \"X\" | null | undefined): string {\n return value === null || value === undefined ? \"\" : String(value);\n}\n\n/* ---------------------------------------------- Matrix table ----------------------------------- */\n\nexport type MatrixCell = Readonly<{ label: string; tone?: DataTableCellTone | null; heat?: DataTableCellHeat | null }>;\n\n/**\n * Square cross table (team × team head-to-head). Rows and columns share one id list; the diagonal is\n * a self cell and renders blank. `getCell(row, column)` returns null for no record.\n */\nexport function resolveMatrix<Key extends string>(ids: readonly Key[], getCell: (row: Key, column: Key) => MatrixCell | null): readonly (readonly (MatrixCell | \"self\" | null)[])[] {\n if (new Set(ids).size !== ids.length) throw new TypeError(\"Matrix ids must be unique\");\n return ids.map((row) => ids.map((column) => (row === column ? \"self\" : getCell(row, column))));\n}\n\n/* ---------------------------------------------- Comparison table ------------------------------- */\n\nexport type ComparisonRow = Readonly<{\n id: string;\n label: string;\n values: readonly [number | null, number | null];\n /** Display strings; defaults to String(value). */\n display?: readonly [string, string];\n lowerIsBetter?: boolean;\n}>;\n\n/** Which side wins a row (null on ties/missing), and each side's bar share of the pair (0–1). */\nexport function resolveComparisonRow(row: ComparisonRow): Readonly<{ winner: 0 | 1 | null; shares: readonly [number, number] }> {\n const [a, b] = row.values;\n if (a === null || b === null || !Number.isFinite(a) || !Number.isFinite(b)) return { winner: null, shares: [a === null ? 0 : 0.5, b === null ? 0 : 0.5] };\n const winner = a === b ? null : (row.lowerIsBetter ? a < b : a > b) ? 0 : 1;\n // Lower-is-better rows invert the magnitudes so the better side still draws the longer bar.\n const left = Math.abs(row.lowerIsBetter ? b : a), right = Math.abs(row.lowerIsBetter ? a : b), sum = left + right;\n return { winner, shares: sum === 0 ? [0.5, 0.5] : [left / sum, right / sum] };\n}\n\n"]}
1
+ {"version":3,"file":"data-table.js","sourceRoot":"","sources":["../src/data-table.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,UAAU,EAAuB,MAAM,uBAAuB,CAAC;AAQrF,OAAO,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAC1F,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,OAAO,EAA0C,MAAM,kBAAkB,CAAC;AACxG,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAwBtD,MAAM,CAAC,MAAM,uBAAuB,GAAG;IACrC,KAAK,EAAE,OAAO;IACd,QAAQ,EAAE,KAAK;CAC0D,CAAC;AAE5E,SAAS,cAAc,CAAC,KAAa,EAAE,KAAa;IAClD,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,IAAI,EAAE,CAAC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GAAG,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,GAAG,GAAG,IAAI,GAAG,KAAK,CAAC;IAClH,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,GAAG,GAAG,EAAE,KAAK,GAAG,GAAG,CAAC,EAAE,CAAC;AAChF,CAAC","sourcesContent":["import { accentColor, themeColor, type ColorReference } from \"./color-references.js\";\nimport type {\n AsyncCollectionState,\n BehaviorContract,\n CheckboxState,\n CollectionKey,\n CollectionSelectionModel,\n} from \"./behaviors.js\";\nimport { collectionItemContract, focusIndicatorContract } from \"./component-contracts.js\";\nimport { control, fontWeight, spacing, type FontWeightValue, type TextVariant } from \"./foundations.js\";\nimport { semanticColors } from \"./semantic-colors.js\";\n\nexport type DataTableAlign = \"start\" | \"center\" | \"end\";\n\nexport type DataTableColumnDescriptor<Key extends CollectionKey = CollectionKey> = Readonly<{\n id: Key;\n /** Visible column header text; also the columnheader's accessible name. */\n header: string;\n align?: DataTableAlign;\n sortable?: boolean;\n /** Layout hint only (px or flex-basis); renderers may ignore or clamp it. */\n width?: number;\n /**\n * First press sorts descending (TanStack Table `sortDescFirst`). Stat tables read \"highest first\";\n * lower-is-better columns (ERA, rank) leave it false. Added 2026-10-14 with the Native renderer.\n */\n sortDescFirst?: boolean;\n /**\n * Keeps the column visible while the others scroll horizontally (AG Grid / TanStack column\n * pinning, start edge only). Only a leading run of pinned columns is honored.\n */\n pinned?: \"start\";\n}>;\n\nexport const dataTableColumnDefaults = {\n align: \"start\",\n sortable: false,\n} as const satisfies Readonly<{ align: DataTableAlign; sortable: boolean }>;\n\nfunction assertNonEmpty(value: string, field: string): void {\n if (typeof value !== \"string\" || value.trim().length === 0) {\n throw new TypeError(`DataTable ${field} must not be empty`);\n }\n}\n\nexport function validateDataTableColumns<Key extends CollectionKey>(\n columns: readonly DataTableColumnDescriptor<Key>[],\n): void {\n if (columns.length === 0) {\n throw new TypeError(\"DataTable must declare at least one column\");\n }\n const ids = new Set<Key>();\n for (const column of columns) {\n assertNonEmpty(column.id, \"column id\");\n if (ids.has(column.id)) {\n throw new TypeError(`Duplicate DataTable column id: ${column.id}`);\n }\n ids.add(column.id);\n assertNonEmpty(column.header, `column \"${column.id}\" header`);\n if (column.width !== undefined && (!Number.isFinite(column.width) || column.width <= 0)) {\n throw new RangeError(`DataTable column \"${column.id}\" width must be a positive finite number`);\n }\n }\n}\n\n/**\n * Row identity and selection deliberately do NOT reuse `CollectionItemDescriptor`\n * verbatim: a table row has no single visible `label`/`textValue` the way a\n * Menu or Select item does — its \"content\" is however many columns the\n * product renders per row. Only the parts of the Collection base contract\n * that are genuinely row-shaped (`CollectionKey` identity, `disabled`) apply.\n */\nexport type DataTableRowDescriptor<Key extends CollectionKey = CollectionKey> = Readonly<{\n id: Key;\n disabled?: boolean;\n /** Sub-row nesting (TanStack `depth`): 1 indents a substitute under a starter. 0–3. */\n depth?: number;\n}>;\n\nexport function validateDataTableRows<Key extends CollectionKey>(\n rows: readonly DataTableRowDescriptor<Key>[],\n): void {\n const ids = new Set<Key>();\n for (const row of rows) {\n assertNonEmpty(row.id, \"row id\");\n if (ids.has(row.id)) {\n throw new TypeError(`Duplicate DataTable row id: ${row.id}`);\n }\n ids.add(row.id);\n if (row.depth !== undefined && (!Number.isInteger(row.depth) || row.depth < 0 || row.depth > 3)) {\n throw new RangeError(`DataTable row \"${String(row.id)}\" depth must be an integer from 0 to 3`);\n }\n }\n}\n\n/** Row selection is the unmodified Collection base contract — no DataTable-only selection shape. */\nexport type DataTableSelection<Key extends CollectionKey = CollectionKey> =\n CollectionSelectionModel<Key>;\n\n/**\n * Header \"select all\" state as the same tri-state `CheckboxState` the\n * selection column's checkbox already renders (check/dash), instead of a new\n * `\"none\" | \"some\" | \"all\"` enum the recipe would have to translate again.\n * Disabled rows are excluded from both the denominator and the count.\n */\nexport function resolveDataTableSelectAllState<Key extends CollectionKey>(\n rows: readonly DataTableRowDescriptor<Key>[],\n selectedKeys: ReadonlySet<Key>,\n): CheckboxState {\n const selectable = rows.filter((row) => !row.disabled);\n if (selectable.length === 0) return false;\n const selectedCount = selectable.filter((row) => selectedKeys.has(row.id)).length;\n if (selectedCount === 0) return false;\n if (selectedCount === selectable.length) return true;\n return \"mixed\";\n}\n\n/**\n * Values are the literal `aria-sort` vocabulary (minus `\"none\"`, which is\n * `null`) so the Web renderer passes them through without a translation\n * table — the same \"pass the platform value through\" choice Slider makes\n * for `valueText`.\n */\nexport type DataTableSortDirection = \"ascending\" | \"descending\";\n\nexport type DataTableSortState<Key extends CollectionKey = CollectionKey> = Readonly<{\n columnId: Key;\n direction: DataTableSortDirection;\n}> | null;\n\nexport type DataTableSortCycle = \"two-state\" | \"three-state\";\n\nexport const dataTableDefaults = {\n sortCycle: \"three-state\",\n} as const satisfies Readonly<{ sortCycle: DataTableSortCycle }>;\n\nexport function validateDataTableSortState<Key extends CollectionKey>(\n state: DataTableSortState<Key>,\n columns: readonly DataTableColumnDescriptor<Key>[],\n): void {\n if (state === null) return;\n if (state.direction !== \"ascending\" && state.direction !== \"descending\") {\n throw new TypeError(`Unsupported DataTable sort direction: ${String(state.direction)}`);\n }\n const column = columns.find((candidate) => candidate.id === state.columnId);\n if (!column) {\n throw new TypeError(`DataTable sort references unknown column id: ${String(state.columnId)}`);\n }\n if (!column.sortable) {\n throw new TypeError(`DataTable column \"${String(state.columnId)}\" is not sortable`);\n }\n}\n\n/**\n * Pure toggle: does not read or write product data. The product still owns\n * actually re-sorting rows (Combobox's local/external filtering split is the\n * same boundary — HJM judges intent, never executes the data operation).\n */\nexport function getNextDataTableSortState<Key extends CollectionKey>(\n current: DataTableSortState<Key>,\n columnId: Key,\n cycle: DataTableSortCycle = dataTableDefaults.sortCycle,\n firstDirection: DataTableSortDirection = \"ascending\",\n): DataTableSortState<Key> {\n const second: DataTableSortDirection = firstDirection === \"ascending\" ? \"descending\" : \"ascending\";\n if (current === null || current.columnId !== columnId) {\n return { columnId, direction: firstDirection };\n }\n if (current.direction === firstDirection) {\n return { columnId, direction: second };\n }\n return cycle === \"three-state\" ? null : { columnId, direction: firstDirection };\n}\n\n/** The first direction a column's header applies, from `sortDescFirst`. */\nexport function dataTableFirstSortDirection(column: Pick<DataTableColumnDescriptor, \"sortDescFirst\">): DataTableSortDirection {\n return column.sortDescFirst ? \"descending\" : \"ascending\";\n}\n\nexport type DataTableSortValue = number | string | null | undefined;\n\n/**\n * Sort key for a displayed cell string: \"0.340\", \".340\", \"36 ⅓\", \"13.5억\", \"61.0%\" → numbers;\n * text such as \"7승0무3패\" or names stay strings; \"—\", \"-\" and \"\" are missing.\n */\nexport function toDataTableSortValue(value: unknown): DataTableSortValue {\n if (value === null || value === undefined) return null;\n if (typeof value === \"number\") return Number.isFinite(value) ? value : null;\n const text = String(value).trim();\n if (!text || text === \"—\" || text === \"-\" || text === \"–\") return null;\n // Two or more letters (any script) mean a label, not a number with a unit.\n if (/\\p{L}.*\\p{L}/u.test(text.replace(/[⅓⅔]/g, \"\"))) return text;\n const number = Number.parseFloat(text.replace(/[^0-9.+-]/g, \"\"));\n return Number.isFinite(number) ? number : text;\n}\n\n/**\n * Pure comparison: numbers numerically, strings with `localeCompare`, numbers before strings.\n * Missing values are not compared here; `sortDataTableRows` always sinks them.\n */\nexport function compareDataTableValues(a: Exclude<DataTableSortValue, null | undefined>, b: Exclude<DataTableSortValue, null | undefined>, locale?: string): number {\n if (typeof a === \"number\" && typeof b === \"number\") return a - b;\n if (typeof a === \"number\") return -1;\n if (typeof b === \"number\") return 1;\n return a.localeCompare(b, locale);\n}\n\n/**\n * Optional row-model helper (TanStack `getSortedRowModel` with `sortUndefined: \"last\"`): stable,\n * missing values always last in both directions. 1.20 left all sorting to products; Yajalal and\n * other stat tables reimplemented the same rules, so the shared helper exists now. Products with\n * server-side sorting keep calling `getNextDataTableSortState` only.\n */\nexport function sortDataTableRows<Row, Key extends CollectionKey>(\n rows: readonly Row[],\n sort: DataTableSortState<Key>,\n getValue: (row: Row, columnId: Key) => DataTableSortValue,\n options: Readonly<{ locale?: string }> = {},\n): Row[] {\n const indexed = rows.map((row, index) => ({ row, index }));\n if (!sort) return indexed.map(item => item.row);\n const sign = sort.direction === \"ascending\" ? 1 : -1;\n return indexed.sort((x, y) => {\n const a = getValue(x.row, sort.columnId), b = getValue(y.row, sort.columnId);\n const missingA = a === null || a === undefined, missingB = b === null || b === undefined;\n if (missingA || missingB) return missingA === missingB ? x.index - y.index : missingA ? 1 : -1;\n return sign * compareDataTableValues(a, b, options.locale) || x.index - y.index;\n }).map(item => item.row);\n}\n\n/** Leading pinned columns (only an unbroken run from the start is pinned). */\nexport function splitPinnedDataTableColumns<Column extends Pick<DataTableColumnDescriptor, \"pinned\">>(columns: readonly Column[]): Readonly<{ pinned: readonly Column[]; scrolling: readonly Column[] }> {\n let count = 0;\n while (count < columns.length && columns[count]!.pinned === \"start\") count++;\n return { pinned: columns.slice(0, count), scrolling: columns.slice(count) };\n}\n\n/** The whole table's row-loading status — the unmodified Collection base async contract. */\nexport type DataTableAsyncState = AsyncCollectionState;\n\nexport type DataTableDensity = \"compact\" | \"regular\";\n\n/**\n * Reuses `collectionItemContract`'s hover/selected/focus tokens instead of a\n * second set of row-interaction colors — Menu, Select, and DataTable rows\n * stay one visual vocabulary.\n */\nexport const dataTableRecipe = {\n slots: [\n \"root\",\n \"header\",\n \"headerCell\",\n \"sortButton\",\n \"sortIcon\",\n \"row\",\n \"cell\",\n \"selectionCell\",\n \"emptyState\",\n \"errorState\",\n ] as const,\n defaults: { density: \"regular\" },\n density: {\n compact: { paddingVertical: spacing.xs, paddingHorizontal: spacing.sm },\n regular: { paddingVertical: spacing.sm, paddingHorizontal: spacing.md },\n },\n header: {\n background: semanticColors.canvas,\n color: semanticColors.content.secondary,\n textVariant: \"label\",\n fontWeight: fontWeight.medium,\n borderBottom: semanticColors.border.default,\n },\n row: {\n borderBottom: semanticColors.border.subtle,\n hoverBackground: collectionItemContract.highlightedBackground,\n selectedBackground: collectionItemContract.selectedBackground,\n },\n cell: {\n color: semanticColors.content.body,\n textVariant: \"body\",\n },\n sortButton: {\n minTarget: control.minTouchTarget,\n color: semanticColors.content.secondary,\n activeColor: semanticColors.content.brand,\n },\n selectionCell: {\n width: control.minTouchTarget,\n },\n emptyState: {\n color: semanticColors.content.secondary,\n textVariant: \"body\",\n },\n errorState: {\n color: semanticColors.content.danger,\n textVariant: \"body\",\n },\n states: {\n focus: focusIndicatorContract,\n },\n} as const satisfies {\n slots: readonly [\n \"root\",\n \"header\",\n \"headerCell\",\n \"sortButton\",\n \"sortIcon\",\n \"row\",\n \"cell\",\n \"selectionCell\",\n \"emptyState\",\n \"errorState\",\n ];\n defaults: { density: DataTableDensity };\n density: Record<DataTableDensity, { paddingVertical: number; paddingHorizontal: number }>;\n header: {\n background: ColorReference;\n color: ColorReference;\n textVariant: TextVariant;\n fontWeight: FontWeightValue;\n borderBottom: ColorReference;\n };\n row: {\n borderBottom: ColorReference;\n hoverBackground: ColorReference;\n selectedBackground: ColorReference;\n };\n cell: { color: ColorReference; textVariant: TextVariant };\n sortButton: { minTarget: number; color: ColorReference; activeColor: ColorReference };\n selectionCell: { width: number };\n emptyState: { color: ColorReference; textVariant: TextVariant };\n errorState: { color: ColorReference; textVariant: TextVariant };\n states: { focus: typeof focusIndicatorContract };\n};\n\nexport const dataTableFamilyScenarios = [\n \"header-groups-span-contiguous-leaf-columns-and-pad-ungrouped-columns\",\n \"row-groups-insert-a-section-label-before-their-rows\",\n \"cell-tone-and-heat-are-product-decided-semantic-emphasis\",\n \"percentile-rank-flips-for-lower-is-better-stats-and-ties-take-the-midpoint\",\n \"bounded-height-tables-keep-the-header-fixed-while-the-body-scrolls\",\n \"line-score-pads-to-nine-periods-and-extends-for-extra-periods\",\n \"matrix-diagonal-is-a-blank-self-cell\",\n \"comparison-bars-favor-the-better-side-even-when-lower-is-better\",\n] as const;\n\n/**\n * No roving-tabindex grid keyboard navigation (arrow keys between cells):\n * no product using this contract has measured demand for full ARIA-grid\n * traversal, and it is a materially bigger accessibility surface than a\n * sortable header button plus native checkbox/radio tab stops.\n */\nexport const dataTableBehavior = {\n controlled: [\"selection\"],\n inputs: [\"columns\", \"rows\", \"sortState\", \"asyncState\"],\n events: [\"onSortChange\"],\n configuration: { sortCycle: [\"two-state\", \"three-state\"] },\n defaults: dataTableDefaults,\n stateAxes: {\n value: [\"selected\"],\n content: [\"idle\", \"loading\", \"loadingMore\", \"empty\", \"error\"],\n },\n web: {\n roles: [\"table\", \"row\", \"columnheader\", \"cell\", \"button\", \"checkbox\", \"radio\"],\n keyboard: [\"Tab\", \"Enter\", \"Space\"],\n focus: \"native\",\n },\n native: { roles: [\"button\", \"header\"], states: [\"selected\"], actions: [\"activate\"] },\n scenarios: [\n \"sort-desc-first-columns-start-descending-and-cycle-back\",\n \"missing-values-sink-to-the-bottom-in-both-directions\",\n \"pinned-start-columns-stay-visible-while-the-rest-scrolls\",\n \"row-selection-reuses-the-shared-collection-selection-model-unchanged\",\n \"select-all-reuses-the-shared-tri-state-checkbox-value\",\n \"async-state-reuses-the-shared-collection-async-state-unchanged\",\n \"sortable-header-is-a-button-inside-the-columnheader-not-the-header-itself\",\n \"sort-direction-values-pass-through-to-aria-sort-without-translation\",\n \"disabled-rows-are-excluded-from-select-all-accounting\",\n \"pagination-or-load-more-is-composed-beneath-the-table-not-owned-by-it\",\n \"row-expansion-is-not-owned-here-compose-the-disclosure-group-contract-per-row\",\n \"a-data-cell-exposes-at-most-one-focusable-control\",\n \"no-roving-tabindex-grid-navigation-is-implied\",\n ...dataTableFamilyScenarios,\n ],\n} as const satisfies BehaviorContract;\n\n/* ------------------------------------------------------------------------------------------------\n * Table family, 2026-10-14 (user request: research table libraries and absorb several table types).\n * Concepts re-derived, nothing vendored:\n * - column header groups (TanStack Table `getHeaderGroups`, AG Grid column groups),\n * - row groups with a section label and indented sub-rows (AG Grid row grouping, TanStack expanding),\n * - conditional cell tone and percentile heat (AG Grid `cellClassRules`/cellStyle heatmaps,\n * Baseball Savant percentile color: deeper red toward the best, deeper blue toward the worst),\n * - a vertically bounded body with a fixed header (react-native-sticky-table, CSS sticky headers),\n * - sports layouts that products kept hand-building: line score (period columns + totals, MLB/ESPN),\n * cross-table matrix (head-to-head records), and two-sided comparison rows (ESPN matchup).\n * ---------------------------------------------------------------------------------------------- */\n\n/** One header band above leaf columns. Columns not listed in any group get an empty placeholder cell. */\nexport type DataTableColumnGroup<Key extends CollectionKey = CollectionKey> = Readonly<{\n id: string;\n header: string;\n columns: readonly Key[];\n}>;\n\nexport type DataTableHeaderBand = Readonly<{ id: string; header: string | null; span: number; columnIds: readonly string[] }>;\n\n/**\n * Resolves group bands over the given (already pinned-split) column order. A group must cover a\n * contiguous run; columns outside every group become placeholder bands so leaf widths still line up.\n */\nexport function resolveDataTableHeaderBands<Key extends CollectionKey>(\n columns: readonly Pick<DataTableColumnDescriptor<Key>, \"id\">[],\n groups: readonly DataTableColumnGroup<Key>[],\n): DataTableHeaderBand[] {\n const owner = new Map<Key, DataTableColumnGroup<Key>>();\n for (const group of groups) {\n assertNonEmpty(group.id, \"column group id\");\n assertNonEmpty(group.header, `column group \"${group.id}\" header`);\n for (const id of group.columns) {\n if (owner.has(id)) throw new TypeError(`DataTable column \"${String(id)}\" belongs to two groups`);\n owner.set(id, group);\n }\n }\n const bands: { id: string; header: string | null; columnIds: string[] }[] = [];\n for (const column of columns) {\n const group = owner.get(column.id) ?? null;\n const last = bands.at(-1);\n if (group && last && last.id === group.id) { last.columnIds.push(column.id); continue; }\n if (group && bands.some((band) => band.id === group.id)) throw new TypeError(`DataTable column group \"${group.id}\" must be contiguous`);\n bands.push({ id: group ? group.id : `placeholder-${column.id}`, header: group ? group.header : null, columnIds: [column.id] });\n }\n return bands.map((band) => ({ ...band, span: band.columnIds.length }));\n}\n\n/** Labeled row section (e.g. 선발 / 교체, 동부 / 서부). Rows not in any group render first, ungrouped. */\nexport type DataTableRowGroup<Key extends CollectionKey = CollectionKey> = Readonly<{\n id: string;\n label: string;\n rows: readonly Key[];\n}>;\n\nexport type DataTableBodyItem<Key extends CollectionKey = CollectionKey> =\n | Readonly<{ kind: \"group\"; id: string; label: string }>\n | Readonly<{ kind: \"row\"; id: Key }>;\n\n/** Flattens rows + groups into the body order renderers draw. Unknown or duplicated ids throw. */\nexport function resolveDataTableBody<Key extends CollectionKey>(\n rows: readonly DataTableRowDescriptor<Key>[],\n groups: readonly DataTableRowGroup<Key>[] = [],\n): DataTableBodyItem<Key>[] {\n if (groups.length === 0) return rows.map((row) => ({ kind: \"row\", id: row.id }));\n const known = new Set(rows.map((row) => row.id)), placed = new Set<Key>();\n const grouped: DataTableBodyItem<Key>[] = [];\n for (const group of groups) {\n assertNonEmpty(group.id, \"row group id\");\n assertNonEmpty(group.label, `row group \"${group.id}\" label`);\n grouped.push({ kind: \"group\", id: group.id, label: group.label });\n for (const id of group.rows) {\n if (!known.has(id)) throw new TypeError(`DataTable row group \"${group.id}\" references unknown row id: ${String(id)}`);\n if (placed.has(id)) throw new TypeError(`DataTable row \"${String(id)}\" belongs to two row groups`);\n placed.add(id);\n grouped.push({ kind: \"row\", id });\n }\n }\n const loose: DataTableBodyItem<Key>[] = rows.filter((row) => !placed.has(row.id)).map((row) => ({ kind: \"row\", id: row.id }));\n return [...loose, ...grouped];\n}\n\n/**\n * Semantic cell emphasis, decided by the product per cell (AG Grid cellClassRules):\n * `leader` marks a league/table best, `positive`/`negative` a direction, `muted` a non-qualifying value.\n */\nexport type DataTableCellTone = \"leader\" | \"positive\" | \"negative\" | \"muted\";\n\n/** Percentile heat (Savant): `high` side toward the best values, `low` toward the worst; strength 1–3. */\nexport type DataTableCellHeat = Readonly<{ side: \"high\" | \"low\"; strength: 1 | 2 | 3 }>;\n\n/**\n * Percentile rank (0–100, best = 100) of `value` among `sample`. `lowerIsBetter` flips ERA-style stats.\n * Ties take the midpoint rank, missing values return null. A one-value sample is the 50th percentile.\n */\nexport function percentileRank(value: number | null | undefined, sample: readonly (number | null | undefined)[], options: Readonly<{ lowerIsBetter?: boolean }> = {}): number | null {\n if (value === null || value === undefined || !Number.isFinite(value)) return null;\n const values = sample.filter((item): item is number => item !== null && item !== undefined && Number.isFinite(item));\n if (values.length <= 1) return 50;\n let below = 0, equal = 0;\n for (const item of values) {\n const better = options.lowerIsBetter ? item > value : item < value;\n if (item === value) equal++;\n else if (better) below++;\n }\n return Math.round(((below + (equal - 1) / 2) / (values.length - 1)) * 100);\n}\n\n/** Maps a percentile to heat: ≥90/≥75/≥60 high, ≤10/≤25/≤40 low, the middle stays neutral (null). */\nexport function percentileHeat(percentile: number | null): DataTableCellHeat | null {\n if (percentile === null) return null;\n if (percentile >= 90) return { side: \"high\", strength: 3 };\n if (percentile >= 75) return { side: \"high\", strength: 2 };\n if (percentile >= 60) return { side: \"high\", strength: 1 };\n if (percentile <= 10) return { side: \"low\", strength: 3 };\n if (percentile <= 25) return { side: \"low\", strength: 2 };\n if (percentile <= 40) return { side: \"low\", strength: 1 };\n return null;\n}\n\nexport const dataTableFamilyRecipe = {\n /** Heat background alpha per strength, over the high/low base colors. */\n heatAlpha: { 1: 0.14, 2: 0.26, 3: 0.42 },\n heat: { high: themeColor(\"danger\"), low: accentColor(\"info\") },\n tone: {\n leader: { color: semanticColors.content.primary, fontWeight: fontWeight.medium },\n positive: { color: themeColor(\"danger\"), fontWeight: fontWeight.medium },\n negative: { color: accentColor(\"info\"), fontWeight: fontWeight.medium },\n muted: { color: semanticColors.content.tertiary, fontWeight: fontWeight.regular },\n },\n groupRow: { background: semanticColors.surface.sunken, color: semanticColors.content.secondary, textVariant: \"label\" as TextVariant },\n /** Indent per sub-row depth level (substitutes under a starter, players under a team). */\n depthIndent: spacing.md,\n headerBand: { color: semanticColors.content.secondary, borderBottom: semanticColors.border.subtle },\n /**\n * Live period (LineScore) and \"my team\" row (MatrixTable). These tables sit on the surface tone, where DataTable's\n * canvas-colored selected row read as a white gap that split the table (2026-10-17 review E17).\n */\n highlight: { background: semanticColors.surface.brand },\n // 2026-10-26: current inning follows category selection; my-team emphasis retains its brand role.\n currentPeriod: { background: semanticColors.selection.background, color: semanticColors.selection.content },\n} as const;\n\n/* ---------------------------------------------- Line score ------------------------------------- */\n\nexport type LineScoreTeam = Readonly<{\n id: string;\n name: string;\n /** Runs per period; null = not played yet, \"X\" = home team did not bat in the last inning. */\n periods: readonly (number | \"X\" | null)[];\n /** Totals in display order, e.g. { R: 5, H: 9, E: 0, B: 4 }. */\n totals: Readonly<Record<string, number | null>>;\n}>;\n\nexport type LineScoreColumn = Readonly<{ id: string; header: string; kind: \"period\" | \"total\" }>;\n\n/**\n * Period columns are padded to `minPeriods` (9 innings) and extend for extra innings; totals follow.\n * The current period (live game) is reported so renderers can highlight it.\n */\nexport function resolveLineScore(teams: readonly LineScoreTeam[], options: Readonly<{ minPeriods?: number; totals: readonly string[]; currentPeriod?: number | null }>): Readonly<{ columns: LineScoreColumn[]; currentPeriod: number | null; leaderId: string | null }> {\n if (teams.length < 2) throw new TypeError(\"LineScore needs at least two teams\");\n const ids = new Set<string>();\n for (const team of teams) {\n assertNonEmpty(team.id, \"line score team id\");\n if (ids.has(team.id)) throw new TypeError(`Duplicate LineScore team id: ${team.id}`);\n ids.add(team.id);\n }\n const played = Math.max(...teams.map((team) => team.periods.length));\n const count = Math.max(options.minPeriods ?? 9, played);\n const columns: LineScoreColumn[] = Array.from({ length: count }, (_, i) => ({ id: `p${i + 1}`, header: String(i + 1), kind: \"period\" }));\n for (const total of options.totals) columns.push({ id: `t-${total}`, header: total, kind: \"total\" });\n const runs = options.totals[0];\n let leaderId: string | null = null;\n if (runs) {\n const scores = teams.map((team) => ({ id: team.id, value: team.totals[runs] ?? null }));\n const best = Math.max(...scores.map((score) => score.value ?? -Infinity));\n const leaders = scores.filter((score) => score.value === best && Number.isFinite(best));\n leaderId = leaders.length === 1 ? leaders[0]!.id : null;\n }\n const current = options.currentPeriod ?? null;\n return { columns, currentPeriod: current !== null && current >= 1 && current <= count ? current : null, leaderId };\n}\n\nexport function formatLineScoreCell(value: number | \"X\" | null | undefined): string {\n return value === null || value === undefined ? \"\" : String(value);\n}\n\n/* ---------------------------------------------- Matrix table ----------------------------------- */\n\nexport type MatrixCell = Readonly<{ label: string; tone?: DataTableCellTone | null; heat?: DataTableCellHeat | null }>;\n\n/**\n * Square cross table (team × team head-to-head). Rows and columns share one id list; the diagonal is\n * a self cell and renders blank. `getCell(row, column)` returns null for no record.\n */\nexport function resolveMatrix<Key extends string>(ids: readonly Key[], getCell: (row: Key, column: Key) => MatrixCell | null): readonly (readonly (MatrixCell | \"self\" | null)[])[] {\n if (new Set(ids).size !== ids.length) throw new TypeError(\"Matrix ids must be unique\");\n return ids.map((row) => ids.map((column) => (row === column ? \"self\" : getCell(row, column))));\n}\n\n/* ---------------------------------------------- Comparison table ------------------------------- */\n\nexport type ComparisonRow = Readonly<{\n id: string;\n label: string;\n values: readonly [number | null, number | null];\n /** Display strings; defaults to String(value). */\n display?: readonly [string, string];\n lowerIsBetter?: boolean;\n}>;\n\n/** Which side wins a row (null on ties/missing), and each side's bar share of the pair (0–1). */\nexport function resolveComparisonRow(row: ComparisonRow): Readonly<{ winner: 0 | 1 | null; shares: readonly [number, number] }> {\n const [a, b] = row.values;\n if (a === null || b === null || !Number.isFinite(a) || !Number.isFinite(b)) return { winner: null, shares: [a === null ? 0 : 0.5, b === null ? 0 : 0.5] };\n const winner = a === b ? null : (row.lowerIsBetter ? a < b : a > b) ? 0 : 1;\n // Lower-is-better rows invert the magnitudes so the better side still draws the longer bar.\n const left = Math.abs(row.lowerIsBetter ? b : a), right = Math.abs(row.lowerIsBetter ? a : b), sum = left + right;\n return { winner, shares: sum === 0 ? [0.5, 0.5] : [left / sum, right / sum] };\n}\n\n"]}
@@ -0,0 +1,115 @@
1
+ import { type ImageChoiceItemDescriptor } from "./image-choice.js";
2
+ /**
3
+ * Sharing one link (2026-10-26 user request "번뚝 공유 그대로 공통화"): BurnTok's Web and Native share sheets are the
4
+ * reference. One Sheet offers in-app recipients (optional) plus two external actions — copy link and the OS share
5
+ * sheet. The product owns the link, the recipient data and the delivery; HJM owns the layout, selection, in-flight
6
+ * guards and the honest feedback (the OS share sheet only proves it opened, never that anything was delivered).
7
+ */
8
+ export type ShareSheetRecipientDescriptor = ImageChoiceItemDescriptor;
9
+ /** Where the recipient list is: the product fetches it, the sheet shows the matching state. */
10
+ export type ShareSheetRecipientStatus = "ready" | "loading" | "error";
11
+ /**
12
+ * What `onSend` reports back. `sentIds` are the requested ids the product delivered; every other requested id stays
13
+ * selected so the user can retry only those (a partial batch must not resend the delivered ones). `error` is the
14
+ * product's localized reason for the failures; without it the sheet shows `labels.sendFailed`.
15
+ */
16
+ export type ShareSheetSendResult = Readonly<{
17
+ sentIds: readonly string[];
18
+ error?: string;
19
+ }>;
20
+ /** Payload for the OS share sheet. */
21
+ export type ShareSheetShareContent = Readonly<{
22
+ url: string;
23
+ title?: string;
24
+ text?: string;
25
+ }>;
26
+ /**
27
+ * How the OS share sheet closed. `completed` means the user picked a target, not that it was delivered; `dismissed`
28
+ * means they backed out (Web `AbortError`, iOS `dismissedAction`). Android always reports `completed`.
29
+ */
30
+ export type ShareSheetSystemShareOutcome = "completed" | "dismissed";
31
+ /** Localized copy for the sheet chrome and the external actions. The renderer invents none. */
32
+ export type ShareSheetLabels = Readonly<{
33
+ /** Accessible name of the Sheet close action. */
34
+ close: string;
35
+ copyLink: string;
36
+ systemShare: string;
37
+ /** Announced (polite) after the link reached the clipboard. */
38
+ linkCopied: string;
39
+ /** Shown when copying or opening the OS share sheet failed. */
40
+ actionFailed: string;
41
+ }>;
42
+ /** Localized copy for the recipient section. */
43
+ export type ShareSheetRecipientLabels = Readonly<{
44
+ /** Accessible name of the recipient group (e.g. "Choose who to send to"). */
45
+ group: string;
46
+ /** Search field name and placeholder. */
47
+ search: string;
48
+ clearSearch: string;
49
+ loading: string;
50
+ loadFailed: string;
51
+ retry: string;
52
+ /** No recipients at all. */
53
+ empty: string;
54
+ /** Recipients exist but none match the search. */
55
+ noResults: string;
56
+ /** Item description of an already-sent recipient. */
57
+ sent: string;
58
+ /** Send failure without a product reason. */
59
+ sendFailed: string;
60
+ /** Footer action, e.g. `count => \`Send to ${count}\``. */
61
+ send: (count: number) => string;
62
+ }>;
63
+ export declare const shareSheetRecipe: {
64
+ /** The picker scrolls in a tall sheet; external actions alone keep the sheet at its content height. */
65
+ readonly size: {
66
+ recipients: "large";
67
+ externalOnly: "auto";
68
+ };
69
+ /** Body regions (notices, search, list) and footer rows (send button above the action row). */
70
+ readonly bodyGap: "md";
71
+ readonly footerGap: "xs";
72
+ /** Two round external actions centred in one row, each with its caption below (BurnTok 1.28 share footer). */
73
+ readonly actionGap: "xxxl";
74
+ readonly actionCaptionGap: "xs";
75
+ readonly actionButton: {
76
+ readonly tone: "secondary";
77
+ readonly size: "large";
78
+ };
79
+ readonly actionCaptionVariant: "caption";
80
+ readonly sendButton: {
81
+ readonly tone: "primary";
82
+ readonly size: "large";
83
+ };
84
+ /**
85
+ * Recipients are picked by face and name. Two name lines: a 12-character nickname ends near six Hangul glyphs on
86
+ * one 80-wide caption line (BurnTok share recipients, 2026-10-18).
87
+ */
88
+ readonly picker: {
89
+ readonly showItemLabels: true;
90
+ readonly itemLabelLines: 2;
91
+ };
92
+ };
93
+ export declare function validateShareSheet(input: Readonly<{
94
+ title: string;
95
+ link: string;
96
+ labels: ShareSheetLabels;
97
+ }>): void;
98
+ /** Recipients the sheet shows for a search: every item for a blank query, else label matches (locale lower case). */
99
+ export declare function filterShareSheetRecipients<Item extends ShareSheetRecipientDescriptor>(items: readonly Item[], query: string): readonly Item[];
100
+ /** Validates the full recipient list (unique ids, localized labels) the same way the picker does. */
101
+ export declare function validateShareSheetRecipients(items: readonly ShareSheetRecipientDescriptor[]): void;
102
+ /**
103
+ * Splits one send attempt into delivered and failed ids. A product reporting an id it was not asked to send is a bug
104
+ * (it would mark someone as sent who never was), so it throws instead of being ignored.
105
+ */
106
+ export declare function resolveShareSheetSendOutcome(requested: readonly string[], result: ShareSheetSendResult): Readonly<{
107
+ sent: readonly string[];
108
+ failed: readonly string[];
109
+ }>;
110
+ /**
111
+ * The picker value: the user's selection plus every already-sent recipient, which stays checked and locked so it
112
+ * cannot be sent twice.
113
+ */
114
+ export declare function resolveShareSheetPickerValue(selected: readonly string[], sent: ReadonlySet<string>, visibleIds: readonly string[]): string[];
115
+ //# sourceMappingURL=share-sheet.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"share-sheet.d.ts","sourceRoot":"","sources":["../src/share-sheet.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4B,KAAK,yBAAyB,EAAkC,MAAM,mBAAmB,CAAC;AAM7H;;;;;GAKG;AACH,MAAM,MAAM,6BAA6B,GAAG,yBAAyB,CAAC;AAEtE,+FAA+F;AAC/F,MAAM,MAAM,yBAAyB,GAAG,OAAO,GAAG,SAAS,GAAG,OAAO,CAAC;AAEtE;;;;GAIG;AACH,MAAM,MAAM,oBAAoB,GAAG,QAAQ,CAAC;IAAE,OAAO,EAAE,SAAS,MAAM,EAAE,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC;AAE5F,sCAAsC;AACtC,MAAM,MAAM,sBAAsB,GAAG,QAAQ,CAAC;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC;AAE9F;;;GAGG;AACH,MAAM,MAAM,4BAA4B,GAAG,WAAW,GAAG,WAAW,CAAC;AAErE,+FAA+F;AAC/F,MAAM,MAAM,gBAAgB,GAAG,QAAQ,CAAC;IACtC,iDAAiD;IACjD,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,+DAA+D;IAC/D,UAAU,E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AAM,EAAE,EAAE,MAAM,EAAE,oBAAoB,GAAG,QAAQ,CAAC;IAAE,IAAI,EAAE,SAAS,MAAM,EAAE,CAAC;IAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAA;CAAE,CAAC,CAOzK;AAED;;;GAGG;AACH,wBAAgB,4BAA4B,CAAC,QAAQ,EAAE,SAAS,MAAM,EAAE,EAAE,IAAI,EAAE,WAAW,CAAC,MAAM,CAAC,EAAE,UAAU,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,EAAE,CAE5I"}
@@ -0,0 +1,62 @@
1
+ import { validateImageChoiceItems } from "./image-choice.js";
2
+ export const shareSheetRecipe = {
3
+ /** The picker scrolls in a tall sheet; external actions alone keep the sheet at its content height. */
4
+ size: { recipients: "large", externalOnly: "auto" },
5
+ /** Body regions (notices, search, list) and footer rows (send button above the action row). */
6
+ bodyGap: "md",
7
+ footerGap: "xs",
8
+ /** Two round external actions centred in one row, each with its caption below (BurnTok 1.28 share footer). */
9
+ actionGap: "xxxl",
10
+ actionCaptionGap: "xs",
11
+ actionButton: { tone: "secondary", size: "large" },
12
+ actionCaptionVariant: "caption",
13
+ sendButton: { tone: "primary", size: "large" },
14
+ /**
15
+ * Recipients are picked by face and name. Two name lines: a 12-character nickname ends near six Hangul glyphs on
16
+ * one 80-wide caption line (BurnTok share recipients, 2026-10-18).
17
+ */
18
+ picker: { showItemLabels: true, itemLabelLines: 2 },
19
+ };
20
+ export function validateShareSheet(input) {
21
+ if (!input.title.trim())
22
+ throw new TypeError("ShareSheet title must not be empty");
23
+ if (!input.link.trim())
24
+ throw new TypeError("ShareSheet link must not be empty");
25
+ for (const [key, value] of Object.entries(input.labels)) {
26
+ if (typeof value !== "string" || !value.trim())
27
+ throw new TypeError(`ShareSheet labels.${key} must be localized text`);
28
+ }
29
+ }
30
+ /** Recipients the sheet shows for a search: every item for a blank query, else label matches (locale lower case). */
31
+ export function filterShareSheetRecipients(items, query) {
32
+ const needle = query.trim().toLocaleLowerCase();
33
+ if (!needle)
34
+ return items;
35
+ return items.filter(item => item.label.toLocaleLowerCase().includes(needle));
36
+ }
37
+ /** Validates the full recipient list (unique ids, localized labels) the same way the picker does. */
38
+ export function validateShareSheetRecipients(items) {
39
+ if (items.length)
40
+ validateImageChoiceItems(items);
41
+ }
42
+ /**
43
+ * Splits one send attempt into delivered and failed ids. A product reporting an id it was not asked to send is a bug
44
+ * (it would mark someone as sent who never was), so it throws instead of being ignored.
45
+ */
46
+ export function resolveShareSheetSendOutcome(requested, result) {
47
+ const asked = new Set(requested);
48
+ for (const id of result.sentIds) {
49
+ if (!asked.has(id))
50
+ throw new TypeError(`ShareSheet onSend reported "${id}", which was not requested`);
51
+ }
52
+ const delivered = new Set(result.sentIds);
53
+ return { sent: requested.filter(id => delivered.has(id)), failed: requested.filter(id => !delivered.has(id)) };
54
+ }
55
+ /**
56
+ * The picker value: the user's selection plus every already-sent recipient, which stays checked and locked so it
57
+ * cannot be sent twice.
58
+ */
59
+ export function resolveShareSheetPickerValue(selected, sent, visibleIds) {
60
+ return [...selected.filter(id => !sent.has(id)), ...visibleIds.filter(id => sent.has(id))];
61
+ }
62
+ //# sourceMappingURL=share-sheet.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"share-sheet.js","sourceRoot":"","sources":["../src/share-sheet.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAkE,MAAM,mBAAmB,CAAC;AAmE7H,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,uGAAuG;IACvG,IAAI,EAAE,EAAE,UAAU,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,EAAgD;IACjG,+FAA+F;IAC/F,OAAO,EAAE,IAAuB;IAChC,SAAS,EAAE,IAAuB;IAClC,8GAA8G;IAC9G,SAAS,EAAE,MAAyB;IACpC,gBAAgB,EAAE,IAAuB;IACzC,YAAY,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,OAAO,EAAE;IAClD,oBAAoB,EA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AC,SAA4B,EAAE,MAA4B;IACrG,MAAM,KAAK,GAAG,IAAI,GAAG,CAAC,SAAS,CAAC,CAAC;IACjC,KAAK,MAAM,EAAE,IAAI,MAAM,CAAC,OAAO,EAAE,CAAC;QAChC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC;YAAE,MAAM,IAAI,SAAS,CAAC,+BAA+B,EAAE,4BAA4B,CAAC,CAAC;IACzG,CAAC;IACD,MAAM,SAAS,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IAC1C,OAAO,EAAE,IAAI,EAAE,SAAS,CAAC,MAAM,CAAC,EAAE,CAAC,EAAE,CAAC,SAAS,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,SAAS,CAAC,MAAM,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,SAAS,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC;AACjH,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,4BAA4B,CAAC,QAA2B,EAAE,IAAyB,EAAE,UAA6B;IAChI,OAAO,CAAC,GAAG,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,EAAE,GAAG,UAAU,CAAC,MAAM,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;AAC7F,CAAC","sourcesContent":["import { validateImageChoiceItems, type ImageChoiceItemDescriptor, type ImageChoiceItemLabelLines } from \"./image-choice.js\";\nimport type { sheetRecipe, StackGap } from \"./component-recipes.js\";\nimport type { TextVariant } from \"./foundations.js\";\n\ntype SheetSize = keyof typeof sheetRecipe.sizes;\n\n/**\n * Sharing one link (2026-10-26 user request \"번뚝 공유 그대로 공통화\"): BurnTok's Web and Native share sheets are the\n * reference. One Sheet offers in-app recipients (optional) plus two external actions — copy link and the OS share\n * sheet. The product owns the link, the recipient data and the delivery; HJM owns the layout, selection, in-flight\n * guards and the honest feedback (the OS share sheet only proves it opened, never that anything was delivered).\n */\nexport type ShareSheetRecipientDescriptor = ImageChoiceItemDescriptor;\n\n/** Where the recipient list is: the product fetches it, the sheet shows the matching state. */\nexport type ShareSheetRecipientStatus = \"ready\" | \"loading\" | \"error\";\n\n/**\n * What `onSend` reports back. `sentIds` are the requested ids the product delivered; every other requested id stays\n * selected so the user can retry only those (a partial batch must not resend the delivered ones). `error` is the\n * product's localized reason for the failures; without it the sheet shows `labels.sendFailed`.\n */\nexport type ShareSheetSendResult = Readonly<{ sentIds: readonly string[]; error?: string }>;\n\n/** Payload for the OS share sheet. */\nexport type ShareSheetShareContent = Readonly<{ url: string; title?: string; text?: string }>;\n\n/**\n * How the OS share sheet closed. `completed` means the user picked a target, not that it was delivered; `dismissed`\n * means they backed out (Web `AbortError`, iOS `dismissedAction`). Android always reports `completed`.\n */\nexport type ShareSheetSystemShareOutcome = \"completed\" | \"dismissed\";\n\n/** Localized copy for the sheet chrome and the external actions. The renderer invents none. */\nexport type ShareSheetLabels = Readonly<{\n /** Accessible name of the Sheet close action. */\n close: string;\n copyLink: string;\n systemShare: string;\n /** Announced (polite) after the link reached the clipboard. */\n linkCopied: string;\n /** Shown when copying or opening the OS share sheet failed. */\n actionFailed: string;\n}>;\n\n/** Localized copy for the recipient section. */\nexport type ShareSheetRecipientLabels = Readonly<{\n /** Accessible name of the recipient group (e.g. \"Choose who to send to\"). */\n group: string;\n /** Search field name and placeholder. */\n search: string;\n clearSearch: string;\n loading: string;\n loadFailed: string;\n retry: string;\n /** No recipients at all. */\n empty: string;\n /** Recipients exist but none match the search. */\n noResults: string;\n /** Item description of an already-sent recipient. */\n sent: string;\n /** Send failure without a product reason. */\n sendFailed: string;\n /** Footer action, e.g. `count => \\`Send to ${count}\\``. */\n send: (count: number) => string;\n}>;\n\nexport const shareSheetRecipe = {\n /** The picker scrolls in a tall sheet; external actions alone keep the sheet at its content height. */\n size: { recipients: \"large\", externalOnly: \"auto\" } satisfies Readonly<Record<string, SheetSize>>,\n /** Body regions (notices, search, list) and footer rows (send button above the action row). */\n bodyGap: \"md\" satisfies StackGap,\n footerGap: \"xs\" satisfies StackGap,\n /** Two round external actions centred in one row, each with its caption below (BurnTok 1.28 share footer). */\n actionGap: \"xxxl\" satisfies StackGap,\n actionCaptionGap: \"xs\" satisfies StackGap,\n actionButton: { tone: \"secondary\", size: \"large\" },\n actionCaptionVariant: \"caption\" satisfies TextVariant,\n sendButton: { tone: \"primary\", size: \"large\" },\n /**\n * Recipients are picked by face and name. Two name lines: a 12-character nickname ends near six Hangul glyphs on\n * one 80-wide caption line (BurnTok share recipients, 2026-10-18).\n */\n picker: { showItemLabels: true, itemLabelLines: 2 satisfies ImageChoiceItemLabelLines },\n} as const;\n\nexport function validateShareSheet(input: Readonly<{ title: string; link: string; labels: ShareSheetLabels }>): void {\n if (!input.title.trim()) throw new TypeError(\"ShareSheet title must not be empty\");\n if (!input.link.trim()) throw new TypeError(\"ShareSheet link must not be empty\");\n for (const [key, value] of Object.entries(input.labels)) {\n if (typeof value !== \"string\" || !value.trim()) throw new TypeError(`ShareSheet labels.${key} must be localized text`);\n }\n}\n\n/** Recipients the sheet shows for a search: every item for a blank query, else label matches (locale lower case). */\nexport function filterShareSheetRecipients<Item extends ShareSheetRecipientDescriptor>(items: readonly Item[], query: string): readonly Item[] {\n const needle = query.trim().toLocaleLowerCase();\n if (!needle) return items;\n return items.filter(item => item.label.toLocaleLowerCase().includes(needle));\n}\n\n/** Validates the full recipient list (unique ids, localized labels) the same way the picker does. */\nexport function validateShareSheetRecipients(items: readonly ShareSheetRecipientDescriptor[]): void {\n if (items.length) validateImageChoiceItems(items);\n}\n\n/**\n * Splits one send attempt into delivered and failed ids. A product reporting an id it was not asked to send is a bug\n * (it would mark someone as sent who never was), so it throws instead of being ignored.\n */\nexport function resolveShareSheetSendOutcome(requested: readonly string[], result: ShareSheetSendResult): Readonly<{ sent: readonly string[]; failed: readonly string[] }> {\n const asked = new Set(requested);\n for (const id of result.sentIds) {\n if (!asked.has(id)) throw new TypeError(`ShareSheet onSend reported \"${id}\", which was not requested`);\n }\n const delivered = new Set(result.sentIds);\n return { sent: requested.filter(id => delivered.has(id)), failed: requested.filter(id => !delivered.has(id)) };\n}\n\n/**\n * The picker value: the user's selection plus every already-sent recipient, which stays checked and locked so it\n * cannot be sent twice.\n */\nexport function resolveShareSheetPickerValue(selected: readonly string[], sent: ReadonlySet<string>, visibleIds: readonly string[]): string[] {\n return [...selected.filter(id => !sent.has(id)), ...visibleIds.filter(id => sent.has(id))];\n}\n"]}
package/dist/version.d.ts CHANGED
@@ -1,3 +1,3 @@
1
1
  /** Package release shown by documentation surfaces. Kept in sync by a test. */
2
- export declare const designSystemVersion: "1.47.0";
2
+ export declare const designSystemVersion: "1.48.0";
3
3
  //# sourceMappingURL=version.d.ts.map
package/dist/version.js CHANGED
@@ -1,3 +1,3 @@
1
1
  /** Package release shown by documentation surfaces. Kept in sync by a test. */
2
- export const designSystemVersion = "1.47.0";
2
+ export const designSystemVersion = "1.48.0";
3
3
  //# sourceMappingURL=version.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"version.js","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAC/E,MAAM,CAAC,MAAM,mBAAmB,GAAG,QAAiB,CAAC","sourcesContent":["/** Package release shown by documentation surfaces. Kept in sync by a test. */\nexport const designSystemVersion = \"1.47.0\" as const;\n"]}
1
+ {"version":3,"file":"version.js","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAC/E,MAAM,CAAC,MAAM,mBAAmB,GAAG,QAAiB,CAAC","sourcesContent":["/** Package release shown by documentation surfaces. Kept in sync by a test. */\nexport const designSystemVersion = \"1.48.0\" as const;\n"]}
package/docs/dialog.md CHANGED
@@ -46,7 +46,7 @@ Native accessibility follow-up (2026-10-01): at 200% text scale, the close glyph
46
46
 
47
47
  Native viewport candidate (BT-QA-027, 2026-10-05): BurnTok local QA exposed a long confirmation extending beyond the visible screen. Dialog and AlertDialog now constrain the content surface and provide a shrinking scroll body, with actions outside that body and provider safe-area padding. Host tests cover those structural contracts and cancellation; they cannot prove Yoga geometry. Ordinary-size iOS confirmation and cancellation were checked. Enlarged-text device verification remains pending: the user stopped that QA scope before the candidate was confirmed, so this is not a completed device fix. Font caps and clipped copy were rejected because they remove readable content.
48
48
 
49
- ## Optional measured origin motion (published API, experimental presentation)
49
+ ## Optional measured origin motion (published API, stable presentation contract)
50
50
 
51
51
  2026-10-07 Aceternity card/grid comparison exposed a stale publication label here.
52
52
  Both npm 1.14.0 renderer tarballs include `DialogProps.motionOrigin` in `dist/overlays.d.ts`,
@@ -61,8 +61,7 @@ the modal engine. It does not implement shared image/text identities or a new Po
61
61
  Web retains one subtree through exit and suppresses stale animation completion when reopened.
62
62
  Native uses the actual modal measurement and bounds its optional measurement wait by the existing
63
63
  enter duration, falling back to ordinary presentation if the host fails to reply. Reduced motion skips
64
- spatial interpolation. Device geometry, resizing/keyboard behavior, themes and performance remain
65
- experimental until the QA report verifies them. See the usage guide and
64
+ spatial interpolation. The optional presentation contract is stable as of 2026-10-26: browser/host regressions and the current iOS failed-save → close → reopen → successful-save flow passed. Per-device geometry/performance and consuming-product certification remain scoped QA; stable does not promise a frame-rate target on every device. See the usage guide and
66
65
  [origin transition QA](../../../docs/qa/2026-10-07-overlay-origin-transition.md).
67
66
 
68
67
  ## Decorative layer and immersive presentation (1.31.0)