@dust-tt/sparkle 0.2.255 → 0.2.257-rc-1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. package/dist/cjs/index.js +92 -19
  2. package/dist/cjs/index.js.map +1 -1
  3. package/dist/esm/components/Separator.d.ts +5 -0
  4. package/dist/esm/components/Separator.d.ts.map +1 -0
  5. package/dist/esm/components/Separator.js +11 -0
  6. package/dist/esm/components/Separator.js.map +1 -0
  7. package/dist/esm/components/Tree.js +1 -1
  8. package/dist/esm/components/Tree.js.map +1 -1
  9. package/dist/esm/components/index.d.ts +1 -0
  10. package/dist/esm/components/index.d.ts.map +1 -1
  11. package/dist/esm/components/index.js +1 -0
  12. package/dist/esm/components/index.js.map +1 -1
  13. package/dist/esm/icons/solid/Dot.d.ts +5 -0
  14. package/dist/esm/icons/solid/Dot.d.ts.map +1 -0
  15. package/dist/esm/icons/solid/Dot.js +6 -0
  16. package/dist/esm/icons/solid/Dot.js.map +1 -0
  17. package/dist/esm/icons/solid/MagnifyingGlass.d.ts.map +1 -1
  18. package/dist/esm/icons/solid/MagnifyingGlass.js +2 -1
  19. package/dist/esm/icons/solid/MagnifyingGlass.js.map +1 -1
  20. package/dist/esm/icons/solid/index.d.ts +1 -0
  21. package/dist/esm/icons/solid/index.d.ts.map +1 -1
  22. package/dist/esm/icons/solid/index.js +1 -0
  23. package/dist/esm/icons/solid/index.js.map +1 -1
  24. package/dist/esm/icons/src/solid/dot.svg +3 -0
  25. package/dist/esm/icons/src/solid/magnifying-glass.svg +2 -1
  26. package/dist/esm/icons/src/stroke/dot.svg +3 -0
  27. package/dist/esm/icons/stroke/Dot.d.ts +5 -0
  28. package/dist/esm/icons/stroke/Dot.d.ts.map +1 -0
  29. package/dist/esm/icons/stroke/Dot.js +6 -0
  30. package/dist/esm/icons/stroke/Dot.js.map +1 -0
  31. package/dist/esm/icons/stroke/index.d.ts +1 -0
  32. package/dist/esm/icons/stroke/index.d.ts.map +1 -1
  33. package/dist/esm/icons/stroke/index.js +1 -0
  34. package/dist/esm/icons/stroke/index.js.map +1 -1
  35. package/dist/esm/stories/Separator.stories.d.ts +8 -0
  36. package/dist/esm/stories/Separator.stories.d.ts.map +1 -0
  37. package/dist/esm/stories/Separator.stories.js +19 -0
  38. package/dist/esm/stories/Separator.stories.js.map +1 -0
  39. package/dist/esm/stories/Tree.stories.d.ts.map +1 -1
  40. package/dist/esm/stories/Tree.stories.js +4 -3
  41. package/dist/esm/stories/Tree.stories.js.map +1 -1
  42. package/dist/sparkle.css +132 -0
  43. package/package.json +3 -1
  44. package/src/components/Separator.tsx +30 -0
  45. package/src/components/Tree.tsx +5 -1
  46. package/src/components/index.ts +1 -0
  47. package/src/icons/solid/Dot.tsx +15 -0
  48. package/src/icons/solid/MagnifyingGlass.tsx +7 -1
  49. package/src/icons/solid/index.ts +1 -0
  50. package/src/icons/src/solid/dot.svg +3 -0
  51. package/src/icons/src/solid/magnifying-glass.svg +2 -1
  52. package/src/icons/src/stroke/dot.svg +3 -0
  53. package/src/icons/stroke/Dot.tsx +20 -0
  54. package/src/icons/stroke/index.ts +1 -0
  55. package/src/stories/Separator.stories.tsx +30 -0
  56. package/src/stories/Tree.stories.tsx +12 -2
package/dist/cjs/index.js CHANGED
@@ -295,6 +295,9 @@ var SvgDocumentText$1 = function (props) { return (React__namespace.createElemen
295
295
  React__namespace.createElement("path", { fill: "currentColor", fillRule: "evenodd", d: "M20 9v13H4V2h9v7h7ZM8 7v2h3V7H8Zm0 4v2h8v-2H8Zm0 4v2h8v-2H8Z", clipRule: "evenodd" }),
296
296
  React__namespace.createElement("path", { fill: "currentColor", d: "M20 7h-5V2.003L20 7Z" }))); };
297
297
 
298
+ var SvgDot$1 = function (props) { return (React__namespace.createElement("svg", __assign({ xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", fill: "none", viewBox: "0 0 24 24" }, props),
299
+ React__namespace.createElement("path", { fill: "currentColor", d: "M12 16a4 4 0 1 0 0-8 4 4 0 0 0 0 8Z" }))); };
300
+
298
301
  var SvgDust$1 = function (props) { return (React__namespace.createElement("svg", __assign({ xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", fill: "none", viewBox: "0 0 24 24" }, props),
299
302
  React__namespace.createElement("path", { fill: "currentColor", fillRule: "evenodd", d: "M12 7a5 5 0 0 0-5-5H2v10h4.998A2.5 2.5 0 0 0 7 17H2v5h5a2.5 2.5 0 0 0 0-5h5v5h5v-5h5v-5h-5a5 5 0 0 0 5-5V2H12v5Zm-5 3a3 3 0 0 0 0-6v6Zm7-3a3 3 0 1 0 6 0h-6Zm-2 0a5 5 0 0 0 5 5H7a5 5 0 0 0 5-5Z", clipRule: "evenodd" }))); };
300
303
 
@@ -410,7 +413,8 @@ var SvgMagic$1 = function (props) { return (React__namespace.createElement("svg"
410
413
  React__namespace.createElement("path", { fill: "currentColor", d: "m16.02 17.435 1.415-1.414 4.242 4.242-1.414 1.415-4.242-4.243ZM4.364 4.657l4.984 1.058a2 2 0 0 0 1.394-.213l4.61-2.586.354 5.028a2 2 0 0 0 .677 1.363l4.019 3.522-4.83 1.912a2 2 0 0 0-1.123 1.123l-1.913 4.83-3.522-4.018a2 2 0 0 0-1.363-.677l-5.028-.355 2.586-4.61a2 2 0 0 0 .213-1.393L4.364 4.657Z" }))); };
411
414
 
412
415
  var SvgMagnifyingGlass$1 = function (props) { return (React__namespace.createElement("svg", __assign({ xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", fill: "none", viewBox: "0 0 24 24" }, props),
413
- React__namespace.createElement("path", { fill: "currentColor", d: "M11 2c4.968 0 9 4.032 9 9s-4.032 9-9 9-9-4.032-9-9 4.032-9 9-9Zm8.485 16.071 2.829 2.828-1.415 1.415-2.828-2.829 1.414-1.414Z" }))); };
416
+ React__namespace.createElement("path", { fill: "currentColor", fillRule: "evenodd", d: "M17.364 17.364A9 9 0 1 1 4.636 4.636a9 9 0 0 1 12.728 12.728Zm-2.121-2.121a6 6 0 1 1-8.486-8.485 6 6 0 0 1 8.486 8.485Z", clipRule: "evenodd" }),
417
+ React__namespace.createElement("path", { fill: "currentColor", d: "m22.374 20.253-3.535-3.535-2.121 2.12 3.535 3.536 2.121-2.121Z" }))); };
414
418
 
415
419
  var SvgMarkPen$1 = function (props) { return (React__namespace.createElement("svg", __assign({ xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", fill: "none", viewBox: "0 0 24 24" }, props),
416
420
  React__namespace.createElement("path", { fill: "currentColor", d: "m15.95 2.39 5.657 5.657a1 1 0 0 1 0 1.414l-7.778 7.778-2.122.707-1.414 1.415a1 1 0 0 1-1.414 0l-4.243-4.243a1 1 0 0 1 0-1.414L6.05 12.29l.707-2.122 7.779-7.778a1 1 0 0 1 1.414 0Zm.707 3.536-6.364 6.364 1.414 1.414 6.364-6.364-1.414-1.414ZM4.283 16.886l2.828 2.828-1.414 1.415-4.243-1.415 2.829-2.828Z" }))); };
@@ -71462,7 +71466,7 @@ function getElementRef$1(element) {
71462
71466
  }
71463
71467
 
71464
71468
  // packages/react/primitive/src/Primitive.tsx
71465
- var NODES = [
71469
+ var NODES$1 = [
71466
71470
  "a",
71467
71471
  "button",
71468
71472
  "div",
@@ -71480,7 +71484,7 @@ var NODES = [
71480
71484
  "svg",
71481
71485
  "ul"
71482
71486
  ];
71483
- var Primitive = NODES.reduce((primitive, node) => {
71487
+ var Primitive$1 = NODES$1.reduce((primitive, node) => {
71484
71488
  const Node = React__namespace.forwardRef((props, forwardedRef) => {
71485
71489
  const { asChild, ...primitiveProps } = props;
71486
71490
  const Comp = asChild ? Slot : node;
@@ -71607,7 +71611,7 @@ var DismissableLayer = React__namespace.forwardRef(
71607
71611
  return () => document.removeEventListener(CONTEXT_UPDATE, handleUpdate);
71608
71612
  }, []);
71609
71613
  return /* @__PURE__ */ jsxRuntime.jsx(
71610
- Primitive.div,
71614
+ Primitive$1.div,
71611
71615
  {
71612
71616
  ...layerProps,
71613
71617
  ref: composedRefs,
@@ -71640,7 +71644,7 @@ var DismissableLayerBranch = React__namespace.forwardRef((props, forwardedRef) =
71640
71644
  };
71641
71645
  }
71642
71646
  }, [context.branches]);
71643
- return /* @__PURE__ */ jsxRuntime.jsx(Primitive.div, { ...props, ref: composedRefs });
71647
+ return /* @__PURE__ */ jsxRuntime.jsx(Primitive$1.div, { ...props, ref: composedRefs });
71644
71648
  });
71645
71649
  DismissableLayerBranch.displayName = BRANCH_NAME;
71646
71650
  function usePointerDownOutside(onPointerDownOutside, ownerDocument = globalThis?.document) {
@@ -73686,11 +73690,11 @@ const arrow = (options, deps) => ({
73686
73690
  });
73687
73691
 
73688
73692
  // packages/react/arrow/src/Arrow.tsx
73689
- var NAME$1 = "Arrow";
73693
+ var NAME$2 = "Arrow";
73690
73694
  var Arrow$1 = React__namespace.forwardRef((props, forwardedRef) => {
73691
73695
  const { children, width = 10, height = 5, ...arrowProps } = props;
73692
73696
  return /* @__PURE__ */ jsxRuntime.jsx(
73693
- Primitive.svg,
73697
+ Primitive$1.svg,
73694
73698
  {
73695
73699
  ...arrowProps,
73696
73700
  ref: forwardedRef,
@@ -73702,8 +73706,8 @@ var Arrow$1 = React__namespace.forwardRef((props, forwardedRef) => {
73702
73706
  }
73703
73707
  );
73704
73708
  });
73705
- Arrow$1.displayName = NAME$1;
73706
- var Root$1 = Arrow$1;
73709
+ Arrow$1.displayName = NAME$2;
73710
+ var Root$2 = Arrow$1;
73707
73711
 
73708
73712
  // packages/react/context/src/createContext.tsx
73709
73713
  function createContextScope(scopeName, createContextScopeDeps = []) {
@@ -73819,7 +73823,7 @@ var PopperAnchor = React__namespace.forwardRef(
73819
73823
  React__namespace.useEffect(() => {
73820
73824
  context.onAnchorChange(virtualRef?.current || ref.current);
73821
73825
  });
73822
- return virtualRef ? null : /* @__PURE__ */ jsxRuntime.jsx(Primitive.div, { ...anchorProps, ref: composedRefs });
73826
+ return virtualRef ? null : /* @__PURE__ */ jsxRuntime.jsx(Primitive$1.div, { ...anchorProps, ref: composedRefs });
73823
73827
  }
73824
73828
  );
73825
73829
  PopperAnchor.displayName = ANCHOR_NAME;
@@ -73946,7 +73950,7 @@ var PopperContent = React__namespace.forwardRef(
73946
73950
  arrowY,
73947
73951
  shouldHideArrow: cannotCenterArrow,
73948
73952
  children: /* @__PURE__ */ jsxRuntime.jsx(
73949
- Primitive.div,
73953
+ Primitive$1.div,
73950
73954
  {
73951
73955
  "data-side": placedSide,
73952
73956
  "data-align": placedAlign,
@@ -74006,7 +74010,7 @@ var PopperArrow = React__namespace.forwardRef(function PopperArrow2(props, forwa
74006
74010
  visibility: contentContext.shouldHideArrow ? "hidden" : void 0
74007
74011
  },
74008
74012
  children: /* @__PURE__ */ jsxRuntime.jsx(
74009
- Root$1,
74013
+ Root$2,
74010
74014
  {
74011
74015
  ...arrowProps,
74012
74016
  ref: forwardedRef,
@@ -74252,11 +74256,11 @@ function useUncontrolledState({
74252
74256
  }
74253
74257
 
74254
74258
  // packages/react/visually-hidden/src/VisuallyHidden.tsx
74255
- var NAME = "VisuallyHidden";
74259
+ var NAME$1 = "VisuallyHidden";
74256
74260
  var VisuallyHidden = React__namespace.forwardRef(
74257
74261
  (props, forwardedRef) => {
74258
74262
  return /* @__PURE__ */ jsxRuntime.jsx(
74259
- Primitive.span,
74263
+ Primitive$1.span,
74260
74264
  {
74261
74265
  ...props,
74262
74266
  ref: forwardedRef,
@@ -74278,8 +74282,8 @@ var VisuallyHidden = React__namespace.forwardRef(
74278
74282
  );
74279
74283
  }
74280
74284
  );
74281
- VisuallyHidden.displayName = NAME;
74282
- var Root = VisuallyHidden;
74285
+ VisuallyHidden.displayName = NAME$1;
74286
+ var Root$1 = VisuallyHidden;
74283
74287
 
74284
74288
  var [createTooltipContext, createTooltipScope] = createContextScope$1("Tooltip", [
74285
74289
  createPopperScope
@@ -74430,7 +74434,7 @@ var TooltipTrigger$1 = React__namespace.forwardRef(
74430
74434
  return () => document.removeEventListener("pointerup", handlePointerUp);
74431
74435
  }, [handlePointerUp]);
74432
74436
  return /* @__PURE__ */ jsxRuntime.jsx(Anchor, { asChild: true, ...popperScope, children: /* @__PURE__ */ jsxRuntime.jsx(
74433
- Primitive.button,
74437
+ Primitive$1.button,
74434
74438
  {
74435
74439
  "aria-describedby": context.open ? context.contentId : void 0,
74436
74440
  "data-state": context.stateAttribute,
@@ -74592,7 +74596,7 @@ var TooltipContentImpl = React__namespace.forwardRef(
74592
74596
  },
74593
74597
  children: [
74594
74598
  /* @__PURE__ */ jsxRuntime.jsx(Slottable, { children }),
74595
- /* @__PURE__ */ jsxRuntime.jsx(VisuallyHiddenContentContextProvider, { scope: __scopeTooltip, isInside: true, children: /* @__PURE__ */ jsxRuntime.jsx(Root, { id: context.contentId, role: "tooltip", children: ariaLabel || children }) })
74599
+ /* @__PURE__ */ jsxRuntime.jsx(VisuallyHiddenContentContextProvider, { scope: __scopeTooltip, isInside: true, children: /* @__PURE__ */ jsxRuntime.jsx(Root$1, { id: context.contentId, role: "tooltip", children: ariaLabel || children }) })
74596
74600
  ]
74597
74601
  }
74598
74602
  )
@@ -75745,6 +75749,9 @@ var SvgDocumentText = function (props) { return (React__namespace.createElement(
75745
75749
  React__namespace.createElement("path", { fill: "currentColor", d: "M8 7h3v2H8V7ZM8 11h8v2H8v-2ZM8 15h8v2H8v-2Z" }),
75746
75750
  React__namespace.createElement("path", { fill: "currentColor", fillRule: "evenodd", d: "M20 8v14H4V2h9.997L20 8Zm-2 1h-5V4H6v16h12V9Z", clipRule: "evenodd" }))); };
75747
75751
 
75752
+ var SvgDot = function (props) { return (React__namespace.createElement("svg", __assign({ xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", fill: "none", viewBox: "0 0 24 24" }, props),
75753
+ React__namespace.createElement("path", { fill: "currentColor", fillRule: "evenodd", d: "M12 14a2 2 0 1 0 0-4 2 2 0 0 0 0 4Zm4-2a4 4 0 1 1-8 0 4 4 0 0 1 8 0Z", clipRule: "evenodd" }))); };
75754
+
75748
75755
  var SvgDust = function (props) { return (React__namespace.createElement("svg", __assign({ xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", fill: "none", viewBox: "0 0 24 24" }, props),
75749
75756
  React__namespace.createElement("path", { fill: "currentColor", fillRule: "evenodd", d: "M7 2a5 5 0 0 1 0 10h15v5h-5v5h-5v-5H7a2.5 2.5 0 0 1-.002-5H2V2h5Zm3 5a3 3 0 0 1-3 3H4V4h3a3 3 0 0 1 3 3Zm-3 7a.5.5 0 0 0 0 1h7v6h1v-6h5v-1H7Z", clipRule: "evenodd" }),
75750
75757
  React__namespace.createElement("path", { fill: "currentColor", fillRule: "evenodd", d: "M7 17a2.5 2.5 0 0 1 0 5H2v-5h5Zm-3 2h3a.5.5 0 0 1 0 1H4v-1ZM17 12a5 5 0 0 0 5-5V2H12v5a5 5 0 0 0 5 5Zm-3-5a3 3 0 1 0 6 0V4h-6v3Z", clipRule: "evenodd" }))); };
@@ -132451,6 +132458,69 @@ var Searchbar = React.forwardRef(function (_a, ref) {
132451
132458
  });
132452
132459
  Searchbar.displayName = "Searchbar";
132453
132460
 
132461
+ // packages/react/primitive/src/Primitive.tsx
132462
+ var NODES = [
132463
+ "a",
132464
+ "button",
132465
+ "div",
132466
+ "form",
132467
+ "h2",
132468
+ "h3",
132469
+ "img",
132470
+ "input",
132471
+ "label",
132472
+ "li",
132473
+ "nav",
132474
+ "ol",
132475
+ "p",
132476
+ "span",
132477
+ "svg",
132478
+ "ul"
132479
+ ];
132480
+ var Primitive = NODES.reduce((primitive, node) => {
132481
+ const Node = React__namespace.forwardRef((props, forwardedRef) => {
132482
+ const { asChild, ...primitiveProps } = props;
132483
+ const Comp = asChild ? Slot : node;
132484
+ if (typeof window !== "undefined") {
132485
+ window[Symbol.for("radix-ui")] = true;
132486
+ }
132487
+ return /* @__PURE__ */ jsxRuntime.jsx(Comp, { ...primitiveProps, ref: forwardedRef });
132488
+ });
132489
+ Node.displayName = `Primitive.${node}`;
132490
+ return { ...primitive, [node]: Node };
132491
+ }, {});
132492
+
132493
+ // packages/react/separator/src/Separator.tsx
132494
+ var NAME = "Separator";
132495
+ var DEFAULT_ORIENTATION = "horizontal";
132496
+ var ORIENTATIONS = ["horizontal", "vertical"];
132497
+ var Separator$1 = React__namespace.forwardRef((props, forwardedRef) => {
132498
+ const { decorative, orientation: orientationProp = DEFAULT_ORIENTATION, ...domProps } = props;
132499
+ const orientation = isValidOrientation(orientationProp) ? orientationProp : DEFAULT_ORIENTATION;
132500
+ const ariaOrientation = orientation === "vertical" ? orientation : void 0;
132501
+ const semanticProps = decorative ? { role: "none" } : { "aria-orientation": ariaOrientation, role: "separator" };
132502
+ return /* @__PURE__ */ jsxRuntime.jsx(
132503
+ Primitive.div,
132504
+ {
132505
+ "data-orientation": orientation,
132506
+ ...semanticProps,
132507
+ ...domProps,
132508
+ ref: forwardedRef
132509
+ }
132510
+ );
132511
+ });
132512
+ Separator$1.displayName = NAME;
132513
+ function isValidOrientation(orientation) {
132514
+ return ORIENTATIONS.includes(orientation);
132515
+ }
132516
+ var Root = Separator$1;
132517
+
132518
+ var Separator = React__namespace.forwardRef(function (_a, ref) {
132519
+ var className = _a.className, _b = _a.orientation, orientation = _b === void 0 ? "horizontal" : _b, _c = _a.decorative, decorative = _c === void 0 ? true : _c, props = __rest(_a, ["className", "orientation", "decorative"]);
132520
+ return (React__namespace.createElement(Root, __assign({ ref: ref, decorative: decorative, orientation: orientation, className: classNames("s-bg-separator s-shrink-0", orientation === "horizontal" ? "s-h-[1px] s-w-full" : "s-h-full s-w-[1px]", className !== null && className !== void 0 ? className : "") }, props)));
132521
+ });
132522
+ Separator.displayName = Root.displayName;
132523
+
132454
132524
  var baseClasses = "s-rounded-full s-cursor-pointer s-transition-colors s-duration-300 s-ease-out s-cursor-pointer s-flex s-items-center s-flex";
132455
132525
  var sizeClasses = {
132456
132526
  xs: "s-h-7 s-w-10",
@@ -132694,7 +132764,7 @@ Tree.Item = function (_a) {
132694
132764
  };
132695
132765
  Tree.Empty = function (_a) {
132696
132766
  var label = _a.label;
132697
- return React.createElement("div", { className: "s-pl-4 s-text-sm s-text-element-600" }, label);
132767
+ return (React.createElement("div", { className: "s-py-1 s-pl-6 s-text-sm s-font-medium s-text-element-700" }, label));
132698
132768
  };
132699
132769
 
132700
132770
  function ZoomableImageCitationWrapper(_a) {
@@ -133029,6 +133099,8 @@ exports.DocumentPlusStrokeIcon = SvgDocumentPlus;
133029
133099
  exports.DocumentStrokeIcon = SvgDocument;
133030
133100
  exports.DocumentTextIcon = SvgDocumentText$1;
133031
133101
  exports.DocumentTextStrokeIcon = SvgDocumentText;
133102
+ exports.DotIcon = SvgDot$1;
133103
+ exports.DotStrokeIcon = SvgDot;
133032
133104
  exports.DriveLogo = SvgDrive;
133033
133105
  exports.DropdownMenu = DropdownMenu;
133034
133106
  exports.DropzoneOverlay = DropzoneOverlay;
@@ -133203,6 +133275,7 @@ exports.SalesforceLogo = SvgSalesforce;
133203
133275
  exports.ScanIcon = SvgScan$1;
133204
133276
  exports.ScanStrokeIcon = SvgScan;
133205
133277
  exports.Searchbar = Searchbar;
133278
+ exports.Separator = Separator;
133206
133279
  exports.ServerIcon = SvgServer$1;
133207
133280
  exports.ServerStrokeIcon = SvgServer;
133208
133281
  exports.ShakeHandsIcon = SvgShakeHands$1;