@assistant-ui/react-o11y 0.0.26 → 0.0.28
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.
- package/dist/primitives/span/SpanChildren.js.map +1 -1
- package/dist/primitives/span/SpanCollapseToggle.d.ts.map +1 -1
- package/dist/primitives/span/SpanIndent.d.ts.map +1 -1
- package/dist/primitives/span/SpanName.d.ts.map +1 -1
- package/dist/primitives/span/SpanName.js.map +1 -1
- package/dist/primitives/span/SpanRoot.d.ts.map +1 -1
- package/dist/primitives/span/SpanStatusIndicator.d.ts.map +1 -1
- package/dist/primitives/span/SpanTimeline.d.ts.map +1 -1
- package/dist/primitives/span/SpanTimeline.js.map +1 -1
- package/dist/primitives/span/SpanTypeBadge.d.ts.map +1 -1
- package/dist/primitives/span/SpanTypeBadge.js.map +1 -1
- package/dist/resources/SpanResource.d.ts.map +1 -1
- package/package.json +7 -7
|
@@ -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;
|
|
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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AAA;CAAA,OAAnEE;AAAmE;AAG5E,MAAaX,wBAAyDR,KACpEkC,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 +1 @@
|
|
|
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"}
|
|
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 +1 @@
|
|
|
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"}
|
|
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 +1 @@
|
|
|
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"}
|
|
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;
|
|
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 +1 @@
|
|
|
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"}
|
|
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 +1 @@
|
|
|
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"}
|
|
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 +1 @@
|
|
|
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;;;
|
|
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;CAAA;CAA3C,MAAAX,aAAAgB,OAAAC,KAAAA,IAAA,IAAAD;CACd,MAAAE,gBAAsB5B,YAAY6B,KAAuB;CAElC,MAAAC,KAAAZ,aAAAU;CAA0B,IAAAG;CAAA,IAAAV,EAAA,OAAAX,cAAAW,EAA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AM;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;EAAAL,EAAA,KAAAH;CAAA,OAAA;EAAAK,WAAAF,EAAA;EAAAG,QAAAH,EAAA;EAAAI,QAAAJ,EAAA;EAAAK,KAAAL,EAAA;EAAAH,YAAAG,EAAA;CAAA;CAA3C,MAAAX,aAAAgB,OAAA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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 +1 @@
|
|
|
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"}
|
|
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;
|
|
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"}
|
|
@@ -1 +1 @@
|
|
|
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;
|
|
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.
|
|
3
|
+
"version": "0.0.28",
|
|
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.
|
|
32
|
-
"@assistant-ui/store": "0.2.
|
|
33
|
-
"@assistant-ui/tap": "0.9.
|
|
31
|
+
"@radix-ui/react-primitive": "^2.1.10",
|
|
32
|
+
"@assistant-ui/store": "0.2.22",
|
|
33
|
+
"@assistant-ui/tap": "0.9.6"
|
|
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.
|
|
48
|
-
"react-dom": "^19.2.
|
|
47
|
+
"react": "^19.2.8",
|
|
48
|
+
"react-dom": "^19.2.8",
|
|
49
49
|
"vitest": "^4.1.10",
|
|
50
|
-
"@assistant-ui/x-buildutils": "0.0.
|
|
50
|
+
"@assistant-ui/x-buildutils": "0.0.20"
|
|
51
51
|
},
|
|
52
52
|
"publishConfig": {
|
|
53
53
|
"access": "public",
|