doodleui-react 0.4.0 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -22,6 +22,15 @@ var PopoverPrimitive = require('@radix-ui/react-popover');
22
22
  var DropdownMenuPrimitive = require('@radix-ui/react-dropdown-menu');
23
23
  var AlertDialogPrimitive = require('@radix-ui/react-alert-dialog');
24
24
  var cmdk = require('cmdk');
25
+ var TogglePrimitive = require('@radix-ui/react-toggle');
26
+ var ToggleGroupPrimitive = require('@radix-ui/react-toggle-group');
27
+ var inputOtp = require('input-otp');
28
+ var ScrollAreaPrimitive = require('@radix-ui/react-scroll-area');
29
+ var ResizablePrimitive = require('react-resizable-panels');
30
+ var HoverCardPrimitive = require('@radix-ui/react-hover-card');
31
+ var ContextMenuPrimitive = require('@radix-ui/react-context-menu');
32
+ var NavigationMenuPrimitive = require('@radix-ui/react-navigation-menu');
33
+ var MenubarPrimitive = require('@radix-ui/react-menubar');
25
34
 
26
35
  function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
27
36
 
@@ -60,6 +69,14 @@ var CollapsiblePrimitive__namespace = /*#__PURE__*/_interopNamespace(Collapsible
60
69
  var PopoverPrimitive__namespace = /*#__PURE__*/_interopNamespace(PopoverPrimitive);
61
70
  var DropdownMenuPrimitive__namespace = /*#__PURE__*/_interopNamespace(DropdownMenuPrimitive);
62
71
  var AlertDialogPrimitive__namespace = /*#__PURE__*/_interopNamespace(AlertDialogPrimitive);
72
+ var TogglePrimitive__namespace = /*#__PURE__*/_interopNamespace(TogglePrimitive);
73
+ var ToggleGroupPrimitive__namespace = /*#__PURE__*/_interopNamespace(ToggleGroupPrimitive);
74
+ var ScrollAreaPrimitive__namespace = /*#__PURE__*/_interopNamespace(ScrollAreaPrimitive);
75
+ var ResizablePrimitive__namespace = /*#__PURE__*/_interopNamespace(ResizablePrimitive);
76
+ var HoverCardPrimitive__namespace = /*#__PURE__*/_interopNamespace(HoverCardPrimitive);
77
+ var ContextMenuPrimitive__namespace = /*#__PURE__*/_interopNamespace(ContextMenuPrimitive);
78
+ var NavigationMenuPrimitive__namespace = /*#__PURE__*/_interopNamespace(NavigationMenuPrimitive);
79
+ var MenubarPrimitive__namespace = /*#__PURE__*/_interopNamespace(MenubarPrimitive);
63
80
 
64
81
  // src/types.ts
65
82
  function toRoughOptions(props) {
@@ -5215,6 +5232,2005 @@ function Combobox({
5215
5232
  ) })
5216
5233
  ] });
5217
5234
  }
5235
+ var Kbd = react.forwardRef(function Kbd2({
5236
+ children,
5237
+ className,
5238
+ style,
5239
+ roughness,
5240
+ seed,
5241
+ sketchColor,
5242
+ bowing,
5243
+ fillStyle,
5244
+ strokeWidth,
5245
+ animate,
5246
+ ...rest
5247
+ }, ref) {
5248
+ const ink = sketchColor ?? SKETCH_COLORS.ink;
5249
+ return /* @__PURE__ */ jsxRuntime.jsx(
5250
+ SketchBox,
5251
+ {
5252
+ className: cn(className),
5253
+ style: {
5254
+ display: "inline-flex",
5255
+ verticalAlign: "middle",
5256
+ ...style
5257
+ },
5258
+ contentStyle: {
5259
+ padding: "2px 7px",
5260
+ fontSize: 11,
5261
+ fontFamily: doodleUiFontFamily,
5262
+ lineHeight: 1.35,
5263
+ letterSpacing: "0.04em"
5264
+ },
5265
+ fill: SKETCH_COLORS.secondaryFill,
5266
+ fillStyle: fillStyle ?? "hachure",
5267
+ roughness,
5268
+ seed,
5269
+ sketchColor: ink,
5270
+ bowing,
5271
+ strokeWidth: strokeWidth ?? 1.3,
5272
+ animate,
5273
+ ...rest,
5274
+ children: /* @__PURE__ */ jsxRuntime.jsx(
5275
+ "kbd",
5276
+ {
5277
+ ref,
5278
+ style: {
5279
+ border: "none",
5280
+ background: "transparent",
5281
+ padding: 0,
5282
+ font: "inherit",
5283
+ color: "inherit"
5284
+ },
5285
+ children
5286
+ }
5287
+ )
5288
+ }
5289
+ );
5290
+ });
5291
+ var SPINNER_ARC = "M 12 3 A 9 9 0 1 1 11.5 3";
5292
+ var SIZE_PX = {
5293
+ sm: 18,
5294
+ md: 24,
5295
+ lg: 32
5296
+ };
5297
+ var Spinner = react.forwardRef(
5298
+ function Spinner2({
5299
+ className,
5300
+ style,
5301
+ size = "md",
5302
+ roughness,
5303
+ seed,
5304
+ sketchColor,
5305
+ bowing,
5306
+ fillStyle,
5307
+ strokeWidth,
5308
+ animate,
5309
+ ...rest
5310
+ }, ref) {
5311
+ const px = SIZE_PX[size];
5312
+ const resolvedSeed = useResolvedSeed(seed);
5313
+ const ink = sketchColor ?? SKETCH_COLORS.ink;
5314
+ const shouldSpin = useAnimate(animate);
5315
+ const boxStyle = {
5316
+ position: "relative",
5317
+ width: px,
5318
+ height: px,
5319
+ flexShrink: 0,
5320
+ display: "inline-block",
5321
+ ...style
5322
+ };
5323
+ const arc = /* @__PURE__ */ jsxRuntime.jsx(
5324
+ RoughSvg,
5325
+ {
5326
+ shape: "path",
5327
+ path: SPINNER_ARC,
5328
+ width: px,
5329
+ height: px,
5330
+ roughness: roughness ?? 1.6,
5331
+ seed: resolvedSeed,
5332
+ sketchColor: ink,
5333
+ bowing: bowing ?? 1.2,
5334
+ fillStyle,
5335
+ strokeWidth: strokeWidth ?? 2,
5336
+ inset: 2
5337
+ }
5338
+ );
5339
+ return /* @__PURE__ */ jsxRuntime.jsx(
5340
+ "div",
5341
+ {
5342
+ ref,
5343
+ role: "status",
5344
+ "aria-label": "Loading",
5345
+ className: cn(className),
5346
+ style: boxStyle,
5347
+ ...rest,
5348
+ children: shouldSpin ? /* @__PURE__ */ jsxRuntime.jsx(
5349
+ framerMotion.motion.div,
5350
+ {
5351
+ style: { position: "absolute", inset: 0 },
5352
+ animate: { rotate: 360 },
5353
+ transition: {
5354
+ duration: 0.9,
5355
+ ease: "linear",
5356
+ repeat: Infinity
5357
+ },
5358
+ children: arc
5359
+ }
5360
+ ) : arc
5361
+ }
5362
+ );
5363
+ }
5364
+ );
5365
+ var SIZE_STYLES2 = {
5366
+ sm: { fontSize: 13, padding: "4px 10px", minHeight: 30 },
5367
+ md: { fontSize: 15, padding: "7px 14px", minHeight: 38 },
5368
+ lg: { fontSize: 17, padding: "10px 18px", minHeight: 46 }
5369
+ };
5370
+ var Toggle = react.forwardRef(
5371
+ function Toggle2({
5372
+ className,
5373
+ style,
5374
+ size = "md",
5375
+ roughness,
5376
+ seed,
5377
+ sketchColor,
5378
+ bowing,
5379
+ fillStyle,
5380
+ strokeWidth,
5381
+ pressed,
5382
+ defaultPressed,
5383
+ onPressedChange,
5384
+ disabled,
5385
+ animate,
5386
+ children,
5387
+ ...rest
5388
+ }, ref) {
5389
+ const rootRef = react.useRef(null);
5390
+ const [uncontrolled, setUncontrolled] = react.useState(defaultPressed === true);
5391
+ const isPressed = pressed ?? uncontrolled;
5392
+ const ink = sketchColor ?? SKETCH_COLORS.ink;
5393
+ const resolvedSeed = useResolvedSeed(seed);
5394
+ const shouldAnimate = useAnimate(animate);
5395
+ const pressSeed = deriveSeed(resolvedSeed, isPressed ? "on" : "off");
5396
+ const sketchSeed = shouldAnimate ? pressSeed : resolvedSeed;
5397
+ useDrawIn(rootRef, DRAW_IN_DURATION_MS, shouldAnimate, sketchSeed);
5398
+ return /* @__PURE__ */ jsxRuntime.jsxs(
5399
+ TogglePrimitive__namespace.Root,
5400
+ {
5401
+ ref: (node) => {
5402
+ rootRef.current = node;
5403
+ assignRef(ref, node);
5404
+ },
5405
+ pressed,
5406
+ defaultPressed,
5407
+ onPressedChange: (next) => {
5408
+ setUncontrolled(next);
5409
+ onPressedChange?.(next);
5410
+ },
5411
+ disabled,
5412
+ className: cn(className),
5413
+ style: {
5414
+ position: "relative",
5415
+ display: "inline-flex",
5416
+ alignItems: "center",
5417
+ justifyContent: "center",
5418
+ border: "none",
5419
+ background: "transparent",
5420
+ cursor: disabled ? "not-allowed" : "pointer",
5421
+ color: ink,
5422
+ fontFamily: doodleUiFontFamily,
5423
+ fontWeight: doodleUiFontWeight(600),
5424
+ opacity: disabled ? 0.45 : 1,
5425
+ outline: "none",
5426
+ ...SIZE_STYLES2[size],
5427
+ ...style
5428
+ },
5429
+ ...rest,
5430
+ children: [
5431
+ /* @__PURE__ */ jsxRuntime.jsx(
5432
+ RoughSvg,
5433
+ {
5434
+ shape: "rectangle",
5435
+ roughness,
5436
+ seed: sketchSeed,
5437
+ sketchColor: isPressed ? SKETCH_COLORS.accent : ink,
5438
+ bowing,
5439
+ fillStyle: fillStyle ?? "hachure",
5440
+ fill: isPressed ? SKETCH_COLORS.accentFill : void 0,
5441
+ strokeWidth: strokeWidth ?? 1.6
5442
+ }
5443
+ ),
5444
+ /* @__PURE__ */ jsxRuntime.jsx("span", { style: { position: "relative", zIndex: 1 }, children })
5445
+ ]
5446
+ }
5447
+ );
5448
+ }
5449
+ );
5450
+ var ToggleGroupSketchContext = react.createContext(null);
5451
+ function useToggleGroupSketch() {
5452
+ const ctx = react.useContext(ToggleGroupSketchContext);
5453
+ if (!ctx) {
5454
+ throw new Error("ToggleGroupItem must be used inside <ToggleGroup>.");
5455
+ }
5456
+ return ctx;
5457
+ }
5458
+ function ToggleGroup(props) {
5459
+ const {
5460
+ children,
5461
+ roughness,
5462
+ seed,
5463
+ sketchColor,
5464
+ bowing,
5465
+ fillStyle,
5466
+ strokeWidth,
5467
+ size = "md",
5468
+ animate,
5469
+ type = "single",
5470
+ ...rest
5471
+ } = props;
5472
+ const resolvedSeed = useResolvedSeed(seed);
5473
+ const ink = sketchColor ?? SKETCH_COLORS.ink;
5474
+ const rootStyle = { display: "inline-flex", gap: 6, flexWrap: "wrap" };
5475
+ return /* @__PURE__ */ jsxRuntime.jsx(
5476
+ ToggleGroupSketchContext.Provider,
5477
+ {
5478
+ value: {
5479
+ roughness,
5480
+ seed: resolvedSeed,
5481
+ sketchColor,
5482
+ bowing,
5483
+ fillStyle,
5484
+ strokeWidth,
5485
+ resolvedSeed,
5486
+ ink,
5487
+ animate,
5488
+ size
5489
+ },
5490
+ children: type === "multiple" ? /* @__PURE__ */ jsxRuntime.jsx(
5491
+ ToggleGroupPrimitive__namespace.Root,
5492
+ {
5493
+ type: "multiple",
5494
+ style: rootStyle,
5495
+ ...rest,
5496
+ children
5497
+ }
5498
+ ) : /* @__PURE__ */ jsxRuntime.jsx(
5499
+ ToggleGroupPrimitive__namespace.Root,
5500
+ {
5501
+ type: "single",
5502
+ style: rootStyle,
5503
+ ...rest,
5504
+ children
5505
+ }
5506
+ )
5507
+ }
5508
+ );
5509
+ }
5510
+ var ITEM_SIZE = {
5511
+ sm: { fontSize: 13, padding: "4px 10px", minHeight: 30 },
5512
+ md: { fontSize: 15, padding: "7px 14px", minHeight: 38 },
5513
+ lg: { fontSize: 17, padding: "10px 18px", minHeight: 46 }
5514
+ };
5515
+ var ToggleGroupItem = react.forwardRef(function ToggleGroupItem2({ className, style, children, value, disabled, ...rest }, ref) {
5516
+ const sketch = useToggleGroupSketch();
5517
+ const rootRef = react.useRef(null);
5518
+ const [pressed, setPressed] = react.useState(false);
5519
+ const shouldAnimate = useAnimate(sketch.animate);
5520
+ const pressSeed = deriveSeed(
5521
+ sketch.resolvedSeed,
5522
+ `${value}-${pressed ? "on" : "off"}`
5523
+ );
5524
+ const sketchSeed = shouldAnimate ? pressSeed : sketch.resolvedSeed;
5525
+ react.useLayoutEffect(() => {
5526
+ const el = rootRef.current;
5527
+ if (!el) return;
5528
+ const sync = () => setPressed(el.getAttribute("data-state") === "on");
5529
+ sync();
5530
+ const obs = new MutationObserver(sync);
5531
+ obs.observe(el, { attributes: true, attributeFilter: ["data-state"] });
5532
+ return () => obs.disconnect();
5533
+ }, [value]);
5534
+ useDrawIn(rootRef, DRAW_IN_DURATION_MS, shouldAnimate, sketchSeed);
5535
+ return /* @__PURE__ */ jsxRuntime.jsxs(
5536
+ ToggleGroupPrimitive__namespace.Item,
5537
+ {
5538
+ ref: (node) => {
5539
+ rootRef.current = node;
5540
+ assignRef(ref, node);
5541
+ },
5542
+ value,
5543
+ disabled,
5544
+ className: cn(className),
5545
+ style: {
5546
+ position: "relative",
5547
+ display: "inline-flex",
5548
+ alignItems: "center",
5549
+ justifyContent: "center",
5550
+ border: "none",
5551
+ background: "transparent",
5552
+ cursor: disabled ? "not-allowed" : "pointer",
5553
+ color: sketch.ink,
5554
+ fontFamily: doodleUiFontFamily,
5555
+ fontWeight: doodleUiFontWeight(600),
5556
+ opacity: disabled ? 0.45 : 1,
5557
+ outline: "none",
5558
+ ...ITEM_SIZE[sketch.size],
5559
+ ...style
5560
+ },
5561
+ ...rest,
5562
+ children: [
5563
+ /* @__PURE__ */ jsxRuntime.jsx(
5564
+ RoughSvg,
5565
+ {
5566
+ shape: "rectangle",
5567
+ roughness: sketch.roughness,
5568
+ seed: sketchSeed,
5569
+ sketchColor: pressed ? SKETCH_COLORS.accent : sketch.ink,
5570
+ bowing: sketch.bowing,
5571
+ fillStyle: sketch.fillStyle ?? "hachure",
5572
+ fill: pressed ? SKETCH_COLORS.accentFill : void 0,
5573
+ strokeWidth: sketch.strokeWidth ?? 1.6
5574
+ }
5575
+ ),
5576
+ /* @__PURE__ */ jsxRuntime.jsx("span", { style: { position: "relative", zIndex: 1 }, children })
5577
+ ]
5578
+ }
5579
+ );
5580
+ });
5581
+ var InputGroupSketchContext = react.createContext(null);
5582
+ function useInputGroupSketch() {
5583
+ const ctx = react.useContext(InputGroupSketchContext);
5584
+ if (!ctx) {
5585
+ throw new Error("InputGroup parts must be used inside <InputGroup>.");
5586
+ }
5587
+ return ctx;
5588
+ }
5589
+ function InputGroup({
5590
+ children,
5591
+ className,
5592
+ style,
5593
+ roughness,
5594
+ seed,
5595
+ sketchColor,
5596
+ bowing,
5597
+ fillStyle,
5598
+ strokeWidth,
5599
+ animate,
5600
+ onFocus,
5601
+ onBlur,
5602
+ ...rest
5603
+ }) {
5604
+ const resolvedSeed = useResolvedSeed(seed);
5605
+ const ink = sketchColor ?? SKETCH_COLORS.ink;
5606
+ const [focused, setFocused] = react.useState(false);
5607
+ const shouldAnimate = useAnimate(animate);
5608
+ const focusSeed = deriveSeed(resolvedSeed, "focus");
5609
+ const sketchSeed = shouldAnimate && focused ? focusSeed : resolvedSeed;
5610
+ return /* @__PURE__ */ jsxRuntime.jsx(
5611
+ InputGroupSketchContext.Provider,
5612
+ {
5613
+ value: {
5614
+ roughness,
5615
+ seed: resolvedSeed,
5616
+ sketchColor,
5617
+ bowing,
5618
+ fillStyle,
5619
+ strokeWidth,
5620
+ resolvedSeed,
5621
+ ink,
5622
+ animate,
5623
+ focused,
5624
+ setFocused
5625
+ },
5626
+ children: /* @__PURE__ */ jsxRuntime.jsx(
5627
+ "div",
5628
+ {
5629
+ className: cn(className),
5630
+ style: { position: "relative", width: "100%", ...style },
5631
+ onFocus: (event) => {
5632
+ setFocused(true);
5633
+ onFocus?.(event);
5634
+ },
5635
+ onBlur: (event) => {
5636
+ if (!event.currentTarget.contains(event.relatedTarget)) {
5637
+ setFocused(false);
5638
+ }
5639
+ onBlur?.(event);
5640
+ },
5641
+ ...rest,
5642
+ children: /* @__PURE__ */ jsxRuntime.jsx(
5643
+ SketchBox,
5644
+ {
5645
+ roughness,
5646
+ seed: sketchSeed,
5647
+ sketchColor: focused ? SKETCH_COLORS.accent : ink,
5648
+ bowing,
5649
+ fillStyle,
5650
+ strokeWidth: focused && !shouldAnimate ? (strokeWidth ?? 1.75) + 0.35 : strokeWidth,
5651
+ animate,
5652
+ drawInKey: sketchSeed,
5653
+ contentStyle: {
5654
+ display: "flex",
5655
+ alignItems: "stretch",
5656
+ minHeight: 38
5657
+ },
5658
+ children
5659
+ }
5660
+ )
5661
+ }
5662
+ )
5663
+ }
5664
+ );
5665
+ }
5666
+ var InputGroupAddon = react.forwardRef(
5667
+ function InputGroupAddon2({ className, style, align = "inline-start", children, ...rest }, ref) {
5668
+ const sketch = useInputGroupSketch();
5669
+ return /* @__PURE__ */ jsxRuntime.jsx(
5670
+ "span",
5671
+ {
5672
+ ref,
5673
+ className: cn(className),
5674
+ style: {
5675
+ display: "inline-flex",
5676
+ alignItems: "center",
5677
+ padding: align === "inline-start" ? "0 0 0 10px" : "0 10px 0 0",
5678
+ fontFamily: doodleUiFontFamily,
5679
+ fontSize: 14,
5680
+ color: sketch.ink,
5681
+ flexShrink: 0,
5682
+ ...style
5683
+ },
5684
+ ...rest,
5685
+ children
5686
+ }
5687
+ );
5688
+ }
5689
+ );
5690
+ var InputGroupInput = react.forwardRef(function InputGroupInput2({ className, style, ...rest }, ref) {
5691
+ const sketch = useInputGroupSketch();
5692
+ return /* @__PURE__ */ jsxRuntime.jsx(
5693
+ "input",
5694
+ {
5695
+ ref,
5696
+ className: cn(className),
5697
+ style: {
5698
+ flex: 1,
5699
+ minWidth: 0,
5700
+ border: "none",
5701
+ outline: "none",
5702
+ background: "transparent",
5703
+ color: sketch.ink,
5704
+ fontFamily: doodleUiFontFamily,
5705
+ fontSize: 15,
5706
+ padding: "8px 10px",
5707
+ ...style
5708
+ },
5709
+ ...rest
5710
+ }
5711
+ );
5712
+ });
5713
+ var InputGroupButton = react.forwardRef(function InputGroupButton2({ className, style, children, ...rest }, ref) {
5714
+ return /* @__PURE__ */ jsxRuntime.jsx(
5715
+ "span",
5716
+ {
5717
+ ref,
5718
+ className: cn(className),
5719
+ style: {
5720
+ display: "inline-flex",
5721
+ alignItems: "center",
5722
+ padding: "0 6px 0 0",
5723
+ ...style
5724
+ },
5725
+ ...rest,
5726
+ children
5727
+ }
5728
+ );
5729
+ });
5730
+ var InputOTPSketchContext = react.createContext(
5731
+ null
5732
+ );
5733
+ function useInputOTPSketch() {
5734
+ const ctx = react.useContext(InputOTPSketchContext);
5735
+ if (!ctx) {
5736
+ throw new Error("InputOTP parts must be used inside <InputOTP>.");
5737
+ }
5738
+ return ctx;
5739
+ }
5740
+ var InputOTP = react.forwardRef(
5741
+ function InputOTP2({
5742
+ className,
5743
+ containerClassName,
5744
+ roughness,
5745
+ seed,
5746
+ sketchColor,
5747
+ bowing,
5748
+ fillStyle,
5749
+ strokeWidth,
5750
+ animate,
5751
+ children,
5752
+ ...rest
5753
+ }, ref) {
5754
+ const resolvedSeed = useResolvedSeed(seed);
5755
+ const ink = sketchColor ?? SKETCH_COLORS.ink;
5756
+ return /* @__PURE__ */ jsxRuntime.jsx(
5757
+ InputOTPSketchContext.Provider,
5758
+ {
5759
+ value: {
5760
+ roughness,
5761
+ seed: resolvedSeed,
5762
+ sketchColor,
5763
+ bowing,
5764
+ fillStyle,
5765
+ strokeWidth,
5766
+ resolvedSeed,
5767
+ ink,
5768
+ animate
5769
+ },
5770
+ children: /* @__PURE__ */ jsxRuntime.jsx(
5771
+ inputOtp.OTPInput,
5772
+ {
5773
+ ref,
5774
+ containerClassName: cn(className, containerClassName),
5775
+ ...rest,
5776
+ children
5777
+ }
5778
+ )
5779
+ }
5780
+ );
5781
+ }
5782
+ );
5783
+ var InputOTPGroup = react.forwardRef(
5784
+ function InputOTPGroup2({ className, style, children, ...rest }, ref) {
5785
+ return /* @__PURE__ */ jsxRuntime.jsx(
5786
+ "div",
5787
+ {
5788
+ ref,
5789
+ className: cn(className),
5790
+ style: { display: "flex", alignItems: "center", gap: 8, ...style },
5791
+ ...rest,
5792
+ children
5793
+ }
5794
+ );
5795
+ }
5796
+ );
5797
+ var InputOTPSlot = react.forwardRef(
5798
+ function InputOTPSlot2({ index, className, style, ...rest }, ref) {
5799
+ const inputContext = react.useContext(inputOtp.OTPInputContext);
5800
+ const sketch = useInputOTPSketch();
5801
+ const slotRef = react.useRef(null);
5802
+ const shouldAnimate = useAnimate(sketch.animate);
5803
+ const { char, isActive, hasFakeCaret } = inputContext?.slots[index] ?? {
5804
+ char: null,
5805
+ isActive: false,
5806
+ hasFakeCaret: false
5807
+ };
5808
+ const slotSeed = deriveSeed(
5809
+ sketch.resolvedSeed,
5810
+ `slot-${index}-${isActive ? "active" : "idle"}`
5811
+ );
5812
+ useDrawIn(slotRef, DRAW_IN_DURATION_MS, shouldAnimate, slotSeed);
5813
+ if (!inputContext) {
5814
+ throw new Error("InputOTPSlot must be used inside <InputOTP>.");
5815
+ }
5816
+ return /* @__PURE__ */ jsxRuntime.jsxs(
5817
+ "div",
5818
+ {
5819
+ ref: (node) => {
5820
+ slotRef.current = node;
5821
+ assignRef(ref, node);
5822
+ },
5823
+ className: cn(className),
5824
+ style: {
5825
+ position: "relative",
5826
+ width: 40,
5827
+ height: 44,
5828
+ display: "flex",
5829
+ alignItems: "center",
5830
+ justifyContent: "center",
5831
+ fontFamily: doodleUiFontFamily,
5832
+ fontSize: 18,
5833
+ color: sketch.ink,
5834
+ ...style
5835
+ },
5836
+ ...rest,
5837
+ children: [
5838
+ /* @__PURE__ */ jsxRuntime.jsx(
5839
+ RoughSvg,
5840
+ {
5841
+ shape: "rectangle",
5842
+ roughness: sketch.roughness,
5843
+ seed: slotSeed,
5844
+ sketchColor: isActive ? SKETCH_COLORS.accent : sketch.ink,
5845
+ bowing: sketch.bowing,
5846
+ fillStyle: sketch.fillStyle,
5847
+ strokeWidth: isActive ? (sketch.strokeWidth ?? 1.75) + 0.15 : sketch.strokeWidth
5848
+ }
5849
+ ),
5850
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { style: { position: "relative", zIndex: 1 }, children: [
5851
+ char,
5852
+ hasFakeCaret ? /* @__PURE__ */ jsxRuntime.jsx(
5853
+ framerMotion.motion.span,
5854
+ {
5855
+ "aria-hidden": true,
5856
+ style: {
5857
+ display: "inline-block",
5858
+ width: 2,
5859
+ height: "0.85em",
5860
+ marginLeft: 2,
5861
+ background: sketch.ink,
5862
+ verticalAlign: "middle"
5863
+ },
5864
+ animate: shouldAnimate ? { opacity: [1, 0, 1] } : { opacity: 1 },
5865
+ transition: shouldAnimate ? { duration: 1, repeat: Infinity, ease: "linear" } : void 0
5866
+ }
5867
+ ) : null
5868
+ ] })
5869
+ ]
5870
+ }
5871
+ );
5872
+ }
5873
+ );
5874
+ var InputOTPSeparator = react.forwardRef(function InputOTPSeparator2({ children = "\u2013", className, style, ...rest }, ref) {
5875
+ const sketch = useInputOTPSketch();
5876
+ return /* @__PURE__ */ jsxRuntime.jsx(
5877
+ "span",
5878
+ {
5879
+ ref,
5880
+ role: "separator",
5881
+ className: cn(className),
5882
+ style: {
5883
+ fontFamily: doodleUiFontFamily,
5884
+ color: sketch.ink,
5885
+ opacity: 0.5,
5886
+ userSelect: "none",
5887
+ ...style
5888
+ },
5889
+ ...rest,
5890
+ children
5891
+ }
5892
+ );
5893
+ });
5894
+ var ScrollAreaSketchContext = react.createContext(null);
5895
+ function useScrollAreaSketch() {
5896
+ const ctx = react.useContext(ScrollAreaSketchContext);
5897
+ if (!ctx) {
5898
+ throw new Error("ScrollArea parts must be used inside <ScrollArea>.");
5899
+ }
5900
+ return ctx;
5901
+ }
5902
+ var ScrollArea = react.forwardRef(function ScrollArea2({
5903
+ className,
5904
+ style,
5905
+ children,
5906
+ roughness,
5907
+ seed,
5908
+ sketchColor,
5909
+ bowing,
5910
+ fillStyle,
5911
+ strokeWidth,
5912
+ animate,
5913
+ ...rest
5914
+ }, ref) {
5915
+ const resolvedSeed = useResolvedSeed(seed);
5916
+ const ink = sketchColor ?? SKETCH_COLORS.ink;
5917
+ return /* @__PURE__ */ jsxRuntime.jsx(
5918
+ ScrollAreaSketchContext.Provider,
5919
+ {
5920
+ value: {
5921
+ roughness,
5922
+ seed: resolvedSeed,
5923
+ sketchColor,
5924
+ bowing,
5925
+ fillStyle,
5926
+ strokeWidth,
5927
+ resolvedSeed,
5928
+ ink,
5929
+ animate
5930
+ },
5931
+ children: /* @__PURE__ */ jsxRuntime.jsx(
5932
+ ScrollAreaPrimitive__namespace.Root,
5933
+ {
5934
+ ref,
5935
+ className: cn(className),
5936
+ style: { position: "relative", overflow: "hidden", ...style },
5937
+ ...rest,
5938
+ children: /* @__PURE__ */ jsxRuntime.jsx(
5939
+ SketchBox,
5940
+ {
5941
+ roughness,
5942
+ seed: resolvedSeed,
5943
+ sketchColor: ink,
5944
+ bowing,
5945
+ fillStyle: fillStyle ?? "solid",
5946
+ fill: "#f7f6f2",
5947
+ strokeWidth: strokeWidth ?? 1.5,
5948
+ animate,
5949
+ contentStyle: { padding: 0, height: "100%" },
5950
+ style: { height: "100%" },
5951
+ children
5952
+ }
5953
+ )
5954
+ }
5955
+ )
5956
+ }
5957
+ );
5958
+ });
5959
+ var ScrollAreaViewport = react.forwardRef(function ScrollAreaViewport2({ className, style, children, ...rest }, ref) {
5960
+ return /* @__PURE__ */ jsxRuntime.jsx(
5961
+ ScrollAreaPrimitive__namespace.Viewport,
5962
+ {
5963
+ ref,
5964
+ className: cn(className),
5965
+ style: {
5966
+ width: "100%",
5967
+ height: "100%",
5968
+ borderRadius: 0,
5969
+ ...style
5970
+ },
5971
+ ...rest,
5972
+ children
5973
+ }
5974
+ );
5975
+ });
5976
+ var ScrollBar = react.forwardRef(
5977
+ function ScrollBar2({ className, style, orientation = "vertical", ...rest }, ref) {
5978
+ const sketch = useScrollAreaSketch();
5979
+ return /* @__PURE__ */ jsxRuntime.jsx(
5980
+ ScrollAreaPrimitive__namespace.ScrollAreaScrollbar,
5981
+ {
5982
+ ref,
5983
+ orientation,
5984
+ className: cn(className),
5985
+ style: {
5986
+ display: "flex",
5987
+ touchAction: "none",
5988
+ userSelect: "none",
5989
+ padding: 2,
5990
+ ...orientation === "vertical" ? { width: 12, flexDirection: "column" } : { height: 12, flexDirection: "row" },
5991
+ ...style
5992
+ },
5993
+ ...rest,
5994
+ children: /* @__PURE__ */ jsxRuntime.jsx(ScrollAreaPrimitive__namespace.ScrollAreaThumb, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx("div", { style: { position: "relative", flex: 1 }, children: /* @__PURE__ */ jsxRuntime.jsx(
5995
+ RoughSvg,
5996
+ {
5997
+ shape: orientation === "vertical" ? "line-vertical" : "line",
5998
+ roughness: (sketch.roughness ?? 1.5) + 0.3,
5999
+ seed: sketch.resolvedSeed,
6000
+ sketchColor: sketch.ink,
6001
+ bowing: sketch.bowing,
6002
+ strokeWidth: sketch.strokeWidth ?? 2.2,
6003
+ inset: 1
6004
+ }
6005
+ ) }) })
6006
+ }
6007
+ );
6008
+ }
6009
+ );
6010
+ var ScrollAreaCorner = ScrollAreaPrimitive__namespace.Corner;
6011
+ function ResizablePanelGroup({
6012
+ className,
6013
+ style,
6014
+ ...rest
6015
+ }) {
6016
+ return /* @__PURE__ */ jsxRuntime.jsx(
6017
+ ResizablePrimitive__namespace.PanelGroup,
6018
+ {
6019
+ className: cn(className),
6020
+ style: { display: "flex", width: "100%", height: "100%", ...style },
6021
+ ...rest
6022
+ }
6023
+ );
6024
+ }
6025
+ var ResizablePanel = ResizablePrimitive__namespace.Panel;
6026
+ function ResizableHandle({
6027
+ className,
6028
+ style,
6029
+ withHandle = true,
6030
+ roughness,
6031
+ seed,
6032
+ sketchColor,
6033
+ bowing,
6034
+ strokeWidth,
6035
+ ...rest
6036
+ }) {
6037
+ const resolvedSeed = useResolvedSeed(seed);
6038
+ const ink = sketchColor ?? SKETCH_COLORS.ink;
6039
+ const handleSeed = deriveSeed(resolvedSeed, "handle");
6040
+ const base = {
6041
+ position: "relative",
6042
+ flexShrink: 0,
6043
+ display: "flex",
6044
+ alignItems: "center",
6045
+ justifyContent: "center",
6046
+ background: "transparent",
6047
+ touchAction: "none",
6048
+ ...style
6049
+ };
6050
+ return /* @__PURE__ */ jsxRuntime.jsx(
6051
+ ResizablePrimitive__namespace.PanelResizeHandle,
6052
+ {
6053
+ className: cn(className),
6054
+ style: base,
6055
+ ...rest,
6056
+ children: withHandle ? /* @__PURE__ */ jsxRuntime.jsxs(
6057
+ "div",
6058
+ {
6059
+ style: {
6060
+ position: "relative",
6061
+ width: 14,
6062
+ height: 28,
6063
+ zIndex: 1
6064
+ },
6065
+ children: [
6066
+ /* @__PURE__ */ jsxRuntime.jsx(
6067
+ RoughSvg,
6068
+ {
6069
+ shape: "line-vertical",
6070
+ roughness: roughness ?? 1.8,
6071
+ seed: handleSeed,
6072
+ sketchColor: ink,
6073
+ bowing: bowing ?? 1.5,
6074
+ strokeWidth: strokeWidth ?? 2.4,
6075
+ width: 14,
6076
+ height: 28,
6077
+ inset: 2
6078
+ }
6079
+ ),
6080
+ /* @__PURE__ */ jsxRuntime.jsx(
6081
+ RoughSvg,
6082
+ {
6083
+ shape: "ellipse",
6084
+ roughness: (roughness ?? 1.5) + 0.2,
6085
+ seed: deriveSeed(handleSeed, "dot-a"),
6086
+ sketchColor: ink,
6087
+ width: 14,
6088
+ height: 28,
6089
+ strokeWidth: 1.2,
6090
+ inset: 5,
6091
+ style: { opacity: 0.55 }
6092
+ }
6093
+ )
6094
+ ]
6095
+ }
6096
+ ) : null
6097
+ }
6098
+ );
6099
+ }
6100
+ var HoverCardSketchContext = react.createContext(
6101
+ null
6102
+ );
6103
+ function useHoverCardSketch() {
6104
+ const ctx = react.useContext(HoverCardSketchContext);
6105
+ if (!ctx) {
6106
+ throw new Error("HoverCard parts must be used inside <HoverCard>.");
6107
+ }
6108
+ return ctx;
6109
+ }
6110
+ function HoverCard({
6111
+ children,
6112
+ roughness,
6113
+ seed,
6114
+ sketchColor,
6115
+ bowing,
6116
+ fillStyle,
6117
+ strokeWidth,
6118
+ animate,
6119
+ ...rest
6120
+ }) {
6121
+ const resolvedSeed = useResolvedSeed(seed);
6122
+ const ink = sketchColor ?? SKETCH_COLORS.ink;
6123
+ return /* @__PURE__ */ jsxRuntime.jsx(
6124
+ HoverCardSketchContext.Provider,
6125
+ {
6126
+ value: {
6127
+ roughness,
6128
+ seed: resolvedSeed,
6129
+ sketchColor,
6130
+ bowing,
6131
+ fillStyle,
6132
+ strokeWidth,
6133
+ resolvedSeed,
6134
+ ink,
6135
+ animate
6136
+ },
6137
+ children: /* @__PURE__ */ jsxRuntime.jsx(HoverCardPrimitive__namespace.Root, { ...rest, children })
6138
+ }
6139
+ );
6140
+ }
6141
+ var HoverCardTrigger = HoverCardPrimitive__namespace.Trigger;
6142
+ var HoverCardContent = react.forwardRef(function HoverCardContent2({ className, style, children, sideOffset = 6, align = "center", ...rest }, ref) {
6143
+ const sketch = useHoverCardSketch();
6144
+ return /* @__PURE__ */ jsxRuntime.jsx(HoverCardPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
6145
+ HoverCardPrimitive__namespace.Content,
6146
+ {
6147
+ ref,
6148
+ sideOffset,
6149
+ align,
6150
+ className: cn(className),
6151
+ style: { zIndex: 75, outline: "none", ...style },
6152
+ ...rest,
6153
+ children: /* @__PURE__ */ jsxRuntime.jsx(
6154
+ SketchBox,
6155
+ {
6156
+ roughness: sketch.roughness,
6157
+ seed: sketch.resolvedSeed,
6158
+ sketchColor: sketch.ink,
6159
+ bowing: sketch.bowing,
6160
+ fillStyle: sketch.fillStyle ?? "solid",
6161
+ fill: "#f7f6f2",
6162
+ strokeWidth: sketch.strokeWidth ?? 1.5,
6163
+ shadow: true,
6164
+ animate: sketch.animate,
6165
+ contentStyle: { padding: 14, maxWidth: 320, fontSize: 14 },
6166
+ children
6167
+ }
6168
+ )
6169
+ }
6170
+ ) });
6171
+ });
6172
+ var HoverCardArrow = HoverCardPrimitive__namespace.Arrow;
6173
+ var ContextMenuSketchContext = react.createContext(null);
6174
+ function useContextMenuSketch() {
6175
+ const ctx = react.useContext(ContextMenuSketchContext);
6176
+ if (!ctx) {
6177
+ throw new Error(
6178
+ "ContextMenu parts must be used inside <ContextMenu>."
6179
+ );
6180
+ }
6181
+ return ctx;
6182
+ }
6183
+ function ContextMenu({
6184
+ children,
6185
+ roughness,
6186
+ seed,
6187
+ sketchColor,
6188
+ bowing,
6189
+ fillStyle,
6190
+ strokeWidth,
6191
+ animate,
6192
+ ...rest
6193
+ }) {
6194
+ const resolvedSeed = useResolvedSeed(seed);
6195
+ const ink = sketchColor ?? SKETCH_COLORS.ink;
6196
+ return /* @__PURE__ */ jsxRuntime.jsx(
6197
+ ContextMenuSketchContext.Provider,
6198
+ {
6199
+ value: {
6200
+ roughness,
6201
+ seed: resolvedSeed,
6202
+ sketchColor,
6203
+ bowing,
6204
+ fillStyle,
6205
+ strokeWidth,
6206
+ resolvedSeed,
6207
+ ink,
6208
+ animate
6209
+ },
6210
+ children: /* @__PURE__ */ jsxRuntime.jsx(ContextMenuPrimitive__namespace.Root, { ...rest, children })
6211
+ }
6212
+ );
6213
+ }
6214
+ var ContextMenuTrigger = ContextMenuPrimitive__namespace.Trigger;
6215
+ var ContextMenuGroup = ContextMenuPrimitive__namespace.Group;
6216
+ var ContextMenuRadioGroup = ContextMenuPrimitive__namespace.RadioGroup;
6217
+ var ContextMenuSub = ContextMenuPrimitive__namespace.Sub;
6218
+ var ContextMenuContent = react.forwardRef(function ContextMenuContent2({ className, style, children, ...rest }, ref) {
6219
+ const sketch = useContextMenuSketch();
6220
+ return /* @__PURE__ */ jsxRuntime.jsx(ContextMenuPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
6221
+ ContextMenuPrimitive__namespace.Content,
6222
+ {
6223
+ ref,
6224
+ className: cn(className),
6225
+ style: { zIndex: 80, outline: "none", minWidth: 180, ...style },
6226
+ ...rest,
6227
+ children: /* @__PURE__ */ jsxRuntime.jsx(
6228
+ SketchBox,
6229
+ {
6230
+ roughness: sketch.roughness,
6231
+ seed: sketch.resolvedSeed,
6232
+ sketchColor: sketch.ink,
6233
+ bowing: sketch.bowing,
6234
+ fillStyle: sketch.fillStyle ?? "solid",
6235
+ fill: "#f7f6f2",
6236
+ strokeWidth: sketch.strokeWidth ?? 1.5,
6237
+ shadow: true,
6238
+ animate: sketch.animate,
6239
+ contentStyle: { padding: "6px 4px" },
6240
+ children
6241
+ }
6242
+ )
6243
+ }
6244
+ ) });
6245
+ });
6246
+ function useMark2(highlighted) {
6247
+ const sketch = useContextMenuSketch();
6248
+ return { sketch, mark: highlighted };
6249
+ }
6250
+ var ContextMenuItem = react.forwardRef(function ContextMenuItem2({ className, style, children, inset, ...rest }, ref) {
6251
+ const [highlighted, setHighlighted] = react.useState(false);
6252
+ const { sketch, mark } = useMark2(highlighted);
6253
+ return /* @__PURE__ */ jsxRuntime.jsxs(
6254
+ ContextMenuPrimitive__namespace.Item,
6255
+ {
6256
+ ref,
6257
+ className: cn(className),
6258
+ onPointerMove: () => setHighlighted(true),
6259
+ onPointerLeave: () => setHighlighted(false),
6260
+ onFocus: () => setHighlighted(true),
6261
+ onBlur: () => setHighlighted(false),
6262
+ style: {
6263
+ position: "relative",
6264
+ display: "flex",
6265
+ alignItems: "center",
6266
+ gap: 8,
6267
+ padding: inset ? "7px 12px 7px 26px" : "7px 12px",
6268
+ fontFamily: doodleUiFontFamily,
6269
+ fontSize: 14,
6270
+ color: sketch.ink,
6271
+ outline: "none",
6272
+ cursor: "pointer",
6273
+ userSelect: "none",
6274
+ ...style
6275
+ },
6276
+ ...rest,
6277
+ children: [
6278
+ mark ? /* @__PURE__ */ jsxRuntime.jsx(
6279
+ RoughSvg,
6280
+ {
6281
+ shape: "line",
6282
+ roughness: (sketch.roughness ?? 1.5) + 0.4,
6283
+ seed: sketch.resolvedSeed,
6284
+ sketchColor: sketch.ink,
6285
+ bowing: sketch.bowing ?? 1.6,
6286
+ strokeWidth: 1.3,
6287
+ inset: 4,
6288
+ style: { opacity: 0.4 }
6289
+ }
6290
+ ) : null,
6291
+ /* @__PURE__ */ jsxRuntime.jsx("span", { style: { position: "relative", zIndex: 1 }, children })
6292
+ ]
6293
+ }
6294
+ );
6295
+ });
6296
+ var CHECK_PATH3 = "M 2 6 L 5 9 L 10 3";
6297
+ var ContextMenuCheckboxItem = react.forwardRef(function ContextMenuCheckboxItem2({ className, style, children, checked, ...rest }, ref) {
6298
+ const [highlighted, setHighlighted] = react.useState(false);
6299
+ const { sketch, mark } = useMark2(highlighted);
6300
+ return /* @__PURE__ */ jsxRuntime.jsxs(
6301
+ ContextMenuPrimitive__namespace.CheckboxItem,
6302
+ {
6303
+ ref,
6304
+ checked,
6305
+ className: cn(className),
6306
+ onPointerMove: () => setHighlighted(true),
6307
+ onPointerLeave: () => setHighlighted(false),
6308
+ style: {
6309
+ position: "relative",
6310
+ display: "flex",
6311
+ alignItems: "center",
6312
+ gap: 8,
6313
+ padding: "7px 12px 7px 26px",
6314
+ fontFamily: doodleUiFontFamily,
6315
+ fontSize: 14,
6316
+ color: sketch.ink,
6317
+ outline: "none",
6318
+ cursor: "pointer",
6319
+ userSelect: "none",
6320
+ ...style
6321
+ },
6322
+ ...rest,
6323
+ children: [
6324
+ mark ? /* @__PURE__ */ jsxRuntime.jsx(
6325
+ RoughSvg,
6326
+ {
6327
+ shape: "line",
6328
+ roughness: (sketch.roughness ?? 1.5) + 0.4,
6329
+ seed: sketch.resolvedSeed,
6330
+ sketchColor: sketch.ink,
6331
+ bowing: sketch.bowing ?? 1.6,
6332
+ strokeWidth: 1.3,
6333
+ inset: 4,
6334
+ style: { opacity: 0.4 }
6335
+ }
6336
+ ) : null,
6337
+ /* @__PURE__ */ jsxRuntime.jsx(
6338
+ "span",
6339
+ {
6340
+ style: {
6341
+ position: "relative",
6342
+ width: 12,
6343
+ height: 12,
6344
+ flexShrink: 0,
6345
+ marginLeft: -18
6346
+ },
6347
+ children: /* @__PURE__ */ jsxRuntime.jsx(ContextMenuPrimitive__namespace.ItemIndicator, { children: /* @__PURE__ */ jsxRuntime.jsx(
6348
+ RoughSvg,
6349
+ {
6350
+ shape: "path",
6351
+ path: CHECK_PATH3,
6352
+ roughness: (sketch.roughness ?? 1.5) * 0.7,
6353
+ seed: deriveSeed(sketch.resolvedSeed, "checkbox-mark"),
6354
+ sketchColor: SKETCH_COLORS.accent,
6355
+ bowing: sketch.bowing,
6356
+ strokeWidth: 1.6,
6357
+ inset: 0
6358
+ }
6359
+ ) })
6360
+ }
6361
+ ),
6362
+ /* @__PURE__ */ jsxRuntime.jsx("span", { style: { position: "relative", zIndex: 1 }, children })
6363
+ ]
6364
+ }
6365
+ );
6366
+ });
6367
+ var ContextMenuRadioItem = react.forwardRef(function ContextMenuRadioItem2({ className, style, children, ...rest }, ref) {
6368
+ const [highlighted, setHighlighted] = react.useState(false);
6369
+ const { sketch, mark } = useMark2(highlighted);
6370
+ return /* @__PURE__ */ jsxRuntime.jsxs(
6371
+ ContextMenuPrimitive__namespace.RadioItem,
6372
+ {
6373
+ ref,
6374
+ className: cn(className),
6375
+ onPointerMove: () => setHighlighted(true),
6376
+ onPointerLeave: () => setHighlighted(false),
6377
+ style: {
6378
+ position: "relative",
6379
+ display: "flex",
6380
+ alignItems: "center",
6381
+ gap: 8,
6382
+ padding: "7px 12px 7px 26px",
6383
+ fontFamily: doodleUiFontFamily,
6384
+ fontSize: 14,
6385
+ color: sketch.ink,
6386
+ outline: "none",
6387
+ cursor: "pointer",
6388
+ userSelect: "none",
6389
+ ...style
6390
+ },
6391
+ ...rest,
6392
+ children: [
6393
+ mark ? /* @__PURE__ */ jsxRuntime.jsx(
6394
+ RoughSvg,
6395
+ {
6396
+ shape: "line",
6397
+ roughness: (sketch.roughness ?? 1.5) + 0.4,
6398
+ seed: sketch.resolvedSeed,
6399
+ sketchColor: sketch.ink,
6400
+ bowing: sketch.bowing ?? 1.6,
6401
+ strokeWidth: 1.3,
6402
+ inset: 4,
6403
+ style: { opacity: 0.4 }
6404
+ }
6405
+ ) : null,
6406
+ /* @__PURE__ */ jsxRuntime.jsx(
6407
+ "span",
6408
+ {
6409
+ style: {
6410
+ position: "relative",
6411
+ width: 8,
6412
+ height: 8,
6413
+ flexShrink: 0,
6414
+ marginLeft: -18
6415
+ },
6416
+ children: /* @__PURE__ */ jsxRuntime.jsx(ContextMenuPrimitive__namespace.ItemIndicator, { children: /* @__PURE__ */ jsxRuntime.jsx(
6417
+ RoughSvg,
6418
+ {
6419
+ shape: "ellipse",
6420
+ roughness: (sketch.roughness ?? 1.5) * 0.8,
6421
+ seed: deriveSeed(sketch.resolvedSeed, "radio-mark"),
6422
+ sketchColor: SKETCH_COLORS.accent,
6423
+ bowing: sketch.bowing,
6424
+ fillStyle: "solid",
6425
+ fill: SKETCH_COLORS.accent,
6426
+ strokeWidth: 1.2,
6427
+ inset: 0
6428
+ }
6429
+ ) })
6430
+ }
6431
+ ),
6432
+ /* @__PURE__ */ jsxRuntime.jsx("span", { style: { position: "relative", zIndex: 1 }, children })
6433
+ ]
6434
+ }
6435
+ );
6436
+ });
6437
+ var ContextMenuLabel = react.forwardRef(function ContextMenuLabel2({ className, style, children, ...rest }, ref) {
6438
+ const sketch = useContextMenuSketch();
6439
+ return /* @__PURE__ */ jsxRuntime.jsx(
6440
+ ContextMenuPrimitive__namespace.Label,
6441
+ {
6442
+ ref,
6443
+ className: cn(className),
6444
+ style: {
6445
+ padding: "6px 12px",
6446
+ fontFamily: doodleUiFontFamily,
6447
+ fontSize: 12,
6448
+ fontWeight: 700,
6449
+ color: sketch.ink,
6450
+ opacity: 0.6,
6451
+ textTransform: "uppercase",
6452
+ letterSpacing: 0.4,
6453
+ ...style
6454
+ },
6455
+ ...rest,
6456
+ children
6457
+ }
6458
+ );
6459
+ });
6460
+ var ContextMenuSeparator = react.forwardRef(function ContextMenuSeparator2({ className, style, ...rest }, ref) {
6461
+ const sketch = useContextMenuSketch();
6462
+ return /* @__PURE__ */ jsxRuntime.jsx(
6463
+ ContextMenuPrimitive__namespace.Separator,
6464
+ {
6465
+ ref,
6466
+ className: cn(className),
6467
+ style: { position: "relative", height: 10, margin: "2px 0", ...style },
6468
+ ...rest,
6469
+ children: /* @__PURE__ */ jsxRuntime.jsx(
6470
+ RoughSvg,
6471
+ {
6472
+ shape: "line",
6473
+ roughness: (sketch.roughness ?? 1.5) + 0.2,
6474
+ seed: deriveSeed(sketch.resolvedSeed, "separator"),
6475
+ sketchColor: sketch.ink,
6476
+ bowing: sketch.bowing ?? 1.8,
6477
+ strokeWidth: 1.2,
6478
+ inset: 6,
6479
+ style: { opacity: 0.5 }
6480
+ }
6481
+ )
6482
+ }
6483
+ );
6484
+ });
6485
+ var NavigationMenuSketchContext = react.createContext(null);
6486
+ function useNavigationMenuSketch() {
6487
+ const ctx = react.useContext(NavigationMenuSketchContext);
6488
+ if (!ctx) {
6489
+ throw new Error("NavigationMenu parts must be used inside <NavigationMenu>.");
6490
+ }
6491
+ return ctx;
6492
+ }
6493
+ function NavigationMenu({
6494
+ children,
6495
+ roughness,
6496
+ seed,
6497
+ sketchColor,
6498
+ bowing,
6499
+ fillStyle,
6500
+ strokeWidth,
6501
+ animate,
6502
+ ...rest
6503
+ }) {
6504
+ const resolvedSeed = useResolvedSeed(seed);
6505
+ const ink = sketchColor ?? SKETCH_COLORS.ink;
6506
+ return /* @__PURE__ */ jsxRuntime.jsx(
6507
+ NavigationMenuSketchContext.Provider,
6508
+ {
6509
+ value: {
6510
+ roughness,
6511
+ seed: resolvedSeed,
6512
+ sketchColor,
6513
+ bowing,
6514
+ fillStyle,
6515
+ strokeWidth,
6516
+ resolvedSeed,
6517
+ ink,
6518
+ animate
6519
+ },
6520
+ children: /* @__PURE__ */ jsxRuntime.jsxs(NavigationMenuPrimitive__namespace.Root, { ...rest, children: [
6521
+ children,
6522
+ /* @__PURE__ */ jsxRuntime.jsx(NavigationMenuViewport, {})
6523
+ ] })
6524
+ }
6525
+ );
6526
+ }
6527
+ var NavigationMenuList = react.forwardRef(function NavigationMenuList2({ className, style, ...rest }, ref) {
6528
+ return /* @__PURE__ */ jsxRuntime.jsx(
6529
+ NavigationMenuPrimitive__namespace.List,
6530
+ {
6531
+ ref,
6532
+ className: cn(className),
6533
+ style: {
6534
+ display: "flex",
6535
+ alignItems: "center",
6536
+ gap: 4,
6537
+ listStyle: "none",
6538
+ margin: 0,
6539
+ padding: 0,
6540
+ ...style
6541
+ },
6542
+ ...rest
6543
+ }
6544
+ );
6545
+ });
6546
+ var NavigationMenuItem = NavigationMenuPrimitive__namespace.Item;
6547
+ var NavigationMenuTrigger = react.forwardRef(function NavigationMenuTrigger2({ className, style, children, ...rest }, ref) {
6548
+ const sketch = useNavigationMenuSketch();
6549
+ return /* @__PURE__ */ jsxRuntime.jsx(
6550
+ NavigationMenuPrimitive__namespace.Trigger,
6551
+ {
6552
+ ref,
6553
+ className: cn(className),
6554
+ style: {
6555
+ position: "relative",
6556
+ border: "none",
6557
+ background: "transparent",
6558
+ fontFamily: doodleUiFontFamily,
6559
+ fontWeight: doodleUiFontWeight(600),
6560
+ fontSize: 14,
6561
+ color: sketch.ink,
6562
+ padding: "8px 12px",
6563
+ cursor: "pointer",
6564
+ outline: "none",
6565
+ ...style
6566
+ },
6567
+ ...rest,
6568
+ children
6569
+ }
6570
+ );
6571
+ });
6572
+ var NavigationMenuContent = react.forwardRef(function NavigationMenuContent2({ className, style, children, ...rest }, ref) {
6573
+ const sketch = useNavigationMenuSketch();
6574
+ return /* @__PURE__ */ jsxRuntime.jsx(
6575
+ NavigationMenuPrimitive__namespace.Content,
6576
+ {
6577
+ ref,
6578
+ className: cn(className),
6579
+ style: { outline: "none", ...style },
6580
+ ...rest,
6581
+ children: /* @__PURE__ */ jsxRuntime.jsx(
6582
+ SketchBox,
6583
+ {
6584
+ roughness: sketch.roughness,
6585
+ seed: sketch.resolvedSeed,
6586
+ sketchColor: sketch.ink,
6587
+ bowing: sketch.bowing,
6588
+ fillStyle: sketch.fillStyle ?? "solid",
6589
+ fill: "#f7f6f2",
6590
+ strokeWidth: sketch.strokeWidth ?? 1.5,
6591
+ shadow: true,
6592
+ animate: sketch.animate,
6593
+ contentStyle: { padding: 12, minWidth: 200 },
6594
+ children
6595
+ }
6596
+ )
6597
+ }
6598
+ );
6599
+ });
6600
+ var NavigationMenuLink = NavigationMenuPrimitive__namespace.Link;
6601
+ var NavigationMenuViewport = react.forwardRef(function NavigationMenuViewport2({ className, style, ...rest }, ref) {
6602
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { style: { position: "absolute", top: "100%", left: 0, perspective: 2e3 }, children: /* @__PURE__ */ jsxRuntime.jsx(
6603
+ NavigationMenuPrimitive__namespace.Viewport,
6604
+ {
6605
+ ref,
6606
+ className: cn(className),
6607
+ style: {
6608
+ position: "relative",
6609
+ marginTop: 6,
6610
+ overflow: "hidden",
6611
+ ...style
6612
+ },
6613
+ ...rest
6614
+ }
6615
+ ) });
6616
+ });
6617
+ var NavigationMenuIndicator = react.forwardRef(function NavigationMenuIndicator2({ className, style, ...rest }, ref) {
6618
+ const sketch = useNavigationMenuSketch();
6619
+ return /* @__PURE__ */ jsxRuntime.jsx(
6620
+ NavigationMenuPrimitive__namespace.Indicator,
6621
+ {
6622
+ ref,
6623
+ className: cn(className),
6624
+ style: { position: "relative", height: 6, ...style },
6625
+ ...rest,
6626
+ children: /* @__PURE__ */ jsxRuntime.jsx(
6627
+ RoughSvg,
6628
+ {
6629
+ shape: "line",
6630
+ roughness: (sketch.roughness ?? 1.5) + 0.2,
6631
+ seed: deriveSeed(sketch.resolvedSeed, "nav-indicator"),
6632
+ sketchColor: sketch.ink,
6633
+ strokeWidth: 2,
6634
+ inset: 2
6635
+ }
6636
+ )
6637
+ }
6638
+ );
6639
+ });
6640
+ var NavigationMenuItemLink = react.forwardRef(function NavigationMenuItemLink2({ className, style, active, children, ...rest }, ref) {
6641
+ const sketch = useNavigationMenuSketch();
6642
+ const [hovered, setHovered] = react.useState(false);
6643
+ const showMark = active || hovered;
6644
+ return /* @__PURE__ */ jsxRuntime.jsxs(
6645
+ NavigationMenuPrimitive__namespace.Link,
6646
+ {
6647
+ ref,
6648
+ className: cn(className),
6649
+ onPointerEnter: () => setHovered(true),
6650
+ onPointerLeave: () => setHovered(false),
6651
+ style: {
6652
+ position: "relative",
6653
+ display: "inline-flex",
6654
+ padding: "8px 12px",
6655
+ fontFamily: doodleUiFontFamily,
6656
+ fontSize: 14,
6657
+ color: sketch.ink,
6658
+ textDecoration: "none",
6659
+ outline: "none",
6660
+ ...style
6661
+ },
6662
+ ...rest,
6663
+ children: [
6664
+ showMark ? /* @__PURE__ */ jsxRuntime.jsx(
6665
+ RoughSvg,
6666
+ {
6667
+ shape: "line",
6668
+ roughness: (sketch.roughness ?? 1.5) + 0.3,
6669
+ seed: deriveSeed(sketch.resolvedSeed, "nav-link"),
6670
+ sketchColor: sketch.ink,
6671
+ strokeWidth: 1.4,
6672
+ inset: 4,
6673
+ style: { opacity: 0.35 }
6674
+ }
6675
+ ) : null,
6676
+ /* @__PURE__ */ jsxRuntime.jsx("span", { style: { position: "relative", zIndex: 1 }, children })
6677
+ ]
6678
+ }
6679
+ );
6680
+ });
6681
+ var MenubarSketchContext = react.createContext(
6682
+ null
6683
+ );
6684
+ function useMenubarSketch() {
6685
+ const ctx = react.useContext(MenubarSketchContext);
6686
+ if (!ctx) {
6687
+ throw new Error("Menubar parts must be used inside <Menubar>.");
6688
+ }
6689
+ return ctx;
6690
+ }
6691
+ function Menubar({
6692
+ children,
6693
+ className,
6694
+ style,
6695
+ roughness,
6696
+ seed,
6697
+ sketchColor,
6698
+ bowing,
6699
+ fillStyle,
6700
+ strokeWidth,
6701
+ animate,
6702
+ ...rest
6703
+ }) {
6704
+ const resolvedSeed = useResolvedSeed(seed);
6705
+ const ink = sketchColor ?? SKETCH_COLORS.ink;
6706
+ return /* @__PURE__ */ jsxRuntime.jsx(
6707
+ MenubarSketchContext.Provider,
6708
+ {
6709
+ value: {
6710
+ roughness,
6711
+ seed: resolvedSeed,
6712
+ sketchColor,
6713
+ bowing,
6714
+ fillStyle,
6715
+ strokeWidth,
6716
+ resolvedSeed,
6717
+ ink,
6718
+ animate
6719
+ },
6720
+ children: /* @__PURE__ */ jsxRuntime.jsx(
6721
+ MenubarPrimitive__namespace.Root,
6722
+ {
6723
+ className: cn(className),
6724
+ style: {
6725
+ display: "inline-flex",
6726
+ alignItems: "center",
6727
+ gap: 4,
6728
+ padding: 4,
6729
+ ...style
6730
+ },
6731
+ ...rest,
6732
+ children
6733
+ }
6734
+ )
6735
+ }
6736
+ );
6737
+ }
6738
+ var MenubarMenu = MenubarPrimitive__namespace.Menu;
6739
+ var MenubarTrigger = react.forwardRef(function MenubarTrigger2({ className, style, children, ...rest }, ref) {
6740
+ const sketch = useMenubarSketch();
6741
+ return /* @__PURE__ */ jsxRuntime.jsx(
6742
+ MenubarPrimitive__namespace.Trigger,
6743
+ {
6744
+ ref,
6745
+ className: cn(className),
6746
+ style: {
6747
+ border: "none",
6748
+ background: "transparent",
6749
+ fontFamily: doodleUiFontFamily,
6750
+ fontSize: 14,
6751
+ padding: "6px 10px",
6752
+ cursor: "pointer",
6753
+ color: sketch.ink,
6754
+ outline: "none",
6755
+ ...style
6756
+ },
6757
+ ...rest,
6758
+ children
6759
+ }
6760
+ );
6761
+ });
6762
+ var MenubarContent = react.forwardRef(function MenubarContent2({ className, style, children, align = "start", sideOffset = 6, ...rest }, ref) {
6763
+ const sketch = useMenubarSketch();
6764
+ return /* @__PURE__ */ jsxRuntime.jsx(MenubarPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
6765
+ MenubarPrimitive__namespace.Content,
6766
+ {
6767
+ ref,
6768
+ align,
6769
+ sideOffset,
6770
+ className: cn(className),
6771
+ style: { zIndex: 80, outline: "none", minWidth: 180, ...style },
6772
+ ...rest,
6773
+ children: /* @__PURE__ */ jsxRuntime.jsx(
6774
+ SketchBox,
6775
+ {
6776
+ roughness: sketch.roughness,
6777
+ seed: sketch.resolvedSeed,
6778
+ sketchColor: sketch.ink,
6779
+ bowing: sketch.bowing,
6780
+ fillStyle: sketch.fillStyle ?? "solid",
6781
+ fill: "#f7f6f2",
6782
+ strokeWidth: sketch.strokeWidth ?? 1.5,
6783
+ shadow: true,
6784
+ animate: sketch.animate,
6785
+ contentStyle: { padding: "6px 4px" },
6786
+ children
6787
+ }
6788
+ )
6789
+ }
6790
+ ) });
6791
+ });
6792
+ function useMark3(highlighted) {
6793
+ const sketch = useMenubarSketch();
6794
+ return { sketch, mark: highlighted };
6795
+ }
6796
+ var MenubarItem = react.forwardRef(function MenubarItem2({ className, style, children, ...rest }, ref) {
6797
+ const [highlighted, setHighlighted] = react.useState(false);
6798
+ const { sketch, mark } = useMark3(highlighted);
6799
+ return /* @__PURE__ */ jsxRuntime.jsxs(
6800
+ MenubarPrimitive__namespace.Item,
6801
+ {
6802
+ ref,
6803
+ className: cn(className),
6804
+ onPointerMove: () => setHighlighted(true),
6805
+ onPointerLeave: () => setHighlighted(false),
6806
+ style: {
6807
+ position: "relative",
6808
+ display: "flex",
6809
+ alignItems: "center",
6810
+ gap: 8,
6811
+ padding: "7px 12px",
6812
+ fontFamily: doodleUiFontFamily,
6813
+ fontSize: 14,
6814
+ color: sketch.ink,
6815
+ outline: "none",
6816
+ cursor: "pointer",
6817
+ userSelect: "none",
6818
+ ...style
6819
+ },
6820
+ ...rest,
6821
+ children: [
6822
+ mark ? /* @__PURE__ */ jsxRuntime.jsx(
6823
+ RoughSvg,
6824
+ {
6825
+ shape: "line",
6826
+ roughness: (sketch.roughness ?? 1.5) + 0.4,
6827
+ seed: sketch.resolvedSeed,
6828
+ sketchColor: sketch.ink,
6829
+ bowing: sketch.bowing ?? 1.6,
6830
+ strokeWidth: 1.3,
6831
+ inset: 4,
6832
+ style: { opacity: 0.4 }
6833
+ }
6834
+ ) : null,
6835
+ /* @__PURE__ */ jsxRuntime.jsx("span", { style: { position: "relative", zIndex: 1 }, children })
6836
+ ]
6837
+ }
6838
+ );
6839
+ });
6840
+ var MenubarSeparator = react.forwardRef(function MenubarSeparator2({ className, style, ...rest }, ref) {
6841
+ const sketch = useMenubarSketch();
6842
+ return /* @__PURE__ */ jsxRuntime.jsx(
6843
+ MenubarPrimitive__namespace.Separator,
6844
+ {
6845
+ ref,
6846
+ className: cn(className),
6847
+ style: { position: "relative", height: 10, margin: "2px 0", ...style },
6848
+ ...rest,
6849
+ children: /* @__PURE__ */ jsxRuntime.jsx(
6850
+ RoughSvg,
6851
+ {
6852
+ shape: "line",
6853
+ roughness: (sketch.roughness ?? 1.5) + 0.2,
6854
+ seed: deriveSeed(sketch.resolvedSeed, "separator"),
6855
+ sketchColor: sketch.ink,
6856
+ bowing: sketch.bowing ?? 1.8,
6857
+ strokeWidth: 1.2,
6858
+ inset: 6,
6859
+ style: { opacity: 0.5 }
6860
+ }
6861
+ )
6862
+ }
6863
+ );
6864
+ });
6865
+ var MenubarLabel = react.forwardRef(function MenubarLabel2({ className, style, children, ...rest }, ref) {
6866
+ const sketch = useMenubarSketch();
6867
+ return /* @__PURE__ */ jsxRuntime.jsx(
6868
+ MenubarPrimitive__namespace.Label,
6869
+ {
6870
+ ref,
6871
+ className: cn(className),
6872
+ style: {
6873
+ padding: "6px 12px",
6874
+ fontFamily: doodleUiFontFamily,
6875
+ fontSize: 12,
6876
+ fontWeight: 700,
6877
+ color: sketch.ink,
6878
+ opacity: 0.6,
6879
+ ...style
6880
+ },
6881
+ ...rest,
6882
+ children
6883
+ }
6884
+ );
6885
+ });
6886
+ var MenubarShortcut = react.forwardRef(function MenubarShortcut2({ className, style, children, ...rest }, ref) {
6887
+ return /* @__PURE__ */ jsxRuntime.jsx(
6888
+ "span",
6889
+ {
6890
+ ref,
6891
+ className: cn(className),
6892
+ style: {
6893
+ marginLeft: "auto",
6894
+ fontSize: 12,
6895
+ opacity: 0.55,
6896
+ letterSpacing: 0.04,
6897
+ ...style
6898
+ },
6899
+ ...rest,
6900
+ children
6901
+ }
6902
+ );
6903
+ });
6904
+ var MenubarSub = MenubarPrimitive__namespace.Sub;
6905
+ var MenubarSubTrigger = MenubarPrimitive__namespace.SubTrigger;
6906
+ var MenubarSubContent = MenubarPrimitive__namespace.SubContent;
6907
+ var MenubarCheckboxItem = MenubarPrimitive__namespace.CheckboxItem;
6908
+ var MenubarRadioGroup = MenubarPrimitive__namespace.RadioGroup;
6909
+ var MenubarRadioItem = MenubarPrimitive__namespace.RadioItem;
6910
+ var SlidingPanelSketchContext = react.createContext(null);
6911
+ function useSlidingPanelSketch() {
6912
+ const ctx = react.useContext(SlidingPanelSketchContext);
6913
+ if (!ctx) {
6914
+ throw new Error("Sliding panel parts must be used inside the panel root.");
6915
+ }
6916
+ return ctx;
6917
+ }
6918
+ function SlidingPanelRoot({
6919
+ children,
6920
+ open,
6921
+ defaultOpen,
6922
+ onOpenChange,
6923
+ side = "right",
6924
+ roughness,
6925
+ seed,
6926
+ sketchColor,
6927
+ bowing,
6928
+ fillStyle,
6929
+ strokeWidth,
6930
+ animate,
6931
+ ...rest
6932
+ }) {
6933
+ const resolvedSeed = useResolvedSeed(seed);
6934
+ const ink = sketchColor ?? SKETCH_COLORS.ink;
6935
+ const [uncontrolled, setUncontrolled] = react.useState(defaultOpen === true);
6936
+ const isOpen = open ?? uncontrolled;
6937
+ return /* @__PURE__ */ jsxRuntime.jsx(
6938
+ SlidingPanelSketchContext.Provider,
6939
+ {
6940
+ value: {
6941
+ roughness,
6942
+ seed: resolvedSeed,
6943
+ sketchColor,
6944
+ bowing,
6945
+ fillStyle,
6946
+ strokeWidth,
6947
+ resolvedSeed,
6948
+ ink,
6949
+ animate,
6950
+ open: isOpen,
6951
+ side
6952
+ },
6953
+ children: /* @__PURE__ */ jsxRuntime.jsx(
6954
+ Dialog__namespace.Root,
6955
+ {
6956
+ open: isOpen,
6957
+ onOpenChange: (next) => {
6958
+ setUncontrolled(next);
6959
+ onOpenChange?.(next);
6960
+ },
6961
+ ...rest,
6962
+ children
6963
+ }
6964
+ )
6965
+ }
6966
+ );
6967
+ }
6968
+ var SlidingPanelTrigger = Dialog__namespace.Trigger;
6969
+ var SlidingPanelClose = Dialog__namespace.Close;
6970
+ function slideVariants(side, shouldAnimate) {
6971
+ if (!shouldAnimate) {
6972
+ return { hidden: {}, visible: {} };
6973
+ }
6974
+ const offset = 420;
6975
+ const hidden = side === "left" ? { x: -offset } : side === "right" ? { x: offset } : side === "top" ? { y: -offset } : { y: offset };
6976
+ return {
6977
+ hidden: { ...hidden, opacity: 0.85 },
6978
+ visible: { x: 0, y: 0, opacity: 1 }
6979
+ };
6980
+ }
6981
+ function panelPosition(side) {
6982
+ switch (side) {
6983
+ case "left":
6984
+ return {
6985
+ top: 0,
6986
+ bottom: 0,
6987
+ left: 0,
6988
+ width: "min(420px, 100vw)"
6989
+ };
6990
+ case "right":
6991
+ return {
6992
+ top: 0,
6993
+ bottom: 0,
6994
+ right: 0,
6995
+ width: "min(420px, 100vw)"
6996
+ };
6997
+ case "top":
6998
+ return {
6999
+ top: 0,
7000
+ left: 0,
7001
+ right: 0,
7002
+ height: "min(420px, 90vh)"
7003
+ };
7004
+ default:
7005
+ return {
7006
+ bottom: 0,
7007
+ left: 0,
7008
+ right: 0,
7009
+ height: "min(420px, 90vh)"
7010
+ };
7011
+ }
7012
+ }
7013
+ var SlidingPanelOverlay = react.forwardRef(function SlidingPanelOverlay2({ style, ...rest }, ref) {
7014
+ const sketch = useSlidingPanelSketch();
7015
+ const shouldAnimate = useAnimate(sketch.animate);
7016
+ return /* @__PURE__ */ jsxRuntime.jsx(Dialog__namespace.Overlay, { ref, asChild: true, forceMount: true, ...rest, children: /* @__PURE__ */ jsxRuntime.jsx(
7017
+ framerMotion.motion.div,
7018
+ {
7019
+ initial: shouldAnimate ? { opacity: 0 } : false,
7020
+ animate: { opacity: 1 },
7021
+ exit: shouldAnimate ? { opacity: 0 } : void 0,
7022
+ transition: shouldAnimate ? { duration: 0.22, ease: "easeOut" } : { duration: 0 },
7023
+ style: {
7024
+ position: "fixed",
7025
+ inset: 0,
7026
+ background: "rgba(31, 29, 26, 0.38)",
7027
+ zIndex: 70,
7028
+ ...style
7029
+ }
7030
+ }
7031
+ ) });
7032
+ });
7033
+ var SlidingPanelContent = react.forwardRef(function SlidingPanelContent2({ className, style, contentStyle, children, chrome, ...rest }, ref) {
7034
+ const sketch = useSlidingPanelSketch();
7035
+ const shouldAnimate = useAnimate(sketch.animate);
7036
+ const variants = slideVariants(sketch.side, shouldAnimate);
7037
+ return /* @__PURE__ */ jsxRuntime.jsx(framerMotion.AnimatePresence, { children: sketch.open ? /* @__PURE__ */ jsxRuntime.jsxs(Dialog__namespace.Portal, { forceMount: true, children: [
7038
+ /* @__PURE__ */ jsxRuntime.jsx(SlidingPanelOverlay, {}),
7039
+ /* @__PURE__ */ jsxRuntime.jsx(Dialog__namespace.Content, { ref, asChild: true, forceMount: true, ...rest, children: /* @__PURE__ */ jsxRuntime.jsx(
7040
+ framerMotion.motion.div,
7041
+ {
7042
+ className: cn(className),
7043
+ initial: shouldAnimate ? "hidden" : false,
7044
+ animate: "visible",
7045
+ exit: shouldAnimate ? "hidden" : void 0,
7046
+ variants,
7047
+ transition: shouldAnimate ? { duration: 0.28, ease: "easeOut" } : { duration: 0 },
7048
+ style: {
7049
+ position: "fixed",
7050
+ zIndex: 80,
7051
+ outline: "none",
7052
+ pointerEvents: "auto",
7053
+ ...panelPosition(sketch.side),
7054
+ ...style
7055
+ },
7056
+ children: /* @__PURE__ */ jsxRuntime.jsxs(
7057
+ SketchBox,
7058
+ {
7059
+ roughness: sketch.roughness,
7060
+ seed: sketch.resolvedSeed,
7061
+ sketchColor: sketch.ink,
7062
+ bowing: sketch.bowing,
7063
+ fillStyle: sketch.fillStyle ?? "solid",
7064
+ fill: "#f7f6f2",
7065
+ strokeWidth: sketch.strokeWidth ?? 2,
7066
+ animate: sketch.animate,
7067
+ contentStyle: {
7068
+ padding: 20,
7069
+ height: "100%",
7070
+ boxSizing: "border-box",
7071
+ display: "flex",
7072
+ flexDirection: "column",
7073
+ ...contentStyle
7074
+ },
7075
+ style: { height: "100%" },
7076
+ children: [
7077
+ chrome,
7078
+ children
7079
+ ]
7080
+ }
7081
+ )
7082
+ }
7083
+ ) })
7084
+ ] }) : null });
7085
+ });
7086
+ function SlidingPanelHeader({
7087
+ children,
7088
+ className,
7089
+ style
7090
+ }) {
7091
+ return /* @__PURE__ */ jsxRuntime.jsx(
7092
+ "div",
7093
+ {
7094
+ className: cn(className),
7095
+ style: {
7096
+ display: "flex",
7097
+ flexDirection: "column",
7098
+ gap: 6,
7099
+ marginBottom: 12,
7100
+ ...style
7101
+ },
7102
+ children
7103
+ }
7104
+ );
7105
+ }
7106
+ function SlidingPanelFooter({
7107
+ children,
7108
+ className,
7109
+ style
7110
+ }) {
7111
+ return /* @__PURE__ */ jsxRuntime.jsx(
7112
+ "div",
7113
+ {
7114
+ className: cn(className),
7115
+ style: {
7116
+ display: "flex",
7117
+ gap: 8,
7118
+ marginTop: "auto",
7119
+ paddingTop: 12,
7120
+ ...style
7121
+ },
7122
+ children
7123
+ }
7124
+ );
7125
+ }
7126
+ var SlidingPanelTitle = react.forwardRef(function SlidingPanelTitle2({ className, style, ...rest }, ref) {
7127
+ const sketch = useSlidingPanelSketch();
7128
+ return /* @__PURE__ */ jsxRuntime.jsx(
7129
+ Dialog__namespace.Title,
7130
+ {
7131
+ ref,
7132
+ className: cn(className),
7133
+ style: {
7134
+ margin: 0,
7135
+ fontFamily: doodleUiFontFamily,
7136
+ fontWeight: doodleUiFontWeight(700),
7137
+ fontSize: 20,
7138
+ color: sketch.ink,
7139
+ ...style
7140
+ },
7141
+ ...rest
7142
+ }
7143
+ );
7144
+ });
7145
+ var SlidingPanelDescription = react.forwardRef(function SlidingPanelDescription2({ className, style, ...rest }, ref) {
7146
+ const sketch = useSlidingPanelSketch();
7147
+ return /* @__PURE__ */ jsxRuntime.jsx(
7148
+ Dialog__namespace.Description,
7149
+ {
7150
+ ref,
7151
+ className: cn(className),
7152
+ style: {
7153
+ margin: 0,
7154
+ fontFamily: doodleUiFontFamily,
7155
+ fontSize: 14,
7156
+ color: sketch.ink,
7157
+ opacity: 0.75,
7158
+ ...style
7159
+ },
7160
+ ...rest
7161
+ }
7162
+ );
7163
+ });
7164
+ function Sheet({ side = "right", ...rest }) {
7165
+ return /* @__PURE__ */ jsxRuntime.jsx(SlidingPanelRoot, { side, ...rest });
7166
+ }
7167
+ var SheetTrigger = SlidingPanelTrigger;
7168
+ var SheetClose = SlidingPanelClose;
7169
+ var SheetContent = react.forwardRef(
7170
+ function SheetContent2(props, ref) {
7171
+ return /* @__PURE__ */ jsxRuntime.jsx(SlidingPanelContent, { ref, ...props });
7172
+ }
7173
+ );
7174
+ var SheetHeader = SlidingPanelHeader;
7175
+ var SheetFooter = SlidingPanelFooter;
7176
+ var SheetTitle = SlidingPanelTitle;
7177
+ var SheetDescription = SlidingPanelDescription;
7178
+ function Drawer(props) {
7179
+ return /* @__PURE__ */ jsxRuntime.jsx(SlidingPanelRoot, { side: "bottom", ...props });
7180
+ }
7181
+ var DrawerTrigger = SlidingPanelTrigger;
7182
+ var DrawerClose = SlidingPanelClose;
7183
+ var DrawerHandle = react.forwardRef(
7184
+ function DrawerHandle2({ className }, ref) {
7185
+ const sketch = useSlidingPanelSketch();
7186
+ return /* @__PURE__ */ jsxRuntime.jsx(
7187
+ "div",
7188
+ {
7189
+ ref,
7190
+ className,
7191
+ style: {
7192
+ position: "relative",
7193
+ width: 48,
7194
+ height: 10,
7195
+ margin: "0 auto 12px"
7196
+ },
7197
+ "aria-hidden": true,
7198
+ children: /* @__PURE__ */ jsxRuntime.jsx(
7199
+ RoughSvg,
7200
+ {
7201
+ shape: "line",
7202
+ roughness: (sketch.roughness ?? 1.5) + 0.3,
7203
+ seed: deriveSeed(sketch.resolvedSeed, "drawer-handle"),
7204
+ sketchColor: sketch.sketchColor ?? SKETCH_COLORS.ink,
7205
+ bowing: sketch.bowing ?? 1.6,
7206
+ strokeWidth: 2.4,
7207
+ width: 48,
7208
+ height: 10,
7209
+ inset: 2
7210
+ }
7211
+ )
7212
+ }
7213
+ );
7214
+ }
7215
+ );
7216
+ var DrawerContent = react.forwardRef(
7217
+ function DrawerContent2({ children, ...rest }, ref) {
7218
+ return /* @__PURE__ */ jsxRuntime.jsx(
7219
+ SlidingPanelContent,
7220
+ {
7221
+ ref,
7222
+ chrome: /* @__PURE__ */ jsxRuntime.jsx(DrawerHandle, {}),
7223
+ contentStyle: { paddingTop: 8 },
7224
+ ...rest,
7225
+ children
7226
+ }
7227
+ );
7228
+ }
7229
+ );
7230
+ var DrawerHeader = SlidingPanelHeader;
7231
+ var DrawerFooter = SlidingPanelFooter;
7232
+ var DrawerTitle = SlidingPanelTitle;
7233
+ var DrawerDescription = SlidingPanelDescription;
5218
7234
 
5219
7235
  exports.Accordion = Accordion;
5220
7236
  exports.AccordionContent = AccordionContent;
@@ -5251,6 +7267,17 @@ exports.CommandItem = CommandItem;
5251
7267
  exports.CommandList = CommandList;
5252
7268
  exports.CommandSeparator = CommandSeparator;
5253
7269
  exports.CommandShortcut = CommandShortcut;
7270
+ exports.ContextMenu = ContextMenu;
7271
+ exports.ContextMenuCheckboxItem = ContextMenuCheckboxItem;
7272
+ exports.ContextMenuContent = ContextMenuContent;
7273
+ exports.ContextMenuGroup = ContextMenuGroup;
7274
+ exports.ContextMenuItem = ContextMenuItem;
7275
+ exports.ContextMenuLabel = ContextMenuLabel;
7276
+ exports.ContextMenuRadioGroup = ContextMenuRadioGroup;
7277
+ exports.ContextMenuRadioItem = ContextMenuRadioItem;
7278
+ exports.ContextMenuSeparator = ContextMenuSeparator;
7279
+ exports.ContextMenuSub = ContextMenuSub;
7280
+ exports.ContextMenuTrigger = ContextMenuTrigger;
5254
7281
  exports.DEFAULT_BOWING = DEFAULT_BOWING;
5255
7282
  exports.DEFAULT_INK = DEFAULT_INK;
5256
7283
  exports.DEFAULT_ROUGHNESS = DEFAULT_ROUGHNESS;
@@ -5271,6 +7298,15 @@ exports.DialogTitle = DialogTitle;
5271
7298
  exports.DialogTrigger = DialogTrigger;
5272
7299
  exports.Divider = Divider;
5273
7300
  exports.DoodleUIProvider = DoodleUIProvider;
7301
+ exports.Drawer = Drawer;
7302
+ exports.DrawerClose = DrawerClose;
7303
+ exports.DrawerContent = DrawerContent;
7304
+ exports.DrawerDescription = DrawerDescription;
7305
+ exports.DrawerFooter = DrawerFooter;
7306
+ exports.DrawerHandle = DrawerHandle;
7307
+ exports.DrawerHeader = DrawerHeader;
7308
+ exports.DrawerTitle = DrawerTitle;
7309
+ exports.DrawerTrigger = DrawerTrigger;
5274
7310
  exports.DropdownMenu = DropdownMenu;
5275
7311
  exports.DropdownMenuCheckboxItem = DropdownMenuCheckboxItem;
5276
7312
  exports.DropdownMenuContent = DropdownMenuContent;
@@ -5282,14 +7318,50 @@ exports.DropdownMenuRadioItem = DropdownMenuRadioItem;
5282
7318
  exports.DropdownMenuSeparator = DropdownMenuSeparator;
5283
7319
  exports.DropdownMenuSub = DropdownMenuSub;
5284
7320
  exports.DropdownMenuTrigger = DropdownMenuTrigger;
7321
+ exports.HoverCard = HoverCard;
7322
+ exports.HoverCardArrow = HoverCardArrow;
7323
+ exports.HoverCardContent = HoverCardContent;
7324
+ exports.HoverCardTrigger = HoverCardTrigger;
5285
7325
  exports.Input = Input;
7326
+ exports.InputGroup = InputGroup;
7327
+ exports.InputGroupAddon = InputGroupAddon;
7328
+ exports.InputGroupButton = InputGroupButton;
7329
+ exports.InputGroupInput = InputGroupInput;
7330
+ exports.InputOTP = InputOTP;
7331
+ exports.InputOTPGroup = InputOTPGroup;
7332
+ exports.InputOTPSeparator = InputOTPSeparator;
7333
+ exports.InputOTPSlot = InputOTPSlot;
7334
+ exports.Kbd = Kbd;
5286
7335
  exports.Label = Label2;
7336
+ exports.Menubar = Menubar;
7337
+ exports.MenubarCheckboxItem = MenubarCheckboxItem;
7338
+ exports.MenubarContent = MenubarContent;
7339
+ exports.MenubarItem = MenubarItem;
7340
+ exports.MenubarLabel = MenubarLabel;
7341
+ exports.MenubarMenu = MenubarMenu;
7342
+ exports.MenubarRadioGroup = MenubarRadioGroup;
7343
+ exports.MenubarRadioItem = MenubarRadioItem;
7344
+ exports.MenubarSeparator = MenubarSeparator;
7345
+ exports.MenubarShortcut = MenubarShortcut;
7346
+ exports.MenubarSub = MenubarSub;
7347
+ exports.MenubarSubContent = MenubarSubContent;
7348
+ exports.MenubarSubTrigger = MenubarSubTrigger;
7349
+ exports.MenubarTrigger = MenubarTrigger;
5287
7350
  exports.Modal = Modal;
5288
7351
  exports.ModalClose = ModalClose;
5289
7352
  exports.ModalDescription = ModalDescription;
5290
7353
  exports.ModalRoot = ModalRoot;
5291
7354
  exports.ModalTitle = ModalTitle;
5292
7355
  exports.ModalTrigger = ModalTrigger;
7356
+ exports.NavigationMenu = NavigationMenu;
7357
+ exports.NavigationMenuContent = NavigationMenuContent;
7358
+ exports.NavigationMenuIndicator = NavigationMenuIndicator;
7359
+ exports.NavigationMenuItem = NavigationMenuItem;
7360
+ exports.NavigationMenuItemLink = NavigationMenuItemLink;
7361
+ exports.NavigationMenuLink = NavigationMenuLink;
7362
+ exports.NavigationMenuList = NavigationMenuList;
7363
+ exports.NavigationMenuTrigger = NavigationMenuTrigger;
7364
+ exports.NavigationMenuViewport = NavigationMenuViewport;
5293
7365
  exports.Pagination = Pagination;
5294
7366
  exports.Popover = Popover;
5295
7367
  exports.PopoverAnchor = PopoverAnchor;
@@ -5300,8 +7372,15 @@ exports.PopoverTrigger = PopoverTrigger;
5300
7372
  exports.Progress = Progress;
5301
7373
  exports.Radio = Radio;
5302
7374
  exports.RadioGroup = RadioGroup;
7375
+ exports.ResizableHandle = ResizableHandle;
7376
+ exports.ResizablePanel = ResizablePanel;
7377
+ exports.ResizablePanelGroup = ResizablePanelGroup;
5303
7378
  exports.RoughSvg = RoughSvg;
5304
7379
  exports.SKETCH_COLORS = SKETCH_COLORS;
7380
+ exports.ScrollArea = ScrollArea;
7381
+ exports.ScrollAreaCorner = ScrollAreaCorner;
7382
+ exports.ScrollAreaViewport = ScrollAreaViewport;
7383
+ exports.ScrollBar = ScrollBar;
5305
7384
  exports.Select = Select;
5306
7385
  exports.SelectContent = SelectContent;
5307
7386
  exports.SelectGroup = SelectGroup;
@@ -5311,10 +7390,19 @@ exports.SelectRoot = SelectRoot;
5311
7390
  exports.SelectSeparator = SelectSeparator;
5312
7391
  exports.SelectTrigger = SelectTrigger;
5313
7392
  exports.SelectValue = SelectValue;
7393
+ exports.Sheet = Sheet;
7394
+ exports.SheetClose = SheetClose;
7395
+ exports.SheetContent = SheetContent;
7396
+ exports.SheetDescription = SheetDescription;
7397
+ exports.SheetFooter = SheetFooter;
7398
+ exports.SheetHeader = SheetHeader;
7399
+ exports.SheetTitle = SheetTitle;
7400
+ exports.SheetTrigger = SheetTrigger;
5314
7401
  exports.Skeleton = Skeleton;
5315
7402
  exports.SketchBox = SketchBox;
5316
7403
  exports.SketchSeedProvider = SketchSeedProvider;
5317
7404
  exports.Slider = Slider;
7405
+ exports.Spinner = Spinner;
5318
7406
  exports.Stepper = Stepper;
5319
7407
  exports.Switch = Switch;
5320
7408
  exports.TABLE_STAGGER_MS = TABLE_STAGGER_MS;
@@ -5337,6 +7425,9 @@ exports.ToastProvider = ToastProvider;
5337
7425
  exports.ToastRoot = ToastRoot;
5338
7426
  exports.ToastTitle = ToastTitle;
5339
7427
  exports.ToastViewport = ToastViewport;
7428
+ exports.Toggle = Toggle;
7429
+ exports.ToggleGroup = ToggleGroup;
7430
+ exports.ToggleGroupItem = ToggleGroupItem;
5340
7431
  exports.Tooltip = Tooltip;
5341
7432
  exports.TooltipProvider = TooltipProvider;
5342
7433
  exports.deriveSeed = deriveSeed;