doodleui-react 0.4.0 → 0.6.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,17 @@ 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');
34
+ var AspectRatioPrimitive = require('@radix-ui/react-aspect-ratio');
35
+ var useEmblaCarousel = require('embla-carousel-react');
25
36
 
26
37
  function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
27
38
 
@@ -60,6 +71,16 @@ var CollapsiblePrimitive__namespace = /*#__PURE__*/_interopNamespace(Collapsible
60
71
  var PopoverPrimitive__namespace = /*#__PURE__*/_interopNamespace(PopoverPrimitive);
61
72
  var DropdownMenuPrimitive__namespace = /*#__PURE__*/_interopNamespace(DropdownMenuPrimitive);
62
73
  var AlertDialogPrimitive__namespace = /*#__PURE__*/_interopNamespace(AlertDialogPrimitive);
74
+ var TogglePrimitive__namespace = /*#__PURE__*/_interopNamespace(TogglePrimitive);
75
+ var ToggleGroupPrimitive__namespace = /*#__PURE__*/_interopNamespace(ToggleGroupPrimitive);
76
+ var ScrollAreaPrimitive__namespace = /*#__PURE__*/_interopNamespace(ScrollAreaPrimitive);
77
+ var ResizablePrimitive__namespace = /*#__PURE__*/_interopNamespace(ResizablePrimitive);
78
+ var HoverCardPrimitive__namespace = /*#__PURE__*/_interopNamespace(HoverCardPrimitive);
79
+ var ContextMenuPrimitive__namespace = /*#__PURE__*/_interopNamespace(ContextMenuPrimitive);
80
+ var NavigationMenuPrimitive__namespace = /*#__PURE__*/_interopNamespace(NavigationMenuPrimitive);
81
+ var MenubarPrimitive__namespace = /*#__PURE__*/_interopNamespace(MenubarPrimitive);
82
+ var AspectRatioPrimitive__namespace = /*#__PURE__*/_interopNamespace(AspectRatioPrimitive);
83
+ var useEmblaCarousel__default = /*#__PURE__*/_interopDefault(useEmblaCarousel);
63
84
 
64
85
  // src/types.ts
65
86
  function toRoughOptions(props) {
@@ -5215,6 +5236,3334 @@ function Combobox({
5215
5236
  ) })
5216
5237
  ] });
5217
5238
  }
5239
+ var Kbd = react.forwardRef(function Kbd2({
5240
+ children,
5241
+ className,
5242
+ style,
5243
+ roughness,
5244
+ seed,
5245
+ sketchColor,
5246
+ bowing,
5247
+ fillStyle,
5248
+ strokeWidth,
5249
+ animate,
5250
+ ...rest
5251
+ }, ref) {
5252
+ const ink = sketchColor ?? SKETCH_COLORS.ink;
5253
+ return /* @__PURE__ */ jsxRuntime.jsx(
5254
+ SketchBox,
5255
+ {
5256
+ className: cn(className),
5257
+ style: {
5258
+ display: "inline-flex",
5259
+ verticalAlign: "middle",
5260
+ ...style
5261
+ },
5262
+ contentStyle: {
5263
+ padding: "2px 7px",
5264
+ fontSize: 11,
5265
+ fontFamily: doodleUiFontFamily,
5266
+ lineHeight: 1.35,
5267
+ letterSpacing: "0.04em"
5268
+ },
5269
+ fill: SKETCH_COLORS.secondaryFill,
5270
+ fillStyle: fillStyle ?? "hachure",
5271
+ roughness,
5272
+ seed,
5273
+ sketchColor: ink,
5274
+ bowing,
5275
+ strokeWidth: strokeWidth ?? 1.3,
5276
+ animate,
5277
+ ...rest,
5278
+ children: /* @__PURE__ */ jsxRuntime.jsx(
5279
+ "kbd",
5280
+ {
5281
+ ref,
5282
+ style: {
5283
+ border: "none",
5284
+ background: "transparent",
5285
+ padding: 0,
5286
+ font: "inherit",
5287
+ color: "inherit"
5288
+ },
5289
+ children
5290
+ }
5291
+ )
5292
+ }
5293
+ );
5294
+ });
5295
+ var SPINNER_ARC = "M 12 3 A 9 9 0 1 1 11.5 3";
5296
+ var SIZE_PX = {
5297
+ sm: 18,
5298
+ md: 24,
5299
+ lg: 32
5300
+ };
5301
+ var Spinner = react.forwardRef(
5302
+ function Spinner2({
5303
+ className,
5304
+ style,
5305
+ size = "md",
5306
+ roughness,
5307
+ seed,
5308
+ sketchColor,
5309
+ bowing,
5310
+ fillStyle,
5311
+ strokeWidth,
5312
+ animate,
5313
+ ...rest
5314
+ }, ref) {
5315
+ const px = SIZE_PX[size];
5316
+ const resolvedSeed = useResolvedSeed(seed);
5317
+ const ink = sketchColor ?? SKETCH_COLORS.ink;
5318
+ const shouldSpin = useAnimate(animate);
5319
+ const boxStyle = {
5320
+ position: "relative",
5321
+ width: px,
5322
+ height: px,
5323
+ flexShrink: 0,
5324
+ display: "inline-block",
5325
+ ...style
5326
+ };
5327
+ const arc = /* @__PURE__ */ jsxRuntime.jsx(
5328
+ RoughSvg,
5329
+ {
5330
+ shape: "path",
5331
+ path: SPINNER_ARC,
5332
+ width: px,
5333
+ height: px,
5334
+ roughness: roughness ?? 1.6,
5335
+ seed: resolvedSeed,
5336
+ sketchColor: ink,
5337
+ bowing: bowing ?? 1.2,
5338
+ fillStyle,
5339
+ strokeWidth: strokeWidth ?? 2,
5340
+ inset: 2
5341
+ }
5342
+ );
5343
+ return /* @__PURE__ */ jsxRuntime.jsx(
5344
+ "div",
5345
+ {
5346
+ ref,
5347
+ role: "status",
5348
+ "aria-label": "Loading",
5349
+ className: cn(className),
5350
+ style: boxStyle,
5351
+ ...rest,
5352
+ children: shouldSpin ? /* @__PURE__ */ jsxRuntime.jsx(
5353
+ framerMotion.motion.div,
5354
+ {
5355
+ style: { position: "absolute", inset: 0 },
5356
+ animate: { rotate: 360 },
5357
+ transition: {
5358
+ duration: 0.9,
5359
+ ease: "linear",
5360
+ repeat: Infinity
5361
+ },
5362
+ children: arc
5363
+ }
5364
+ ) : arc
5365
+ }
5366
+ );
5367
+ }
5368
+ );
5369
+ var SIZE_STYLES2 = {
5370
+ sm: { fontSize: 13, padding: "4px 10px", minHeight: 30 },
5371
+ md: { fontSize: 15, padding: "7px 14px", minHeight: 38 },
5372
+ lg: { fontSize: 17, padding: "10px 18px", minHeight: 46 }
5373
+ };
5374
+ var Toggle = react.forwardRef(
5375
+ function Toggle2({
5376
+ className,
5377
+ style,
5378
+ size = "md",
5379
+ roughness,
5380
+ seed,
5381
+ sketchColor,
5382
+ bowing,
5383
+ fillStyle,
5384
+ strokeWidth,
5385
+ pressed,
5386
+ defaultPressed,
5387
+ onPressedChange,
5388
+ disabled,
5389
+ animate,
5390
+ children,
5391
+ ...rest
5392
+ }, ref) {
5393
+ const rootRef = react.useRef(null);
5394
+ const [uncontrolled, setUncontrolled] = react.useState(defaultPressed === true);
5395
+ const isPressed = pressed ?? uncontrolled;
5396
+ const ink = sketchColor ?? SKETCH_COLORS.ink;
5397
+ const resolvedSeed = useResolvedSeed(seed);
5398
+ const shouldAnimate = useAnimate(animate);
5399
+ const pressSeed = deriveSeed(resolvedSeed, isPressed ? "on" : "off");
5400
+ const sketchSeed = shouldAnimate ? pressSeed : resolvedSeed;
5401
+ useDrawIn(rootRef, DRAW_IN_DURATION_MS, shouldAnimate, sketchSeed);
5402
+ return /* @__PURE__ */ jsxRuntime.jsxs(
5403
+ TogglePrimitive__namespace.Root,
5404
+ {
5405
+ ref: (node) => {
5406
+ rootRef.current = node;
5407
+ assignRef(ref, node);
5408
+ },
5409
+ pressed,
5410
+ defaultPressed,
5411
+ onPressedChange: (next) => {
5412
+ setUncontrolled(next);
5413
+ onPressedChange?.(next);
5414
+ },
5415
+ disabled,
5416
+ className: cn(className),
5417
+ style: {
5418
+ position: "relative",
5419
+ display: "inline-flex",
5420
+ alignItems: "center",
5421
+ justifyContent: "center",
5422
+ border: "none",
5423
+ background: "transparent",
5424
+ cursor: disabled ? "not-allowed" : "pointer",
5425
+ color: ink,
5426
+ fontFamily: doodleUiFontFamily,
5427
+ fontWeight: doodleUiFontWeight(600),
5428
+ opacity: disabled ? 0.45 : 1,
5429
+ outline: "none",
5430
+ ...SIZE_STYLES2[size],
5431
+ ...style
5432
+ },
5433
+ ...rest,
5434
+ children: [
5435
+ /* @__PURE__ */ jsxRuntime.jsx(
5436
+ RoughSvg,
5437
+ {
5438
+ shape: "rectangle",
5439
+ roughness,
5440
+ seed: sketchSeed,
5441
+ sketchColor: isPressed ? SKETCH_COLORS.accent : ink,
5442
+ bowing,
5443
+ fillStyle: fillStyle ?? "hachure",
5444
+ fill: isPressed ? SKETCH_COLORS.accentFill : void 0,
5445
+ strokeWidth: strokeWidth ?? 1.6
5446
+ }
5447
+ ),
5448
+ /* @__PURE__ */ jsxRuntime.jsx("span", { style: { position: "relative", zIndex: 1 }, children })
5449
+ ]
5450
+ }
5451
+ );
5452
+ }
5453
+ );
5454
+ var ToggleGroupSketchContext = react.createContext(null);
5455
+ function useToggleGroupSketch() {
5456
+ const ctx = react.useContext(ToggleGroupSketchContext);
5457
+ if (!ctx) {
5458
+ throw new Error("ToggleGroupItem must be used inside <ToggleGroup>.");
5459
+ }
5460
+ return ctx;
5461
+ }
5462
+ function ToggleGroup(props) {
5463
+ const {
5464
+ children,
5465
+ roughness,
5466
+ seed,
5467
+ sketchColor,
5468
+ bowing,
5469
+ fillStyle,
5470
+ strokeWidth,
5471
+ size = "md",
5472
+ animate,
5473
+ type = "single",
5474
+ ...rest
5475
+ } = props;
5476
+ const resolvedSeed = useResolvedSeed(seed);
5477
+ const ink = sketchColor ?? SKETCH_COLORS.ink;
5478
+ const rootStyle = { display: "inline-flex", gap: 6, flexWrap: "wrap" };
5479
+ return /* @__PURE__ */ jsxRuntime.jsx(
5480
+ ToggleGroupSketchContext.Provider,
5481
+ {
5482
+ value: {
5483
+ roughness,
5484
+ seed: resolvedSeed,
5485
+ sketchColor,
5486
+ bowing,
5487
+ fillStyle,
5488
+ strokeWidth,
5489
+ resolvedSeed,
5490
+ ink,
5491
+ animate,
5492
+ size
5493
+ },
5494
+ children: type === "multiple" ? /* @__PURE__ */ jsxRuntime.jsx(
5495
+ ToggleGroupPrimitive__namespace.Root,
5496
+ {
5497
+ type: "multiple",
5498
+ style: rootStyle,
5499
+ ...rest,
5500
+ children
5501
+ }
5502
+ ) : /* @__PURE__ */ jsxRuntime.jsx(
5503
+ ToggleGroupPrimitive__namespace.Root,
5504
+ {
5505
+ type: "single",
5506
+ style: rootStyle,
5507
+ ...rest,
5508
+ children
5509
+ }
5510
+ )
5511
+ }
5512
+ );
5513
+ }
5514
+ var ITEM_SIZE = {
5515
+ sm: { fontSize: 13, padding: "4px 10px", minHeight: 30 },
5516
+ md: { fontSize: 15, padding: "7px 14px", minHeight: 38 },
5517
+ lg: { fontSize: 17, padding: "10px 18px", minHeight: 46 }
5518
+ };
5519
+ var ToggleGroupItem = react.forwardRef(function ToggleGroupItem2({ className, style, children, value, disabled, ...rest }, ref) {
5520
+ const sketch = useToggleGroupSketch();
5521
+ const rootRef = react.useRef(null);
5522
+ const [pressed, setPressed] = react.useState(false);
5523
+ const shouldAnimate = useAnimate(sketch.animate);
5524
+ const pressSeed = deriveSeed(
5525
+ sketch.resolvedSeed,
5526
+ `${value}-${pressed ? "on" : "off"}`
5527
+ );
5528
+ const sketchSeed = shouldAnimate ? pressSeed : sketch.resolvedSeed;
5529
+ react.useLayoutEffect(() => {
5530
+ const el = rootRef.current;
5531
+ if (!el) return;
5532
+ const sync = () => setPressed(el.getAttribute("data-state") === "on");
5533
+ sync();
5534
+ const obs = new MutationObserver(sync);
5535
+ obs.observe(el, { attributes: true, attributeFilter: ["data-state"] });
5536
+ return () => obs.disconnect();
5537
+ }, [value]);
5538
+ useDrawIn(rootRef, DRAW_IN_DURATION_MS, shouldAnimate, sketchSeed);
5539
+ return /* @__PURE__ */ jsxRuntime.jsxs(
5540
+ ToggleGroupPrimitive__namespace.Item,
5541
+ {
5542
+ ref: (node) => {
5543
+ rootRef.current = node;
5544
+ assignRef(ref, node);
5545
+ },
5546
+ value,
5547
+ disabled,
5548
+ className: cn(className),
5549
+ style: {
5550
+ position: "relative",
5551
+ display: "inline-flex",
5552
+ alignItems: "center",
5553
+ justifyContent: "center",
5554
+ border: "none",
5555
+ background: "transparent",
5556
+ cursor: disabled ? "not-allowed" : "pointer",
5557
+ color: sketch.ink,
5558
+ fontFamily: doodleUiFontFamily,
5559
+ fontWeight: doodleUiFontWeight(600),
5560
+ opacity: disabled ? 0.45 : 1,
5561
+ outline: "none",
5562
+ ...ITEM_SIZE[sketch.size],
5563
+ ...style
5564
+ },
5565
+ ...rest,
5566
+ children: [
5567
+ /* @__PURE__ */ jsxRuntime.jsx(
5568
+ RoughSvg,
5569
+ {
5570
+ shape: "rectangle",
5571
+ roughness: sketch.roughness,
5572
+ seed: sketchSeed,
5573
+ sketchColor: pressed ? SKETCH_COLORS.accent : sketch.ink,
5574
+ bowing: sketch.bowing,
5575
+ fillStyle: sketch.fillStyle ?? "hachure",
5576
+ fill: pressed ? SKETCH_COLORS.accentFill : void 0,
5577
+ strokeWidth: sketch.strokeWidth ?? 1.6
5578
+ }
5579
+ ),
5580
+ /* @__PURE__ */ jsxRuntime.jsx("span", { style: { position: "relative", zIndex: 1 }, children })
5581
+ ]
5582
+ }
5583
+ );
5584
+ });
5585
+ var InputGroupSketchContext = react.createContext(null);
5586
+ function useInputGroupSketch() {
5587
+ const ctx = react.useContext(InputGroupSketchContext);
5588
+ if (!ctx) {
5589
+ throw new Error("InputGroup parts must be used inside <InputGroup>.");
5590
+ }
5591
+ return ctx;
5592
+ }
5593
+ function InputGroup({
5594
+ children,
5595
+ className,
5596
+ style,
5597
+ roughness,
5598
+ seed,
5599
+ sketchColor,
5600
+ bowing,
5601
+ fillStyle,
5602
+ strokeWidth,
5603
+ animate,
5604
+ onFocus,
5605
+ onBlur,
5606
+ ...rest
5607
+ }) {
5608
+ const resolvedSeed = useResolvedSeed(seed);
5609
+ const ink = sketchColor ?? SKETCH_COLORS.ink;
5610
+ const [focused, setFocused] = react.useState(false);
5611
+ const shouldAnimate = useAnimate(animate);
5612
+ const focusSeed = deriveSeed(resolvedSeed, "focus");
5613
+ const sketchSeed = shouldAnimate && focused ? focusSeed : resolvedSeed;
5614
+ return /* @__PURE__ */ jsxRuntime.jsx(
5615
+ InputGroupSketchContext.Provider,
5616
+ {
5617
+ value: {
5618
+ roughness,
5619
+ seed: resolvedSeed,
5620
+ sketchColor,
5621
+ bowing,
5622
+ fillStyle,
5623
+ strokeWidth,
5624
+ resolvedSeed,
5625
+ ink,
5626
+ animate,
5627
+ focused,
5628
+ setFocused
5629
+ },
5630
+ children: /* @__PURE__ */ jsxRuntime.jsx(
5631
+ "div",
5632
+ {
5633
+ className: cn(className),
5634
+ style: { position: "relative", width: "100%", ...style },
5635
+ onFocus: (event) => {
5636
+ setFocused(true);
5637
+ onFocus?.(event);
5638
+ },
5639
+ onBlur: (event) => {
5640
+ if (!event.currentTarget.contains(event.relatedTarget)) {
5641
+ setFocused(false);
5642
+ }
5643
+ onBlur?.(event);
5644
+ },
5645
+ ...rest,
5646
+ children: /* @__PURE__ */ jsxRuntime.jsx(
5647
+ SketchBox,
5648
+ {
5649
+ roughness,
5650
+ seed: sketchSeed,
5651
+ sketchColor: focused ? SKETCH_COLORS.accent : ink,
5652
+ bowing,
5653
+ fillStyle,
5654
+ strokeWidth: focused && !shouldAnimate ? (strokeWidth ?? 1.75) + 0.35 : strokeWidth,
5655
+ animate,
5656
+ drawInKey: sketchSeed,
5657
+ contentStyle: {
5658
+ display: "flex",
5659
+ alignItems: "stretch",
5660
+ minHeight: 38
5661
+ },
5662
+ children
5663
+ }
5664
+ )
5665
+ }
5666
+ )
5667
+ }
5668
+ );
5669
+ }
5670
+ var InputGroupAddon = react.forwardRef(
5671
+ function InputGroupAddon2({ className, style, align = "inline-start", children, ...rest }, ref) {
5672
+ const sketch = useInputGroupSketch();
5673
+ return /* @__PURE__ */ jsxRuntime.jsx(
5674
+ "span",
5675
+ {
5676
+ ref,
5677
+ className: cn(className),
5678
+ style: {
5679
+ display: "inline-flex",
5680
+ alignItems: "center",
5681
+ padding: align === "inline-start" ? "0 0 0 10px" : "0 10px 0 0",
5682
+ fontFamily: doodleUiFontFamily,
5683
+ fontSize: 14,
5684
+ color: sketch.ink,
5685
+ flexShrink: 0,
5686
+ ...style
5687
+ },
5688
+ ...rest,
5689
+ children
5690
+ }
5691
+ );
5692
+ }
5693
+ );
5694
+ var InputGroupInput = react.forwardRef(function InputGroupInput2({ className, style, ...rest }, ref) {
5695
+ const sketch = useInputGroupSketch();
5696
+ return /* @__PURE__ */ jsxRuntime.jsx(
5697
+ "input",
5698
+ {
5699
+ ref,
5700
+ className: cn(className),
5701
+ style: {
5702
+ flex: 1,
5703
+ minWidth: 0,
5704
+ border: "none",
5705
+ outline: "none",
5706
+ background: "transparent",
5707
+ color: sketch.ink,
5708
+ fontFamily: doodleUiFontFamily,
5709
+ fontSize: 15,
5710
+ padding: "8px 10px",
5711
+ ...style
5712
+ },
5713
+ ...rest
5714
+ }
5715
+ );
5716
+ });
5717
+ var InputGroupButton = react.forwardRef(function InputGroupButton2({ className, style, children, ...rest }, ref) {
5718
+ return /* @__PURE__ */ jsxRuntime.jsx(
5719
+ "span",
5720
+ {
5721
+ ref,
5722
+ className: cn(className),
5723
+ style: {
5724
+ display: "inline-flex",
5725
+ alignItems: "center",
5726
+ padding: "0 6px 0 0",
5727
+ ...style
5728
+ },
5729
+ ...rest,
5730
+ children
5731
+ }
5732
+ );
5733
+ });
5734
+ var InputOTPSketchContext = react.createContext(
5735
+ null
5736
+ );
5737
+ function useInputOTPSketch() {
5738
+ const ctx = react.useContext(InputOTPSketchContext);
5739
+ if (!ctx) {
5740
+ throw new Error("InputOTP parts must be used inside <InputOTP>.");
5741
+ }
5742
+ return ctx;
5743
+ }
5744
+ var InputOTP = react.forwardRef(
5745
+ function InputOTP2({
5746
+ className,
5747
+ containerClassName,
5748
+ roughness,
5749
+ seed,
5750
+ sketchColor,
5751
+ bowing,
5752
+ fillStyle,
5753
+ strokeWidth,
5754
+ animate,
5755
+ children,
5756
+ ...rest
5757
+ }, ref) {
5758
+ const resolvedSeed = useResolvedSeed(seed);
5759
+ const ink = sketchColor ?? SKETCH_COLORS.ink;
5760
+ return /* @__PURE__ */ jsxRuntime.jsx(
5761
+ InputOTPSketchContext.Provider,
5762
+ {
5763
+ value: {
5764
+ roughness,
5765
+ seed: resolvedSeed,
5766
+ sketchColor,
5767
+ bowing,
5768
+ fillStyle,
5769
+ strokeWidth,
5770
+ resolvedSeed,
5771
+ ink,
5772
+ animate
5773
+ },
5774
+ children: /* @__PURE__ */ jsxRuntime.jsx(
5775
+ inputOtp.OTPInput,
5776
+ {
5777
+ ref,
5778
+ containerClassName: cn(className, containerClassName),
5779
+ ...rest,
5780
+ children
5781
+ }
5782
+ )
5783
+ }
5784
+ );
5785
+ }
5786
+ );
5787
+ var InputOTPGroup = react.forwardRef(
5788
+ function InputOTPGroup2({ className, style, children, ...rest }, ref) {
5789
+ return /* @__PURE__ */ jsxRuntime.jsx(
5790
+ "div",
5791
+ {
5792
+ ref,
5793
+ className: cn(className),
5794
+ style: { display: "flex", alignItems: "center", gap: 8, ...style },
5795
+ ...rest,
5796
+ children
5797
+ }
5798
+ );
5799
+ }
5800
+ );
5801
+ var InputOTPSlot = react.forwardRef(
5802
+ function InputOTPSlot2({ index, className, style, ...rest }, ref) {
5803
+ const inputContext = react.useContext(inputOtp.OTPInputContext);
5804
+ const sketch = useInputOTPSketch();
5805
+ const slotRef = react.useRef(null);
5806
+ const shouldAnimate = useAnimate(sketch.animate);
5807
+ const { char, isActive, hasFakeCaret } = inputContext?.slots[index] ?? {
5808
+ char: null,
5809
+ isActive: false,
5810
+ hasFakeCaret: false
5811
+ };
5812
+ const slotSeed = deriveSeed(
5813
+ sketch.resolvedSeed,
5814
+ `slot-${index}-${isActive ? "active" : "idle"}`
5815
+ );
5816
+ useDrawIn(slotRef, DRAW_IN_DURATION_MS, shouldAnimate, slotSeed);
5817
+ if (!inputContext) {
5818
+ throw new Error("InputOTPSlot must be used inside <InputOTP>.");
5819
+ }
5820
+ return /* @__PURE__ */ jsxRuntime.jsxs(
5821
+ "div",
5822
+ {
5823
+ ref: (node) => {
5824
+ slotRef.current = node;
5825
+ assignRef(ref, node);
5826
+ },
5827
+ className: cn(className),
5828
+ style: {
5829
+ position: "relative",
5830
+ width: 40,
5831
+ height: 44,
5832
+ display: "flex",
5833
+ alignItems: "center",
5834
+ justifyContent: "center",
5835
+ fontFamily: doodleUiFontFamily,
5836
+ fontSize: 18,
5837
+ color: sketch.ink,
5838
+ ...style
5839
+ },
5840
+ ...rest,
5841
+ children: [
5842
+ /* @__PURE__ */ jsxRuntime.jsx(
5843
+ RoughSvg,
5844
+ {
5845
+ shape: "rectangle",
5846
+ roughness: sketch.roughness,
5847
+ seed: slotSeed,
5848
+ sketchColor: isActive ? SKETCH_COLORS.accent : sketch.ink,
5849
+ bowing: sketch.bowing,
5850
+ fillStyle: sketch.fillStyle,
5851
+ strokeWidth: isActive ? (sketch.strokeWidth ?? 1.75) + 0.15 : sketch.strokeWidth
5852
+ }
5853
+ ),
5854
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { style: { position: "relative", zIndex: 1 }, children: [
5855
+ char,
5856
+ hasFakeCaret ? /* @__PURE__ */ jsxRuntime.jsx(
5857
+ framerMotion.motion.span,
5858
+ {
5859
+ "aria-hidden": true,
5860
+ style: {
5861
+ display: "inline-block",
5862
+ width: 2,
5863
+ height: "0.85em",
5864
+ marginLeft: 2,
5865
+ background: sketch.ink,
5866
+ verticalAlign: "middle"
5867
+ },
5868
+ animate: shouldAnimate ? { opacity: [1, 0, 1] } : { opacity: 1 },
5869
+ transition: shouldAnimate ? { duration: 1, repeat: Infinity, ease: "linear" } : void 0
5870
+ }
5871
+ ) : null
5872
+ ] })
5873
+ ]
5874
+ }
5875
+ );
5876
+ }
5877
+ );
5878
+ var InputOTPSeparator = react.forwardRef(function InputOTPSeparator2({ children = "\u2013", className, style, ...rest }, ref) {
5879
+ const sketch = useInputOTPSketch();
5880
+ return /* @__PURE__ */ jsxRuntime.jsx(
5881
+ "span",
5882
+ {
5883
+ ref,
5884
+ role: "separator",
5885
+ className: cn(className),
5886
+ style: {
5887
+ fontFamily: doodleUiFontFamily,
5888
+ color: sketch.ink,
5889
+ opacity: 0.5,
5890
+ userSelect: "none",
5891
+ ...style
5892
+ },
5893
+ ...rest,
5894
+ children
5895
+ }
5896
+ );
5897
+ });
5898
+ var ScrollAreaSketchContext = react.createContext(null);
5899
+ function useScrollAreaSketch() {
5900
+ const ctx = react.useContext(ScrollAreaSketchContext);
5901
+ if (!ctx) {
5902
+ throw new Error("ScrollArea parts must be used inside <ScrollArea>.");
5903
+ }
5904
+ return ctx;
5905
+ }
5906
+ var ScrollArea = react.forwardRef(function ScrollArea2({
5907
+ className,
5908
+ style,
5909
+ children,
5910
+ roughness,
5911
+ seed,
5912
+ sketchColor,
5913
+ bowing,
5914
+ fillStyle,
5915
+ strokeWidth,
5916
+ animate,
5917
+ ...rest
5918
+ }, ref) {
5919
+ const resolvedSeed = useResolvedSeed(seed);
5920
+ const ink = sketchColor ?? SKETCH_COLORS.ink;
5921
+ return /* @__PURE__ */ jsxRuntime.jsx(
5922
+ ScrollAreaSketchContext.Provider,
5923
+ {
5924
+ value: {
5925
+ roughness,
5926
+ seed: resolvedSeed,
5927
+ sketchColor,
5928
+ bowing,
5929
+ fillStyle,
5930
+ strokeWidth,
5931
+ resolvedSeed,
5932
+ ink,
5933
+ animate
5934
+ },
5935
+ children: /* @__PURE__ */ jsxRuntime.jsx(
5936
+ ScrollAreaPrimitive__namespace.Root,
5937
+ {
5938
+ ref,
5939
+ className: cn(className),
5940
+ style: { position: "relative", overflow: "hidden", ...style },
5941
+ ...rest,
5942
+ children: /* @__PURE__ */ jsxRuntime.jsx(
5943
+ SketchBox,
5944
+ {
5945
+ roughness,
5946
+ seed: resolvedSeed,
5947
+ sketchColor: ink,
5948
+ bowing,
5949
+ fillStyle: fillStyle ?? "solid",
5950
+ fill: "#f7f6f2",
5951
+ strokeWidth: strokeWidth ?? 1.5,
5952
+ animate,
5953
+ contentStyle: { padding: 0, height: "100%" },
5954
+ style: { height: "100%" },
5955
+ children
5956
+ }
5957
+ )
5958
+ }
5959
+ )
5960
+ }
5961
+ );
5962
+ });
5963
+ var ScrollAreaViewport = react.forwardRef(function ScrollAreaViewport2({ className, style, children, ...rest }, ref) {
5964
+ return /* @__PURE__ */ jsxRuntime.jsx(
5965
+ ScrollAreaPrimitive__namespace.Viewport,
5966
+ {
5967
+ ref,
5968
+ className: cn(className),
5969
+ style: {
5970
+ width: "100%",
5971
+ height: "100%",
5972
+ borderRadius: 0,
5973
+ ...style
5974
+ },
5975
+ ...rest,
5976
+ children
5977
+ }
5978
+ );
5979
+ });
5980
+ var ScrollBar = react.forwardRef(
5981
+ function ScrollBar2({ className, style, orientation = "vertical", ...rest }, ref) {
5982
+ const sketch = useScrollAreaSketch();
5983
+ return /* @__PURE__ */ jsxRuntime.jsx(
5984
+ ScrollAreaPrimitive__namespace.ScrollAreaScrollbar,
5985
+ {
5986
+ ref,
5987
+ orientation,
5988
+ className: cn(className),
5989
+ style: {
5990
+ display: "flex",
5991
+ touchAction: "none",
5992
+ userSelect: "none",
5993
+ padding: 2,
5994
+ ...orientation === "vertical" ? { width: 12, flexDirection: "column" } : { height: 12, flexDirection: "row" },
5995
+ ...style
5996
+ },
5997
+ ...rest,
5998
+ children: /* @__PURE__ */ jsxRuntime.jsx(ScrollAreaPrimitive__namespace.ScrollAreaThumb, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx("div", { style: { position: "relative", flex: 1 }, children: /* @__PURE__ */ jsxRuntime.jsx(
5999
+ RoughSvg,
6000
+ {
6001
+ shape: orientation === "vertical" ? "line-vertical" : "line",
6002
+ roughness: (sketch.roughness ?? 1.5) + 0.3,
6003
+ seed: sketch.resolvedSeed,
6004
+ sketchColor: sketch.ink,
6005
+ bowing: sketch.bowing,
6006
+ strokeWidth: sketch.strokeWidth ?? 2.2,
6007
+ inset: 1
6008
+ }
6009
+ ) }) })
6010
+ }
6011
+ );
6012
+ }
6013
+ );
6014
+ var ScrollAreaCorner = ScrollAreaPrimitive__namespace.Corner;
6015
+ function ResizablePanelGroup({
6016
+ className,
6017
+ style,
6018
+ ...rest
6019
+ }) {
6020
+ return /* @__PURE__ */ jsxRuntime.jsx(
6021
+ ResizablePrimitive__namespace.PanelGroup,
6022
+ {
6023
+ className: cn(className),
6024
+ style: { display: "flex", width: "100%", height: "100%", ...style },
6025
+ ...rest
6026
+ }
6027
+ );
6028
+ }
6029
+ var ResizablePanel = ResizablePrimitive__namespace.Panel;
6030
+ function ResizableHandle({
6031
+ className,
6032
+ style,
6033
+ withHandle = true,
6034
+ roughness,
6035
+ seed,
6036
+ sketchColor,
6037
+ bowing,
6038
+ strokeWidth,
6039
+ ...rest
6040
+ }) {
6041
+ const resolvedSeed = useResolvedSeed(seed);
6042
+ const ink = sketchColor ?? SKETCH_COLORS.ink;
6043
+ const handleSeed = deriveSeed(resolvedSeed, "handle");
6044
+ const base = {
6045
+ position: "relative",
6046
+ flexShrink: 0,
6047
+ display: "flex",
6048
+ alignItems: "center",
6049
+ justifyContent: "center",
6050
+ background: "transparent",
6051
+ touchAction: "none",
6052
+ ...style
6053
+ };
6054
+ return /* @__PURE__ */ jsxRuntime.jsx(
6055
+ ResizablePrimitive__namespace.PanelResizeHandle,
6056
+ {
6057
+ className: cn(className),
6058
+ style: base,
6059
+ ...rest,
6060
+ children: withHandle ? /* @__PURE__ */ jsxRuntime.jsxs(
6061
+ "div",
6062
+ {
6063
+ style: {
6064
+ position: "relative",
6065
+ width: 14,
6066
+ height: 28,
6067
+ zIndex: 1
6068
+ },
6069
+ children: [
6070
+ /* @__PURE__ */ jsxRuntime.jsx(
6071
+ RoughSvg,
6072
+ {
6073
+ shape: "line-vertical",
6074
+ roughness: roughness ?? 1.8,
6075
+ seed: handleSeed,
6076
+ sketchColor: ink,
6077
+ bowing: bowing ?? 1.5,
6078
+ strokeWidth: strokeWidth ?? 2.4,
6079
+ width: 14,
6080
+ height: 28,
6081
+ inset: 2
6082
+ }
6083
+ ),
6084
+ /* @__PURE__ */ jsxRuntime.jsx(
6085
+ RoughSvg,
6086
+ {
6087
+ shape: "ellipse",
6088
+ roughness: (roughness ?? 1.5) + 0.2,
6089
+ seed: deriveSeed(handleSeed, "dot-a"),
6090
+ sketchColor: ink,
6091
+ width: 14,
6092
+ height: 28,
6093
+ strokeWidth: 1.2,
6094
+ inset: 5,
6095
+ style: { opacity: 0.55 }
6096
+ }
6097
+ )
6098
+ ]
6099
+ }
6100
+ ) : null
6101
+ }
6102
+ );
6103
+ }
6104
+ var HoverCardSketchContext = react.createContext(
6105
+ null
6106
+ );
6107
+ function useHoverCardSketch() {
6108
+ const ctx = react.useContext(HoverCardSketchContext);
6109
+ if (!ctx) {
6110
+ throw new Error("HoverCard parts must be used inside <HoverCard>.");
6111
+ }
6112
+ return ctx;
6113
+ }
6114
+ function HoverCard({
6115
+ children,
6116
+ roughness,
6117
+ seed,
6118
+ sketchColor,
6119
+ bowing,
6120
+ fillStyle,
6121
+ strokeWidth,
6122
+ animate,
6123
+ ...rest
6124
+ }) {
6125
+ const resolvedSeed = useResolvedSeed(seed);
6126
+ const ink = sketchColor ?? SKETCH_COLORS.ink;
6127
+ return /* @__PURE__ */ jsxRuntime.jsx(
6128
+ HoverCardSketchContext.Provider,
6129
+ {
6130
+ value: {
6131
+ roughness,
6132
+ seed: resolvedSeed,
6133
+ sketchColor,
6134
+ bowing,
6135
+ fillStyle,
6136
+ strokeWidth,
6137
+ resolvedSeed,
6138
+ ink,
6139
+ animate
6140
+ },
6141
+ children: /* @__PURE__ */ jsxRuntime.jsx(HoverCardPrimitive__namespace.Root, { ...rest, children })
6142
+ }
6143
+ );
6144
+ }
6145
+ var HoverCardTrigger = HoverCardPrimitive__namespace.Trigger;
6146
+ var HoverCardContent = react.forwardRef(function HoverCardContent2({ className, style, children, sideOffset = 6, align = "center", ...rest }, ref) {
6147
+ const sketch = useHoverCardSketch();
6148
+ return /* @__PURE__ */ jsxRuntime.jsx(HoverCardPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
6149
+ HoverCardPrimitive__namespace.Content,
6150
+ {
6151
+ ref,
6152
+ sideOffset,
6153
+ align,
6154
+ className: cn(className),
6155
+ style: { zIndex: 75, outline: "none", ...style },
6156
+ ...rest,
6157
+ children: /* @__PURE__ */ jsxRuntime.jsx(
6158
+ SketchBox,
6159
+ {
6160
+ roughness: sketch.roughness,
6161
+ seed: sketch.resolvedSeed,
6162
+ sketchColor: sketch.ink,
6163
+ bowing: sketch.bowing,
6164
+ fillStyle: sketch.fillStyle ?? "solid",
6165
+ fill: "#f7f6f2",
6166
+ strokeWidth: sketch.strokeWidth ?? 1.5,
6167
+ shadow: true,
6168
+ animate: sketch.animate,
6169
+ contentStyle: { padding: 14, maxWidth: 320, fontSize: 14 },
6170
+ children
6171
+ }
6172
+ )
6173
+ }
6174
+ ) });
6175
+ });
6176
+ var HoverCardArrow = HoverCardPrimitive__namespace.Arrow;
6177
+ var ContextMenuSketchContext = react.createContext(null);
6178
+ function useContextMenuSketch() {
6179
+ const ctx = react.useContext(ContextMenuSketchContext);
6180
+ if (!ctx) {
6181
+ throw new Error(
6182
+ "ContextMenu parts must be used inside <ContextMenu>."
6183
+ );
6184
+ }
6185
+ return ctx;
6186
+ }
6187
+ function ContextMenu({
6188
+ children,
6189
+ roughness,
6190
+ seed,
6191
+ sketchColor,
6192
+ bowing,
6193
+ fillStyle,
6194
+ strokeWidth,
6195
+ animate,
6196
+ ...rest
6197
+ }) {
6198
+ const resolvedSeed = useResolvedSeed(seed);
6199
+ const ink = sketchColor ?? SKETCH_COLORS.ink;
6200
+ return /* @__PURE__ */ jsxRuntime.jsx(
6201
+ ContextMenuSketchContext.Provider,
6202
+ {
6203
+ value: {
6204
+ roughness,
6205
+ seed: resolvedSeed,
6206
+ sketchColor,
6207
+ bowing,
6208
+ fillStyle,
6209
+ strokeWidth,
6210
+ resolvedSeed,
6211
+ ink,
6212
+ animate
6213
+ },
6214
+ children: /* @__PURE__ */ jsxRuntime.jsx(ContextMenuPrimitive__namespace.Root, { ...rest, children })
6215
+ }
6216
+ );
6217
+ }
6218
+ var ContextMenuTrigger = ContextMenuPrimitive__namespace.Trigger;
6219
+ var ContextMenuGroup = ContextMenuPrimitive__namespace.Group;
6220
+ var ContextMenuRadioGroup = ContextMenuPrimitive__namespace.RadioGroup;
6221
+ var ContextMenuSub = ContextMenuPrimitive__namespace.Sub;
6222
+ var ContextMenuContent = react.forwardRef(function ContextMenuContent2({ className, style, children, ...rest }, ref) {
6223
+ const sketch = useContextMenuSketch();
6224
+ return /* @__PURE__ */ jsxRuntime.jsx(ContextMenuPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
6225
+ ContextMenuPrimitive__namespace.Content,
6226
+ {
6227
+ ref,
6228
+ className: cn(className),
6229
+ style: { zIndex: 80, outline: "none", minWidth: 180, ...style },
6230
+ ...rest,
6231
+ children: /* @__PURE__ */ jsxRuntime.jsx(
6232
+ SketchBox,
6233
+ {
6234
+ roughness: sketch.roughness,
6235
+ seed: sketch.resolvedSeed,
6236
+ sketchColor: sketch.ink,
6237
+ bowing: sketch.bowing,
6238
+ fillStyle: sketch.fillStyle ?? "solid",
6239
+ fill: "#f7f6f2",
6240
+ strokeWidth: sketch.strokeWidth ?? 1.5,
6241
+ shadow: true,
6242
+ animate: sketch.animate,
6243
+ contentStyle: { padding: "6px 4px" },
6244
+ children
6245
+ }
6246
+ )
6247
+ }
6248
+ ) });
6249
+ });
6250
+ function useMark2(highlighted) {
6251
+ const sketch = useContextMenuSketch();
6252
+ return { sketch, mark: highlighted };
6253
+ }
6254
+ var ContextMenuItem = react.forwardRef(function ContextMenuItem2({ className, style, children, inset, ...rest }, ref) {
6255
+ const [highlighted, setHighlighted] = react.useState(false);
6256
+ const { sketch, mark } = useMark2(highlighted);
6257
+ return /* @__PURE__ */ jsxRuntime.jsxs(
6258
+ ContextMenuPrimitive__namespace.Item,
6259
+ {
6260
+ ref,
6261
+ className: cn(className),
6262
+ onPointerMove: () => setHighlighted(true),
6263
+ onPointerLeave: () => setHighlighted(false),
6264
+ onFocus: () => setHighlighted(true),
6265
+ onBlur: () => setHighlighted(false),
6266
+ style: {
6267
+ position: "relative",
6268
+ display: "flex",
6269
+ alignItems: "center",
6270
+ gap: 8,
6271
+ padding: inset ? "7px 12px 7px 26px" : "7px 12px",
6272
+ fontFamily: doodleUiFontFamily,
6273
+ fontSize: 14,
6274
+ color: sketch.ink,
6275
+ outline: "none",
6276
+ cursor: "pointer",
6277
+ userSelect: "none",
6278
+ ...style
6279
+ },
6280
+ ...rest,
6281
+ children: [
6282
+ mark ? /* @__PURE__ */ jsxRuntime.jsx(
6283
+ RoughSvg,
6284
+ {
6285
+ shape: "line",
6286
+ roughness: (sketch.roughness ?? 1.5) + 0.4,
6287
+ seed: sketch.resolvedSeed,
6288
+ sketchColor: sketch.ink,
6289
+ bowing: sketch.bowing ?? 1.6,
6290
+ strokeWidth: 1.3,
6291
+ inset: 4,
6292
+ style: { opacity: 0.4 }
6293
+ }
6294
+ ) : null,
6295
+ /* @__PURE__ */ jsxRuntime.jsx("span", { style: { position: "relative", zIndex: 1 }, children })
6296
+ ]
6297
+ }
6298
+ );
6299
+ });
6300
+ var CHECK_PATH3 = "M 2 6 L 5 9 L 10 3";
6301
+ var ContextMenuCheckboxItem = react.forwardRef(function ContextMenuCheckboxItem2({ className, style, children, checked, ...rest }, ref) {
6302
+ const [highlighted, setHighlighted] = react.useState(false);
6303
+ const { sketch, mark } = useMark2(highlighted);
6304
+ return /* @__PURE__ */ jsxRuntime.jsxs(
6305
+ ContextMenuPrimitive__namespace.CheckboxItem,
6306
+ {
6307
+ ref,
6308
+ checked,
6309
+ className: cn(className),
6310
+ onPointerMove: () => setHighlighted(true),
6311
+ onPointerLeave: () => setHighlighted(false),
6312
+ style: {
6313
+ position: "relative",
6314
+ display: "flex",
6315
+ alignItems: "center",
6316
+ gap: 8,
6317
+ padding: "7px 12px 7px 26px",
6318
+ fontFamily: doodleUiFontFamily,
6319
+ fontSize: 14,
6320
+ color: sketch.ink,
6321
+ outline: "none",
6322
+ cursor: "pointer",
6323
+ userSelect: "none",
6324
+ ...style
6325
+ },
6326
+ ...rest,
6327
+ children: [
6328
+ mark ? /* @__PURE__ */ jsxRuntime.jsx(
6329
+ RoughSvg,
6330
+ {
6331
+ shape: "line",
6332
+ roughness: (sketch.roughness ?? 1.5) + 0.4,
6333
+ seed: sketch.resolvedSeed,
6334
+ sketchColor: sketch.ink,
6335
+ bowing: sketch.bowing ?? 1.6,
6336
+ strokeWidth: 1.3,
6337
+ inset: 4,
6338
+ style: { opacity: 0.4 }
6339
+ }
6340
+ ) : null,
6341
+ /* @__PURE__ */ jsxRuntime.jsx(
6342
+ "span",
6343
+ {
6344
+ style: {
6345
+ position: "relative",
6346
+ width: 12,
6347
+ height: 12,
6348
+ flexShrink: 0,
6349
+ marginLeft: -18
6350
+ },
6351
+ children: /* @__PURE__ */ jsxRuntime.jsx(ContextMenuPrimitive__namespace.ItemIndicator, { children: /* @__PURE__ */ jsxRuntime.jsx(
6352
+ RoughSvg,
6353
+ {
6354
+ shape: "path",
6355
+ path: CHECK_PATH3,
6356
+ roughness: (sketch.roughness ?? 1.5) * 0.7,
6357
+ seed: deriveSeed(sketch.resolvedSeed, "checkbox-mark"),
6358
+ sketchColor: SKETCH_COLORS.accent,
6359
+ bowing: sketch.bowing,
6360
+ strokeWidth: 1.6,
6361
+ inset: 0
6362
+ }
6363
+ ) })
6364
+ }
6365
+ ),
6366
+ /* @__PURE__ */ jsxRuntime.jsx("span", { style: { position: "relative", zIndex: 1 }, children })
6367
+ ]
6368
+ }
6369
+ );
6370
+ });
6371
+ var ContextMenuRadioItem = react.forwardRef(function ContextMenuRadioItem2({ className, style, children, ...rest }, ref) {
6372
+ const [highlighted, setHighlighted] = react.useState(false);
6373
+ const { sketch, mark } = useMark2(highlighted);
6374
+ return /* @__PURE__ */ jsxRuntime.jsxs(
6375
+ ContextMenuPrimitive__namespace.RadioItem,
6376
+ {
6377
+ ref,
6378
+ className: cn(className),
6379
+ onPointerMove: () => setHighlighted(true),
6380
+ onPointerLeave: () => setHighlighted(false),
6381
+ style: {
6382
+ position: "relative",
6383
+ display: "flex",
6384
+ alignItems: "center",
6385
+ gap: 8,
6386
+ padding: "7px 12px 7px 26px",
6387
+ fontFamily: doodleUiFontFamily,
6388
+ fontSize: 14,
6389
+ color: sketch.ink,
6390
+ outline: "none",
6391
+ cursor: "pointer",
6392
+ userSelect: "none",
6393
+ ...style
6394
+ },
6395
+ ...rest,
6396
+ children: [
6397
+ mark ? /* @__PURE__ */ jsxRuntime.jsx(
6398
+ RoughSvg,
6399
+ {
6400
+ shape: "line",
6401
+ roughness: (sketch.roughness ?? 1.5) + 0.4,
6402
+ seed: sketch.resolvedSeed,
6403
+ sketchColor: sketch.ink,
6404
+ bowing: sketch.bowing ?? 1.6,
6405
+ strokeWidth: 1.3,
6406
+ inset: 4,
6407
+ style: { opacity: 0.4 }
6408
+ }
6409
+ ) : null,
6410
+ /* @__PURE__ */ jsxRuntime.jsx(
6411
+ "span",
6412
+ {
6413
+ style: {
6414
+ position: "relative",
6415
+ width: 8,
6416
+ height: 8,
6417
+ flexShrink: 0,
6418
+ marginLeft: -18
6419
+ },
6420
+ children: /* @__PURE__ */ jsxRuntime.jsx(ContextMenuPrimitive__namespace.ItemIndicator, { children: /* @__PURE__ */ jsxRuntime.jsx(
6421
+ RoughSvg,
6422
+ {
6423
+ shape: "ellipse",
6424
+ roughness: (sketch.roughness ?? 1.5) * 0.8,
6425
+ seed: deriveSeed(sketch.resolvedSeed, "radio-mark"),
6426
+ sketchColor: SKETCH_COLORS.accent,
6427
+ bowing: sketch.bowing,
6428
+ fillStyle: "solid",
6429
+ fill: SKETCH_COLORS.accent,
6430
+ strokeWidth: 1.2,
6431
+ inset: 0
6432
+ }
6433
+ ) })
6434
+ }
6435
+ ),
6436
+ /* @__PURE__ */ jsxRuntime.jsx("span", { style: { position: "relative", zIndex: 1 }, children })
6437
+ ]
6438
+ }
6439
+ );
6440
+ });
6441
+ var ContextMenuLabel = react.forwardRef(function ContextMenuLabel2({ className, style, children, ...rest }, ref) {
6442
+ const sketch = useContextMenuSketch();
6443
+ return /* @__PURE__ */ jsxRuntime.jsx(
6444
+ ContextMenuPrimitive__namespace.Label,
6445
+ {
6446
+ ref,
6447
+ className: cn(className),
6448
+ style: {
6449
+ padding: "6px 12px",
6450
+ fontFamily: doodleUiFontFamily,
6451
+ fontSize: 12,
6452
+ fontWeight: 700,
6453
+ color: sketch.ink,
6454
+ opacity: 0.6,
6455
+ textTransform: "uppercase",
6456
+ letterSpacing: 0.4,
6457
+ ...style
6458
+ },
6459
+ ...rest,
6460
+ children
6461
+ }
6462
+ );
6463
+ });
6464
+ var ContextMenuSeparator = react.forwardRef(function ContextMenuSeparator2({ className, style, ...rest }, ref) {
6465
+ const sketch = useContextMenuSketch();
6466
+ return /* @__PURE__ */ jsxRuntime.jsx(
6467
+ ContextMenuPrimitive__namespace.Separator,
6468
+ {
6469
+ ref,
6470
+ className: cn(className),
6471
+ style: { position: "relative", height: 10, margin: "2px 0", ...style },
6472
+ ...rest,
6473
+ children: /* @__PURE__ */ jsxRuntime.jsx(
6474
+ RoughSvg,
6475
+ {
6476
+ shape: "line",
6477
+ roughness: (sketch.roughness ?? 1.5) + 0.2,
6478
+ seed: deriveSeed(sketch.resolvedSeed, "separator"),
6479
+ sketchColor: sketch.ink,
6480
+ bowing: sketch.bowing ?? 1.8,
6481
+ strokeWidth: 1.2,
6482
+ inset: 6,
6483
+ style: { opacity: 0.5 }
6484
+ }
6485
+ )
6486
+ }
6487
+ );
6488
+ });
6489
+ var NavigationMenuSketchContext = react.createContext(null);
6490
+ function useNavigationMenuSketch() {
6491
+ const ctx = react.useContext(NavigationMenuSketchContext);
6492
+ if (!ctx) {
6493
+ throw new Error("NavigationMenu parts must be used inside <NavigationMenu>.");
6494
+ }
6495
+ return ctx;
6496
+ }
6497
+ function NavigationMenu({
6498
+ children,
6499
+ roughness,
6500
+ seed,
6501
+ sketchColor,
6502
+ bowing,
6503
+ fillStyle,
6504
+ strokeWidth,
6505
+ animate,
6506
+ ...rest
6507
+ }) {
6508
+ const resolvedSeed = useResolvedSeed(seed);
6509
+ const ink = sketchColor ?? SKETCH_COLORS.ink;
6510
+ return /* @__PURE__ */ jsxRuntime.jsx(
6511
+ NavigationMenuSketchContext.Provider,
6512
+ {
6513
+ value: {
6514
+ roughness,
6515
+ seed: resolvedSeed,
6516
+ sketchColor,
6517
+ bowing,
6518
+ fillStyle,
6519
+ strokeWidth,
6520
+ resolvedSeed,
6521
+ ink,
6522
+ animate
6523
+ },
6524
+ children: /* @__PURE__ */ jsxRuntime.jsxs(NavigationMenuPrimitive__namespace.Root, { ...rest, children: [
6525
+ children,
6526
+ /* @__PURE__ */ jsxRuntime.jsx(NavigationMenuViewport, {})
6527
+ ] })
6528
+ }
6529
+ );
6530
+ }
6531
+ var NavigationMenuList = react.forwardRef(function NavigationMenuList2({ className, style, ...rest }, ref) {
6532
+ return /* @__PURE__ */ jsxRuntime.jsx(
6533
+ NavigationMenuPrimitive__namespace.List,
6534
+ {
6535
+ ref,
6536
+ className: cn(className),
6537
+ style: {
6538
+ display: "flex",
6539
+ alignItems: "center",
6540
+ gap: 4,
6541
+ listStyle: "none",
6542
+ margin: 0,
6543
+ padding: 0,
6544
+ ...style
6545
+ },
6546
+ ...rest
6547
+ }
6548
+ );
6549
+ });
6550
+ var NavigationMenuItem = NavigationMenuPrimitive__namespace.Item;
6551
+ var NavigationMenuTrigger = react.forwardRef(function NavigationMenuTrigger2({ className, style, children, ...rest }, ref) {
6552
+ const sketch = useNavigationMenuSketch();
6553
+ return /* @__PURE__ */ jsxRuntime.jsx(
6554
+ NavigationMenuPrimitive__namespace.Trigger,
6555
+ {
6556
+ ref,
6557
+ className: cn(className),
6558
+ style: {
6559
+ position: "relative",
6560
+ border: "none",
6561
+ background: "transparent",
6562
+ fontFamily: doodleUiFontFamily,
6563
+ fontWeight: doodleUiFontWeight(600),
6564
+ fontSize: 14,
6565
+ color: sketch.ink,
6566
+ padding: "8px 12px",
6567
+ cursor: "pointer",
6568
+ outline: "none",
6569
+ ...style
6570
+ },
6571
+ ...rest,
6572
+ children
6573
+ }
6574
+ );
6575
+ });
6576
+ var NavigationMenuContent = react.forwardRef(function NavigationMenuContent2({ className, style, children, ...rest }, ref) {
6577
+ const sketch = useNavigationMenuSketch();
6578
+ return /* @__PURE__ */ jsxRuntime.jsx(
6579
+ NavigationMenuPrimitive__namespace.Content,
6580
+ {
6581
+ ref,
6582
+ className: cn(className),
6583
+ style: { outline: "none", ...style },
6584
+ ...rest,
6585
+ children: /* @__PURE__ */ jsxRuntime.jsx(
6586
+ SketchBox,
6587
+ {
6588
+ roughness: sketch.roughness,
6589
+ seed: sketch.resolvedSeed,
6590
+ sketchColor: sketch.ink,
6591
+ bowing: sketch.bowing,
6592
+ fillStyle: sketch.fillStyle ?? "solid",
6593
+ fill: "#f7f6f2",
6594
+ strokeWidth: sketch.strokeWidth ?? 1.5,
6595
+ shadow: true,
6596
+ animate: sketch.animate,
6597
+ contentStyle: { padding: 12, minWidth: 200 },
6598
+ children
6599
+ }
6600
+ )
6601
+ }
6602
+ );
6603
+ });
6604
+ var NavigationMenuLink = NavigationMenuPrimitive__namespace.Link;
6605
+ var NavigationMenuViewport = react.forwardRef(function NavigationMenuViewport2({ className, style, ...rest }, ref) {
6606
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { style: { position: "absolute", top: "100%", left: 0, perspective: 2e3 }, children: /* @__PURE__ */ jsxRuntime.jsx(
6607
+ NavigationMenuPrimitive__namespace.Viewport,
6608
+ {
6609
+ ref,
6610
+ className: cn(className),
6611
+ style: {
6612
+ position: "relative",
6613
+ marginTop: 6,
6614
+ overflow: "hidden",
6615
+ ...style
6616
+ },
6617
+ ...rest
6618
+ }
6619
+ ) });
6620
+ });
6621
+ var NavigationMenuIndicator = react.forwardRef(function NavigationMenuIndicator2({ className, style, ...rest }, ref) {
6622
+ const sketch = useNavigationMenuSketch();
6623
+ return /* @__PURE__ */ jsxRuntime.jsx(
6624
+ NavigationMenuPrimitive__namespace.Indicator,
6625
+ {
6626
+ ref,
6627
+ className: cn(className),
6628
+ style: { position: "relative", height: 6, ...style },
6629
+ ...rest,
6630
+ children: /* @__PURE__ */ jsxRuntime.jsx(
6631
+ RoughSvg,
6632
+ {
6633
+ shape: "line",
6634
+ roughness: (sketch.roughness ?? 1.5) + 0.2,
6635
+ seed: deriveSeed(sketch.resolvedSeed, "nav-indicator"),
6636
+ sketchColor: sketch.ink,
6637
+ strokeWidth: 2,
6638
+ inset: 2
6639
+ }
6640
+ )
6641
+ }
6642
+ );
6643
+ });
6644
+ var NavigationMenuItemLink = react.forwardRef(function NavigationMenuItemLink2({ className, style, active, children, ...rest }, ref) {
6645
+ const sketch = useNavigationMenuSketch();
6646
+ const [hovered, setHovered] = react.useState(false);
6647
+ const showMark = active || hovered;
6648
+ return /* @__PURE__ */ jsxRuntime.jsxs(
6649
+ NavigationMenuPrimitive__namespace.Link,
6650
+ {
6651
+ ref,
6652
+ className: cn(className),
6653
+ onPointerEnter: () => setHovered(true),
6654
+ onPointerLeave: () => setHovered(false),
6655
+ style: {
6656
+ position: "relative",
6657
+ display: "inline-flex",
6658
+ padding: "8px 12px",
6659
+ fontFamily: doodleUiFontFamily,
6660
+ fontSize: 14,
6661
+ color: sketch.ink,
6662
+ textDecoration: "none",
6663
+ outline: "none",
6664
+ ...style
6665
+ },
6666
+ ...rest,
6667
+ children: [
6668
+ showMark ? /* @__PURE__ */ jsxRuntime.jsx(
6669
+ RoughSvg,
6670
+ {
6671
+ shape: "line",
6672
+ roughness: (sketch.roughness ?? 1.5) + 0.3,
6673
+ seed: deriveSeed(sketch.resolvedSeed, "nav-link"),
6674
+ sketchColor: sketch.ink,
6675
+ strokeWidth: 1.4,
6676
+ inset: 4,
6677
+ style: { opacity: 0.35 }
6678
+ }
6679
+ ) : null,
6680
+ /* @__PURE__ */ jsxRuntime.jsx("span", { style: { position: "relative", zIndex: 1 }, children })
6681
+ ]
6682
+ }
6683
+ );
6684
+ });
6685
+ var MenubarSketchContext = react.createContext(
6686
+ null
6687
+ );
6688
+ function useMenubarSketch() {
6689
+ const ctx = react.useContext(MenubarSketchContext);
6690
+ if (!ctx) {
6691
+ throw new Error("Menubar parts must be used inside <Menubar>.");
6692
+ }
6693
+ return ctx;
6694
+ }
6695
+ function Menubar({
6696
+ children,
6697
+ className,
6698
+ style,
6699
+ roughness,
6700
+ seed,
6701
+ sketchColor,
6702
+ bowing,
6703
+ fillStyle,
6704
+ strokeWidth,
6705
+ animate,
6706
+ ...rest
6707
+ }) {
6708
+ const resolvedSeed = useResolvedSeed(seed);
6709
+ const ink = sketchColor ?? SKETCH_COLORS.ink;
6710
+ return /* @__PURE__ */ jsxRuntime.jsx(
6711
+ MenubarSketchContext.Provider,
6712
+ {
6713
+ value: {
6714
+ roughness,
6715
+ seed: resolvedSeed,
6716
+ sketchColor,
6717
+ bowing,
6718
+ fillStyle,
6719
+ strokeWidth,
6720
+ resolvedSeed,
6721
+ ink,
6722
+ animate
6723
+ },
6724
+ children: /* @__PURE__ */ jsxRuntime.jsx(
6725
+ MenubarPrimitive__namespace.Root,
6726
+ {
6727
+ className: cn(className),
6728
+ style: {
6729
+ display: "inline-flex",
6730
+ alignItems: "center",
6731
+ gap: 4,
6732
+ padding: 4,
6733
+ ...style
6734
+ },
6735
+ ...rest,
6736
+ children
6737
+ }
6738
+ )
6739
+ }
6740
+ );
6741
+ }
6742
+ var MenubarMenu = MenubarPrimitive__namespace.Menu;
6743
+ var MenubarTrigger = react.forwardRef(function MenubarTrigger2({ className, style, children, ...rest }, ref) {
6744
+ const sketch = useMenubarSketch();
6745
+ return /* @__PURE__ */ jsxRuntime.jsx(
6746
+ MenubarPrimitive__namespace.Trigger,
6747
+ {
6748
+ ref,
6749
+ className: cn(className),
6750
+ style: {
6751
+ border: "none",
6752
+ background: "transparent",
6753
+ fontFamily: doodleUiFontFamily,
6754
+ fontSize: 14,
6755
+ padding: "6px 10px",
6756
+ cursor: "pointer",
6757
+ color: sketch.ink,
6758
+ outline: "none",
6759
+ ...style
6760
+ },
6761
+ ...rest,
6762
+ children
6763
+ }
6764
+ );
6765
+ });
6766
+ var MenubarContent = react.forwardRef(function MenubarContent2({ className, style, children, align = "start", sideOffset = 6, ...rest }, ref) {
6767
+ const sketch = useMenubarSketch();
6768
+ return /* @__PURE__ */ jsxRuntime.jsx(MenubarPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
6769
+ MenubarPrimitive__namespace.Content,
6770
+ {
6771
+ ref,
6772
+ align,
6773
+ sideOffset,
6774
+ className: cn(className),
6775
+ style: { zIndex: 80, outline: "none", minWidth: 180, ...style },
6776
+ ...rest,
6777
+ children: /* @__PURE__ */ jsxRuntime.jsx(
6778
+ SketchBox,
6779
+ {
6780
+ roughness: sketch.roughness,
6781
+ seed: sketch.resolvedSeed,
6782
+ sketchColor: sketch.ink,
6783
+ bowing: sketch.bowing,
6784
+ fillStyle: sketch.fillStyle ?? "solid",
6785
+ fill: "#f7f6f2",
6786
+ strokeWidth: sketch.strokeWidth ?? 1.5,
6787
+ shadow: true,
6788
+ animate: sketch.animate,
6789
+ contentStyle: { padding: "6px 4px" },
6790
+ children
6791
+ }
6792
+ )
6793
+ }
6794
+ ) });
6795
+ });
6796
+ function useMark3(highlighted) {
6797
+ const sketch = useMenubarSketch();
6798
+ return { sketch, mark: highlighted };
6799
+ }
6800
+ var MenubarItem = react.forwardRef(function MenubarItem2({ className, style, children, ...rest }, ref) {
6801
+ const [highlighted, setHighlighted] = react.useState(false);
6802
+ const { sketch, mark } = useMark3(highlighted);
6803
+ return /* @__PURE__ */ jsxRuntime.jsxs(
6804
+ MenubarPrimitive__namespace.Item,
6805
+ {
6806
+ ref,
6807
+ className: cn(className),
6808
+ onPointerMove: () => setHighlighted(true),
6809
+ onPointerLeave: () => setHighlighted(false),
6810
+ style: {
6811
+ position: "relative",
6812
+ display: "flex",
6813
+ alignItems: "center",
6814
+ gap: 8,
6815
+ padding: "7px 12px",
6816
+ fontFamily: doodleUiFontFamily,
6817
+ fontSize: 14,
6818
+ color: sketch.ink,
6819
+ outline: "none",
6820
+ cursor: "pointer",
6821
+ userSelect: "none",
6822
+ ...style
6823
+ },
6824
+ ...rest,
6825
+ children: [
6826
+ mark ? /* @__PURE__ */ jsxRuntime.jsx(
6827
+ RoughSvg,
6828
+ {
6829
+ shape: "line",
6830
+ roughness: (sketch.roughness ?? 1.5) + 0.4,
6831
+ seed: sketch.resolvedSeed,
6832
+ sketchColor: sketch.ink,
6833
+ bowing: sketch.bowing ?? 1.6,
6834
+ strokeWidth: 1.3,
6835
+ inset: 4,
6836
+ style: { opacity: 0.4 }
6837
+ }
6838
+ ) : null,
6839
+ /* @__PURE__ */ jsxRuntime.jsx("span", { style: { position: "relative", zIndex: 1 }, children })
6840
+ ]
6841
+ }
6842
+ );
6843
+ });
6844
+ var MenubarSeparator = react.forwardRef(function MenubarSeparator2({ className, style, ...rest }, ref) {
6845
+ const sketch = useMenubarSketch();
6846
+ return /* @__PURE__ */ jsxRuntime.jsx(
6847
+ MenubarPrimitive__namespace.Separator,
6848
+ {
6849
+ ref,
6850
+ className: cn(className),
6851
+ style: { position: "relative", height: 10, margin: "2px 0", ...style },
6852
+ ...rest,
6853
+ children: /* @__PURE__ */ jsxRuntime.jsx(
6854
+ RoughSvg,
6855
+ {
6856
+ shape: "line",
6857
+ roughness: (sketch.roughness ?? 1.5) + 0.2,
6858
+ seed: deriveSeed(sketch.resolvedSeed, "separator"),
6859
+ sketchColor: sketch.ink,
6860
+ bowing: sketch.bowing ?? 1.8,
6861
+ strokeWidth: 1.2,
6862
+ inset: 6,
6863
+ style: { opacity: 0.5 }
6864
+ }
6865
+ )
6866
+ }
6867
+ );
6868
+ });
6869
+ var MenubarLabel = react.forwardRef(function MenubarLabel2({ className, style, children, ...rest }, ref) {
6870
+ const sketch = useMenubarSketch();
6871
+ return /* @__PURE__ */ jsxRuntime.jsx(
6872
+ MenubarPrimitive__namespace.Label,
6873
+ {
6874
+ ref,
6875
+ className: cn(className),
6876
+ style: {
6877
+ padding: "6px 12px",
6878
+ fontFamily: doodleUiFontFamily,
6879
+ fontSize: 12,
6880
+ fontWeight: 700,
6881
+ color: sketch.ink,
6882
+ opacity: 0.6,
6883
+ ...style
6884
+ },
6885
+ ...rest,
6886
+ children
6887
+ }
6888
+ );
6889
+ });
6890
+ var MenubarShortcut = react.forwardRef(function MenubarShortcut2({ className, style, children, ...rest }, ref) {
6891
+ return /* @__PURE__ */ jsxRuntime.jsx(
6892
+ "span",
6893
+ {
6894
+ ref,
6895
+ className: cn(className),
6896
+ style: {
6897
+ marginLeft: "auto",
6898
+ fontSize: 12,
6899
+ opacity: 0.55,
6900
+ letterSpacing: 0.04,
6901
+ ...style
6902
+ },
6903
+ ...rest,
6904
+ children
6905
+ }
6906
+ );
6907
+ });
6908
+ var MenubarSub = MenubarPrimitive__namespace.Sub;
6909
+ var MenubarSubTrigger = MenubarPrimitive__namespace.SubTrigger;
6910
+ var MenubarSubContent = MenubarPrimitive__namespace.SubContent;
6911
+ var MenubarCheckboxItem = MenubarPrimitive__namespace.CheckboxItem;
6912
+ var MenubarRadioGroup = MenubarPrimitive__namespace.RadioGroup;
6913
+ var MenubarRadioItem = MenubarPrimitive__namespace.RadioItem;
6914
+ var SlidingPanelSketchContext = react.createContext(null);
6915
+ function useSlidingPanelSketch() {
6916
+ const ctx = react.useContext(SlidingPanelSketchContext);
6917
+ if (!ctx) {
6918
+ throw new Error("Sliding panel parts must be used inside the panel root.");
6919
+ }
6920
+ return ctx;
6921
+ }
6922
+ function SlidingPanelRoot({
6923
+ children,
6924
+ open,
6925
+ defaultOpen,
6926
+ onOpenChange,
6927
+ side = "right",
6928
+ roughness,
6929
+ seed,
6930
+ sketchColor,
6931
+ bowing,
6932
+ fillStyle,
6933
+ strokeWidth,
6934
+ animate,
6935
+ ...rest
6936
+ }) {
6937
+ const resolvedSeed = useResolvedSeed(seed);
6938
+ const ink = sketchColor ?? SKETCH_COLORS.ink;
6939
+ const [uncontrolled, setUncontrolled] = react.useState(defaultOpen === true);
6940
+ const isOpen = open ?? uncontrolled;
6941
+ return /* @__PURE__ */ jsxRuntime.jsx(
6942
+ SlidingPanelSketchContext.Provider,
6943
+ {
6944
+ value: {
6945
+ roughness,
6946
+ seed: resolvedSeed,
6947
+ sketchColor,
6948
+ bowing,
6949
+ fillStyle,
6950
+ strokeWidth,
6951
+ resolvedSeed,
6952
+ ink,
6953
+ animate,
6954
+ open: isOpen,
6955
+ side
6956
+ },
6957
+ children: /* @__PURE__ */ jsxRuntime.jsx(
6958
+ Dialog__namespace.Root,
6959
+ {
6960
+ open: isOpen,
6961
+ onOpenChange: (next) => {
6962
+ setUncontrolled(next);
6963
+ onOpenChange?.(next);
6964
+ },
6965
+ ...rest,
6966
+ children
6967
+ }
6968
+ )
6969
+ }
6970
+ );
6971
+ }
6972
+ var SlidingPanelTrigger = Dialog__namespace.Trigger;
6973
+ var SlidingPanelClose = Dialog__namespace.Close;
6974
+ function slideVariants(side, shouldAnimate) {
6975
+ if (!shouldAnimate) {
6976
+ return { hidden: {}, visible: {} };
6977
+ }
6978
+ const offset = 420;
6979
+ const hidden = side === "left" ? { x: -offset } : side === "right" ? { x: offset } : side === "top" ? { y: -offset } : { y: offset };
6980
+ return {
6981
+ hidden: { ...hidden, opacity: 0.85 },
6982
+ visible: { x: 0, y: 0, opacity: 1 }
6983
+ };
6984
+ }
6985
+ function panelPosition(side) {
6986
+ switch (side) {
6987
+ case "left":
6988
+ return {
6989
+ top: 0,
6990
+ bottom: 0,
6991
+ left: 0,
6992
+ width: "min(420px, 100vw)"
6993
+ };
6994
+ case "right":
6995
+ return {
6996
+ top: 0,
6997
+ bottom: 0,
6998
+ right: 0,
6999
+ width: "min(420px, 100vw)"
7000
+ };
7001
+ case "top":
7002
+ return {
7003
+ top: 0,
7004
+ left: 0,
7005
+ right: 0,
7006
+ height: "min(420px, 90vh)"
7007
+ };
7008
+ default:
7009
+ return {
7010
+ bottom: 0,
7011
+ left: 0,
7012
+ right: 0,
7013
+ height: "min(420px, 90vh)"
7014
+ };
7015
+ }
7016
+ }
7017
+ var SlidingPanelOverlay = react.forwardRef(function SlidingPanelOverlay2({ style, ...rest }, ref) {
7018
+ const sketch = useSlidingPanelSketch();
7019
+ const shouldAnimate = useAnimate(sketch.animate);
7020
+ return /* @__PURE__ */ jsxRuntime.jsx(Dialog__namespace.Overlay, { ref, asChild: true, forceMount: true, ...rest, children: /* @__PURE__ */ jsxRuntime.jsx(
7021
+ framerMotion.motion.div,
7022
+ {
7023
+ initial: shouldAnimate ? { opacity: 0 } : false,
7024
+ animate: { opacity: 1 },
7025
+ exit: shouldAnimate ? { opacity: 0 } : void 0,
7026
+ transition: shouldAnimate ? { duration: 0.22, ease: "easeOut" } : { duration: 0 },
7027
+ style: {
7028
+ position: "fixed",
7029
+ inset: 0,
7030
+ background: "rgba(31, 29, 26, 0.38)",
7031
+ zIndex: 70,
7032
+ ...style
7033
+ }
7034
+ }
7035
+ ) });
7036
+ });
7037
+ var SlidingPanelContent = react.forwardRef(function SlidingPanelContent2({ className, style, contentStyle, children, chrome, ...rest }, ref) {
7038
+ const sketch = useSlidingPanelSketch();
7039
+ const shouldAnimate = useAnimate(sketch.animate);
7040
+ const variants = slideVariants(sketch.side, shouldAnimate);
7041
+ return /* @__PURE__ */ jsxRuntime.jsx(framerMotion.AnimatePresence, { children: sketch.open ? /* @__PURE__ */ jsxRuntime.jsxs(Dialog__namespace.Portal, { forceMount: true, children: [
7042
+ /* @__PURE__ */ jsxRuntime.jsx(SlidingPanelOverlay, {}),
7043
+ /* @__PURE__ */ jsxRuntime.jsx(Dialog__namespace.Content, { ref, asChild: true, forceMount: true, ...rest, children: /* @__PURE__ */ jsxRuntime.jsx(
7044
+ framerMotion.motion.div,
7045
+ {
7046
+ className: cn(className),
7047
+ initial: shouldAnimate ? "hidden" : false,
7048
+ animate: "visible",
7049
+ exit: shouldAnimate ? "hidden" : void 0,
7050
+ variants,
7051
+ transition: shouldAnimate ? { duration: 0.28, ease: "easeOut" } : { duration: 0 },
7052
+ style: {
7053
+ position: "fixed",
7054
+ zIndex: 80,
7055
+ outline: "none",
7056
+ pointerEvents: "auto",
7057
+ ...panelPosition(sketch.side),
7058
+ ...style
7059
+ },
7060
+ children: /* @__PURE__ */ jsxRuntime.jsxs(
7061
+ SketchBox,
7062
+ {
7063
+ roughness: sketch.roughness,
7064
+ seed: sketch.resolvedSeed,
7065
+ sketchColor: sketch.ink,
7066
+ bowing: sketch.bowing,
7067
+ fillStyle: sketch.fillStyle ?? "solid",
7068
+ fill: "#f7f6f2",
7069
+ strokeWidth: sketch.strokeWidth ?? 2,
7070
+ animate: sketch.animate,
7071
+ contentStyle: {
7072
+ padding: 20,
7073
+ height: "100%",
7074
+ boxSizing: "border-box",
7075
+ display: "flex",
7076
+ flexDirection: "column",
7077
+ ...contentStyle
7078
+ },
7079
+ style: { height: "100%" },
7080
+ children: [
7081
+ chrome,
7082
+ children
7083
+ ]
7084
+ }
7085
+ )
7086
+ }
7087
+ ) })
7088
+ ] }) : null });
7089
+ });
7090
+ function SlidingPanelHeader({
7091
+ children,
7092
+ className,
7093
+ style
7094
+ }) {
7095
+ return /* @__PURE__ */ jsxRuntime.jsx(
7096
+ "div",
7097
+ {
7098
+ className: cn(className),
7099
+ style: {
7100
+ display: "flex",
7101
+ flexDirection: "column",
7102
+ gap: 6,
7103
+ marginBottom: 12,
7104
+ ...style
7105
+ },
7106
+ children
7107
+ }
7108
+ );
7109
+ }
7110
+ function SlidingPanelFooter({
7111
+ children,
7112
+ className,
7113
+ style
7114
+ }) {
7115
+ return /* @__PURE__ */ jsxRuntime.jsx(
7116
+ "div",
7117
+ {
7118
+ className: cn(className),
7119
+ style: {
7120
+ display: "flex",
7121
+ gap: 8,
7122
+ marginTop: "auto",
7123
+ paddingTop: 12,
7124
+ ...style
7125
+ },
7126
+ children
7127
+ }
7128
+ );
7129
+ }
7130
+ var SlidingPanelTitle = react.forwardRef(function SlidingPanelTitle2({ className, style, ...rest }, ref) {
7131
+ const sketch = useSlidingPanelSketch();
7132
+ return /* @__PURE__ */ jsxRuntime.jsx(
7133
+ Dialog__namespace.Title,
7134
+ {
7135
+ ref,
7136
+ className: cn(className),
7137
+ style: {
7138
+ margin: 0,
7139
+ fontFamily: doodleUiFontFamily,
7140
+ fontWeight: doodleUiFontWeight(700),
7141
+ fontSize: 20,
7142
+ color: sketch.ink,
7143
+ ...style
7144
+ },
7145
+ ...rest
7146
+ }
7147
+ );
7148
+ });
7149
+ var SlidingPanelDescription = react.forwardRef(function SlidingPanelDescription2({ className, style, ...rest }, ref) {
7150
+ const sketch = useSlidingPanelSketch();
7151
+ return /* @__PURE__ */ jsxRuntime.jsx(
7152
+ Dialog__namespace.Description,
7153
+ {
7154
+ ref,
7155
+ className: cn(className),
7156
+ style: {
7157
+ margin: 0,
7158
+ fontFamily: doodleUiFontFamily,
7159
+ fontSize: 14,
7160
+ color: sketch.ink,
7161
+ opacity: 0.75,
7162
+ ...style
7163
+ },
7164
+ ...rest
7165
+ }
7166
+ );
7167
+ });
7168
+ function Sheet({ side = "right", ...rest }) {
7169
+ return /* @__PURE__ */ jsxRuntime.jsx(SlidingPanelRoot, { side, ...rest });
7170
+ }
7171
+ var SheetTrigger = SlidingPanelTrigger;
7172
+ var SheetClose = SlidingPanelClose;
7173
+ var SheetContent = react.forwardRef(
7174
+ function SheetContent2(props, ref) {
7175
+ return /* @__PURE__ */ jsxRuntime.jsx(SlidingPanelContent, { ref, ...props });
7176
+ }
7177
+ );
7178
+ var SheetHeader = SlidingPanelHeader;
7179
+ var SheetFooter = SlidingPanelFooter;
7180
+ var SheetTitle = SlidingPanelTitle;
7181
+ var SheetDescription = SlidingPanelDescription;
7182
+ function Drawer(props) {
7183
+ return /* @__PURE__ */ jsxRuntime.jsx(SlidingPanelRoot, { side: "bottom", ...props });
7184
+ }
7185
+ var DrawerTrigger = SlidingPanelTrigger;
7186
+ var DrawerClose = SlidingPanelClose;
7187
+ var DrawerHandle = react.forwardRef(
7188
+ function DrawerHandle2({ className }, ref) {
7189
+ const sketch = useSlidingPanelSketch();
7190
+ return /* @__PURE__ */ jsxRuntime.jsx(
7191
+ "div",
7192
+ {
7193
+ ref,
7194
+ className,
7195
+ style: {
7196
+ position: "relative",
7197
+ width: 48,
7198
+ height: 10,
7199
+ margin: "0 auto 12px"
7200
+ },
7201
+ "aria-hidden": true,
7202
+ children: /* @__PURE__ */ jsxRuntime.jsx(
7203
+ RoughSvg,
7204
+ {
7205
+ shape: "line",
7206
+ roughness: (sketch.roughness ?? 1.5) + 0.3,
7207
+ seed: deriveSeed(sketch.resolvedSeed, "drawer-handle"),
7208
+ sketchColor: sketch.sketchColor ?? SKETCH_COLORS.ink,
7209
+ bowing: sketch.bowing ?? 1.6,
7210
+ strokeWidth: 2.4,
7211
+ width: 48,
7212
+ height: 10,
7213
+ inset: 2
7214
+ }
7215
+ )
7216
+ }
7217
+ );
7218
+ }
7219
+ );
7220
+ var DrawerContent = react.forwardRef(
7221
+ function DrawerContent2({ children, ...rest }, ref) {
7222
+ return /* @__PURE__ */ jsxRuntime.jsx(
7223
+ SlidingPanelContent,
7224
+ {
7225
+ ref,
7226
+ chrome: /* @__PURE__ */ jsxRuntime.jsx(DrawerHandle, {}),
7227
+ contentStyle: { paddingTop: 8 },
7228
+ ...rest,
7229
+ children
7230
+ }
7231
+ );
7232
+ }
7233
+ );
7234
+ var DrawerHeader = SlidingPanelHeader;
7235
+ var DrawerFooter = SlidingPanelFooter;
7236
+ var DrawerTitle = SlidingPanelTitle;
7237
+ var DrawerDescription = SlidingPanelDescription;
7238
+ function AspectRatio({
7239
+ ratio = 16 / 9,
7240
+ bordered = false,
7241
+ className,
7242
+ style,
7243
+ children,
7244
+ roughness,
7245
+ seed,
7246
+ sketchColor,
7247
+ bowing,
7248
+ fillStyle,
7249
+ strokeWidth,
7250
+ animate
7251
+ }) {
7252
+ const inner = /* @__PURE__ */ jsxRuntime.jsx(
7253
+ AspectRatioPrimitive__namespace.Root,
7254
+ {
7255
+ ratio,
7256
+ className: cn(className),
7257
+ style: {
7258
+ width: "100%",
7259
+ overflow: "hidden",
7260
+ ...style
7261
+ },
7262
+ children: /* @__PURE__ */ jsxRuntime.jsx("div", { style: { width: "100%", height: "100%" }, children })
7263
+ }
7264
+ );
7265
+ if (!bordered) {
7266
+ return inner;
7267
+ }
7268
+ return /* @__PURE__ */ jsxRuntime.jsx(
7269
+ SketchBox,
7270
+ {
7271
+ className: cn(className),
7272
+ style: { width: "100%", ...style },
7273
+ contentStyle: { padding: 0, width: "100%" },
7274
+ fill: SKETCH_COLORS.paper,
7275
+ fillStyle: fillStyle ?? "hachure",
7276
+ roughness,
7277
+ seed,
7278
+ sketchColor,
7279
+ bowing,
7280
+ strokeWidth,
7281
+ animate,
7282
+ children: /* @__PURE__ */ jsxRuntime.jsx(AspectRatioPrimitive__namespace.Root, { ratio, style: { width: "100%" }, children: /* @__PURE__ */ jsxRuntime.jsx("div", { style: { width: "100%", height: "100%" }, children }) })
7283
+ }
7284
+ );
7285
+ }
7286
+ var CHEVRON_PATH6 = "M 4 6 L 10 12 L 16 6";
7287
+ var NativeSelect = react.forwardRef(
7288
+ function NativeSelect2({
7289
+ className,
7290
+ style,
7291
+ options,
7292
+ children,
7293
+ roughness,
7294
+ seed,
7295
+ sketchColor,
7296
+ bowing,
7297
+ fillStyle,
7298
+ strokeWidth,
7299
+ animate,
7300
+ disabled,
7301
+ ...rest
7302
+ }, ref) {
7303
+ const fieldRef = react.useRef(null);
7304
+ const shouldAnimate = useAnimate(animate);
7305
+ const resolvedSeed = useResolvedSeed(seed);
7306
+ const ink = sketchColor ?? SKETCH_COLORS.ink;
7307
+ useDrawIn(fieldRef, DRAW_IN_DURATION_MS, shouldAnimate);
7308
+ return /* @__PURE__ */ jsxRuntime.jsx(
7309
+ "span",
7310
+ {
7311
+ className: cn(className),
7312
+ style: {
7313
+ position: "relative",
7314
+ display: "block",
7315
+ width: "100%",
7316
+ opacity: disabled ? 0.6 : 1,
7317
+ ...style
7318
+ },
7319
+ children: /* @__PURE__ */ jsxRuntime.jsxs("span", { ref: fieldRef, style: { position: "relative", display: "block" }, children: [
7320
+ /* @__PURE__ */ jsxRuntime.jsx(
7321
+ RoughSvg,
7322
+ {
7323
+ shape: "rectangle",
7324
+ roughness,
7325
+ seed: resolvedSeed,
7326
+ sketchColor: ink,
7327
+ bowing,
7328
+ fillStyle,
7329
+ fill: SKETCH_COLORS.paper,
7330
+ strokeWidth
7331
+ }
7332
+ ),
7333
+ /* @__PURE__ */ jsxRuntime.jsx(
7334
+ "select",
7335
+ {
7336
+ ref,
7337
+ disabled,
7338
+ style: {
7339
+ position: "relative",
7340
+ zIndex: 1,
7341
+ width: "100%",
7342
+ border: "none",
7343
+ background: "transparent",
7344
+ padding: "10px 36px 10px 12px",
7345
+ fontFamily: doodleUiFontFamily,
7346
+ fontSize: 14,
7347
+ fontWeight: doodleUiFontWeight(500),
7348
+ color: ink,
7349
+ cursor: disabled ? "not-allowed" : "pointer",
7350
+ appearance: "none",
7351
+ WebkitAppearance: "none",
7352
+ MozAppearance: "none",
7353
+ outline: "none"
7354
+ },
7355
+ ...rest,
7356
+ children: options ? options.map((opt) => /* @__PURE__ */ jsxRuntime.jsx(
7357
+ "option",
7358
+ {
7359
+ value: opt.value,
7360
+ disabled: opt.disabled,
7361
+ children: opt.label
7362
+ },
7363
+ opt.value
7364
+ )) : children
7365
+ }
7366
+ ),
7367
+ /* @__PURE__ */ jsxRuntime.jsx(
7368
+ "span",
7369
+ {
7370
+ "aria-hidden": true,
7371
+ style: {
7372
+ position: "absolute",
7373
+ right: 10,
7374
+ top: "50%",
7375
+ transform: "translateY(-50%)",
7376
+ width: 20,
7377
+ height: 14,
7378
+ pointerEvents: "none",
7379
+ zIndex: 2
7380
+ },
7381
+ children: /* @__PURE__ */ jsxRuntime.jsx(
7382
+ RoughSvg,
7383
+ {
7384
+ shape: "path",
7385
+ path: CHEVRON_PATH6,
7386
+ roughness: (roughness ?? 1.5) * 0.85,
7387
+ seed: resolvedSeed,
7388
+ sketchColor: ink,
7389
+ bowing,
7390
+ strokeWidth: strokeWidth ?? 1.5
7391
+ }
7392
+ )
7393
+ }
7394
+ )
7395
+ ] })
7396
+ }
7397
+ );
7398
+ }
7399
+ );
7400
+ var EmptyContext = react.createContext(null);
7401
+ function useEmptyInk() {
7402
+ const ctx = react.useContext(EmptyContext);
7403
+ return ctx?.ink ?? SKETCH_COLORS.ink;
7404
+ }
7405
+ var emptyContentStyle = {
7406
+ display: "flex",
7407
+ flexDirection: "column",
7408
+ alignItems: "center",
7409
+ justifyContent: "center",
7410
+ textAlign: "center",
7411
+ gap: 12,
7412
+ padding: "32px 24px",
7413
+ minHeight: 160,
7414
+ width: "100%"
7415
+ };
7416
+ var Empty = react.forwardRef(function Empty2({
7417
+ className,
7418
+ style,
7419
+ children,
7420
+ bordered = true,
7421
+ roughness,
7422
+ seed,
7423
+ sketchColor,
7424
+ bowing,
7425
+ fillStyle,
7426
+ strokeWidth,
7427
+ animate,
7428
+ ...rest
7429
+ }, ref) {
7430
+ const ink = sketchColor ?? SKETCH_COLORS.ink;
7431
+ const inner = /* @__PURE__ */ jsxRuntime.jsx(EmptyContext.Provider, { value: { ink }, children: /* @__PURE__ */ jsxRuntime.jsx(
7432
+ "div",
7433
+ {
7434
+ ref: bordered ? void 0 : ref,
7435
+ className: cn(className),
7436
+ style: { ...emptyContentStyle, ...style },
7437
+ ...bordered ? {} : rest,
7438
+ children
7439
+ }
7440
+ ) });
7441
+ if (!bordered) {
7442
+ return inner;
7443
+ }
7444
+ return /* @__PURE__ */ jsxRuntime.jsx(
7445
+ SketchBox,
7446
+ {
7447
+ ref,
7448
+ className: cn(className),
7449
+ style: { width: "100%", ...style },
7450
+ contentStyle: emptyContentStyle,
7451
+ fill: SKETCH_COLORS.secondaryFill,
7452
+ fillStyle: fillStyle ?? "hachure",
7453
+ roughness,
7454
+ seed,
7455
+ sketchColor,
7456
+ bowing,
7457
+ strokeWidth,
7458
+ animate,
7459
+ ...rest,
7460
+ children: /* @__PURE__ */ jsxRuntime.jsx(EmptyContext.Provider, { value: { ink }, children })
7461
+ }
7462
+ );
7463
+ });
7464
+ function EmptyMedia({
7465
+ className,
7466
+ style,
7467
+ children
7468
+ }) {
7469
+ return /* @__PURE__ */ jsxRuntime.jsx(
7470
+ "div",
7471
+ {
7472
+ className: cn(className),
7473
+ style: {
7474
+ display: "flex",
7475
+ alignItems: "center",
7476
+ justifyContent: "center",
7477
+ marginBottom: 4,
7478
+ ...style
7479
+ },
7480
+ children
7481
+ }
7482
+ );
7483
+ }
7484
+ function EmptyTitle({
7485
+ className,
7486
+ style,
7487
+ children
7488
+ }) {
7489
+ const ink = useEmptyInk();
7490
+ return /* @__PURE__ */ jsxRuntime.jsx(
7491
+ "h3",
7492
+ {
7493
+ className: cn(className),
7494
+ style: {
7495
+ margin: 0,
7496
+ fontFamily: doodleUiFontFamily,
7497
+ fontSize: 18,
7498
+ fontWeight: doodleUiFontWeight(700),
7499
+ color: ink,
7500
+ ...style
7501
+ },
7502
+ children
7503
+ }
7504
+ );
7505
+ }
7506
+ function EmptyDescription({
7507
+ className,
7508
+ style,
7509
+ children
7510
+ }) {
7511
+ const ink = useEmptyInk();
7512
+ return /* @__PURE__ */ jsxRuntime.jsx(
7513
+ "p",
7514
+ {
7515
+ className: cn(className),
7516
+ style: {
7517
+ margin: 0,
7518
+ maxWidth: 360,
7519
+ fontFamily: doodleUiFontFamily,
7520
+ fontSize: 14,
7521
+ lineHeight: 1.5,
7522
+ color: ink,
7523
+ opacity: 0.85,
7524
+ ...style
7525
+ },
7526
+ children
7527
+ }
7528
+ );
7529
+ }
7530
+ function EmptyAction({
7531
+ className,
7532
+ style,
7533
+ children
7534
+ }) {
7535
+ return /* @__PURE__ */ jsxRuntime.jsx(
7536
+ "div",
7537
+ {
7538
+ className: cn(className),
7539
+ style: {
7540
+ display: "flex",
7541
+ flexWrap: "wrap",
7542
+ gap: 8,
7543
+ justifyContent: "center",
7544
+ marginTop: 8,
7545
+ ...style
7546
+ },
7547
+ children
7548
+ }
7549
+ );
7550
+ }
7551
+ var FieldContext = react.createContext(null);
7552
+ function useField() {
7553
+ const ctx = react.useContext(FieldContext);
7554
+ if (!ctx) {
7555
+ throw new Error("Field parts must be used inside <Field>.");
7556
+ }
7557
+ return ctx;
7558
+ }
7559
+ function Field({
7560
+ className,
7561
+ style,
7562
+ children,
7563
+ invalid = false,
7564
+ error,
7565
+ ...rest
7566
+ }) {
7567
+ const id = react.useId();
7568
+ const descriptionId = `${id}-description`;
7569
+ const errorId = `${id}-error`;
7570
+ const value = react.useMemo(
7571
+ () => ({
7572
+ id,
7573
+ descriptionId,
7574
+ errorId,
7575
+ invalid: invalid || Boolean(error),
7576
+ error
7577
+ }),
7578
+ [id, descriptionId, errorId, invalid, error]
7579
+ );
7580
+ return /* @__PURE__ */ jsxRuntime.jsx(FieldContext.Provider, { value, children: /* @__PURE__ */ jsxRuntime.jsx(
7581
+ "div",
7582
+ {
7583
+ className: cn(className),
7584
+ style: {
7585
+ display: "flex",
7586
+ flexDirection: "column",
7587
+ gap: 6,
7588
+ width: "100%",
7589
+ ...style
7590
+ },
7591
+ ...rest,
7592
+ children
7593
+ }
7594
+ ) });
7595
+ }
7596
+ function FieldLabel({ className, style, ...rest }) {
7597
+ const { id } = useField();
7598
+ return /* @__PURE__ */ jsxRuntime.jsx(Label2, { htmlFor: id, className, style, ...rest });
7599
+ }
7600
+ function FieldDescription({
7601
+ className,
7602
+ style,
7603
+ children,
7604
+ ...rest
7605
+ }) {
7606
+ const { descriptionId } = useField();
7607
+ return /* @__PURE__ */ jsxRuntime.jsx(
7608
+ "p",
7609
+ {
7610
+ id: descriptionId,
7611
+ className: cn(className),
7612
+ style: {
7613
+ margin: 0,
7614
+ fontFamily: doodleUiFontFamily,
7615
+ fontSize: 12,
7616
+ lineHeight: 1.45,
7617
+ color: SKETCH_COLORS.ink,
7618
+ opacity: 0.75,
7619
+ ...style
7620
+ },
7621
+ ...rest,
7622
+ children
7623
+ }
7624
+ );
7625
+ }
7626
+ function FieldError({
7627
+ className,
7628
+ style,
7629
+ children,
7630
+ ...rest
7631
+ }) {
7632
+ const { error, errorId } = useField();
7633
+ const message = children ?? error;
7634
+ if (!message) return null;
7635
+ return /* @__PURE__ */ jsxRuntime.jsx(
7636
+ "p",
7637
+ {
7638
+ id: errorId,
7639
+ role: "alert",
7640
+ className: cn(className),
7641
+ style: {
7642
+ margin: 0,
7643
+ fontFamily: doodleUiFontFamily,
7644
+ fontSize: 12,
7645
+ lineHeight: 1.45,
7646
+ color: SKETCH_COLORS.error,
7647
+ ...style
7648
+ },
7649
+ ...rest,
7650
+ children: message
7651
+ }
7652
+ );
7653
+ }
7654
+ function FieldControl({ children }) {
7655
+ const { id, descriptionId, errorId, invalid } = useField();
7656
+ const child = react.Children.only(children);
7657
+ if (!react.isValidElement(child)) {
7658
+ throw new Error("FieldControl expects a single React element child.");
7659
+ }
7660
+ const describedBy = [descriptionId, invalid ? errorId : null].filter(Boolean).join(" ");
7661
+ const props = child.props;
7662
+ return react.cloneElement(child, {
7663
+ id: props.id ?? id,
7664
+ "aria-describedby": props["aria-describedby"] ?? (describedBy.length > 0 ? describedBy : void 0),
7665
+ "aria-invalid": invalid ? true : props["aria-invalid"]
7666
+ });
7667
+ }
7668
+ var HEADING_SIZES = {
7669
+ 1: 32,
7670
+ 2: 26,
7671
+ 3: 22,
7672
+ 4: 18,
7673
+ 5: 16,
7674
+ 6: 14
7675
+ };
7676
+ var Heading = react.forwardRef(
7677
+ function Heading2({
7678
+ level = 2,
7679
+ accent = "none",
7680
+ className,
7681
+ style,
7682
+ children,
7683
+ roughness,
7684
+ seed,
7685
+ sketchColor,
7686
+ bowing,
7687
+ strokeWidth,
7688
+ animate,
7689
+ ...rest
7690
+ }, ref) {
7691
+ const Tag = `h${level}`;
7692
+ const ink = sketchColor ?? SKETCH_COLORS.ink;
7693
+ const resolvedSeed = useResolvedSeed(seed);
7694
+ const shouldAnimate = useAnimate(animate);
7695
+ const accentRef = react.useRef(null);
7696
+ useDrawIn(accentRef, DRAW_IN_MARK_MS, shouldAnimate && accent !== "none");
7697
+ const fontSize = HEADING_SIZES[level];
7698
+ return /* @__PURE__ */ jsxRuntime.jsxs(
7699
+ Tag,
7700
+ {
7701
+ ref,
7702
+ className: cn(className),
7703
+ style: {
7704
+ position: "relative",
7705
+ margin: 0,
7706
+ fontFamily: doodleUiFontFamily,
7707
+ fontSize,
7708
+ fontWeight: doodleUiFontWeight(700),
7709
+ color: ink,
7710
+ lineHeight: 1.2,
7711
+ ...style
7712
+ },
7713
+ ...rest,
7714
+ children: [
7715
+ accent === "highlight" ? /* @__PURE__ */ jsxRuntime.jsxs("span", { style: { position: "relative", display: "inline" }, children: [
7716
+ /* @__PURE__ */ jsxRuntime.jsx(
7717
+ "span",
7718
+ {
7719
+ ref: accentRef,
7720
+ "aria-hidden": true,
7721
+ style: {
7722
+ position: "absolute",
7723
+ left: -4,
7724
+ right: -4,
7725
+ bottom: 2,
7726
+ height: "0.45em",
7727
+ zIndex: 0
7728
+ },
7729
+ children: /* @__PURE__ */ jsxRuntime.jsx(
7730
+ RoughSvg,
7731
+ {
7732
+ shape: "rectangle",
7733
+ roughness,
7734
+ seed: resolvedSeed,
7735
+ sketchColor: SKETCH_COLORS.accent,
7736
+ fill: SKETCH_COLORS.accentFill,
7737
+ fillStyle: "solid",
7738
+ bowing,
7739
+ strokeWidth: strokeWidth ?? 1.2
7740
+ }
7741
+ )
7742
+ }
7743
+ ),
7744
+ /* @__PURE__ */ jsxRuntime.jsx("span", { style: { position: "relative", zIndex: 1 }, children })
7745
+ ] }) : children,
7746
+ accent === "underline" ? /* @__PURE__ */ jsxRuntime.jsx(
7747
+ "span",
7748
+ {
7749
+ ref: accentRef,
7750
+ "aria-hidden": true,
7751
+ style: {
7752
+ display: "block",
7753
+ position: "relative",
7754
+ height: 6,
7755
+ marginTop: 4,
7756
+ maxWidth: "100%"
7757
+ },
7758
+ children: /* @__PURE__ */ jsxRuntime.jsx(
7759
+ RoughSvg,
7760
+ {
7761
+ shape: "path",
7762
+ path: "M 2 4 Q 40 1 80 5 T 160 3",
7763
+ roughness,
7764
+ seed: resolvedSeed,
7765
+ sketchColor: ink,
7766
+ bowing,
7767
+ strokeWidth: strokeWidth ?? 1.5
7768
+ }
7769
+ )
7770
+ }
7771
+ ) : null
7772
+ ]
7773
+ }
7774
+ );
7775
+ }
7776
+ );
7777
+ var Text = react.forwardRef(function Text2({ variant = "body", className, style, children, ...rest }, ref) {
7778
+ const sizes = { body: 14, lead: 17, muted: 13 };
7779
+ const opacity = variant === "muted" ? 0.75 : 1;
7780
+ return /* @__PURE__ */ jsxRuntime.jsx(
7781
+ "p",
7782
+ {
7783
+ ref,
7784
+ className: cn(className),
7785
+ style: {
7786
+ margin: 0,
7787
+ fontFamily: doodleUiFontFamily,
7788
+ fontSize: sizes[variant],
7789
+ fontWeight: doodleUiFontWeight(variant === "lead" ? 500 : 400),
7790
+ lineHeight: 1.55,
7791
+ color: SKETCH_COLORS.ink,
7792
+ opacity,
7793
+ ...style
7794
+ },
7795
+ ...rest,
7796
+ children
7797
+ }
7798
+ );
7799
+ });
7800
+ var Paragraph = Text;
7801
+ var Blockquote = react.forwardRef(
7802
+ function Blockquote2({
7803
+ className,
7804
+ style,
7805
+ children,
7806
+ roughness,
7807
+ seed,
7808
+ sketchColor,
7809
+ bowing,
7810
+ strokeWidth,
7811
+ animate,
7812
+ ...rest
7813
+ }, ref) {
7814
+ const ink = sketchColor ?? SKETCH_COLORS.ink;
7815
+ const resolvedSeed = useResolvedSeed(seed);
7816
+ const shouldAnimate = useAnimate(animate);
7817
+ const ruleRef = react.useRef(null);
7818
+ useDrawIn(ruleRef, DRAW_IN_MARK_MS, shouldAnimate);
7819
+ return /* @__PURE__ */ jsxRuntime.jsxs(
7820
+ "blockquote",
7821
+ {
7822
+ ref,
7823
+ className: cn(className),
7824
+ style: {
7825
+ display: "flex",
7826
+ gap: 12,
7827
+ margin: 0,
7828
+ padding: "8px 0 8px 4px",
7829
+ fontFamily: doodleUiFontFamily,
7830
+ fontSize: 15,
7831
+ fontStyle: "italic",
7832
+ lineHeight: 1.5,
7833
+ color: ink,
7834
+ ...style
7835
+ },
7836
+ ...rest,
7837
+ children: [
7838
+ /* @__PURE__ */ jsxRuntime.jsx(
7839
+ "span",
7840
+ {
7841
+ ref: ruleRef,
7842
+ "aria-hidden": true,
7843
+ style: { position: "relative", width: 6, flexShrink: 0, minHeight: 40 },
7844
+ children: /* @__PURE__ */ jsxRuntime.jsx(
7845
+ RoughSvg,
7846
+ {
7847
+ shape: "line-vertical",
7848
+ roughness,
7849
+ seed: resolvedSeed,
7850
+ sketchColor: ink,
7851
+ bowing,
7852
+ strokeWidth: strokeWidth ?? 2
7853
+ }
7854
+ )
7855
+ }
7856
+ ),
7857
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children })
7858
+ ]
7859
+ }
7860
+ );
7861
+ }
7862
+ );
7863
+ var InlineCode = react.forwardRef(
7864
+ function InlineCode2({
7865
+ className,
7866
+ style,
7867
+ children,
7868
+ roughness,
7869
+ seed,
7870
+ sketchColor,
7871
+ bowing,
7872
+ fillStyle,
7873
+ strokeWidth,
7874
+ animate,
7875
+ ...rest
7876
+ }, ref) {
7877
+ const ink = sketchColor ?? SKETCH_COLORS.ink;
7878
+ return /* @__PURE__ */ jsxRuntime.jsx(
7879
+ SketchBox,
7880
+ {
7881
+ className: cn(className),
7882
+ style: { display: "inline-flex", verticalAlign: "baseline", ...style },
7883
+ contentStyle: {
7884
+ padding: "1px 6px",
7885
+ fontSize: "0.9em",
7886
+ fontFamily: "ui-monospace, monospace"
7887
+ },
7888
+ fill: SKETCH_COLORS.paper,
7889
+ fillStyle: fillStyle ?? "hachure",
7890
+ roughness,
7891
+ seed,
7892
+ sketchColor: ink,
7893
+ bowing,
7894
+ strokeWidth: strokeWidth ?? 1.2,
7895
+ animate,
7896
+ ...rest,
7897
+ children: /* @__PURE__ */ jsxRuntime.jsx(
7898
+ "code",
7899
+ {
7900
+ ref,
7901
+ style: {
7902
+ border: "none",
7903
+ background: "transparent",
7904
+ padding: 0,
7905
+ font: "inherit",
7906
+ color: ink
7907
+ },
7908
+ children
7909
+ }
7910
+ )
7911
+ }
7912
+ );
7913
+ }
7914
+ );
7915
+ var Highlight = react.forwardRef(
7916
+ function Highlight2({
7917
+ className,
7918
+ style,
7919
+ children,
7920
+ roughness,
7921
+ seed,
7922
+ sketchColor,
7923
+ bowing,
7924
+ strokeWidth,
7925
+ animate,
7926
+ ...rest
7927
+ }, ref) {
7928
+ const resolvedSeed = useResolvedSeed(seed);
7929
+ const shouldAnimate = useAnimate(animate);
7930
+ const markRef = react.useRef(null);
7931
+ useDrawIn(markRef, DRAW_IN_MARK_MS, shouldAnimate);
7932
+ return /* @__PURE__ */ jsxRuntime.jsxs(
7933
+ "span",
7934
+ {
7935
+ ref,
7936
+ className: cn(className),
7937
+ style: { position: "relative", display: "inline", ...style },
7938
+ ...rest,
7939
+ children: [
7940
+ /* @__PURE__ */ jsxRuntime.jsx(
7941
+ "span",
7942
+ {
7943
+ ref: markRef,
7944
+ "aria-hidden": true,
7945
+ style: {
7946
+ position: "absolute",
7947
+ left: -2,
7948
+ right: -2,
7949
+ bottom: 0,
7950
+ top: "35%",
7951
+ zIndex: 0
7952
+ },
7953
+ children: /* @__PURE__ */ jsxRuntime.jsx(
7954
+ RoughSvg,
7955
+ {
7956
+ shape: "rectangle",
7957
+ roughness,
7958
+ seed: resolvedSeed,
7959
+ sketchColor: sketchColor ?? SKETCH_COLORS.accent,
7960
+ fill: SKETCH_COLORS.accentFill,
7961
+ fillStyle: "solid",
7962
+ bowing,
7963
+ strokeWidth: strokeWidth ?? 1
7964
+ }
7965
+ )
7966
+ }
7967
+ ),
7968
+ /* @__PURE__ */ jsxRuntime.jsx("span", { style: { position: "relative", zIndex: 1 }, children })
7969
+ ]
7970
+ }
7971
+ );
7972
+ }
7973
+ );
7974
+ var SIDEBAR_WIDTH = 240;
7975
+ var SIDEBAR_WIDTH_COLLAPSED = 56;
7976
+ var SidebarContext = react.createContext(null);
7977
+ function useSidebar() {
7978
+ const ctx = react.useContext(SidebarContext);
7979
+ if (!ctx) {
7980
+ throw new Error("Sidebar parts must be used inside <SidebarProvider>.");
7981
+ }
7982
+ return ctx;
7983
+ }
7984
+ function SidebarProvider({
7985
+ defaultOpen = true,
7986
+ open: openProp,
7987
+ onOpenChange,
7988
+ defaultCollapsed = false,
7989
+ children,
7990
+ roughness,
7991
+ seed,
7992
+ sketchColor,
7993
+ bowing,
7994
+ strokeWidth
7995
+ }) {
7996
+ const [uncontrolledOpen, setUncontrolledOpen] = react.useState(defaultOpen);
7997
+ const [collapsed, setCollapsed] = react.useState(defaultCollapsed);
7998
+ const open = openProp ?? uncontrolledOpen;
7999
+ const setOpen = react.useCallback(
8000
+ (next) => {
8001
+ onOpenChange?.(next);
8002
+ if (openProp === void 0) {
8003
+ setUncontrolledOpen(next);
8004
+ }
8005
+ },
8006
+ [onOpenChange, openProp]
8007
+ );
8008
+ const toggleCollapsed = react.useCallback(() => {
8009
+ setCollapsed((c) => !c);
8010
+ }, []);
8011
+ const ink = sketchColor ?? SKETCH_COLORS.ink;
8012
+ const value = react.useMemo(
8013
+ () => ({
8014
+ open,
8015
+ setOpen,
8016
+ collapsed,
8017
+ toggleCollapsed,
8018
+ ink,
8019
+ sketch: { roughness, seed, sketchColor, bowing, strokeWidth }
8020
+ }),
8021
+ [
8022
+ open,
8023
+ setOpen,
8024
+ collapsed,
8025
+ toggleCollapsed,
8026
+ ink,
8027
+ roughness,
8028
+ seed,
8029
+ sketchColor,
8030
+ bowing,
8031
+ strokeWidth
8032
+ ]
8033
+ );
8034
+ return /* @__PURE__ */ jsxRuntime.jsx(SidebarContext.Provider, { value, children });
8035
+ }
8036
+ var Sidebar = react.forwardRef(function Sidebar2({ className, style, children, side = "left", ...rest }, ref) {
8037
+ const { open, collapsed, sketch } = useSidebar();
8038
+ const resolvedSeed = useResolvedSeed(sketch.seed);
8039
+ const width = collapsed ? SIDEBAR_WIDTH_COLLAPSED : SIDEBAR_WIDTH;
8040
+ if (!open) {
8041
+ return null;
8042
+ }
8043
+ return /* @__PURE__ */ jsxRuntime.jsxs(
8044
+ "aside",
8045
+ {
8046
+ ref,
8047
+ className: cn(className),
8048
+ style: {
8049
+ position: "relative",
8050
+ flexShrink: 0,
8051
+ width,
8052
+ minHeight: 200,
8053
+ transition: "width 200ms ease",
8054
+ display: "flex",
8055
+ flexDirection: "column",
8056
+ background: SKETCH_COLORS.paper,
8057
+ ...style
8058
+ },
8059
+ "data-side": side,
8060
+ ...rest,
8061
+ children: [
8062
+ children,
8063
+ /* @__PURE__ */ jsxRuntime.jsx(
8064
+ "span",
8065
+ {
8066
+ "aria-hidden": true,
8067
+ style: {
8068
+ position: "absolute",
8069
+ top: 0,
8070
+ bottom: 0,
8071
+ width: 4,
8072
+ ...side === "left" ? { right: 0 } : { left: 0 },
8073
+ pointerEvents: "none"
8074
+ },
8075
+ children: /* @__PURE__ */ jsxRuntime.jsx(
8076
+ RoughSvg,
8077
+ {
8078
+ shape: "line-vertical",
8079
+ roughness: sketch.roughness,
8080
+ seed: resolvedSeed,
8081
+ sketchColor: sketch.sketchColor ?? SKETCH_COLORS.ink,
8082
+ bowing: sketch.bowing,
8083
+ strokeWidth: sketch.strokeWidth ?? 1.5
8084
+ }
8085
+ )
8086
+ }
8087
+ )
8088
+ ]
8089
+ }
8090
+ );
8091
+ });
8092
+ function SidebarHeader({
8093
+ className,
8094
+ style,
8095
+ children,
8096
+ ...rest
8097
+ }) {
8098
+ const { collapsed } = useSidebar();
8099
+ return /* @__PURE__ */ jsxRuntime.jsx(
8100
+ "div",
8101
+ {
8102
+ className: cn(className),
8103
+ style: {
8104
+ padding: collapsed ? "12px 8px" : "16px 14px",
8105
+ borderBottom: `1px solid ${SKETCH_COLORS.ink}22`,
8106
+ ...style
8107
+ },
8108
+ ...rest,
8109
+ children
8110
+ }
8111
+ );
8112
+ }
8113
+ function SidebarContent({
8114
+ className,
8115
+ style,
8116
+ children,
8117
+ ...rest
8118
+ }) {
8119
+ return /* @__PURE__ */ jsxRuntime.jsx(
8120
+ "div",
8121
+ {
8122
+ className: cn(className),
8123
+ style: {
8124
+ flex: 1,
8125
+ overflow: "auto",
8126
+ padding: "8px 6px",
8127
+ ...style
8128
+ },
8129
+ ...rest,
8130
+ children
8131
+ }
8132
+ );
8133
+ }
8134
+ function SidebarFooter({
8135
+ className,
8136
+ style,
8137
+ children,
8138
+ ...rest
8139
+ }) {
8140
+ return /* @__PURE__ */ jsxRuntime.jsx(
8141
+ "div",
8142
+ {
8143
+ className: cn(className),
8144
+ style: {
8145
+ padding: "12px 10px",
8146
+ borderTop: `1px solid ${SKETCH_COLORS.ink}22`,
8147
+ ...style
8148
+ },
8149
+ ...rest,
8150
+ children
8151
+ }
8152
+ );
8153
+ }
8154
+ function SidebarGroup({
8155
+ className,
8156
+ style,
8157
+ children,
8158
+ title,
8159
+ ...rest
8160
+ }) {
8161
+ const { collapsed, ink } = useSidebar();
8162
+ return /* @__PURE__ */ jsxRuntime.jsxs(
8163
+ "div",
8164
+ {
8165
+ className: cn(className),
8166
+ style: { marginBottom: 12, ...style },
8167
+ ...rest,
8168
+ children: [
8169
+ title && !collapsed ? /* @__PURE__ */ jsxRuntime.jsx(
8170
+ "div",
8171
+ {
8172
+ style: {
8173
+ padding: "4px 10px 8px",
8174
+ fontSize: 11,
8175
+ fontWeight: doodleUiFontWeight(600),
8176
+ fontFamily: doodleUiFontFamily,
8177
+ color: ink,
8178
+ opacity: 0.65,
8179
+ textTransform: "uppercase",
8180
+ letterSpacing: "0.06em"
8181
+ },
8182
+ children: title
8183
+ }
8184
+ ) : null,
8185
+ children
8186
+ ]
8187
+ }
8188
+ );
8189
+ }
8190
+ var SidebarItem = react.forwardRef(
8191
+ function SidebarItem2({ className, style, children, active, ...rest }, ref) {
8192
+ const { collapsed, ink, sketch } = useSidebar();
8193
+ return /* @__PURE__ */ jsxRuntime.jsx(
8194
+ Button,
8195
+ {
8196
+ ref,
8197
+ type: "button",
8198
+ variant: active ? "secondary" : "ghost",
8199
+ className: cn(className),
8200
+ style: {
8201
+ width: "100%",
8202
+ justifyContent: collapsed ? "center" : "flex-start",
8203
+ marginBottom: 4,
8204
+ ...style
8205
+ },
8206
+ roughness: sketch.roughness,
8207
+ seed: sketch.seed,
8208
+ sketchColor: ink,
8209
+ bowing: sketch.bowing,
8210
+ strokeWidth: sketch.strokeWidth,
8211
+ ...rest,
8212
+ children
8213
+ }
8214
+ );
8215
+ }
8216
+ );
8217
+ function SidebarTrigger({
8218
+ className,
8219
+ style,
8220
+ children,
8221
+ ...rest
8222
+ }) {
8223
+ const { toggleCollapsed, sketch, ink } = useSidebar();
8224
+ return /* @__PURE__ */ jsxRuntime.jsx(
8225
+ Button,
8226
+ {
8227
+ type: "button",
8228
+ variant: "outline",
8229
+ size: "sm",
8230
+ className: cn(className),
8231
+ style,
8232
+ onClick: toggleCollapsed,
8233
+ roughness: sketch.roughness,
8234
+ seed: sketch.seed,
8235
+ sketchColor: ink,
8236
+ bowing: sketch.bowing,
8237
+ strokeWidth: sketch.strokeWidth,
8238
+ ...rest,
8239
+ children: children ?? "Toggle"
8240
+ }
8241
+ );
8242
+ }
8243
+ function SidebarLayout({
8244
+ className,
8245
+ style,
8246
+ children,
8247
+ ...rest
8248
+ }) {
8249
+ return /* @__PURE__ */ jsxRuntime.jsx(
8250
+ "div",
8251
+ {
8252
+ className: cn(className),
8253
+ style: {
8254
+ display: "flex",
8255
+ width: "100%",
8256
+ minHeight: 280,
8257
+ alignItems: "stretch",
8258
+ ...style
8259
+ },
8260
+ ...rest,
8261
+ children
8262
+ }
8263
+ );
8264
+ }
8265
+ function SidebarInset({
8266
+ className,
8267
+ style,
8268
+ children,
8269
+ ...rest
8270
+ }) {
8271
+ return /* @__PURE__ */ jsxRuntime.jsx(
8272
+ "div",
8273
+ {
8274
+ className: cn(className),
8275
+ style: {
8276
+ flex: 1,
8277
+ padding: 16,
8278
+ minWidth: 0,
8279
+ ...style
8280
+ },
8281
+ ...rest,
8282
+ children
8283
+ }
8284
+ );
8285
+ }
8286
+ var CarouselContext = react.createContext(null);
8287
+ function useCarousel() {
8288
+ const ctx = react.useContext(CarouselContext);
8289
+ if (!ctx) {
8290
+ throw new Error("Carousel parts must be used inside <Carousel>.");
8291
+ }
8292
+ return ctx;
8293
+ }
8294
+ function Carousel({
8295
+ opts,
8296
+ plugins,
8297
+ orientation = "horizontal",
8298
+ bordered = false,
8299
+ className,
8300
+ style,
8301
+ children,
8302
+ setApi,
8303
+ roughness,
8304
+ seed,
8305
+ sketchColor,
8306
+ bowing,
8307
+ strokeWidth,
8308
+ fillStyle,
8309
+ animate
8310
+ }) {
8311
+ const [emblaRef, api] = useEmblaCarousel__default.default(
8312
+ {
8313
+ ...opts,
8314
+ axis: orientation === "horizontal" ? "x" : "y"
8315
+ },
8316
+ plugins
8317
+ );
8318
+ const [canScrollPrev, setCanScrollPrev] = react.useState(false);
8319
+ const [canScrollNext, setCanScrollNext] = react.useState(false);
8320
+ const scrollPrev = react.useCallback(() => api?.scrollPrev(), [api]);
8321
+ const scrollNext = react.useCallback(() => api?.scrollNext(), [api]);
8322
+ const onSelect = react.useCallback(() => {
8323
+ if (!api) return;
8324
+ setCanScrollPrev(api.canScrollPrev());
8325
+ setCanScrollNext(api.canScrollNext());
8326
+ }, [api]);
8327
+ react.useEffect(() => {
8328
+ if (!api) return;
8329
+ setApi?.(api);
8330
+ onSelect();
8331
+ api.on("reInit", onSelect);
8332
+ api.on("select", onSelect);
8333
+ return () => {
8334
+ api.off("reInit", onSelect);
8335
+ api.off("select", onSelect);
8336
+ };
8337
+ }, [api, onSelect, setApi]);
8338
+ const handleKeyDown = react.useCallback(
8339
+ (event) => {
8340
+ if (orientation === "horizontal") {
8341
+ if (event.key === "ArrowLeft") {
8342
+ event.preventDefault();
8343
+ scrollPrev();
8344
+ } else if (event.key === "ArrowRight") {
8345
+ event.preventDefault();
8346
+ scrollNext();
8347
+ }
8348
+ } else if (event.key === "ArrowUp") {
8349
+ event.preventDefault();
8350
+ scrollPrev();
8351
+ } else if (event.key === "ArrowDown") {
8352
+ event.preventDefault();
8353
+ scrollNext();
8354
+ }
8355
+ },
8356
+ [orientation, scrollPrev, scrollNext]
8357
+ );
8358
+ const value = {
8359
+ emblaRef,
8360
+ api,
8361
+ scrollPrev,
8362
+ scrollNext,
8363
+ canScrollPrev,
8364
+ canScrollNext,
8365
+ orientation,
8366
+ sketch: {
8367
+ roughness,
8368
+ seed,
8369
+ sketchColor,
8370
+ bowing,
8371
+ strokeWidth,
8372
+ fillStyle,
8373
+ animate
8374
+ },
8375
+ bordered
8376
+ };
8377
+ return /* @__PURE__ */ jsxRuntime.jsx(CarouselContext.Provider, { value, children: /* @__PURE__ */ jsxRuntime.jsx(
8378
+ "div",
8379
+ {
8380
+ className: cn(className),
8381
+ role: "region",
8382
+ "aria-roledescription": "carousel",
8383
+ tabIndex: 0,
8384
+ onKeyDown: handleKeyDown,
8385
+ style: {
8386
+ position: "relative",
8387
+ width: "100%",
8388
+ ...style
8389
+ },
8390
+ children
8391
+ }
8392
+ ) });
8393
+ }
8394
+ var CarouselContent = react.forwardRef(
8395
+ function CarouselContent2({ className, style, children, ...rest }, ref) {
8396
+ const { emblaRef, orientation, bordered, sketch } = useCarousel();
8397
+ const viewport = /* @__PURE__ */ jsxRuntime.jsx("div", { ref: emblaRef, style: { overflow: "hidden" }, children: /* @__PURE__ */ jsxRuntime.jsx(
8398
+ "div",
8399
+ {
8400
+ ref,
8401
+ className: cn(className),
8402
+ style: {
8403
+ display: "flex",
8404
+ flexDirection: orientation === "vertical" ? "column" : "row",
8405
+ marginLeft: orientation === "horizontal" ? -16 : 0,
8406
+ marginTop: orientation === "vertical" ? -16 : 0,
8407
+ ...style
8408
+ },
8409
+ ...rest,
8410
+ children
8411
+ }
8412
+ ) });
8413
+ if (!bordered) {
8414
+ return viewport;
8415
+ }
8416
+ return /* @__PURE__ */ jsxRuntime.jsx(
8417
+ SketchBox,
8418
+ {
8419
+ fill: SKETCH_COLORS.paper,
8420
+ fillStyle: sketch.fillStyle ?? "hachure",
8421
+ roughness: sketch.roughness,
8422
+ seed: sketch.seed,
8423
+ sketchColor: sketch.sketchColor,
8424
+ bowing: sketch.bowing,
8425
+ strokeWidth: sketch.strokeWidth,
8426
+ animate: sketch.animate,
8427
+ contentStyle: { padding: 8 },
8428
+ children: viewport
8429
+ }
8430
+ );
8431
+ }
8432
+ );
8433
+ var CarouselItem = react.forwardRef(
8434
+ function CarouselItem2({ className, style, children, ...rest }, ref) {
8435
+ const { orientation } = useCarousel();
8436
+ const gap = 16;
8437
+ return /* @__PURE__ */ jsxRuntime.jsx(
8438
+ "div",
8439
+ {
8440
+ ref,
8441
+ className: cn(className),
8442
+ role: "group",
8443
+ "aria-roledescription": "slide",
8444
+ style: {
8445
+ flex: "0 0 100%",
8446
+ minWidth: 0,
8447
+ paddingLeft: orientation === "horizontal" ? gap : 0,
8448
+ paddingTop: orientation === "vertical" ? gap : 0,
8449
+ ...style
8450
+ },
8451
+ ...rest,
8452
+ children
8453
+ }
8454
+ );
8455
+ }
8456
+ );
8457
+ var ARROW_PATH_PREV = "M 14 4 L 6 12 L 14 20";
8458
+ var ARROW_PATH_NEXT = "M 6 4 L 14 12 L 6 20";
8459
+ var ARROW_SIZE = 40;
8460
+ var CarouselArrow = react.forwardRef(function CarouselArrow2({ className, style, direction, ...rest }, ref) {
8461
+ const {
8462
+ scrollPrev,
8463
+ scrollNext,
8464
+ canScrollPrev,
8465
+ canScrollNext,
8466
+ sketch,
8467
+ orientation
8468
+ } = useCarousel();
8469
+ const resolvedSeed = useResolvedSeed(sketch.seed);
8470
+ const ink = sketch.sketchColor ?? SKETCH_COLORS.ink;
8471
+ const isPrev = direction === "prev";
8472
+ const disabled = isPrev ? !canScrollPrev : !canScrollNext;
8473
+ const shouldAnimate = useAnimate(sketch.animate);
8474
+ const rootRef = react.useRef(null);
8475
+ const sketchSeed = deriveSeed(resolvedSeed, direction);
8476
+ useDrawIn(rootRef, DRAW_IN_DURATION_MS, shouldAnimate, sketchSeed);
8477
+ const horizontal = orientation === "horizontal";
8478
+ return /* @__PURE__ */ jsxRuntime.jsxs(
8479
+ "button",
8480
+ {
8481
+ ref: (node) => {
8482
+ rootRef.current = node;
8483
+ assignRef(ref, node);
8484
+ },
8485
+ type: "button",
8486
+ disabled,
8487
+ className: cn(className),
8488
+ style: {
8489
+ position: "absolute",
8490
+ zIndex: 2,
8491
+ width: ARROW_SIZE,
8492
+ height: ARROW_SIZE,
8493
+ padding: 0,
8494
+ border: "none",
8495
+ background: "transparent",
8496
+ cursor: disabled ? "not-allowed" : "pointer",
8497
+ opacity: disabled ? 0.5 : 1,
8498
+ ...horizontal ? {
8499
+ top: "50%",
8500
+ transform: "translateY(-50%)",
8501
+ left: isPrev ? -52 : void 0,
8502
+ right: isPrev ? void 0 : -52
8503
+ } : {
8504
+ left: "50%",
8505
+ transform: "translateX(-50%) rotate(90deg)",
8506
+ top: isPrev ? -52 : void 0,
8507
+ bottom: isPrev ? void 0 : -52
8508
+ },
8509
+ ...style
8510
+ },
8511
+ onClick: isPrev ? scrollPrev : scrollNext,
8512
+ "aria-label": isPrev ? "Previous slide" : "Next slide",
8513
+ ...rest,
8514
+ children: [
8515
+ /* @__PURE__ */ jsxRuntime.jsx(
8516
+ RoughSvg,
8517
+ {
8518
+ shape: "ellipse",
8519
+ roughness: sketch.roughness,
8520
+ seed: sketchSeed,
8521
+ sketchColor: ink,
8522
+ bowing: sketch.bowing,
8523
+ fill: SKETCH_COLORS.paper,
8524
+ fillStyle: "solid",
8525
+ strokeWidth: sketch.strokeWidth ?? 1.5,
8526
+ inset: 1.5
8527
+ }
8528
+ ),
8529
+ /* @__PURE__ */ jsxRuntime.jsx(
8530
+ "span",
8531
+ {
8532
+ style: {
8533
+ position: "relative",
8534
+ zIndex: 1,
8535
+ width: 18,
8536
+ height: 22,
8537
+ display: "block",
8538
+ margin: "0 auto"
8539
+ },
8540
+ children: /* @__PURE__ */ jsxRuntime.jsx(
8541
+ RoughSvg,
8542
+ {
8543
+ shape: "path",
8544
+ path: isPrev ? ARROW_PATH_PREV : ARROW_PATH_NEXT,
8545
+ roughness: sketch.roughness,
8546
+ seed: deriveSeed(resolvedSeed, `${direction}-arrow`),
8547
+ sketchColor: ink,
8548
+ strokeWidth: sketch.strokeWidth ?? 1.6
8549
+ }
8550
+ )
8551
+ }
8552
+ )
8553
+ ]
8554
+ }
8555
+ );
8556
+ });
8557
+ var CarouselPrevious = react.forwardRef(
8558
+ function CarouselPrevious2(props, ref) {
8559
+ return /* @__PURE__ */ jsxRuntime.jsx(CarouselArrow, { ref, direction: "prev", ...props });
8560
+ }
8561
+ );
8562
+ var CarouselNext = react.forwardRef(
8563
+ function CarouselNext2(props, ref) {
8564
+ return /* @__PURE__ */ jsxRuntime.jsx(CarouselArrow, { ref, direction: "next", ...props });
8565
+ }
8566
+ );
5218
8567
 
5219
8568
  exports.Accordion = Accordion;
5220
8569
  exports.AccordionContent = AccordionContent;
@@ -5232,12 +8581,19 @@ exports.AlertDialogOverlay = AlertDialogOverlay;
5232
8581
  exports.AlertDialogPortal = AlertDialogPortal;
5233
8582
  exports.AlertDialogTitle = AlertDialogTitle;
5234
8583
  exports.AlertDialogTrigger = AlertDialogTrigger;
8584
+ exports.AspectRatio = AspectRatio;
5235
8585
  exports.Avatar = Avatar;
5236
8586
  exports.Badge = Badge;
8587
+ exports.Blockquote = Blockquote;
5237
8588
  exports.Breadcrumb = Breadcrumb;
5238
8589
  exports.BreadcrumbItem = BreadcrumbItem;
5239
8590
  exports.Button = Button;
5240
8591
  exports.Card = Card;
8592
+ exports.Carousel = Carousel;
8593
+ exports.CarouselContent = CarouselContent;
8594
+ exports.CarouselItem = CarouselItem;
8595
+ exports.CarouselNext = CarouselNext;
8596
+ exports.CarouselPrevious = CarouselPrevious;
5241
8597
  exports.Checkbox = Checkbox;
5242
8598
  exports.Collapsible = Collapsible;
5243
8599
  exports.CollapsibleContent = CollapsibleContent;
@@ -5251,6 +8607,17 @@ exports.CommandItem = CommandItem;
5251
8607
  exports.CommandList = CommandList;
5252
8608
  exports.CommandSeparator = CommandSeparator;
5253
8609
  exports.CommandShortcut = CommandShortcut;
8610
+ exports.ContextMenu = ContextMenu;
8611
+ exports.ContextMenuCheckboxItem = ContextMenuCheckboxItem;
8612
+ exports.ContextMenuContent = ContextMenuContent;
8613
+ exports.ContextMenuGroup = ContextMenuGroup;
8614
+ exports.ContextMenuItem = ContextMenuItem;
8615
+ exports.ContextMenuLabel = ContextMenuLabel;
8616
+ exports.ContextMenuRadioGroup = ContextMenuRadioGroup;
8617
+ exports.ContextMenuRadioItem = ContextMenuRadioItem;
8618
+ exports.ContextMenuSeparator = ContextMenuSeparator;
8619
+ exports.ContextMenuSub = ContextMenuSub;
8620
+ exports.ContextMenuTrigger = ContextMenuTrigger;
5254
8621
  exports.DEFAULT_BOWING = DEFAULT_BOWING;
5255
8622
  exports.DEFAULT_INK = DEFAULT_INK;
5256
8623
  exports.DEFAULT_ROUGHNESS = DEFAULT_ROUGHNESS;
@@ -5271,6 +8638,15 @@ exports.DialogTitle = DialogTitle;
5271
8638
  exports.DialogTrigger = DialogTrigger;
5272
8639
  exports.Divider = Divider;
5273
8640
  exports.DoodleUIProvider = DoodleUIProvider;
8641
+ exports.Drawer = Drawer;
8642
+ exports.DrawerClose = DrawerClose;
8643
+ exports.DrawerContent = DrawerContent;
8644
+ exports.DrawerDescription = DrawerDescription;
8645
+ exports.DrawerFooter = DrawerFooter;
8646
+ exports.DrawerHandle = DrawerHandle;
8647
+ exports.DrawerHeader = DrawerHeader;
8648
+ exports.DrawerTitle = DrawerTitle;
8649
+ exports.DrawerTrigger = DrawerTrigger;
5274
8650
  exports.DropdownMenu = DropdownMenu;
5275
8651
  exports.DropdownMenuCheckboxItem = DropdownMenuCheckboxItem;
5276
8652
  exports.DropdownMenuContent = DropdownMenuContent;
@@ -5282,15 +8658,66 @@ exports.DropdownMenuRadioItem = DropdownMenuRadioItem;
5282
8658
  exports.DropdownMenuSeparator = DropdownMenuSeparator;
5283
8659
  exports.DropdownMenuSub = DropdownMenuSub;
5284
8660
  exports.DropdownMenuTrigger = DropdownMenuTrigger;
8661
+ exports.Empty = Empty;
8662
+ exports.EmptyAction = EmptyAction;
8663
+ exports.EmptyDescription = EmptyDescription;
8664
+ exports.EmptyMedia = EmptyMedia;
8665
+ exports.EmptyTitle = EmptyTitle;
8666
+ exports.Field = Field;
8667
+ exports.FieldControl = FieldControl;
8668
+ exports.FieldDescription = FieldDescription;
8669
+ exports.FieldError = FieldError;
8670
+ exports.FieldLabel = FieldLabel;
8671
+ exports.Heading = Heading;
8672
+ exports.Highlight = Highlight;
8673
+ exports.HoverCard = HoverCard;
8674
+ exports.HoverCardArrow = HoverCardArrow;
8675
+ exports.HoverCardContent = HoverCardContent;
8676
+ exports.HoverCardTrigger = HoverCardTrigger;
8677
+ exports.InlineCode = InlineCode;
5285
8678
  exports.Input = Input;
8679
+ exports.InputGroup = InputGroup;
8680
+ exports.InputGroupAddon = InputGroupAddon;
8681
+ exports.InputGroupButton = InputGroupButton;
8682
+ exports.InputGroupInput = InputGroupInput;
8683
+ exports.InputOTP = InputOTP;
8684
+ exports.InputOTPGroup = InputOTPGroup;
8685
+ exports.InputOTPSeparator = InputOTPSeparator;
8686
+ exports.InputOTPSlot = InputOTPSlot;
8687
+ exports.Kbd = Kbd;
5286
8688
  exports.Label = Label2;
8689
+ exports.Menubar = Menubar;
8690
+ exports.MenubarCheckboxItem = MenubarCheckboxItem;
8691
+ exports.MenubarContent = MenubarContent;
8692
+ exports.MenubarItem = MenubarItem;
8693
+ exports.MenubarLabel = MenubarLabel;
8694
+ exports.MenubarMenu = MenubarMenu;
8695
+ exports.MenubarRadioGroup = MenubarRadioGroup;
8696
+ exports.MenubarRadioItem = MenubarRadioItem;
8697
+ exports.MenubarSeparator = MenubarSeparator;
8698
+ exports.MenubarShortcut = MenubarShortcut;
8699
+ exports.MenubarSub = MenubarSub;
8700
+ exports.MenubarSubContent = MenubarSubContent;
8701
+ exports.MenubarSubTrigger = MenubarSubTrigger;
8702
+ exports.MenubarTrigger = MenubarTrigger;
5287
8703
  exports.Modal = Modal;
5288
8704
  exports.ModalClose = ModalClose;
5289
8705
  exports.ModalDescription = ModalDescription;
5290
8706
  exports.ModalRoot = ModalRoot;
5291
8707
  exports.ModalTitle = ModalTitle;
5292
8708
  exports.ModalTrigger = ModalTrigger;
8709
+ exports.NativeSelect = NativeSelect;
8710
+ exports.NavigationMenu = NavigationMenu;
8711
+ exports.NavigationMenuContent = NavigationMenuContent;
8712
+ exports.NavigationMenuIndicator = NavigationMenuIndicator;
8713
+ exports.NavigationMenuItem = NavigationMenuItem;
8714
+ exports.NavigationMenuItemLink = NavigationMenuItemLink;
8715
+ exports.NavigationMenuLink = NavigationMenuLink;
8716
+ exports.NavigationMenuList = NavigationMenuList;
8717
+ exports.NavigationMenuTrigger = NavigationMenuTrigger;
8718
+ exports.NavigationMenuViewport = NavigationMenuViewport;
5293
8719
  exports.Pagination = Pagination;
8720
+ exports.Paragraph = Paragraph;
5294
8721
  exports.Popover = Popover;
5295
8722
  exports.PopoverAnchor = PopoverAnchor;
5296
8723
  exports.PopoverArrow = PopoverArrow;
@@ -5300,8 +8727,15 @@ exports.PopoverTrigger = PopoverTrigger;
5300
8727
  exports.Progress = Progress;
5301
8728
  exports.Radio = Radio;
5302
8729
  exports.RadioGroup = RadioGroup;
8730
+ exports.ResizableHandle = ResizableHandle;
8731
+ exports.ResizablePanel = ResizablePanel;
8732
+ exports.ResizablePanelGroup = ResizablePanelGroup;
5303
8733
  exports.RoughSvg = RoughSvg;
5304
8734
  exports.SKETCH_COLORS = SKETCH_COLORS;
8735
+ exports.ScrollArea = ScrollArea;
8736
+ exports.ScrollAreaCorner = ScrollAreaCorner;
8737
+ exports.ScrollAreaViewport = ScrollAreaViewport;
8738
+ exports.ScrollBar = ScrollBar;
5305
8739
  exports.Select = Select;
5306
8740
  exports.SelectContent = SelectContent;
5307
8741
  exports.SelectGroup = SelectGroup;
@@ -5311,10 +8745,29 @@ exports.SelectRoot = SelectRoot;
5311
8745
  exports.SelectSeparator = SelectSeparator;
5312
8746
  exports.SelectTrigger = SelectTrigger;
5313
8747
  exports.SelectValue = SelectValue;
8748
+ exports.Sheet = Sheet;
8749
+ exports.SheetClose = SheetClose;
8750
+ exports.SheetContent = SheetContent;
8751
+ exports.SheetDescription = SheetDescription;
8752
+ exports.SheetFooter = SheetFooter;
8753
+ exports.SheetHeader = SheetHeader;
8754
+ exports.SheetTitle = SheetTitle;
8755
+ exports.SheetTrigger = SheetTrigger;
8756
+ exports.Sidebar = Sidebar;
8757
+ exports.SidebarContent = SidebarContent;
8758
+ exports.SidebarFooter = SidebarFooter;
8759
+ exports.SidebarGroup = SidebarGroup;
8760
+ exports.SidebarHeader = SidebarHeader;
8761
+ exports.SidebarInset = SidebarInset;
8762
+ exports.SidebarItem = SidebarItem;
8763
+ exports.SidebarLayout = SidebarLayout;
8764
+ exports.SidebarProvider = SidebarProvider;
8765
+ exports.SidebarTrigger = SidebarTrigger;
5314
8766
  exports.Skeleton = Skeleton;
5315
8767
  exports.SketchBox = SketchBox;
5316
8768
  exports.SketchSeedProvider = SketchSeedProvider;
5317
8769
  exports.Slider = Slider;
8770
+ exports.Spinner = Spinner;
5318
8771
  exports.Stepper = Stepper;
5319
8772
  exports.Switch = Switch;
5320
8773
  exports.TABLE_STAGGER_MS = TABLE_STAGGER_MS;
@@ -5328,6 +8781,7 @@ exports.TableHead = TableHead;
5328
8781
  exports.TableHeaderCell = TableHeaderCell;
5329
8782
  exports.TableRow = TableRow;
5330
8783
  exports.Tabs = Tabs;
8784
+ exports.Text = Text;
5331
8785
  exports.Textarea = Textarea;
5332
8786
  exports.Toast = Toast;
5333
8787
  exports.ToastAction = ToastAction;
@@ -5337,14 +8791,19 @@ exports.ToastProvider = ToastProvider;
5337
8791
  exports.ToastRoot = ToastRoot;
5338
8792
  exports.ToastTitle = ToastTitle;
5339
8793
  exports.ToastViewport = ToastViewport;
8794
+ exports.Toggle = Toggle;
8795
+ exports.ToggleGroup = ToggleGroup;
8796
+ exports.ToggleGroupItem = ToggleGroupItem;
5340
8797
  exports.Tooltip = Tooltip;
5341
8798
  exports.TooltipProvider = TooltipProvider;
5342
8799
  exports.deriveSeed = deriveSeed;
5343
8800
  exports.toRoughOptions = toRoughOptions;
5344
8801
  exports.useAnimate = useAnimate;
8802
+ exports.useCarousel = useCarousel;
5345
8803
  exports.useDoodleUI = useDoodleUI;
5346
8804
  exports.useDrawIn = useDrawIn;
5347
8805
  exports.useResolvedSeed = useResolvedSeed;
8806
+ exports.useSidebar = useSidebar;
5348
8807
  exports.useSketchSeed = useSketchSeed;
5349
8808
  //# sourceMappingURL=index.cjs.map
5350
8809
  //# sourceMappingURL=index.cjs.map