@assistant-ui/react-o11y 0.0.25 → 0.0.27

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,4 @@
1
1
  import { FC, PropsWithChildren } from "react";
2
-
3
2
  //#region src/context/SpanByIndexProvider.d.ts
4
3
  declare const SpanByIndexProvider: FC<PropsWithChildren<{
5
4
  index: number;
@@ -1 +1 @@
1
- {"version":3,"file":"SpanByIndexProvider.d.ts","names":[],"sources":["../../src/context/SpanByIndexProvider.tsx"],"mappings":";;;cAGa,mBAAA,EAAqB,EAAE,CAAC,iBAAA;EAAoB,KAAA;AAAA"}
1
+ {"version":3,"file":"SpanByIndexProvider.d.ts","names":[],"sources":["../../src/context/SpanByIndexProvider.tsx"],"mappings":";;cAGa,qBAAqB,GAAG;EAAoB"}
@@ -1,3 +1,4 @@
1
+ import "@assistant-ui/store";
1
2
  //#region src/o11y-scope.d.ts
2
3
  type SpanItemState = {
3
4
  id: string;
@@ -1 +1 @@
1
- {"version":3,"file":"o11y-scope.d.ts","names":[],"sources":["../src/o11y-scope.ts"],"mappings":";KAEY,aAAA;EACV,EAAA;EACA,YAAA;EACA,IAAA;EACA,IAAA;EACA,MAAA;EACA,SAAA;EACA,OAAA;EACA,SAAA;EACA,KAAA;EACA,WAAA;EACA,WAAA;AAAA;AAAA,KAGU,SAAA,GAAY,aAAA;EACtB,QAAA,EAAU,aAAa;EACvB,SAAA;IAAa,GAAA;IAAa,GAAA;EAAA;AAAA;AAAA,KAGvB,WAAA;EACH,QAAA,QAAgB,SAAA;EAChB,KAAA,GAAQ,MAAA,EAAQ,QAAA,cAAsB,WAAA;EACtC,cAAA;AAAA;AAAA,KAGG,QAAA;EACH,MAAA;EACA,KAAA;IAAS,KAAA;EAAA;IAAoB,GAAA;EAAA;AAAA;AAAA;EAAA,UAInB,aAAA;IACR,IAAA;MACE,OAAA,EAAS,WAAA;MACT,IAAA,EAAM,QAAQ;IAAA;EAAA;AAAA"}
1
+ {"version":3,"file":"o11y-scope.d.ts","names":[],"sources":["../src/o11y-scope.ts"],"mappings":";;KAEY;EACV;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;KAGU,YAAY;EACtB,UAAU;EACV;IAAa;IAAa;;;KAGvB;EACH,gBAAgB;EAChB,QAAQ,QAAQ,sBAAsB;EACtC;;KAGG;EACH;EACA;IAAS;;IAAoB;;;;YAInB;IACR;MACE,SAAS;MACT,MAAM"}
@@ -1,6 +1,5 @@
1
1
  import { SpanState } from "../../o11y-scope.js";
2
2
  import { ComponentType, FC, ReactNode } from "react";
3
-
4
3
  //#region src/primitives/span/SpanChildren.d.ts
5
4
  type SpanChildrenComponentConfig = {
6
5
  Span: ComponentType;
@@ -10,7 +9,8 @@ declare namespace SpanPrimitiveChildren {
10
9
  components: SpanChildrenComponentConfig;
11
10
  children?: never;
12
11
  } | {
13
- /** Render function called for each child span. Receives the span. */children: (value: {
12
+ /** Render function called for each child span. Receives the span. */
13
+ children: (value: {
14
14
  span: SpanState;
15
15
  }) => ReactNode;
16
16
  components?: never;
@@ -1 +1 @@
1
- {"version":3,"file":"SpanChildren.d.ts","names":[],"sources":["../../../src/primitives/span/SpanChildren.tsx"],"mappings":";;;;KAWK,2BAAA;EACH,IAAA,EAAM,aAAa;AAAA;AAAA,kBAGJ,qBAAA;EAAA,KACH,KAAA;IAEN,UAAA,EAAY,2BAAA;IACZ,QAAA;EAAA;IAJ8B,qEAQ9B,QAAA,GAAW,KAAA;MAAS,IAAA,EAAM,SAAA;IAAA,MAAgB,SAAA;IAC1C,UAAA;EAAA;AAAA;AAAA,kBAIS,yBAAA;EAAA,KACH,KAAA;IACV,KAAA;IACA,UAAA,EAAY,2BAA2B;EAAA;AAAA;AAAA,cAI9B,yBAAA,EAA2B,EAAE,CAAC,yBAAA,CAA0B,KAAA;AAAA,cAuDxD,qBAAA,EAAuB,EAAE,CAAC,qBAAA,CAAsB,KAAA"}
1
+ {"version":3,"file":"SpanChildren.d.ts","names":[],"sources":["../../../src/primitives/span/SpanChildren.tsx"],"mappings":";;;KAWK;EACH,MAAM;;kBAGS;OACH;IAEN,YAAY;IACZ;;;IAIA,WAAW;MAAS,MAAM;UAAgB;IAC1C;;;kBAIS;OACH;IACV;IACA,YAAY;;;cAIH,2BAA2B,GAAG,0BAA0B;cAuDxD,uBAAuB,GAAG,sBAAsB"}
@@ -1 +1 @@
1
- {"version":3,"file":"SpanChildren.js","names":["ComponentType","FC","ReactNode","memo","useMemo","RenderChildrenWithAccessor","useAuiState","SpanState","SpanByIndexProvider","SpanChildrenComponentConfig","Span","SpanPrimitiveChildren","Props","components","children","value","span","SpanPrimitiveChildByIndex","index","t0","$","_c","t1","t2","prev","next","displayName","SpanPrimitiveChildrenInner","childrenLength","s","length","Array","from","_","aui","getState","getItem","SpanPrimitiveChildrenImpl"],"sources":["../../../src/primitives/span/SpanChildren.tsx"],"sourcesContent":["import {\n type ComponentType,\n type FC,\n type ReactNode,\n memo,\n useMemo,\n} from \"react\";\nimport { RenderChildrenWithAccessor, useAuiState } from \"@assistant-ui/store\";\nimport type { SpanState } from \"../../o11y-scope\";\nimport { SpanByIndexProvider } from \"../../context/SpanByIndexProvider\";\n\ntype SpanChildrenComponentConfig = {\n Span: ComponentType;\n};\n\nexport namespace SpanPrimitiveChildren {\n export type Props =\n | {\n components: SpanChildrenComponentConfig;\n children?: never;\n }\n | {\n /** Render function called for each child span. Receives the span. */\n children: (value: { span: SpanState }) => ReactNode;\n components?: never;\n };\n}\n\nexport namespace SpanPrimitiveChildByIndex {\n export type Props = {\n index: number;\n components: SpanChildrenComponentConfig;\n };\n}\n\nexport const SpanPrimitiveChildByIndex: FC<SpanPrimitiveChildByIndex.Props> =\n memo(\n ({ index, components }) => {\n return (\n <SpanByIndexProvider index={index}>\n <components.Span />\n </SpanByIndexProvider>\n );\n },\n (prev, next) =>\n prev.index === next.index &&\n prev.components.Span === next.components.Span,\n );\n\nSpanPrimitiveChildByIndex.displayName = \"SpanPrimitive.ChildByIndex\";\n\nconst SpanPrimitiveChildrenInner: FC<{\n children: (value: { span: SpanState }) => ReactNode;\n}> = ({ children }) => {\n const childrenLength = useAuiState((s) => s.span.children.length);\n\n return useMemo(() => {\n if (childrenLength === 0) return null;\n return Array.from({ length: childrenLength }, (_, index) => (\n <SpanByIndexProvider key={index} index={index}>\n <RenderChildrenWithAccessor\n getItemState={(aui) => aui.span().getState()}\n >\n {(getItem) =>\n children({\n get span() {\n return getItem();\n },\n })\n }\n </RenderChildrenWithAccessor>\n </SpanByIndexProvider>\n ));\n }, [childrenLength, children]);\n};\n\nconst SpanPrimitiveChildrenImpl: FC<SpanPrimitiveChildren.Props> = ({\n components,\n children,\n}) => {\n if (components) {\n return (\n <SpanPrimitiveChildrenInner>\n {() => <components.Span />}\n </SpanPrimitiveChildrenInner>\n );\n }\n return <SpanPrimitiveChildrenInner>{children}</SpanPrimitiveChildrenInner>;\n};\n\nexport const SpanPrimitiveChildren: FC<SpanPrimitiveChildren.Props> = memo(\n SpanPrimitiveChildrenImpl,\n (prev, next) => {\n if (prev.children || next.children) {\n return prev.children === next.children;\n }\n return prev.components!.Span === next.components!.Span;\n },\n);\n\nSpanPrimitiveChildren.displayName = \"SpanPrimitive.Children\";\n"],"mappings":";;;;;;AAmCA,MAAaiB,4BACXd,MACEgB,OAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CAAC,MAAA,EAAAH,OAAAL,eAAAM;CAAqB,IAAAG;CAAA,IAAAF,EAAA,OAAAP,WAAAH,MAAA;EAGhBY,KAAA,oBAAA,WAAA,MAAA,CAAA,CAAA;EAAmBF,EAAA,KAAAP,WAAAH;EAAAU,EAAA,KAAAE;CAAA,OAAAA,KAAAF,EAAA;CAAA,IAAAG;CAAA,IAAAH,EAAA,OAAAF,SAAAE,EAAA,OAAAE,IAAA;EADrBC,KAAA,oBAAC,qBAAD;GAA4BL;aAC1BI;EADkB,CAAA;EAEEF,EAAA,KAAAF;EAAAE,EAAA,KAAA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pEkC,4BACCb,MAAMC,SAAS;CACd,IAAID,KAAKV,YAAYW,KAAKX,UACxB,OAAOU,KAAKV,aAAaW,KAAKX;CAEhC,OAAOU,KAAKX,WAAYH,SAASe,KAAKZ,WAAYH;AACpD,CACF;AAEAC,sBAAsBe,cAAc"}
1
+ {"version":3,"file":"SpanChildren.js","names":["ComponentType","FC","ReactNode","memo","useMemo","RenderChildrenWithAccessor","useAuiState","SpanState","SpanByIndexProvider","SpanChildrenComponentConfig","Span","SpanPrimitiveChildren","Props","components","children","value","span","SpanPrimitiveChildByIndex","index","t0","$","_c","t1","t2","prev","next","displayName","SpanPrimitiveChildrenInner","childrenLength","s","length","Array","from","_","aui","getState","getItem","SpanPrimitiveChildrenImpl"],"sources":["../../../src/primitives/span/SpanChildren.tsx"],"sourcesContent":["import {\n type ComponentType,\n type FC,\n type ReactNode,\n memo,\n useMemo,\n} from \"react\";\nimport { RenderChildrenWithAccessor, useAuiState } from \"@assistant-ui/store\";\nimport type { SpanState } from \"../../o11y-scope\";\nimport { SpanByIndexProvider } from \"../../context/SpanByIndexProvider\";\n\ntype SpanChildrenComponentConfig = {\n Span: ComponentType;\n};\n\nexport namespace SpanPrimitiveChildren {\n export type Props =\n | {\n components: SpanChildrenComponentConfig;\n children?: never;\n }\n | {\n /** Render function called for each child span. Receives the span. */\n children: (value: { span: SpanState }) => ReactNode;\n components?: never;\n };\n}\n\nexport namespace SpanPrimitiveChildByIndex {\n export type Props = {\n index: number;\n components: SpanChildrenComponentConfig;\n };\n}\n\nexport const SpanPrimitiveChildByIndex: FC<SpanPrimitiveChildByIndex.Props> =\n memo(\n ({ index, components }) => {\n return (\n <SpanByIndexProvider index={index}>\n <components.Span />\n </SpanByIndexProvider>\n );\n },\n (prev, next) =>\n prev.index === next.index &&\n prev.components.Span === next.components.Span,\n );\n\nSpanPrimitiveChildByIndex.displayName = \"SpanPrimitive.ChildByIndex\";\n\nconst SpanPrimitiveChildrenInner: FC<{\n children: (value: { span: SpanState }) => ReactNode;\n}> = ({ children }) => {\n const childrenLength = useAuiState((s) => s.span.children.length);\n\n return useMemo(() => {\n if (childrenLength === 0) return null;\n return Array.from({ length: childrenLength }, (_, index) => (\n <SpanByIndexProvider key={index} index={index}>\n <RenderChildrenWithAccessor\n getItemState={(aui) => aui.span().getState()}\n >\n {(getItem) =>\n children({\n get span() {\n return getItem();\n },\n })\n }\n </RenderChildrenWithAccessor>\n </SpanByIndexProvider>\n ));\n }, [childrenLength, children]);\n};\n\nconst SpanPrimitiveChildrenImpl: FC<SpanPrimitiveChildren.Props> = ({\n components,\n children,\n}) => {\n if (components) {\n return (\n <SpanPrimitiveChildrenInner>\n {() => <components.Span />}\n </SpanPrimitiveChildrenInner>\n );\n }\n return <SpanPrimitiveChildrenInner>{children}</SpanPrimitiveChildrenInner>;\n};\n\nexport const SpanPrimitiveChildren: FC<SpanPrimitiveChildren.Props> = memo(\n SpanPrimitiveChildrenImpl,\n (prev, next) => {\n if (prev.children || next.children) {\n return prev.children === next.children;\n }\n return prev.components!.Span === next.components!.Span;\n },\n);\n\nSpanPrimitiveChildren.displayName = \"SpanPrimitive.Children\";\n"],"mappings":";;;;;;AAmCA,MAAaiB,4BACXd,MACEgB,OAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CAAC,MAAA,EAAAH,OAAAL,eAAAM;CAAqB,IAAAG;CAAA,IAAAF,EAAA,OAAAP,WAAAH,MAAA;EAGhBY,KAAA,oBAAA,WAAA,MAAA,CAAA,CAAA;EAAmBF,EAAA,KAAAP,WAAAH;EAAAU,EAAA,KAAAE;CAAA,OAAAA,KAAAF,EAAA;CAAA,IAAAG;CAAA,IAAAH,EAAA,OAAAF,SAAAE,EAAA,OAAAE,IAAA;EADrBC,KAAA,oBAAC,qBAAD;GAA4BL;GAC1BI,UAAAA;EADkB,CAAA;EAEEF,EAAA,KAAAF;EAAAE,EAAA,KAAAE;EAAAF,EAAA,KAAAG;CAAA,OAAAA,KAAAH,EAAA;CAAA,OAFtBG;AAEsB,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,UACxB,OAAOU,KAAKV,aAAaW,KAAKX;CAEhC,OAAOU,KAAKX,WAAYH,SAASe,KAAKZ,WAAYH;AACpD,CACF;AAEAC,sBAAsBe,cAAc"}
@@ -1,6 +1,5 @@
1
1
  import { ComponentPropsWithoutRef, ComponentRef } from "react";
2
2
  import { Primitive } from "@radix-ui/react-primitive";
3
-
4
3
  //#region src/primitives/span/SpanCollapseToggle.d.ts
5
4
  declare namespace SpanPrimitiveCollapseToggle {
6
5
  type Element = ComponentRef<typeof Primitive.button>;
@@ -1 +1 @@
1
- {"version":3,"file":"SpanCollapseToggle.d.ts","names":[],"sources":["../../../src/primitives/span/SpanCollapseToggle.tsx"],"mappings":";;;;kBAQiB,2BAAA;EAAA,KACH,OAAA,GAAU,YAAA,QAAoB,SAAA,CAAU,MAAA;EAAA,KACxC,KAAA,GAAQ,wBAAA,QAAgC,SAAA,CAAU,MAAA;AAAA;AAAA,cAGnD,2BAAA,kBAA2B,yBAAA,CAAA,IAAA,iBAAA,eAAA,CAAA,iBAAA,oBAAA,oBAAA,CAAA,iBAAA"}
1
+ {"version":3,"file":"SpanCollapseToggle.d.ts","names":[],"sources":["../../../src/primitives/span/SpanCollapseToggle.tsx"],"mappings":";;;kBAQiB;OACH,UAAU,oBAAoB,UAAU;OACxC,QAAQ,gCAAgC,UAAU;;cAGnD,6CAA2B,0BAAA,qBAAA,gBAAA,qCAAA,qBAAA;;4BAuBtC,cAAA"}
@@ -1,6 +1,5 @@
1
1
  import { ComponentPropsWithoutRef, ComponentRef } from "react";
2
2
  import { Primitive } from "@radix-ui/react-primitive";
3
-
4
3
  //#region src/primitives/span/SpanIndent.d.ts
5
4
  declare namespace SpanPrimitiveIndent {
6
5
  type Element = ComponentRef<typeof Primitive.div>;
@@ -1 +1 @@
1
- {"version":3,"file":"SpanIndent.d.ts","names":[],"sources":["../../../src/primitives/span/SpanIndent.tsx"],"mappings":";;;;kBASiB,mBAAA;EAAA,KACH,OAAA,GAAU,YAAA,QAAoB,SAAA,CAAU,GAAA;EAAA,KACxC,KAAA,GAAQ,wBAAA,QAAgC,SAAA,CAAU,GAAA;IAC5D,UAAA;IACA,cAAA;EAAA;AAAA;AAAA,cAIS,mBAAA,kBAAmB,yBAAA,CAAA,IAAA,iBAAA,eAAA,CAAA,cAAA,oBAAA,cAAA,CAAA,cAAA"}
1
+ {"version":3,"file":"SpanIndent.d.ts","names":[],"sources":["../../../src/primitives/span/SpanIndent.tsx"],"mappings":";;;kBASiB;OACH,UAAU,oBAAoB,UAAU;OACxC,QAAQ,gCAAgC,UAAU;IAC5D;IACA;;;cAIS,qCAAmB,0BAAA,qBAAA,gBAAA,kCAAA,eAAA;;;EALf;EACI;oBA0BnB,cAAA"}
@@ -1,6 +1,5 @@
1
1
  import { ComponentPropsWithoutRef, ComponentRef } from "react";
2
2
  import { Primitive } from "@radix-ui/react-primitive";
3
-
4
3
  //#region src/primitives/span/SpanName.d.ts
5
4
  declare namespace SpanPrimitiveName {
6
5
  type Element = ComponentRef<typeof Primitive.span>;
@@ -1 +1 @@
1
- {"version":3,"file":"SpanName.d.ts","names":[],"sources":["../../../src/primitives/span/SpanName.tsx"],"mappings":";;;;kBAQiB,iBAAA;EAAA,KACH,OAAA,GAAU,YAAA,QAAoB,SAAA,CAAU,IAAA;EAAA,KACxC,KAAA,GAAQ,wBAAA,QAAgC,SAAA,CAAU,IAAA;AAAA;AAAA,cAGnD,iBAAA,kBAAiB,yBAAA,CAAA,IAAA,iBAAA,eAAA,CAAA,eAAA,oBAAA,cAAA,CAAA,eAAA"}
1
+ {"version":3,"file":"SpanName.d.ts","names":[],"sources":["../../../src/primitives/span/SpanName.tsx"],"mappings":";;;kBAQiB;OACH,UAAU,oBAAoB,UAAU;OACxC,QAAQ,gCAAgC,UAAU;;cAGnD,mCAAiB,0BAAA,qBAAA,gBAAA,mCAAA,eAAA;;4BAW5B,cAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"SpanName.js","names":["ComponentPropsWithoutRef","ComponentRef","forwardRef","Primitive","useAuiState","SpanPrimitiveName","Element","span","Props","props","ref","$","_c","name","_temp","t0","children","t1","displayName","s"],"sources":["../../../src/primitives/span/SpanName.tsx"],"sourcesContent":["import {\n type ComponentPropsWithoutRef,\n type ComponentRef,\n forwardRef,\n} from \"react\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useAuiState } from \"@assistant-ui/store\";\n\nexport namespace SpanPrimitiveName {\n export type Element = ComponentRef<typeof Primitive.span>;\n export type Props = ComponentPropsWithoutRef<typeof Primitive.span>;\n}\n\nexport const SpanPrimitiveName = forwardRef<\n SpanPrimitiveName.Element,\n SpanPrimitiveName.Props\n>((props, ref) => {\n const name = useAuiState((s) => s.span.name);\n\n return (\n <Primitive.span {...props} ref={ref}>\n {props.children ?? name}\n </Primitive.span>\n );\n});\n\nSpanPrimitiveName.displayName = \"SpanPrimitive.Name\";\n"],"mappings":";;;;;;AAaA,MAAaK,oBAAoBH,YAG/BO,OAAAC,QAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CACA,MAAAC,OAAaT,YAAYU,KAAkB;CAItC,MAAAC,KAAAN,MAAKO,YAALH;CAAsB,IAAAI;CAAA,IAAAN,EAAA,OAAAF,SAAAE,EAAA,OAAAD,OAAAC,EAAA,OAAAI,IAAA;EADzBE,KAAA,oBAAA,UAAA,MAAA;GAAA,GAAoBR;GAAYC;aAC7BK;EACH,CAAA;EAAiBJ,EAAA,KAAAF;EAAAE,EAAA,KAAAD;EAAAC,EAAA,KAAAI;EAAAJ,EAAA,KAAAM;CAAA,OAAAA,KAAAN,EAAA;CAAA,OAFjBM;AAEiB,CAEpB;AAEDZ,kBAAkBa,cAAc;AAV9B,SAAAJ,MAAAK,GAAA;CAAA,OACgCA,EAACZ,KAAKM;AAAK"}
1
+ {"version":3,"file":"SpanName.js","names":["ComponentPropsWithoutRef","ComponentRef","forwardRef","Primitive","useAuiState","SpanPrimitiveName","Element","span","Props","props","ref","$","_c","name","_temp","t0","children","t1","displayName","s"],"sources":["../../../src/primitives/span/SpanName.tsx"],"sourcesContent":["import {\n type ComponentPropsWithoutRef,\n type ComponentRef,\n forwardRef,\n} from \"react\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useAuiState } from \"@assistant-ui/store\";\n\nexport namespace SpanPrimitiveName {\n export type Element = ComponentRef<typeof Primitive.span>;\n export type Props = ComponentPropsWithoutRef<typeof Primitive.span>;\n}\n\nexport const SpanPrimitiveName = forwardRef<\n SpanPrimitiveName.Element,\n SpanPrimitiveName.Props\n>((props, ref) => {\n const name = useAuiState((s) => s.span.name);\n\n return (\n <Primitive.span {...props} ref={ref}>\n {props.children ?? name}\n </Primitive.span>\n );\n});\n\nSpanPrimitiveName.displayName = \"SpanPrimitive.Name\";\n"],"mappings":";;;;;;AAaA,MAAaK,oBAAoBH,YAG/BO,OAAAC,QAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CACA,MAAAC,OAAaT,YAAYU,KAAkB;CAItC,MAAAC,KAAAN,MAAKO,YAALH;CAAsB,IAAAI;CAAA,IAAAN,EAAA,OAAAF,SAAAE,EAAA,OAAAD,OAAAC,EAAA,OAAAI,IAAA;EADzBE,KAAA,oBAAA,UAAA,MAAA;GAAA,GAAoBR;GAAYC;GAC7BK,UAAAA;EACH,CAAA;EAAiBJ,EAAA,KAAAF;EAAAE,EAAA,KAAAD;EAAAC,EAAA,KAAAI;EAAAJ,EAAA,KAAAM;CAAA,OAAAA,KAAAN,EAAA;CAAA,OAFjBM;AAEiB,CAEpB;AAEDZ,kBAAkBa,cAAc;AAV9B,SAAAJ,MAAAK,GAAA;CAAA,OACgCA,EAACZ,KAAKM;AAAK"}
@@ -1,6 +1,5 @@
1
1
  import { ComponentPropsWithoutRef, ComponentRef } from "react";
2
2
  import { Primitive } from "@radix-ui/react-primitive";
3
-
4
3
  //#region src/primitives/span/SpanRoot.d.ts
5
4
  declare namespace SpanPrimitiveRoot {
6
5
  type Element = ComponentRef<typeof Primitive.div>;
@@ -1 +1 @@
1
- {"version":3,"file":"SpanRoot.d.ts","names":[],"sources":["../../../src/primitives/span/SpanRoot.tsx"],"mappings":";;;;kBAQiB,iBAAA;EAAA,KACH,OAAA,GAAU,YAAA,QAAoB,SAAA,CAAU,GAAA;EAAA,KACxC,KAAA,GAAQ,wBAAA,QAAgC,SAAA,CAAU,GAAA;AAAA;AAAA,cAGnD,iBAAA,kBAAiB,yBAAA,CAAA,IAAA,iBAAA,eAAA,CAAA,cAAA,oBAAA,cAAA,CAAA,cAAA"}
1
+ {"version":3,"file":"SpanRoot.d.ts","names":[],"sources":["../../../src/primitives/span/SpanRoot.tsx"],"mappings":";;;kBAQiB;OACH,UAAU,oBAAoB,UAAU;OACxC,QAAQ,gCAAgC,UAAU;;cAGnD,mCAAiB,0BAAA,qBAAA,gBAAA,kCAAA,eAAA;;4BAqB5B,cAAA"}
@@ -1,6 +1,5 @@
1
1
  import { ComponentPropsWithoutRef, ComponentRef } from "react";
2
2
  import { Primitive } from "@radix-ui/react-primitive";
3
-
4
3
  //#region src/primitives/span/SpanStatusIndicator.d.ts
5
4
  declare namespace SpanPrimitiveStatusIndicator {
6
5
  type Element = ComponentRef<typeof Primitive.span>;
@@ -1 +1 @@
1
- {"version":3,"file":"SpanStatusIndicator.d.ts","names":[],"sources":["../../../src/primitives/span/SpanStatusIndicator.tsx"],"mappings":";;;;kBAQiB,4BAAA;EAAA,KACH,OAAA,GAAU,YAAA,QAAoB,SAAA,CAAU,IAAA;EAAA,KACxC,KAAA,GAAQ,wBAAA,QAAgC,SAAA,CAAU,IAAA;AAAA;AAAA,cAGnD,4BAAA,kBAA4B,yBAAA,CAAA,IAAA,iBAAA,eAAA,CAAA,eAAA,oBAAA,cAAA,CAAA,eAAA"}
1
+ {"version":3,"file":"SpanStatusIndicator.d.ts","names":[],"sources":["../../../src/primitives/span/SpanStatusIndicator.tsx"],"mappings":";;;kBAQiB;OACH,UAAU,oBAAoB,UAAU;OACxC,QAAQ,gCAAgC,UAAU;;cAGnD,8CAA4B,0BAAA,qBAAA,gBAAA,mCAAA,eAAA;;4BAOvC,cAAA"}
@@ -1,6 +1,5 @@
1
1
  import { ComponentPropsWithoutRef, ComponentRef } from "react";
2
2
  import { Primitive } from "@radix-ui/react-primitive";
3
-
4
3
  //#region src/primitives/span/SpanTimeline.d.ts
5
4
  type SpanTimelineRange = {
6
5
  min: number;
@@ -26,12 +25,7 @@ declare namespace SpanPrimitiveTimelineBar {
26
25
  timeRange?: SpanTimelineRange | undefined;
27
26
  };
28
27
  }
29
- declare const getSpanTimelineBarVars: ({
30
- startedAt,
31
- endedAt,
32
- timeRange,
33
- now
34
- }: {
28
+ declare const getSpanTimelineBarVars: ({ startedAt, endedAt, timeRange, now }: {
35
29
  startedAt: number;
36
30
  endedAt: number | null;
37
31
  timeRange: SpanTimelineRange;
@@ -1 +1 @@
1
- {"version":3,"file":"SpanTimeline.d.ts","names":[],"sources":["../../../src/primitives/span/SpanTimeline.tsx"],"mappings":";;;;KAYY,iBAAA;EAAsB,GAAA;EAAa,GAAG;AAAA;AAAA,kBA6BjC,qBAAA;EAAA,KACH,OAAA,GAAU,YAAA,QAAoB,SAAA,CAAU,GAAA;EAAA,KACxC,KAAA,GAAQ,wBAAA,QAAgC,SAAA,CAAU,GAAA;IAC5D,SAAA,GAAY,iBAAA;IACZ,UAAA;EAAA;AAAA;AAAA,cAIS,qBAAA,kBAAqB,yBAAA,CAAA,IAAA,iBAAA,eAAA,CAAA,cAAA,oBAAA,cAAA,CAAA,cAAA;;;cALlB,iBAAA;;;kBAuCC,wBAAA;EAAA,KACH,OAAA,GAAU,YAAA,QAAoB,SAAA,CAAU,GAAA;EAAA,KACxC,KAAA,GAAQ,wBAAA,QAAgC,SAAA,CAAU,GAAA;IAC5D,GAAA;IACA,SAAA,GAAY,iBAAA;EAAA;AAAA;AAAA,cAIH,sBAAA;EAA0B,SAAA;EAAA,OAAA;EAAA,SAAA;EAAA;AAAA;EAMrC,SAAA;EACA,OAAA;EACA,SAAA,EAAW,iBAAA;EACX,GAAA;AAAA;;;;;;;cAqBW,wBAAA,kBAAwB,yBAAA,CAAA,IAAA,iBAAA,eAAA,CAAA,cAAA,oBAAA,cAAA,CAAA,cAAA;;;;cAlCrB,iBAAA;AAAA"}
1
+ {"version":3,"file":"SpanTimeline.d.ts","names":[],"sources":["../../../src/primitives/span/SpanTimeline.tsx"],"mappings":";;;KAYY;EAAsB;EAAa;;kBA6B9B;OACH,UAAU,oBAAoB,UAAU;OACxC,QAAQ,gCAAgC,UAAU;IAC5D,YAAY;IACZ;;;cAIS,uCAAqB,0BAAA,qBAAA,gBAAA,kCAAA,eAAA;;;EALlB,YAAA;EACC;oBAkCf,cAAA;kBAIe;OACH,UAAU,oBAAoB,UAAU;OACxC,QAAQ,gCAAgC,UAAU;IAC5D;IACA,YAAY;;;cAIH,2BAA0B,WAAA,SAAA,WAAA;EAMrC;EACA;EACA,WAAW;EACX;;;;;;;;cAqBW,0CAAwB,0BAAA,qBAAA,gBAAA,kCAAA,eAAA;;;EAnC3B;EACM,YAAA;oBA0Ed,cAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"SpanTimeline.js","names":["ComponentPropsWithoutRef","ComponentRef","CSSProperties","createContext","forwardRef","useContext","useMemo","Primitive","useAuiState","SpanTimelineRange","min","max","TimelineCssProperties","clampPercent","value","Math","normalizeRange","range","paddingEnd","duration","safePaddingEnd","SpanTimelineRangeContext","SpanPrimitiveTimeline","Element","div","Props","timeRange","t0","ref","$","_c","children","props","style","t1","undefined","spanTimeRange","_temp","t2","t3","resolvedRange","rangeMs","t4","mergedStyle","t5","t6","displayName","SpanPrimitiveTimelineBar","now","getSpanTimelineBarVars","startedAt","endedAt","effectiveEnd","leftPercent","rawEndPercent","endPercent","widthPercent","durationMs","contextRange","_temp2","_temp3","_temp4","status","_temp5","type","_temp6","vars","position","insetInlineStart","inlineSize","t7","t8","s","span","s_0","s_1","s_2","s_3"],"sources":["../../../src/primitives/span/SpanTimeline.tsx"],"sourcesContent":["import {\n type ComponentPropsWithoutRef,\n type ComponentRef,\n type CSSProperties,\n createContext,\n forwardRef,\n useContext,\n useMemo,\n} from \"react\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useAuiState } from \"@assistant-ui/store\";\n\nexport type SpanTimelineRange = { min: number; max: number };\n\ntype TimelineCssProperties = CSSProperties & {\n \"--span-timeline-min-ms\"?: number;\n \"--span-timeline-max-ms\"?: number;\n \"--span-timeline-range-ms\"?: number;\n \"--span-timeline-left\"?: string;\n \"--span-timeline-end\"?: string;\n \"--span-timeline-width\"?: string;\n \"--span-timeline-duration-ms\"?: number;\n \"--span-timeline-min-width\"?: string | number;\n};\n\nconst clampPercent = (value: number) => Math.min(100, Math.max(0, value));\n\nconst normalizeRange = (\n range: SpanTimelineRange,\n paddingEnd = 0,\n): SpanTimelineRange => {\n const duration = Math.max(1, range.max - range.min);\n const safePaddingEnd = Math.max(0, paddingEnd);\n return {\n min: range.min,\n max: range.max + duration * safePaddingEnd,\n };\n};\n\nconst SpanTimelineRangeContext = createContext<SpanTimelineRange | null>(null);\n\nexport namespace SpanPrimitiveTimeline {\n export type Element = ComponentRef<typeof Primitive.div>;\n export type Props = ComponentPropsWithoutRef<typeof Primitive.div> & {\n timeRange?: SpanTimelineRange | undefined;\n paddingEnd?: number | undefined;\n };\n}\n\nexport const SpanPrimitiveTimeline = forwardRef<\n SpanPrimitiveTimeline.Element,\n SpanPrimitiveTimeline.Props\n>(({ timeRange, paddingEnd = 0, style, children, ...props }, ref) => {\n const spanTimeRange = useAuiState((s) => s.span.timeRange);\n const resolvedRange = useMemo(\n () => normalizeRange(timeRange ?? spanTimeRange, paddingEnd),\n [timeRange, spanTimeRange, paddingEnd],\n );\n const rangeMs = Math.max(1, resolvedRange.max - resolvedRange.min);\n\n const mergedStyle: TimelineCssProperties = {\n ...style,\n \"--span-timeline-min-ms\": resolvedRange.min,\n \"--span-timeline-max-ms\": resolvedRange.max,\n \"--span-timeline-range-ms\": rangeMs,\n };\n\n return (\n <SpanTimelineRangeContext.Provider value={resolvedRange}>\n <Primitive.div\n {...props}\n ref={ref}\n style={mergedStyle}\n data-span-timeline=\"\"\n >\n {children}\n </Primitive.div>\n </SpanTimelineRangeContext.Provider>\n );\n});\n\nSpanPrimitiveTimeline.displayName = \"SpanPrimitive.Timeline\";\n\nexport namespace SpanPrimitiveTimelineBar {\n export type Element = ComponentRef<typeof Primitive.div>;\n export type Props = ComponentPropsWithoutRef<typeof Primitive.div> & {\n now?: number | undefined;\n timeRange?: SpanTimelineRange | undefined;\n };\n}\n\nexport const getSpanTimelineBarVars = ({\n startedAt,\n endedAt,\n timeRange,\n now,\n}: {\n startedAt: number;\n endedAt: number | null;\n timeRange: SpanTimelineRange;\n now?: number | undefined;\n}) => {\n const rangeMs = Math.max(1, timeRange.max - timeRange.min);\n const effectiveEnd = endedAt ?? now ?? timeRange.max;\n const leftPercent = clampPercent(\n ((startedAt - timeRange.min) / rangeMs) * 100,\n );\n const rawEndPercent = ((effectiveEnd - timeRange.min) / rangeMs) * 100;\n const endPercent = clampPercent(Math.max(leftPercent, rawEndPercent));\n const widthPercent = endPercent - leftPercent;\n const durationMs = Math.max(0, effectiveEnd - startedAt);\n\n return {\n leftPercent,\n endPercent,\n widthPercent,\n durationMs,\n effectiveEnd,\n };\n};\n\nexport const SpanPrimitiveTimelineBar = forwardRef<\n SpanPrimitiveTimelineBar.Element,\n SpanPrimitiveTimelineBar.Props\n>(({ now, timeRange, style, ...props }, ref) => {\n const contextRange = useContext(SpanTimelineRangeContext);\n const spanTimeRange = useAuiState((s) => s.span.timeRange);\n const startedAt = useAuiState((s) => s.span.startedAt);\n const endedAt = useAuiState((s) => s.span.endedAt);\n const status = useAuiState((s) => s.span.status);\n const type = useAuiState((s) => s.span.type);\n\n const vars = getSpanTimelineBarVars({\n startedAt,\n endedAt,\n timeRange: timeRange ?? contextRange ?? spanTimeRange,\n now,\n });\n\n const mergedStyle: TimelineCssProperties = {\n ...style,\n position: \"absolute\",\n insetInlineStart: \"var(--span-timeline-left)\",\n inlineSize:\n \"max(var(--span-timeline-width), var(--span-timeline-min-width, 0px))\",\n \"--span-timeline-left\": `${vars.leftPercent}%`,\n \"--span-timeline-end\": `${vars.endPercent}%`,\n \"--span-timeline-width\": `${vars.widthPercent}%`,\n \"--span-timeline-duration-ms\": vars.durationMs,\n };\n\n return (\n <Primitive.div\n {...props}\n ref={ref}\n style={mergedStyle}\n data-span-status={status}\n data-span-type={type}\n data-span-running={endedAt === null ? \"\" : undefined}\n />\n );\n});\n\nSpanPrimitiveTimelineBar.displayName = \"SpanPrimitive.TimelineBar\";\n"],"mappings":";;;;;;AAyBA,MAAMa,gBAAgBC,UAAkBC,KAAKL,IAAI,KAAKK,KAAKJ,IAAI,GAAGG,KAAK,CAAC;AAExE,MAAME,kBACJC,OACAC,aAAa,MACS;CACtB,MAAMC,WAAWJ,KAAKJ,IAAI,GAAGM,MAAMN,MAAMM,MAAMP,GAAG;CAClD,MAAMU,iBAAiBL,KAAKJ,IAAI,GAAGO,UAAU;CAC7C,OAAO;EACLR,KAAKO,MAAMP;EACXC,KAAKM,MAAMN,MAAMQ,WAAWC;CAC9B;AACF;AAEA,MAAMC,2BAA2BlB,cAAwC,IAAI;AAU7E,MAAamB,wBAAwBlB,YAGnCuB,IAAAC,QAAA;CAAA,MAAAC,IAAAC,EAAA,EAAA;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAR;CAAA,IAAAG,EAAA,OAAAF,IAAA;EAAC,CAAA,CAAAD,WAAAR,YAAAgB,IAAAD,OAAAF,aAAAC,SAAAL;EAAwDE,EAAA,KAAAF;EAAAE,EAAA,KAAAE;EAAAF,EAAA,KAAAG;EAAAH,EAAA,KAAAI;EAAAJ,EAAA,KAAAK;EAAAL,EAAA,KAAAH;CAAA,OAAA;EAAAK,WAAAF,EAAA;EAAAG,QAAAH,EAAA;EAAAI,QAAAJ,EAAA;EAAAK,KAAAL,EAAA;EAAAH,YAAAG,EAAA;CAA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EAAA,QAAAiC,UAAAjC,EAAA,QAAAyC,MAAAzC,EAAA,QAAAmC,MAAA;EANtDO,KAAA,oBAAA,UAAA,KAAA;GAAA,GACMvC;GACCJ;GACEe,OAAAA;GACWmB,oBAAAA;GACFE,kBAAAA;GACG,qBAAAM;EAAiC,CAAA;EACpDzC,EAAA,MAAAc;EAAAd,EAAA,MAAAG;EAAAH,EAAA,MAAAD;EAAAC,EAAA,MAAAiC;EAAAjC,EAAA,MAAAyC;EAAAzC,EAAA,MAAAmC;EAAAnC,EAAA,MAAA0C;CAAA,OAAAA,KAAA1C,EAAA;CAAA,OAPF0C;AAOE,CAEL;AAEDxB,yBAAyBD,cAAc;AA/GrC,SAAAT,MAAAmC,GAAA;CAAA,OACyCA,EAACC,KAAK/C;AAAU;AAuEzD,SAAAiC,OAAAa,GAAA;CAAA,OAEyCA,EAACC,KAAK/C;AAAU;AAFzD,SAAAkC,OAAAc,KAAA;CAAA,OAGqCF,IAACC,KAAKvB;AAAU;AAHrD,SAAAW,OAAAc,KAAA;CAAA,OAImCH,IAACC,KAAKtB;AAAQ;AAJjD,SAAAY,OAAAa,KAAA;CAAA,OAKkCJ,IAACC,KAAKX;AAAO;AAL/C,SAAAG,OAAAY,KAAA;CAAA,OAMgCL,IAACC,KAAKT;AAAK"}
1
+ {"version":3,"file":"SpanTimeline.js","names":["ComponentPropsWithoutRef","ComponentRef","CSSProperties","createContext","forwardRef","useContext","useMemo","Primitive","useAuiState","SpanTimelineRange","min","max","TimelineCssProperties","clampPercent","value","Math","normalizeRange","range","paddingEnd","duration","safePaddingEnd","SpanTimelineRangeContext","SpanPrimitiveTimeline","Element","div","Props","timeRange","t0","ref","$","_c","children","props","style","t1","undefined","spanTimeRange","_temp","t2","t3","resolvedRange","rangeMs","t4","mergedStyle","t5","t6","displayName","SpanPrimitiveTimelineBar","now","getSpanTimelineBarVars","startedAt","endedAt","effectiveEnd","leftPercent","rawEndPercent","endPercent","widthPercent","durationMs","contextRange","_temp2","_temp3","_temp4","status","_temp5","type","_temp6","vars","position","insetInlineStart","inlineSize","t7","t8","s","span","s_0","s_1","s_2","s_3"],"sources":["../../../src/primitives/span/SpanTimeline.tsx"],"sourcesContent":["import {\n type ComponentPropsWithoutRef,\n type ComponentRef,\n type CSSProperties,\n createContext,\n forwardRef,\n useContext,\n useMemo,\n} from \"react\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useAuiState } from \"@assistant-ui/store\";\n\nexport type SpanTimelineRange = { min: number; max: number };\n\ntype TimelineCssProperties = CSSProperties & {\n \"--span-timeline-min-ms\"?: number;\n \"--span-timeline-max-ms\"?: number;\n \"--span-timeline-range-ms\"?: number;\n \"--span-timeline-left\"?: string;\n \"--span-timeline-end\"?: string;\n \"--span-timeline-width\"?: string;\n \"--span-timeline-duration-ms\"?: number;\n \"--span-timeline-min-width\"?: string | number;\n};\n\nconst clampPercent = (value: number) => Math.min(100, Math.max(0, value));\n\nconst normalizeRange = (\n range: SpanTimelineRange,\n paddingEnd = 0,\n): SpanTimelineRange => {\n const duration = Math.max(1, range.max - range.min);\n const safePaddingEnd = Math.max(0, paddingEnd);\n return {\n min: range.min,\n max: range.max + duration * safePaddingEnd,\n };\n};\n\nconst SpanTimelineRangeContext = createContext<SpanTimelineRange | null>(null);\n\nexport namespace SpanPrimitiveTimeline {\n export type Element = ComponentRef<typeof Primitive.div>;\n export type Props = ComponentPropsWithoutRef<typeof Primitive.div> & {\n timeRange?: SpanTimelineRange | undefined;\n paddingEnd?: number | undefined;\n };\n}\n\nexport const SpanPrimitiveTimeline = forwardRef<\n SpanPrimitiveTimeline.Element,\n SpanPrimitiveTimeline.Props\n>(({ timeRange, paddingEnd = 0, style, children, ...props }, ref) => {\n const spanTimeRange = useAuiState((s) => s.span.timeRange);\n const resolvedRange = useMemo(\n () => normalizeRange(timeRange ?? spanTimeRange, paddingEnd),\n [timeRange, spanTimeRange, paddingEnd],\n );\n const rangeMs = Math.max(1, resolvedRange.max - resolvedRange.min);\n\n const mergedStyle: TimelineCssProperties = {\n ...style,\n \"--span-timeline-min-ms\": resolvedRange.min,\n \"--span-timeline-max-ms\": resolvedRange.max,\n \"--span-timeline-range-ms\": rangeMs,\n };\n\n return (\n <SpanTimelineRangeContext.Provider value={resolvedRange}>\n <Primitive.div\n {...props}\n ref={ref}\n style={mergedStyle}\n data-span-timeline=\"\"\n >\n {children}\n </Primitive.div>\n </SpanTimelineRangeContext.Provider>\n );\n});\n\nSpanPrimitiveTimeline.displayName = \"SpanPrimitive.Timeline\";\n\nexport namespace SpanPrimitiveTimelineBar {\n export type Element = ComponentRef<typeof Primitive.div>;\n export type Props = ComponentPropsWithoutRef<typeof Primitive.div> & {\n now?: number | undefined;\n timeRange?: SpanTimelineRange | undefined;\n };\n}\n\nexport const getSpanTimelineBarVars = ({\n startedAt,\n endedAt,\n timeRange,\n now,\n}: {\n startedAt: number;\n endedAt: number | null;\n timeRange: SpanTimelineRange;\n now?: number | undefined;\n}) => {\n const rangeMs = Math.max(1, timeRange.max - timeRange.min);\n const effectiveEnd = endedAt ?? now ?? timeRange.max;\n const leftPercent = clampPercent(\n ((startedAt - timeRange.min) / rangeMs) * 100,\n );\n const rawEndPercent = ((effectiveEnd - timeRange.min) / rangeMs) * 100;\n const endPercent = clampPercent(Math.max(leftPercent, rawEndPercent));\n const widthPercent = endPercent - leftPercent;\n const durationMs = Math.max(0, effectiveEnd - startedAt);\n\n return {\n leftPercent,\n endPercent,\n widthPercent,\n durationMs,\n effectiveEnd,\n };\n};\n\nexport const SpanPrimitiveTimelineBar = forwardRef<\n SpanPrimitiveTimelineBar.Element,\n SpanPrimitiveTimelineBar.Props\n>(({ now, timeRange, style, ...props }, ref) => {\n const contextRange = useContext(SpanTimelineRangeContext);\n const spanTimeRange = useAuiState((s) => s.span.timeRange);\n const startedAt = useAuiState((s) => s.span.startedAt);\n const endedAt = useAuiState((s) => s.span.endedAt);\n const status = useAuiState((s) => s.span.status);\n const type = useAuiState((s) => s.span.type);\n\n const vars = getSpanTimelineBarVars({\n startedAt,\n endedAt,\n timeRange: timeRange ?? contextRange ?? spanTimeRange,\n now,\n });\n\n const mergedStyle: TimelineCssProperties = {\n ...style,\n position: \"absolute\",\n insetInlineStart: \"var(--span-timeline-left)\",\n inlineSize:\n \"max(var(--span-timeline-width), var(--span-timeline-min-width, 0px))\",\n \"--span-timeline-left\": `${vars.leftPercent}%`,\n \"--span-timeline-end\": `${vars.endPercent}%`,\n \"--span-timeline-width\": `${vars.widthPercent}%`,\n \"--span-timeline-duration-ms\": vars.durationMs,\n };\n\n return (\n <Primitive.div\n {...props}\n ref={ref}\n style={mergedStyle}\n data-span-status={status}\n data-span-type={type}\n data-span-running={endedAt === null ? \"\" : undefined}\n />\n );\n});\n\nSpanPrimitiveTimelineBar.displayName = \"SpanPrimitive.TimelineBar\";\n"],"mappings":";;;;;;AAyBA,MAAMa,gBAAgBC,UAAkBC,KAAKL,IAAI,KAAKK,KAAKJ,IAAI,GAAGG,KAAK,CAAC;AAExE,MAAME,kBACJC,OACAC,aAAa,MACS;CACtB,MAAMC,WAAWJ,KAAKJ,IAAI,GAAGM,MAAMN,MAAMM,MAAMP,GAAG;CAClD,MAAMU,iBAAiBL,KAAKJ,IAAI,GAAGO,UAAU;CAC7C,OAAO;EACLR,KAAKO,MAAMP;EACXC,KAAKM,MAAMN,MAAMQ,WAAWC;CAC9B;AACF;AAEA,MAAMC,2BAA2BlB,cAAwC,IAAI;AAU7E,MAAamB,wBAAwBlB,YAGnCuB,IAAAC,QAAA;CAAA,MAAAC,IAAAC,EAAA,EAAA;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAR;CAAA,IAAAG,EAAA,OAAAF,IAAA;EAAC,CAAA,CAAAD,WAAAR,YAAAgB,IAAAD,OAAAF,aAAAC,SAAAL;EAAwDE,EAAA,KAAAF;EAAAE,EAAA,KAAAE;EAAAF,EAAA,KAAAG;EAAAH,EAAA,KAAAI;EAAAJ,EAAA,KAAAK;EAAA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BpB,MAAAyB,KAAAnB,YAAY,OAAZ,KAAAhB,KAAAA;CAAiC,IAAAoC;CAAA,IAAA1C,EAAA,QAAAc,eAAAd,EAAA,QAAAG,SAAAH,EAAA,QAAAD,OAAAC,EAAA,QAAAiC,UAAAjC,EAAA,QAAAyC,MAAAzC,EAAA,QAAAmC,MAAA;EANtDO,KAAA,oBAAA,UAAA,KAAA;GAAA,GACMvC;GACCJ;GACEe,OAAAA;GACWmB,oBAAAA;GACFE,kBAAAA;GACG,qBAAAM;EAAiC,CAAA;EACpDzC,EAAA,MAAAc;EAAAd,EAAA,MAAAG;EAAAH,EAAA,MAAAD;EAAAC,EAAA,MAAAiC;EAAAjC,EAAA,MAAAyC;EAAAzC,EAAA,MAAAmC;EAAAnC,EAAA,MAAA0C;CAAA,OAAAA,KAAA1C,EAAA;CAAA,OAPF0C;AAOE,CAEL;AAEDxB,yBAAyBD,cAAc;AA/GrC,SAAAT,MAAAmC,GAAA;CAAA,OACyCA,EAACC,KAAK/C;AAAU;AAuEzD,SAAAiC,OAAAa,GAAA;CAAA,OAEyCA,EAACC,KAAK/C;AAAU;AAFzD,SAAAkC,OAAAc,KAAA;CAAA,OAGqCF,IAACC,KAAKvB;AAAU;AAHrD,SAAAW,OAAAc,KAAA;CAAA,OAImCH,IAACC,KAAKtB;AAAQ;AAJjD,SAAAY,OAAAa,KAAA;CAAA,OAKkCJ,IAACC,KAAKX;AAAO;AAL/C,SAAAG,OAAAY,KAAA;CAAA,OAMgCL,IAACC,KAAKT;AAAK"}
@@ -1,6 +1,5 @@
1
1
  import { ComponentPropsWithoutRef, ComponentRef } from "react";
2
2
  import { Primitive } from "@radix-ui/react-primitive";
3
-
4
3
  //#region src/primitives/span/SpanTypeBadge.d.ts
5
4
  declare namespace SpanPrimitiveTypeBadge {
6
5
  type Element = ComponentRef<typeof Primitive.span>;
@@ -1 +1 @@
1
- {"version":3,"file":"SpanTypeBadge.d.ts","names":[],"sources":["../../../src/primitives/span/SpanTypeBadge.tsx"],"mappings":";;;;kBAQiB,sBAAA;EAAA,KACH,OAAA,GAAU,YAAA,QAAoB,SAAA,CAAU,IAAA;EAAA,KACxC,KAAA,GAAQ,wBAAA,QAAgC,SAAA,CAAU,IAAA;AAAA;AAAA,cAGnD,sBAAA,kBAAsB,yBAAA,CAAA,IAAA,iBAAA,eAAA,CAAA,eAAA,oBAAA,cAAA,CAAA,eAAA"}
1
+ {"version":3,"file":"SpanTypeBadge.d.ts","names":[],"sources":["../../../src/primitives/span/SpanTypeBadge.tsx"],"mappings":";;;kBAQiB;OACH,UAAU,oBAAoB,UAAU;OACxC,QAAQ,gCAAgC,UAAU;;cAGnD,wCAAsB,0BAAA,qBAAA,gBAAA,mCAAA,eAAA;;4BAWjC,cAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"SpanTypeBadge.js","names":["ComponentPropsWithoutRef","ComponentRef","forwardRef","Primitive","useAuiState","SpanPrimitiveTypeBadge","Element","span","Props","props","ref","$","_c","type","_temp","t0","children","t1","displayName","s"],"sources":["../../../src/primitives/span/SpanTypeBadge.tsx"],"sourcesContent":["import {\n type ComponentPropsWithoutRef,\n type ComponentRef,\n forwardRef,\n} from \"react\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useAuiState } from \"@assistant-ui/store\";\n\nexport namespace SpanPrimitiveTypeBadge {\n export type Element = ComponentRef<typeof Primitive.span>;\n export type Props = ComponentPropsWithoutRef<typeof Primitive.span>;\n}\n\nexport const SpanPrimitiveTypeBadge = forwardRef<\n SpanPrimitiveTypeBadge.Element,\n SpanPrimitiveTypeBadge.Props\n>((props, ref) => {\n const type = useAuiState((s) => s.span.type);\n\n return (\n <Primitive.span {...props} ref={ref} data-span-type={type}>\n {props.children ?? type}\n </Primitive.span>\n );\n});\n\nSpanPrimitiveTypeBadge.displayName = \"SpanPrimitive.TypeBadge\";\n"],"mappings":";;;;;;AAaA,MAAaK,yBAAyBH,YAGpCO,OAAAC,QAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CACA,MAAAC,OAAaT,YAAYU,KAAkB;CAItC,MAAAC,KAAAN,MAAKO,YAALH;CAAsB,IAAAI;CAAA,IAAAN,EAAA,OAAAF,SAAAE,EAAA,OAAAD,OAAAC,EAAA,OAAAI,MAAAJ,EAAA,OAAAE,MAAA;EADzBI,KAAA,oBAAA,UAAA,MAAA;GAAA,GAAoBR;GAAYC;GAAqBG,kBAAAA;aAClDE;EACH,CAAA;EAAiBJ,EAAA,KAAAF;EAAAE,EAAA,KAAAD;EAAAC,EAAA,KAAAI;EAAAJ,EAAA,KAAAE;EAAAF,EAAA,KAAAM;CAAA,OAAAA,KAAAN,EAAA;CAAA,OAFjBM;AAEiB,CAEpB;AAEDZ,uBAAuBa,cAAc;AAVnC,SAAAJ,MAAAK,GAAA;CAAA,OACgCA,EAACZ,KAAKM;AAAK"}
1
+ {"version":3,"file":"SpanTypeBadge.js","names":["ComponentPropsWithoutRef","ComponentRef","forwardRef","Primitive","useAuiState","SpanPrimitiveTypeBadge","Element","span","Props","props","ref","$","_c","type","_temp","t0","children","t1","displayName","s"],"sources":["../../../src/primitives/span/SpanTypeBadge.tsx"],"sourcesContent":["import {\n type ComponentPropsWithoutRef,\n type ComponentRef,\n forwardRef,\n} from \"react\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useAuiState } from \"@assistant-ui/store\";\n\nexport namespace SpanPrimitiveTypeBadge {\n export type Element = ComponentRef<typeof Primitive.span>;\n export type Props = ComponentPropsWithoutRef<typeof Primitive.span>;\n}\n\nexport const SpanPrimitiveTypeBadge = forwardRef<\n SpanPrimitiveTypeBadge.Element,\n SpanPrimitiveTypeBadge.Props\n>((props, ref) => {\n const type = useAuiState((s) => s.span.type);\n\n return (\n <Primitive.span {...props} ref={ref} data-span-type={type}>\n {props.children ?? type}\n </Primitive.span>\n );\n});\n\nSpanPrimitiveTypeBadge.displayName = \"SpanPrimitive.TypeBadge\";\n"],"mappings":";;;;;;AAaA,MAAaK,yBAAyBH,YAGpCO,OAAAC,QAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CACA,MAAAC,OAAaT,YAAYU,KAAkB;CAItC,MAAAC,KAAAN,MAAKO,YAALH;CAAsB,IAAAI;CAAA,IAAAN,EAAA,OAAAF,SAAAE,EAAA,OAAAD,OAAAC,EAAA,OAAAI,MAAAJ,EAAA,OAAAE,MAAA;EADzBI,KAAA,oBAAA,UAAA,MAAA;GAAA,GAAoBR;GAAYC;GAAqBG,kBAAAA;GAClDE,UAAAA;EACH,CAAA;EAAiBJ,EAAA,KAAAF;EAAAE,EAAA,KAAAD;EAAAC,EAAA,KAAAI;EAAAJ,EAAA,KAAAE;EAAAF,EAAA,KAAAM;CAAA,OAAAA,KAAAN,EAAA;CAAA,OAFjBM;AAEiB,CAEpB;AAEDZ,uBAAuBa,cAAc;AAVnC,SAAAJ,MAAAK,GAAA;CAAA,OACgCA,EAACZ,KAAKM;AAAK"}
@@ -6,8 +6,6 @@ import { SpanPrimitiveCollapseToggle } from "./span/SpanCollapseToggle.js";
6
6
  import { SpanPrimitiveIndent } from "./span/SpanIndent.js";
7
7
  import { SpanPrimitiveChildren } from "./span/SpanChildren.js";
8
8
  import { SpanPrimitiveTimeline, SpanPrimitiveTimelineBar, SpanTimelineRange } from "./span/SpanTimeline.js";
9
-
10
- //#region src/primitives/span.d.ts
11
9
  declare namespace span_d_exports {
12
10
  export { SpanPrimitiveChildren as Children, SpanPrimitiveCollapseToggle as CollapseToggle, SpanPrimitiveIndent as Indent, SpanPrimitiveName as Name, SpanPrimitiveRoot as Root, SpanTimelineRange, SpanPrimitiveStatusIndicator as StatusIndicator, SpanPrimitiveTimeline as Timeline, SpanPrimitiveTimelineBar as TimelineBar, SpanPrimitiveTypeBadge as TypeBadge };
13
11
  }
@@ -1,5 +1,5 @@
1
+ import "../o11y-scope.js";
1
2
  import { ClientOutput } from "@assistant-ui/store";
2
-
3
3
  //#region src/resources/SpanResource.d.ts
4
4
  type SpanData = {
5
5
  id: string;
@@ -1 +1 @@
1
- {"version":3,"file":"SpanResource.d.ts","names":[],"sources":["../../src/resources/SpanResource.tsx"],"mappings":";;;KAOY,QAAA;EACV,EAAA;EACA,YAAA;EACA,IAAA;EACA,IAAA;EACA,MAAA;EACA,SAAA;EACA,OAAA;EACA,SAAA;AAAA;AAAA,cA8LW,YAAA,8BAAY,QAAA,CAAA,YAAA;SA/DhB,QAAQ;AAAA"}
1
+ {"version":3,"file":"SpanResource.d.ts","names":[],"sources":["../../src/resources/SpanResource.tsx"],"mappings":";;;KAOY;EACV;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;cA8LW,0CAAY,SAAA;EA/DhB,OAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@assistant-ui/react-o11y",
3
- "version": "0.0.25",
3
+ "version": "0.0.27",
4
4
  "description": "Observability primitives for @assistant-ui",
5
5
  "keywords": [
6
6
  "observability",
@@ -28,9 +28,9 @@
28
28
  ],
29
29
  "sideEffects": false,
30
30
  "dependencies": {
31
- "@radix-ui/react-primitive": "^2.1.6",
32
- "@assistant-ui/store": "0.2.19",
33
- "@assistant-ui/tap": "0.9.3"
31
+ "@radix-ui/react-primitive": "^2.1.10",
32
+ "@assistant-ui/store": "0.2.21",
33
+ "@assistant-ui/tap": "0.9.5"
34
34
  },
35
35
  "peerDependencies": {
36
36
  "@types/react": "*",
@@ -44,10 +44,10 @@
44
44
  "devDependencies": {
45
45
  "@types/react": "^19.2.17",
46
46
  "@types/react-dom": "^19.2.3",
47
- "react": "^19.2.7",
48
- "react-dom": "^19.2.7",
49
- "vitest": "^4.1.9",
50
- "@assistant-ui/x-buildutils": "0.0.16"
47
+ "react": "^19.2.8",
48
+ "react-dom": "^19.2.8",
49
+ "vitest": "^4.1.10",
50
+ "@assistant-ui/x-buildutils": "0.0.19"
51
51
  },
52
52
  "publishConfig": {
53
53
  "access": "public",