@mastra/playground-ui 69.0.0-alpha.6 → 69.0.0-alpha.7

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.
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_rolldown_runtime = require("../rolldown-runtime-CmQyd0Gu.cjs");
2
+ require('../Switch.css');const require_rolldown_runtime = require("../rolldown-runtime-CmQyd0Gu.cjs");
3
3
  const require_field_control_aria = require("../field-control-aria-Dw0_ObOU.cjs");
4
4
  const require_primitives_transitions = require("../primitives/transitions.cjs.js");
5
5
  const require_utils = require("../utils-uDc1ofX1.cjs");
@@ -24,12 +24,12 @@ var Switch = react.forwardRef(({ className, asChild, children, icon, checkedIcon
24
24
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_base_ui_react_switch.Switch.Root, {
25
25
  ref,
26
26
  "data-slot": "switch",
27
- className: require_utils.cn("peer group/switch inline-flex h-[18px] w-[30px] shrink-0 cursor-pointer items-center rounded-full border-0 bg-fill-active p-0.5", "transition-colors duration-fast ease-out-custom motion-reduce:transition-none", "hover:bg-fill-strong", require_primitives_transitions.focusRingOffset, "data-[checked]:bg-foreground/90 data-[checked]:hover:bg-foreground", "data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50", "data-[disabled]:hover:bg-fill-active data-[disabled]:data-[checked]:hover:bg-foreground/90", className),
27
+ className: require_utils.cn("peer group/switch inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-0 bg-fill-hover p-0.5", "transition-colors duration-normal ease-out-custom motion-reduce:transition-none", "hover:bg-fill-active", "active:bg-fill-strong", require_primitives_transitions.focusRingOffset, "data-[checked]:bg-foreground/90", "data-[checked]:hover:bg-foreground", "data-[checked]:active:bg-foreground/75", "data-[disabled]:cursor-not-allowed data-[disabled]:bg-fill-hover data-[disabled]:hover:bg-fill-hover", "data-[disabled]:data-[checked]:bg-foreground/30 data-[disabled]:data-[checked]:hover:bg-foreground/30", className),
28
28
  ...renderProps,
29
29
  ...props,
30
30
  children: [asChild ? void 0 : children, /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_switch.Switch.Thumb, {
31
31
  "data-slot": "switch-thumb",
32
- className: require_utils.cn("pointer-events-none relative isolate block size-3.5 rounded-full bg-foreground data-[checked]:bg-background", "transition-[translate] duration-fast ease-out-custom motion-reduce:transition-none", "data-[checked]:translate-x-3", "after:absolute after:inset-0 after:-z-10 after:rounded-full after:bg-inherit after:content-['']", "after:transition-[translate] after:duration-fast after:ease-out-custom motion-reduce:after:transition-none", "[@media(hover:hover)]:group-[:hover:not([data-disabled])]/switch:after:translate-x-0.5", "[@media(hover:hover)]:group-[:hover:not([data-disabled])]/switch:data-[checked]:after:-translate-x-0.5"),
32
+ className: require_utils.cn("switch-thumb-motion pointer-events-none relative block h-4 w-5 rounded-full bg-foreground", "transition-[background-color,translate,width,transform] duration-normal ease-out-custom motion-reduce:transition-none", "group-active/switch:w-6 group-data-[disabled]/switch:w-5", "data-[checked]:translate-x-3 data-[checked]:bg-background data-[unchecked]:translate-x-0", "group-active/switch:data-[checked]:translate-x-2", "data-[disabled]:data-[checked]:bg-background/75 data-[disabled]:data-[unchecked]:bg-foreground/45"),
33
33
  children: shouldRenderIcon ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SwitchThumbIcon, {
34
34
  checkedIcon: onIcon,
35
35
  icon: singleIcon,
@@ -40,7 +40,7 @@ var Switch = react.forwardRef(({ className, asChild, children, icon, checkedIcon
40
40
  });
41
41
  Switch.displayName = "Switch";
42
42
  function SwitchThumbIcon({ checkedIcon, icon, uncheckedIcon }) {
43
- const iconClassName = require_utils.cn("absolute inset-0 flex items-center justify-center text-background", "transition-opacity duration-fast ease-out-custom motion-reduce:transition-none", "[&_svg]:stroke-2.5 [&_svg]:size-2.5");
43
+ const iconClassName = require_utils.cn("absolute inset-0 flex items-center justify-center text-background", "transition-[color,opacity] duration-normal ease-out-custom motion-reduce:transition-none", "[&_svg]:stroke-2.5 [&_svg]:size-2.5");
44
44
  if (icon !== void 0) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
45
45
  "aria-hidden": true,
46
46
  "data-slot": "switch-thumb-icon",
@@ -1 +1 @@
1
- {"version":3,"file":"Switch.cjs.js","names":["React","keepOwnAccessibleName","SwitchPrimitive","cn","focusRingOffset","_Fragment"],"sources":["../../src/ds/components/Switch/switch.tsx"],"sourcesContent":["import { Switch as SwitchPrimitive } from '@base-ui/react/switch';\nimport * as React from 'react';\n\nimport { keepOwnAccessibleName } from '@/ds/components/Field/field-control-aria';\nimport { focusRingOffset } from '@/ds/primitives/transitions';\nimport { cn } from '@/lib/utils';\n\ntype SwitchProps = Omit<SwitchPrimitive.Root.Props, 'className'> & {\n className?: string;\n /** @deprecated Use Base UI's native `render` prop instead for stronger composition typing. */\n asChild?: boolean;\n icon?: React.ReactNode;\n checkedIcon?: React.ReactNode;\n uncheckedIcon?: React.ReactNode;\n};\n\nconst Switch = React.forwardRef<HTMLButtonElement, SwitchProps>(\n ({ className, asChild, children, icon, checkedIcon, uncheckedIcon, ...props }, ref) => {\n const shouldRenderStateIcons = checkedIcon !== undefined || uncheckedIcon !== undefined;\n const shouldRenderIcon = icon !== undefined || shouldRenderStateIcons;\n\n const singleIcon = shouldRenderStateIcons ? undefined : icon;\n const onIcon = checkedIcon ?? icon;\n const offIcon = uncheckedIcon ?? icon;\n\n // Base UI's Switch.Root defaults to a `<span>` and forwards `id` to its\n // hidden checkbox input. Render a native `<button>` (with `nativeButton`) so\n // the consumer's `id` — and the click target — lands on the visible control,\n // matching the previous Radix behavior.\n const renderProps =\n asChild && React.isValidElement(children)\n ? { render: children as React.ReactElement }\n : { render: <button type=\"button\" {...keepOwnAccessibleName(props)} />, nativeButton: true };\n\n return (\n <SwitchPrimitive.Root\n ref={ref}\n data-slot=\"switch\"\n className={cn(\n 'peer group/switch inline-flex h-[18px] w-[30px] shrink-0 cursor-pointer items-center rounded-full border-0 bg-fill-active p-0.5',\n 'transition-colors duration-fast ease-out-custom motion-reduce:transition-none',\n 'hover:bg-fill-strong',\n focusRingOffset,\n 'data-[checked]:bg-foreground/90 data-[checked]:hover:bg-foreground',\n 'data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50',\n 'data-[disabled]:hover:bg-fill-active data-[disabled]:data-[checked]:hover:bg-foreground/90',\n className,\n )}\n {...renderProps}\n {...props}\n >\n {asChild ? undefined : children}\n {/* A round thumb that slides with `translate`. On hover a same-color copy\n (`::after`) shifts 2px toward the travel direction, so the pair reads as\n a pill without animating width. Colors swap instantly; only the track fades. */}\n <SwitchPrimitive.Thumb\n data-slot=\"switch-thumb\"\n className={cn(\n 'pointer-events-none relative isolate block size-3.5 rounded-full bg-foreground data-[checked]:bg-background',\n 'transition-[translate] duration-fast ease-out-custom motion-reduce:transition-none',\n 'data-[checked]:translate-x-3',\n \"after:absolute after:inset-0 after:-z-10 after:rounded-full after:bg-inherit after:content-['']\",\n 'after:transition-[translate] after:duration-fast after:ease-out-custom motion-reduce:after:transition-none',\n '[@media(hover:hover)]:group-[:hover:not([data-disabled])]/switch:after:translate-x-0.5',\n '[@media(hover:hover)]:group-[:hover:not([data-disabled])]/switch:data-[checked]:after:-translate-x-0.5',\n )}\n >\n {shouldRenderIcon ? <SwitchThumbIcon checkedIcon={onIcon} icon={singleIcon} uncheckedIcon={offIcon} /> : null}\n </SwitchPrimitive.Thumb>\n </SwitchPrimitive.Root>\n );\n },\n);\nSwitch.displayName = 'Switch';\n\nfunction SwitchThumbIcon({\n checkedIcon,\n icon,\n uncheckedIcon,\n}: {\n checkedIcon?: React.ReactNode;\n icon?: React.ReactNode;\n uncheckedIcon?: React.ReactNode;\n}) {\n const iconClassName = cn(\n 'absolute inset-0 flex items-center justify-center text-background',\n 'transition-opacity duration-fast ease-out-custom motion-reduce:transition-none',\n '[&_svg]:stroke-2.5 [&_svg]:size-2.5',\n );\n\n if (icon !== undefined) {\n return (\n <span\n aria-hidden\n data-slot=\"switch-thumb-icon\"\n className={cn(iconClassName, 'group-data-[checked]/switch:text-foreground')}\n >\n {icon}\n </span>\n );\n }\n\n return (\n <>\n {uncheckedIcon !== undefined ? (\n <span\n aria-hidden\n data-slot=\"switch-thumb-icon\"\n data-switch-icon=\"unchecked\"\n className={cn(iconClassName, 'opacity-100 group-data-[checked]/switch:opacity-0')}\n >\n {uncheckedIcon}\n </span>\n ) : null}\n {checkedIcon !== undefined ? (\n <span\n aria-hidden\n data-slot=\"switch-thumb-icon\"\n data-switch-icon=\"checked\"\n className={cn(iconClassName, 'text-foreground opacity-0 group-data-[checked]/switch:opacity-100')}\n >\n {checkedIcon}\n </span>\n ) : null}\n </>\n );\n}\n\nexport { Switch };\nexport type { SwitchProps };\n"],"mappings":";;;;;;;;;;AAgBA,IAAM,SAASA,MAAM,YAClB,EAAE,WAAW,SAAS,UAAU,MAAM,aAAa,eAAe,GAAG,SAAS,QAAQ;CACrF,MAAM,yBAAyB,gBAAgB,KAAA,KAAa,kBAAkB,KAAA;CAC9E,MAAM,mBAAmB,SAAS,KAAA,KAAa;CAE/C,MAAM,aAAa,yBAAyB,KAAA,IAAY;CACxD,MAAM,SAAS,eAAe;CAC9B,MAAM,UAAU,iBAAiB;CAMjC,MAAM,cACJ,WAAWA,MAAM,eAAe,QAAQ,IACpC,EAAE,QAAQ,SAA+B,IACzC;EAAE,QAAQ,iBAAA,GAAA,kBAAA,IAAA,CAAC,UAAD;GAAQ,MAAK;GAAS,GAAIC,2BAAAA,sBAAsB,KAAK;EAAI,CAAA;EAAG,cAAc;CAAK;CAE/F,OACE,iBAAA,GAAA,kBAAA,KAAA,CAACC,sBAAAA,OAAgB,MAAjB;EACO;EACL,aAAU;EACV,WAAWC,cAAAA,GACT,mIACA,iFACA,wBACAC,+BAAAA,iBACA,sEACA,iEACA,8FACA,SACF;EACA,GAAI;EACJ,GAAI;EAdN,UAAA,CAgBG,UAAU,KAAA,IAAY,UAIvB,iBAAA,GAAA,kBAAA,IAAA,CAACF,sBAAAA,OAAgB,OAAjB;GACE,aAAU;GACV,WAAWC,cAAAA,GACT,+GACA,sFACA,gCACA,mGACA,8GACA,0FACA,wGACF;GAEC,UAAA,mBAAmB,iBAAA,GAAA,kBAAA,IAAA,CAAC,iBAAD;IAAiB,aAAa;IAAQ,MAAM;IAAY,eAAe;GAAU,CAAA,IAAI;EACpF,CAAA,CACH;;AAE1B,CACF;AACA,OAAO,cAAc;AAErB,SAAS,gBAAgB,EACvB,aACA,MACA,iBAKC;CACD,MAAM,gBAAgBA,cAAAA,GACpB,qEACA,kFACA,qCACF;CAEA,IAAI,SAAS,KAAA,GACX,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,QAAD;EACE,eAAA;EACA,aAAU;EACV,WAAWA,cAAAA,GAAG,eAAe,6CAA6C;EAEzE,UAAA;CACG,CAAA;CAIV,OACE,iBAAA,GAAA,kBAAA,KAAA,CAAAE,kBAAAA,UAAA,EAAA,UAAA,CACG,kBAAkB,KAAA,IACjB,iBAAA,GAAA,kBAAA,IAAA,CAAC,QAAD;EACE,eAAA;EACA,aAAU;EACV,oBAAiB;EACjB,WAAWF,cAAAA,GAAG,eAAe,mDAAmD;EAE/E,UAAA;CACG,CAAA,IACJ,MACH,gBAAgB,KAAA,IACf,iBAAA,GAAA,kBAAA,IAAA,CAAC,QAAD;EACE,eAAA;EACA,aAAU;EACV,oBAAiB;EACjB,WAAWA,cAAAA,GAAG,eAAe,mEAAmE;EAE/F,UAAA;CACG,CAAA,IACJ,IACJ,EAAA,CAAA;AAEN"}
1
+ {"version":3,"file":"Switch.cjs.js","names":["React","keepOwnAccessibleName","SwitchPrimitive","cn","focusRingOffset","_Fragment"],"sources":["../../src/ds/components/Switch/switch.tsx"],"sourcesContent":["import { Switch as SwitchPrimitive } from '@base-ui/react/switch';\nimport * as React from 'react';\n\nimport { keepOwnAccessibleName } from '@/ds/components/Field/field-control-aria';\nimport { focusRingOffset } from '@/ds/primitives/transitions';\nimport { cn } from '@/lib/utils';\nimport './switch.css';\n\ntype SwitchProps = Omit<SwitchPrimitive.Root.Props, 'className'> & {\n className?: string;\n /** @deprecated Use Base UI's native `render` prop instead for stronger composition typing. */\n asChild?: boolean;\n icon?: React.ReactNode;\n checkedIcon?: React.ReactNode;\n uncheckedIcon?: React.ReactNode;\n};\n\nconst Switch = React.forwardRef<HTMLButtonElement, SwitchProps>(\n ({ className, asChild, children, icon, checkedIcon, uncheckedIcon, ...props }, ref) => {\n const shouldRenderStateIcons = checkedIcon !== undefined || uncheckedIcon !== undefined;\n const shouldRenderIcon = icon !== undefined || shouldRenderStateIcons;\n\n const singleIcon = shouldRenderStateIcons ? undefined : icon;\n const onIcon = checkedIcon ?? icon;\n const offIcon = uncheckedIcon ?? icon;\n\n // Base UI's Switch.Root defaults to a `<span>` and forwards `id` to its\n // hidden checkbox input. Render a native `<button>` (with `nativeButton`) so\n // the consumer's `id` — and the click target — lands on the visible control,\n // matching the previous Radix behavior.\n const renderProps =\n asChild && React.isValidElement(children)\n ? { render: children as React.ReactElement }\n : { render: <button type=\"button\" {...keepOwnAccessibleName(props)} />, nativeButton: true };\n\n return (\n <SwitchPrimitive.Root\n ref={ref}\n data-slot=\"switch\"\n className={cn(\n 'peer group/switch inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-0 bg-fill-hover p-0.5',\n 'transition-colors duration-normal ease-out-custom motion-reduce:transition-none',\n 'hover:bg-fill-active',\n 'active:bg-fill-strong',\n focusRingOffset,\n 'data-[checked]:bg-foreground/90',\n 'data-[checked]:hover:bg-foreground',\n 'data-[checked]:active:bg-foreground/75',\n 'data-[disabled]:cursor-not-allowed data-[disabled]:bg-fill-hover data-[disabled]:hover:bg-fill-hover',\n 'data-[disabled]:data-[checked]:bg-foreground/30 data-[disabled]:data-[checked]:hover:bg-foreground/30',\n className,\n )}\n {...renderProps}\n {...props}\n >\n {asChild ? undefined : children}\n <SwitchPrimitive.Thumb\n data-slot=\"switch-thumb\"\n className={cn(\n 'switch-thumb-motion pointer-events-none relative block h-4 w-5 rounded-full bg-foreground',\n 'transition-[background-color,translate,width,transform] duration-normal ease-out-custom motion-reduce:transition-none',\n 'group-active/switch:w-6 group-data-[disabled]/switch:w-5',\n 'data-[checked]:translate-x-3 data-[checked]:bg-background data-[unchecked]:translate-x-0',\n 'group-active/switch:data-[checked]:translate-x-2',\n 'data-[disabled]:data-[checked]:bg-background/75 data-[disabled]:data-[unchecked]:bg-foreground/45',\n )}\n >\n {shouldRenderIcon ? <SwitchThumbIcon checkedIcon={onIcon} icon={singleIcon} uncheckedIcon={offIcon} /> : null}\n </SwitchPrimitive.Thumb>\n </SwitchPrimitive.Root>\n );\n },\n);\nSwitch.displayName = 'Switch';\n\nfunction SwitchThumbIcon({\n checkedIcon,\n icon,\n uncheckedIcon,\n}: {\n checkedIcon?: React.ReactNode;\n icon?: React.ReactNode;\n uncheckedIcon?: React.ReactNode;\n}) {\n const iconClassName = cn(\n 'absolute inset-0 flex items-center justify-center text-background',\n 'transition-[color,opacity] duration-normal ease-out-custom motion-reduce:transition-none',\n '[&_svg]:stroke-2.5 [&_svg]:size-2.5',\n );\n\n if (icon !== undefined) {\n return (\n <span\n aria-hidden\n data-slot=\"switch-thumb-icon\"\n className={cn(iconClassName, 'group-data-[checked]/switch:text-foreground')}\n >\n {icon}\n </span>\n );\n }\n\n return (\n <>\n {uncheckedIcon !== undefined ? (\n <span\n aria-hidden\n data-slot=\"switch-thumb-icon\"\n data-switch-icon=\"unchecked\"\n className={cn(iconClassName, 'opacity-100 group-data-[checked]/switch:opacity-0')}\n >\n {uncheckedIcon}\n </span>\n ) : null}\n {checkedIcon !== undefined ? (\n <span\n aria-hidden\n data-slot=\"switch-thumb-icon\"\n data-switch-icon=\"checked\"\n className={cn(iconClassName, 'text-foreground opacity-0 group-data-[checked]/switch:opacity-100')}\n >\n {checkedIcon}\n </span>\n ) : null}\n </>\n );\n}\n\nexport { Switch };\nexport type { SwitchProps };\n"],"mappings":";;;;;;;;;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AAA,GAAG,eAAe,6CAA6C;EAEzE,UAAA;CACG,CAAA;CAIV,OACE,iBAAA,GAAA,kBAAA,KAAA,CAAAE,kBAAAA,UAAA,EAAA,UAAA,CACG,kBAAkB,KAAA,IACjB,iBAAA,GAAA,kBAAA,IAAA,CAAC,QAAD;EACE,eAAA;EACA,aAAU;EACV,oBAAiB;EACjB,WAAWF,cAAAA,GAAG,eAAe,mDAAmD;EAE/E,UAAA;CACG,CAAA,IACJ,MACH,gBAAgB,KAAA,IACf,iBAAA,GAAA,kBAAA,IAAA,CAAC,QAAD;EACE,eAAA;EACA,aAAU;EACV,oBAAiB;EACjB,WAAWA,cAAAA,GAAG,eAAe,mEAAmE;EAE/F,UAAA;CACG,CAAA,IACJ,IACJ,EAAA,CAAA;AAEN"}
@@ -4,7 +4,7 @@ import { t as cn } from "../utils-DQx8TpNT.js";
4
4
  import * as React$1 from "react";
5
5
  import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
6
6
  import { Switch as Switch$1 } from "@base-ui/react/switch";
7
- // src/ds/components/Switch/switch.tsx
7
+ import '../Switch.css';// src/ds/components/Switch/switch.tsx
8
8
  var Switch = React$1.forwardRef(({ className, asChild, children, icon, checkedIcon, uncheckedIcon, ...props }, ref) => {
9
9
  const shouldRenderStateIcons = checkedIcon !== void 0 || uncheckedIcon !== void 0;
10
10
  const shouldRenderIcon = icon !== void 0 || shouldRenderStateIcons;
@@ -21,12 +21,12 @@ var Switch = React$1.forwardRef(({ className, asChild, children, icon, checkedIc
21
21
  return /* @__PURE__ */ jsxs(Switch$1.Root, {
22
22
  ref,
23
23
  "data-slot": "switch",
24
- className: cn("peer group/switch inline-flex h-[18px] w-[30px] shrink-0 cursor-pointer items-center rounded-full border-0 bg-fill-active p-0.5", "transition-colors duration-fast ease-out-custom motion-reduce:transition-none", "hover:bg-fill-strong", focusRingOffset, "data-[checked]:bg-foreground/90 data-[checked]:hover:bg-foreground", "data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50", "data-[disabled]:hover:bg-fill-active data-[disabled]:data-[checked]:hover:bg-foreground/90", className),
24
+ className: cn("peer group/switch inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-0 bg-fill-hover p-0.5", "transition-colors duration-normal ease-out-custom motion-reduce:transition-none", "hover:bg-fill-active", "active:bg-fill-strong", focusRingOffset, "data-[checked]:bg-foreground/90", "data-[checked]:hover:bg-foreground", "data-[checked]:active:bg-foreground/75", "data-[disabled]:cursor-not-allowed data-[disabled]:bg-fill-hover data-[disabled]:hover:bg-fill-hover", "data-[disabled]:data-[checked]:bg-foreground/30 data-[disabled]:data-[checked]:hover:bg-foreground/30", className),
25
25
  ...renderProps,
26
26
  ...props,
27
27
  children: [asChild ? void 0 : children, /* @__PURE__ */ jsx(Switch$1.Thumb, {
28
28
  "data-slot": "switch-thumb",
29
- className: cn("pointer-events-none relative isolate block size-3.5 rounded-full bg-foreground data-[checked]:bg-background", "transition-[translate] duration-fast ease-out-custom motion-reduce:transition-none", "data-[checked]:translate-x-3", "after:absolute after:inset-0 after:-z-10 after:rounded-full after:bg-inherit after:content-['']", "after:transition-[translate] after:duration-fast after:ease-out-custom motion-reduce:after:transition-none", "[@media(hover:hover)]:group-[:hover:not([data-disabled])]/switch:after:translate-x-0.5", "[@media(hover:hover)]:group-[:hover:not([data-disabled])]/switch:data-[checked]:after:-translate-x-0.5"),
29
+ className: cn("switch-thumb-motion pointer-events-none relative block h-4 w-5 rounded-full bg-foreground", "transition-[background-color,translate,width,transform] duration-normal ease-out-custom motion-reduce:transition-none", "group-active/switch:w-6 group-data-[disabled]/switch:w-5", "data-[checked]:translate-x-3 data-[checked]:bg-background data-[unchecked]:translate-x-0", "group-active/switch:data-[checked]:translate-x-2", "data-[disabled]:data-[checked]:bg-background/75 data-[disabled]:data-[unchecked]:bg-foreground/45"),
30
30
  children: shouldRenderIcon ? /* @__PURE__ */ jsx(SwitchThumbIcon, {
31
31
  checkedIcon: onIcon,
32
32
  icon: singleIcon,
@@ -37,7 +37,7 @@ var Switch = React$1.forwardRef(({ className, asChild, children, icon, checkedIc
37
37
  });
38
38
  Switch.displayName = "Switch";
39
39
  function SwitchThumbIcon({ checkedIcon, icon, uncheckedIcon }) {
40
- const iconClassName = cn("absolute inset-0 flex items-center justify-center text-background", "transition-opacity duration-fast ease-out-custom motion-reduce:transition-none", "[&_svg]:stroke-2.5 [&_svg]:size-2.5");
40
+ const iconClassName = cn("absolute inset-0 flex items-center justify-center text-background", "transition-[color,opacity] duration-normal ease-out-custom motion-reduce:transition-none", "[&_svg]:stroke-2.5 [&_svg]:size-2.5");
41
41
  if (icon !== void 0) return /* @__PURE__ */ jsx("span", {
42
42
  "aria-hidden": true,
43
43
  "data-slot": "switch-thumb-icon",
@@ -1 +1 @@
1
- {"version":3,"file":"Switch.es.js","names":["React","SwitchPrimitive","_Fragment"],"sources":["../../src/ds/components/Switch/switch.tsx"],"sourcesContent":["import { Switch as SwitchPrimitive } from '@base-ui/react/switch';\nimport * as React from 'react';\n\nimport { keepOwnAccessibleName } from '@/ds/components/Field/field-control-aria';\nimport { focusRingOffset } from '@/ds/primitives/transitions';\nimport { cn } from '@/lib/utils';\n\ntype SwitchProps = Omit<SwitchPrimitive.Root.Props, 'className'> & {\n className?: string;\n /** @deprecated Use Base UI's native `render` prop instead for stronger composition typing. */\n asChild?: boolean;\n icon?: React.ReactNode;\n checkedIcon?: React.ReactNode;\n uncheckedIcon?: React.ReactNode;\n};\n\nconst Switch = React.forwardRef<HTMLButtonElement, SwitchProps>(\n ({ className, asChild, children, icon, checkedIcon, uncheckedIcon, ...props }, ref) => {\n const shouldRenderStateIcons = checkedIcon !== undefined || uncheckedIcon !== undefined;\n const shouldRenderIcon = icon !== undefined || shouldRenderStateIcons;\n\n const singleIcon = shouldRenderStateIcons ? undefined : icon;\n const onIcon = checkedIcon ?? icon;\n const offIcon = uncheckedIcon ?? icon;\n\n // Base UI's Switch.Root defaults to a `<span>` and forwards `id` to its\n // hidden checkbox input. Render a native `<button>` (with `nativeButton`) so\n // the consumer's `id` — and the click target — lands on the visible control,\n // matching the previous Radix behavior.\n const renderProps =\n asChild && React.isValidElement(children)\n ? { render: children as React.ReactElement }\n : { render: <button type=\"button\" {...keepOwnAccessibleName(props)} />, nativeButton: true };\n\n return (\n <SwitchPrimitive.Root\n ref={ref}\n data-slot=\"switch\"\n className={cn(\n 'peer group/switch inline-flex h-[18px] w-[30px] shrink-0 cursor-pointer items-center rounded-full border-0 bg-fill-active p-0.5',\n 'transition-colors duration-fast ease-out-custom motion-reduce:transition-none',\n 'hover:bg-fill-strong',\n focusRingOffset,\n 'data-[checked]:bg-foreground/90 data-[checked]:hover:bg-foreground',\n 'data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50',\n 'data-[disabled]:hover:bg-fill-active data-[disabled]:data-[checked]:hover:bg-foreground/90',\n className,\n )}\n {...renderProps}\n {...props}\n >\n {asChild ? undefined : children}\n {/* A round thumb that slides with `translate`. On hover a same-color copy\n (`::after`) shifts 2px toward the travel direction, so the pair reads as\n a pill without animating width. Colors swap instantly; only the track fades. */}\n <SwitchPrimitive.Thumb\n data-slot=\"switch-thumb\"\n className={cn(\n 'pointer-events-none relative isolate block size-3.5 rounded-full bg-foreground data-[checked]:bg-background',\n 'transition-[translate] duration-fast ease-out-custom motion-reduce:transition-none',\n 'data-[checked]:translate-x-3',\n \"after:absolute after:inset-0 after:-z-10 after:rounded-full after:bg-inherit after:content-['']\",\n 'after:transition-[translate] after:duration-fast after:ease-out-custom motion-reduce:after:transition-none',\n '[@media(hover:hover)]:group-[:hover:not([data-disabled])]/switch:after:translate-x-0.5',\n '[@media(hover:hover)]:group-[:hover:not([data-disabled])]/switch:data-[checked]:after:-translate-x-0.5',\n )}\n >\n {shouldRenderIcon ? <SwitchThumbIcon checkedIcon={onIcon} icon={singleIcon} uncheckedIcon={offIcon} /> : null}\n </SwitchPrimitive.Thumb>\n </SwitchPrimitive.Root>\n );\n },\n);\nSwitch.displayName = 'Switch';\n\nfunction SwitchThumbIcon({\n checkedIcon,\n icon,\n uncheckedIcon,\n}: {\n checkedIcon?: React.ReactNode;\n icon?: React.ReactNode;\n uncheckedIcon?: React.ReactNode;\n}) {\n const iconClassName = cn(\n 'absolute inset-0 flex items-center justify-center text-background',\n 'transition-opacity duration-fast ease-out-custom motion-reduce:transition-none',\n '[&_svg]:stroke-2.5 [&_svg]:size-2.5',\n );\n\n if (icon !== undefined) {\n return (\n <span\n aria-hidden\n data-slot=\"switch-thumb-icon\"\n className={cn(iconClassName, 'group-data-[checked]/switch:text-foreground')}\n >\n {icon}\n </span>\n );\n }\n\n return (\n <>\n {uncheckedIcon !== undefined ? (\n <span\n aria-hidden\n data-slot=\"switch-thumb-icon\"\n data-switch-icon=\"unchecked\"\n className={cn(iconClassName, 'opacity-100 group-data-[checked]/switch:opacity-0')}\n >\n {uncheckedIcon}\n </span>\n ) : null}\n {checkedIcon !== undefined ? (\n <span\n aria-hidden\n data-slot=\"switch-thumb-icon\"\n data-switch-icon=\"checked\"\n className={cn(iconClassName, 'text-foreground opacity-0 group-data-[checked]/switch:opacity-100')}\n >\n {checkedIcon}\n </span>\n ) : null}\n </>\n );\n}\n\nexport { Switch };\nexport type { SwitchProps };\n"],"mappings":";;;;;;;AAgBA,IAAM,SAASA,QAAM,YAClB,EAAE,WAAW,SAAS,UAAU,MAAM,aAAa,eAAe,GAAG,SAAS,QAAQ;CACrF,MAAM,yBAAyB,gBAAgB,KAAA,KAAa,kBAAkB,KAAA;CAC9E,MAAM,mBAAmB,SAAS,KAAA,KAAa;CAE/C,MAAM,aAAa,yBAAyB,KAAA,IAAY;CACxD,MAAM,SAAS,eAAe;CAC9B,MAAM,UAAU,iBAAiB;CAMjC,MAAM,cACJ,WAAWA,QAAM,eAAe,QAAQ,IACpC,EAAE,QAAQ,SAA+B,IACzC;EAAE,QAAQ,oBAAC,UAAD;GAAQ,MAAK;GAAS,GAAI,sBAAsB,KAAK;EAAI,CAAA;EAAG,cAAc;CAAK;CAE/F,OACE,qBAACC,SAAgB,MAAjB;EACO;EACL,aAAU;EACV,WAAW,GACT,mIACA,iFACA,wBACA,iBACA,sEACA,iEACA,8FACA,SACF;EACA,GAAI;EACJ,GAAI;EAdN,UAAA,CAgBG,UAAU,KAAA,IAAY,UAIvB,oBAACA,SAAgB,OAAjB;GACE,aAAU;GACV,WAAW,GACT,+GACA,sFACA,gCACA,mGACA,8GACA,0FACA,wGACF;GAEC,UAAA,mBAAmB,oBAAC,iBAAD;IAAiB,aAAa;IAAQ,MAAM;IAAY,eAAe;GAAU,CAAA,IAAI;EACpF,CAAA,CACH;;AAE1B,CACF;AACA,OAAO,cAAc;AAErB,SAAS,gBAAgB,EACvB,aACA,MACA,iBAKC;CACD,MAAM,gBAAgB,GACpB,qEACA,kFACA,qCACF;CAEA,IAAI,SAAS,KAAA,GACX,OACE,oBAAC,QAAD;EACE,eAAA;EACA,aAAU;EACV,WAAW,GAAG,eAAe,6CAA6C;EAEzE,UAAA;CACG,CAAA;CAIV,OACE,qBAAAC,YAAA,EAAA,UAAA,CACG,kBAAkB,KAAA,IACjB,oBAAC,QAAD;EACE,eAAA;EACA,aAAU;EACV,oBAAiB;EACjB,WAAW,GAAG,eAAe,mDAAmD;EAE/E,UAAA;CACG,CAAA,IACJ,MACH,gBAAgB,KAAA,IACf,oBAAC,QAAD;EACE,eAAA;EACA,aAAU;EACV,oBAAiB;EACjB,WAAW,GAAG,eAAe,mEAAmE;EAE/F,UAAA;CACG,CAAA,IACJ,IACJ,EAAA,CAAA;AAEN"}
1
+ {"version":3,"file":"Switch.es.js","names":["React","SwitchPrimitive","_Fragment"],"sources":["../../src/ds/components/Switch/switch.tsx"],"sourcesContent":["import { Switch as SwitchPrimitive } from '@base-ui/react/switch';\nimport * as React from 'react';\n\nimport { keepOwnAccessibleName } from '@/ds/components/Field/field-control-aria';\nimport { focusRingOffset } from '@/ds/primitives/transitions';\nimport { cn } from '@/lib/utils';\nimport './switch.css';\n\ntype SwitchProps = Omit<SwitchPrimitive.Root.Props, 'className'> & {\n className?: string;\n /** @deprecated Use Base UI's native `render` prop instead for stronger composition typing. */\n asChild?: boolean;\n icon?: React.ReactNode;\n checkedIcon?: React.ReactNode;\n uncheckedIcon?: React.ReactNode;\n};\n\nconst Switch = React.forwardRef<HTMLButtonElement, SwitchProps>(\n ({ className, asChild, children, icon, checkedIcon, uncheckedIcon, ...props }, ref) => {\n const shouldRenderStateIcons = checkedIcon !== undefined || uncheckedIcon !== undefined;\n const shouldRenderIcon = icon !== undefined || shouldRenderStateIcons;\n\n const singleIcon = shouldRenderStateIcons ? undefined : icon;\n const onIcon = checkedIcon ?? icon;\n const offIcon = uncheckedIcon ?? icon;\n\n // Base UI's Switch.Root defaults to a `<span>` and forwards `id` to its\n // hidden checkbox input. Render a native `<button>` (with `nativeButton`) so\n // the consumer's `id` — and the click target — lands on the visible control,\n // matching the previous Radix behavior.\n const renderProps =\n asChild && React.isValidElement(children)\n ? { render: children as React.ReactElement }\n : { render: <button type=\"button\" {...keepOwnAccessibleName(props)} />, nativeButton: true };\n\n return (\n <SwitchPrimitive.Root\n ref={ref}\n data-slot=\"switch\"\n className={cn(\n 'peer group/switch inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-0 bg-fill-hover p-0.5',\n 'transition-colors duration-normal ease-out-custom motion-reduce:transition-none',\n 'hover:bg-fill-active',\n 'active:bg-fill-strong',\n focusRingOffset,\n 'data-[checked]:bg-foreground/90',\n 'data-[checked]:hover:bg-foreground',\n 'data-[checked]:active:bg-foreground/75',\n 'data-[disabled]:cursor-not-allowed data-[disabled]:bg-fill-hover data-[disabled]:hover:bg-fill-hover',\n 'data-[disabled]:data-[checked]:bg-foreground/30 data-[disabled]:data-[checked]:hover:bg-foreground/30',\n className,\n )}\n {...renderProps}\n {...props}\n >\n {asChild ? undefined : children}\n <SwitchPrimitive.Thumb\n data-slot=\"switch-thumb\"\n className={cn(\n 'switch-thumb-motion pointer-events-none relative block h-4 w-5 rounded-full bg-foreground',\n 'transition-[background-color,translate,width,transform] duration-normal ease-out-custom motion-reduce:transition-none',\n 'group-active/switch:w-6 group-data-[disabled]/switch:w-5',\n 'data-[checked]:translate-x-3 data-[checked]:bg-background data-[unchecked]:translate-x-0',\n 'group-active/switch:data-[checked]:translate-x-2',\n 'data-[disabled]:data-[checked]:bg-background/75 data-[disabled]:data-[unchecked]:bg-foreground/45',\n )}\n >\n {shouldRenderIcon ? <SwitchThumbIcon checkedIcon={onIcon} icon={singleIcon} uncheckedIcon={offIcon} /> : null}\n </SwitchPrimitive.Thumb>\n </SwitchPrimitive.Root>\n );\n },\n);\nSwitch.displayName = 'Switch';\n\nfunction SwitchThumbIcon({\n checkedIcon,\n icon,\n uncheckedIcon,\n}: {\n checkedIcon?: React.ReactNode;\n icon?: React.ReactNode;\n uncheckedIcon?: React.ReactNode;\n}) {\n const iconClassName = cn(\n 'absolute inset-0 flex items-center justify-center text-background',\n 'transition-[color,opacity] duration-normal ease-out-custom motion-reduce:transition-none',\n '[&_svg]:stroke-2.5 [&_svg]:size-2.5',\n );\n\n if (icon !== undefined) {\n return (\n <span\n aria-hidden\n data-slot=\"switch-thumb-icon\"\n className={cn(iconClassName, 'group-data-[checked]/switch:text-foreground')}\n >\n {icon}\n </span>\n );\n }\n\n return (\n <>\n {uncheckedIcon !== undefined ? (\n <span\n aria-hidden\n data-slot=\"switch-thumb-icon\"\n data-switch-icon=\"unchecked\"\n className={cn(iconClassName, 'opacity-100 group-data-[checked]/switch:opacity-0')}\n >\n {uncheckedIcon}\n </span>\n ) : null}\n {checkedIcon !== undefined ? (\n <span\n aria-hidden\n data-slot=\"switch-thumb-icon\"\n data-switch-icon=\"checked\"\n className={cn(iconClassName, 'text-foreground opacity-0 group-data-[checked]/switch:opacity-100')}\n >\n {checkedIcon}\n </span>\n ) : null}\n </>\n );\n}\n\nexport { Switch };\nexport type { SwitchProps };\n"],"mappings":";;;;;;;AAiBA,IAAM,SAASA,QAAM,YAClB,EAAE,WAAW,SAAS,UAAU,MAAM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D;EACE,eAAA;EACA,aAAU;EACV,oBAAiB;EACjB,WAAW,GAAG,eAAe,mEAAmE;EAE/F,UAAA;CACG,CAAA,IACJ,IACJ,EAAA,CAAA;AAEN"}
@@ -1,58 +1,58 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  // src/domains/chat/messages/skill-activation.ts
3
- var WORK_ITEM_FEED_TAG = "work-item-feed";
3
+ var WORK_ITEM_DESCRIPTION_TAG = "work-item-description";
4
4
  /**
5
5
  * Pattern matching `<skill name="…">body</skill>`, anchored to the start of the
6
- * trimmed string. Only the work-item feed may trail the envelope; anything else
6
+ * trimmed string. Only the work-item description may trail the envelope; anything else
7
7
  * trailing keeps the message raw.
8
8
  */
9
9
  var SKILL_PATTERN = /^<skill\s+name="([^"]+)">([\s\S]*?)<\/skill>\s*([\s\S]*)$/;
10
- var FEED_BLOCK_PATTERN = new RegExp(`^<${WORK_ITEM_FEED_TAG}>\\s*([\\s\\S]*?)\\s*</${WORK_ITEM_FEED_TAG}>$`);
10
+ var DESCRIPTION_BLOCK_PATTERN = new RegExp(`^<${WORK_ITEM_DESCRIPTION_TAG}>\\s*([\\s\\S]*?)\\s*</${WORK_ITEM_DESCRIPTION_TAG}>$`);
11
11
  var ARGUMENTS_MARKER = "\n\nARGUMENTS: ";
12
12
  function parseSkillActivation(text) {
13
13
  const match = SKILL_PATTERN.exec(text.trim());
14
14
  if (!match) return void 0;
15
15
  const [, name, rawBody = "", rawTrailing = ""] = match;
16
16
  const trailing = rawTrailing.trim();
17
- const feedBlock = trailing ? FEED_BLOCK_PATTERN.exec(trailing) : void 0;
18
- if (trailing && !feedBlock) return void 0;
17
+ const descriptionBlock = trailing ? DESCRIPTION_BLOCK_PATTERN.exec(trailing) : void 0;
18
+ if (trailing && !descriptionBlock) return void 0;
19
19
  if (!name) return void 0;
20
20
  let body = rawBody;
21
21
  if (body.startsWith("\n")) body = body.slice(1);
22
22
  if (body.endsWith("\n")) body = body.slice(0, -1);
23
23
  body = body.replaceAll("&lt;/skill&gt;", "</skill>");
24
- return splitSkillBody(name, body, feedBlock?.[1]);
24
+ return splitSkillBody(name, body, descriptionBlock?.[1]);
25
25
  }
26
- var TRAILING_FEED_PATTERN = new RegExp(`\\n\\n<${WORK_ITEM_FEED_TAG}>\\s*([\\s\\S]*?)\\s*</${WORK_ITEM_FEED_TAG}>$`);
26
+ var TRAILING_DESCRIPTION_PATTERN = new RegExp(`\\n\\n<${WORK_ITEM_DESCRIPTION_TAG}>\\s*([\\s\\S]*?)\\s*</${WORK_ITEM_DESCRIPTION_TAG}>$`);
27
27
  /**
28
28
  * Parses the contents of a typed `skill` signal (the skill name travels as a signal
29
- * attribute, so there is no envelope). A trailing work-item feed is split out.
29
+ * attribute, so there is no envelope). A trailing work-item description is split out.
30
30
  */
31
31
  function parseSkillBody(name, text) {
32
32
  if (!name) return void 0;
33
33
  const trimmed = text.trim();
34
- const feedMatch = TRAILING_FEED_PATTERN.exec(trimmed);
35
- return splitSkillBody(name, feedMatch ? trimmed.slice(0, feedMatch.index) : trimmed, feedMatch?.[1]);
34
+ const descriptionMatch = TRAILING_DESCRIPTION_PATTERN.exec(trimmed);
35
+ return splitSkillBody(name, descriptionMatch ? trimmed.slice(0, descriptionMatch.index) : trimmed, descriptionMatch?.[1]);
36
36
  }
37
37
  /**
38
- * Parses a skill as the model sees it in a user message: the legacy envelope (feed trailing it) or
38
+ * Parses a skill as the model sees it in a user message: the legacy envelope (description trailing it) or
39
39
  * a typed skill signal rendered as `<skill name="…">contents</skill>`, whose contents may end
40
- * with the work-item feed.
40
+ * with the work-item description.
41
41
  */
42
42
  function parseSkillMarkup(text) {
43
43
  const activation = parseSkillActivation(text);
44
- if (!activation || activation.feed !== void 0) return activation;
44
+ if (!activation || activation.description !== void 0) return activation;
45
45
  const body = activation.arguments ? `${activation.instructions}${ARGUMENTS_MARKER}${activation.arguments}` : activation.instructions;
46
46
  return parseSkillBody(activation.name, body);
47
47
  }
48
- function splitSkillBody(name, body, feed) {
48
+ function splitSkillBody(name, body, description) {
49
49
  if (!body.trim()) return void 0;
50
50
  const argIndex = body.lastIndexOf(ARGUMENTS_MARKER);
51
51
  return {
52
52
  name,
53
53
  instructions: argIndex >= 0 ? body.slice(0, argIndex) : body,
54
54
  arguments: (argIndex >= 0 ? body.slice(argIndex + 13).trim() : void 0) || void 0,
55
- ...feed !== void 0 ? { feed } : {}
55
+ ...description !== void 0 ? { description } : {}
56
56
  };
57
57
  }
58
58
  exports.parseSkillActivation = parseSkillActivation;
@@ -1 +1 @@
1
- {"version":3,"file":"skill-activation.cjs.js","names":[],"sources":["../../../../src/domains/chat/messages/skill-activation.ts"],"sourcesContent":["const WORK_ITEM_FEED_TAG = 'work-item-feed';\n\nexport interface SkillActivation {\n name: string;\n instructions: string;\n arguments?: string;\n /** The work-item feed appended after the envelope: comments written by collaborators, shown as context. */\n feed?: string;\n}\n\n/**\n * Pattern matching `<skill name=\"…\">body</skill>`, anchored to the start of the\n * trimmed string. Only the work-item feed may trail the envelope; anything else\n * trailing keeps the message raw.\n */\nconst SKILL_PATTERN = /^<skill\\s+name=\"([^\"]+)\">([\\s\\S]*?)<\\/skill>\\s*([\\s\\S]*)$/;\nconst FEED_BLOCK_PATTERN = new RegExp(`^<${WORK_ITEM_FEED_TAG}>\\\\s*([\\\\s\\\\S]*?)\\\\s*</${WORK_ITEM_FEED_TAG}>$`);\nconst ARGUMENTS_MARKER = '\\n\\nARGUMENTS: ';\n\nexport function parseSkillActivation(text: string): SkillActivation | undefined {\n const match = SKILL_PATTERN.exec(text.trim());\n if (!match) return undefined;\n\n const [, name, rawBody = '', rawTrailing = ''] = match;\n const trailing = rawTrailing.trim();\n const feedBlock = trailing ? FEED_BLOCK_PATTERN.exec(trailing) : undefined;\n if (trailing && !feedBlock) return undefined;\n\n if (!name) return undefined;\n\n // The envelope wraps the content in `>\\n{body}\\n</skill>`.\n let body = rawBody;\n if (body.startsWith('\\n')) body = body.slice(1);\n if (body.endsWith('\\n')) body = body.slice(0, -1);\n\n // Unescape the boundary sentinel inserted to prevent premature envelope closure.\n body = body.replaceAll('&lt;/skill&gt;', '</skill>');\n\n return splitSkillBody(name, body, feedBlock?.[1]);\n}\n\nconst TRAILING_FEED_PATTERN = new RegExp(`\\\\n\\\\n<${WORK_ITEM_FEED_TAG}>\\\\s*([\\\\s\\\\S]*?)\\\\s*</${WORK_ITEM_FEED_TAG}>$`);\n\n/**\n * Parses the contents of a typed `skill` signal (the skill name travels as a signal\n * attribute, so there is no envelope). A trailing work-item feed is split out.\n */\nexport function parseSkillBody(name: string, text: string): SkillActivation | undefined {\n if (!name) return undefined;\n const trimmed = text.trim();\n const feedMatch = TRAILING_FEED_PATTERN.exec(trimmed);\n const body = feedMatch ? trimmed.slice(0, feedMatch.index) : trimmed;\n return splitSkillBody(name, body, feedMatch?.[1]);\n}\n\n/**\n * Parses a skill as the model sees it in a user message: the legacy envelope (feed trailing it) or\n * a typed skill signal rendered as `<skill name=\"…\">contents</skill>`, whose contents may end\n * with the work-item feed.\n */\nexport function parseSkillMarkup(text: string): SkillActivation | undefined {\n const activation = parseSkillActivation(text);\n if (!activation || activation.feed !== undefined) return activation;\n const body = activation.arguments\n ? `${activation.instructions}${ARGUMENTS_MARKER}${activation.arguments}`\n : activation.instructions;\n return parseSkillBody(activation.name, body);\n}\n\nfunction splitSkillBody(name: string, body: string, feed: string | undefined): SkillActivation | undefined {\n if (!body.trim()) return undefined;\n\n const argIndex = body.lastIndexOf(ARGUMENTS_MARKER);\n const instructions = argIndex >= 0 ? body.slice(0, argIndex) : body;\n const args = argIndex >= 0 ? body.slice(argIndex + ARGUMENTS_MARKER.length).trim() : undefined;\n\n return { name, instructions, arguments: args || undefined, ...(feed !== undefined ? { feed } : {}) };\n}\n"],"mappings":";;AAAA,IAAM,qBAAqB;;;;;;AAe3B,IAAM,gBAAgB;AACtB,IAAM,qBAAqB,IAAI,OAAO,KAAK,mBAAmB,yBAAyB,mBAAmB,GAAG;AAC7G,IAAM,mBAA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YAAY,gBAAgB;CAIlD,OAAO;EAAE;EAAM,cAHM,YAAY,IAAI,KAAK,MAAM,GAAG,QAAQ,IAAI;EAGlC,YAFhB,YAAY,IAAI,KAAK,MAAM,WAAW,EAAuB,CAAC,CAAC,KAAK,IAAI,KAAA,MAErC,KAAA;EAAW,GAAI,SAAS,KAAA,IAAY,EAAE,KAAK,IAAI,CAAC;CAAG;AACrG"}
1
+ {"version":3,"file":"skill-activation.cjs.js","names":[],"sources":["../../../../src/domains/chat/messages/skill-activation.ts"],"sourcesContent":["const WORK_ITEM_DESCRIPTION_TAG = 'work-item-description';\n\nexport interface SkillActivation {\n name: string;\n instructions: string;\n arguments?: string;\n /** The work-item description appended after the envelope, shown as context. */\n description?: string;\n}\n\n/**\n * Pattern matching `<skill name=\"…\">body</skill>`, anchored to the start of the\n * trimmed string. Only the work-item description may trail the envelope; anything else\n * trailing keeps the message raw.\n */\nconst SKILL_PATTERN = /^<skill\\s+name=\"([^\"]+)\">([\\s\\S]*?)<\\/skill>\\s*([\\s\\S]*)$/;\nconst DESCRIPTION_BLOCK_PATTERN = new RegExp(\n `^<${WORK_ITEM_DESCRIPTION_TAG}>\\\\s*([\\\\s\\\\S]*?)\\\\s*</${WORK_ITEM_DESCRIPTION_TAG}>$`,\n);\nconst ARGUMENTS_MARKER = '\\n\\nARGUMENTS: ';\n\nexport function parseSkillActivation(text: string): SkillActivation | undefined {\n const match = SKILL_PATTERN.exec(text.trim());\n if (!match) return undefined;\n\n const [, name, rawBody = '', rawTrailing = ''] = match;\n const trailing = rawTrailing.trim();\n const descriptionBlock = trailing ? DESCRIPTION_BLOCK_PATTERN.exec(trailing) : undefined;\n if (trailing && !descriptionBlock) return undefined;\n\n if (!name) return undefined;\n\n // The envelope wraps the content in `>\\n{body}\\n</skill>`.\n let body = rawBody;\n if (body.startsWith('\\n')) body = body.slice(1);\n if (body.endsWith('\\n')) body = body.slice(0, -1);\n\n // Unescape the boundary sentinel inserted to prevent premature envelope closure.\n body = body.replaceAll('&lt;/skill&gt;', '</skill>');\n\n return splitSkillBody(name, body, descriptionBlock?.[1]);\n}\n\nconst TRAILING_DESCRIPTION_PATTERN = new RegExp(\n `\\\\n\\\\n<${WORK_ITEM_DESCRIPTION_TAG}>\\\\s*([\\\\s\\\\S]*?)\\\\s*</${WORK_ITEM_DESCRIPTION_TAG}>$`,\n);\n\n/**\n * Parses the contents of a typed `skill` signal (the skill name travels as a signal\n * attribute, so there is no envelope). A trailing work-item description is split out.\n */\nexport function parseSkillBody(name: string, text: string): SkillActivation | undefined {\n if (!name) return undefined;\n const trimmed = text.trim();\n const descriptionMatch = TRAILING_DESCRIPTION_PATTERN.exec(trimmed);\n const body = descriptionMatch ? trimmed.slice(0, descriptionMatch.index) : trimmed;\n return splitSkillBody(name, body, descriptionMatch?.[1]);\n}\n\n/**\n * Parses a skill as the model sees it in a user message: the legacy envelope (description trailing it) or\n * a typed skill signal rendered as `<skill name=\"…\">contents</skill>`, whose contents may end\n * with the work-item description.\n */\nexport function parseSkillMarkup(text: string): SkillActivation | undefined {\n const activation = parseSkillActivation(text);\n if (!activation || activation.description !== undefined) return activation;\n const body = activation.arguments\n ? `${activation.instructions}${ARGUMENTS_MARKER}${activation.arguments}`\n : activation.instructions;\n return parseSkillBody(activation.name, body);\n}\n\nfunction splitSkillBody(name: string, body: string, description: string | undefined): SkillActivation | undefined {\n if (!body.trim()) return undefined;\n\n const argIndex = body.lastIndexOf(ARGUMENTS_MARKER);\n const instructions = argIndex >= 0 ? body.slice(0, argIndex) : body;\n const args = argIndex >= 0 ? body.slice(argIndex + ARGUMENTS_MARKER.length).trim() : undefined;\n\n return { name, instructions, arguments: args || undefined, ...(description !== undefined ? { description } : {}) };\n}\n"],"mappings":";;AAAA,IAAM,4BAA4B;;;;;;AAelC,IAAM,gBAAgB;AACtB,IAAM,4BAA4B,IAAI,OACpC,KAAK,0BAA0B,yBAAyB,0BAA0B,GACpF;AACA,IAAM,mBAAmB;AAEzB,SAAgB,qBAAqB,MAA2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CAIlD,OAAO;EAAE;EAAM,cAHM,YAAY,IAAI,KAAK,MAAM,GAAG,QAAQ,IAAI;EAGlC,YAFhB,YAAY,IAAI,KAAK,MAAM,WAAW,EAAuB,CAAC,CAAC,KAAK,IAAI,KAAA,MAErC,KAAA;EAAW,GAAI,gBAAgB,KAAA,IAAY,EAAE,YAAY,IAAI,CAAC;CAAG;AACnH"}
@@ -1,57 +1,57 @@
1
1
  // src/domains/chat/messages/skill-activation.ts
2
- var WORK_ITEM_FEED_TAG = "work-item-feed";
2
+ var WORK_ITEM_DESCRIPTION_TAG = "work-item-description";
3
3
  /**
4
4
  * Pattern matching `<skill name="…">body</skill>`, anchored to the start of the
5
- * trimmed string. Only the work-item feed may trail the envelope; anything else
5
+ * trimmed string. Only the work-item description may trail the envelope; anything else
6
6
  * trailing keeps the message raw.
7
7
  */
8
8
  var SKILL_PATTERN = /^<skill\s+name="([^"]+)">([\s\S]*?)<\/skill>\s*([\s\S]*)$/;
9
- var FEED_BLOCK_PATTERN = new RegExp(`^<${WORK_ITEM_FEED_TAG}>\\s*([\\s\\S]*?)\\s*</${WORK_ITEM_FEED_TAG}>$`);
9
+ var DESCRIPTION_BLOCK_PATTERN = new RegExp(`^<${WORK_ITEM_DESCRIPTION_TAG}>\\s*([\\s\\S]*?)\\s*</${WORK_ITEM_DESCRIPTION_TAG}>$`);
10
10
  var ARGUMENTS_MARKER = "\n\nARGUMENTS: ";
11
11
  function parseSkillActivation(text) {
12
12
  const match = SKILL_PATTERN.exec(text.trim());
13
13
  if (!match) return void 0;
14
14
  const [, name, rawBody = "", rawTrailing = ""] = match;
15
15
  const trailing = rawTrailing.trim();
16
- const feedBlock = trailing ? FEED_BLOCK_PATTERN.exec(trailing) : void 0;
17
- if (trailing && !feedBlock) return void 0;
16
+ const descriptionBlock = trailing ? DESCRIPTION_BLOCK_PATTERN.exec(trailing) : void 0;
17
+ if (trailing && !descriptionBlock) return void 0;
18
18
  if (!name) return void 0;
19
19
  let body = rawBody;
20
20
  if (body.startsWith("\n")) body = body.slice(1);
21
21
  if (body.endsWith("\n")) body = body.slice(0, -1);
22
22
  body = body.replaceAll("&lt;/skill&gt;", "</skill>");
23
- return splitSkillBody(name, body, feedBlock?.[1]);
23
+ return splitSkillBody(name, body, descriptionBlock?.[1]);
24
24
  }
25
- var TRAILING_FEED_PATTERN = new RegExp(`\\n\\n<${WORK_ITEM_FEED_TAG}>\\s*([\\s\\S]*?)\\s*</${WORK_ITEM_FEED_TAG}>$`);
25
+ var TRAILING_DESCRIPTION_PATTERN = new RegExp(`\\n\\n<${WORK_ITEM_DESCRIPTION_TAG}>\\s*([\\s\\S]*?)\\s*</${WORK_ITEM_DESCRIPTION_TAG}>$`);
26
26
  /**
27
27
  * Parses the contents of a typed `skill` signal (the skill name travels as a signal
28
- * attribute, so there is no envelope). A trailing work-item feed is split out.
28
+ * attribute, so there is no envelope). A trailing work-item description is split out.
29
29
  */
30
30
  function parseSkillBody(name, text) {
31
31
  if (!name) return void 0;
32
32
  const trimmed = text.trim();
33
- const feedMatch = TRAILING_FEED_PATTERN.exec(trimmed);
34
- return splitSkillBody(name, feedMatch ? trimmed.slice(0, feedMatch.index) : trimmed, feedMatch?.[1]);
33
+ const descriptionMatch = TRAILING_DESCRIPTION_PATTERN.exec(trimmed);
34
+ return splitSkillBody(name, descriptionMatch ? trimmed.slice(0, descriptionMatch.index) : trimmed, descriptionMatch?.[1]);
35
35
  }
36
36
  /**
37
- * Parses a skill as the model sees it in a user message: the legacy envelope (feed trailing it) or
37
+ * Parses a skill as the model sees it in a user message: the legacy envelope (description trailing it) or
38
38
  * a typed skill signal rendered as `<skill name="…">contents</skill>`, whose contents may end
39
- * with the work-item feed.
39
+ * with the work-item description.
40
40
  */
41
41
  function parseSkillMarkup(text) {
42
42
  const activation = parseSkillActivation(text);
43
- if (!activation || activation.feed !== void 0) return activation;
43
+ if (!activation || activation.description !== void 0) return activation;
44
44
  const body = activation.arguments ? `${activation.instructions}${ARGUMENTS_MARKER}${activation.arguments}` : activation.instructions;
45
45
  return parseSkillBody(activation.name, body);
46
46
  }
47
- function splitSkillBody(name, body, feed) {
47
+ function splitSkillBody(name, body, description) {
48
48
  if (!body.trim()) return void 0;
49
49
  const argIndex = body.lastIndexOf(ARGUMENTS_MARKER);
50
50
  return {
51
51
  name,
52
52
  instructions: argIndex >= 0 ? body.slice(0, argIndex) : body,
53
53
  arguments: (argIndex >= 0 ? body.slice(argIndex + 13).trim() : void 0) || void 0,
54
- ...feed !== void 0 ? { feed } : {}
54
+ ...description !== void 0 ? { description } : {}
55
55
  };
56
56
  }
57
57
  export { parseSkillActivation, parseSkillBody, parseSkillMarkup };
@@ -1 +1 @@
1
- {"version":3,"file":"skill-activation.es.js","names":[],"sources":["../../../../src/domains/chat/messages/skill-activation.ts"],"sourcesContent":["const WORK_ITEM_FEED_TAG = 'work-item-feed';\n\nexport interface SkillActivation {\n name: string;\n instructions: string;\n arguments?: string;\n /** The work-item feed appended after the envelope: comments written by collaborators, shown as context. */\n feed?: string;\n}\n\n/**\n * Pattern matching `<skill name=\"…\">body</skill>`, anchored to the start of the\n * trimmed string. Only the work-item feed may trail the envelope; anything else\n * trailing keeps the message raw.\n */\nconst SKILL_PATTERN = /^<skill\\s+name=\"([^\"]+)\">([\\s\\S]*?)<\\/skill>\\s*([\\s\\S]*)$/;\nconst FEED_BLOCK_PATTERN = new RegExp(`^<${WORK_ITEM_FEED_TAG}>\\\\s*([\\\\s\\\\S]*?)\\\\s*</${WORK_ITEM_FEED_TAG}>$`);\nconst ARGUMENTS_MARKER = '\\n\\nARGUMENTS: ';\n\nexport function parseSkillActivation(text: string): SkillActivation | undefined {\n const match = SKILL_PATTERN.exec(text.trim());\n if (!match) return undefined;\n\n const [, name, rawBody = '', rawTrailing = ''] = match;\n const trailing = rawTrailing.trim();\n const feedBlock = trailing ? FEED_BLOCK_PATTERN.exec(trailing) : undefined;\n if (trailing && !feedBlock) return undefined;\n\n if (!name) return undefined;\n\n // The envelope wraps the content in `>\\n{body}\\n</skill>`.\n let body = rawBody;\n if (body.startsWith('\\n')) body = body.slice(1);\n if (body.endsWith('\\n')) body = body.slice(0, -1);\n\n // Unescape the boundary sentinel inserted to prevent premature envelope closure.\n body = body.replaceAll('&lt;/skill&gt;', '</skill>');\n\n return splitSkillBody(name, body, feedBlock?.[1]);\n}\n\nconst TRAILING_FEED_PATTERN = new RegExp(`\\\\n\\\\n<${WORK_ITEM_FEED_TAG}>\\\\s*([\\\\s\\\\S]*?)\\\\s*</${WORK_ITEM_FEED_TAG}>$`);\n\n/**\n * Parses the contents of a typed `skill` signal (the skill name travels as a signal\n * attribute, so there is no envelope). A trailing work-item feed is split out.\n */\nexport function parseSkillBody(name: string, text: string): SkillActivation | undefined {\n if (!name) return undefined;\n const trimmed = text.trim();\n const feedMatch = TRAILING_FEED_PATTERN.exec(trimmed);\n const body = feedMatch ? trimmed.slice(0, feedMatch.index) : trimmed;\n return splitSkillBody(name, body, feedMatch?.[1]);\n}\n\n/**\n * Parses a skill as the model sees it in a user message: the legacy envelope (feed trailing it) or\n * a typed skill signal rendered as `<skill name=\"…\">contents</skill>`, whose contents may end\n * with the work-item feed.\n */\nexport function parseSkillMarkup(text: string): SkillActivation | undefined {\n const activation = parseSkillActivation(text);\n if (!activation || activation.feed !== undefined) return activation;\n const body = activation.arguments\n ? `${activation.instructions}${ARGUMENTS_MARKER}${activation.arguments}`\n : activation.instructions;\n return parseSkillBody(activation.name, body);\n}\n\nfunction splitSkillBody(name: string, body: string, feed: string | undefined): SkillActivation | undefined {\n if (!body.trim()) return undefined;\n\n const argIndex = body.lastIndexOf(ARGUMENTS_MARKER);\n const instructions = argIndex >= 0 ? body.slice(0, argIndex) : body;\n const args = argIndex >= 0 ? body.slice(argIndex + ARGUMENTS_MARKER.length).trim() : undefined;\n\n return { name, instructions, arguments: args || undefined, ...(feed !== undefined ? { feed } : {}) };\n}\n"],"mappings":";AAAA,IAAM,qBAAqB;;;;;;AAe3B,IAAM,gBAAgB;AACtB,IAAM,q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;CACzG,IAAI,CAAC,KAAK,KAAK,GAAG,OAAO,KAAA;CAEzB,MAAM,WAAW,KAAK,YAAY,gBAAgB;CAIlD,OAAO;EAAE;EAAM,cAHM,YAAY,IAAI,KAAK,MAAM,GAAG,QAAQ,IAAI;EAGlC,YAFhB,YAAY,IAAI,KAAK,MAAM,WAAW,EAAuB,CAAC,CAAC,KAAK,IAAI,KAAA,MAErC,KAAA;EAAW,GAAI,SAAS,KAAA,IAAY,EAAE,KAAK,IAAI,CAAC;CAAG;AACrG"}
1
+ {"version":3,"file":"skill-activation.es.js","names":[],"sources":["../../../../src/domains/chat/messages/skill-activation.ts"],"sourcesContent":["const WORK_ITEM_DESCRIPTION_TAG = 'work-item-description';\n\nexport interface SkillActivation {\n name: string;\n instructions: string;\n arguments?: string;\n /** The work-item description appended after the envelope, shown as context. */\n description?: string;\n}\n\n/**\n * Pattern matching `<skill name=\"…\">body</skill>`, anchored to the start of the\n * trimmed string. Only the work-item description may trail the envelope; anything else\n * trailing keeps the message raw.\n */\nconst SKILL_PATTERN = /^<skill\\s+name=\"([^\"]+)\">([\\s\\S]*?)<\\/skill>\\s*([\\s\\S]*)$/;\nconst DESCRIPTION_BLOCK_PATTERN = new RegExp(\n `^<${WORK_ITEM_DESCRIPTION_TAG}>\\\\s*([\\\\s\\\\S]*?)\\\\s*</${WORK_ITEM_DESCRIPTION_TAG}>$`,\n);\nconst ARGUMENTS_MARKER = '\\n\\nARGUMENTS: ';\n\nexport function parseSkillActivation(text: string): SkillActivation | undefined {\n const match = SKILL_PATTERN.exec(text.trim());\n if (!match) return undefined;\n\n const [, name, rawBody = '', rawTrailing = ''] = match;\n const trailing = rawTrailing.trim();\n const descriptionBlock = trailing ? DESCRIPTION_BLOCK_PATTERN.exec(trailing) : undefined;\n if (trailing && !descriptionBlock) return undefined;\n\n if (!name) return undefined;\n\n // The envelope wraps the content in `>\\n{body}\\n</skill>`.\n let body = rawBody;\n if (body.startsWith('\\n')) body = body.slice(1);\n if (body.endsWith('\\n')) body = body.slice(0, -1);\n\n // Unescape the boundary sentinel inserted to prevent premature envelope closure.\n body = body.replaceAll('&lt;/skill&gt;', '</skill>');\n\n return splitSkillBody(name, body, descriptionBlock?.[1]);\n}\n\nconst TRAILING_DESCRIPTION_PATTERN = new RegExp(\n `\\\\n\\\\n<${WORK_ITEM_DESCRIPTION_TAG}>\\\\s*([\\\\s\\\\S]*?)\\\\s*</${WORK_ITEM_DESCRIPTION_TAG}>$`,\n);\n\n/**\n * Parses the contents of a typed `skill` signal (the skill name travels as a signal\n * attribute, so there is no envelope). A trailing work-item description is split out.\n */\nexport function parseSkillBody(name: string, text: string): SkillActivation | undefined {\n if (!name) return undefined;\n const trimmed = text.trim();\n const descriptionMatch = TRAILING_DESCRIPTION_PATTERN.exec(trimmed);\n const body = descriptionMatch ? trimmed.slice(0, descriptionMatch.index) : trimmed;\n return splitSkillBody(name, body, descriptionMatch?.[1]);\n}\n\n/**\n * Parses a skill as the model sees it in a user message: the legacy envelope (description trailing it) or\n * a typed skill signal rendered as `<skill name=\"…\">contents</skill>`, whose contents may end\n * with the work-item description.\n */\nexport function parseSkillMarkup(text: string): SkillActivation | undefined {\n const activation = parseSkillActivation(text);\n if (!activation || activation.description !== undefined) return activation;\n const body = activation.arguments\n ? `${activation.instructions}${ARGUMENTS_MARKER}${activation.arguments}`\n : activation.instructions;\n return parseSkillBody(activation.name, body);\n}\n\nfunction splitSkillBody(name: string, body: string, description: string | undefined): SkillActivation | undefined {\n if (!body.trim()) return undefined;\n\n const argIndex = body.lastIndexOf(ARGUMENTS_MARKER);\n const instructions = argIndex >= 0 ? body.slice(0, argIndex) : body;\n const args = argIndex >= 0 ? body.slice(argIndex + ARGUMENTS_MARKER.length).trim() : undefined;\n\n return { name, instructions, arguments: args || undefined, ...(description !== undefined ? { description } : {}) };\n}\n"],"mappings":";AAAA,IAAM,4BAA4B;;;;;;AAelC,IAAM,gBAAgB;AACtB,IAAM,4BAA4B,IAAI,OACpC,KAAK,0BAA0B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,KAAK,KAAK,GAAG,OAAO,KAAA;CAEzB,MAAM,WAAW,KAAK,YAAY,gBAAgB;CAIlD,OAAO;EAAE;EAAM,cAHM,YAAY,IAAI,KAAK,MAAM,GAAG,QAAQ,IAAI;EAGlC,YAFhB,YAAY,IAAI,KAAK,MAAM,WAAW,EAAuB,CAAC,CAAC,KAAK,IAAI,KAAA,MAErC,KAAA;EAAW,GAAI,gBAAgB,KAAA,IAAY,EAAE,YAAY,IAAI,CAAC;CAAG;AACnH"}
@@ -7,7 +7,7 @@ let react_jsx_runtime = require("react/jsx-runtime");
7
7
  // src/domains/chat/messages/skill-message.tsx
8
8
  var SkillGlyph = require_AgentIndicator.agentGlyph("skill");
9
9
  function SkillMessage({ activation, defaultOpen, appearance = "row" }) {
10
- const { name, arguments: args, instructions, feed } = activation;
10
+ const { name, arguments: args, instructions, description } = activation;
11
11
  const item = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_activity.ActivityItem, {
12
12
  appearance,
13
13
  label: "Skill",
@@ -28,13 +28,13 @@ function SkillMessage({ activation, defaultOpen, appearance = "row" }) {
28
28
  })
29
29
  })
30
30
  });
31
- if (feed === void 0) return item;
31
+ if (description === void 0) return item;
32
32
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
33
33
  className: "flex flex-col",
34
34
  children: [item, /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_activity.SignalActivity, {
35
35
  kind: "reactive",
36
- label: "Work item feed",
37
- message: feed,
36
+ label: "Work item description",
37
+ message: description,
38
38
  appearance
39
39
  })]
40
40
  });
@@ -1 +1 @@
1
- {"version":3,"file":"skill-message.cjs.js","names":["agentGlyph","ActivityItem","ScrollArea","MarkdownRenderer","SignalActivity"],"sources":["../../../../src/domains/chat/messages/skill-message.tsx"],"sourcesContent":["import type { SkillActivation } from './skill-activation';\nimport { agentGlyph } from '@/ds/components/AgentIndicator';\nimport { ActivityItem, SignalActivity } from '@/ds/components/ai/activity';\nimport type { ActivityAppearance } from '@/ds/components/ai/activity';\nimport { MarkdownRenderer } from '@/ds/components/MarkdownRenderer';\nimport { ScrollArea } from '@/ds/components/ScrollArea';\n\nconst SkillGlyph = agentGlyph('skill');\n\nexport function SkillMessage({\n activation,\n defaultOpen,\n appearance = 'row',\n}: {\n activation: SkillActivation;\n defaultOpen?: boolean;\n appearance?: ActivityAppearance;\n}) {\n const { name, arguments: args, instructions, feed } = activation;\n const item = (\n <ActivityItem\n appearance={appearance}\n label=\"Skill\"\n detail={args ? `${name} ${args}` : name}\n icon={<SkillGlyph className={appearance === 'inline' ? undefined : 'text-span-skill'} aria-hidden />}\n data-skill-name={name}\n aria-label={`Skill: ${name}`}\n defaultOpen={defaultOpen}\n >\n <ScrollArea maxHeight=\"24rem\" revealScrollbarOnHover={false}>\n <MarkdownRenderer className=\"text-caption\">{instructions}</MarkdownRenderer>\n </ScrollArea>\n </ActivityItem>\n );\n\n if (feed === undefined) return item;\n\n return (\n <div className=\"flex flex-col\">\n {item}\n <SignalActivity kind=\"reactive\" label=\"Work item feed\" message={feed} appearance={appearance} />\n </div>\n );\n}\n"],"mappings":";;;;;;;AAOA,IAAM,aAAaA,uBAAAA,WAAW,OAAO;AAErC,SAAgB,aAAa,EAC3B,YACA,aACA,aAAa,SAKZ;CACD,MAAM,EAAE,MAAM,WAAW,MAAM,cAAc,SAAS;CACtD,MAAM,OACJ,iBAAA,GAAA,kBAAA,IAAA,CAACC,iBAAAA,cAAD;EACc;EACZ,OAAM;EACN,QAAQ,OAAO,GAAG,KAAK,GAAG,SAAS;EACnC,MAAM,iBAAA,GAAA,kBAAA,IAAA,CAAC,YAAD;GAAY,WAAW,eAAe,WAAW,KAAA,IAAY;GAAmB,eAAA;EAAa,CAAA;EACnG,mBAAiB;EACjB,cAAY,UAAU;EACT;EAEb,UAAA,iBAAA,GAAA,kBAAA,IAAA,CAACC,oBAAAA,YAAD;GAAY,WAAU;GAAQ,wBAAwB;GACpD,UAAA,iBAAA,GAAA,kBAAA,IAAA,CAACC,yBAAAA,kBAAD;IAAkB,WAAU;IAAgB,UAAA;GAA+B,CAAA;EACjE,CAAA;CACA,CAAA;CAGhB,IAAI,SAAS,KAAA,GAAW,OAAO;CAE/B,OACE,iBAAA,GAAA,kBAAA,KAAA,CAAC,OAAD;EAAK,WAAU;EAAf,UAAA,CACG,MACD,iBAAA,GAAA,kBAAA,IAAA,CAACC,iBAAAA,gBAAD;GAAgB,MAAK;GAAW,OAAM;GAAiB,SAAS;GAAkB;EAAa,CAAA,CAC5F;;AAET"}
1
+ {"version":3,"file":"skill-message.cjs.js","names":["agentGlyph","ActivityItem","ScrollArea","MarkdownRenderer","SignalActivity"],"sources":["../../../../src/domains/chat/messages/skill-message.tsx"],"sourcesContent":["import type { SkillActivation } from './skill-activation';\nimport { agentGlyph } from '@/ds/components/AgentIndicator';\nimport { ActivityItem, SignalActivity } from '@/ds/components/ai/activity';\nimport type { ActivityAppearance } from '@/ds/components/ai/activity';\nimport { MarkdownRenderer } from '@/ds/components/MarkdownRenderer';\nimport { ScrollArea } from '@/ds/components/ScrollArea';\n\nconst SkillGlyph = agentGlyph('skill');\n\nexport function SkillMessage({\n activation,\n defaultOpen,\n appearance = 'row',\n}: {\n activation: SkillActivation;\n defaultOpen?: boolean;\n appearance?: ActivityAppearance;\n}) {\n const { name, arguments: args, instructions, description } = activation;\n const item = (\n <ActivityItem\n appearance={appearance}\n label=\"Skill\"\n detail={args ? `${name} ${args}` : name}\n icon={<SkillGlyph className={appearance === 'inline' ? undefined : 'text-span-skill'} aria-hidden />}\n data-skill-name={name}\n aria-label={`Skill: ${name}`}\n defaultOpen={defaultOpen}\n >\n <ScrollArea maxHeight=\"24rem\" revealScrollbarOnHover={false}>\n <MarkdownRenderer className=\"text-caption\">{instructions}</MarkdownRenderer>\n </ScrollArea>\n </ActivityItem>\n );\n\n if (description === undefined) return item;\n\n return (\n <div className=\"flex flex-col\">\n {item}\n <SignalActivity kind=\"reactive\" label=\"Work item description\" message={description} appearance={appearance} />\n </div>\n );\n}\n"],"mappings":";;;;;;;AAOA,IAAM,aAAaA,uBAAAA,WAAW,OAAO;AAErC,SAAgB,aAAa,EAC3B,YACA,aACA,aAAa,SAKZ;CACD,MAAM,EAAE,MAAM,WAAW,MAAM,cAAc,gBAAgB;CAC7D,MAAM,OACJ,iBAAA,GAAA,kBAAA,IAAA,CAACC,iBAAAA,cAAD;EACc;EACZ,OAAM;EACN,QAAQ,OAAO,GAAG,KAAK,GAAG,SAAS;EACnC,MAAM,iBAAA,GAAA,kBAAA,IAAA,CAAC,YAAD;GAAY,WAAW,eAAe,WAAW,KAAA,IAAY;GAAmB,eAAA;EAAa,CAAA;EACnG,mBAAiB;EACjB,cAAY,UAAU;EACT;EAEb,UAAA,iBAAA,GAAA,kBAAA,IAAA,CAACC,oBAAAA,YAAD;GAAY,WAAU;GAAQ,wBAAwB;GACpD,UAAA,iBAAA,GAAA,kBAAA,IAAA,CAACC,yBAAAA,kBAAD;IAAkB,WAAU;IAAgB,UAAA;GAA+B,CAAA;EACjE,CAAA;CACA,CAAA;CAGhB,IAAI,gBAAgB,KAAA,GAAW,OAAO;CAEtC,OACE,iBAAA,GAAA,kBAAA,KAAA,CAAC,OAAD;EAAK,WAAU;EAAf,UAAA,CACG,MACD,iBAAA,GAAA,kBAAA,IAAA,CAACC,iBAAAA,gBAAD;GAAgB,MAAK;GAAW,OAAM;GAAwB,SAAS;GAAyB;EAAa,CAAA,CAC1G;;AAET"}
@@ -6,7 +6,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
6
6
  // src/domains/chat/messages/skill-message.tsx
7
7
  var SkillGlyph = agentGlyph("skill");
8
8
  function SkillMessage({ activation, defaultOpen, appearance = "row" }) {
9
- const { name, arguments: args, instructions, feed } = activation;
9
+ const { name, arguments: args, instructions, description } = activation;
10
10
  const item = /* @__PURE__ */ jsx(ActivityItem, {
11
11
  appearance,
12
12
  label: "Skill",
@@ -27,13 +27,13 @@ function SkillMessage({ activation, defaultOpen, appearance = "row" }) {
27
27
  })
28
28
  })
29
29
  });
30
- if (feed === void 0) return item;
30
+ if (description === void 0) return item;
31
31
  return /* @__PURE__ */ jsxs("div", {
32
32
  className: "flex flex-col",
33
33
  children: [item, /* @__PURE__ */ jsx(SignalActivity, {
34
34
  kind: "reactive",
35
- label: "Work item feed",
36
- message: feed,
35
+ label: "Work item description",
36
+ message: description,
37
37
  appearance
38
38
  })]
39
39
  });
@@ -1 +1 @@
1
- {"version":3,"file":"skill-message.es.js","names":[],"sources":["../../../../src/domains/chat/messages/skill-message.tsx"],"sourcesContent":["import type { SkillActivation } from './skill-activation';\nimport { agentGlyph } from '@/ds/components/AgentIndicator';\nimport { ActivityItem, SignalActivity } from '@/ds/components/ai/activity';\nimport type { ActivityAppearance } from '@/ds/components/ai/activity';\nimport { MarkdownRenderer } from '@/ds/components/MarkdownRenderer';\nimport { ScrollArea } from '@/ds/components/ScrollArea';\n\nconst SkillGlyph = agentGlyph('skill');\n\nexport function SkillMessage({\n activation,\n defaultOpen,\n appearance = 'row',\n}: {\n activation: SkillActivation;\n defaultOpen?: boolean;\n appearance?: ActivityAppearance;\n}) {\n const { name, arguments: args, instructions, feed } = activation;\n const item = (\n <ActivityItem\n appearance={appearance}\n label=\"Skill\"\n detail={args ? `${name} ${args}` : name}\n icon={<SkillGlyph className={appearance === 'inline' ? undefined : 'text-span-skill'} aria-hidden />}\n data-skill-name={name}\n aria-label={`Skill: ${name}`}\n defaultOpen={defaultOpen}\n >\n <ScrollArea maxHeight=\"24rem\" revealScrollbarOnHover={false}>\n <MarkdownRenderer className=\"text-caption\">{instructions}</MarkdownRenderer>\n </ScrollArea>\n </ActivityItem>\n );\n\n if (feed === undefined) return item;\n\n return (\n <div className=\"flex flex-col\">\n {item}\n <SignalActivity kind=\"reactive\" label=\"Work item feed\" message={feed} appearance={appearance} />\n </div>\n );\n}\n"],"mappings":";;;;;;AAOA,IAAM,aAAa,WAAW,OAAO;AAErC,SAAgB,aAAa,EAC3B,YACA,aACA,aAAa,SAKZ;CACD,MAAM,EAAE,MAAM,WAAW,MAAM,cAAc,SAAS;CACtD,MAAM,OACJ,oBAAC,cAAD;EACc;EACZ,OAAM;EACN,QAAQ,OAAO,GAAG,KAAK,GAAG,SAAS;EACnC,MAAM,oBAAC,YAAD;GAAY,WAAW,eAAe,WAAW,KAAA,IAAY;GAAmB,eAAA;EAAa,CAAA;EACnG,mBAAiB;EACjB,cAAY,UAAU;EACT;EAEb,UAAA,oBAAC,YAAD;GAAY,WAAU;GAAQ,wBAAwB;GACpD,UAAA,oBAAC,kBAAD;IAAkB,WAAU;IAAgB,UAAA;GAA+B,CAAA;EACjE,CAAA;CACA,CAAA;CAGhB,IAAI,SAAS,KAAA,GAAW,OAAO;CAE/B,OACE,qBAAC,OAAD;EAAK,WAAU;EAAf,UAAA,CACG,MACD,oBAAC,gBAAD;GAAgB,MAAK;GAAW,OAAM;GAAiB,SAAS;GAAkB;EAAa,CAAA,CAC5F;;AAET"}
1
+ {"version":3,"file":"skill-message.es.js","names":[],"sources":["../../../../src/domains/chat/messages/skill-message.tsx"],"sourcesContent":["import type { SkillActivation } from './skill-activation';\nimport { agentGlyph } from '@/ds/components/AgentIndicator';\nimport { ActivityItem, SignalActivity } from '@/ds/components/ai/activity';\nimport type { ActivityAppearance } from '@/ds/components/ai/activity';\nimport { MarkdownRenderer } from '@/ds/components/MarkdownRenderer';\nimport { ScrollArea } from '@/ds/components/ScrollArea';\n\nconst SkillGlyph = agentGlyph('skill');\n\nexport function SkillMessage({\n activation,\n defaultOpen,\n appearance = 'row',\n}: {\n activation: SkillActivation;\n defaultOpen?: boolean;\n appearance?: ActivityAppearance;\n}) {\n const { name, arguments: args, instructions, description } = activation;\n const item = (\n <ActivityItem\n appearance={appearance}\n label=\"Skill\"\n detail={args ? `${name} ${args}` : name}\n icon={<SkillGlyph className={appearance === 'inline' ? undefined : 'text-span-skill'} aria-hidden />}\n data-skill-name={name}\n aria-label={`Skill: ${name}`}\n defaultOpen={defaultOpen}\n >\n <ScrollArea maxHeight=\"24rem\" revealScrollbarOnHover={false}>\n <MarkdownRenderer className=\"text-caption\">{instructions}</MarkdownRenderer>\n </ScrollArea>\n </ActivityItem>\n );\n\n if (description === undefined) return item;\n\n return (\n <div className=\"flex flex-col\">\n {item}\n <SignalActivity kind=\"reactive\" label=\"Work item description\" message={description} appearance={appearance} />\n </div>\n );\n}\n"],"mappings":";;;;;;AAOA,IAAM,aAAa,WAAW,OAAO;AAErC,SAAgB,aAAa,EAC3B,YACA,aACA,aAAa,SAKZ;CACD,MAAM,EAAE,MAAM,WAAW,MAAM,cAAc,gBAAgB;CAC7D,MAAM,OACJ,oBAAC,cAAD;EACc;EACZ,OAAM;EACN,QAAQ,OAAO,GAAG,KAAK,GAAG,SAAS;EACnC,MAAM,oBAAC,YAAD;GAAY,WAAW,eAAe,WAAW,KAAA,IAAY;GAAmB,eAAA;EAAa,CAAA;EACnG,mBAAiB;EACjB,cAAY,UAAU;EACT;EAEb,UAAA,oBAAC,YAAD;GAAY,WAAU;GAAQ,wBAAwB;GACpD,UAAA,oBAAC,kBAAD;IAAkB,WAAU;IAAgB,UAAA;GAA+B,CAAA;EACjE,CAAA;CACA,CAAA;CAGhB,IAAI,gBAAgB,KAAA,GAAW,OAAO;CAEtC,OACE,qBAAC,OAAD;EAAK,WAAU;EAAf,UAAA,CACG,MACD,oBAAC,gBAAD;GAAgB,MAAK;GAAW,OAAM;GAAwB,SAAS;GAAyB;EAAa,CAAA,CAC1G;;AAET"}
@@ -2,18 +2,18 @@ export interface SkillActivation {
2
2
  name: string;
3
3
  instructions: string;
4
4
  arguments?: string;
5
- /** The work-item feed appended after the envelope: comments written by collaborators, shown as context. */
6
- feed?: string;
5
+ /** The work-item description appended after the envelope, shown as context. */
6
+ description?: string;
7
7
  }
8
8
  export declare function parseSkillActivation(text: string): SkillActivation | undefined;
9
9
  /**
10
10
  * Parses the contents of a typed `skill` signal (the skill name travels as a signal
11
- * attribute, so there is no envelope). A trailing work-item feed is split out.
11
+ * attribute, so there is no envelope). A trailing work-item description is split out.
12
12
  */
13
13
  export declare function parseSkillBody(name: string, text: string): SkillActivation | undefined;
14
14
  /**
15
- * Parses a skill as the model sees it in a user message: the legacy envelope (feed trailing it) or
15
+ * Parses a skill as the model sees it in a user message: the legacy envelope (description trailing it) or
16
16
  * a typed skill signal rendered as `<skill name="…">contents</skill>`, whose contents may end
17
- * with the work-item feed.
17
+ * with the work-item description.
18
18
  */
19
19
  export declare function parseSkillMarkup(text: string): SkillActivation | undefined;
@@ -8,7 +8,7 @@ export { SidebarHeader, type SidebarHeaderProps } from './header/sidebar-header'
8
8
  export { SidebarMeter, type SidebarMeterProps, type SidebarMeterTone } from './footer/sidebar-meter';
9
9
  export { SidebarNav, type SidebarNavProps } from './nav/sidebar-nav';
10
10
  export { SidebarNavHeader, type SidebarNavHeaderProps } from './nav/sidebar-nav-header';
11
- export { SidebarNavLink, type SidebarLink, type SidebarNavLinkProps } from './nav/sidebar-nav-link';
11
+ export { SidebarNavAction, SidebarNavLink, type SidebarLink, type SidebarNavLinkProps } from './nav/sidebar-nav-link';
12
12
  export { SidebarNavShowMore, type SidebarNavShowMoreProps } from './nav/sidebar-nav-show-more';
13
13
  export { navItemClasses, type SidebarNavItemSize } from './nav/sidebar-nav-item-classes';
14
14
  export { getIsLinkActive } from './nav/sidebar-link-active';
@@ -1,8 +1,13 @@
1
- import type { ComponentPropsWithoutRef } from 'react';
1
+ import type { ComponentPropsWithoutRef, ReactNode } from 'react';
2
2
  import type { SidebarState } from '../root/sidebar-context';
3
3
  export type SidebarNavLabelProps = ComponentPropsWithoutRef<'span'> & {
4
4
  /** Override sidebar state. Defaults to context, then `'default'`. */
5
5
  state?: SidebarState;
6
+ /**
7
+ * Secondary line under the label (time, counts, small icons). The row grows to
8
+ * hold it. Hidden when the sidebar is collapsed.
9
+ */
10
+ description?: ReactNode;
6
11
  };
7
12
  /**
8
13
  * Label slot for `Sidebar.NavLink` rows.
@@ -15,4 +20,4 @@ export type SidebarNavLabelProps = ComponentPropsWithoutRef<'span'> & {
15
20
  * `link={...}` path wraps the name internally, but custom elements bring their
16
21
  * own children, so the label needs to opt into the collapse-aware rendering.
17
22
  */
18
- export declare function SidebarNavLabel({ children, className, state: stateProp, ...rest }: SidebarNavLabelProps): import("react").JSX.Element;
23
+ export declare function SidebarNavLabel({ children, className, description, state: stateProp, ...rest }: SidebarNavLabelProps): import("react").JSX.Element;
@@ -2,6 +2,7 @@ import React from 'react';
2
2
  import type { ComponentProps } from 'react';
3
3
  import type { SidebarState } from '../root/sidebar-context';
4
4
  import type { SidebarNavItemSize } from './sidebar-nav-item-classes';
5
+ import { Button } from '../../Button';
5
6
  import type { LinkComponent } from '../../../types/link-component';
6
7
  export type SidebarLink = {
7
8
  name: string;
@@ -43,4 +44,12 @@ type SlottedNavChildProps = {
43
44
  'aria-current'?: 'page';
44
45
  };
45
46
  export declare function SidebarNavLink({ link, state: stateProp, children, isActive, size, render, action, className, LinkComponent: LinkProp, level: levelProp, subItems, asChild, ...props }: SidebarNavLinkProps): React.JSX.Element;
47
+ /**
48
+ * An icon button for a row's `action` slot: 24px, so it keeps 3px from the row's top and
49
+ * right edges on a 30px row, with corners inset from the row's `rounded-lg` by those 3px.
50
+ *
51
+ * A row with actions is `group/nav-row` and `relative`, so hover-only actions reveal with
52
+ * `group-hover/nav-row:` without lighting up while a nested row in `subItems` is hovered.
53
+ */
54
+ export declare function SidebarNavAction({ className, ...props }: Omit<ComponentProps<typeof Button>, 'variant' | 'size'>): React.JSX.Element;
46
55
  export {};
@@ -5,7 +5,7 @@ import { SidebarHeader } from './header/sidebar-header';
5
5
  import { SidebarNav } from './nav/sidebar-nav';
6
6
  import { SidebarNavHeader } from './nav/sidebar-nav-header';
7
7
  import { SidebarNavLabel } from './nav/sidebar-nav-label';
8
- import { SidebarNavLink } from './nav/sidebar-nav-link';
8
+ import { SidebarNavAction, SidebarNavLink } from './nav/sidebar-nav-link';
9
9
  import { SidebarNavList } from './nav/sidebar-nav-list';
10
10
  import { SidebarNavSection } from './nav/sidebar-nav-section';
11
11
  import { SidebarNavSeparator } from './nav/sidebar-nav-separator';
@@ -28,6 +28,7 @@ export declare const Sidebar: typeof SidebarRoot & {
28
28
  MobileTrigger: typeof SidebarMobileTrigger;
29
29
  Nav: typeof SidebarNav;
30
30
  NavHeader: typeof SidebarNavHeader;
31
+ NavAction: typeof SidebarNavAction;
31
32
  NavLabel: typeof SidebarNavLabel;
32
33
  NavLink: typeof SidebarNavLink;
33
34
  NavList: typeof SidebarNavList;