@k2b/ui 0.60.0 → 0.62.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 (109) hide show
  1. package/dist/browser/actions/FilterChip.js +3 -0
  2. package/dist/browser/actions/FilterChip.js.map +1 -1
  3. package/dist/browser/chat/ChatPrimitives.js +435 -420
  4. package/dist/browser/chat/ChatPrimitives.js.map +1 -1
  5. package/dist/browser/chat/ChatTasks.js +78 -73
  6. package/dist/browser/chat/ChatTasks.js.map +1 -1
  7. package/dist/browser/chat/ChatTimeline.js +3 -0
  8. package/dist/browser/chat/ChatTimeline.js.map +1 -1
  9. package/dist/browser/content/ActivityList.js +379 -290
  10. package/dist/browser/content/ActivityList.js.map +1 -1
  11. package/dist/browser/content/FileView.js +0 -12
  12. package/dist/browser/content/FileView.js.map +1 -1
  13. package/dist/browser/content/Lightbox.js +31 -11
  14. package/dist/browser/content/Lightbox.js.map +1 -1
  15. package/dist/browser/content/PdfPages.js +26 -1
  16. package/dist/browser/content/PdfPages.js.map +1 -1
  17. package/dist/browser/content/RunLog.js +719 -0
  18. package/dist/browser/content/RunLog.js.map +1 -0
  19. package/dist/browser/content/activity-messages.js +2 -2
  20. package/dist/browser/content/activity-messages.js.map +1 -1
  21. package/dist/browser/content/file-view-preview.js +13 -0
  22. package/dist/browser/content/file-view-preview.js.map +1 -1
  23. package/dist/browser/content/index.js +5 -4
  24. package/dist/browser/content/index.js.map +1 -1
  25. package/dist/browser/content/run-log-messages.js +134 -0
  26. package/dist/browser/content/run-log-messages.js.map +1 -0
  27. package/dist/browser/feedback/dialog-core.js +24 -27
  28. package/dist/browser/feedback/dialog-core.js.map +1 -1
  29. package/dist/browser/feedback/dialog-frame-motion.js +506 -15
  30. package/dist/browser/feedback/dialog-frame-motion.js.map +1 -1
  31. package/dist/browser/feedback/prompt-sheet.js +1 -0
  32. package/dist/browser/feedback/prompt-sheet.js.map +1 -1
  33. package/dist/browser/feedback/prompts.js +5 -1
  34. package/dist/browser/feedback/prompts.js.map +1 -1
  35. package/dist/browser/feedback/toast.js +11 -1
  36. package/dist/browser/feedback/toast.js.map +1 -1
  37. package/dist/browser/internal/step-row.js +78 -0
  38. package/dist/browser/internal/step-row.js.map +1 -0
  39. package/dist/browser/layout/PullToRefresh.js +76 -23
  40. package/dist/browser/layout/PullToRefresh.js.map +1 -1
  41. package/dist/browser/layout/refresh-messages.js +4 -2
  42. package/dist/browser/layout/refresh-messages.js.map +1 -1
  43. package/dist/browser/layout/sheet-motion.js +3 -3
  44. package/dist/browser/layout/sheet-motion.js.map +1 -1
  45. package/dist/ssr/actions/FilterChip.js +3 -0
  46. package/dist/ssr/actions/FilterChip.js.map +1 -1
  47. package/dist/ssr/chat/ChatPrimitives.js +109 -71
  48. package/dist/ssr/chat/ChatPrimitives.js.map +1 -1
  49. package/dist/ssr/chat/ChatTasks.js +31 -16
  50. package/dist/ssr/chat/ChatTasks.js.map +1 -1
  51. package/dist/ssr/chat/ChatTimeline.js +3 -0
  52. package/dist/ssr/chat/ChatTimeline.js.map +1 -1
  53. package/dist/ssr/content/ActivityList.js +199 -114
  54. package/dist/ssr/content/ActivityList.js.map +1 -1
  55. package/dist/ssr/content/FileView.js +0 -12
  56. package/dist/ssr/content/FileView.js.map +1 -1
  57. package/dist/ssr/content/Lightbox.js +31 -11
  58. package/dist/ssr/content/Lightbox.js.map +1 -1
  59. package/dist/ssr/content/PdfPages.js +26 -1
  60. package/dist/ssr/content/PdfPages.js.map +1 -1
  61. package/dist/ssr/content/RunLog.js +471 -0
  62. package/dist/ssr/content/RunLog.js.map +1 -0
  63. package/dist/ssr/content/activity-messages.js +2 -2
  64. package/dist/ssr/content/activity-messages.js.map +1 -1
  65. package/dist/ssr/content/file-view-preview.js +13 -0
  66. package/dist/ssr/content/file-view-preview.js.map +1 -1
  67. package/dist/ssr/content/index.js +5 -4
  68. package/dist/ssr/content/index.js.map +1 -1
  69. package/dist/ssr/content/run-log-messages.js +134 -0
  70. package/dist/ssr/content/run-log-messages.js.map +1 -0
  71. package/dist/ssr/feedback/dialog-core.js +24 -27
  72. package/dist/ssr/feedback/dialog-core.js.map +1 -1
  73. package/dist/ssr/feedback/dialog-frame-motion.js +506 -15
  74. package/dist/ssr/feedback/dialog-frame-motion.js.map +1 -1
  75. package/dist/ssr/feedback/prompt-sheet.js +1 -0
  76. package/dist/ssr/feedback/prompt-sheet.js.map +1 -1
  77. package/dist/ssr/feedback/prompts.js +5 -1
  78. package/dist/ssr/feedback/prompts.js.map +1 -1
  79. package/dist/ssr/feedback/toast.js +11 -1
  80. package/dist/ssr/feedback/toast.js.map +1 -1
  81. package/dist/ssr/internal/step-row.js +35 -0
  82. package/dist/ssr/internal/step-row.js.map +1 -0
  83. package/dist/ssr/layout/PullToRefresh.js +67 -16
  84. package/dist/ssr/layout/PullToRefresh.js.map +1 -1
  85. package/dist/ssr/layout/refresh-messages.js +4 -2
  86. package/dist/ssr/layout/refresh-messages.js.map +1 -1
  87. package/dist/ssr/layout/sheet-motion.js +3 -3
  88. package/dist/ssr/layout/sheet-motion.js.map +1 -1
  89. package/dist/styles.css +1 -1
  90. package/dist/types/actions/FilterChip.d.ts +9 -0
  91. package/dist/types/chat/ChatPrimitives.d.ts +6 -0
  92. package/dist/types/chat/ChatTimeline.d.ts +2 -0
  93. package/dist/types/content/ActivityList.d.ts +24 -6
  94. package/dist/types/content/FileView.d.ts +0 -5
  95. package/dist/types/content/Lightbox.d.ts +7 -5
  96. package/dist/types/content/RunLog.d.ts +53 -0
  97. package/dist/types/content/file-view-preview.d.ts +5 -0
  98. package/dist/types/content/index.d.ts +4 -3
  99. package/dist/types/content/run-log-messages.d.ts +61 -0
  100. package/dist/types/feedback/dialog-core.d.ts +3 -1
  101. package/dist/types/feedback/dialog-frame-motion.d.ts +26 -1
  102. package/dist/types/feedback/prompt-sheet.d.ts +1 -0
  103. package/dist/types/feedback/prompts.d.ts +4 -0
  104. package/dist/types/feedback/toast.d.ts +9 -1
  105. package/dist/types/internal/step-row.d.ts +19 -0
  106. package/dist/types/layout/PullToRefresh.d.ts +2 -2
  107. package/dist/types/layout/refresh-messages.d.ts +1 -0
  108. package/dist/types/layout/sheet-motion.d.ts +2 -2
  109. package/package.json +9 -7
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["actions/FilterChip.tsx"],"sourcesContent":["import { createMemo, For, type JSX, Show } from \"solid-js\";\nimport { useUiMessages } from \"../intl/messages\";\nimport type { ButtonVariant } from \"./Button\";\nimport Dropdown, { type DropdownItem } from \"./Dropdown\";\nimport { useFilterMessages } from \"./filter-messages\";\n\nexport type FilterChipOption = {\n value: string;\n label: string;\n icon?: string;\n color?: string;\n /** Quiet trailing information about the option, such as a short note or a loading or warning icon with its own label. */\n trailing?: JSX.Element;\n};\n\nexport type FilterChipSection = {\n label?: string;\n options: readonly FilterChipOption[];\n multiple?: boolean;\n /**\n * `row` sets a few short single-select options side by side as one segmented row under its `label`. Selecting the\n * chosen option again keeps it; give the row a value in `defaultValue` so Reset keeps a choice too.\n */\n layout?: \"row\";\n /** A labelled `multiple` section offers \"All\" or, once all its options are chosen, \"None\" beside its label. */\n toggleAll?: boolean;\n};\n\nexport type FilterChipProps = {\n label: string;\n icon: string;\n options: readonly FilterChipSection[];\n value: readonly string[];\n onValueChange: (value: string[]) => void;\n isActive?: boolean;\n position?: \"bottom-left\" | \"bottom-right\";\n defaultValue?: readonly string[];\n iconOnly?: boolean;\n /** Use a standard button appearance instead of the default filter field. */\n variant?: ButtonVariant;\n /**\n * An active chip names its first value instead of a count: \"Tags: Customer\", \"Tags: Customer +2\". Use it for the\n * chips of `AppWorkspace.Head`; pass only the filter's name as `label`. The chip then grows with its value.\n */\n showValue?: boolean;\n /**\n * Each option of a `multiple` section offers \"Only\" at the end of its row: it chooses that option alone among the\n * `multiple` sections and keeps the choices of single-select sections.\n */\n only?: boolean;\n /** The trigger shows the colors of the first four chosen options before its label, as a quiet hint of what is in view. */\n swatches?: boolean;\n disabled?: boolean;\n class?: string;\n};\n\n/** Section-aware controlled filter with immediate single- and multi-select commits. */\nexport function FilterChip(props: FilterChipProps): JSX.Element {\n const messages = useUiMessages();\n const filterMessages = useFilterMessages();\n const selectedValues = createMemo(() => new Set(props.value));\n const selectedOptions = createMemo(() =>\n props.options.flatMap((section) => section.options).filter((option) => selectedValues().has(option.value)),\n );\n const defaultValues = createMemo(() => new Set(props.defaultValue ?? []));\n const sectionByValue = createMemo(() => {\n const sections = new Map<string, FilterChipSection>();\n for (const section of props.options) {\n for (const option of section.options) sections.set(option.value, section);\n }\n return sections;\n });\n const hasDefault = () => (props.defaultValue?.length ?? 0) > 0;\n const selected = (value: string) => selectedValues().has(value);\n const active = () => props.isActive ?? props.value.length > 0;\n const namedValue = () => (props.showValue && !props.iconOnly && active() ? selectedOptions()[0] : undefined);\n const triggerLabel = () => {\n const first = namedValue();\n if (!first) return props.label;\n return `${props.label}: ${first.label}${props.value.length > 1 ? ` +${props.value.length - 1}` : \"\"}`;\n };\n const atDefault = () => {\n if (!props.defaultValue) return false;\n const current = props.value;\n return current.length === props.defaultValue.length && current.every((value) => defaultValues().has(value));\n };\n const emit = (value: string[]) => props.onValueChange(value);\n const toggle = (value: string) => {\n const section = sectionByValue().get(value);\n if (!section) return;\n const current = props.value;\n if (section.multiple) {\n emit(selected(value) ? current.filter((entry) => entry !== value) : [...current, value]);\n return;\n }\n // A segmented row always keeps one choice, like a SegmentedControl.\n if (section.layout === \"row\" && selected(value)) return;\n const sectionValues = new Set(section.options.map((option) => option.value));\n const otherValues = current.filter((entry) => !sectionValues.has(entry));\n emit(selected(value) ? otherValues : [...otherValues, value]);\n };\n const reset = () => emit(props.defaultValue ? [...props.defaultValue] : []);\n const showReset = () => (hasDefault() && !atDefault()) || (!hasDefault() && props.value.length > 0);\n const swatches = createMemo(() =>\n props.swatches && !props.iconOnly\n ? selectedOptions()\n .flatMap((option) => (option.color ? [option.color] : []))\n .slice(0, 4)\n : [],\n );\n const onlyValue = (value: string) => {\n const kept = props.value.filter((entry) => !sectionByValue().get(entry)?.multiple);\n emit([...kept, value]);\n };\n const toggleSection = (section: FilterChipSection) => {\n const values = section.options.map((option) => option.value);\n const all = values.every((value) => selected(value));\n const others = props.value.filter((entry) => !values.includes(entry));\n emit(all ? others : [...others, ...values]);\n };\n const optionItems = createMemo<DropdownItem[]>(() => {\n const result: DropdownItem[] = [];\n for (const section of props.options) {\n const items = section.options.map((option) => ({\n action: () => toggle(option.value),\n checked: () => props.value.includes(option.value),\n choice: section.multiple ? (\"checkbox\" as const) : (\"radio\" as const),\n class: \"k2b-filter-chip__option\",\n closeOnSelect: false,\n color: option.color,\n icon: !section.multiple ? option.icon : undefined,\n label: option.label,\n trailing: option.trailing,\n secondary:\n props.only && section.multiple\n ? {\n label: filterMessages().only,\n ariaLabel: filterMessages().onlyOption({ label: option.label }),\n action: () => onlyValue(option.value),\n }\n : undefined,\n }));\n // Read when the row renders, so a change of the choice updates the label without rebuilding the rows.\n const all = () => section.options.every((option) => selected(option.value));\n const sectionLabel = section.label;\n const labelAction =\n section.toggleAll && section.multiple && sectionLabel && section.options.length > 0\n ? {\n get label() {\n return all() ? filterMessages().none : filterMessages().all;\n },\n get ariaLabel() {\n return (all() ? filterMessages().noneOf : filterMessages().allOf)({ label: sectionLabel });\n },\n action: () => toggleSection(section),\n }\n : undefined;\n if (section.label || section.layout) result.push({ sectionLabel: section.label, layout: section.layout, labelAction, items });\n else result.push(...items);\n }\n return result;\n });\n const items = createMemo<DropdownItem[]>(() => {\n if (!showReset()) return optionItems();\n return [\n ...optionItems(),\n {\n sectionLabel: filterMessages().filterActions,\n items: [\n {\n action: reset,\n icon: hasDefault() ? \"ti ti-refresh\" : \"ti ti-x\",\n label: hasDefault() ? messages().reset : messages().clear,\n variant: \"danger\",\n },\n ],\n },\n ];\n });\n\n return (\n <Dropdown.Root\n disabled={props.disabled}\n items={items()}\n position={props.position ?? \"bottom-left\"}\n menuClass=\"k2b-filter-chip__menu\"\n label={props.label}\n >\n <Dropdown.Trigger\n appearance={props.variant ? \"button\" : \"plain\"}\n variant={props.variant}\n iconOnly={props.iconOnly}\n class={props.variant ? props.class : `k2b-filter-chip ${props.class ?? \"\"}`}\n data-state={active() ? \"active\" : \"idle\"}\n data-active={active() ? \"true\" : undefined}\n data-icon-only={props.iconOnly ? \"true\" : undefined}\n label={triggerLabel()}\n >\n <Show when={swatches().length > 0} fallback={<i class={props.icon} aria-hidden=\"true\" />}>\n <span class=\"k2b-filter-chip__swatches\" aria-hidden=\"true\">\n <For each={swatches()}>{(color) => <span class=\"k2b-filter-chip__dot\" style={{ \"--k2b-filter-color\": color }} />}</For>\n </span>\n </Show>\n <Show when={!props.iconOnly}>\n <span class=\"k2b-filter-chip__label\">\n {props.label}\n <Show when={namedValue()} fallback={<Show when={!hasDefault() && props.value.length > 0}>{` (${props.value.length})`}</Show>}>\n {(first) => (\n <span class=\"k2b-filter-chip__value\">\n :{\" \"}\n <Show when={first().color}>\n {(color) => <span class=\"k2b-filter-chip__dot\" style={{ \"--k2b-filter-color\": color() }} aria-hidden=\"true\" />}\n </Show>\n {first().label}\n <Show when={props.value.length > 1}>{` +${props.value.length - 1}`}</Show>\n </span>\n )}\n </Show>\n </span>\n <i class=\"ti ti-chevron-down k2b-filter-chip__chevron\" aria-hidden=\"true\" />\n </Show>\n </Dropdown.Trigger>\n </Dropdown.Root>\n );\n}\n\nexport default FilterChip;\n\nexport type FilterToggleProps = {\n label: JSX.Element;\n icon: string;\n /** Whether the filter is on. An active toggle carries the same tint as an active `FilterChip`. */\n active: boolean;\n /** Link to the URL with the filter switched. The link keeps working without JavaScript. */\n href?: string;\n onClick?: (event: MouseEvent) => void;\n /** The button opens a dialog with more filters, such as a filter builder; it stays pressed while they apply. */\n opensDialog?: boolean;\n /** The button is loading what it opens; it stays enabled so it keeps focus for the dialog to return it. */\n busy?: boolean;\n title?: string;\n disabled?: boolean;\n class?: string;\n};\n\n/**\n * One on/off filter in the chip look: a link marked `aria-current=\"true\"` while active, or a button with\n * `aria-pressed`. Selection changes only colour and background, so neighbouring chips never move.\n */\nexport function FilterToggle(props: FilterToggleProps): JSX.Element {\n const content = () => (\n <>\n <i class={props.icon} aria-hidden=\"true\" />\n <span class=\"k2b-filter-chip__label\">{props.label}</span>\n </>\n );\n const className = () => `k2b-filter-chip ${props.class ?? \"\"}`;\n return (\n <Show\n when={props.href !== undefined && !props.disabled}\n fallback={\n <button\n type=\"button\"\n class={className()}\n data-active={props.active ? \"true\" : undefined}\n aria-pressed={props.active}\n aria-haspopup={props.opensDialog ? \"dialog\" : undefined}\n aria-busy={props.busy ? \"true\" : undefined}\n title={props.title}\n disabled={props.disabled}\n onClick={(event) => props.onClick?.(event)}\n >\n {content()}\n </button>\n }\n >\n <a\n class={className()}\n href={props.href}\n data-active={props.active ? \"true\" : undefined}\n aria-current={props.active ? \"true\" : undefined}\n title={props.title}\n onClick={(event) => props.onClick?.(event)}\n >\n {content()}\n </a>\n </Show>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA,SAAS,UAAU,EAAE,GAAG,EAAY,IAAI,QAAQ,UAAU;AAC1D,SAAS,aAAa,QAAQ,kBAAkB;AAEhD,OAAO,QAAQ,MAA6B,YAAY;AACxD,SAAS,iBAAiB,QAAQ,mBAAmB;AAoDrD;AACA,OAAO,SAAS,UAAU,CAAC,KAAsB,EAAe;EAC9D,MAAM,QAAQ,GAAG,aAAa,CAAC,CAAC;EAChC,MAAM,cAAc,GAAG,iBAAiB,CAAC,CAAC;EAC1C,MAAM,cAAc,GAAG,UAAU,CAAC,MAAM,IAAI,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;EAC7D,MAAM,eAAe,GAAG,UAAU,CAAC,MACjC,KAAK,CAAC,OAAO,CAAC,OAAO,CAAE,OAAO,IAAK,OAAO,CAAC,OAAO,CAAC,CAAC,MAAM,CAAE,MAAM,IAAK,cAAc,CAAC,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,CAC3G,CAAC;EACD,MAAM,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G,SAAS,mDACnC,KAAK,CAAC,KAAK,4CACR,KAAK,CAAC,QAAQ,kBAGvB,OAAO,CAAC,CAAC;IAAA;IAAA;MAAA,uDAKL,SAAS,CAAC,CAAC,kDACZ,KAAK,CAAC,IAAI,gDACH,KAAK,CAAC,MAAM,GAAG,MAAM,YAAG,SAAS,iDAChC,KAAK,CAAC,MAAM,GAAG,MAAM,YAAG,SAAS,mDACxC,KAAK,CAAC,KAAK,0BAGjB,OAAO,CAAC,CAAC;IAAA;EAAA;AAIlB","ignoreList":[]}
1
+ {"version":3,"names":[],"sources":["actions/FilterChip.tsx"],"sourcesContent":["import { createMemo, For, type JSX, Show } from \"solid-js\";\nimport { useUiMessages } from \"../intl/messages\";\nimport type { ButtonVariant } from \"./Button\";\nimport Dropdown, { type DropdownItem } from \"./Dropdown\";\nimport { useFilterMessages } from \"./filter-messages\";\n\nexport type FilterChipOption = {\n value: string;\n label: string;\n icon?: string;\n color?: string;\n /** Quiet trailing information about the option, such as a short note or a loading or warning icon with its own label. */\n trailing?: JSX.Element;\n};\n\nexport type FilterChipSection = {\n label?: string;\n options: readonly FilterChipOption[];\n multiple?: boolean;\n /**\n * `row` sets a few short single-select options side by side as one segmented row under its `label`. Selecting the\n * chosen option again keeps it; give the row a value in `defaultValue` so Reset keeps a choice too.\n */\n layout?: \"row\";\n /** A labelled `multiple` section offers \"All\" or, once all its options are chosen, \"None\" beside its label. */\n toggleAll?: boolean;\n};\n\nexport type FilterChipProps = {\n label: string;\n icon: string;\n options: readonly FilterChipSection[];\n value: readonly string[];\n onValueChange: (value: string[]) => void;\n isActive?: boolean;\n position?: \"bottom-left\" | \"bottom-right\";\n defaultValue?: readonly string[];\n iconOnly?: boolean;\n /** Use a standard button appearance instead of the default filter field. */\n variant?: ButtonVariant;\n /**\n * An active chip names its first value instead of a count: \"Tags: Customer\", \"Tags: Customer +2\". Use it for the\n * chips of `AppWorkspace.Head`; pass only the filter's name as `label`. The chip then grows with its value.\n */\n showValue?: boolean;\n /**\n * Each option of a `multiple` section offers \"Only\" at the end of its row: it chooses that option alone among the\n * `multiple` sections and keeps the choices of single-select sections.\n */\n only?: boolean;\n /** The trigger shows the colors of the first four chosen options before its label, as a quiet hint of what is in view. */\n swatches?: boolean;\n /**\n * Puts a search field above the options, for a list long enough that finding an option takes reading, such as\n * people. `label` names the field and is its placeholder unless `placeholder` is set. \"Only\" and \"All\" stay out of a\n * searchable menu, whose field keeps the focus.\n */\n search?: { label: string; placeholder?: string };\n disabled?: boolean;\n class?: string;\n};\n\n/** Section-aware controlled filter with immediate single- and multi-select commits. */\nexport function FilterChip(props: FilterChipProps): JSX.Element {\n const messages = useUiMessages();\n const filterMessages = useFilterMessages();\n const selectedValues = createMemo(() => new Set(props.value));\n const selectedOptions = createMemo(() =>\n props.options.flatMap((section) => section.options).filter((option) => selectedValues().has(option.value)),\n );\n const defaultValues = createMemo(() => new Set(props.defaultValue ?? []));\n const sectionByValue = createMemo(() => {\n const sections = new Map<string, FilterChipSection>();\n for (const section of props.options) {\n for (const option of section.options) sections.set(option.value, section);\n }\n return sections;\n });\n const hasDefault = () => (props.defaultValue?.length ?? 0) > 0;\n const selected = (value: string) => selectedValues().has(value);\n const active = () => props.isActive ?? props.value.length > 0;\n const namedValue = () => (props.showValue && !props.iconOnly && active() ? selectedOptions()[0] : undefined);\n const triggerLabel = () => {\n const first = namedValue();\n if (!first) return props.label;\n return `${props.label}: ${first.label}${props.value.length > 1 ? ` +${props.value.length - 1}` : \"\"}`;\n };\n const atDefault = () => {\n if (!props.defaultValue) return false;\n const current = props.value;\n return current.length === props.defaultValue.length && current.every((value) => defaultValues().has(value));\n };\n const emit = (value: string[]) => props.onValueChange(value);\n const toggle = (value: string) => {\n const section = sectionByValue().get(value);\n if (!section) return;\n const current = props.value;\n if (section.multiple) {\n emit(selected(value) ? current.filter((entry) => entry !== value) : [...current, value]);\n return;\n }\n // A segmented row always keeps one choice, like a SegmentedControl.\n if (section.layout === \"row\" && selected(value)) return;\n const sectionValues = new Set(section.options.map((option) => option.value));\n const otherValues = current.filter((entry) => !sectionValues.has(entry));\n emit(selected(value) ? otherValues : [...otherValues, value]);\n };\n const reset = () => emit(props.defaultValue ? [...props.defaultValue] : []);\n const showReset = () => (hasDefault() && !atDefault()) || (!hasDefault() && props.value.length > 0);\n const swatches = createMemo(() =>\n props.swatches && !props.iconOnly\n ? selectedOptions()\n .flatMap((option) => (option.color ? [option.color] : []))\n .slice(0, 4)\n : [],\n );\n const onlyValue = (value: string) => {\n const kept = props.value.filter((entry) => !sectionByValue().get(entry)?.multiple);\n emit([...kept, value]);\n };\n const toggleSection = (section: FilterChipSection) => {\n const values = section.options.map((option) => option.value);\n const all = values.every((value) => selected(value));\n const others = props.value.filter((entry) => !values.includes(entry));\n emit(all ? others : [...others, ...values]);\n };\n const optionItems = createMemo<DropdownItem[]>(() => {\n const result: DropdownItem[] = [];\n for (const section of props.options) {\n const items = section.options.map((option) => ({\n action: () => toggle(option.value),\n checked: () => props.value.includes(option.value),\n choice: section.multiple ? (\"checkbox\" as const) : (\"radio\" as const),\n class: \"k2b-filter-chip__option\",\n closeOnSelect: false,\n color: option.color,\n icon: !section.multiple ? option.icon : undefined,\n label: option.label,\n trailing: option.trailing,\n secondary:\n props.only && section.multiple\n ? {\n label: filterMessages().only,\n ariaLabel: filterMessages().onlyOption({ label: option.label }),\n action: () => onlyValue(option.value),\n }\n : undefined,\n }));\n // Read when the row renders, so a change of the choice updates the label without rebuilding the rows.\n const all = () => section.options.every((option) => selected(option.value));\n const sectionLabel = section.label;\n const labelAction =\n section.toggleAll && section.multiple && sectionLabel && section.options.length > 0\n ? {\n get label() {\n return all() ? filterMessages().none : filterMessages().all;\n },\n get ariaLabel() {\n return (all() ? filterMessages().noneOf : filterMessages().allOf)({ label: sectionLabel });\n },\n action: () => toggleSection(section),\n }\n : undefined;\n if (section.label || section.layout) result.push({ sectionLabel: section.label, layout: section.layout, labelAction, items });\n else result.push(...items);\n }\n return result;\n });\n const items = createMemo<DropdownItem[]>(() => {\n if (!showReset()) return optionItems();\n return [\n ...optionItems(),\n {\n sectionLabel: filterMessages().filterActions,\n items: [\n {\n action: reset,\n icon: hasDefault() ? \"ti ti-refresh\" : \"ti ti-x\",\n label: hasDefault() ? messages().reset : messages().clear,\n variant: \"danger\",\n },\n ],\n },\n ];\n });\n\n return (\n <Dropdown.Root\n disabled={props.disabled}\n items={items()}\n position={props.position ?? \"bottom-left\"}\n menuClass=\"k2b-filter-chip__menu\"\n label={props.label}\n search={props.search}\n >\n <Dropdown.Trigger\n appearance={props.variant ? \"button\" : \"plain\"}\n variant={props.variant}\n iconOnly={props.iconOnly}\n class={props.variant ? props.class : `k2b-filter-chip ${props.class ?? \"\"}`}\n data-state={active() ? \"active\" : \"idle\"}\n data-active={active() ? \"true\" : undefined}\n data-icon-only={props.iconOnly ? \"true\" : undefined}\n label={triggerLabel()}\n >\n <Show when={swatches().length > 0} fallback={<i class={props.icon} aria-hidden=\"true\" />}>\n <span class=\"k2b-filter-chip__swatches\" aria-hidden=\"true\">\n <For each={swatches()}>{(color) => <span class=\"k2b-filter-chip__dot\" style={{ \"--k2b-filter-color\": color }} />}</For>\n </span>\n </Show>\n <Show when={!props.iconOnly}>\n <span class=\"k2b-filter-chip__label\">\n {props.label}\n <Show when={namedValue()} fallback={<Show when={!hasDefault() && props.value.length > 0}>{` (${props.value.length})`}</Show>}>\n {(first) => (\n <span class=\"k2b-filter-chip__value\">\n :{\" \"}\n <Show when={first().color}>\n {(color) => <span class=\"k2b-filter-chip__dot\" style={{ \"--k2b-filter-color\": color() }} aria-hidden=\"true\" />}\n </Show>\n {first().label}\n <Show when={props.value.length > 1}>{` +${props.value.length - 1}`}</Show>\n </span>\n )}\n </Show>\n </span>\n <i class=\"ti ti-chevron-down k2b-filter-chip__chevron\" aria-hidden=\"true\" />\n </Show>\n </Dropdown.Trigger>\n </Dropdown.Root>\n );\n}\n\nexport default FilterChip;\n\nexport type FilterToggleProps = {\n label: JSX.Element;\n icon: string;\n /** Whether the filter is on. An active toggle carries the same tint as an active `FilterChip`. */\n active: boolean;\n /** Link to the URL with the filter switched. The link keeps working without JavaScript. */\n href?: string;\n onClick?: (event: MouseEvent) => void;\n /** The button opens a dialog with more filters, such as a filter builder; it stays pressed while they apply. */\n opensDialog?: boolean;\n /** The button is loading what it opens; it stays enabled so it keeps focus for the dialog to return it. */\n busy?: boolean;\n title?: string;\n disabled?: boolean;\n class?: string;\n};\n\n/**\n * One on/off filter in the chip look: a link marked `aria-current=\"true\"` while active, or a button with\n * `aria-pressed`. Selection changes only colour and background, so neighbouring chips never move.\n */\nexport function FilterToggle(props: FilterToggleProps): JSX.Element {\n const content = () => (\n <>\n <i class={props.icon} aria-hidden=\"true\" />\n <span class=\"k2b-filter-chip__label\">{props.label}</span>\n </>\n );\n const className = () => `k2b-filter-chip ${props.class ?? \"\"}`;\n return (\n <Show\n when={props.href !== undefined && !props.disabled}\n fallback={\n <button\n type=\"button\"\n class={className()}\n data-active={props.active ? \"true\" : undefined}\n aria-pressed={props.active}\n aria-haspopup={props.opensDialog ? \"dialog\" : undefined}\n aria-busy={props.busy ? \"true\" : undefined}\n title={props.title}\n disabled={props.disabled}\n onClick={(event) => props.onClick?.(event)}\n >\n {content()}\n </button>\n }\n >\n <a\n class={className()}\n href={props.href}\n data-active={props.active ? \"true\" : undefined}\n aria-current={props.active ? \"true\" : undefined}\n title={props.title}\n onClick={(event) => props.onClick?.(event)}\n >\n {content()}\n </a>\n </Show>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA,SAAS,UAAU,EAAE,GAAG,EAAY,IAAI,QAAQ,UAAU;AAC1D,SAAS,aAAa,QAAQ,kBAAkB;AAEhD,OAAO,QAAQ,MAA6B,YAAY;AACxD,SAAS,iBAAiB,QAAQ,mBAAmB;AA0DrD;AACA,OAAO,SAAS,UAAU,CAAC,KAAsB,EAAe;EAC9D,MAAM,QAAQ,GAAG,aAAa,CAAC,CAAC;EAChC,MAAM,cAAc,GAAG,iBAAiB,CAA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,MAAM,mBAAmB,KAAK,CAAC,KAAK,IAAI,EAAE,EAAE;EAC9D,yBACG,IAAI;IAAA,IACH,IAAI;MAAA,OAAE,kBAAK,CAAC,IAAI,KAAK,SAAS,OAAI,CAAC,KAAK,CAAC,QAAQ;IAAA;IAAA,IACjD,QAAQ;MAAA,uDAGG,SAAS,CAAC,CAAC,gDACL,KAAK,CAAC,MAAM,GAAG,MAAM,YAAG,SAAS,0DAChC,KAAK,CAAC,MAAM,kDACX,KAAK,CAAC,WAAW,GAAG,QAAQ,YAAG,SAAS,8CAC5C,KAAK,CAAC,IAAI,GAAG,MAAM,YAAG,SAAS,mDACnC,KAAK,CAAC,KAAK,4CACR,KAAK,CAAC,QAAQ,kBAGvB,OAAO,CAAC,CAAC;IAAA;IAAA;MAAA,uDAKL,SAAS,CAAC,CAAC,kDACZ,KAAK,CAAC,IAAI,gDACH,KAAK,CAAC,MAAM,GAAG,MAAM,YAAG,SAAS,iDAChC,KAAK,CAAC,MAAM,GAAG,MAAM,YAAG,SAAS,mDACxC,KAAK,CAAC,KAAK,0BAGjB,OAAO,CAAC,CAAC;IAAA;EAAA;AAIlB","ignoreList":[]}
@@ -12,37 +12,37 @@ var _tmpl$ = "<span class=\"k2b-chat-progress-dots\" aria-hidden=\"true\"><span>
12
12
  _tmpl$5 = "<i class=\"ti ti-dots\" aria-hidden=\"true\"></i>",
13
13
  _tmpl$6 = ["<span class=\"k2b-chat-message__actions\" role=\"group\"", ">", "", "</span>"],
14
14
  _tmpl$7 = ["<footer class=\"k2b-chat-message__meta\">", "", "", "", "</footer>"],
15
- _tmpl$8 = ["<article class=\"", "\"", "><span class=\"k2b-sr-only\">", ": </span>", "", "", "</article>"],
16
- _tmpl$9 = ["<img", ">"],
17
- _tmpl$0 = ["<span class=\"k2b-chat-message__attachment-text\"><strong>", "</strong>", "</span>"],
18
- _tmpl$1 = ["<i", " aria-hidden=\"true\"></i>"],
19
- _tmpl$10 = ["<div class=\"k2b-chat-message__attachment\"", " role=\"listitem\"", ">", "</div>"],
20
- _tmpl$11 = ["<a class=\"k2b-chat-message__attachment\"", " role=\"listitem\"", " target=\"_blank\" rel=\"noopener noreferrer\"", ">", "</a>"],
21
- _tmpl$12 = ["<span class=\"k2b-chat-message__status\"", "><i", " aria-hidden=\"true\"></i>", "</span>"],
22
- _tmpl$13 = ["<time", ">", "</time>"],
23
- _tmpl$14 = ["<span class=\"k2b-chat-activity__leading\" aria-hidden=\"true\">", "</span>"],
24
- _tmpl$15 = ["<span class=\"k2b-chat-activity__copy k2b-truncate-fade\"><strong", ">", "</strong>", "</span>"],
25
- _tmpl$16 = "<i class=\"ti ti-chevron-right k2b-chat-activity__chevron\" aria-hidden=\"true\"></i>",
26
- _tmpl$17 = ["<i", "></i>"],
15
+ _tmpl$8 = ["<article class=\"", "\"", ">", "", "", "", "</article>"],
16
+ _tmpl$9 = ["<span class=\"k2b-sr-only\">", ": </span>"],
17
+ _tmpl$0 = ["<div class=\"k2b-chat-message__source\">", "</div>"],
18
+ _tmpl$1 = ["<img", ">"],
19
+ _tmpl$10 = ["<span class=\"k2b-chat-message__attachment-text\"><strong>", "</strong>", "</span>"],
20
+ _tmpl$11 = ["<i", " aria-hidden=\"true\"></i>"],
21
+ _tmpl$12 = ["<div class=\"k2b-chat-message__attachment\"", " role=\"listitem\"", ">", "</div>"],
22
+ _tmpl$13 = ["<a class=\"k2b-chat-message__attachment\"", " role=\"listitem\"", " target=\"_blank\" rel=\"noopener noreferrer\"", ">", "</a>"],
23
+ _tmpl$14 = ["<span class=\"k2b-chat-message__status\"", "><i", " aria-hidden=\"true\"></i>", "</span>"],
24
+ _tmpl$15 = ["<time", ">", "</time>"],
25
+ _tmpl$16 = ["<i", "></i>"],
26
+ _tmpl$17 = ["<strong", ">", "</strong>"],
27
27
  _tmpl$18 = ["<small>", "</small>"],
28
- _tmpl$19 = ["<span class=\"k2b-chat-activity__meta k2b-truncate-fade\"", ">", "", "</span>"],
29
- _tmpl$20 = ["<span class=\"k2b-chat-activity__trailing\">", "</span>"],
30
- _tmpl$21 = ["<span class=\"k2b-chat-activity__duration\"", ">", "</span>"],
31
- _tmpl$22 = ["<button type=\"button\" class=\"k2b-chat-activity__toggle\"", "><span class=\"k2b-chat-activity__toggle-label\">", "</span><i class=\"ti ti-chevron-right k2b-chat-activity__chevron\" aria-hidden=\"true\"></i></button>"],
32
- _tmpl$23 = ["<details class=\"", "\"", " style=\"", "\"", "><summary class=\"k2b-chat-activity__row\"", ">", "</summary><div class=\"k2b-chat-activity__body\">", "</div></details>"],
33
- _tmpl$24 = ["<div class=\"", "\"", " style=\"", "\"", "><div class=\"k2b-chat-activity__row\">", "</div></div>"],
34
- _tmpl$25 = ["<div class=\"", "\"", " style=\"", "\"", "><div class=\"k2b-chat-activity__row\">", "</div><div", " class=\"k2b-chat-activity__body\"", ">", "</div></div>"],
35
- _tmpl$26 = ["<span class=\"k2b-chat-usage__number\">", "</span>"],
36
- _tmpl$27 = ["<span class=\"k2b-chat-usage\"", ">", "</span>"],
37
- _tmpl$28 = ["<p>", "</p>"],
38
- _tmpl$29 = ["<div><dt>", "</dt><dd>", "</dd></div>"],
39
- _tmpl$30 = ["<section class=\"k2b-chat-usage__part\"><header class=\"k2b-chat-usage__head\"><h4>", "</h4><span class=\"k2b-chat-usage__value\"", ">", "</span>", "</header>", "", "<dl>", "<div><dt>", "</dt><dd>", "</dd></div><div><dt>", "</dt><dd>", "</dd></div>", "", "<div><dt>", "</dt><dd>", "</dd></div>", "</dl></section>"],
40
- _tmpl$31 = ["<div class=\"k2b-chat-context__tooltip k2b-chat-usage__panel\">", "", "</div>"],
41
- _tmpl$32 = ["<span class=\"k2b-chat-usage__value\"", ">", "</span>"],
42
- _tmpl$33 = ["<section class=\"k2b-chat-usage__part\"", "><header class=\"k2b-chat-usage__head\"><h4>", "</h4>", "</header>", "</section>"];
28
+ _tmpl$19 = ["<span class=\"k2b-chat-activity__trailing\">", "</span>"],
29
+ _tmpl$20 = "<i class=\"ti ti-chevron-right k2b-chat-activity__chevron\" aria-hidden=\"true\"></i>",
30
+ _tmpl$21 = ["<button type=\"button\" class=\"k2b-chat-activity__toggle\"", "><span class=\"k2b-chat-activity__toggle-label\">", "</span><i class=\"ti ti-chevron-right k2b-chat-activity__chevron\" aria-hidden=\"true\"></i></button>"],
31
+ _tmpl$22 = ["<details class=\"", "\"", " style=\"", "\"", "><summary class=\"k2b-chat-activity__row\"", ">", "</summary><div class=\"k2b-chat-activity__body\">", "</div></details>"],
32
+ _tmpl$23 = ["<div class=\"", "\"", " style=\"", "\"", "><div class=\"k2b-chat-activity__row\">", "</div></div>"],
33
+ _tmpl$24 = ["<div class=\"", "\"", " style=\"", "\"", "><div class=\"k2b-chat-activity__row\">", "</div><div", " class=\"k2b-chat-activity__body\"", ">", "</div></div>"],
34
+ _tmpl$25 = ["<span class=\"k2b-chat-usage__number\">", "</span>"],
35
+ _tmpl$26 = ["<span class=\"k2b-chat-usage\"", ">", "</span>"],
36
+ _tmpl$27 = ["<p>", "</p>"],
37
+ _tmpl$28 = ["<div><dt>", "</dt><dd>", "</dd></div>"],
38
+ _tmpl$29 = ["<section class=\"k2b-chat-usage__part\"><header class=\"k2b-chat-usage__head\"><h4>", "</h4><span class=\"k2b-chat-usage__value\"", ">", "</span>", "</header>", "", "<dl>", "<div><dt>", "</dt><dd>", "</dd></div><div><dt>", "</dt><dd>", "</dd></div>", "", "<div><dt>", "</dt><dd>", "</dd></div>", "</dl></section>"],
39
+ _tmpl$30 = ["<div class=\"k2b-chat-context__tooltip k2b-chat-usage__panel\">", "", "</div>"],
40
+ _tmpl$31 = ["<span class=\"k2b-chat-usage__value\"", ">", "</span>"],
41
+ _tmpl$32 = ["<section class=\"k2b-chat-usage__part\"", "><header class=\"k2b-chat-usage__head\"><h4>", "</h4>", "</header>", "</section>"];
43
42
  import { children, createContext, createRenderEffect, createSignal, createUniqueId, For, onCleanup, Show, useContext } from "solid-js";
44
43
  import { Dropdown } from "../actions/Dropdown";
45
44
  import { Tooltip } from "../feedback/Tooltip";
45
+ import { StepRowContent } from "../internal/step-row";
46
46
  import { Format } from "../intl/Format";
47
47
  import { useLocale } from "../intl/locale";
48
48
  import { useUiMessages } from "../intl/messages";
@@ -143,7 +143,15 @@ export function ChatMessage(props) {
143
143
  disabled: action.disabled || Boolean(busyActionId()),
144
144
  action: () => void runAction(action)
145
145
  }));
146
- return _$ssr(_tmpl$8, `k2b-chat-message ${_$escape(props.class ?? "", true)}`, _$ssrAttribute("data-role", _$escape(props.role, true), false) + _$ssrAttribute("data-status", _$escape(props.status ?? "complete", true), false) + _$ssrAttribute("data-chat-anchor", props.anchorId !== undefined ? _$escape(String(props.anchorId), true) : _$escape(undefined, true), false) + _$ssrAttribute("aria-busy", props.status === "pending" || props.status === "streaming" ? "true" : _$escape(undefined, true), false), _$escape(props.label ?? roleLabel(props.role, chatMessages())), _$escape(_$createComponent(Show, {
146
+ return _$ssr(_tmpl$8, `k2b-chat-message ${_$escape(props.class ?? "", true)}`, _$ssrAttribute("data-role", _$escape(props.role, true), false) + _$ssrAttribute("data-status", _$escape(props.status ?? "complete", true), false) + _$ssrAttribute("data-chat-anchor", props.anchorId !== undefined ? _$escape(String(props.anchorId), true) : _$escape(undefined, true), false) + _$ssrAttribute("data-source", props.source ? "" : _$escape(undefined, true), false) + _$ssrAttribute("aria-busy", props.status === "pending" || props.status === "streaming" ? "true" : _$escape(undefined, true), false), _$escape(_$createComponent(Show, {
147
+ get when() {
148
+ return props.source;
149
+ },
150
+ get fallback() {
151
+ return _$ssr(_tmpl$9, _$escape(props.label ?? roleLabel(props.role, chatMessages())));
152
+ },
153
+ children: source => _$ssr(_tmpl$0, _$escape(source()))
154
+ })), _$escape(_$createComponent(Show, {
147
155
  get when() {
148
156
  return (props.attachments?.length ?? 0) > 0;
149
157
  },
@@ -160,17 +168,17 @@ export function ChatMessage(props) {
160
168
  return _$memo(() => !!(attachment.kind === "image" && attachment.previewUrl))() && attachment.previewUrl !== failedPreviewUrl();
161
169
  },
162
170
  get fallback() {
163
- return _$ssr(_tmpl$1, _$ssrAttribute("class", _$escape(attachmentIcon(attachment), true), false));
171
+ return _$ssr(_tmpl$11, _$ssrAttribute("class", _$escape(attachmentIcon(attachment), true), false));
164
172
  },
165
173
  get children() {
166
- return _$ssr(_tmpl$9, _$ssrAttribute("src", _$escape(attachment.previewUrl, true), false) + _$ssrAttribute("alt", _$escape(attachment.alt ?? attachment.name, true), false));
174
+ return _$ssr(_tmpl$1, _$ssrAttribute("src", _$escape(attachment.previewUrl, true), false) + _$ssrAttribute("alt", _$escape(attachment.alt ?? attachment.name, true), false));
167
175
  }
168
176
  }), _$createComponent(Show, {
169
177
  get when() {
170
178
  return attachment.kind !== "image";
171
179
  },
172
180
  get children() {
173
- return _$ssr(_tmpl$0, _$escape(attachment.name), _$escape(_$createComponent(Show, {
181
+ return _$ssr(_tmpl$10, _$escape(attachment.name), _$escape(_$createComponent(Show, {
174
182
  get when() {
175
183
  return _$memo(() => typeof attachment.size === "number")() && attachment.size > 0;
176
184
  },
@@ -189,9 +197,9 @@ export function ChatMessage(props) {
189
197
  return attachment.href;
190
198
  },
191
199
  get fallback() {
192
- return _$ssr(_tmpl$10, _$ssrAttribute("data-kind", _$escape(attachment.kind, true), false), _$ssrAttribute("title", _$escape(attachment.name, true), false), _$escape(content()));
200
+ return _$ssr(_tmpl$12, _$ssrAttribute("data-kind", _$escape(attachment.kind, true), false), _$ssrAttribute("title", _$escape(attachment.name, true), false), _$escape(content()));
193
201
  },
194
- children: href => _$ssr(_tmpl$11, _$ssrAttribute("data-kind", _$escape(attachment.kind, true), false), _$ssrAttribute("title", _$escape(attachment.name, true), false) + _$ssrAttribute("href", _$escape(href(), true), false), _$ssrAttribute("aria-label", _$escape(chatMessages().openInNewTab({
202
+ children: href => _$ssr(_tmpl$13, _$ssrAttribute("data-kind", _$escape(attachment.kind, true), false), _$ssrAttribute("title", _$escape(attachment.name, true), false) + _$ssrAttribute("href", _$escape(href(), true), false), _$ssrAttribute("aria-label", _$escape(chatMessages().openInNewTab({
195
203
  name: attachment.name
196
204
  }), true), false), _$escape(content()))
197
205
  });
@@ -219,7 +227,7 @@ export function ChatMessage(props) {
219
227
  get when() {
220
228
  return status();
221
229
  },
222
- children: label => _$ssr(_tmpl$12, _$ssrAttribute("role", props.status === "error" ? "alert" : "status", false), _$ssrAttribute("class", _$escape(statusIcon(props.status), true), false), _$escape(label()))
230
+ children: label => _$ssr(_tmpl$14, _$ssrAttribute("role", props.status === "error" ? "alert" : "status", false), _$ssrAttribute("class", _$escape(statusIcon(props.status), true), false), _$escape(label()))
223
231
  });
224
232
  },
225
233
  get children() {
@@ -229,7 +237,7 @@ export function ChatMessage(props) {
229
237
  get when() {
230
238
  return time();
231
239
  },
232
- children: label => _$ssr(_tmpl$13, _$ssrAttribute("datetime", _$escape(timestamp() ?? undefined, true), false), _$escape(label()))
240
+ children: label => _$ssr(_tmpl$15, _$ssrAttribute("datetime", _$escape(timestamp() ?? undefined, true), false), _$escape(label()))
233
241
  })), _$escape(_$createComponent(Show, {
234
242
  get when() {
235
243
  return _$memo(() => actions().length > 0)() && actionDisplay() === "inline";
@@ -261,7 +269,7 @@ export function ChatMessage(props) {
261
269
  },
262
270
  onClick: () => void runAction(action),
263
271
  get children() {
264
- return _$ssr(_tmpl$1, _$ssrAttribute("class", _$escape(actionIcon(action), true), false));
272
+ return _$ssr(_tmpl$11, _$ssrAttribute("class", _$escape(actionIcon(action), true), false));
265
273
  }
266
274
  })
267
275
  })), _$escape(_$createComponent(Show, {
@@ -335,30 +343,60 @@ export function ChatMessage(props) {
335
343
  * One row on the shared grid: icon, text, meta, duration, and the chevron or ⓘ. Every cell has its own column, so a
336
344
  * missing one shifts nothing, and the right columns end on the same edge in every row.
337
345
  */
338
- const ActivityContent = props => [_$ssr(_tmpl$14, _$escape(_$createComponent(Show, {
339
- get when() {
340
- return props.leading;
346
+ const ActivityContent = props => _$createComponent(StepRowContent, {
347
+ classes: {
348
+ leading: "k2b-chat-activity__leading",
349
+ label: "k2b-chat-activity__copy k2b-truncate-fade",
350
+ meta: "k2b-chat-activity__meta k2b-truncate-fade",
351
+ duration: "k2b-chat-activity__duration"
341
352
  },
342
- get fallback() {
343
- return _$ssr(_tmpl$17, _$ssrAttribute("class", _$escape(props.icon ?? "ti ti-sparkles", true), false));
353
+ get leading() {
354
+ return _$createComponent(Show, {
355
+ get when() {
356
+ return props.leading;
357
+ },
358
+ get fallback() {
359
+ return _$ssr(_tmpl$16, _$ssrAttribute("class", _$escape(props.icon ?? "ti ti-sparkles", true), false));
360
+ },
361
+ get children() {
362
+ return props.leading;
363
+ }
364
+ });
344
365
  },
345
- get children() {
346
- return props.leading;
347
- }
348
- }))), _$ssr(_tmpl$15, _$ssrAttribute("title", typeof props.label === "string" ? _$escape(props.label, true) : _$escape(undefined, true), false), _$escape(props.label), _$escape(_$createComponent(Show, {
349
- get when() {
350
- return props.description;
366
+ get label() {
367
+ return [_$ssr(_tmpl$17, _$ssrAttribute("title", typeof props.label === "string" ? _$escape(props.label, true) : _$escape(undefined, true), false), _$escape(props.label)), _$createComponent(Show, {
368
+ get when() {
369
+ return props.description;
370
+ },
371
+ children: description => _$ssr(_tmpl$18, _$escape(description()))
372
+ })];
373
+ },
374
+ get meta() {
375
+ return _$memo(() => !!(props.meta || props.trailing))() && [props.meta, props.trailing && _$ssr(_tmpl$19, _$escape(props.trailing))];
376
+ },
377
+ get metaTone() {
378
+ return props.metaTone;
379
+ },
380
+ get duration() {
381
+ return props.duration;
382
+ },
383
+ get durationTitle() {
384
+ return props.durationTitle;
351
385
  },
352
- children: description => _$ssr(_tmpl$18, _$escape(description()))
353
- }))), (props.meta || props.trailing) && _$ssr(_tmpl$19, _$ssrAttribute("data-tone", _$escape(props.metaTone, true), false), _$escape(props.meta), props.trailing && _$ssr(_tmpl$20, _$escape(props.trailing))), props.duration && // A running row's clock ticks silently; the row says once what it does.
354
- _$ssr(_tmpl$21, _$ssrAttribute("title", _$escape(props.durationTitle, true), false) + _$ssrAttribute("aria-hidden", props.busy ? "true" : _$escape(undefined, true), false), _$escape(props.duration)), _$createComponent(Show, {
355
- get when() {
356
- return props.disclosure;
386
+ get silentDuration() {
387
+ return props.busy;
357
388
  },
358
- get children() {
359
- return _$ssr(_tmpl$16);
389
+ get end() {
390
+ return [_$createComponent(Show, {
391
+ get when() {
392
+ return props.disclosure;
393
+ },
394
+ get children() {
395
+ return _$ssr(_tmpl$20);
396
+ }
397
+ }), !props.expandable && props.end];
360
398
  }
361
- }), !props.expandable && props.end];
399
+ });
362
400
  const ActivityDisclosureContext = createContext();
363
401
  /**
364
402
  * The words of an activity label that open its body, with the chevron right after them. With a toggle in its label,
@@ -375,7 +413,7 @@ export function ChatActivityToggle(props) {
375
413
  get fallback() {
376
414
  return props.children;
377
415
  },
378
- children: current => _$ssr(_tmpl$22, _$ssrAttribute("aria-expanded", current().open() ? "true" : "false", false) + _$ssrAttribute("aria-controls", _$escape(current().bodyId, true), false), _$escape(props.children))
416
+ children: current => _$ssr(_tmpl$21, _$ssrAttribute("aria-expanded", current().open() ? "true" : "false", false) + _$ssrAttribute("aria-controls", _$escape(current().bodyId, true), false), _$escape(props.children))
379
417
  });
380
418
  }
381
419
  export function ChatActivity(props) {
@@ -427,7 +465,7 @@ export function ChatActivity(props) {
427
465
  return expandable();
428
466
  },
429
467
  get fallback() {
430
- return _$ssr(_tmpl$24, `k2b-chat-activity ${_$escape(props.class ?? "", true)}`, _$ssrAttribute("data-tone", _$escape(tone(), true), false) + _$ssrAttribute("data-accent", props.accent ? "true" : _$escape(undefined, true), false) + _$ssrAttribute("data-busy", props.busy ? "true" : _$escape(undefined, true), false) + _$ssrAttribute("data-wrap", props.wrap ? "true" : _$escape(undefined, true), false) + _$ssrAttribute("data-chat-anchor", props.anchorId !== undefined ? _$escape(String(props.anchorId), true) : _$escape(undefined, true), false), _$ssrStyle(style()), _$ssrAttribute("aria-busy", props.busy ? "true" : _$escape(undefined, true), false), _$escape(_$createComponent(ActivityContent, _$mergeProps(props, {
468
+ return _$ssr(_tmpl$23, `k2b-chat-activity ${_$escape(props.class ?? "", true)}`, _$ssrAttribute("data-tone", _$escape(tone(), true), false) + _$ssrAttribute("data-accent", props.accent ? "true" : _$escape(undefined, true), false) + _$ssrAttribute("data-busy", props.busy ? "true" : _$escape(undefined, true), false) + _$ssrAttribute("data-wrap", props.wrap ? "true" : _$escape(undefined, true), false) + _$ssrAttribute("data-chat-anchor", props.anchorId !== undefined ? _$escape(String(props.anchorId), true) : _$escape(undefined, true), false), _$ssrStyle(style()), _$ssrAttribute("aria-busy", props.busy ? "true" : _$escape(undefined, true), false), _$escape(_$createComponent(ActivityContent, _$mergeProps(props, {
431
469
  get label() {
432
470
  return label();
433
471
  }
@@ -439,7 +477,7 @@ export function ChatActivity(props) {
439
477
  return toggles() === 0;
440
478
  },
441
479
  get fallback() {
442
- return _$ssr(_tmpl$25, `k2b-chat-activity ${_$escape(props.class ?? "", true)}`, _$ssrAttribute("data-tone", _$escape(tone(), true), false) + _$ssrAttribute("data-accent", props.accent ? "true" : _$escape(undefined, true), false) + _$ssrAttribute("data-busy", props.busy ? "true" : _$escape(undefined, true), false) + _$ssrAttribute("data-wrap", props.wrap ? "true" : _$escape(undefined, true), false) + _$ssrAttribute("data-body-inset", props.bodyInset === false ? "false" : _$escape(undefined, true), false) + _$ssrAttribute("data-open", open() ? "true" : "false", false) + _$ssrAttribute("data-chat-anchor", props.anchorId !== undefined ? _$escape(String(props.anchorId), true) : _$escape(undefined, true), false), _$ssrStyle(style()), _$ssrAttribute("aria-busy", props.busy ? "true" : _$escape(undefined, true), false), _$escape(_$createComponent(ActivityContent, _$mergeProps(props, {
480
+ return _$ssr(_tmpl$24, `k2b-chat-activity ${_$escape(props.class ?? "", true)}`, _$ssrAttribute("data-tone", _$escape(tone(), true), false) + _$ssrAttribute("data-accent", props.accent ? "true" : _$escape(undefined, true), false) + _$ssrAttribute("data-busy", props.busy ? "true" : _$escape(undefined, true), false) + _$ssrAttribute("data-wrap", props.wrap ? "true" : _$escape(undefined, true), false) + _$ssrAttribute("data-body-inset", props.bodyInset === false ? "false" : _$escape(undefined, true), false) + _$ssrAttribute("data-open", open() ? "true" : "false", false) + _$ssrAttribute("data-chat-anchor", props.anchorId !== undefined ? _$escape(String(props.anchorId), true) : _$escape(undefined, true), false), _$ssrStyle(style()), _$ssrAttribute("aria-busy", props.busy ? "true" : _$escape(undefined, true), false), _$escape(_$createComponent(ActivityContent, _$mergeProps(props, {
443
481
  get label() {
444
482
  return label();
445
483
  },
@@ -447,7 +485,7 @@ export function ChatActivity(props) {
447
485
  }))), _$ssrAttribute("id", _$escape(bodyId, true), false), _$ssrAttribute("hidden", !open(), true), _$escape(body()));
448
486
  },
449
487
  get children() {
450
- return _$ssr(_tmpl$23, `k2b-chat-activity ${_$escape(props.class ?? "", true)}`, _$ssrAttribute("data-tone", _$escape(tone(), true), false) + _$ssrAttribute("data-accent", props.accent ? "true" : _$escape(undefined, true), false) + _$ssrAttribute("data-busy", props.busy ? "true" : _$escape(undefined, true), false) + _$ssrAttribute("data-wrap", props.wrap ? "true" : _$escape(undefined, true), false) + _$ssrAttribute("data-body-inset", props.bodyInset === false ? "false" : _$escape(undefined, true), false) + _$ssrAttribute("data-chat-anchor", props.anchorId !== undefined ? _$escape(String(props.anchorId), true) : _$escape(undefined, true), false), _$ssrStyle(style()), _$ssrAttribute("open", open(), true) + _$ssrAttribute("aria-busy", props.busy ? "true" : _$escape(undefined, true), false), _$ssrAttribute("aria-label", _$escape(props.ariaLabel, true), false), _$escape(_$createComponent(ActivityContent, _$mergeProps(props, {
488
+ return _$ssr(_tmpl$22, `k2b-chat-activity ${_$escape(props.class ?? "", true)}`, _$ssrAttribute("data-tone", _$escape(tone(), true), false) + _$ssrAttribute("data-accent", props.accent ? "true" : _$escape(undefined, true), false) + _$ssrAttribute("data-busy", props.busy ? "true" : _$escape(undefined, true), false) + _$ssrAttribute("data-wrap", props.wrap ? "true" : _$escape(undefined, true), false) + _$ssrAttribute("data-body-inset", props.bodyInset === false ? "false" : _$escape(undefined, true), false) + _$ssrAttribute("data-chat-anchor", props.anchorId !== undefined ? _$escape(String(props.anchorId), true) : _$escape(undefined, true), false), _$ssrStyle(style()), _$ssrAttribute("open", open(), true) + _$ssrAttribute("aria-busy", props.busy ? "true" : _$escape(undefined, true), false), _$ssrAttribute("aria-label", _$escape(props.ariaLabel, true), false), _$escape(_$createComponent(ActivityContent, _$mergeProps(props, {
451
489
  get label() {
452
490
  return label();
453
491
  },
@@ -527,14 +565,14 @@ export function ChatContextUsage(props) {
527
565
  parts: [...(showContext() ? [contextSummary()] : []), ...sections().map(section => section.summary)].join(", ")
528
566
  });
529
567
  const actionTooltip = action => action.disabled && action.disabledReason ? action.disabledReason : action.label;
530
- return _$ssr(_tmpl$27, _$ssrAttribute("data-warning", warning() ? "true" : _$escape(undefined, true), false), _$escape(_$createComponent(ChatContextPopup, {
568
+ return _$ssr(_tmpl$26, _$ssrAttribute("data-warning", warning() ? "true" : _$escape(undefined, true), false), _$escape(_$createComponent(ChatContextPopup, {
531
569
  get content() {
532
- return _$ssr(_tmpl$31, _$escape(_$createComponent(Show, {
570
+ return _$ssr(_tmpl$30, _$escape(_$createComponent(Show, {
533
571
  get when() {
534
572
  return showContext();
535
573
  },
536
574
  get children() {
537
- return _$ssr(_tmpl$30, _$escape(chatMessages().thisChat), _$ssrAttribute("data-warning", contextWarns() ? "true" : _$escape(undefined, true), false), percent() === null ? reported() ? _$escape(chatMessages().tokensUsed({
575
+ return _$ssr(_tmpl$29, _$escape(chatMessages().thisChat), _$ssrAttribute("data-warning", contextWarns() ? "true" : _$escape(undefined, true), false), percent() === null ? reported() ? _$escape(chatMessages().tokensUsed({
538
576
  total: formatNumber(total())
539
577
  })) : _$escape(messages().unknown) : _$escape(chatMessages().contextFull({
540
578
  percent: formatPercent(percent())
@@ -559,7 +597,7 @@ export function ChatContextUsage(props) {
559
597
  },
560
598
  onClick: () => void run(),
561
599
  get children() {
562
- return _$ssr(_tmpl$1, _$ssrAttribute("class", busy() ? "ti ti-loader-2 k2b-spin" : _$escape(action().icon ?? "ti ti-arrows-diagonal-minimize-2", true), false));
600
+ return _$ssr(_tmpl$11, _$ssrAttribute("class", busy() ? "ti ti-loader-2 k2b-spin" : _$escape(action().icon ?? "ti ti-arrows-diagonal-minimize-2", true), false));
563
601
  }
564
602
  })
565
603
  })), _$escape(_$createComponent(Show, {
@@ -585,33 +623,33 @@ export function ChatContextUsage(props) {
585
623
  return props.note;
586
624
  },
587
625
  get children() {
588
- return _$ssr(_tmpl$28, _$escape(props.note));
626
+ return _$ssr(_tmpl$27, _$escape(props.note));
589
627
  }
590
628
  })), _$escape(_$createComponent(Show, {
591
629
  get when() {
592
630
  return props.modelLabel;
593
631
  },
594
- children: model => _$ssr(_tmpl$29, _$escape(chatMessages().model), _$escape(model()))
632
+ children: model => _$ssr(_tmpl$28, _$escape(chatMessages().model), _$escape(model()))
595
633
  })), _$escape(chatMessages().input), _$escape(formattedUsageValue(usage().input)), _$escape(chatMessages().output), _$escape(formattedUsageValue(usage().output)), _$escape(_$createComponent(Show, {
596
634
  get when() {
597
635
  return reported();
598
636
  },
599
637
  get children() {
600
- return _$ssr(_tmpl$29, _$escape(chatMessages().contextInUse), _$escape(formatNumber(total())));
638
+ return _$ssr(_tmpl$28, _$escape(chatMessages().contextInUse), _$escape(formatNumber(total())));
601
639
  }
602
640
  })), _$escape(_$createComponent(Show, {
603
641
  get when() {
604
642
  return loopUsage().reported;
605
643
  },
606
644
  get children() {
607
- return _$ssr(_tmpl$29, _$escape(chatMessages().loopTotal), _$escape(formattedUsageValue(loopUsage().total)));
645
+ return _$ssr(_tmpl$28, _$escape(chatMessages().loopTotal), _$escape(formattedUsageValue(loopUsage().total)));
608
646
  }
609
647
  })), _$escape(chatMessages().contextWindow), windowSize() > 0 ? _$escape(formatNumber(windowSize())) : _$escape(chatMessages().notConfigured), _$escape(_$createComponent(Show, {
610
648
  get when() {
611
649
  return remaining() !== null;
612
650
  },
613
651
  get children() {
614
- return _$ssr(_tmpl$29, _$escape(chatMessages().remaining), remaining() === null ? _$escape(messages().unknown) : _$escape(formatNumber(remaining())));
652
+ return _$ssr(_tmpl$28, _$escape(chatMessages().remaining), remaining() === null ? _$escape(messages().unknown) : _$escape(formatNumber(remaining())));
615
653
  }
616
654
  })));
617
655
  }
@@ -619,12 +657,12 @@ export function ChatContextUsage(props) {
619
657
  get each() {
620
658
  return sections();
621
659
  },
622
- children: section => _$ssr(_tmpl$33, _$ssrAttribute("data-section", _$escape(section.id, true), false), _$escape(section.title), _$escape(_$createComponent(Show, {
660
+ children: section => _$ssr(_tmpl$32, _$ssrAttribute("data-section", _$escape(section.id, true), false), _$escape(section.title), _$escape(_$createComponent(Show, {
623
661
  get when() {
624
662
  return section.value;
625
663
  },
626
664
  get children() {
627
- return _$ssr(_tmpl$32, _$ssrAttribute("data-warning", sectionWarns(section) ? "true" : _$escape(undefined, true), false), _$escape(section.value));
665
+ return _$ssr(_tmpl$31, _$ssrAttribute("data-warning", sectionWarns(section) ? "true" : _$escape(undefined, true), false), _$escape(section.value));
628
666
  }
629
667
  })), _$escape(section.content))
630
668
  })));
@@ -655,7 +693,7 @@ export function ChatContextUsage(props) {
655
693
  return _$memo(() => !!warning())() && highest() !== null;
656
694
  },
657
695
  get children() {
658
- return _$ssr(_tmpl$26, _$escape(formatPercent(highest())));
696
+ return _$ssr(_tmpl$25, _$escape(formatPercent(highest())));
659
697
  }
660
698
  })];
661
699
  }