@bug-on/m3-expressive 1.2.3 → 1.2.5
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/CHANGELOG.md +15 -0
- package/README.md +128 -41
- package/dist/buttons.d.mts +1 -1
- package/dist/buttons.d.ts +1 -1
- package/dist/buttons.js +33 -14
- package/dist/buttons.js.map +1 -1
- package/dist/buttons.mjs +33 -14
- package/dist/buttons.mjs.map +1 -1
- package/dist/forms.d.mts +2 -2
- package/dist/forms.d.ts +2 -2
- package/dist/index.d.mts +79 -7
- package/dist/index.d.ts +79 -7
- package/dist/index.js +6071 -5547
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5964 -5441
- package/dist/index.mjs.map +1 -1
- package/dist/layout.js +10 -7
- package/dist/layout.js.map +1 -1
- package/dist/layout.mjs +10 -7
- package/dist/layout.mjs.map +1 -1
- package/dist/md3-expressive-shapes-CPcfl_Hf.d.mts +498 -0
- package/dist/md3-expressive-shapes-CPcfl_Hf.d.ts +498 -0
- package/dist/navigation.d.mts +93 -20
- package/dist/navigation.d.ts +93 -20
- package/dist/navigation.js +2824 -561
- package/dist/navigation.js.map +1 -1
- package/dist/navigation.mjs +2815 -554
- package/dist/navigation.mjs.map +1 -1
- package/dist/overlays.d.mts +2 -2
- package/dist/overlays.d.ts +2 -2
- package/dist/shapes.d.mts +3 -498
- package/dist/shapes.d.ts +3 -498
- package/dist/{side-sheet-modal-Bd5Qqvp9.d.ts → side-sheet-modal-DdEZR6Vl.d.ts} +1 -1
- package/dist/{side-sheet-modal-64FGhDxL.d.mts → side-sheet-modal-Dgjt739k.d.mts} +1 -1
- package/dist/{split-button-trailing-uncheckable-C-qQlyZx.d.ts → split-button-trailing-uncheckable--BhNTEJw.d.ts} +10 -5
- package/dist/{split-button-trailing-uncheckable-DHJqNeq_.d.mts → split-button-trailing-uncheckable-DPJL3bO6.d.mts} +10 -5
- package/dist/{text-field-T4Rg-9Bw.d.mts → text-field-DWC7qOvp.d.mts} +128 -128
- package/dist/{text-field-T4Rg-9Bw.d.ts → text-field-DWC7qOvp.d.ts} +128 -128
- package/package.json +3 -3
package/dist/navigation.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var React37 = require('react');
|
|
5
5
|
var clsx = require('clsx');
|
|
6
6
|
var tailwindMerge = require('tailwind-merge');
|
|
7
7
|
var jsxRuntime = require('react/jsx-runtime');
|
|
@@ -31,7 +31,7 @@ function _interopNamespace(e) {
|
|
|
31
31
|
return Object.freeze(n);
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
var
|
|
34
|
+
var React37__namespace = /*#__PURE__*/_interopNamespace(React37);
|
|
35
35
|
var RxContextMenu__namespace = /*#__PURE__*/_interopNamespace(RxContextMenu);
|
|
36
36
|
var DropdownMenu__namespace = /*#__PURE__*/_interopNamespace(DropdownMenu);
|
|
37
37
|
|
|
@@ -328,9 +328,10 @@ var SUBMENU_CONTAINER_VARIANTS = {
|
|
|
328
328
|
transition: FAST_EFFECTS_TRANSITION
|
|
329
329
|
}
|
|
330
330
|
};
|
|
331
|
-
var MenuContext =
|
|
331
|
+
var MenuContext = React37__namespace.createContext({
|
|
332
332
|
variant: "baseline",
|
|
333
333
|
colorVariant: "standard",
|
|
334
|
+
density: 0,
|
|
334
335
|
menuPrimitive: "dropdown",
|
|
335
336
|
open: false,
|
|
336
337
|
onOpenChange: () => {
|
|
@@ -339,29 +340,46 @@ var MenuContext = React36__namespace.createContext({
|
|
|
339
340
|
function MenuProvider({
|
|
340
341
|
variant = "baseline",
|
|
341
342
|
colorVariant = "standard",
|
|
343
|
+
density = 0,
|
|
342
344
|
menuPrimitive = "dropdown",
|
|
343
345
|
open,
|
|
344
346
|
onOpenChange,
|
|
345
347
|
children
|
|
346
348
|
}) {
|
|
347
|
-
const value =
|
|
348
|
-
() => ({
|
|
349
|
-
|
|
349
|
+
const value = React37__namespace.useMemo(
|
|
350
|
+
() => ({
|
|
351
|
+
variant,
|
|
352
|
+
colorVariant,
|
|
353
|
+
density,
|
|
354
|
+
menuPrimitive,
|
|
355
|
+
open,
|
|
356
|
+
onOpenChange
|
|
357
|
+
}),
|
|
358
|
+
[variant, colorVariant, density, menuPrimitive, open, onOpenChange]
|
|
350
359
|
);
|
|
351
360
|
return /* @__PURE__ */ jsxRuntime.jsx(MenuContext.Provider, { value, children });
|
|
352
361
|
}
|
|
353
362
|
function useMenuContext() {
|
|
354
|
-
const ctx =
|
|
355
|
-
return
|
|
356
|
-
() =>
|
|
357
|
-
isStatic
|
|
358
|
-
|
|
363
|
+
const ctx = React37__namespace.useContext(MenuContext);
|
|
364
|
+
return React37__namespace.useMemo(
|
|
365
|
+
() => Object.assign(ctx, {
|
|
366
|
+
get isStatic() {
|
|
367
|
+
return ctx.menuPrimitive === "static";
|
|
368
|
+
},
|
|
369
|
+
get menuVariant() {
|
|
370
|
+
return ctx.variant;
|
|
371
|
+
}
|
|
359
372
|
}),
|
|
360
373
|
[ctx]
|
|
361
374
|
);
|
|
362
375
|
}
|
|
363
376
|
var MENU_BASELINE_ITEM_HORIZONTAL_PADDING = "px-3";
|
|
364
377
|
var MENU_ITEM_MIN_HEIGHT = "min-h-11";
|
|
378
|
+
var DENSITY_MIN_HEIGHT = {
|
|
379
|
+
0: "min-h-12",
|
|
380
|
+
"-2": "min-h-10",
|
|
381
|
+
"-4": "min-h-8"
|
|
382
|
+
};
|
|
365
383
|
var MENU_MIN_WIDTH = "min-w-28";
|
|
366
384
|
var MENU_MAX_WIDTH = "max-w-70";
|
|
367
385
|
var MENU_GROUP_GAP = "gap-0.5";
|
|
@@ -394,7 +412,7 @@ var ITEM_SHAPE_CLASSES = {
|
|
|
394
412
|
leading: "rounded-t-[12px] rounded-b-[4px]",
|
|
395
413
|
middle: "rounded-[4px]",
|
|
396
414
|
trailing: "rounded-t-[4px] rounded-b-[12px]",
|
|
397
|
-
standalone: "rounded-[
|
|
415
|
+
standalone: "rounded-[12px]",
|
|
398
416
|
selected: "rounded-[12px]"
|
|
399
417
|
};
|
|
400
418
|
var STANDARD_COLORS = {
|
|
@@ -411,9 +429,9 @@ var STANDARD_COLORS = {
|
|
|
411
429
|
/** Trailing icon color (StandardMenuTokens.ItemTrailingIconColor) */
|
|
412
430
|
trailingIconColor: "text-m3-on-surface-variant",
|
|
413
431
|
/** Hover state layer (OnSurface @ 8% opacity) */
|
|
414
|
-
hoverLayer: "hover:bg-m3-on-surface/8",
|
|
432
|
+
hoverLayer: "hover:bg-m3-on-surface/8 data-[highlighted]:bg-m3-on-surface/8",
|
|
415
433
|
/** Focus state layer (OnSurface @ 12% opacity) */
|
|
416
|
-
focusLayer: "focus:bg-m3-on-surface/12",
|
|
434
|
+
focusLayer: "focus:bg-m3-on-surface/12 data-[highlighted]:bg-m3-on-surface/8",
|
|
417
435
|
/** Selected item background (StandardMenuTokens.ItemSelectedContainerColor) */
|
|
418
436
|
selectedBg: "bg-m3-tertiary-container",
|
|
419
437
|
/** Selected item text (StandardMenuTokens.ItemSelectedLabelTextColor) */
|
|
@@ -429,8 +447,8 @@ var BASELINE_COLORS = {
|
|
|
429
447
|
iconColor: "text-m3-on-surface-variant",
|
|
430
448
|
supportingTextColor: "text-m3-on-surface-variant",
|
|
431
449
|
trailingIconColor: "text-m3-on-surface-variant",
|
|
432
|
-
hoverLayer: "hover:bg-m3-on-surface/8",
|
|
433
|
-
focusLayer: "focus:bg-m3-on-surface/12",
|
|
450
|
+
hoverLayer: "hover:bg-m3-on-surface/8 data-[highlighted]:bg-m3-on-surface/8",
|
|
451
|
+
focusLayer: "focus:bg-m3-on-surface/12 data-[highlighted]:bg-m3-on-surface/8",
|
|
434
452
|
selectedBg: "bg-m3-secondary-container",
|
|
435
453
|
selectedText: "text-m3-on-secondary-container",
|
|
436
454
|
selectedIcon: "text-m3-on-secondary-container"};
|
|
@@ -448,9 +466,9 @@ var VIBRANT_COLORS = {
|
|
|
448
466
|
/** Trailing icon color (VibrantMenuTokens.ItemTrailingIconColor) */
|
|
449
467
|
trailingIconColor: "text-m3-on-tertiary-container",
|
|
450
468
|
/** Hover state layer (OnTertiaryContainer @ 8% opacity) */
|
|
451
|
-
hoverLayer: "hover:bg-m3-on-tertiary-container/8",
|
|
469
|
+
hoverLayer: "hover:bg-m3-on-tertiary-container/8 data-[highlighted]:bg-m3-on-tertiary-container/8",
|
|
452
470
|
/** Focus state layer (OnTertiaryContainer @ 12% opacity) */
|
|
453
|
-
focusLayer: "focus:bg-m3-on-tertiary-container/12",
|
|
471
|
+
focusLayer: "focus:bg-m3-on-tertiary-container/12 data-[highlighted]:bg-m3-on-tertiary-container/8",
|
|
454
472
|
/** Selected item background (VibrantMenuTokens.ItemSelectedContainerColor = Tertiary) */
|
|
455
473
|
selectedBg: "bg-m3-tertiary",
|
|
456
474
|
/** Selected item text (VibrantMenuTokens.ItemSelectedLabelTextColor = OnTertiary) */
|
|
@@ -462,12 +480,29 @@ var VIBRANT_COLORS = {
|
|
|
462
480
|
};
|
|
463
481
|
var DIVIDER_PADDING = "mx-3 my-0.5";
|
|
464
482
|
var DIVIDER_COLOR = "bg-m3-outline-variant";
|
|
483
|
+
function flattenChildren(nodes) {
|
|
484
|
+
return React37__namespace.Children.toArray(nodes).reduce(
|
|
485
|
+
(acc, child) => {
|
|
486
|
+
if (!React37__namespace.isValidElement(child)) return acc;
|
|
487
|
+
if (child.type === React37__namespace.Fragment) {
|
|
488
|
+
return acc.concat(
|
|
489
|
+
flattenChildren(
|
|
490
|
+
child.props.children
|
|
491
|
+
)
|
|
492
|
+
);
|
|
493
|
+
}
|
|
494
|
+
acc.push(child);
|
|
495
|
+
return acc;
|
|
496
|
+
},
|
|
497
|
+
[]
|
|
498
|
+
);
|
|
499
|
+
}
|
|
465
500
|
function ContextMenu({
|
|
466
501
|
children,
|
|
467
502
|
variant = "baseline",
|
|
468
503
|
colorVariant = "standard"
|
|
469
504
|
}) {
|
|
470
|
-
const [open, setOpen] =
|
|
505
|
+
const [open, setOpen] = React37__namespace.useState(false);
|
|
471
506
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
472
507
|
MenuProvider,
|
|
473
508
|
{
|
|
@@ -481,12 +516,12 @@ function ContextMenu({
|
|
|
481
516
|
);
|
|
482
517
|
}
|
|
483
518
|
ContextMenu.displayName = "ContextMenu";
|
|
484
|
-
var ContextMenuTrigger =
|
|
519
|
+
var ContextMenuTrigger = React37__namespace.forwardRef((_a, ref) => {
|
|
485
520
|
var _b = _a, { children, asChild = true } = _b, props = __objRest(_b, ["children", "asChild"]);
|
|
486
521
|
return /* @__PURE__ */ jsxRuntime.jsx(RxContextMenu__namespace.Trigger, __spreadProps(__spreadValues({ ref, asChild }, props), { children }));
|
|
487
522
|
});
|
|
488
523
|
ContextMenuTrigger.displayName = "ContextMenuTrigger";
|
|
489
|
-
var ContextMenuContent =
|
|
524
|
+
var ContextMenuContent = React37__namespace.forwardRef(
|
|
490
525
|
(_a, ref) => {
|
|
491
526
|
var _b = _a, {
|
|
492
527
|
children,
|
|
@@ -509,71 +544,51 @@ var ContextMenuContent = React36__namespace.forwardRef(
|
|
|
509
544
|
const colorVariant = propColorVariant != null ? propColorVariant : contextColorVariant;
|
|
510
545
|
const colors = variant === "baseline" ? BASELINE_COLORS : colorVariant === "vibrant" ? VIBRANT_COLORS : STANDARD_COLORS;
|
|
511
546
|
const isExpressiveGap = variant === "expressive" && separatorStyle === "gap";
|
|
512
|
-
const containerClassName =
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
547
|
+
const containerClassName = React37__namespace.useMemo(
|
|
548
|
+
() => variant === "expressive" ? cn(
|
|
549
|
+
"z-50 flex flex-col w-full",
|
|
550
|
+
MENU_MIN_WIDTH,
|
|
551
|
+
MENU_MAX_WIDTH,
|
|
552
|
+
isExpressiveGap ? MENU_GROUP_GAP : "",
|
|
553
|
+
isExpressiveGap ? "bg-transparent" : colors.containerBg,
|
|
554
|
+
isExpressiveGap ? "" : "rounded-2xl",
|
|
555
|
+
isExpressiveGap ? "" : "elevation-2",
|
|
556
|
+
hasOverflow || isExpressiveGap ? "overflow-visible" : "overflow-hidden",
|
|
557
|
+
"outline-none",
|
|
558
|
+
className
|
|
559
|
+
) : cn(
|
|
560
|
+
"z-50 flex flex-col",
|
|
561
|
+
MENU_MIN_WIDTH,
|
|
562
|
+
MENU_MAX_WIDTH,
|
|
563
|
+
MENU_POPUP_PADDING_Y,
|
|
564
|
+
MENU_GROUP_GAP,
|
|
565
|
+
colors.containerBg,
|
|
566
|
+
MENU_CONTAINER_SHAPE,
|
|
567
|
+
"elevation-2",
|
|
568
|
+
hasOverflow ? "overflow-visible" : "overflow-hidden",
|
|
569
|
+
"outline-none",
|
|
570
|
+
className
|
|
571
|
+
),
|
|
572
|
+
[variant, isExpressiveGap, hasOverflow, className, colors.containerBg]
|
|
535
573
|
);
|
|
536
|
-
const
|
|
537
|
-
|
|
538
|
-
(acc, child) => {
|
|
539
|
-
if (React36__namespace.isValidElement(child)) {
|
|
540
|
-
if (child.type === React36__namespace.Fragment) {
|
|
541
|
-
return acc.concat(
|
|
542
|
-
flattenChildren(
|
|
543
|
-
child.props.children
|
|
544
|
-
)
|
|
545
|
-
);
|
|
546
|
-
}
|
|
547
|
-
acc.push(child);
|
|
548
|
-
}
|
|
549
|
-
return acc;
|
|
550
|
-
},
|
|
551
|
-
[]
|
|
552
|
-
);
|
|
553
|
-
};
|
|
554
|
-
let renderedChildren = children;
|
|
555
|
-
if (variant === "expressive") {
|
|
574
|
+
const renderedChildren = React37__namespace.useMemo(() => {
|
|
575
|
+
if (variant !== "expressive") return children;
|
|
556
576
|
const validChildren = flattenChildren(children);
|
|
557
577
|
const groupCount = validChildren.length;
|
|
558
|
-
const
|
|
559
|
-
(child, i) =>
|
|
578
|
+
const enhanced = validChildren.map(
|
|
579
|
+
(child, i) => React37__namespace.cloneElement(
|
|
560
580
|
child,
|
|
561
|
-
{
|
|
562
|
-
index: i,
|
|
563
|
-
count: groupCount,
|
|
564
|
-
isGapVariant: isExpressiveGap
|
|
565
|
-
}
|
|
581
|
+
{ index: i, count: groupCount, isGapVariant: isExpressiveGap }
|
|
566
582
|
)
|
|
567
583
|
);
|
|
568
|
-
|
|
584
|
+
if (separatorStyle !== "divider") return enhanced;
|
|
585
|
+
return enhanced.reduce((acc, child, i) => {
|
|
569
586
|
if (i > 0) {
|
|
570
587
|
acc.push(
|
|
571
588
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
572
589
|
"hr",
|
|
573
590
|
{
|
|
574
|
-
className: cn(
|
|
575
|
-
"mx-3 my-0.5 h-px border-0 bg-m3-outline-variant"
|
|
576
|
-
)
|
|
591
|
+
className: cn("mx-3 my-0.5 h-px border-0 bg-m3-outline-variant")
|
|
577
592
|
},
|
|
578
593
|
`divider-${child.key || i}`
|
|
579
594
|
)
|
|
@@ -581,8 +596,8 @@ var ContextMenuContent = React36__namespace.forwardRef(
|
|
|
581
596
|
}
|
|
582
597
|
acc.push(child);
|
|
583
598
|
return acc;
|
|
584
|
-
}, [])
|
|
585
|
-
}
|
|
599
|
+
}, []);
|
|
600
|
+
}, [children, variant, isExpressiveGap, separatorStyle]);
|
|
586
601
|
return /* @__PURE__ */ jsxRuntime.jsx(react.AnimatePresence, { children: open && /* @__PURE__ */ jsxRuntime.jsx(RxContextMenu__namespace.Portal, { forceMount: true, children: /* @__PURE__ */ jsxRuntime.jsx(RxContextMenu__namespace.Content, __spreadProps(__spreadValues({ ref, asChild: true, forceMount: true }, props), { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
587
602
|
react.m.div,
|
|
588
603
|
{
|
|
@@ -606,6 +621,7 @@ function Menu(_a) {
|
|
|
606
621
|
variant,
|
|
607
622
|
menuVariant,
|
|
608
623
|
colorVariant = "standard",
|
|
624
|
+
density = 0,
|
|
609
625
|
open: controlledOpen,
|
|
610
626
|
onOpenChange: controlledOnOpenChange,
|
|
611
627
|
defaultOpen
|
|
@@ -614,18 +630,19 @@ function Menu(_a) {
|
|
|
614
630
|
"variant",
|
|
615
631
|
"menuVariant",
|
|
616
632
|
"colorVariant",
|
|
633
|
+
"density",
|
|
617
634
|
"open",
|
|
618
635
|
"onOpenChange",
|
|
619
636
|
"defaultOpen"
|
|
620
637
|
]);
|
|
621
638
|
var _a2;
|
|
622
639
|
const resolvedVariant = (_a2 = variant != null ? variant : menuVariant) != null ? _a2 : "baseline";
|
|
623
|
-
const [internalOpen, setInternalOpen] =
|
|
640
|
+
const [internalOpen, setInternalOpen] = React37__namespace.useState(
|
|
624
641
|
() => defaultOpen != null ? defaultOpen : false
|
|
625
642
|
);
|
|
626
643
|
const isControlled = controlledOpen !== void 0;
|
|
627
644
|
const open = isControlled ? controlledOpen : internalOpen;
|
|
628
|
-
const handleOpenChange =
|
|
645
|
+
const handleOpenChange = React37__namespace.useCallback(
|
|
629
646
|
(next) => {
|
|
630
647
|
if (!isControlled) setInternalOpen(next);
|
|
631
648
|
controlledOnOpenChange == null ? void 0 : controlledOnOpenChange(next);
|
|
@@ -637,6 +654,7 @@ function Menu(_a) {
|
|
|
637
654
|
{
|
|
638
655
|
variant: resolvedVariant,
|
|
639
656
|
colorVariant,
|
|
657
|
+
density,
|
|
640
658
|
open,
|
|
641
659
|
onOpenChange: handleOpenChange,
|
|
642
660
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -652,12 +670,12 @@ function Menu(_a) {
|
|
|
652
670
|
);
|
|
653
671
|
}
|
|
654
672
|
Menu.displayName = "Menu";
|
|
655
|
-
var MenuTrigger =
|
|
673
|
+
var MenuTrigger = React37__namespace.forwardRef((_a, ref) => {
|
|
656
674
|
var _b = _a, { children, asChild = true } = _b, props = __objRest(_b, ["children", "asChild"]);
|
|
657
675
|
return /* @__PURE__ */ jsxRuntime.jsx(DropdownMenu__namespace.Trigger, __spreadProps(__spreadValues({ ref, asChild }, props), { children }));
|
|
658
676
|
});
|
|
659
677
|
MenuTrigger.displayName = "MenuTrigger";
|
|
660
|
-
var MenuContent =
|
|
678
|
+
var MenuContent = React37__namespace.forwardRef(
|
|
661
679
|
(_a, ref) => {
|
|
662
680
|
var _b = _a, {
|
|
663
681
|
children,
|
|
@@ -667,6 +685,7 @@ var MenuContent = React36__namespace.forwardRef(
|
|
|
667
685
|
hasOverflow = false,
|
|
668
686
|
colorVariant: propColorVariant,
|
|
669
687
|
separatorStyle = "gap",
|
|
688
|
+
matchTriggerWidth = false,
|
|
670
689
|
className
|
|
671
690
|
} = _b, props = __objRest(_b, [
|
|
672
691
|
"children",
|
|
@@ -676,6 +695,7 @@ var MenuContent = React36__namespace.forwardRef(
|
|
|
676
695
|
"hasOverflow",
|
|
677
696
|
"colorVariant",
|
|
678
697
|
"separatorStyle",
|
|
698
|
+
"matchTriggerWidth",
|
|
679
699
|
"className"
|
|
680
700
|
]);
|
|
681
701
|
const {
|
|
@@ -686,68 +706,66 @@ var MenuContent = React36__namespace.forwardRef(
|
|
|
686
706
|
const colorVariant = propColorVariant != null ? propColorVariant : contextColorVariant;
|
|
687
707
|
const colors = variant === "baseline" ? BASELINE_COLORS : colorVariant === "vibrant" ? VIBRANT_COLORS : STANDARD_COLORS;
|
|
688
708
|
const isExpressiveGap = variant === "expressive" && separatorStyle === "gap";
|
|
689
|
-
const containerClassName =
|
|
690
|
-
"
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
const flattenChildren = (nodes) => {
|
|
714
|
-
return React36__namespace.Children.toArray(nodes).reduce(
|
|
715
|
-
(acc, child) => {
|
|
716
|
-
if (React36__namespace.isValidElement(child)) {
|
|
717
|
-
if (child.type === React36__namespace.Fragment) {
|
|
718
|
-
return acc.concat(
|
|
719
|
-
flattenChildren(
|
|
720
|
-
child.props.children
|
|
721
|
-
)
|
|
722
|
-
);
|
|
723
|
-
}
|
|
724
|
-
acc.push(child);
|
|
725
|
-
}
|
|
726
|
-
return acc;
|
|
727
|
-
},
|
|
728
|
-
[]
|
|
709
|
+
const containerClassName = React37__namespace.useMemo(() => {
|
|
710
|
+
const widthClass = matchTriggerWidth ? "w-[var(--radix-dropdown-menu-trigger-width)]" : cn(MENU_MIN_WIDTH, MENU_MAX_WIDTH);
|
|
711
|
+
return variant === "expressive" ? cn(
|
|
712
|
+
"z-50 flex flex-col",
|
|
713
|
+
widthClass,
|
|
714
|
+
isExpressiveGap ? MENU_GROUP_GAP : "",
|
|
715
|
+
isExpressiveGap ? "bg-transparent" : colors.containerBg,
|
|
716
|
+
isExpressiveGap ? "" : "p-1",
|
|
717
|
+
isExpressiveGap ? "" : "rounded-2xl",
|
|
718
|
+
isExpressiveGap ? "" : "elevation-2",
|
|
719
|
+
hasOverflow || isExpressiveGap ? "overflow-visible" : "overflow-hidden",
|
|
720
|
+
"outline-none",
|
|
721
|
+
className
|
|
722
|
+
) : cn(
|
|
723
|
+
"z-50 flex flex-col",
|
|
724
|
+
widthClass,
|
|
725
|
+
MENU_POPUP_PADDING_Y,
|
|
726
|
+
MENU_GROUP_GAP,
|
|
727
|
+
colors.containerBg,
|
|
728
|
+
MENU_CONTAINER_SHAPE,
|
|
729
|
+
"elevation-2",
|
|
730
|
+
hasOverflow ? "overflow-visible" : "overflow-hidden",
|
|
731
|
+
"outline-none",
|
|
732
|
+
className
|
|
729
733
|
);
|
|
730
|
-
}
|
|
731
|
-
|
|
732
|
-
|
|
734
|
+
}, [
|
|
735
|
+
variant,
|
|
736
|
+
isExpressiveGap,
|
|
737
|
+
hasOverflow,
|
|
738
|
+
matchTriggerWidth,
|
|
739
|
+
className,
|
|
740
|
+
colors.containerBg
|
|
741
|
+
]);
|
|
742
|
+
const renderedChildren = React37__namespace.useMemo(() => {
|
|
743
|
+
if (variant !== "expressive") return children;
|
|
733
744
|
const validChildren = flattenChildren(children);
|
|
734
745
|
const groupCount = validChildren.length;
|
|
735
|
-
const
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
746
|
+
const enhanced = validChildren.map((child, i) => {
|
|
747
|
+
var _a2;
|
|
748
|
+
if (typeof child.type === "string") return child;
|
|
749
|
+
const defaultItemPosition = groupCount === 1 ? "standalone" : i === 0 ? "leading" : i === groupCount - 1 ? "trailing" : "middle";
|
|
750
|
+
const itemPosition = (_a2 = child.props.itemPosition) != null ? _a2 : defaultItemPosition;
|
|
751
|
+
return React37__namespace.cloneElement(
|
|
752
|
+
child,
|
|
753
|
+
{
|
|
754
|
+
index: i,
|
|
755
|
+
count: groupCount,
|
|
756
|
+
itemPosition,
|
|
757
|
+
isGapVariant: isExpressiveGap
|
|
758
|
+
}
|
|
759
|
+
);
|
|
760
|
+
});
|
|
761
|
+
if (separatorStyle !== "divider") return enhanced;
|
|
762
|
+
return enhanced.reduce((acc, child, i) => {
|
|
743
763
|
if (i > 0) {
|
|
744
764
|
acc.push(
|
|
745
765
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
746
766
|
"hr",
|
|
747
767
|
{
|
|
748
|
-
className: cn(
|
|
749
|
-
"mx-3 my-0.5 h-px border-0 bg-m3-outline-variant"
|
|
750
|
-
)
|
|
768
|
+
className: cn("mx-3 my-0.5 h-px border-0 bg-m3-outline-variant")
|
|
751
769
|
},
|
|
752
770
|
`divider-${child.key || i}`
|
|
753
771
|
)
|
|
@@ -755,8 +773,8 @@ var MenuContent = React36__namespace.forwardRef(
|
|
|
755
773
|
}
|
|
756
774
|
acc.push(child);
|
|
757
775
|
return acc;
|
|
758
|
-
}, [])
|
|
759
|
-
}
|
|
776
|
+
}, []);
|
|
777
|
+
}, [children, variant, isExpressiveGap, separatorStyle]);
|
|
760
778
|
return /* @__PURE__ */ jsxRuntime.jsx(react.AnimatePresence, { children: open && /* @__PURE__ */ jsxRuntime.jsx(DropdownMenu__namespace.Portal, { forceMount: true, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
761
779
|
DropdownMenu__namespace.Content,
|
|
762
780
|
__spreadProps(__spreadValues({
|
|
@@ -788,9 +806,9 @@ var MenuContent = React36__namespace.forwardRef(
|
|
|
788
806
|
}
|
|
789
807
|
);
|
|
790
808
|
MenuContent.displayName = "MenuContent";
|
|
791
|
-
var MenuDivider =
|
|
809
|
+
var MenuDivider = React37__namespace.forwardRef(
|
|
792
810
|
(_a, ref) => {
|
|
793
|
-
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
811
|
+
var _b = _a, { className, isGapVariant: _isGapVariant } = _b, props = __objRest(_b, ["className", "isGapVariant"]);
|
|
794
812
|
const { menuVariant } = useMenuContext();
|
|
795
813
|
return /* @__PURE__ */ jsxRuntime.jsx(DropdownMenu__namespace.Separator, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
796
814
|
"hr",
|
|
@@ -819,7 +837,7 @@ function getGroupPosition(index, count) {
|
|
|
819
837
|
function getGroupActiveShape(position) {
|
|
820
838
|
return GROUP_SHAPES[`${position}Active`];
|
|
821
839
|
}
|
|
822
|
-
var MenuGroup =
|
|
840
|
+
var MenuGroup = React37__namespace.forwardRef(
|
|
823
841
|
(_a, ref) => {
|
|
824
842
|
var _b = _a, {
|
|
825
843
|
children,
|
|
@@ -840,46 +858,25 @@ var MenuGroup = React36__namespace.forwardRef(
|
|
|
840
858
|
"itemPosition",
|
|
841
859
|
"className"
|
|
842
860
|
]);
|
|
843
|
-
const {
|
|
844
|
-
menuVariant,
|
|
845
|
-
colorVariant: contextColorVariant,
|
|
846
|
-
isStatic
|
|
847
|
-
} = useMenuContext();
|
|
861
|
+
const { menuVariant, colorVariant: contextColorVariant } = useMenuContext();
|
|
848
862
|
const colorVariant = propColorVariant != null ? propColorVariant : contextColorVariant;
|
|
849
863
|
const colors = menuVariant === "baseline" ? BASELINE_COLORS : colorVariant === "vibrant" ? VIBRANT_COLORS : STANDARD_COLORS;
|
|
850
864
|
const position = getGroupPosition(index, count);
|
|
851
|
-
const
|
|
852
|
-
const
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
)
|
|
865
|
-
);
|
|
866
|
-
}
|
|
867
|
-
acc.push(child);
|
|
868
|
-
}
|
|
869
|
-
return acc;
|
|
870
|
-
},
|
|
871
|
-
[]
|
|
872
|
-
);
|
|
873
|
-
};
|
|
874
|
-
const validChildren = flattenChildren(children);
|
|
875
|
-
const itemCount = validChildren.length;
|
|
876
|
-
const enhancedChildren = validChildren.map((child, i) => {
|
|
877
|
-
const itemPosition2 = itemCount === 1 ? "standalone" : i === 0 ? "leading" : i === itemCount - 1 ? "trailing" : "middle";
|
|
878
|
-
return React36__namespace.cloneElement(child, {
|
|
879
|
-
itemPosition: itemPosition2,
|
|
880
|
-
colorVariant
|
|
865
|
+
const currentShape = getGroupActiveShape(position);
|
|
866
|
+
const enhancedChildren = React37__namespace.useMemo(() => {
|
|
867
|
+
const valid = flattenChildren(children);
|
|
868
|
+
const itemCount = valid.length;
|
|
869
|
+
return valid.map((child, i) => {
|
|
870
|
+
var _a2;
|
|
871
|
+
if (typeof child.type === "string") return child;
|
|
872
|
+
const defaultItemPosition = itemCount === 1 ? "standalone" : i === 0 ? "leading" : i === itemCount - 1 ? "trailing" : "middle";
|
|
873
|
+
const itemPosition2 = (_a2 = child.props.itemPosition) != null ? _a2 : defaultItemPosition;
|
|
874
|
+
return React37__namespace.cloneElement(child, {
|
|
875
|
+
itemPosition: itemPosition2,
|
|
876
|
+
colorVariant
|
|
877
|
+
});
|
|
881
878
|
});
|
|
882
|
-
});
|
|
879
|
+
}, [children, colorVariant]);
|
|
883
880
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
884
881
|
react.m.div,
|
|
885
882
|
__spreadProps(__spreadValues({
|
|
@@ -891,10 +888,8 @@ var MenuGroup = React36__namespace.forwardRef(
|
|
|
891
888
|
// In baseline variant, MenuGroup is transparent so it shouldn't clip.
|
|
892
889
|
// In expressive variant, it needs overflow-hidden to clip hover states to its morphing shape.
|
|
893
890
|
menuVariant === "baseline" ? "" : "overflow-hidden",
|
|
894
|
-
//
|
|
895
|
-
|
|
896
|
-
// Horizontal padding: 4dp for expressive menus (both static and popup), 0 for baseline
|
|
897
|
-
menuVariant === "expressive" ? "px-1" : "",
|
|
891
|
+
// Padding: uniform 4dp (p-1) for expressive menus (matches 12px inner item corners inside 16px outer corners)
|
|
892
|
+
menuVariant === "expressive" ? "p-1" : MENU_GROUP_PADDING_Y,
|
|
898
893
|
// Gap variant has floating segments, so each group manages its own shadow
|
|
899
894
|
isGapVariant ? "elevation-2" : "",
|
|
900
895
|
// Background based on color variant (transparent for baseline to avoid double-layering)
|
|
@@ -902,9 +897,7 @@ var MenuGroup = React36__namespace.forwardRef(
|
|
|
902
897
|
className
|
|
903
898
|
),
|
|
904
899
|
animate: { borderRadius: currentShape },
|
|
905
|
-
transition: FAST_SPATIAL_SPRING
|
|
906
|
-
onPointerEnter: handlePointerEnter,
|
|
907
|
-
onPointerLeave: handlePointerLeave
|
|
900
|
+
transition: FAST_SPATIAL_SPRING
|
|
908
901
|
}, rest), {
|
|
909
902
|
children: [
|
|
910
903
|
label && /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -941,7 +934,7 @@ var VARIANT_FONT = {
|
|
|
941
934
|
rounded: "'Material Symbols Rounded'",
|
|
942
935
|
sharp: "'Material Symbols Sharp'"
|
|
943
936
|
};
|
|
944
|
-
var IconComponent =
|
|
937
|
+
var IconComponent = React37__namespace.forwardRef(
|
|
945
938
|
(_a, ref) => {
|
|
946
939
|
var _b = _a, {
|
|
947
940
|
name,
|
|
@@ -1007,14 +1000,14 @@ var IconComponent = React36__namespace.forwardRef(
|
|
|
1007
1000
|
}
|
|
1008
1001
|
);
|
|
1009
1002
|
IconComponent.displayName = "Icon";
|
|
1010
|
-
var Icon =
|
|
1003
|
+
var Icon = React37__namespace.memo(IconComponent);
|
|
1011
1004
|
function getItemShapeClass(position, selected, isStatic = false, menuVariant = "expressive") {
|
|
1012
1005
|
if (menuVariant === "baseline") return BASELINE_ITEM_SHAPE;
|
|
1013
1006
|
if (selected) return ITEM_SHAPE_CLASSES.selected;
|
|
1014
1007
|
if (isStatic && position === "standalone") return "rounded-[12px]";
|
|
1015
1008
|
return ITEM_SHAPE_CLASSES[position];
|
|
1016
1009
|
}
|
|
1017
|
-
var MenuItem =
|
|
1010
|
+
var MenuItem = React37__namespace.forwardRef(
|
|
1018
1011
|
(_a, ref) => {
|
|
1019
1012
|
var _b = _a, {
|
|
1020
1013
|
children,
|
|
@@ -1027,11 +1020,13 @@ var MenuItem = React36__namespace.forwardRef(
|
|
|
1027
1020
|
disabled = false,
|
|
1028
1021
|
itemPosition = "standalone",
|
|
1029
1022
|
colorVariant: propColorVariant,
|
|
1023
|
+
density: propDensity,
|
|
1030
1024
|
keepOpen = false,
|
|
1031
1025
|
className,
|
|
1032
1026
|
isSubTrigger,
|
|
1033
1027
|
value,
|
|
1034
|
-
role
|
|
1028
|
+
role,
|
|
1029
|
+
isGapVariant: _isGapVariant
|
|
1035
1030
|
} = _b, rest = __objRest(_b, [
|
|
1036
1031
|
"children",
|
|
1037
1032
|
"onClick",
|
|
@@ -1043,18 +1038,24 @@ var MenuItem = React36__namespace.forwardRef(
|
|
|
1043
1038
|
"disabled",
|
|
1044
1039
|
"itemPosition",
|
|
1045
1040
|
"colorVariant",
|
|
1041
|
+
"density",
|
|
1046
1042
|
"keepOpen",
|
|
1047
1043
|
"className",
|
|
1048
1044
|
"isSubTrigger",
|
|
1049
1045
|
"value",
|
|
1050
|
-
"role"
|
|
1046
|
+
"role",
|
|
1047
|
+
"isGapVariant"
|
|
1051
1048
|
]);
|
|
1049
|
+
var _a2;
|
|
1052
1050
|
const {
|
|
1053
1051
|
menuVariant,
|
|
1054
1052
|
colorVariant: contextColorVariant,
|
|
1053
|
+
density: contextDensity,
|
|
1055
1054
|
menuPrimitive
|
|
1056
1055
|
} = useMenuContext();
|
|
1057
1056
|
const colorVariant = propColorVariant != null ? propColorVariant : contextColorVariant;
|
|
1057
|
+
const density = (_a2 = propDensity != null ? propDensity : contextDensity) != null ? _a2 : 0;
|
|
1058
|
+
const minHeightClass = DENSITY_MIN_HEIGHT[density];
|
|
1058
1059
|
const colors = menuVariant === "baseline" ? BASELINE_COLORS : colorVariant === "vibrant" ? VIBRANT_COLORS : STANDARD_COLORS;
|
|
1059
1060
|
const isStaticMenu = menuPrimitive === "static";
|
|
1060
1061
|
const shapeClass = getItemShapeClass(
|
|
@@ -1096,12 +1097,11 @@ var MenuItem = React36__namespace.forwardRef(
|
|
|
1096
1097
|
className: cn(
|
|
1097
1098
|
// Layout
|
|
1098
1099
|
"relative flex w-full cursor-pointer select-none items-center outline-none",
|
|
1099
|
-
// Sizing: min-h 48dp,
|
|
1100
|
-
|
|
1100
|
+
// Sizing: min-h based on density (48dp, 40dp, 32dp), min-w 112dp
|
|
1101
|
+
minHeightClass,
|
|
1102
|
+
"min-w-28",
|
|
1101
1103
|
// Horizontal padding
|
|
1102
1104
|
menuVariant === "baseline" ? MENU_BASELINE_ITEM_HORIZONTAL_PADDING : "px-4",
|
|
1103
|
-
// Spacing between items
|
|
1104
|
-
isStaticMenu ? "my-0.5" : "",
|
|
1105
1105
|
// Shape morphing (position-based + selected override)
|
|
1106
1106
|
shapeClass,
|
|
1107
1107
|
// Animate border-radius AND background-color together (FastEffects: 150ms)
|
|
@@ -1113,7 +1113,7 @@ var MenuItem = React36__namespace.forwardRef(
|
|
|
1113
1113
|
!selected && colors.focusLayer,
|
|
1114
1114
|
// Focus visible ring (WCAG 2.4.11 — visible focus indicator)
|
|
1115
1115
|
// Uses ring-inset so the ring doesn't overflow the item bounds.
|
|
1116
|
-
"focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-m3-
|
|
1116
|
+
"focus:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-m3-secondary data-highlighted:ring-0",
|
|
1117
1117
|
// Disabled
|
|
1118
1118
|
disabled && "pointer-events-none opacity-[0.38]",
|
|
1119
1119
|
className
|
|
@@ -1216,31 +1216,31 @@ function SubMenu({
|
|
|
1216
1216
|
}) {
|
|
1217
1217
|
const { colorVariant: contextColorVariant, menuPrimitive } = useMenuContext();
|
|
1218
1218
|
const colorVariant = propColorVariant != null ? propColorVariant : contextColorVariant;
|
|
1219
|
-
const [open, setOpen] =
|
|
1220
|
-
const openTimerRef =
|
|
1221
|
-
const closeTimerRef =
|
|
1219
|
+
const [open, setOpen] = React37__namespace.useState(false);
|
|
1220
|
+
const openTimerRef = React37__namespace.useRef(null);
|
|
1221
|
+
const closeTimerRef = React37__namespace.useRef(
|
|
1222
1222
|
null
|
|
1223
1223
|
);
|
|
1224
|
-
const clearTimers =
|
|
1224
|
+
const clearTimers = React37__namespace.useCallback(() => {
|
|
1225
1225
|
if (openTimerRef.current) clearTimeout(openTimerRef.current);
|
|
1226
1226
|
if (closeTimerRef.current) clearTimeout(closeTimerRef.current);
|
|
1227
1227
|
}, []);
|
|
1228
|
-
const handleTriggerPointerEnter =
|
|
1228
|
+
const handleTriggerPointerEnter = React37__namespace.useCallback(() => {
|
|
1229
1229
|
clearTimers();
|
|
1230
1230
|
openTimerRef.current = setTimeout(() => setOpen(true), hoverOpenDelay);
|
|
1231
1231
|
}, [hoverOpenDelay, clearTimers]);
|
|
1232
|
-
const handleTriggerPointerLeave =
|
|
1232
|
+
const handleTriggerPointerLeave = React37__namespace.useCallback(() => {
|
|
1233
1233
|
clearTimers();
|
|
1234
1234
|
closeTimerRef.current = setTimeout(() => setOpen(false), hoverCloseDelay);
|
|
1235
1235
|
}, [hoverCloseDelay, clearTimers]);
|
|
1236
|
-
const handleContentPointerEnter =
|
|
1236
|
+
const handleContentPointerEnter = React37__namespace.useCallback(() => {
|
|
1237
1237
|
clearTimers();
|
|
1238
1238
|
}, [clearTimers]);
|
|
1239
|
-
const handleContentPointerLeave =
|
|
1239
|
+
const handleContentPointerLeave = React37__namespace.useCallback(() => {
|
|
1240
1240
|
clearTimers();
|
|
1241
1241
|
closeTimerRef.current = setTimeout(() => setOpen(false), hoverCloseDelay);
|
|
1242
1242
|
}, [hoverCloseDelay, clearTimers]);
|
|
1243
|
-
|
|
1243
|
+
React37__namespace.useEffect(() => () => clearTimers(), [clearTimers]);
|
|
1244
1244
|
const Sub3 = menuPrimitive === "context" ? RxContextMenu__namespace.Sub : DropdownMenu__namespace.Sub;
|
|
1245
1245
|
const SubTrigger3 = menuPrimitive === "context" ? RxContextMenu__namespace.SubTrigger : DropdownMenu__namespace.SubTrigger;
|
|
1246
1246
|
const SubContent3 = menuPrimitive === "context" ? RxContextMenu__namespace.SubContent : DropdownMenu__namespace.SubContent;
|
|
@@ -1252,7 +1252,7 @@ function SubMenu({
|
|
|
1252
1252
|
className: "w-full outline-none",
|
|
1253
1253
|
onPointerEnter: handleTriggerPointerEnter,
|
|
1254
1254
|
onPointerLeave: handleTriggerPointerLeave,
|
|
1255
|
-
children:
|
|
1255
|
+
children: React37__namespace.isValidElement(trigger) ? React37__namespace.cloneElement(trigger, {
|
|
1256
1256
|
isSubTrigger: true,
|
|
1257
1257
|
// Auto-add chevron if missing
|
|
1258
1258
|
trailingIcon: trigger.props.trailingIcon || /* @__PURE__ */ jsxRuntime.jsx(Icon, { name: "chevron_right", size: 20 })
|
|
@@ -1329,7 +1329,7 @@ function SubMenuContent({
|
|
|
1329
1329
|
);
|
|
1330
1330
|
}
|
|
1331
1331
|
SubMenuContent.displayName = "SubMenuContent";
|
|
1332
|
-
var VerticalMenuDivider =
|
|
1332
|
+
var VerticalMenuDivider = React37__namespace.forwardRef((_a, ref) => {
|
|
1333
1333
|
var _b = _a, { className, index, count, isGapVariant } = _b, props = __objRest(_b, ["className", "index", "count", "isGapVariant"]);
|
|
1334
1334
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1335
1335
|
"hr",
|
|
@@ -1349,7 +1349,7 @@ var VerticalMenuDivider = React36__namespace.forwardRef((_a, ref) => {
|
|
|
1349
1349
|
});
|
|
1350
1350
|
VerticalMenuDivider.displayName = "VerticalMenuDivider";
|
|
1351
1351
|
var VerticalMenuGroup = MenuGroup;
|
|
1352
|
-
var VerticalMenuContent =
|
|
1352
|
+
var VerticalMenuContent = React37__namespace.forwardRef(
|
|
1353
1353
|
(_a, ref) => {
|
|
1354
1354
|
var _b = _a, {
|
|
1355
1355
|
children,
|
|
@@ -1365,46 +1365,39 @@ var VerticalMenuContent = React36__namespace.forwardRef(
|
|
|
1365
1365
|
const { colorVariant: contextColorVariant } = useMenuContext();
|
|
1366
1366
|
const colorVariant = propColorVariant != null ? propColorVariant : contextColorVariant;
|
|
1367
1367
|
const colors = colorVariant === "vibrant" ? VIBRANT_COLORS : STANDARD_COLORS;
|
|
1368
|
-
const
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1368
|
+
const renderedChildren = React37__namespace.useMemo(() => {
|
|
1369
|
+
const valid = flattenChildren(children);
|
|
1370
|
+
const groupCount = valid.length;
|
|
1371
|
+
const enhanced = valid.map((child, i) => {
|
|
1372
|
+
var _a2;
|
|
1373
|
+
if (typeof child.type === "string") return child;
|
|
1374
|
+
const defaultItemPosition = groupCount === 1 ? "standalone" : i === 0 ? "leading" : i === groupCount - 1 ? "trailing" : "middle";
|
|
1375
|
+
const itemPosition = (_a2 = child.props.itemPosition) != null ? _a2 : defaultItemPosition;
|
|
1376
|
+
return React37__namespace.cloneElement(
|
|
1377
|
+
child,
|
|
1378
|
+
{
|
|
1379
|
+
index: i,
|
|
1380
|
+
count: groupCount,
|
|
1381
|
+
itemPosition,
|
|
1382
|
+
isGapVariant: separatorStyle === "gap"
|
|
1380
1383
|
}
|
|
1381
|
-
return acc;
|
|
1382
|
-
},
|
|
1383
|
-
[]
|
|
1384
|
-
);
|
|
1385
|
-
};
|
|
1386
|
-
const validChildren = flattenChildren(children);
|
|
1387
|
-
const groupCount = validChildren.length;
|
|
1388
|
-
const enhancedChildren = validChildren.map(
|
|
1389
|
-
(child, i) => React36__namespace.cloneElement(child, {
|
|
1390
|
-
index: i,
|
|
1391
|
-
count: groupCount,
|
|
1392
|
-
isGapVariant: separatorStyle === "gap"
|
|
1393
|
-
})
|
|
1394
|
-
);
|
|
1395
|
-
const renderedChildren = separatorStyle === "divider" ? enhancedChildren.reduce((acc, child, i) => {
|
|
1396
|
-
if (i > 0) {
|
|
1397
|
-
acc.push(
|
|
1398
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1399
|
-
VerticalMenuDivider,
|
|
1400
|
-
{},
|
|
1401
|
-
`divider-${child.key || i}`
|
|
1402
|
-
)
|
|
1403
1384
|
);
|
|
1404
|
-
}
|
|
1405
|
-
|
|
1406
|
-
return acc
|
|
1407
|
-
|
|
1385
|
+
});
|
|
1386
|
+
if (separatorStyle !== "divider") return enhanced;
|
|
1387
|
+
return enhanced.reduce((acc, child, i) => {
|
|
1388
|
+
if (i > 0) {
|
|
1389
|
+
acc.push(
|
|
1390
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1391
|
+
VerticalMenuDivider,
|
|
1392
|
+
{},
|
|
1393
|
+
`divider-${child.key || i}`
|
|
1394
|
+
)
|
|
1395
|
+
);
|
|
1396
|
+
}
|
|
1397
|
+
acc.push(child);
|
|
1398
|
+
return acc;
|
|
1399
|
+
}, []);
|
|
1400
|
+
}, [children, separatorStyle]);
|
|
1408
1401
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1409
1402
|
"div",
|
|
1410
1403
|
__spreadProps(__spreadValues({
|
|
@@ -1423,13 +1416,13 @@ var VerticalMenuContent = React36__namespace.forwardRef(
|
|
|
1423
1416
|
}
|
|
1424
1417
|
);
|
|
1425
1418
|
VerticalMenuContent.displayName = "VerticalMenuContent";
|
|
1426
|
-
var VerticalMenu =
|
|
1419
|
+
var VerticalMenu = React37__namespace.forwardRef((_a, ref) => {
|
|
1427
1420
|
var _b = _a, { children, colorVariant = "standard", className } = _b, props = __objRest(_b, ["children", "colorVariant", "className"]);
|
|
1428
|
-
const noop =
|
|
1421
|
+
const noop = React37__namespace.useCallback(() => {
|
|
1429
1422
|
}, []);
|
|
1430
1423
|
const colors = colorVariant === "vibrant" ? VIBRANT_COLORS : STANDARD_COLORS;
|
|
1431
|
-
const containerRef =
|
|
1432
|
-
const mergedRef =
|
|
1424
|
+
const containerRef = React37__namespace.useRef(null);
|
|
1425
|
+
const mergedRef = React37__namespace.useCallback(
|
|
1433
1426
|
(node) => {
|
|
1434
1427
|
containerRef.current = node;
|
|
1435
1428
|
if (typeof ref === "function") ref(node);
|
|
@@ -1438,7 +1431,7 @@ var VerticalMenu = React36__namespace.forwardRef((_a, ref) => {
|
|
|
1438
1431
|
},
|
|
1439
1432
|
[ref]
|
|
1440
1433
|
);
|
|
1441
|
-
const handleKeyDown =
|
|
1434
|
+
const handleKeyDown = React37__namespace.useCallback(
|
|
1442
1435
|
(e) => {
|
|
1443
1436
|
var _a2;
|
|
1444
1437
|
if (!containerRef.current) return;
|
|
@@ -1521,7 +1514,7 @@ var VerticalMenu = React36__namespace.forwardRef((_a, ref) => {
|
|
|
1521
1514
|
});
|
|
1522
1515
|
VerticalMenu.displayName = "VerticalMenu";
|
|
1523
1516
|
function detectSeparatorStyle(children) {
|
|
1524
|
-
const child =
|
|
1517
|
+
const child = React37__namespace.Children.toArray(children).find(React37__namespace.isValidElement);
|
|
1525
1518
|
if (child) {
|
|
1526
1519
|
const style = child.props.separatorStyle;
|
|
1527
1520
|
if (style) return style;
|
|
@@ -1602,11 +1595,11 @@ function AppBarColumn({
|
|
|
1602
1595
|
maxItemCount,
|
|
1603
1596
|
className
|
|
1604
1597
|
}) {
|
|
1605
|
-
const containerRef =
|
|
1606
|
-
const [visibleCount, setVisibleCount] =
|
|
1598
|
+
const containerRef = React37__namespace.useRef(null);
|
|
1599
|
+
const [visibleCount, setVisibleCount] = React37__namespace.useState(
|
|
1607
1600
|
maxItemCount != null ? maxItemCount : items.length
|
|
1608
1601
|
);
|
|
1609
|
-
|
|
1602
|
+
React37__namespace.useEffect(() => {
|
|
1610
1603
|
if (maxItemCount !== void 0) {
|
|
1611
1604
|
setVisibleCount(Math.min(maxItemCount, items.length));
|
|
1612
1605
|
return;
|
|
@@ -1654,11 +1647,11 @@ function AppBarColumn({
|
|
|
1654
1647
|
);
|
|
1655
1648
|
}
|
|
1656
1649
|
function AppBarRow({ items, maxItemCount, className }) {
|
|
1657
|
-
const containerRef =
|
|
1658
|
-
const [visibleCount, setVisibleCount] =
|
|
1650
|
+
const containerRef = React37__namespace.useRef(null);
|
|
1651
|
+
const [visibleCount, setVisibleCount] = React37__namespace.useState(
|
|
1659
1652
|
maxItemCount != null ? maxItemCount : items.length
|
|
1660
1653
|
);
|
|
1661
|
-
|
|
1654
|
+
React37__namespace.useEffect(() => {
|
|
1662
1655
|
if (maxItemCount !== void 0) {
|
|
1663
1656
|
setVisibleCount(Math.min(maxItemCount, items.length));
|
|
1664
1657
|
return;
|
|
@@ -1712,12 +1705,12 @@ function useAppBarScroll({
|
|
|
1712
1705
|
collapsedHeight = 64,
|
|
1713
1706
|
expandedHeight = 112
|
|
1714
1707
|
} = {}) {
|
|
1715
|
-
const [isScrolled, setIsScrolled] =
|
|
1716
|
-
const [collapsedFraction, setCollapsedFraction] =
|
|
1717
|
-
const [isHidden, setIsHidden] =
|
|
1718
|
-
const prevScrollYRef =
|
|
1708
|
+
const [isScrolled, setIsScrolled] = React37__namespace.useState(false);
|
|
1709
|
+
const [collapsedFraction, setCollapsedFraction] = React37__namespace.useState(0);
|
|
1710
|
+
const [isHidden, setIsHidden] = React37__namespace.useState(false);
|
|
1711
|
+
const prevScrollYRef = React37__namespace.useRef(0);
|
|
1719
1712
|
const hideThreshold = 64;
|
|
1720
|
-
|
|
1713
|
+
React37__namespace.useEffect(() => {
|
|
1721
1714
|
var _a;
|
|
1722
1715
|
const scrollDistance = expandedHeight - collapsedHeight;
|
|
1723
1716
|
const getScrollY = () => {
|
|
@@ -1838,7 +1831,7 @@ function useFlexibleAppBar({
|
|
|
1838
1831
|
expandedHeight
|
|
1839
1832
|
});
|
|
1840
1833
|
const scrollProgress = react.useMotionValue(0);
|
|
1841
|
-
|
|
1834
|
+
React37__namespace.useEffect(() => {
|
|
1842
1835
|
scrollProgress.set(
|
|
1843
1836
|
shouldReduceMotion ? collapsedFraction > 0.5 ? 1 : 0 : collapsedFraction
|
|
1844
1837
|
);
|
|
@@ -2179,7 +2172,7 @@ function SearchAppBar({
|
|
|
2179
2172
|
}) {
|
|
2180
2173
|
var _a, _b;
|
|
2181
2174
|
const shouldReduceMotion = react.useReducedMotion();
|
|
2182
|
-
const [isSearchOpen, setIsSearchOpen] =
|
|
2175
|
+
const [isSearchOpen, setIsSearchOpen] = React37__namespace.useState(false);
|
|
2183
2176
|
const { isScrolled } = useAppBarScroll({
|
|
2184
2177
|
scrollElement,
|
|
2185
2178
|
behavior: scrollBehavior === "exitUntilCollapsed" ? "pinned" : scrollBehavior
|
|
@@ -2293,8 +2286,8 @@ function SearchView({
|
|
|
2293
2286
|
className
|
|
2294
2287
|
}) {
|
|
2295
2288
|
const shouldReduceMotion = react.useReducedMotion();
|
|
2296
|
-
const inputRef =
|
|
2297
|
-
|
|
2289
|
+
const inputRef = React37__namespace.useRef(null);
|
|
2290
|
+
React37__namespace.useEffect(() => {
|
|
2298
2291
|
const timer = window.setTimeout(() => {
|
|
2299
2292
|
var _a;
|
|
2300
2293
|
(_a = inputRef.current) == null ? void 0 : _a.focus();
|
|
@@ -2550,7 +2543,7 @@ function SmallAppBar({
|
|
|
2550
2543
|
"small-app-bar"
|
|
2551
2544
|
) });
|
|
2552
2545
|
}
|
|
2553
|
-
var RippleItem =
|
|
2546
|
+
var RippleItem = React37__namespace.memo(function RippleItem2({
|
|
2554
2547
|
ripple,
|
|
2555
2548
|
onDone
|
|
2556
2549
|
}) {
|
|
@@ -2594,8 +2587,8 @@ function Ripple({
|
|
|
2594
2587
|
}
|
|
2595
2588
|
function useRippleState(options = {}) {
|
|
2596
2589
|
const { disabled = false } = options;
|
|
2597
|
-
const [ripples, setRipples] =
|
|
2598
|
-
const onPointerDown =
|
|
2590
|
+
const [ripples, setRipples] = React37__namespace.useState([]);
|
|
2591
|
+
const onPointerDown = React37__namespace.useCallback(
|
|
2599
2592
|
(e) => {
|
|
2600
2593
|
if (disabled) return;
|
|
2601
2594
|
const rect = e.currentTarget.getBoundingClientRect();
|
|
@@ -2612,7 +2605,7 @@ function useRippleState(options = {}) {
|
|
|
2612
2605
|
},
|
|
2613
2606
|
[disabled]
|
|
2614
2607
|
);
|
|
2615
|
-
const removeRipple =
|
|
2608
|
+
const removeRipple = React37__namespace.useCallback((id) => {
|
|
2616
2609
|
setRipples((prev) => prev.filter((r) => r.id !== id));
|
|
2617
2610
|
}, []);
|
|
2618
2611
|
return { ripples, onPointerDown, removeRipple };
|
|
@@ -2626,27 +2619,1950 @@ function TouchTarget() {
|
|
|
2626
2619
|
}
|
|
2627
2620
|
);
|
|
2628
2621
|
}
|
|
2629
|
-
|
|
2622
|
+
|
|
2623
|
+
// src/shapes/core/features.ts
|
|
2624
|
+
function cornerFeature(cubics, convex2) {
|
|
2625
|
+
return { type: "corner", cubics, convex: convex2 };
|
|
2626
|
+
}
|
|
2627
|
+
function edgeFeature(cubics) {
|
|
2628
|
+
return { type: "edge", cubics };
|
|
2629
|
+
}
|
|
2630
|
+
function transformFeature(feature, fn) {
|
|
2631
|
+
const cubics = feature.cubics.map((c) => c.transformed(fn));
|
|
2632
|
+
if (feature.type === "corner") {
|
|
2633
|
+
return cornerFeature(cubics, feature.convex);
|
|
2634
|
+
}
|
|
2635
|
+
return edgeFeature(cubics);
|
|
2636
|
+
}
|
|
2637
|
+
|
|
2638
|
+
// src/shapes/math/corner-rounding.ts
|
|
2639
|
+
var UNROUNDED = Object.freeze({
|
|
2640
|
+
radius: 0,
|
|
2641
|
+
smoothing: 0
|
|
2642
|
+
});
|
|
2643
|
+
|
|
2644
|
+
// src/shapes/utils/utils.ts
|
|
2645
|
+
var DISTANCE_EPSILON = 1e-4;
|
|
2646
|
+
var FLOAT_PI = Math.PI;
|
|
2647
|
+
function distance(dx, dy) {
|
|
2648
|
+
return Math.sqrt(dx * dx + dy * dy);
|
|
2649
|
+
}
|
|
2650
|
+
function distanceSquared(dx, dy) {
|
|
2651
|
+
return dx * dx + dy * dy;
|
|
2652
|
+
}
|
|
2653
|
+
function radialToCartesian(radius, angle) {
|
|
2654
|
+
return [radius * Math.cos(angle), radius * Math.sin(angle)];
|
|
2655
|
+
}
|
|
2656
|
+
function interpolate(start, stop, fraction) {
|
|
2657
|
+
return start + (stop - start) * fraction;
|
|
2658
|
+
}
|
|
2659
|
+
function square(value) {
|
|
2660
|
+
return value * value;
|
|
2661
|
+
}
|
|
2662
|
+
function convex(prevX, prevY, currX, currY, nextX, nextY) {
|
|
2663
|
+
const v1x = currX - prevX;
|
|
2664
|
+
const v1y = currY - prevY;
|
|
2665
|
+
const v2x = nextX - currX;
|
|
2666
|
+
const v2y = nextY - currY;
|
|
2667
|
+
return v1x * v2y - v1y * v2x > 0;
|
|
2668
|
+
}
|
|
2669
|
+
|
|
2670
|
+
// src/shapes/math/point.ts
|
|
2671
|
+
function point(x, y) {
|
|
2672
|
+
return { x, y };
|
|
2673
|
+
}
|
|
2674
|
+
|
|
2675
|
+
// src/shapes/math/cubic.ts
|
|
2676
|
+
var Cubic = class _Cubic {
|
|
2677
|
+
constructor(points) {
|
|
2678
|
+
if (points.length !== 8)
|
|
2679
|
+
throw new Error("Cubic points array must have exactly 8 elements");
|
|
2680
|
+
this.points = points;
|
|
2681
|
+
}
|
|
2682
|
+
/** First anchor point X */
|
|
2683
|
+
get anchor0X() {
|
|
2684
|
+
return this.points[0];
|
|
2685
|
+
}
|
|
2686
|
+
/** First anchor point Y */
|
|
2687
|
+
get anchor0Y() {
|
|
2688
|
+
return this.points[1];
|
|
2689
|
+
}
|
|
2690
|
+
/** First control point X */
|
|
2691
|
+
get control0X() {
|
|
2692
|
+
return this.points[2];
|
|
2693
|
+
}
|
|
2694
|
+
/** First control point Y */
|
|
2695
|
+
get control0Y() {
|
|
2696
|
+
return this.points[3];
|
|
2697
|
+
}
|
|
2698
|
+
/** Second control point X */
|
|
2699
|
+
get control1X() {
|
|
2700
|
+
return this.points[4];
|
|
2701
|
+
}
|
|
2702
|
+
/** Second control point Y */
|
|
2703
|
+
get control1Y() {
|
|
2704
|
+
return this.points[5];
|
|
2705
|
+
}
|
|
2706
|
+
/** Second anchor point X */
|
|
2707
|
+
get anchor1X() {
|
|
2708
|
+
return this.points[6];
|
|
2709
|
+
}
|
|
2710
|
+
/** Second anchor point Y */
|
|
2711
|
+
get anchor1Y() {
|
|
2712
|
+
return this.points[7];
|
|
2713
|
+
}
|
|
2714
|
+
/**
|
|
2715
|
+
* Returns a point on the curve at parameter t (0=start, 1=end).
|
|
2716
|
+
* Uses the standard cubic Bézier formula.
|
|
2717
|
+
* @param t - Parameter in [0, 1]
|
|
2718
|
+
*/
|
|
2719
|
+
pointOnCurve(t) {
|
|
2720
|
+
const u = 1 - t;
|
|
2721
|
+
return point(
|
|
2722
|
+
this.anchor0X * (u * u * u) + this.control0X * (3 * t * u * u) + this.control1X * (3 * t * t * u) + this.anchor1X * (t * t * t),
|
|
2723
|
+
this.anchor0Y * (u * u * u) + this.control0Y * (3 * t * u * u) + this.control1Y * (3 * t * t * u) + this.anchor1Y * (t * t * t)
|
|
2724
|
+
);
|
|
2725
|
+
}
|
|
2726
|
+
/**
|
|
2727
|
+
* Returns true if this curve has (near) zero length.
|
|
2728
|
+
*/
|
|
2729
|
+
zeroLength() {
|
|
2730
|
+
return Math.abs(this.anchor0X - this.anchor1X) < DISTANCE_EPSILON && Math.abs(this.anchor0Y - this.anchor1Y) < DISTANCE_EPSILON;
|
|
2731
|
+
}
|
|
2732
|
+
/**
|
|
2733
|
+
* Splits this cubic at parameter t, returning two cubics.
|
|
2734
|
+
* Uses De Casteljau's algorithm.
|
|
2735
|
+
* @param t - Split parameter in [0, 1]
|
|
2736
|
+
* @returns [left, right] pair
|
|
2737
|
+
*/
|
|
2738
|
+
split(t) {
|
|
2739
|
+
const u = 1 - t;
|
|
2740
|
+
const mid = this.pointOnCurve(t);
|
|
2741
|
+
const left = new _Cubic([
|
|
2742
|
+
this.anchor0X,
|
|
2743
|
+
this.anchor0Y,
|
|
2744
|
+
this.anchor0X * u + this.control0X * t,
|
|
2745
|
+
this.anchor0Y * u + this.control0Y * t,
|
|
2746
|
+
this.anchor0X * (u * u) + this.control0X * (2 * u * t) + this.control1X * (t * t),
|
|
2747
|
+
this.anchor0Y * (u * u) + this.control0Y * (2 * u * t) + this.control1Y * (t * t),
|
|
2748
|
+
mid.x,
|
|
2749
|
+
mid.y
|
|
2750
|
+
]);
|
|
2751
|
+
const right = new _Cubic([
|
|
2752
|
+
mid.x,
|
|
2753
|
+
mid.y,
|
|
2754
|
+
this.control0X * (u * u) + this.control1X * (2 * u * t) + this.anchor1X * (t * t),
|
|
2755
|
+
this.control0Y * (u * u) + this.control1Y * (2 * u * t) + this.anchor1Y * (t * t),
|
|
2756
|
+
this.control1X * u + this.anchor1X * t,
|
|
2757
|
+
this.control1Y * u + this.anchor1Y * t,
|
|
2758
|
+
this.anchor1X,
|
|
2759
|
+
this.anchor1Y
|
|
2760
|
+
]);
|
|
2761
|
+
return [left, right];
|
|
2762
|
+
}
|
|
2763
|
+
/**
|
|
2764
|
+
* Returns a reversed copy of this cubic (anchor0 ↔ anchor1, controls swapped).
|
|
2765
|
+
*/
|
|
2766
|
+
reverse() {
|
|
2767
|
+
return new _Cubic([
|
|
2768
|
+
this.anchor1X,
|
|
2769
|
+
this.anchor1Y,
|
|
2770
|
+
this.control1X,
|
|
2771
|
+
this.control1Y,
|
|
2772
|
+
this.control0X,
|
|
2773
|
+
this.control0Y,
|
|
2774
|
+
this.anchor0X,
|
|
2775
|
+
this.anchor0Y
|
|
2776
|
+
]);
|
|
2777
|
+
}
|
|
2778
|
+
/**
|
|
2779
|
+
* Calculates the axis-aligned bounding box.
|
|
2780
|
+
* @param approximate - If true, uses control point hull (faster). Default: false.
|
|
2781
|
+
* @returns [minX, minY, maxX, maxY]
|
|
2782
|
+
*/
|
|
2783
|
+
calculateBounds(approximate = false) {
|
|
2784
|
+
if (this.zeroLength()) {
|
|
2785
|
+
return [this.anchor0X, this.anchor0Y, this.anchor0X, this.anchor0Y];
|
|
2786
|
+
}
|
|
2787
|
+
let minX = Math.min(this.anchor0X, this.anchor1X);
|
|
2788
|
+
let minY = Math.min(this.anchor0Y, this.anchor1Y);
|
|
2789
|
+
let maxX = Math.max(this.anchor0X, this.anchor1X);
|
|
2790
|
+
let maxY = Math.max(this.anchor0Y, this.anchor1Y);
|
|
2791
|
+
if (approximate) {
|
|
2792
|
+
minX = Math.min(minX, this.control0X, this.control1X);
|
|
2793
|
+
minY = Math.min(minY, this.control0Y, this.control1Y);
|
|
2794
|
+
maxX = Math.max(maxX, this.control0X, this.control1X);
|
|
2795
|
+
maxY = Math.max(maxY, this.control0Y, this.control1Y);
|
|
2796
|
+
return [minX, minY, maxX, maxY];
|
|
2797
|
+
}
|
|
2798
|
+
const xa = -this.anchor0X + 3 * this.control0X - 3 * this.control1X + this.anchor1X;
|
|
2799
|
+
const xb = 2 * this.anchor0X - 4 * this.control0X + 2 * this.control1X;
|
|
2800
|
+
const xc = -this.anchor0X + this.control0X;
|
|
2801
|
+
const expandX = (t) => {
|
|
2802
|
+
if (t >= 0 && t <= 1) {
|
|
2803
|
+
const v = this.pointOnCurve(t).x;
|
|
2804
|
+
if (v < minX) minX = v;
|
|
2805
|
+
if (v > maxX) maxX = v;
|
|
2806
|
+
}
|
|
2807
|
+
};
|
|
2808
|
+
if (Math.abs(xa) < DISTANCE_EPSILON) {
|
|
2809
|
+
if (xb !== 0) expandX(2 * xc / (-2 * xb));
|
|
2810
|
+
} else {
|
|
2811
|
+
const xs = xb * xb - 4 * xa * xc;
|
|
2812
|
+
if (xs >= 0) {
|
|
2813
|
+
expandX((-xb + Math.sqrt(xs)) / (2 * xa));
|
|
2814
|
+
expandX((-xb - Math.sqrt(xs)) / (2 * xa));
|
|
2815
|
+
}
|
|
2816
|
+
}
|
|
2817
|
+
const ya = -this.anchor0Y + 3 * this.control0Y - 3 * this.control1Y + this.anchor1Y;
|
|
2818
|
+
const yb = 2 * this.anchor0Y - 4 * this.control0Y + 2 * this.control1Y;
|
|
2819
|
+
const yc = -this.anchor0Y + this.control0Y;
|
|
2820
|
+
const expandY = (t) => {
|
|
2821
|
+
if (t >= 0 && t <= 1) {
|
|
2822
|
+
const v = this.pointOnCurve(t).y;
|
|
2823
|
+
if (v < minY) minY = v;
|
|
2824
|
+
if (v > maxY) maxY = v;
|
|
2825
|
+
}
|
|
2826
|
+
};
|
|
2827
|
+
if (Math.abs(ya) < DISTANCE_EPSILON) {
|
|
2828
|
+
if (yb !== 0) expandY(2 * yc / (-2 * yb));
|
|
2829
|
+
} else {
|
|
2830
|
+
const ys = yb * yb - 4 * ya * yc;
|
|
2831
|
+
if (ys >= 0) {
|
|
2832
|
+
expandY((-yb + Math.sqrt(ys)) / (2 * ya));
|
|
2833
|
+
expandY((-yb - Math.sqrt(ys)) / (2 * ya));
|
|
2834
|
+
}
|
|
2835
|
+
}
|
|
2836
|
+
return [minX, minY, maxX, maxY];
|
|
2837
|
+
}
|
|
2838
|
+
/**
|
|
2839
|
+
* Interpolates between this cubic and another at fraction t.
|
|
2840
|
+
* @param other - Target cubic
|
|
2841
|
+
* @param t - Fraction [0, 1]
|
|
2842
|
+
*/
|
|
2843
|
+
interpolateTo(other, t) {
|
|
2844
|
+
return new _Cubic(
|
|
2845
|
+
this.points.map((v, i) => interpolate(v, other.points[i], t))
|
|
2846
|
+
);
|
|
2847
|
+
}
|
|
2848
|
+
/**
|
|
2849
|
+
* Applies a PointTransformer to all anchor and control points.
|
|
2850
|
+
* @param fn - The transform function
|
|
2851
|
+
*/
|
|
2852
|
+
transformed(fn) {
|
|
2853
|
+
const p = this.points.slice();
|
|
2854
|
+
for (let i = 0; i < 8; i += 2) {
|
|
2855
|
+
const [tx, ty] = fn(p[i], p[i + 1]);
|
|
2856
|
+
p[i] = tx;
|
|
2857
|
+
p[i + 1] = ty;
|
|
2858
|
+
}
|
|
2859
|
+
return new _Cubic(p);
|
|
2860
|
+
}
|
|
2861
|
+
toString() {
|
|
2862
|
+
return `Cubic(a0=(${this.anchor0X},${this.anchor0Y}) c0=(${this.control0X},${this.control0Y}) c1=(${this.control1X},${this.control1Y}) a1=(${this.anchor1X},${this.anchor1Y}))`;
|
|
2863
|
+
}
|
|
2864
|
+
// ─── Static factories ─────────────────────────────────────────────────────
|
|
2865
|
+
/**
|
|
2866
|
+
* Creates a cubic representing a straight line.
|
|
2867
|
+
* Control points lie at 1/3 and 2/3 of the line.
|
|
2868
|
+
* @param x0 - Start anchor X
|
|
2869
|
+
* @param y0 - Start anchor Y
|
|
2870
|
+
* @param x1 - End anchor X
|
|
2871
|
+
* @param y1 - End anchor Y
|
|
2872
|
+
*/
|
|
2873
|
+
static straightLine(x0, y0, x1, y1) {
|
|
2874
|
+
return new _Cubic([
|
|
2875
|
+
x0,
|
|
2876
|
+
y0,
|
|
2877
|
+
interpolate(x0, x1, 1 / 3),
|
|
2878
|
+
interpolate(y0, y1, 1 / 3),
|
|
2879
|
+
interpolate(x0, x1, 2 / 3),
|
|
2880
|
+
interpolate(y0, y1, 2 / 3),
|
|
2881
|
+
x1,
|
|
2882
|
+
y1
|
|
2883
|
+
]);
|
|
2884
|
+
}
|
|
2885
|
+
/**
|
|
2886
|
+
* Creates a cubic approximating a circular arc.
|
|
2887
|
+
* p0 and p1 must be equidistant from the center.
|
|
2888
|
+
* For arcs > 180°, use multiple cubics.
|
|
2889
|
+
*
|
|
2890
|
+
* @param centerX - Arc center X
|
|
2891
|
+
* @param centerY - Arc center Y
|
|
2892
|
+
* @param x0 - Start point X (on circle)
|
|
2893
|
+
* @param y0 - Start point Y (on circle)
|
|
2894
|
+
* @param x1 - End point X (on circle)
|
|
2895
|
+
* @param y1 - End point Y (on circle)
|
|
2896
|
+
*/
|
|
2897
|
+
static circularArc(centerX, centerY, x0, y0, x1, y1) {
|
|
2898
|
+
const p0dx = x0 - centerX;
|
|
2899
|
+
const p0dy = y0 - centerY;
|
|
2900
|
+
const p1dx = x1 - centerX;
|
|
2901
|
+
const p1dy = y1 - centerY;
|
|
2902
|
+
const d0 = Math.sqrt(p0dx * p0dx + p0dy * p0dy);
|
|
2903
|
+
const d1 = Math.sqrt(p1dx * p1dx + p1dy * p1dy);
|
|
2904
|
+
if (d0 < DISTANCE_EPSILON || d1 < DISTANCE_EPSILON) {
|
|
2905
|
+
return _Cubic.straightLine(x0, y0, x1, y1);
|
|
2906
|
+
}
|
|
2907
|
+
const nx0 = p0dx / d0, ny0 = p0dy / d0;
|
|
2908
|
+
const nx1 = p1dx / d1, ny1 = p1dy / d1;
|
|
2909
|
+
const rx0 = -ny0, ry0 = nx0;
|
|
2910
|
+
const rx1 = -ny1, ry1 = nx1;
|
|
2911
|
+
const cosa = nx0 * nx1 + ny0 * ny1;
|
|
2912
|
+
if (cosa > 0.999) return _Cubic.straightLine(x0, y0, x1, y1);
|
|
2913
|
+
const clockwise = rx0 * p1dx + ry0 * p1dy >= 0;
|
|
2914
|
+
const k = d0 * (4 / 3) * (Math.sqrt(2 * (1 - cosa)) - Math.sqrt(1 - square(cosa))) / (1 - cosa) * (clockwise ? 1 : -1);
|
|
2915
|
+
return new _Cubic([
|
|
2916
|
+
x0,
|
|
2917
|
+
y0,
|
|
2918
|
+
x0 + rx0 * k,
|
|
2919
|
+
y0 + ry0 * k,
|
|
2920
|
+
x1 - rx1 * k,
|
|
2921
|
+
y1 - ry1 * k,
|
|
2922
|
+
x1,
|
|
2923
|
+
y1
|
|
2924
|
+
]);
|
|
2925
|
+
}
|
|
2926
|
+
/**
|
|
2927
|
+
* Creates a zero-length cubic at the given point.
|
|
2928
|
+
* @param x - X coordinate
|
|
2929
|
+
* @param y - Y coordinate
|
|
2930
|
+
*/
|
|
2931
|
+
static empty(x, y) {
|
|
2932
|
+
return new _Cubic([x, y, x, y, x, y, x, y]);
|
|
2933
|
+
}
|
|
2934
|
+
};
|
|
2935
|
+
|
|
2936
|
+
// src/shapes/core/rounded-polygon.ts
|
|
2937
|
+
var RoundedCorner = class {
|
|
2938
|
+
constructor(p0, p1, p2, rounding = UNROUNDED) {
|
|
2939
|
+
this.p0 = p0;
|
|
2940
|
+
this.p1 = p1;
|
|
2941
|
+
this.p2 = p2;
|
|
2942
|
+
this.rounding = rounding;
|
|
2943
|
+
this.center = point(0, 0);
|
|
2944
|
+
const v01x = p0.x - p1.x, v01y = p0.y - p1.y;
|
|
2945
|
+
const v21x = p2.x - p1.x, v21y = p2.y - p1.y;
|
|
2946
|
+
const d01 = distance(v01x, v01y);
|
|
2947
|
+
const d21 = distance(v21x, v21y);
|
|
2948
|
+
if (d01 > 0 && d21 > 0) {
|
|
2949
|
+
this.d1 = point(v01x / d01, v01y / d01);
|
|
2950
|
+
this.d2 = point(v21x / d21, v21y / d21);
|
|
2951
|
+
this.cornerRadius = rounding.radius;
|
|
2952
|
+
this.smoothing = rounding.smoothing;
|
|
2953
|
+
const cosA = this.d1.x * this.d2.x + this.d1.y * this.d2.y;
|
|
2954
|
+
this.sinAngle = Math.sqrt(Math.max(0, 1 - square(cosA)));
|
|
2955
|
+
this.expectedRoundCut = this.sinAngle > 1e-3 ? this.cornerRadius * (cosA + 1) / this.sinAngle : 0;
|
|
2956
|
+
} else {
|
|
2957
|
+
this.d1 = point(0, 0);
|
|
2958
|
+
this.d2 = point(0, 0);
|
|
2959
|
+
this.cornerRadius = 0;
|
|
2960
|
+
this.smoothing = 0;
|
|
2961
|
+
this.sinAngle = 0;
|
|
2962
|
+
this.expectedRoundCut = 0;
|
|
2963
|
+
}
|
|
2964
|
+
}
|
|
2965
|
+
get expectedCut() {
|
|
2966
|
+
return (1 + this.smoothing) * this.expectedRoundCut;
|
|
2967
|
+
}
|
|
2968
|
+
getCubics(allowedCut0, allowedCut1 = allowedCut0) {
|
|
2969
|
+
const allowedCut = Math.min(allowedCut0, allowedCut1);
|
|
2970
|
+
if (this.expectedRoundCut < DISTANCE_EPSILON || allowedCut < DISTANCE_EPSILON || this.cornerRadius < DISTANCE_EPSILON) {
|
|
2971
|
+
this.center = this.p1;
|
|
2972
|
+
return [Cubic.straightLine(this.p1.x, this.p1.y, this.p1.x, this.p1.y)];
|
|
2973
|
+
}
|
|
2974
|
+
const actualRoundCut = Math.min(allowedCut, this.expectedRoundCut);
|
|
2975
|
+
const actualSmoothing0 = this.calcSmoothingValue(allowedCut0);
|
|
2976
|
+
const actualSmoothing1 = this.calcSmoothingValue(allowedCut1);
|
|
2977
|
+
const actualR = this.cornerRadius * actualRoundCut / this.expectedRoundCut;
|
|
2978
|
+
const centerDist = Math.sqrt(square(actualR) + square(actualRoundCut));
|
|
2979
|
+
const midDirX = (this.d1.x + this.d2.x) / 2;
|
|
2980
|
+
const midDirY = (this.d1.y + this.d2.y) / 2;
|
|
2981
|
+
const midDist = distance(midDirX, midDirY);
|
|
2982
|
+
this.center = point(
|
|
2983
|
+
this.p1.x + midDirX / midDist * centerDist,
|
|
2984
|
+
this.p1.y + midDirY / midDist * centerDist
|
|
2985
|
+
);
|
|
2986
|
+
const ci0 = point(
|
|
2987
|
+
this.p1.x + this.d1.x * actualRoundCut,
|
|
2988
|
+
this.p1.y + this.d1.y * actualRoundCut
|
|
2989
|
+
);
|
|
2990
|
+
const ci2 = point(
|
|
2991
|
+
this.p1.x + this.d2.x * actualRoundCut,
|
|
2992
|
+
this.p1.y + this.d2.y * actualRoundCut
|
|
2993
|
+
);
|
|
2994
|
+
const flanking0 = this.computeFlankingCurve(
|
|
2995
|
+
actualRoundCut,
|
|
2996
|
+
actualSmoothing0,
|
|
2997
|
+
this.p1,
|
|
2998
|
+
this.p0,
|
|
2999
|
+
ci0,
|
|
3000
|
+
ci2,
|
|
3001
|
+
this.center,
|
|
3002
|
+
actualR
|
|
3003
|
+
);
|
|
3004
|
+
const flanking2 = this.computeFlankingCurve(
|
|
3005
|
+
actualRoundCut,
|
|
3006
|
+
actualSmoothing1,
|
|
3007
|
+
this.p1,
|
|
3008
|
+
this.p2,
|
|
3009
|
+
ci2,
|
|
3010
|
+
ci0,
|
|
3011
|
+
this.center,
|
|
3012
|
+
actualR
|
|
3013
|
+
).reverse();
|
|
3014
|
+
return [
|
|
3015
|
+
flanking0,
|
|
3016
|
+
Cubic.circularArc(
|
|
3017
|
+
this.center.x,
|
|
3018
|
+
this.center.y,
|
|
3019
|
+
flanking0.anchor1X,
|
|
3020
|
+
flanking0.anchor1Y,
|
|
3021
|
+
flanking2.anchor0X,
|
|
3022
|
+
flanking2.anchor0Y
|
|
3023
|
+
),
|
|
3024
|
+
flanking2
|
|
3025
|
+
];
|
|
3026
|
+
}
|
|
3027
|
+
calcSmoothingValue(allowedCut) {
|
|
3028
|
+
if (allowedCut > this.expectedCut) return this.smoothing;
|
|
3029
|
+
if (allowedCut > this.expectedRoundCut) {
|
|
3030
|
+
return this.smoothing * (allowedCut - this.expectedRoundCut) / (this.expectedCut - this.expectedRoundCut);
|
|
3031
|
+
}
|
|
3032
|
+
return 0;
|
|
3033
|
+
}
|
|
3034
|
+
computeFlankingCurve(actualRoundCut, actualSmoothing, corner, sideStart, circleIntersect, otherIntersect, circleCenter, actualR) {
|
|
3035
|
+
var _a;
|
|
3036
|
+
const sdx = sideStart.x - corner.x, sdy = sideStart.y - corner.y;
|
|
3037
|
+
const sd = distance(sdx, sdy);
|
|
3038
|
+
const sideDir = point(sdx / sd, sdy / sd);
|
|
3039
|
+
const curveStart = point(
|
|
3040
|
+
corner.x + sideDir.x * actualRoundCut * (1 + actualSmoothing),
|
|
3041
|
+
corner.y + sideDir.y * actualRoundCut * (1 + actualSmoothing)
|
|
3042
|
+
);
|
|
3043
|
+
const px = interpolate(
|
|
3044
|
+
circleIntersect.x,
|
|
3045
|
+
(circleIntersect.x + otherIntersect.x) / 2,
|
|
3046
|
+
actualSmoothing
|
|
3047
|
+
);
|
|
3048
|
+
const py = interpolate(
|
|
3049
|
+
circleIntersect.y,
|
|
3050
|
+
(circleIntersect.y + otherIntersect.y) / 2,
|
|
3051
|
+
actualSmoothing
|
|
3052
|
+
);
|
|
3053
|
+
const ptoCx = px - circleCenter.x, ptoCy = py - circleCenter.y;
|
|
3054
|
+
const ptoCd = distance(ptoCx, ptoCy);
|
|
3055
|
+
const curveEnd = point(
|
|
3056
|
+
circleCenter.x + ptoCx / ptoCd * actualR,
|
|
3057
|
+
circleCenter.y + ptoCy / ptoCd * actualR
|
|
3058
|
+
);
|
|
3059
|
+
const tangentX = -(curveEnd.y - circleCenter.y);
|
|
3060
|
+
const tangentY = curveEnd.x - circleCenter.x;
|
|
3061
|
+
const anchorEnd = (_a = lineIntersection(
|
|
3062
|
+
sideStart,
|
|
3063
|
+
sideDir,
|
|
3064
|
+
curveEnd,
|
|
3065
|
+
point(tangentX, tangentY)
|
|
3066
|
+
)) != null ? _a : circleIntersect;
|
|
3067
|
+
const anchorStart = point(
|
|
3068
|
+
(curveStart.x + anchorEnd.x * 2) / 3,
|
|
3069
|
+
(curveStart.y + anchorEnd.y * 2) / 3
|
|
3070
|
+
);
|
|
3071
|
+
return new Cubic([
|
|
3072
|
+
curveStart.x,
|
|
3073
|
+
curveStart.y,
|
|
3074
|
+
anchorStart.x,
|
|
3075
|
+
anchorStart.y,
|
|
3076
|
+
anchorEnd.x,
|
|
3077
|
+
anchorEnd.y,
|
|
3078
|
+
curveEnd.x,
|
|
3079
|
+
curveEnd.y
|
|
3080
|
+
]);
|
|
3081
|
+
}
|
|
3082
|
+
};
|
|
3083
|
+
function lineIntersection(p0, d0, p1, d1) {
|
|
3084
|
+
const rd1x = -d1.y, rd1y = d1.x;
|
|
3085
|
+
const den = d0.x * rd1x + d0.y * rd1y;
|
|
3086
|
+
if (Math.abs(den) < DISTANCE_EPSILON) return null;
|
|
3087
|
+
const num = (p1.x - p0.x) * rd1x + (p1.y - p0.y) * rd1y;
|
|
3088
|
+
if (Math.abs(den) < DISTANCE_EPSILON * Math.abs(num)) return null;
|
|
3089
|
+
const k = num / den;
|
|
3090
|
+
return point(p0.x + d0.x * k, p0.y + d0.y * k);
|
|
3091
|
+
}
|
|
3092
|
+
function calculateCenter(vertices) {
|
|
3093
|
+
let cx = 0, cy = 0;
|
|
3094
|
+
for (let i = 0; i < vertices.length; i += 2) {
|
|
3095
|
+
cx += vertices[i];
|
|
3096
|
+
cy += vertices[i + 1];
|
|
3097
|
+
}
|
|
3098
|
+
const n = vertices.length / 2;
|
|
3099
|
+
return point(cx / n, cy / n);
|
|
3100
|
+
}
|
|
3101
|
+
function verticesFromNumVerts(numVertices, radius, cx, cy) {
|
|
3102
|
+
const result = [];
|
|
3103
|
+
for (let i = 0; i < numVertices; i++) {
|
|
3104
|
+
const angle = FLOAT_PI / numVertices * 2 * i;
|
|
3105
|
+
const [rx, ry] = radialToCartesian(radius, angle);
|
|
3106
|
+
result.push(cx + rx, cy + ry);
|
|
3107
|
+
}
|
|
3108
|
+
return result;
|
|
3109
|
+
}
|
|
3110
|
+
var RoundedPolygon = class _RoundedPolygon {
|
|
3111
|
+
/** @internal Use static factory methods instead */
|
|
3112
|
+
constructor(features, center) {
|
|
3113
|
+
this.features = features;
|
|
3114
|
+
this.center = center;
|
|
3115
|
+
this.cubics = buildCubicsList(features);
|
|
3116
|
+
validateContiguity(this.cubics);
|
|
3117
|
+
}
|
|
3118
|
+
get centerX() {
|
|
3119
|
+
return this.center.x;
|
|
3120
|
+
}
|
|
3121
|
+
get centerY() {
|
|
3122
|
+
return this.center.y;
|
|
3123
|
+
}
|
|
3124
|
+
// ─── Static factories ────────────────────────────────────────────────
|
|
3125
|
+
/**
|
|
3126
|
+
* Creates a polygon from a vertex count (regular polygon).
|
|
3127
|
+
* @param numVertices - Number of vertices (≥ 3)
|
|
3128
|
+
* @param radius - Circumradius (default: 1)
|
|
3129
|
+
* @param centerX - Center X (default: 0)
|
|
3130
|
+
* @param centerY - Center Y (default: 0)
|
|
3131
|
+
* @param rounding - Corner rounding for all vertices
|
|
3132
|
+
* @param perVertexRounding - Per-vertex rounding overrides
|
|
3133
|
+
*/
|
|
3134
|
+
static fromNumVertices(numVertices, radius = 1, centerX = 0, centerY = 0, rounding = UNROUNDED, perVertexRounding) {
|
|
3135
|
+
if (numVertices < 3)
|
|
3136
|
+
throw new Error("Polygon must have at least 3 vertices");
|
|
3137
|
+
const vertices = verticesFromNumVerts(
|
|
3138
|
+
numVertices,
|
|
3139
|
+
radius,
|
|
3140
|
+
centerX,
|
|
3141
|
+
centerY
|
|
3142
|
+
);
|
|
3143
|
+
return _RoundedPolygon.fromVertices(
|
|
3144
|
+
vertices,
|
|
3145
|
+
rounding,
|
|
3146
|
+
perVertexRounding,
|
|
3147
|
+
centerX,
|
|
3148
|
+
centerY
|
|
3149
|
+
);
|
|
3150
|
+
}
|
|
3151
|
+
/**
|
|
3152
|
+
* Creates a polygon from a flat vertex array [x0, y0, x1, y1, ...].
|
|
3153
|
+
* @param vertices - Flat array of x,y pairs (length must be even and ≥ 6)
|
|
3154
|
+
* @param rounding - Corner rounding for all vertices
|
|
3155
|
+
* @param perVertexRounding - Per-vertex rounding overrides
|
|
3156
|
+
* @param centerX - Center X (auto-calculated if not provided)
|
|
3157
|
+
* @param centerY - Center Y (auto-calculated if not provided)
|
|
3158
|
+
*/
|
|
3159
|
+
static fromVertices(vertices, rounding = UNROUNDED, perVertexRounding, centerX, centerY) {
|
|
3160
|
+
if (vertices.length < 6)
|
|
3161
|
+
throw new Error("Polygon must have at least 3 vertices");
|
|
3162
|
+
if (vertices.length % 2 !== 0)
|
|
3163
|
+
throw new Error("Vertices array must have even length");
|
|
3164
|
+
if (perVertexRounding && perVertexRounding.length * 2 !== vertices.length) {
|
|
3165
|
+
throw new Error("perVertexRounding must match vertex count");
|
|
3166
|
+
}
|
|
3167
|
+
const n = vertices.length / 2;
|
|
3168
|
+
const roundedCorners = [];
|
|
3169
|
+
for (let i = 0; i < n; i++) {
|
|
3170
|
+
const vtxRounding = perVertexRounding ? perVertexRounding[i] : rounding;
|
|
3171
|
+
const prevIdx = (i + n - 1) % n * 2;
|
|
3172
|
+
const nextIdx = (i + 1) % n * 2;
|
|
3173
|
+
roundedCorners.push(
|
|
3174
|
+
new RoundedCorner(
|
|
3175
|
+
point(vertices[prevIdx], vertices[prevIdx + 1]),
|
|
3176
|
+
point(vertices[i * 2], vertices[i * 2 + 1]),
|
|
3177
|
+
point(vertices[nextIdx], vertices[nextIdx + 1]),
|
|
3178
|
+
vtxRounding
|
|
3179
|
+
)
|
|
3180
|
+
);
|
|
3181
|
+
}
|
|
3182
|
+
const cutAdjusts = [];
|
|
3183
|
+
for (let ix = 0; ix < n; ix++) {
|
|
3184
|
+
const expectedRoundCut = roundedCorners[ix].expectedRoundCut + roundedCorners[(ix + 1) % n].expectedRoundCut;
|
|
3185
|
+
const expectedCut = roundedCorners[ix].expectedCut + roundedCorners[(ix + 1) % n].expectedCut;
|
|
3186
|
+
const vx = vertices[ix * 2], vy = vertices[ix * 2 + 1];
|
|
3187
|
+
const nx = vertices[(ix + 1) % n * 2], ny = vertices[(ix + 1) % n * 2 + 1];
|
|
3188
|
+
const sideSize = distance(vx - nx, vy - ny);
|
|
3189
|
+
if (expectedRoundCut > sideSize) {
|
|
3190
|
+
cutAdjusts.push([sideSize / expectedRoundCut, 0]);
|
|
3191
|
+
} else if (expectedCut > sideSize) {
|
|
3192
|
+
cutAdjusts.push([
|
|
3193
|
+
1,
|
|
3194
|
+
(sideSize - expectedRoundCut) / (expectedCut - expectedRoundCut)
|
|
3195
|
+
]);
|
|
3196
|
+
} else {
|
|
3197
|
+
cutAdjusts.push([1, 1]);
|
|
3198
|
+
}
|
|
3199
|
+
}
|
|
3200
|
+
const corners = [];
|
|
3201
|
+
for (let i = 0; i < n; i++) {
|
|
3202
|
+
const allowedCuts = [];
|
|
3203
|
+
for (const delta of [0, 1]) {
|
|
3204
|
+
const [roundCutRatio, cutRatio] = cutAdjusts[(i + n - 1 + delta) % n];
|
|
3205
|
+
allowedCuts.push(
|
|
3206
|
+
roundedCorners[i].expectedRoundCut * roundCutRatio + (roundedCorners[i].expectedCut - roundedCorners[i].expectedRoundCut) * cutRatio
|
|
3207
|
+
);
|
|
3208
|
+
}
|
|
3209
|
+
corners.push(roundedCorners[i].getCubics(allowedCuts[0], allowedCuts[1]));
|
|
3210
|
+
}
|
|
3211
|
+
const tempFeatures = [];
|
|
3212
|
+
for (let i = 0; i < n; i++) {
|
|
3213
|
+
const prevIdx = (i + n - 1) % n;
|
|
3214
|
+
const nextIdx = (i + 1) % n;
|
|
3215
|
+
const currV = point(vertices[i * 2], vertices[i * 2 + 1]);
|
|
3216
|
+
const prevV = point(vertices[prevIdx * 2], vertices[prevIdx * 2 + 1]);
|
|
3217
|
+
const nextV = point(vertices[nextIdx * 2], vertices[nextIdx * 2 + 1]);
|
|
3218
|
+
const isConvex = convex(
|
|
3219
|
+
prevV.x,
|
|
3220
|
+
prevV.y,
|
|
3221
|
+
currV.x,
|
|
3222
|
+
currV.y,
|
|
3223
|
+
nextV.x,
|
|
3224
|
+
nextV.y
|
|
3225
|
+
);
|
|
3226
|
+
tempFeatures.push(cornerFeature(corners[i], isConvex));
|
|
3227
|
+
const lastCornerA1 = corners[i][corners[i].length - 1];
|
|
3228
|
+
const nextCornerA0 = corners[(i + 1) % n][0];
|
|
3229
|
+
tempFeatures.push(
|
|
3230
|
+
edgeFeature([
|
|
3231
|
+
Cubic.straightLine(
|
|
3232
|
+
lastCornerA1.anchor1X,
|
|
3233
|
+
lastCornerA1.anchor1Y,
|
|
3234
|
+
nextCornerA0.anchor0X,
|
|
3235
|
+
nextCornerA0.anchor0Y
|
|
3236
|
+
)
|
|
3237
|
+
])
|
|
3238
|
+
);
|
|
3239
|
+
}
|
|
3240
|
+
const cx = centerX != null ? centerX : calculateCenter(vertices).x;
|
|
3241
|
+
const cy = centerY != null ? centerY : calculateCenter(vertices).y;
|
|
3242
|
+
return new _RoundedPolygon(tempFeatures, point(cx, cy));
|
|
3243
|
+
}
|
|
3244
|
+
/**
|
|
3245
|
+
* Creates a polygon from a pre-built Feature list.
|
|
3246
|
+
* @param features - Feature list (≥ 2 features)
|
|
3247
|
+
* @param centerX - Center X (auto-calculated if NaN)
|
|
3248
|
+
* @param centerY - Center Y (auto-calculated if NaN)
|
|
3249
|
+
*/
|
|
3250
|
+
static fromFeatures(features, centerX = Number.NaN, centerY = Number.NaN) {
|
|
3251
|
+
if (features.length < 2)
|
|
3252
|
+
throw new Error("Polygon must have at least 2 features");
|
|
3253
|
+
const allVertices = [];
|
|
3254
|
+
for (const f of features) {
|
|
3255
|
+
for (const c of f.cubics) {
|
|
3256
|
+
allVertices.push(c.anchor0X, c.anchor0Y);
|
|
3257
|
+
}
|
|
3258
|
+
}
|
|
3259
|
+
const cx = Number.isNaN(centerX) ? calculateCenter(allVertices).x : centerX;
|
|
3260
|
+
const cy = Number.isNaN(centerY) ? calculateCenter(allVertices).y : centerY;
|
|
3261
|
+
return new _RoundedPolygon(features, point(cx, cy));
|
|
3262
|
+
}
|
|
3263
|
+
// ─── Instance methods ────────────────────────────────────────────────
|
|
3264
|
+
/**
|
|
3265
|
+
* Returns a new RoundedPolygon with all points transformed.
|
|
3266
|
+
* @param fn - Transform function: (x, y) => [x', y']
|
|
3267
|
+
*/
|
|
3268
|
+
transformed(fn) {
|
|
3269
|
+
const [cx, cy] = fn(this.center.x, this.center.y);
|
|
3270
|
+
return new _RoundedPolygon(
|
|
3271
|
+
this.features.map((f) => transformFeature(f, fn)),
|
|
3272
|
+
point(cx, cy)
|
|
3273
|
+
);
|
|
3274
|
+
}
|
|
3275
|
+
/**
|
|
3276
|
+
* Returns a normalized copy: scaled and centered to fit in [0,1] × [0,1].
|
|
3277
|
+
* Maintains aspect ratio by using the larger dimension.
|
|
3278
|
+
*/
|
|
3279
|
+
normalized() {
|
|
3280
|
+
const [minX, minY, maxX, maxY] = this.calculateBounds(false);
|
|
3281
|
+
const width = maxX - minX;
|
|
3282
|
+
const height = maxY - minY;
|
|
3283
|
+
const side = Math.max(width, height);
|
|
3284
|
+
const offsetX = (side - width) / 2 - minX;
|
|
3285
|
+
const offsetY = (side - height) / 2 - minY;
|
|
3286
|
+
return this.transformed((x, y) => [
|
|
3287
|
+
(x + offsetX) / side,
|
|
3288
|
+
(y + offsetY) / side
|
|
3289
|
+
]);
|
|
3290
|
+
}
|
|
3291
|
+
/**
|
|
3292
|
+
* Calculates the axis-aligned bounding box.
|
|
3293
|
+
* @param approximate - If true, uses control point hull (faster). Default: true.
|
|
3294
|
+
* @returns [minX, minY, maxX, maxY]
|
|
3295
|
+
*/
|
|
3296
|
+
calculateBounds(approximate = true) {
|
|
3297
|
+
let minX = Number.MAX_VALUE, minY = Number.MAX_VALUE;
|
|
3298
|
+
let maxX = -Number.MAX_VALUE, maxY = -Number.MAX_VALUE;
|
|
3299
|
+
for (const c of this.cubics) {
|
|
3300
|
+
const [cx0, cy0, cx1, cy1] = c.calculateBounds(approximate);
|
|
3301
|
+
if (cx0 < minX) minX = cx0;
|
|
3302
|
+
if (cy0 < minY) minY = cy0;
|
|
3303
|
+
if (cx1 > maxX) maxX = cx1;
|
|
3304
|
+
if (cy1 > maxY) maxY = cy1;
|
|
3305
|
+
}
|
|
3306
|
+
return [minX, minY, maxX, maxY];
|
|
3307
|
+
}
|
|
3308
|
+
/**
|
|
3309
|
+
* Calculates the maximum bounding square (useful for shapes that rotate).
|
|
3310
|
+
* @returns [minX, minY, maxX, maxY] of the max-bounds square
|
|
3311
|
+
*/
|
|
3312
|
+
calculateMaxBounds() {
|
|
3313
|
+
let maxDistSq = 0;
|
|
3314
|
+
for (const c of this.cubics) {
|
|
3315
|
+
const ad = distanceSquared(
|
|
3316
|
+
c.anchor0X - this.centerX,
|
|
3317
|
+
c.anchor0Y - this.centerY
|
|
3318
|
+
);
|
|
3319
|
+
const mid = c.pointOnCurve(0.5);
|
|
3320
|
+
const md = distanceSquared(mid.x - this.centerX, mid.y - this.centerY);
|
|
3321
|
+
const m31 = Math.max(ad, md);
|
|
3322
|
+
if (m31 > maxDistSq) maxDistSq = m31;
|
|
3323
|
+
}
|
|
3324
|
+
const d = Math.sqrt(maxDistSq);
|
|
3325
|
+
return [
|
|
3326
|
+
this.centerX - d,
|
|
3327
|
+
this.centerY - d,
|
|
3328
|
+
this.centerX + d,
|
|
3329
|
+
this.centerY + d
|
|
3330
|
+
];
|
|
3331
|
+
}
|
|
3332
|
+
};
|
|
3333
|
+
function buildCubicsList(features) {
|
|
3334
|
+
const result = [];
|
|
3335
|
+
let firstCubic = null;
|
|
3336
|
+
let lastCubic = null;
|
|
3337
|
+
let firstFeatureSplitStart = null;
|
|
3338
|
+
let firstFeatureSplitEnd = null;
|
|
3339
|
+
if (features.length > 0 && features[0].cubics.length === 3) {
|
|
3340
|
+
const center = features[0].cubics[1];
|
|
3341
|
+
const [start, end] = center.split(0.5);
|
|
3342
|
+
firstFeatureSplitStart = [features[0].cubics[0], start];
|
|
3343
|
+
firstFeatureSplitEnd = [end, features[0].cubics[2]];
|
|
3344
|
+
}
|
|
3345
|
+
for (let i = 0; i <= features.length; i++) {
|
|
3346
|
+
let featureCubics;
|
|
3347
|
+
if (i === 0 && firstFeatureSplitEnd) {
|
|
3348
|
+
featureCubics = firstFeatureSplitEnd;
|
|
3349
|
+
} else if (i === features.length) {
|
|
3350
|
+
if (firstFeatureSplitStart) featureCubics = firstFeatureSplitStart;
|
|
3351
|
+
else break;
|
|
3352
|
+
} else {
|
|
3353
|
+
featureCubics = features[i].cubics;
|
|
3354
|
+
}
|
|
3355
|
+
for (const cubic of featureCubics) {
|
|
3356
|
+
if (!cubic.zeroLength()) {
|
|
3357
|
+
if (lastCubic) result.push(lastCubic);
|
|
3358
|
+
lastCubic = cubic;
|
|
3359
|
+
if (!firstCubic) firstCubic = cubic;
|
|
3360
|
+
} else if (lastCubic) {
|
|
3361
|
+
const p = lastCubic.points.slice();
|
|
3362
|
+
p[6] = cubic.anchor1X;
|
|
3363
|
+
p[7] = cubic.anchor1Y;
|
|
3364
|
+
lastCubic = new Cubic(p);
|
|
3365
|
+
}
|
|
3366
|
+
}
|
|
3367
|
+
}
|
|
3368
|
+
if (lastCubic && firstCubic) {
|
|
3369
|
+
result.push(
|
|
3370
|
+
new Cubic([
|
|
3371
|
+
lastCubic.anchor0X,
|
|
3372
|
+
lastCubic.anchor0Y,
|
|
3373
|
+
lastCubic.control0X,
|
|
3374
|
+
lastCubic.control0Y,
|
|
3375
|
+
lastCubic.control1X,
|
|
3376
|
+
lastCubic.control1Y,
|
|
3377
|
+
firstCubic.anchor0X,
|
|
3378
|
+
firstCubic.anchor0Y
|
|
3379
|
+
])
|
|
3380
|
+
);
|
|
3381
|
+
} else {
|
|
3382
|
+
result.push(Cubic.empty(0, 0));
|
|
3383
|
+
}
|
|
3384
|
+
return result;
|
|
3385
|
+
}
|
|
3386
|
+
function validateContiguity(cubics) {
|
|
3387
|
+
let prev = cubics[cubics.length - 1];
|
|
3388
|
+
for (const cubic of cubics) {
|
|
3389
|
+
if (Math.abs(cubic.anchor0X - prev.anchor1X) > DISTANCE_EPSILON || Math.abs(cubic.anchor0Y - prev.anchor1Y) > DISTANCE_EPSILON) {
|
|
3390
|
+
throw new Error(
|
|
3391
|
+
`RoundedPolygon must be contiguous: gap between (${cubic.anchor0X},${cubic.anchor0Y}) and (${prev.anchor1X},${prev.anchor1Y})`
|
|
3392
|
+
);
|
|
3393
|
+
}
|
|
3394
|
+
prev = cubic;
|
|
3395
|
+
}
|
|
3396
|
+
}
|
|
3397
|
+
|
|
3398
|
+
// src/shapes/catalog/md3-expressive-shapes.ts
|
|
3399
|
+
function createShape(pts) {
|
|
3400
|
+
const cubics = pts.map((p) => new Cubic(p));
|
|
3401
|
+
return RoundedPolygon.fromFeatures(
|
|
3402
|
+
cubics.map((c) => cornerFeature([c], false))
|
|
3403
|
+
);
|
|
3404
|
+
}
|
|
3405
|
+
var archShape = createShape([
|
|
3406
|
+
[1, 0.83461, 1, 0.8547, 1, 0.86477, 0.99898, 0.87322],
|
|
3407
|
+
[0.99898, 0.87322, 0.99115, 0.93918, 0.93918, 0.99115, 0.87322, 0.99898],
|
|
3408
|
+
[0.87322, 0.99898, 0.86477, 1, 0.8547, 1, 0.83461, 1],
|
|
3409
|
+
[0.83461, 1, 0.61154, 1, 0.38847, 1, 0.1654, 1],
|
|
3410
|
+
[0.1654, 1, 0.14529, 1, 0.13524, 1, 0.12679, 0.99898],
|
|
3411
|
+
[0.12679, 0.99898, 0.06084, 0.99115, 884e-5, 0.93918, 1e-3, 0.87322],
|
|
3412
|
+
[1e-3, 0.87322, 0, 0.86477, 0, 0.8547, 0, 0.83461],
|
|
3413
|
+
[0, 0.83461, 0, 0.72307, 0, 0.61154, 0, 0.5],
|
|
3414
|
+
[0, 0.5, 0, 0.22385, 0.22386, 0, 0.5, 0],
|
|
3415
|
+
[0.5, 0, 0.77615, 0, 1, 0.22385, 1, 0.5],
|
|
3416
|
+
[1, 0.5, 1, 0.61154, 1, 0.72307, 1, 0.83461]
|
|
3417
|
+
]);
|
|
3418
|
+
var arrowShape = createShape([
|
|
3419
|
+
[0.8594, 0.44684, 0.81504, 0.37855, 0.77068, 0.31016, 0.72632, 0.24187],
|
|
3420
|
+
[0.72632, 0.24187, 0.69754, 0.19753, 0.66825, 0.1526, 0.62934, 0.11738],
|
|
3421
|
+
[0.62934, 0.11738, 0.59043, 0.08209, 0.54003, 0.05716, 0.48834, 0.06041],
|
|
3422
|
+
[0.48834, 0.06041, 0.44296, 0.06333, 0.4009, 0.08773, 0.36769, 0.11959],
|
|
3423
|
+
[0.36769, 0.11959, 0.33449, 0.15146, 0.30869, 0.1907, 0.28332, 0.22956],
|
|
3424
|
+
[0.28332, 0.22956, 0.21469, 0.33456, 0.14598, 0.43956, 0.07736, 0.54462],
|
|
3425
|
+
[0.07736, 0.54462, 0.04474, 0.5945, 0.01128, 0.64655, 226e-5, 0.70598],
|
|
3426
|
+
[226e-5, 0.70598, -864e-5, 0.77779, 0.02074, 0.85092, 0.07284, 0.89867],
|
|
3427
|
+
[0.07284, 0.89867, 0.12733, 0.94861, 0.21563, 0.94456, 0.28196, 0.93089],
|
|
3428
|
+
[0.28196, 0.93089, 0.35467, 0.91586, 0.42576, 0.8876, 0.49992, 0.88769],
|
|
3429
|
+
[0.49992, 0.88769, 0.56344, 0.88769, 0.62483, 0.90858, 0.68664, 0.92377],
|
|
3430
|
+
[0.68664, 0.92377, 0.74837, 0.93886, 0.8147, 0.94817, 0.8743, 0.9257],
|
|
3431
|
+
[0.8743, 0.9257, 0.94829, 0.89788, 1.00142, 0.81877, 0.99997, 0.73757],
|
|
3432
|
+
[0.99997, 0.73757, 0.99861, 0.66348, 0.95714, 0.59731, 0.91721, 0.53567],
|
|
3433
|
+
[0.91721, 0.53567, 0.89797, 0.50608, 0.87873, 0.47643, 0.85948, 0.44684],
|
|
3434
|
+
[0.85948, 0.44684, 0.85946, 0.44684, 0.85943, 0.44684, 0.8594, 0.44684]
|
|
3435
|
+
]);
|
|
3436
|
+
var boomShape = createShape([
|
|
3437
|
+
[0.49006, 0.03176, 0.49241, 0.01294, 0.49359, 354e-5, 0.49537, 185e-5],
|
|
3438
|
+
[0.49537, 185e-5, 0.49796, -62e-5, 0.50203, -62e-5, 0.50462, 185e-5],
|
|
3439
|
+
[0.50462, 185e-5, 0.50641, 354e-5, 0.50759, 0.01294, 0.50994, 0.03176],
|
|
3440
|
+
[0.50994, 0.03176, 0.51992, 0.11153, 0.5299, 0.1913, 0.53987, 0.27107],
|
|
3441
|
+
[0.53987, 0.27107, 0.54082, 0.27866, 0.5413, 0.28244, 0.54266, 0.28403],
|
|
3442
|
+
[0.54266, 0.28403, 0.54464, 0.28628, 0.54787, 0.287, 0.5506, 0.28572],
|
|
3443
|
+
[0.5506, 0.28572, 0.55248, 0.28485, 0.55445, 0.28157, 0.55839, 0.275],
|
|
3444
|
+
[0.55839, 0.275, 0.59978, 0.20621, 0.64116, 0.13742, 0.68254, 0.06863],
|
|
3445
|
+
[0.68254, 0.06863, 0.69231, 0.05241, 0.69719, 0.04429, 0.6995, 0.04348],
|
|
3446
|
+
[0.6995, 0.04348, 0.70287, 0.04232, 0.70657, 0.04398, 0.70795, 0.04729],
|
|
3447
|
+
[0.70795, 0.04729, 0.70891, 0.04954, 0.70617, 0.05863, 0.70071, 0.07679],
|
|
3448
|
+
[0.70071, 0.07679, 0.67756, 0.15373, 0.6544, 0.23068, 0.63124, 0.30763],
|
|
3449
|
+
[0.63124, 0.30763, 0.62904, 0.31497, 0.62794, 0.31863, 0.62855, 0.3206],
|
|
3450
|
+
[0.62855, 0.3206, 0.62942, 0.32348, 0.6321, 0.32544, 0.63512, 0.32541],
|
|
3451
|
+
[0.63512, 0.32541, 0.63719, 0.32538, 0.64031, 0.32319, 0.64656, 0.31882],
|
|
3452
|
+
[0.64656, 0.31882, 0.7122, 0.2729, 0.77783, 0.22698, 0.84347, 0.18107],
|
|
3453
|
+
[0.84347, 0.18107, 0.85895, 0.17022, 0.86669, 0.16482, 0.86913, 0.16501],
|
|
3454
|
+
[0.86913, 0.16501, 0.87269, 0.16533, 0.87539, 0.16834, 0.87532, 0.17191],
|
|
3455
|
+
[0.87532, 0.17191, 0.87528, 0.17438, 0.86911, 0.18157, 0.85678, 0.19591],
|
|
3456
|
+
[0.85678, 0.19591, 0.80449, 0.25674, 0.75221, 0.31758, 0.69992, 0.37841],
|
|
3457
|
+
[0.69992, 0.37841, 0.69494, 0.38419, 0.69246, 0.3871, 0.69221, 0.38916],
|
|
3458
|
+
[0.69221, 0.38916, 0.69185, 0.39216, 0.6935, 0.39503, 0.69627, 0.39622],
|
|
3459
|
+
[0.69627, 0.39622, 0.69817, 0.39706, 0.70191, 0.39631, 0.70939, 0.39488],
|
|
3460
|
+
[0.70939, 0.39488, 0.78793, 0.37977, 0.86646, 0.36467, 0.945, 0.34957],
|
|
3461
|
+
[0.945, 0.34957, 0.96353, 0.346, 0.9728, 0.34422, 0.97494, 0.34541],
|
|
3462
|
+
[0.97494, 0.34541, 0.97806, 0.34713, 0.97931, 0.351, 0.9778, 0.35425],
|
|
3463
|
+
[0.9778, 0.35425, 0.97676, 0.35647, 0.96822, 0.3605, 0.95115, 0.36856],
|
|
3464
|
+
[0.95115, 0.36856, 0.87878, 0.40276, 0.80641, 0.43696, 0.73403, 0.47116],
|
|
3465
|
+
[0.73403, 0.47116, 0.72714, 0.47441, 0.7237, 0.47603, 0.72263, 0.47781],
|
|
3466
|
+
[0.72263, 0.47781, 0.72109, 0.48041, 0.72144, 0.48372, 0.72348, 0.48594],
|
|
3467
|
+
[0.72348, 0.48594, 0.72489, 0.48747, 0.7286, 0.48834, 0.73601, 0.49006],
|
|
3468
|
+
[0.73601, 0.49006, 0.81387, 0.50839, 0.89173, 0.52671, 0.96959, 0.54503],
|
|
3469
|
+
[0.96959, 0.54503, 0.98796, 0.54934, 0.99715, 0.5515, 0.99862, 0.55347],
|
|
3470
|
+
[0.99862, 0.55347, 1.00077, 0.55631, 1.00035, 0.56037, 0.99766, 0.56272],
|
|
3471
|
+
[0.99766, 0.56272, 0.9958, 0.56431, 0.98638, 0.56453, 0.96751, 0.56491],
|
|
3472
|
+
[0.96751, 0.56491, 0.88757, 0.56654, 0.80762, 0.56818, 0.72767, 0.56981],
|
|
3473
|
+
[0.72767, 0.56981, 0.72006, 0.56997, 0.71626, 0.57006, 0.71456, 0.57125],
|
|
3474
|
+
[0.71456, 0.57125, 0.7121, 0.573, 0.71108, 0.57617, 0.71206, 0.57903],
|
|
3475
|
+
[0.71206, 0.57903, 0.71272, 0.581, 0.71576, 0.58331, 0.72182, 0.58794],
|
|
3476
|
+
[0.72182, 0.58794, 0.78555, 0.6365, 0.84927, 0.68506, 0.91299, 0.73362],
|
|
3477
|
+
[0.91299, 0.73362, 0.92802, 0.74509, 0.93554, 0.75084, 0.93609, 0.75322],
|
|
3478
|
+
[0.93609, 0.75322, 0.93691, 0.7567, 0.93489, 0.76022, 0.93147, 0.76128],
|
|
3479
|
+
[0.93147, 0.76128, 0.92912, 0.762, 0.92043, 0.75831, 0.90304, 0.75097],
|
|
3480
|
+
[0.90304, 0.75097, 0.82934, 0.71977, 0.75565, 0.68857, 0.68195, 0.65737],
|
|
3481
|
+
[0.68195, 0.65737, 0.67493, 0.6544, 0.67142, 0.6529, 0.66939, 0.65331],
|
|
3482
|
+
[0.66939, 0.65331, 0.66644, 0.65391, 0.66423, 0.65637, 0.66396, 0.65937],
|
|
3483
|
+
[0.66396, 0.65937, 0.66378, 0.66144, 0.66561, 0.66481, 0.66928, 0.6715],
|
|
3484
|
+
[0.66928, 0.6715, 0.70784, 0.74193, 0.74641, 0.81237, 0.78497, 0.88281],
|
|
3485
|
+
[0.78497, 0.88281, 0.79407, 0.8994, 0.79862, 0.90771, 0.79815, 0.91015],
|
|
3486
|
+
[0.79815, 0.91015, 0.79748, 0.91366, 0.79421, 0.91604, 0.79067, 0.91562],
|
|
3487
|
+
[0.79067, 0.91562, 0.78824, 0.91531, 0.78179, 0.9084, 0.76888, 0.89456],
|
|
3488
|
+
[0.76888, 0.89456, 0.71418, 0.83591, 0.65947, 0.77727, 0.60477, 0.71862],
|
|
3489
|
+
[0.60477, 0.71862, 0.59956, 0.71306, 0.59695, 0.71025, 0.59494, 0.70981],
|
|
3490
|
+
[0.59494, 0.70981, 0.592, 0.70912, 0.58897, 0.71048, 0.58752, 0.71312],
|
|
3491
|
+
[0.58752, 0.71312, 0.58651, 0.71493, 0.58683, 0.71875, 0.58747, 0.72637],
|
|
3492
|
+
[0.58747, 0.72637, 0.59421, 0.80649, 0.60094, 0.8866, 0.60768, 0.96671],
|
|
3493
|
+
[0.60768, 0.96671, 0.60927, 0.98562, 0.61006, 0.99506, 0.60866, 0.99709],
|
|
3494
|
+
[0.60866, 0.99709, 0.60663, 1.00002, 0.60267, 1.00087, 0.59962, 0.99902],
|
|
3495
|
+
[0.59962, 0.99902, 0.59752, 0.99774, 0.59442, 0.98877, 0.58823, 0.97087],
|
|
3496
|
+
[0.58823, 0.97087, 0.56197, 0.89493, 0.53572, 0.819, 0.50946, 0.74306],
|
|
3497
|
+
[0.50946, 0.74306, 0.50696, 0.73581, 0.50571, 0.73222, 0.50406, 0.73097],
|
|
3498
|
+
[0.50406, 0.73097, 0.50165, 0.72916, 0.49834, 0.72916, 0.49594, 0.73097],
|
|
3499
|
+
[0.49594, 0.73097, 0.49428, 0.73222, 0.49303, 0.73581, 0.49053, 0.74306],
|
|
3500
|
+
[0.49053, 0.74306, 0.46428, 0.819, 0.43803, 0.89493, 0.41177, 0.97087],
|
|
3501
|
+
[0.41177, 0.97087, 0.40558, 0.98877, 0.40248, 0.99774, 0.40038, 0.99902],
|
|
3502
|
+
[0.40038, 0.99902, 0.39733, 1.00087, 0.39338, 1.00002, 0.39134, 0.99709],
|
|
3503
|
+
[0.39134, 0.99709, 0.38994, 0.99506, 0.39073, 0.98562, 0.39232, 0.96671],
|
|
3504
|
+
[0.39232, 0.96671, 0.39906, 0.8866, 0.40579, 0.80649, 0.41253, 0.72637],
|
|
3505
|
+
[0.41253, 0.72637, 0.41317, 0.71875, 0.41349, 0.71493, 0.41248, 0.71312],
|
|
3506
|
+
[0.41248, 0.71312, 0.41104, 0.71048, 0.408, 0.70912, 0.40507, 0.70981],
|
|
3507
|
+
[0.40507, 0.70981, 0.40305, 0.71025, 0.40044, 0.71306, 0.39523, 0.71862],
|
|
3508
|
+
[0.39523, 0.71862, 0.34053, 0.77727, 0.28582, 0.83591, 0.23112, 0.89456],
|
|
3509
|
+
[0.23112, 0.89456, 0.21821, 0.9084, 0.21176, 0.91531, 0.20933, 0.91562],
|
|
3510
|
+
[0.20933, 0.91562, 0.20578, 0.91604, 0.20252, 0.91366, 0.20184, 0.91015],
|
|
3511
|
+
[0.20184, 0.91015, 0.20138, 0.90771, 0.20593, 0.8994, 0.21503, 0.88281],
|
|
3512
|
+
[0.21503, 0.88281, 0.25359, 0.81237, 0.29215, 0.74193, 0.33072, 0.6715],
|
|
3513
|
+
[0.33072, 0.6715, 0.33439, 0.66481, 0.33622, 0.66144, 0.33604, 0.65937],
|
|
3514
|
+
[0.33604, 0.65937, 0.33577, 0.65637, 0.33356, 0.65391, 0.3306, 0.65331],
|
|
3515
|
+
[0.3306, 0.65331, 0.32857, 0.6529, 0.32506, 0.6544, 0.31805, 0.65737],
|
|
3516
|
+
[0.31805, 0.65737, 0.24435, 0.68857, 0.17065, 0.71977, 0.09695, 0.75097],
|
|
3517
|
+
[0.09695, 0.75097, 0.07957, 0.75831, 0.07087, 0.762, 0.06853, 0.76128],
|
|
3518
|
+
[0.06853, 0.76128, 0.06511, 0.76022, 0.06309, 0.7567, 0.06391, 0.75322],
|
|
3519
|
+
[0.06391, 0.75322, 0.06446, 0.75084, 0.07198, 0.74509, 0.08701, 0.73362],
|
|
3520
|
+
[0.08701, 0.73362, 0.15073, 0.68506, 0.21445, 0.6365, 0.27817, 0.58794],
|
|
3521
|
+
[0.27817, 0.58794, 0.28424, 0.58331, 0.28727, 0.581, 0.28794, 0.57903],
|
|
3522
|
+
[0.28794, 0.57903, 0.28892, 0.57617, 0.2879, 0.573, 0.28543, 0.57125],
|
|
3523
|
+
[0.28543, 0.57125, 0.28374, 0.57006, 0.27993, 0.56997, 0.27232, 0.56981],
|
|
3524
|
+
[0.27232, 0.56981, 0.19238, 0.56818, 0.11243, 0.56654, 0.03248, 0.56491],
|
|
3525
|
+
[0.03248, 0.56491, 0.01362, 0.56453, 419e-5, 0.56431, 234e-5, 0.56272],
|
|
3526
|
+
[234e-5, 0.56272, -35e-5, 0.56036, -77e-5, 0.55633, 138e-5, 0.55347],
|
|
3527
|
+
[138e-5, 0.55347, 285e-5, 0.5515, 0.01204, 0.54934, 0.03041, 0.54503],
|
|
3528
|
+
[0.03041, 0.54503, 0.10827, 0.52671, 0.18613, 0.50839, 0.26399, 0.49006],
|
|
3529
|
+
[0.26399, 0.49006, 0.2714, 0.48834, 0.27511, 0.48747, 0.27652, 0.48594],
|
|
3530
|
+
[0.27652, 0.48594, 0.27856, 0.48372, 0.27891, 0.48041, 0.27736, 0.47781],
|
|
3531
|
+
[0.27736, 0.47781, 0.2763, 0.47603, 0.27286, 0.47441, 0.26597, 0.47116],
|
|
3532
|
+
[0.26597, 0.47116, 0.19359, 0.43696, 0.12122, 0.40276, 0.04885, 0.36856],
|
|
3533
|
+
[0.04885, 0.36856, 0.03177, 0.3605, 0.02324, 0.35647, 0.0222, 0.35425],
|
|
3534
|
+
[0.0222, 0.35425, 0.02068, 0.35101, 0.02193, 0.34715, 0.02506, 0.34541],
|
|
3535
|
+
[0.02506, 0.34541, 0.0272, 0.34422, 0.03647, 0.346, 0.055, 0.34957],
|
|
3536
|
+
[0.055, 0.34957, 0.13353, 0.36467, 0.21207, 0.37977, 0.29061, 0.39488],
|
|
3537
|
+
[0.29061, 0.39488, 0.29809, 0.39631, 0.30183, 0.39706, 0.30373, 0.39622],
|
|
3538
|
+
[0.30373, 0.39622, 0.3065, 0.39502, 0.30815, 0.39215, 0.30779, 0.38916],
|
|
3539
|
+
[0.30779, 0.38916, 0.30755, 0.3871, 0.30506, 0.38419, 0.30008, 0.37841],
|
|
3540
|
+
[0.30008, 0.37841, 0.24779, 0.31758, 0.19551, 0.25674, 0.14322, 0.19591],
|
|
3541
|
+
[0.14322, 0.19591, 0.13089, 0.18157, 0.12472, 0.17438, 0.12468, 0.17191],
|
|
3542
|
+
[0.12468, 0.17191, 0.12461, 0.16834, 0.12731, 0.16533, 0.13086, 0.16501],
|
|
3543
|
+
[0.13086, 0.16501, 0.1333, 0.16482, 0.14104, 0.17022, 0.15653, 0.18107],
|
|
3544
|
+
[0.15653, 0.18107, 0.22217, 0.22698, 0.2878, 0.2729, 0.35344, 0.31882],
|
|
3545
|
+
[0.35344, 0.31882, 0.35969, 0.32319, 0.36281, 0.32538, 0.36488, 0.32541],
|
|
3546
|
+
[0.36488, 0.32541, 0.3679, 0.32544, 0.37058, 0.32348, 0.37145, 0.3206],
|
|
3547
|
+
[0.37145, 0.3206, 0.37206, 0.31863, 0.37096, 0.31497, 0.36875, 0.30763],
|
|
3548
|
+
[0.36875, 0.30763, 0.3456, 0.23068, 0.32244, 0.15373, 0.29929, 0.07679],
|
|
3549
|
+
[0.29929, 0.07679, 0.29382, 0.05863, 0.29109, 0.04954, 0.29205, 0.04729],
|
|
3550
|
+
[0.29205, 0.04729, 0.29342, 0.04399, 0.29711, 0.04232, 0.3005, 0.04348],
|
|
3551
|
+
[0.3005, 0.04348, 0.30281, 0.04429, 0.30769, 0.05241, 0.31745, 0.06863],
|
|
3552
|
+
[0.31745, 0.06863, 0.35884, 0.13742, 0.40022, 0.20621, 0.44161, 0.275],
|
|
3553
|
+
[0.44161, 0.275, 0.44555, 0.28157, 0.44752, 0.28485, 0.4494, 0.28572],
|
|
3554
|
+
[0.4494, 0.28572, 0.45212, 0.287, 0.45536, 0.28628, 0.45734, 0.28403],
|
|
3555
|
+
[0.45734, 0.28403, 0.4587, 0.28244, 0.45917, 0.27866, 0.46012, 0.27107],
|
|
3556
|
+
[0.46012, 0.27107, 0.4701, 0.1913, 0.48008, 0.11153, 0.49006, 0.03176]
|
|
3557
|
+
]);
|
|
3558
|
+
var bunShape = createShape([
|
|
3559
|
+
[0.01546, 0.25425, 0.01545, 0.18682, 0.04224, 0.12214, 0.08992, 0.07446],
|
|
3560
|
+
[0.08992, 0.07446, 0.1376, 0.02678, 0.20228, -1e-5, 0.26971, 0],
|
|
3561
|
+
[0.26971, 0, 0.42313, 0, 0.57654, 0, 0.72996, 0],
|
|
3562
|
+
[0.72996, 0, 0.85665, -17e-5, 0.96413, 0.09297, 0.98198, 0.2184],
|
|
3563
|
+
[0.98198, 0.2184, 0.99983, 0.34383, 0.92261, 0.46325, 0.8009, 0.49844],
|
|
3564
|
+
[0.8009, 0.49844, 0.8002, 0.49863, 0.79972, 0.49927, 0.79974, 0.5],
|
|
3565
|
+
[0.79974, 0.5, 0.79974, 0.50072, 0.80021, 0.50134, 0.8009, 0.50156],
|
|
3566
|
+
[0.8009, 0.50156, 0.92232, 0.537, 0.99924, 0.65629, 0.98142, 0.78152],
|
|
3567
|
+
[0.98142, 0.78152, 0.96359, 0.90675, 0.85645, 0.99984, 0.72996, 1],
|
|
3568
|
+
[0.72996, 1, 0.57654, 1, 0.42313, 1, 0.26971, 1],
|
|
3569
|
+
[0.26971, 1, 0.20228, 1.00001, 0.1376, 0.97322, 0.08992, 0.92554],
|
|
3570
|
+
[0.08992, 0.92554, 0.04224, 0.87786, 0.01545, 0.81318, 0.01546, 0.74575],
|
|
3571
|
+
[0.01546, 0.74575, 0.01548, 0.63344, 0.08915, 0.53444, 0.19671, 0.50216],
|
|
3572
|
+
[0.19671, 0.50216, 0.19766, 0.50187, 0.19832, 0.501, 0.19832, 0.5],
|
|
3573
|
+
[0.19832, 0.5, 0.19832, 0.49901, 0.19766, 0.49813, 0.19671, 0.49784],
|
|
3574
|
+
[0.19671, 0.49784, 0.08915, 0.46556, 0.01548, 0.36656, 0.01546, 0.25425]
|
|
3575
|
+
]);
|
|
3576
|
+
var burstShape = createShape([
|
|
3577
|
+
[0.49184, 797e-5, 0.49416, 384e-5, 0.49528, 181e-5, 0.49669, 94e-5],
|
|
3578
|
+
[0.49669, 94e-5, 0.49872, -31e-5, 0.50128, -31e-5, 0.50331, 94e-5],
|
|
3579
|
+
[0.50331, 94e-5, 0.50472, 181e-5, 0.50584, 384e-5, 0.50816, 797e-5],
|
|
3580
|
+
[0.50816, 797e-5, 0.53447, 0.055, 0.56078, 0.10203, 0.58709, 0.14906],
|
|
3581
|
+
[0.58709, 0.14906, 0.5885, 0.15159, 0.58922, 0.15287, 0.59019, 0.15362],
|
|
3582
|
+
[0.59019, 0.15362, 0.59156, 0.15475, 0.59334, 0.15522, 0.59509, 0.15494],
|
|
3583
|
+
[0.59509, 0.15494, 0.59631, 0.15475, 0.59756, 0.15403, 0.60003, 0.15253],
|
|
3584
|
+
[0.60003, 0.15253, 0.64634, 0.12496, 0.69266, 0.09739, 0.73897, 0.06981],
|
|
3585
|
+
[0.73897, 0.06981, 0.743, 0.06741, 0.74503, 0.06619, 0.74666, 0.06616],
|
|
3586
|
+
[0.74666, 0.06616, 0.74906, 0.06606, 0.75125, 0.06734, 0.75241, 0.06944],
|
|
3587
|
+
[0.75241, 0.06944, 0.75319, 0.07091, 0.75316, 0.07325, 0.75309, 0.07797],
|
|
3588
|
+
[0.75309, 0.07797, 0.75236, 0.13185, 0.75164, 0.18574, 0.75091, 0.23962],
|
|
3589
|
+
[0.75091, 0.23962, 0.75084, 0.24253, 0.75084, 0.24397, 0.75128, 0.24512],
|
|
3590
|
+
[0.75128, 0.24512, 0.75191, 0.24678, 0.75322, 0.24809, 0.75488, 0.24872],
|
|
3591
|
+
[0.75488, 0.24872, 0.75603, 0.24916, 0.75747, 0.24916, 0.76038, 0.24909],
|
|
3592
|
+
[0.76038, 0.24909, 0.81426, 0.24836, 0.86815, 0.24764, 0.92203, 0.24691],
|
|
3593
|
+
[0.92203, 0.24691, 0.92675, 0.24684, 0.92909, 0.24681, 0.93056, 0.24759],
|
|
3594
|
+
[0.93056, 0.24759, 0.93266, 0.24875, 0.93394, 0.25094, 0.93384, 0.25334],
|
|
3595
|
+
[0.93384, 0.25334, 0.93381, 0.25497, 0.93259, 0.257, 0.93019, 0.26103],
|
|
3596
|
+
[0.93019, 0.26103, 0.90261, 0.30734, 0.87504, 0.35366, 0.84747, 0.39997],
|
|
3597
|
+
[0.84747, 0.39997, 0.84597, 0.40244, 0.84525, 0.40369, 0.84506, 0.40491],
|
|
3598
|
+
[0.84506, 0.40491, 0.84478, 0.40666, 0.84525, 0.40844, 0.84638, 0.40981],
|
|
3599
|
+
[0.84638, 0.40981, 0.84713, 0.41078, 0.84841, 0.4115, 0.85094, 0.41291],
|
|
3600
|
+
[0.85094, 0.41291, 0.89797, 0.43922, 0.945, 0.46553, 0.99203, 0.49184],
|
|
3601
|
+
[0.99203, 0.49184, 0.99616, 0.49416, 0.99819, 0.49528, 0.99906, 0.49669],
|
|
3602
|
+
[0.99906, 0.49669, 1.00031, 0.49872, 1.00031, 0.50128, 0.99906, 0.50331],
|
|
3603
|
+
[0.99906, 0.50331, 0.99819, 0.50472, 0.99616, 0.50584, 0.99203, 0.50816],
|
|
3604
|
+
[0.99203, 0.50816, 0.945, 0.53447, 0.89797, 0.56078, 0.85094, 0.58709],
|
|
3605
|
+
[0.85094, 0.58709, 0.84841, 0.5885, 0.84713, 0.58922, 0.84638, 0.59019],
|
|
3606
|
+
[0.84638, 0.59019, 0.84525, 0.59156, 0.84478, 0.59334, 0.84506, 0.59509],
|
|
3607
|
+
[0.84506, 0.59509, 0.84525, 0.59631, 0.84597, 0.59756, 0.84747, 0.60003],
|
|
3608
|
+
[0.84747, 0.60003, 0.87504, 0.64634, 0.90261, 0.69266, 0.93019, 0.73897],
|
|
3609
|
+
[0.93019, 0.73897, 0.93259, 0.743, 0.93381, 0.74503, 0.93384, 0.74666],
|
|
3610
|
+
[0.93384, 0.74666, 0.93394, 0.74906, 0.93266, 0.75125, 0.93056, 0.75241],
|
|
3611
|
+
[0.93056, 0.75241, 0.92909, 0.75319, 0.92675, 0.75316, 0.92203, 0.75309],
|
|
3612
|
+
[0.92203, 0.75309, 0.86815, 0.75236, 0.81426, 0.75164, 0.76038, 0.75091],
|
|
3613
|
+
[0.76038, 0.75091, 0.75747, 0.75084, 0.75603, 0.75084, 0.75488, 0.75128],
|
|
3614
|
+
[0.75488, 0.75128, 0.75322, 0.75191, 0.75191, 0.75322, 0.75128, 0.75488],
|
|
3615
|
+
[0.75128, 0.75488, 0.75084, 0.75603, 0.75084, 0.75747, 0.75091, 0.76038],
|
|
3616
|
+
[0.75091, 0.76038, 0.75164, 0.81426, 0.75236, 0.86815, 0.75309, 0.92203],
|
|
3617
|
+
[0.75309, 0.92203, 0.75316, 0.92675, 0.75319, 0.92909, 0.75241, 0.93056],
|
|
3618
|
+
[0.75241, 0.93056, 0.75125, 0.93266, 0.74906, 0.93394, 0.74666, 0.93384],
|
|
3619
|
+
[0.74666, 0.93384, 0.74503, 0.93381, 0.743, 0.93259, 0.73897, 0.93019],
|
|
3620
|
+
[0.73897, 0.93019, 0.69266, 0.90261, 0.64634, 0.87504, 0.60003, 0.84747],
|
|
3621
|
+
[0.60003, 0.84747, 0.59756, 0.84597, 0.59631, 0.84525, 0.59509, 0.84506],
|
|
3622
|
+
[0.59509, 0.84506, 0.59334, 0.84478, 0.59156, 0.84525, 0.59019, 0.84638],
|
|
3623
|
+
[0.59019, 0.84638, 0.58922, 0.84713, 0.5885, 0.84841, 0.58709, 0.85094],
|
|
3624
|
+
[0.58709, 0.85094, 0.56078, 0.89797, 0.53447, 0.945, 0.50816, 0.99203],
|
|
3625
|
+
[0.50816, 0.99203, 0.50584, 0.99616, 0.50472, 0.99819, 0.50331, 0.99906],
|
|
3626
|
+
[0.50331, 0.99906, 0.50128, 1.00031, 0.49872, 1.00031, 0.49669, 0.99906],
|
|
3627
|
+
[0.49669, 0.99906, 0.49528, 0.99819, 0.49416, 0.99616, 0.49184, 0.99203],
|
|
3628
|
+
[0.49184, 0.99203, 0.46553, 0.945, 0.43922, 0.89797, 0.41291, 0.85094],
|
|
3629
|
+
[0.41291, 0.85094, 0.4115, 0.84841, 0.41078, 0.84713, 0.40981, 0.84638],
|
|
3630
|
+
[0.40981, 0.84638, 0.40844, 0.84525, 0.40666, 0.84478, 0.40491, 0.84506],
|
|
3631
|
+
[0.40491, 0.84506, 0.40369, 0.84525, 0.40244, 0.84597, 0.39997, 0.84747],
|
|
3632
|
+
[0.39997, 0.84747, 0.35366, 0.87504, 0.30734, 0.90261, 0.26103, 0.93019],
|
|
3633
|
+
[0.26103, 0.93019, 0.257, 0.93259, 0.25497, 0.93381, 0.25334, 0.93384],
|
|
3634
|
+
[0.25334, 0.93384, 0.25094, 0.93394, 0.24875, 0.93266, 0.24759, 0.93056],
|
|
3635
|
+
[0.24759, 0.93056, 0.24681, 0.92909, 0.24684, 0.92675, 0.24691, 0.92203],
|
|
3636
|
+
[0.24691, 0.92203, 0.24764, 0.86815, 0.24836, 0.81426, 0.24909, 0.76038],
|
|
3637
|
+
[0.24909, 0.76038, 0.24916, 0.75747, 0.24916, 0.75603, 0.24872, 0.75488],
|
|
3638
|
+
[0.24872, 0.75488, 0.24809, 0.75322, 0.24678, 0.75191, 0.24513, 0.75128],
|
|
3639
|
+
[0.24513, 0.75128, 0.24397, 0.75084, 0.24253, 0.75084, 0.23963, 0.75091],
|
|
3640
|
+
[0.23963, 0.75091, 0.18574, 0.75164, 0.13185, 0.75236, 0.07797, 0.75309],
|
|
3641
|
+
[0.07797, 0.75309, 0.07325, 0.75316, 0.07091, 0.75319, 0.06944, 0.75241],
|
|
3642
|
+
[0.06944, 0.75241, 0.06734, 0.75127, 0.06607, 0.74904, 0.06616, 0.74666],
|
|
3643
|
+
[0.06616, 0.74666, 0.06619, 0.74503, 0.06741, 0.743, 0.06981, 0.73897],
|
|
3644
|
+
[0.06981, 0.73897, 0.09739, 0.69266, 0.12496, 0.64634, 0.15253, 0.60003],
|
|
3645
|
+
[0.15253, 0.60003, 0.15403, 0.59756, 0.15475, 0.59631, 0.15494, 0.59509],
|
|
3646
|
+
[0.15494, 0.59509, 0.15522, 0.59334, 0.15475, 0.59156, 0.15363, 0.59019],
|
|
3647
|
+
[0.15363, 0.59019, 0.15288, 0.58922, 0.15159, 0.5885, 0.14906, 0.58709],
|
|
3648
|
+
[0.14906, 0.58709, 0.10203, 0.56078, 0.055, 0.53447, 797e-5, 0.50816],
|
|
3649
|
+
[797e-5, 0.50816, 384e-5, 0.50584, 181e-5, 0.50472, 94e-5, 0.50331],
|
|
3650
|
+
[94e-5, 0.50331, -31e-5, 0.50128, -31e-5, 0.49872, 94e-5, 0.49669],
|
|
3651
|
+
[94e-5, 0.49669, 181e-5, 0.49528, 384e-5, 0.49416, 797e-5, 0.49184],
|
|
3652
|
+
[797e-5, 0.49184, 0.055, 0.46553, 0.10203, 0.43922, 0.14906, 0.41291],
|
|
3653
|
+
[0.14906, 0.41291, 0.15159, 0.4115, 0.15287, 0.41078, 0.15362, 0.40981],
|
|
3654
|
+
[0.15362, 0.40981, 0.15475, 0.40844, 0.15522, 0.40666, 0.15494, 0.40491],
|
|
3655
|
+
[0.15494, 0.40491, 0.15475, 0.40369, 0.15403, 0.40244, 0.15253, 0.39997],
|
|
3656
|
+
[0.15253, 0.39997, 0.12496, 0.35366, 0.09739, 0.30734, 0.06981, 0.26103],
|
|
3657
|
+
[0.06981, 0.26103, 0.06741, 0.257, 0.06619, 0.25497, 0.06616, 0.25334],
|
|
3658
|
+
[0.06616, 0.25334, 0.06606, 0.25094, 0.06734, 0.24875, 0.06944, 0.24759],
|
|
3659
|
+
[0.06944, 0.24759, 0.07091, 0.24681, 0.07325, 0.24684, 0.07797, 0.24691],
|
|
3660
|
+
[0.07797, 0.24691, 0.13185, 0.24764, 0.18574, 0.24836, 0.23963, 0.24909],
|
|
3661
|
+
[0.23963, 0.24909, 0.24253, 0.24916, 0.24397, 0.24916, 0.24513, 0.24872],
|
|
3662
|
+
[0.24513, 0.24872, 0.24678, 0.24809, 0.24809, 0.24678, 0.24872, 0.24512],
|
|
3663
|
+
[0.24872, 0.24512, 0.24916, 0.24397, 0.24916, 0.24253, 0.24909, 0.23962],
|
|
3664
|
+
[0.24909, 0.23962, 0.24836, 0.18574, 0.24764, 0.13185, 0.24691, 0.07797],
|
|
3665
|
+
[0.24691, 0.07797, 0.24684, 0.07325, 0.24681, 0.07091, 0.24759, 0.06944],
|
|
3666
|
+
[0.24759, 0.06944, 0.24875, 0.06734, 0.25094, 0.06606, 0.25334, 0.06616],
|
|
3667
|
+
[0.25334, 0.06616, 0.25497, 0.06619, 0.257, 0.06741, 0.26103, 0.06981],
|
|
3668
|
+
[0.26103, 0.06981, 0.30734, 0.09739, 0.35366, 0.12496, 0.39997, 0.15253],
|
|
3669
|
+
[0.39997, 0.15253, 0.40244, 0.15403, 0.40369, 0.15475, 0.40491, 0.15494],
|
|
3670
|
+
[0.40491, 0.15494, 0.40666, 0.15522, 0.40844, 0.15475, 0.40981, 0.15362],
|
|
3671
|
+
[0.40981, 0.15362, 0.41078, 0.15287, 0.4115, 0.15159, 0.41291, 0.14906],
|
|
3672
|
+
[0.41291, 0.14906, 0.43922, 0.10203, 0.46553, 0.055, 0.49184, 797e-5]
|
|
3673
|
+
]);
|
|
3674
|
+
var circleShape = createShape([
|
|
3675
|
+
[1, 0.5, 1, 0.77614, 0.77614, 1, 0.5, 1],
|
|
3676
|
+
[0.5, 1, 0.22386, 1, 0, 0.77614, 0, 0.5],
|
|
3677
|
+
[0, 0.5, 0, 0.22386, 0.22386, 0, 0.5, 0],
|
|
3678
|
+
[0.5, 0, 0.77614, 0, 1, 0.22386, 1, 0.5]
|
|
3679
|
+
]);
|
|
3680
|
+
var clamshellShape = createShape([
|
|
3681
|
+
[0.95752, 0.36588, 0.97848, 0.4081, 0.98896, 0.42921, 0.99426, 0.45126],
|
|
3682
|
+
[0.99426, 0.45126, 1.00191, 0.4833, 1.00191, 0.5167, 0.99426, 0.54874],
|
|
3683
|
+
[0.99426, 0.54874, 0.98896, 0.57079, 0.97848, 0.5919, 0.95752, 0.63412],
|
|
3684
|
+
[0.95752, 0.63412, 0.93623, 0.677, 0.91494, 0.71987, 0.89365, 0.76275],
|
|
3685
|
+
[0.89365, 0.76275, 0.87268, 0.80497, 0.8622, 0.82608, 0.84842, 0.84244],
|
|
3686
|
+
[0.84842, 0.84244, 0.8285, 0.86609, 0.80339, 0.88295, 0.77581, 0.89118],
|
|
3687
|
+
[0.77581, 0.89118, 0.75673, 0.89688, 0.73577, 0.89688, 0.69384, 0.89688],
|
|
3688
|
+
[0.69384, 0.89688, 0.56461, 0.89688, 0.43539, 0.89688, 0.30616, 0.89688],
|
|
3689
|
+
[0.30616, 0.89688, 0.26423, 0.89688, 0.24327, 0.89688, 0.22419, 0.89118],
|
|
3690
|
+
[0.22419, 0.89118, 0.19661, 0.88295, 0.1715, 0.86609, 0.15158, 0.84244],
|
|
3691
|
+
[0.15158, 0.84244, 0.1378, 0.82608, 0.12732, 0.80497, 0.10635, 0.76275],
|
|
3692
|
+
[0.10635, 0.76275, 0.08506, 0.71987, 0.06377, 0.677, 0.04248, 0.63412],
|
|
3693
|
+
[0.04248, 0.63412, 0.02152, 0.5919, 0.01104, 0.57079, 574e-5, 0.54874],
|
|
3694
|
+
[574e-5, 0.54874, -191e-5, 0.5167, -191e-5, 0.4833, 574e-5, 0.45126],
|
|
3695
|
+
[574e-5, 0.45126, 0.01104, 0.42921, 0.02152, 0.4081, 0.04248, 0.36588],
|
|
3696
|
+
[0.04248, 0.36588, 0.06377, 0.323, 0.08506, 0.28013, 0.10635, 0.23725],
|
|
3697
|
+
[0.10635, 0.23725, 0.12732, 0.19503, 0.1378, 0.17392, 0.15158, 0.15756],
|
|
3698
|
+
[0.15158, 0.15756, 0.1715, 0.13391, 0.19661, 0.11705, 0.22419, 0.10882],
|
|
3699
|
+
[0.22419, 0.10882, 0.24327, 0.10312, 0.26423, 0.10312, 0.30616, 0.10312],
|
|
3700
|
+
[0.30616, 0.10312, 0.43539, 0.10312, 0.56461, 0.10312, 0.69384, 0.10312],
|
|
3701
|
+
[0.69384, 0.10312, 0.73577, 0.10312, 0.75673, 0.10312, 0.77581, 0.10882],
|
|
3702
|
+
[0.77581, 0.10882, 0.80339, 0.11705, 0.8285, 0.13391, 0.84842, 0.15756],
|
|
3703
|
+
[0.84842, 0.15756, 0.8622, 0.17392, 0.87268, 0.19503, 0.89365, 0.23725],
|
|
3704
|
+
[0.89365, 0.23725, 0.91494, 0.28013, 0.93623, 0.323, 0.95752, 0.36588]
|
|
3705
|
+
]);
|
|
3706
|
+
var diamondShape = createShape([
|
|
3707
|
+
[0.67951, 0.864, 0.62689, 0.93286, 0.60059, 0.96728, 0.57021, 0.98296],
|
|
3708
|
+
[0.57021, 0.98296, 0.52616, 1.00568, 0.47384, 1.00568, 0.42979, 0.98296],
|
|
3709
|
+
[0.42979, 0.98296, 0.39941, 0.96728, 0.37311, 0.93286, 0.32049, 0.864],
|
|
3710
|
+
[0.32049, 0.864, 0.26225, 0.78778, 0.20401, 0.71156, 0.14577, 0.63534],
|
|
3711
|
+
[0.14577, 0.63534, 0.11377, 0.59346, 0.09777, 0.57252, 0.08984, 0.5501],
|
|
3712
|
+
[0.08984, 0.5501, 0.07838, 0.51768, 0.07838, 0.48232, 0.08984, 0.4499],
|
|
3713
|
+
[0.08984, 0.4499, 0.09777, 0.42748, 0.11377, 0.40654, 0.14577, 0.36466],
|
|
3714
|
+
[0.14577, 0.36466, 0.20401, 0.28844, 0.26225, 0.21222, 0.32049, 0.136],
|
|
3715
|
+
[0.32049, 0.136, 0.37311, 0.06714, 0.39941, 0.03271, 0.42979, 0.01704],
|
|
3716
|
+
[0.42979, 0.01704, 0.47384, -568e-5, 0.52616, -568e-5, 0.57021, 0.01704],
|
|
3717
|
+
[0.57021, 0.01704, 0.60059, 0.03272, 0.62689, 0.06714, 0.67951, 0.136],
|
|
3718
|
+
[0.67951, 0.136, 0.73775, 0.21222, 0.79599, 0.28844, 0.85423, 0.36466],
|
|
3719
|
+
[0.85423, 0.36466, 0.88623, 0.40654, 0.90223, 0.42748, 0.91016, 0.4499],
|
|
3720
|
+
[0.91016, 0.4499, 0.92162, 0.48232, 0.92162, 0.51768, 0.91016, 0.5501],
|
|
3721
|
+
[0.91016, 0.5501, 0.90223, 0.57252, 0.88623, 0.59346, 0.85423, 0.63534],
|
|
3722
|
+
[0.85423, 0.63534, 0.79599, 0.71156, 0.73775, 0.78778, 0.67951, 0.864]
|
|
3723
|
+
]);
|
|
3724
|
+
var fanShape = createShape([
|
|
3725
|
+
[0, 0.15789, 0, 0.15232, 0, 0.14954, 7e-5, 0.14718],
|
|
3726
|
+
[7e-5, 0.14718, 256e-5, 0.06699, 0.06699, 256e-5, 0.14718, 8e-5],
|
|
3727
|
+
[0.14718, 8e-5, 0.14954, 0, 0.15232, 0, 0.1579, 0],
|
|
3728
|
+
[0.1579, 0, 0.18761, 0, 0.20246, 0, 0.21503, 39e-5],
|
|
3729
|
+
[0.21503, 39e-5, 0.64271, 0.01366, 0.98632, 0.35728, 0.99961, 0.78497],
|
|
3730
|
+
[0.99961, 0.78497, 1, 0.79753, 1, 0.81239, 1, 0.8421],
|
|
3731
|
+
[1, 0.8421, 1, 0.84767, 1, 0.85046, 0.99993, 0.85282],
|
|
3732
|
+
[0.99993, 0.85282, 0.99743, 0.93301, 0.933, 0.99744, 0.85282, 0.99993],
|
|
3733
|
+
[0.85282, 0.99993, 0.85046, 1, 0.84768, 1, 0.84211, 1],
|
|
3734
|
+
[0.84211, 1, 0.63634, 1, 0.43057, 1, 0.2248, 1],
|
|
3735
|
+
[0.2248, 1, 0.15688, 1, 0.12292, 1, 0.09598, 0.98933],
|
|
3736
|
+
[0.09598, 0.98933, 0.05698, 0.97389, 0.02611, 0.94301, 0.01067, 0.90402],
|
|
3737
|
+
[0.01067, 0.90402, 0, 0.87708, 0, 0.84312, 0, 0.7752],
|
|
3738
|
+
[0, 0.7752, 0, 0.56943, 0, 0.36366, 0, 0.15789]
|
|
3739
|
+
]);
|
|
3740
|
+
var flowerShape = createShape([
|
|
3741
|
+
[0.85353, 0.14645, 0.81641, 0.10934, 0.73184, 0.12769, 0.62984, 0.1865],
|
|
3742
|
+
[0.62984, 0.1865, 0.59928, 0.07277, 0.55247, 0, 0.5, 0],
|
|
3743
|
+
[0.5, 0, 0.4475, 0, 0.40069, 0.07276, 0.37016, 0.18649],
|
|
3744
|
+
[0.37016, 0.18649, 0.26813, 0.12768, 0.18359, 0.10934, 0.14647, 0.14644],
|
|
3745
|
+
[0.14647, 0.14644, 0.10938, 0.18355, 0.12772, 0.26811, 0.18653, 0.37014],
|
|
3746
|
+
[0.18653, 0.37014, 0.07278, 0.40069, 0, 0.44751, 0, 0.5],
|
|
3747
|
+
[0, 0.5, 0, 0.55248, 0.07275, 0.59929, 0.1865, 0.62984],
|
|
3748
|
+
[0.1865, 0.62984, 0.12766, 0.73188, 0.10931, 0.81644, 0.14641, 0.85355],
|
|
3749
|
+
[0.14641, 0.85355, 0.18353, 0.89067, 0.26809, 0.87231, 0.37012, 0.81347],
|
|
3750
|
+
[0.37012, 0.81347, 0.40069, 0.92722, 0.4475, 1, 0.5, 1],
|
|
3751
|
+
[0.5, 1, 0.55247, 1, 0.59928, 0.92722, 0.62984, 0.81346],
|
|
3752
|
+
[0.62984, 0.81346, 0.73191, 0.8723, 0.81647, 0.89066, 0.85359, 0.85355],
|
|
3753
|
+
[0.85359, 0.85355, 0.89069, 0.81644, 0.87234, 0.73188, 0.8135, 0.62984],
|
|
3754
|
+
[0.8135, 0.62984, 0.92725, 0.59929, 1, 0.55248, 1, 0.5],
|
|
3755
|
+
[1, 0.5, 1, 0.44751, 0.92722, 0.40069, 0.81344, 0.37014],
|
|
3756
|
+
[0.81344, 0.37014, 0.87228, 0.26811, 0.89063, 0.18356, 0.85353, 0.14645]
|
|
3757
|
+
]);
|
|
3758
|
+
var gemShape = createShape([
|
|
3759
|
+
[0.31244, 0.08536, 0.37064, 0.04306, 0.39978, 0.02191, 0.4308, 0.0114],
|
|
3760
|
+
[0.4308, 0.0114, 0.47568, -38e-4, 0.52432, -38e-4, 0.5692, 0.0114],
|
|
3761
|
+
[0.5692, 0.0114, 0.60022, 0.02191, 0.62936, 0.04306, 0.68756, 0.08536],
|
|
3762
|
+
[0.68756, 0.08536, 0.73121, 0.11706, 0.77485, 0.14876, 0.81849, 0.18046],
|
|
3763
|
+
[0.81849, 0.18046, 0.85308, 0.20558, 0.87038, 0.21814, 0.88446, 0.23321],
|
|
3764
|
+
[0.88446, 0.23321, 0.90483, 0.25499, 0.92046, 0.28077, 0.93035, 0.30891],
|
|
3765
|
+
[0.93035, 0.30891, 0.93721, 0.32838, 0.94032, 0.34951, 0.9466, 0.39178],
|
|
3766
|
+
[0.9466, 0.39178, 0.95468, 0.44627, 0.96276, 0.50076, 0.97083, 0.55524],
|
|
3767
|
+
[0.97083, 0.55524, 0.98183, 0.6294, 0.98734, 0.66648, 0.9818, 0.69989],
|
|
3768
|
+
[0.9818, 0.69989, 0.97375, 0.74823, 0.9495, 0.79239, 0.91301, 0.8251],
|
|
3769
|
+
[0.91301, 0.8251, 0.88779, 0.84771, 0.85353, 0.86296, 0.78503, 0.89347],
|
|
3770
|
+
[0.78503, 0.89347, 0.73331, 0.91651, 0.68159, 0.93954, 0.62987, 0.96258],
|
|
3771
|
+
[0.62987, 0.96258, 0.58853, 0.98099, 0.56785, 0.99019, 0.54663, 0.9949],
|
|
3772
|
+
[0.54663, 0.9949, 0.51592, 1.0017, 0.48408, 1.0017, 0.45337, 0.9949],
|
|
3773
|
+
[0.45337, 0.9949, 0.43215, 0.99019, 0.41147, 0.98099, 0.37013, 0.96258],
|
|
3774
|
+
[0.37013, 0.96258, 0.31841, 0.93954, 0.26669, 0.91651, 0.21497, 0.89347],
|
|
3775
|
+
[0.21497, 0.89347, 0.14647, 0.86296, 0.11221, 0.84771, 0.08699, 0.8251],
|
|
3776
|
+
[0.08699, 0.8251, 0.0505, 0.79239, 0.02625, 0.74823, 0.0182, 0.69989],
|
|
3777
|
+
[0.0182, 0.69989, 0.01266, 0.66648, 0.01817, 0.6294, 0.02917, 0.55524],
|
|
3778
|
+
[0.02917, 0.55524, 0.03724, 0.50076, 0.04532, 0.44627, 0.0534, 0.39178],
|
|
3779
|
+
[0.0534, 0.39178, 0.05968, 0.34951, 0.06279, 0.32838, 0.06965, 0.30891],
|
|
3780
|
+
[0.06965, 0.30891, 0.07954, 0.28077, 0.09517, 0.25499, 0.11554, 0.23321],
|
|
3781
|
+
[0.11554, 0.23321, 0.12962, 0.21814, 0.14692, 0.20558, 0.18151, 0.18046],
|
|
3782
|
+
[0.18151, 0.18046, 0.22515, 0.14876, 0.26879, 0.11706, 0.31244, 0.08536]
|
|
3783
|
+
]);
|
|
3784
|
+
var ghostishShape = createShape([
|
|
3785
|
+
[0, 0.47619, 0, 0.2132, 0.22386, 0, 0.5, 0],
|
|
3786
|
+
[0.5, 0, 0.77614, 0, 1, 0.2132, 1, 0.47619],
|
|
3787
|
+
[1, 0.47619, 1, 0.5873, 1, 0.69841, 1, 0.80952],
|
|
3788
|
+
[1, 0.80952, 1, 0.91472, 0.91046, 1, 0.8, 1],
|
|
3789
|
+
[0.8, 1, 0.76726, 1, 0.73636, 0.99251, 0.70908, 0.97923],
|
|
3790
|
+
[0.70908, 0.97923, 0.69518, 0.97246, 0.68131, 0.96504, 0.66738, 0.95759],
|
|
3791
|
+
[0.66738, 0.95759, 0.61838, 0.93137, 0.56864, 0.90476, 0.51423, 0.90476],
|
|
3792
|
+
[0.51423, 0.90476, 0.50474, 0.90476, 0.49526, 0.90476, 0.48577, 0.90476],
|
|
3793
|
+
[0.48577, 0.90476, 0.43136, 0.90476, 0.38163, 0.93137, 0.33262, 0.95759],
|
|
3794
|
+
[0.33262, 0.95759, 0.31869, 0.96504, 0.30482, 0.97246, 0.29092, 0.97923],
|
|
3795
|
+
[0.29092, 0.97923, 0.26364, 0.99251, 0.23274, 1, 0.2, 1],
|
|
3796
|
+
[0.2, 1, 0.08954, 1, 0, 0.91472, 0, 0.80952],
|
|
3797
|
+
[0, 0.80952, 0, 0.69841, 0, 0.5873, 0, 0.47619]
|
|
3798
|
+
]);
|
|
3799
|
+
var heartShape = createShape([
|
|
3800
|
+
[0.78469, 0.05353, 0.717, 0.05353, 0.6566, 0.08531, 0.61713, 0.135],
|
|
3801
|
+
[0.61713, 0.135, 0.57809, 0.17803, 0.53904, 0.22106, 0.5, 0.26409],
|
|
3802
|
+
[0.5, 0.26409, 0.5, 0.26396, 0.5, 0.26382, 0.5, 0.26369],
|
|
3803
|
+
[0.5, 0.26369, 0.46096, 0.22065, 0.42191, 0.1776, 0.38287, 0.13456],
|
|
3804
|
+
[0.38287, 0.13456, 0.3434, 0.08491, 0.283, 0.05312, 0.21531, 0.05312],
|
|
3805
|
+
[0.21531, 0.05312, 0.0964, 0.05312, 0, 0.15116, 0, 0.27206],
|
|
3806
|
+
[0, 0.27206, 0, 0.37831, 0.08867, 0.45772, 0.15287, 0.534],
|
|
3807
|
+
[0.15287, 0.534, 0.21684, 0.61003, 0.2808, 0.686, 0.34476, 0.762],
|
|
3808
|
+
[0.34476, 0.762, 0.39262, 0.81887, 0.44049, 0.87575, 0.48835, 0.93263],
|
|
3809
|
+
[0.48835, 0.93263, 0.49224, 0.93722, 0.49611, 0.94184, 0.5, 0.94647],
|
|
3810
|
+
[0.5, 0.94647, 0.5, 0.9466, 0.5, 0.94674, 0.5, 0.94688],
|
|
3811
|
+
[0.5, 0.94688, 0.50389, 0.94225, 0.50776, 0.93766, 0.51165, 0.93303],
|
|
3812
|
+
[0.51165, 0.93303, 0.55951, 0.87616, 0.60737, 0.81931, 0.65524, 0.76244],
|
|
3813
|
+
[0.65524, 0.76244, 0.7192, 0.68644, 0.78317, 0.61044, 0.84713, 0.53444],
|
|
3814
|
+
[0.84713, 0.53444, 0.91133, 0.45816, 1, 0.37875, 1, 0.27247],
|
|
3815
|
+
[1, 0.27247, 1, 0.15156, 0.9036, 0.05353, 0.78469, 0.05353]
|
|
3816
|
+
]);
|
|
3817
|
+
var clover4LeafShape = createShape([
|
|
3818
|
+
[0.07095, 0.5, 0.02669, 0.44709, 0, 0.37882, 0, 0.30426],
|
|
3819
|
+
[0, 0.30426, 0, 0.13622, 0.13551, 0, 0.3027, 0],
|
|
3820
|
+
[0.3027, 0, 0.37834, 0, 0.44753, 0.02791, 0.50057, 0.07402],
|
|
3821
|
+
[0.50057, 0.07402, 0.55351, 0.02791, 0.62253, 0, 0.69801, 0],
|
|
3822
|
+
[0.69801, 0, 0.8648, 0, 1, 0.13622, 1, 0.30426],
|
|
3823
|
+
[1, 0.30426, 1, 0.37882, 0.97338, 0.44709, 0.92922, 0.5],
|
|
3824
|
+
[0.92922, 0.5, 0.97338, 0.55291, 1, 0.62118, 1, 0.69574],
|
|
3825
|
+
[1, 0.69574, 1, 0.86378, 0.8648, 1, 0.69801, 1],
|
|
3826
|
+
[0.69801, 1, 0.62253, 1, 0.55351, 0.97209, 0.50057, 0.92598],
|
|
3827
|
+
[0.50057, 0.92598, 0.44753, 0.97209, 0.37834, 1, 0.3027, 1],
|
|
3828
|
+
[0.3027, 1, 0.13551, 1, 0, 0.86378, 0, 0.69574],
|
|
3829
|
+
[0, 0.69574, 0, 0.62118, 0.02669, 0.55291, 0.07095, 0.5]
|
|
3830
|
+
]);
|
|
3831
|
+
var clover8LeafShape = createShape([
|
|
3832
|
+
[0.96431, 0.5, 1.0451, 0.6505, 0.98406, 0.78678, 0.82834, 0.82831],
|
|
3833
|
+
[0.82834, 0.82831, 0.78678, 0.98406, 0.6505, 1.04506, 0.5, 0.96431],
|
|
3834
|
+
[0.5, 0.96431, 0.34947, 1.0451, 0.21319, 0.98406, 0.17166, 0.82834],
|
|
3835
|
+
[0.17166, 0.82834, 0.01594, 0.78678, -0.0451, 0.6505, 0.03569, 0.5],
|
|
3836
|
+
[0.03569, 0.5, -0.0451, 0.34947, 0.01594, 0.21319, 0.17166, 0.17166],
|
|
3837
|
+
[0.17166, 0.17166, 0.21319, 0.01594, 0.34947, -0.0451, 0.5, 0.03569],
|
|
3838
|
+
[0.5, 0.03569, 0.6505, -0.0451, 0.78678, 0.01594, 0.82831, 0.17166],
|
|
3839
|
+
[0.82831, 0.17166, 0.98406, 0.21319, 1.04506, 0.34947, 0.96431, 0.5]
|
|
3840
|
+
]);
|
|
3841
|
+
var ovalShape = createShape([
|
|
3842
|
+
[0.77103, 0.77103, 0.53902, 1.00303, 0.22959, 1.06979, 0.07991, 0.9201],
|
|
3843
|
+
[0.07991, 0.9201, -0.06978, 0.7704, -304e-5, 0.46097, 0.22897, 0.22897],
|
|
3844
|
+
[0.22897, 0.22897, 0.46098, -303e-5, 0.77041, -0.06979, 0.92009, 0.0799],
|
|
3845
|
+
[0.92009, 0.0799, 1.06978, 0.2296, 1.00304, 0.53903, 0.77103, 0.77103]
|
|
3846
|
+
]);
|
|
3847
|
+
var pentagonShape = createShape([
|
|
3848
|
+
[0.3426, 0.07617, 0.39138, 0.03842, 0.41575, 0.01954, 0.44181, 0.01017],
|
|
3849
|
+
[0.44181, 0.01017, 0.47942, -336e-5, 0.52058, -336e-5, 0.55819, 0.01017],
|
|
3850
|
+
[0.55819, 0.01017, 0.58425, 0.01954, 0.60862, 0.03842, 0.6574, 0.07617],
|
|
3851
|
+
[0.6574, 0.07617, 0.69296, 0.1037, 0.72853, 0.13123, 0.76409, 0.15876],
|
|
3852
|
+
[0.76409, 0.15876, 0.79963, 0.18455, 0.83517, 0.21034, 0.87071, 0.23613],
|
|
3853
|
+
[0.87071, 0.23613, 0.9213, 0.27285, 0.94662, 0.29123, 0.96352, 0.31429],
|
|
3854
|
+
[0.96352, 0.31429, 0.98796, 0.34769, 1.00083, 0.38872, 0.99996, 0.43069],
|
|
3855
|
+
[0.99996, 0.43069, 0.99933, 0.45972, 0.9893, 0.49006, 0.96918, 0.55072],
|
|
3856
|
+
[0.96918, 0.55072, 0.95522, 0.59283, 0.94126, 0.63495, 0.9273, 0.67706],
|
|
3857
|
+
[0.9273, 0.67706, 0.91443, 0.72021, 0.90155, 0.76335, 0.88868, 0.8065],
|
|
3858
|
+
[0.88868, 0.8065, 0.87052, 0.86724, 0.86146, 0.89762, 0.84562, 0.92124],
|
|
3859
|
+
[0.84562, 0.92124, 0.82268, 0.95543, 0.78934, 0.98055, 0.75099, 0.99259],
|
|
3860
|
+
[0.75099, 0.99259, 0.7245, 1.00093, 0.69393, 1.00043, 0.63281, 0.99946],
|
|
3861
|
+
[0.63281, 0.99946, 0.58854, 0.99876, 0.54427, 0.99806, 0.5, 0.99737],
|
|
3862
|
+
[0.5, 0.99737, 0.45573, 0.99806, 0.41146, 0.99876, 0.36719, 0.99946],
|
|
3863
|
+
[0.36719, 0.99946, 0.30607, 1.00043, 0.2755, 1.00093, 0.24901, 0.99259],
|
|
3864
|
+
[0.24901, 0.99259, 0.21066, 0.98055, 0.17732, 0.95543, 0.15438, 0.92124],
|
|
3865
|
+
[0.15438, 0.92124, 0.13854, 0.89762, 0.12948, 0.86724, 0.11132, 0.8065],
|
|
3866
|
+
[0.11132, 0.8065, 0.09845, 0.76335, 0.08557, 0.72021, 0.0727, 0.67706],
|
|
3867
|
+
[0.0727, 0.67706, 0.05874, 0.63495, 0.04478, 0.59283, 0.03082, 0.55072],
|
|
3868
|
+
[0.03082, 0.55072, 0.0107, 0.49006, 67e-5, 0.45972, 4e-5, 0.43069],
|
|
3869
|
+
[4e-5, 0.43069, -83e-5, 0.38872, 0.01204, 0.34769, 0.03648, 0.31429],
|
|
3870
|
+
[0.03648, 0.31429, 0.05338, 0.29123, 0.0787, 0.27285, 0.12929, 0.23613],
|
|
3871
|
+
[0.12929, 0.23613, 0.16483, 0.21034, 0.20037, 0.18455, 0.23591, 0.15876],
|
|
3872
|
+
[0.23591, 0.15876, 0.27147, 0.13123, 0.30704, 0.1037, 0.3426, 0.07617]
|
|
3873
|
+
]);
|
|
3874
|
+
var pillShape = createShape([
|
|
3875
|
+
[0.2662, 0.1259, 0.43407, -0.04197, 0.70623, -0.04197, 0.8741, 0.1259],
|
|
3876
|
+
[0.8741, 0.1259, 1.04197, 0.29377, 1.04197, 0.56593, 0.8741, 0.7338],
|
|
3877
|
+
[0.8741, 0.7338, 0.82733, 0.78057, 0.78057, 0.82733, 0.7338, 0.8741],
|
|
3878
|
+
[0.7338, 0.8741, 0.56593, 1.04197, 0.29377, 1.04197, 0.1259, 0.8741],
|
|
3879
|
+
[0.1259, 0.8741, -0.04197, 0.70623, -0.04197, 0.43407, 0.1259, 0.2662],
|
|
3880
|
+
[0.1259, 0.2662, 0.17267, 0.21943, 0.21943, 0.17267, 0.2662, 0.1259]
|
|
3881
|
+
]);
|
|
3882
|
+
var pixelCircleShape = createShape([
|
|
3883
|
+
[0.70372, 0, 0.56791, 0, 0.43209, 0, 0.29628, 0],
|
|
3884
|
+
[0.29628, 0, 0.29628, 0.0216, 0.29628, 0.04321, 0.29628, 0.06481],
|
|
3885
|
+
[0.29628, 0.06481, 0.24999, 0.06481, 0.2037, 0.06481, 0.15741, 0.06481],
|
|
3886
|
+
[0.15741, 0.06481, 0.15741, 0.09259, 0.15741, 0.12037, 0.15741, 0.14816],
|
|
3887
|
+
[0.15741, 0.14816, 0.12963, 0.14816, 0.10185, 0.14816, 0.07408, 0.14816],
|
|
3888
|
+
[0.07408, 0.14816, 0.07408, 0.19753, 0.07408, 0.24691, 0.07408, 0.29628],
|
|
3889
|
+
[0.07408, 0.29628, 0.04938, 0.29628, 0.02469, 0.29628, 0, 0.29628],
|
|
3890
|
+
[0, 0.29628, 0, 0.43209, 0, 0.56791, 0, 0.70372],
|
|
3891
|
+
[0, 0.70372, 0.02469, 0.70372, 0.04938, 0.70372, 0.07408, 0.70372],
|
|
3892
|
+
[0.07408, 0.70372, 0.07408, 0.75309, 0.07408, 0.80247, 0.07408, 0.85184],
|
|
3893
|
+
[0.07408, 0.85184, 0.10185, 0.85184, 0.12963, 0.85184, 0.15741, 0.85184],
|
|
3894
|
+
[0.15741, 0.85184, 0.15741, 0.87962, 0.15741, 0.90741, 0.15741, 0.93519],
|
|
3895
|
+
[0.15741, 0.93519, 0.2037, 0.93519, 0.24999, 0.93519, 0.29628, 0.93519],
|
|
3896
|
+
[0.29628, 0.93519, 0.29628, 0.95679, 0.29628, 0.9784, 0.29628, 1],
|
|
3897
|
+
[0.29628, 1, 0.43209, 1, 0.56791, 1, 0.70372, 1],
|
|
3898
|
+
[0.70372, 1, 0.70372, 0.9784, 0.70372, 0.95679, 0.70372, 0.93519],
|
|
3899
|
+
[0.70372, 0.93519, 0.75001, 0.93519, 0.7963, 0.93519, 0.84259, 0.93519],
|
|
3900
|
+
[0.84259, 0.93519, 0.84259, 0.90741, 0.84259, 0.87962, 0.84259, 0.85184],
|
|
3901
|
+
[0.84259, 0.85184, 0.87037, 0.85184, 0.89816, 0.85184, 0.92594, 0.85184],
|
|
3902
|
+
[0.92594, 0.85184, 0.92594, 0.80247, 0.92594, 0.75309, 0.92594, 0.70372],
|
|
3903
|
+
[0.92594, 0.70372, 0.95062, 0.70372, 0.97531, 0.70372, 1, 0.70372],
|
|
3904
|
+
[1, 0.70372, 1, 0.56791, 1, 0.43209, 1, 0.29628],
|
|
3905
|
+
[1, 0.29628, 0.97531, 0.29628, 0.95062, 0.29628, 0.92594, 0.29628],
|
|
3906
|
+
[0.92594, 0.29628, 0.92594, 0.24691, 0.92594, 0.19753, 0.92594, 0.14816],
|
|
3907
|
+
[0.92594, 0.14816, 0.89816, 0.14816, 0.87037, 0.14816, 0.84259, 0.14816],
|
|
3908
|
+
[0.84259, 0.14816, 0.84259, 0.12038, 0.84259, 0.09259, 0.84259, 0.06481],
|
|
3909
|
+
[0.84259, 0.06481, 0.7963, 0.06481, 0.75001, 0.06481, 0.70372, 0.06481],
|
|
3910
|
+
[0.70372, 0.06481, 0.70372, 0.04321, 0.70372, 0.0216, 0.70372, 0]
|
|
3911
|
+
]);
|
|
3912
|
+
var pixelTriangleShape = createShape([
|
|
3913
|
+
[0.28637, 0, 0.22842, 0, 0.17046, 0, 0.1125, 0],
|
|
3914
|
+
[0.1125, 0, 0.1125, 0.33333, 0.1125, 0.66667, 0.1125, 1],
|
|
3915
|
+
[0.1125, 1, 0.17046, 1, 0.22842, 1, 0.28637, 1],
|
|
3916
|
+
[0.28637, 1, 0.28637, 0.97101, 0.28637, 0.94203, 0.28637, 0.91304],
|
|
3917
|
+
[0.28637, 0.91304, 0.33108, 0.91304, 0.37579, 0.91304, 0.4205, 0.91304],
|
|
3918
|
+
[0.4205, 0.91304, 0.4205, 0.88551, 0.4205, 0.85797, 0.4205, 0.83043],
|
|
3919
|
+
[0.4205, 0.83043, 0.46688, 0.83043, 0.51325, 0.83043, 0.55963, 0.83043],
|
|
3920
|
+
[0.55963, 0.83043, 0.55963, 0.79855, 0.55963, 0.76667, 0.55963, 0.73478],
|
|
3921
|
+
[0.55963, 0.73478, 0.59771, 0.73478, 0.63579, 0.73478, 0.67388, 0.73478],
|
|
3922
|
+
[0.67388, 0.73478, 0.67388, 0.70869, 0.67388, 0.68261, 0.67388, 0.65652],
|
|
3923
|
+
[0.67388, 0.65652, 0.71197, 0.65652, 0.75006, 0.65652, 0.78816, 0.65652],
|
|
3924
|
+
[0.78816, 0.65652, 0.78816, 0.62464, 0.78816, 0.59275, 0.78816, 0.56087],
|
|
3925
|
+
[0.78816, 0.56087, 0.82127, 0.56087, 0.85439, 0.56087, 0.8875, 0.56087],
|
|
3926
|
+
[0.8875, 0.56087, 0.8875, 0.52029, 0.8875, 0.47971, 0.8875, 0.43913],
|
|
3927
|
+
[0.8875, 0.43913, 0.85439, 0.43913, 0.82127, 0.43913, 0.78816, 0.43913],
|
|
3928
|
+
[0.78816, 0.43913, 0.78816, 0.40725, 0.78816, 0.37536, 0.78816, 0.34347],
|
|
3929
|
+
[0.78816, 0.34347, 0.75006, 0.34347, 0.71197, 0.34347, 0.67388, 0.34347],
|
|
3930
|
+
[0.67388, 0.34347, 0.67388, 0.31739, 0.67388, 0.2913, 0.67388, 0.26522],
|
|
3931
|
+
[0.67388, 0.26522, 0.63579, 0.26522, 0.59771, 0.26522, 0.55963, 0.26522],
|
|
3932
|
+
[0.55963, 0.26522, 0.55963, 0.23333, 0.55963, 0.20145, 0.55963, 0.16957],
|
|
3933
|
+
[0.55963, 0.16957, 0.51325, 0.16957, 0.46688, 0.16957, 0.4205, 0.16957],
|
|
3934
|
+
[0.4205, 0.16957, 0.4205, 0.14203, 0.4205, 0.11449, 0.4205, 0.08696],
|
|
3935
|
+
[0.4205, 0.08696, 0.37579, 0.08696, 0.33108, 0.08696, 0.28637, 0.08696],
|
|
3936
|
+
[0.28637, 0.08696, 0.28637, 0.05797, 0.28637, 0.02899, 0.28637, 0]
|
|
3937
|
+
]);
|
|
3938
|
+
var puffyDiamondShape = createShape([
|
|
3939
|
+
[0.77937, 0.78048, 0.81712, 0.7427, 0.8299, 0.6894, 0.81768, 0.64111],
|
|
3940
|
+
[0.81768, 0.64111, 0.86599, 0.65339, 0.91937, 0.64063, 0.95718, 0.60282],
|
|
3941
|
+
[0.95718, 0.60282, 1.01427, 0.54574, 1.01427, 0.45319, 0.95718, 0.39611],
|
|
3942
|
+
[0.95718, 0.39611, 0.91959, 0.35852, 0.86662, 0.34569, 0.81856, 0.3576],
|
|
3943
|
+
[0.81856, 0.3576, 0.82928, 0.31027, 0.81621, 0.25865, 0.77937, 0.2218],
|
|
3944
|
+
[0.77937, 0.2218, 0.7415, 0.18394, 0.68803, 0.17119, 0.63969, 0.18355],
|
|
3945
|
+
[0.63969, 0.18355, 0.6525, 0.13492, 0.63984, 0.08095, 0.60169, 0.04282],
|
|
3946
|
+
[0.60169, 0.04282, 0.54462, -0.01426, 0.45206, -0.01426, 0.395, 0.04282],
|
|
3947
|
+
[0.395, 0.04282, 0.3571, 0.08073, 0.34435, 0.13427, 0.35678, 0.18269],
|
|
3948
|
+
[0.35678, 0.18269, 0.30938, 0.17184, 0.2576, 0.18487, 0.22069, 0.2218],
|
|
3949
|
+
[0.22069, 0.2218, 0.18385, 0.25865, 0.17079, 0.31028, 0.1815, 0.35761],
|
|
3950
|
+
[0.1815, 0.35761, 0.13341, 0.34568, 0.08041, 0.35851, 0.04282, 0.39611],
|
|
3951
|
+
[0.04282, 0.39611, -0.01427, 0.45319, -0.01427, 0.54574, 0.04282, 0.60282],
|
|
3952
|
+
[0.04282, 0.60282, 0.08063, 0.64064, 0.13404, 0.6534, 0.18235, 0.6411],
|
|
3953
|
+
[0.18235, 0.6411, 0.17013, 0.68939, 0.18291, 0.7427, 0.22069, 0.78048],
|
|
3954
|
+
[0.22069, 0.78048, 0.25744, 0.81725, 0.30894, 0.83033, 0.35619, 0.81973],
|
|
3955
|
+
[0.35619, 0.81973, 0.34478, 0.8675, 0.35772, 0.9199, 0.395, 0.95718],
|
|
3956
|
+
[0.395, 0.95718, 0.45206, 1.01426, 0.54462, 1.01426, 0.60169, 0.95718],
|
|
3957
|
+
[0.60169, 0.95718, 0.63919, 0.91968, 0.65206, 0.86688, 0.64028, 0.81888],
|
|
3958
|
+
[0.64028, 0.81888, 0.6885, 0.83098, 0.74165, 0.81817, 0.77937, 0.78048]
|
|
3959
|
+
]);
|
|
3960
|
+
var puffyShape = createShape([
|
|
3961
|
+
[0.99994, 0.49408, 0.99912, 0.42679, 0.94916, 0.37292, 0.88825, 0.37382],
|
|
3962
|
+
[0.88825, 0.37382, 0.88491, 0.37382, 0.88159, 0.3741, 0.87831, 0.37449],
|
|
3963
|
+
[0.87831, 0.37449, 0.88087, 0.37218, 0.88337, 0.36982, 0.88575, 0.36722],
|
|
3964
|
+
[0.88575, 0.36722, 0.92937, 0.32028, 0.93028, 0.24307, 0.88784, 0.19483],
|
|
3965
|
+
[0.88784, 0.19483, 0.88534, 0.19201, 0.88287, 0.18919, 0.88031, 0.18648],
|
|
3966
|
+
[0.88031, 0.18648, 0.83669, 0.13954, 0.76694, 0.14055, 0.72444, 0.1888],
|
|
3967
|
+
[0.72444, 0.1888, 0.72209, 0.19144, 0.71997, 0.19421, 0.71787, 0.19703],
|
|
3968
|
+
[0.71787, 0.19703, 0.71822, 0.19342, 0.71844, 0.18975, 0.7185, 0.18603],
|
|
3969
|
+
[0.7185, 0.18603, 0.71934, 0.11874, 0.67066, 0.06346, 0.60981, 0.0625],
|
|
3970
|
+
[0.60981, 0.0625, 0.60682, 0.0625, 0.60383, 0.0625, 0.60084, 0.0625],
|
|
3971
|
+
[0.60084, 0.0625, 0.55575, 0.0625, 0.51706, 0.09248, 0.5, 0.13537],
|
|
3972
|
+
[0.5, 0.13537, 0.48294, 0.09248, 0.44422, 0.0625, 0.39916, 0.0625],
|
|
3973
|
+
[0.39916, 0.0625, 0.39617, 0.0625, 0.39318, 0.0625, 0.39019, 0.0625],
|
|
3974
|
+
[0.39019, 0.0625, 0.32934, 0.0634, 0.28066, 0.11869, 0.28147, 0.18603],
|
|
3975
|
+
[0.28147, 0.18603, 0.28147, 0.18975, 0.28172, 0.19342, 0.28206, 0.19703],
|
|
3976
|
+
[0.28206, 0.19703, 0.28, 0.19418, 0.27781, 0.19144, 0.2755, 0.1888],
|
|
3977
|
+
[0.2755, 0.1888, 0.23306, 0.14055, 0.16325, 0.13954, 0.11962, 0.18648],
|
|
3978
|
+
[0.11962, 0.18648, 0.11709, 0.18925, 0.11453, 0.19201, 0.11209, 0.19483],
|
|
3979
|
+
[0.11209, 0.19483, 0.06966, 0.24307, 0.07056, 0.32022, 0.11419, 0.36722],
|
|
3980
|
+
[0.11419, 0.36722, 0.11659, 0.36982, 0.11906, 0.37218, 0.12162, 0.37449],
|
|
3981
|
+
[0.12162, 0.37449, 0.11833, 0.37409, 0.11501, 0.37387, 0.11169, 0.37382],
|
|
3982
|
+
[0.11169, 0.37382, 0.05084, 0.37292, 87e-5, 0.42679, 0, 0.49408],
|
|
3983
|
+
[0, 0.49408, 0, 0.49803, 0, 0.50197, 0, 0.50592],
|
|
3984
|
+
[0, 0.50592, 81e-5, 0.57321, 0.05081, 0.62708, 0.11169, 0.62618],
|
|
3985
|
+
[0.11169, 0.62618, 0.11506, 0.62618, 0.11837, 0.6259, 0.12162, 0.62551],
|
|
3986
|
+
[0.12162, 0.62551, 0.11906, 0.62782, 0.11659, 0.63018, 0.11419, 0.63278],
|
|
3987
|
+
[0.11419, 0.63278, 0.07056, 0.67972, 0.06966, 0.75693, 0.11209, 0.80518],
|
|
3988
|
+
[0.11209, 0.80518, 0.11459, 0.80799, 0.11709, 0.81081, 0.11962, 0.81352],
|
|
3989
|
+
[0.11962, 0.81352, 0.16325, 0.86046, 0.233, 0.85945, 0.2755, 0.8112],
|
|
3990
|
+
[0.2755, 0.8112, 0.27784, 0.80856, 0.28, 0.80579, 0.28206, 0.80297],
|
|
3991
|
+
[0.28206, 0.80298, 0.28171, 0.80663, 0.28151, 0.8103, 0.28147, 0.81397],
|
|
3992
|
+
[0.28147, 0.81397, 0.28066, 0.88126, 0.32931, 0.9366, 0.39019, 0.9375],
|
|
3993
|
+
[0.39019, 0.9375, 0.39318, 0.9375, 0.39617, 0.9375, 0.39916, 0.9375],
|
|
3994
|
+
[0.39916, 0.9375, 0.44425, 0.9375, 0.48294, 0.90752, 0.5, 0.86463],
|
|
3995
|
+
[0.5, 0.86463, 0.51706, 0.90752, 0.55578, 0.9375, 0.60084, 0.9375],
|
|
3996
|
+
[0.60084, 0.9375, 0.60383, 0.9375, 0.60682, 0.9375, 0.60981, 0.9375],
|
|
3997
|
+
[0.60981, 0.9375, 0.67066, 0.9366, 0.71934, 0.88131, 0.71853, 0.81397],
|
|
3998
|
+
[0.71853, 0.81397, 0.71853, 0.81025, 0.71828, 0.80658, 0.71794, 0.80297],
|
|
3999
|
+
[0.71794, 0.80297, 0.72, 0.80579, 0.72216, 0.80856, 0.7245, 0.8112],
|
|
4000
|
+
[0.7245, 0.8112, 0.76694, 0.85945, 0.83675, 0.86046, 0.88037, 0.81352],
|
|
4001
|
+
[0.88037, 0.81352, 0.88291, 0.81075, 0.88547, 0.80799, 0.88791, 0.80518],
|
|
4002
|
+
[0.88791, 0.80518, 0.93034, 0.75693, 0.92944, 0.67978, 0.88581, 0.63278],
|
|
4003
|
+
[0.88581, 0.63278, 0.88341, 0.63018, 0.88094, 0.62782, 0.87838, 0.62551],
|
|
4004
|
+
[0.87838, 0.62551, 0.88167, 0.62591, 0.88499, 0.62613, 0.88831, 0.62618],
|
|
4005
|
+
[0.88831, 0.62618, 0.94916, 0.62708, 0.99919, 0.57327, 1, 0.50592],
|
|
4006
|
+
[1, 0.50592, 1, 0.50197, 1, 0.49803, 1, 0.49408],
|
|
4007
|
+
[1, 0.49408, 0.99998, 0.49408, 0.99996, 0.49408, 0.99994, 0.49408]
|
|
4008
|
+
]);
|
|
4009
|
+
var semiCircleShape = createShape([
|
|
4010
|
+
[1, 0.70913, 1, 0.76622, 0.95372, 0.8125, 0.89663, 0.8125],
|
|
4011
|
+
[0.89663, 0.8125, 0.63221, 0.8125, 0.36779, 0.8125, 0.10337, 0.8125],
|
|
4012
|
+
[0.10337, 0.8125, 0.04628, 0.8125, 0, 0.76622, 0, 0.70913],
|
|
4013
|
+
[0, 0.70913, 0, 0.70192, 0, 0.69471, 0, 0.6875],
|
|
4014
|
+
[0, 0.6875, 0, 0.41134, 0.22386, 0.1875, 0.5, 0.1875],
|
|
4015
|
+
[0.5, 0.1875, 0.77614, 0.1875, 1, 0.41134, 1, 0.6875],
|
|
4016
|
+
[1, 0.6875, 1, 0.69471, 1, 0.70192, 1, 0.70913]
|
|
4017
|
+
]);
|
|
4018
|
+
var cookie12SidedShape = createShape([
|
|
4019
|
+
[0.42719, 0.03077, 0.42887, 0.02912, 0.42972, 0.02827, 0.43044, 0.02759],
|
|
4020
|
+
[0.43044, 0.02759, 0.46953, -92e-4, 0.53047, -92e-4, 0.56956, 0.02759],
|
|
4021
|
+
[0.56956, 0.02759, 0.57028, 0.02827, 0.57113, 0.02912, 0.57281, 0.03077],
|
|
4022
|
+
[0.57281, 0.03077, 0.57384, 0.03174, 0.57434, 0.03224, 0.57481, 0.03271],
|
|
4023
|
+
[0.57481, 0.03271, 0.59982, 0.05657, 0.63526, 0.06606, 0.66885, 0.0579],
|
|
4024
|
+
[0.66885, 0.0579, 0.6695, 0.05774, 0.67019, 0.05756, 0.67157, 0.05721],
|
|
4025
|
+
[0.67157, 0.05721, 0.67385, 0.05662, 0.675, 0.05634, 0.67597, 0.05609],
|
|
4026
|
+
[0.67597, 0.05609, 0.72819, 0.04377, 0.781, 0.07424, 0.79644, 0.12565],
|
|
4027
|
+
[0.79644, 0.12565, 0.79672, 0.12662, 0.79704, 0.12774, 0.79769, 0.13003],
|
|
4028
|
+
[0.79769, 0.13003, 0.79807, 0.1314, 0.79825, 0.13209, 0.79844, 0.13274],
|
|
4029
|
+
[0.79844, 0.13274, 0.80817, 0.1659, 0.8341, 0.19183, 0.86726, 0.20156],
|
|
4030
|
+
[0.86726, 0.20156, 0.86791, 0.20175, 0.8686, 0.20193, 0.86997, 0.20231],
|
|
4031
|
+
[0.86997, 0.20231, 0.87226, 0.20296, 0.87338, 0.20328, 0.87435, 0.20356],
|
|
4032
|
+
[0.87435, 0.20356, 0.92576, 0.219, 0.95623, 0.27181, 0.94391, 0.32403],
|
|
4033
|
+
[0.94391, 0.32403, 0.94366, 0.325, 0.94338, 0.32615, 0.94279, 0.32843],
|
|
4034
|
+
[0.94279, 0.32843, 0.94244, 0.32981, 0.94226, 0.3305, 0.9421, 0.33115],
|
|
4035
|
+
[0.9421, 0.33115, 0.93394, 0.36474, 0.94343, 0.40018, 0.96729, 0.42519],
|
|
4036
|
+
[0.96729, 0.42519, 0.96776, 0.42566, 0.96826, 0.42616, 0.96923, 0.42719],
|
|
4037
|
+
[0.96923, 0.42719, 0.97088, 0.42887, 0.97173, 0.42972, 0.97241, 0.43044],
|
|
4038
|
+
[0.97241, 0.43044, 1.0092, 0.46953, 1.0092, 0.53047, 0.97241, 0.56956],
|
|
4039
|
+
[0.97241, 0.56956, 0.97173, 0.57028, 0.97088, 0.57113, 0.96923, 0.57281],
|
|
4040
|
+
[0.96923, 0.57281, 0.96826, 0.57384, 0.96776, 0.57434, 0.96729, 0.57481],
|
|
4041
|
+
[0.96729, 0.57481, 0.94343, 0.59982, 0.93394, 0.63526, 0.9421, 0.66885],
|
|
4042
|
+
[0.9421, 0.66885, 0.94226, 0.6695, 0.94244, 0.67019, 0.94279, 0.67157],
|
|
4043
|
+
[0.94279, 0.67157, 0.94338, 0.67385, 0.94366, 0.675, 0.94391, 0.67597],
|
|
4044
|
+
[0.94391, 0.67597, 0.95623, 0.72819, 0.92576, 0.781, 0.87435, 0.79644],
|
|
4045
|
+
[0.87435, 0.79644, 0.87338, 0.79672, 0.87226, 0.79704, 0.86997, 0.79769],
|
|
4046
|
+
[0.86997, 0.79769, 0.8686, 0.79807, 0.86791, 0.79825, 0.86726, 0.79844],
|
|
4047
|
+
[0.86726, 0.79844, 0.8341, 0.80817, 0.80817, 0.8341, 0.79844, 0.86726],
|
|
4048
|
+
[0.79844, 0.86726, 0.79825, 0.86791, 0.79807, 0.8686, 0.79769, 0.86997],
|
|
4049
|
+
[0.79769, 0.86997, 0.79704, 0.87226, 0.79672, 0.87338, 0.79644, 0.87435],
|
|
4050
|
+
[0.79644, 0.87435, 0.781, 0.92576, 0.72819, 0.95623, 0.67597, 0.94391],
|
|
4051
|
+
[0.67597, 0.94391, 0.675, 0.94366, 0.67385, 0.94338, 0.67157, 0.94279],
|
|
4052
|
+
[0.67157, 0.94279, 0.67019, 0.94244, 0.6695, 0.94226, 0.66885, 0.9421],
|
|
4053
|
+
[0.66885, 0.9421, 0.63526, 0.93394, 0.59982, 0.94343, 0.57481, 0.96729],
|
|
4054
|
+
[0.57481, 0.96729, 0.57434, 0.96776, 0.57384, 0.96826, 0.57281, 0.96923],
|
|
4055
|
+
[0.57281, 0.96923, 0.57113, 0.97088, 0.57028, 0.97173, 0.56956, 0.97241],
|
|
4056
|
+
[0.56956, 0.97241, 0.53047, 1.0092, 0.46953, 1.0092, 0.43044, 0.97241],
|
|
4057
|
+
[0.43044, 0.97241, 0.42972, 0.97173, 0.42887, 0.97088, 0.42719, 0.96923],
|
|
4058
|
+
[0.42719, 0.96923, 0.42616, 0.96826, 0.42566, 0.96776, 0.42519, 0.96729],
|
|
4059
|
+
[0.42519, 0.96729, 0.40018, 0.94343, 0.36474, 0.93394, 0.33115, 0.9421],
|
|
4060
|
+
[0.33115, 0.9421, 0.3305, 0.94226, 0.32981, 0.94244, 0.32843, 0.94279],
|
|
4061
|
+
[0.32843, 0.94279, 0.32615, 0.94338, 0.325, 0.94366, 0.32403, 0.94391],
|
|
4062
|
+
[0.32403, 0.94391, 0.27181, 0.95623, 0.219, 0.92576, 0.20356, 0.87435],
|
|
4063
|
+
[0.20356, 0.87435, 0.20328, 0.87338, 0.20296, 0.87226, 0.20231, 0.86997],
|
|
4064
|
+
[0.20231, 0.86997, 0.20193, 0.8686, 0.20175, 0.86791, 0.20156, 0.86726],
|
|
4065
|
+
[0.20156, 0.86726, 0.19183, 0.8341, 0.1659, 0.80817, 0.13274, 0.79844],
|
|
4066
|
+
[0.13274, 0.79844, 0.13209, 0.79825, 0.1314, 0.79807, 0.13003, 0.79769],
|
|
4067
|
+
[0.13003, 0.79769, 0.12774, 0.79704, 0.12662, 0.79672, 0.12565, 0.79644],
|
|
4068
|
+
[0.12565, 0.79644, 0.07424, 0.781, 0.04377, 0.72819, 0.05609, 0.67597],
|
|
4069
|
+
[0.05609, 0.67597, 0.05634, 0.675, 0.05662, 0.67385, 0.05721, 0.67157],
|
|
4070
|
+
[0.05721, 0.67157, 0.05756, 0.67019, 0.05774, 0.6695, 0.0579, 0.66885],
|
|
4071
|
+
[0.0579, 0.66885, 0.06606, 0.63526, 0.05657, 0.59982, 0.03271, 0.57481],
|
|
4072
|
+
[0.03271, 0.57481, 0.03224, 0.57434, 0.03174, 0.57384, 0.03077, 0.57281],
|
|
4073
|
+
[0.03077, 0.57281, 0.02912, 0.57113, 0.02827, 0.57028, 0.02759, 0.56956],
|
|
4074
|
+
[0.02759, 0.56956, -92e-4, 0.53047, -92e-4, 0.46953, 0.02759, 0.43044],
|
|
4075
|
+
[0.02759, 0.43044, 0.02827, 0.42972, 0.02912, 0.42887, 0.03077, 0.42719],
|
|
4076
|
+
[0.03077, 0.42719, 0.03174, 0.42616, 0.03224, 0.42566, 0.03271, 0.42519],
|
|
4077
|
+
[0.03271, 0.42519, 0.05657, 0.40018, 0.06606, 0.36474, 0.0579, 0.33115],
|
|
4078
|
+
[0.0579, 0.33115, 0.05774, 0.3305, 0.05756, 0.32981, 0.05721, 0.32843],
|
|
4079
|
+
[0.05721, 0.32843, 0.05662, 0.32615, 0.05634, 0.325, 0.05609, 0.32403],
|
|
4080
|
+
[0.05609, 0.32403, 0.04377, 0.27181, 0.07424, 0.219, 0.12565, 0.20356],
|
|
4081
|
+
[0.12565, 0.20356, 0.12662, 0.20328, 0.12774, 0.20296, 0.13003, 0.20231],
|
|
4082
|
+
[0.13003, 0.20231, 0.1314, 0.20193, 0.13209, 0.20175, 0.13274, 0.20156],
|
|
4083
|
+
[0.13274, 0.20156, 0.1659, 0.19183, 0.19183, 0.1659, 0.20156, 0.13274],
|
|
4084
|
+
[0.20156, 0.13274, 0.20175, 0.13209, 0.20193, 0.1314, 0.20231, 0.13003],
|
|
4085
|
+
[0.20231, 0.13003, 0.20296, 0.12774, 0.20328, 0.12662, 0.20356, 0.12565],
|
|
4086
|
+
[0.20356, 0.12565, 0.219, 0.07424, 0.27181, 0.04377, 0.32403, 0.05609],
|
|
4087
|
+
[0.32403, 0.05609, 0.325, 0.05634, 0.32615, 0.05662, 0.32843, 0.05721],
|
|
4088
|
+
[0.32843, 0.05721, 0.32981, 0.05756, 0.3305, 0.05774, 0.33115, 0.0579],
|
|
4089
|
+
[0.33115, 0.0579, 0.36474, 0.06606, 0.40018, 0.05657, 0.42519, 0.03271],
|
|
4090
|
+
[0.42519, 0.03271, 0.42566, 0.03224, 0.42616, 0.03174, 0.42719, 0.03077]
|
|
4091
|
+
]);
|
|
4092
|
+
var cookie4SidedShape = createShape([
|
|
4093
|
+
[0.63833, 0.02217, 0.85312, -0.07111, 1.07112, 0.14689, 0.97783, 0.36168],
|
|
4094
|
+
[0.97783, 0.36168, 0.97269, 0.37351, 0.96755, 0.38534, 0.9624, 0.39718],
|
|
4095
|
+
[0.9624, 0.39718, 0.93394, 0.46277, 0.93394, 0.53723, 0.9624, 0.60282],
|
|
4096
|
+
[0.9624, 0.60282, 0.96755, 0.61466, 0.97269, 0.62649, 0.97783, 0.63832],
|
|
4097
|
+
[0.97783, 0.63832, 1.07112, 0.85311, 0.85312, 1.07111, 0.63833, 0.97783],
|
|
4098
|
+
[0.63833, 0.97783, 0.6265, 0.97268, 0.61466, 0.96754, 0.60283, 0.9624],
|
|
4099
|
+
[0.60283, 0.9624, 0.53724, 0.93393, 0.46278, 0.93393, 0.39718, 0.9624],
|
|
4100
|
+
[0.39718, 0.9624, 0.38535, 0.96754, 0.37352, 0.97268, 0.36168, 0.97783],
|
|
4101
|
+
[0.36168, 0.97783, 0.14689, 1.07111, -0.07112, 0.85311, 0.02217, 0.63832],
|
|
4102
|
+
[0.02217, 0.63832, 0.02731, 0.62649, 0.03245, 0.61466, 0.03759, 0.60282],
|
|
4103
|
+
[0.03759, 0.60282, 0.06608, 0.53723, 0.06608, 0.46277, 0.03759, 0.39718],
|
|
4104
|
+
[0.03759, 0.39718, 0.03245, 0.38534, 0.02731, 0.37351, 0.02217, 0.36168],
|
|
4105
|
+
[0.02217, 0.36168, -0.07112, 0.14689, 0.14689, -0.07111, 0.36168, 0.02217],
|
|
4106
|
+
[0.36168, 0.02217, 0.37352, 0.02732, 0.38535, 0.03246, 0.39718, 0.0376],
|
|
4107
|
+
[0.39718, 0.0376, 0.46278, 0.06607, 0.53724, 0.06607, 0.60283, 0.0376],
|
|
4108
|
+
[0.60283, 0.0376, 0.61466, 0.03246, 0.6265, 0.02732, 0.63833, 0.02217]
|
|
4109
|
+
]);
|
|
4110
|
+
var cookie6SidedShape = createShape([
|
|
4111
|
+
[0.32337, 0.07142, 0.42176, -0.02381, 0.57824, -0.02381, 0.67663, 0.07142],
|
|
4112
|
+
[0.67663, 0.07142, 0.70677, 0.10055, 0.74365, 0.12178, 0.78399, 0.13319],
|
|
4113
|
+
[0.78399, 0.13319, 0.91589, 0.17053, 0.99413, 0.30566, 0.96061, 0.4382],
|
|
4114
|
+
[0.96061, 0.4382, 0.95036, 0.47876, 0.95036, 0.52124, 0.96061, 0.5618],
|
|
4115
|
+
[0.96061, 0.5618, 0.99413, 0.69434, 0.91589, 0.82947, 0.78399, 0.86681],
|
|
4116
|
+
[0.78399, 0.86681, 0.74365, 0.87822, 0.70677, 0.89945, 0.67663, 0.92858],
|
|
4117
|
+
[0.67663, 0.92858, 0.57824, 1.02381, 0.42176, 1.02381, 0.32337, 0.92858],
|
|
4118
|
+
[0.32337, 0.92858, 0.29323, 0.89945, 0.25635, 0.87822, 0.21601, 0.86681],
|
|
4119
|
+
[0.21601, 0.86681, 0.08411, 0.82947, 587e-5, 0.69434, 0.03939, 0.5618],
|
|
4120
|
+
[0.03939, 0.5618, 0.04964, 0.52124, 0.04964, 0.47876, 0.03939, 0.4382],
|
|
4121
|
+
[0.03939, 0.4382, 587e-5, 0.30566, 0.08411, 0.17053, 0.21601, 0.13319],
|
|
4122
|
+
[0.21601, 0.13319, 0.25635, 0.12178, 0.29323, 0.10055, 0.32337, 0.07142]
|
|
4123
|
+
]);
|
|
4124
|
+
var cookie7SidedShape = createShape([
|
|
4125
|
+
[0.35209, 0.06806, 0.36326, 0.05824, 0.36884, 0.05334, 0.37397, 0.04937],
|
|
4126
|
+
[0.37397, 0.04937, 0.4482, -813e-5, 0.5518, -813e-5, 0.62603, 0.04937],
|
|
4127
|
+
[0.62603, 0.04937, 0.63116, 0.05334, 0.63674, 0.05824, 0.64791, 0.06806],
|
|
4128
|
+
[0.64791, 0.06806, 0.65164, 0.07137, 0.65351, 0.07299, 0.65539, 0.07459],
|
|
4129
|
+
[0.65539, 0.07459, 0.68167, 0.09662, 0.71303, 0.11176, 0.74663, 0.11862],
|
|
4130
|
+
[0.74663, 0.11862, 0.74903, 0.11912, 0.75147, 0.11956, 0.75637, 0.12043],
|
|
4131
|
+
[0.75637, 0.12043, 0.771, 0.12306, 0.77831, 0.12434, 0.78461, 0.1259],
|
|
4132
|
+
[0.78461, 0.1259, 0.87573, 0.14821, 0.94032, 0.2294, 0.94176, 0.3234],
|
|
4133
|
+
[0.94176, 0.3234, 0.94186, 0.3299, 0.94151, 0.33734, 0.9408, 0.35221],
|
|
4134
|
+
[0.9408, 0.35221, 0.94057, 0.35721, 0.94045, 0.35968, 0.94039, 0.36215],
|
|
4135
|
+
[0.94039, 0.36215, 0.93958, 0.39649, 0.94732, 0.43049, 0.96293, 0.46109],
|
|
4136
|
+
[0.96293, 0.46109, 0.96404, 0.46328, 0.96523, 0.46546, 0.96759, 0.46987],
|
|
4137
|
+
[0.96759, 0.46987, 0.97467, 0.48296, 0.97821, 0.4895, 0.98093, 0.4954],
|
|
4138
|
+
[0.98093, 0.4954, 1.02032, 0.58071, 0.99727, 0.68196, 0.92484, 0.74168],
|
|
4139
|
+
[0.92484, 0.74168, 0.91984, 0.74584, 0.91381, 0.75018, 0.90177, 0.7589],
|
|
4140
|
+
[0.90177, 0.7589, 0.89774, 0.76184, 0.89572, 0.76328, 0.89377, 0.76478],
|
|
4141
|
+
[0.89377, 0.76478, 0.86646, 0.78557, 0.84476, 0.81284, 0.83064, 0.84412],
|
|
4142
|
+
[0.83064, 0.84412, 0.82963, 0.84637, 0.82865, 0.84865, 0.82671, 0.85325],
|
|
4143
|
+
[0.82671, 0.85325, 0.82091, 0.86696, 0.818, 0.87381, 0.8151, 0.87962],
|
|
4144
|
+
[0.8151, 0.87962, 0.7731, 0.96368, 0.67977, 1.00875, 0.58801, 0.98925],
|
|
4145
|
+
[0.58801, 0.98925, 0.58166, 0.98787, 0.57451, 0.98587, 0.56019, 0.98187],
|
|
4146
|
+
[0.56019, 0.98187, 0.5554, 0.98056, 0.55301, 0.97987, 0.55063, 0.97928],
|
|
4147
|
+
[0.55063, 0.97928, 0.51741, 0.97084, 0.48259, 0.97084, 0.44937, 0.97928],
|
|
4148
|
+
[0.44937, 0.97928, 0.44699, 0.97987, 0.4446, 0.98056, 0.43981, 0.98187],
|
|
4149
|
+
[0.43981, 0.98187, 0.42549, 0.98587, 0.41834, 0.98787, 0.41199, 0.98925],
|
|
4150
|
+
[0.41199, 0.98925, 0.32023, 1.00875, 0.2269, 0.96368, 0.1849, 0.87962],
|
|
4151
|
+
[0.1849, 0.87962, 0.18199, 0.87381, 0.17909, 0.86696, 0.17329, 0.85325],
|
|
4152
|
+
[0.17329, 0.85325, 0.17135, 0.84865, 0.17037, 0.84637, 0.16936, 0.84412],
|
|
4153
|
+
[0.16936, 0.84412, 0.15523, 0.81284, 0.13353, 0.78557, 0.10623, 0.76478],
|
|
4154
|
+
[0.10623, 0.76478, 0.10428, 0.76328, 0.10226, 0.76184, 0.09823, 0.7589],
|
|
4155
|
+
[0.09823, 0.7589, 0.08619, 0.75018, 0.08017, 0.74584, 0.07516, 0.74168],
|
|
4156
|
+
[0.07516, 0.74168, 273e-5, 0.68196, -0.02032, 0.58071, 0.01907, 0.4954],
|
|
4157
|
+
[0.01907, 0.4954, 0.02179, 0.4895, 0.02533, 0.48296, 0.03241, 0.46987],
|
|
4158
|
+
[0.03241, 0.46987, 0.03477, 0.46546, 0.03596, 0.46328, 0.03707, 0.46109],
|
|
4159
|
+
[0.03707, 0.46109, 0.05268, 0.43049, 0.06042, 0.39649, 0.05961, 0.36215],
|
|
4160
|
+
[0.05961, 0.36215, 0.05955, 0.35968, 0.05943, 0.35721, 0.0592, 0.35221],
|
|
4161
|
+
[0.0592, 0.35221, 0.05849, 0.33734, 0.05813, 0.3299, 0.05824, 0.3234],
|
|
4162
|
+
[0.05824, 0.3234, 0.05968, 0.2294, 0.12427, 0.14821, 0.21539, 0.1259],
|
|
4163
|
+
[0.21539, 0.1259, 0.22169, 0.12434, 0.229, 0.12306, 0.24363, 0.12043],
|
|
4164
|
+
[0.24363, 0.12043, 0.24853, 0.11956, 0.25097, 0.11912, 0.25337, 0.11862],
|
|
4165
|
+
[0.25337, 0.11862, 0.28697, 0.11176, 0.31833, 0.09662, 0.34461, 0.07459],
|
|
4166
|
+
[0.34461, 0.07459, 0.34649, 0.07299, 0.34836, 0.07137, 0.35209, 0.06806]
|
|
4167
|
+
]);
|
|
4168
|
+
var cookie9SidedShape = createShape([
|
|
4169
|
+
[0.39144, 0.04182, 0.39684, 0.03735, 0.39953, 0.03513, 0.402, 0.03326],
|
|
4170
|
+
[0.402, 0.03326, 0.45981, -0.01109, 0.54019, -0.01109, 0.598, 0.03326],
|
|
4171
|
+
[0.598, 0.03326, 0.60047, 0.03513, 0.60316, 0.03735, 0.60856, 0.04182],
|
|
4172
|
+
[0.60856, 0.04182, 0.61097, 0.04379, 0.61216, 0.04479, 0.61334, 0.04576],
|
|
4173
|
+
[0.61334, 0.04576, 0.64056, 0.06743, 0.67404, 0.07974, 0.70881, 0.08085],
|
|
4174
|
+
[0.70881, 0.08085, 0.71031, 0.08088, 0.71187, 0.08091, 0.71497, 0.08094],
|
|
4175
|
+
[0.71497, 0.08094, 0.72194, 0.08104, 0.72544, 0.08107, 0.7285, 0.08123],
|
|
4176
|
+
[0.7285, 0.08123, 0.80112, 0.08494, 0.86243, 0.13694, 0.87865, 0.20854],
|
|
4177
|
+
[0.87865, 0.20854, 0.87934, 0.21157, 0.88, 0.21504, 0.88131, 0.22194],
|
|
4178
|
+
[0.88131, 0.22194, 0.88187, 0.22504, 0.88215, 0.22657, 0.88247, 0.22807],
|
|
4179
|
+
[0.88247, 0.22807, 0.88956, 0.26244, 0.90737, 0.29357, 0.93325, 0.31694],
|
|
4180
|
+
[0.93325, 0.31694, 0.9344, 0.31797, 0.93556, 0.319, 0.93793, 0.32104],
|
|
4181
|
+
[0.93793, 0.32104, 0.94321, 0.32563, 0.94584, 0.32794, 0.94809, 0.33007],
|
|
4182
|
+
[0.94809, 0.33007, 1.00137, 0.38004, 1.01528, 0.45972, 0.98215, 0.5251],
|
|
4183
|
+
[0.98215, 0.5251, 0.98075, 0.52788, 0.97903, 0.53094, 0.97562, 0.53707],
|
|
4184
|
+
[0.97562, 0.53707, 0.97409, 0.53982, 0.97334, 0.54119, 0.97262, 0.54253],
|
|
4185
|
+
[0.97262, 0.54253, 0.9562, 0.57351, 0.95003, 0.60889, 0.955, 0.6436],
|
|
4186
|
+
[0.955, 0.6436, 0.95521, 0.64513, 0.95546, 0.64666, 0.95596, 0.64975],
|
|
4187
|
+
[0.95596, 0.64975, 0.95709, 0.65672, 0.95765, 0.66019, 0.95803, 0.66328],
|
|
4188
|
+
[0.95803, 0.66328, 0.96703, 0.73616, 0.927, 0.80622, 0.86003, 0.83478],
|
|
4189
|
+
[0.86003, 0.83478, 0.85718, 0.836, 0.8539, 0.83725, 0.8474, 0.83975],
|
|
4190
|
+
[0.8474, 0.83975, 0.8445, 0.84084, 0.84303, 0.84141, 0.84162, 0.84197],
|
|
4191
|
+
[0.84162, 0.84197, 0.80937, 0.855, 0.78212, 0.87812, 0.76381, 0.90794],
|
|
4192
|
+
[0.76381, 0.90794, 0.76303, 0.90925, 0.76225, 0.91059, 0.76065, 0.91328],
|
|
4193
|
+
[0.76065, 0.91328, 0.75709, 0.91934, 0.75531, 0.92237, 0.75362, 0.925],
|
|
4194
|
+
[0.75362, 0.925, 0.71415, 0.98665, 0.63894, 1.01434, 0.56944, 0.99272],
|
|
4195
|
+
[0.56944, 0.99272, 0.5665, 0.99181, 0.56319, 0.99065, 0.55662, 0.98831],
|
|
4196
|
+
[0.55662, 0.98831, 0.55369, 0.98728, 0.55222, 0.98675, 0.55078, 0.98628],
|
|
4197
|
+
[0.55078, 0.98628, 0.51782, 0.97531, 0.48218, 0.97531, 0.44922, 0.98628],
|
|
4198
|
+
[0.44922, 0.98628, 0.44778, 0.98675, 0.44631, 0.98728, 0.44338, 0.98831],
|
|
4199
|
+
[0.44338, 0.98831, 0.43681, 0.99065, 0.4335, 0.99181, 0.43056, 0.99272],
|
|
4200
|
+
[0.43056, 0.99272, 0.36106, 1.01434, 0.28585, 0.98665, 0.24638, 0.925],
|
|
4201
|
+
[0.24638, 0.925, 0.24469, 0.92237, 0.24291, 0.91934, 0.23935, 0.91328],
|
|
4202
|
+
[0.23935, 0.91328, 0.23775, 0.91059, 0.23697, 0.90925, 0.23619, 0.90794],
|
|
4203
|
+
[0.23619, 0.90794, 0.21788, 0.87812, 0.19063, 0.855, 0.15838, 0.84197],
|
|
4204
|
+
[0.15838, 0.84197, 0.15697, 0.84141, 0.1555, 0.84084, 0.1526, 0.83975],
|
|
4205
|
+
[0.1526, 0.83975, 0.1461, 0.83725, 0.14282, 0.836, 0.13997, 0.83478],
|
|
4206
|
+
[0.13997, 0.83478, 0.073, 0.80622, 0.03297, 0.73616, 0.04197, 0.66328],
|
|
4207
|
+
[0.04197, 0.66328, 0.04235, 0.66019, 0.04291, 0.65672, 0.04404, 0.64975],
|
|
4208
|
+
[0.04404, 0.64975, 0.04454, 0.64666, 0.04479, 0.64513, 0.045, 0.6436],
|
|
4209
|
+
[0.045, 0.6436, 0.04997, 0.60889, 0.0438, 0.57351, 0.02738, 0.54253],
|
|
4210
|
+
[0.02738, 0.54253, 0.02666, 0.54119, 0.02591, 0.53982, 0.02438, 0.53707],
|
|
4211
|
+
[0.02438, 0.53707, 0.02097, 0.53094, 0.01925, 0.52788, 0.01785, 0.5251],
|
|
4212
|
+
[0.01785, 0.5251, -0.01528, 0.45972, -137e-5, 0.38004, 0.05191, 0.33007],
|
|
4213
|
+
[0.05191, 0.33007, 0.05416, 0.32794, 0.05679, 0.32563, 0.06207, 0.32104],
|
|
4214
|
+
[0.06207, 0.32104, 0.06444, 0.319, 0.0656, 0.31797, 0.06675, 0.31694],
|
|
4215
|
+
[0.06675, 0.31694, 0.0927, 0.29347, 0.11049, 0.26234, 0.11753, 0.22807],
|
|
4216
|
+
[0.11753, 0.22807, 0.11785, 0.22657, 0.11813, 0.22504, 0.11869, 0.22194],
|
|
4217
|
+
[0.11869, 0.22194, 0.12, 0.21504, 0.12066, 0.21157, 0.12135, 0.20854],
|
|
4218
|
+
[0.12135, 0.20854, 0.13757, 0.13694, 0.19888, 0.08494, 0.2715, 0.08123],
|
|
4219
|
+
[0.2715, 0.08123, 0.27456, 0.08107, 0.27806, 0.08104, 0.28503, 0.08094],
|
|
4220
|
+
[0.28503, 0.08094, 0.28813, 0.08091, 0.28969, 0.08088, 0.29119, 0.08085],
|
|
4221
|
+
[0.29119, 0.08085, 0.32596, 0.07974, 0.35944, 0.06743, 0.38666, 0.04576],
|
|
4222
|
+
[0.38666, 0.04576, 0.38784, 0.04479, 0.38903, 0.04379, 0.39144, 0.04182]
|
|
4223
|
+
]);
|
|
4224
|
+
var slantedShape = createShape([
|
|
4225
|
+
[0.04911, 0.28294, 0.05715, 0.20613, 0.06118, 0.16772, 0.07595, 0.13743],
|
|
4226
|
+
[0.07595, 0.13743, 0.09732, 0.09358, 0.13462, 0.05972, 0.18009, 0.04288],
|
|
4227
|
+
[0.18009, 0.04288, 0.21151, 0.03125, 0.24979, 0.03125, 0.32635, 0.03125],
|
|
4228
|
+
[0.32635, 0.03125, 0.45521, 0.03125, 0.58407, 0.03125, 0.71293, 0.03125],
|
|
4229
|
+
[0.71293, 0.03125, 0.80551, 0.03125, 0.85181, 0.03125, 0.88715, 0.04642],
|
|
4230
|
+
[0.88715, 0.04642, 0.93832, 0.06838, 0.97725, 0.11203, 0.99352, 0.16569],
|
|
4231
|
+
[0.99352, 0.16569, 1.00476, 0.20272, 0.9999, 0.24916, 0.99017, 0.34206],
|
|
4232
|
+
[0.99017, 0.34206, 0.97708, 0.46706, 0.96398, 0.59206, 0.95089, 0.71706],
|
|
4233
|
+
[0.95089, 0.71706, 0.94285, 0.79387, 0.93883, 0.83228, 0.92405, 0.86256],
|
|
4234
|
+
[0.92405, 0.86256, 0.90268, 0.90641, 0.86538, 0.94028, 0.81991, 0.95712],
|
|
4235
|
+
[0.81991, 0.95712, 0.78849, 0.96875, 0.75021, 0.96875, 0.67365, 0.96875],
|
|
4236
|
+
[0.67365, 0.96875, 0.54479, 0.96875, 0.41593, 0.96875, 0.28707, 0.96875],
|
|
4237
|
+
[0.28707, 0.96875, 0.19449, 0.96875, 0.14819, 0.96875, 0.11285, 0.95359],
|
|
4238
|
+
[0.11285, 0.95359, 0.06169, 0.93162, 0.02275, 0.88797, 648e-5, 0.83431],
|
|
4239
|
+
[648e-5, 0.83431, -476e-5, 0.79728, 1e-4, 0.75084, 983e-5, 0.65794],
|
|
4240
|
+
[983e-5, 0.65794, 0.02292, 0.53294, 0.03602, 0.40794, 0.04911, 0.28294]
|
|
4241
|
+
]);
|
|
4242
|
+
var softBoomShape = createShape([
|
|
4243
|
+
[0.54668, 0.26546, 0.61712, -0.08849, 0.38296, -0.08849, 0.45337, 0.26546],
|
|
4244
|
+
[0.45337, 0.26546, 0.38296, -0.08849, 0.16664, 11e-4, 0.36715, 0.30118],
|
|
4245
|
+
[0.36715, 0.30118, 0.16664, 11e-4, 11e-4, 0.16665, 0.30118, 0.36715],
|
|
4246
|
+
[0.30118, 0.36715, 11e-4, 0.16665, -0.08849, 0.38296, 0.26546, 0.45334],
|
|
4247
|
+
[0.26546, 0.45334, -0.08849, 0.38293, -0.08849, 0.61706, 0.26546, 0.54665],
|
|
4248
|
+
[0.26546, 0.54665, -0.08849, 0.61706, 114e-5, 0.83334, 0.30118, 0.63284],
|
|
4249
|
+
[0.30118, 0.63284, 114e-5, 0.83334, 0.16668, 0.9989, 0.36715, 0.69881],
|
|
4250
|
+
[0.36715, 0.69881, 0.16664, 0.99884, 0.38296, 1.08843, 0.45334, 0.73452],
|
|
4251
|
+
[0.45334, 0.73452, 0.38293, 1.08849, 0.61706, 1.08849, 0.54665, 0.73452],
|
|
4252
|
+
[0.54665, 0.73452, 0.61706, 1.08849, 0.83334, 0.99884, 0.63284, 0.69881],
|
|
4253
|
+
[0.63284, 0.69881, 0.83334, 0.99884, 0.9989, 0.83331, 0.69881, 0.63284],
|
|
4254
|
+
[0.69881, 0.63284, 0.99884, 0.83334, 1.08843, 0.61702, 0.73452, 0.54665],
|
|
4255
|
+
[0.73452, 0.54665, 1.08849, 0.61706, 1.08849, 0.38293, 0.73452, 0.45334],
|
|
4256
|
+
[0.73452, 0.45334, 1.08849, 0.38293, 0.99884, 0.16665, 0.69881, 0.36715],
|
|
4257
|
+
[0.69881, 0.36715, 0.99884, 0.16665, 0.83331, 11e-4, 0.63284, 0.30118],
|
|
4258
|
+
[0.63284, 0.30118, 0.83334, 114e-5, 0.61702, -0.08845, 0.54665, 0.26546],
|
|
4259
|
+
[0.54665, 0.26546, 0.54666, 0.26546, 0.54667, 0.26546, 0.54668, 0.26546]
|
|
4260
|
+
]);
|
|
4261
|
+
var softBurstShape = createShape([
|
|
4262
|
+
[0.45359, 0.0247, 0.47494, -823e-5, 0.52506, -823e-5, 0.54641, 0.0247],
|
|
4263
|
+
[0.54641, 0.0247, 0.56348, 0.05101, 0.58055, 0.07733, 0.59763, 0.10364],
|
|
4264
|
+
[0.59763, 0.10364, 0.61166, 0.12529, 0.64, 0.1341, 0.66466, 0.12447],
|
|
4265
|
+
[0.66466, 0.12447, 0.69464, 0.11278, 0.72462, 0.10108, 0.7546, 0.08939],
|
|
4266
|
+
[0.7546, 0.08939, 0.79213, 0.07475, 0.83266, 0.10291, 0.82972, 0.14156],
|
|
4267
|
+
[0.82972, 0.14156, 0.82736, 0.17245, 0.82499, 0.20334, 0.82263, 0.23422],
|
|
4268
|
+
[0.82263, 0.23422, 0.82066, 0.25963, 0.83816, 0.28266, 0.86403, 0.28875],
|
|
4269
|
+
[0.86403, 0.28875, 0.89548, 0.29614, 0.92693, 0.30352, 0.95838, 0.31091],
|
|
4270
|
+
[0.95838, 0.31091, 0.99772, 0.32016, 1.01322, 0.36572, 0.98707, 0.39535],
|
|
4271
|
+
[0.98707, 0.39535, 0.96617, 0.41899, 0.94527, 0.44264, 0.92438, 0.46629],
|
|
4272
|
+
[0.92438, 0.46629, 0.90719, 0.48575, 0.90719, 0.51425, 0.92438, 0.53372],
|
|
4273
|
+
[0.92438, 0.53372, 0.94527, 0.55737, 0.96617, 0.58102, 0.98707, 0.60466],
|
|
4274
|
+
[0.98707, 0.60466, 1.01322, 0.63429, 0.99772, 0.67985, 0.95838, 0.6891],
|
|
4275
|
+
[0.95838, 0.6891, 0.92693, 0.69648, 0.89548, 0.70387, 0.86403, 0.71126],
|
|
4276
|
+
[0.86403, 0.71126, 0.83816, 0.71735, 0.82066, 0.74038, 0.82263, 0.76579],
|
|
4277
|
+
[0.82263, 0.76579, 0.82499, 0.79667, 0.82736, 0.82756, 0.82972, 0.85844],
|
|
4278
|
+
[0.82972, 0.85844, 0.83266, 0.8971, 0.79213, 0.92526, 0.7546, 0.91063],
|
|
4279
|
+
[0.7546, 0.91063, 0.72462, 0.89893, 0.69464, 0.88724, 0.66466, 0.87554],
|
|
4280
|
+
[0.66466, 0.87554, 0.64, 0.86591, 0.61166, 0.87473, 0.59763, 0.89638],
|
|
4281
|
+
[0.59763, 0.89638, 0.58055, 0.92269, 0.56348, 0.94901, 0.54641, 0.97532],
|
|
4282
|
+
[0.54641, 0.97532, 0.52506, 1.00823, 0.47494, 1.00823, 0.45359, 0.97532],
|
|
4283
|
+
[0.45359, 0.97532, 0.43652, 0.94901, 0.41945, 0.92269, 0.40237, 0.89638],
|
|
4284
|
+
[0.40237, 0.89638, 0.38834, 0.87473, 0.36, 0.86591, 0.33534, 0.87554],
|
|
4285
|
+
[0.33534, 0.87554, 0.30536, 0.88724, 0.27538, 0.89893, 0.2454, 0.91063],
|
|
4286
|
+
[0.2454, 0.91063, 0.20787, 0.92526, 0.16734, 0.8971, 0.17028, 0.85844],
|
|
4287
|
+
[0.17028, 0.85844, 0.17264, 0.82756, 0.17501, 0.79667, 0.17737, 0.76579],
|
|
4288
|
+
[0.17737, 0.76579, 0.17934, 0.74038, 0.16184, 0.71735, 0.13597, 0.71126],
|
|
4289
|
+
[0.13597, 0.71126, 0.10452, 0.70387, 0.07307, 0.69648, 0.04162, 0.6891],
|
|
4290
|
+
[0.04162, 0.6891, 228e-5, 0.67985, -0.01322, 0.63429, 0.01293, 0.60466],
|
|
4291
|
+
[0.01293, 0.60466, 0.03383, 0.58102, 0.05473, 0.55737, 0.07562, 0.53372],
|
|
4292
|
+
[0.07562, 0.53372, 0.09281, 0.51425, 0.09281, 0.48575, 0.07562, 0.46629],
|
|
4293
|
+
[0.07562, 0.46629, 0.05473, 0.44264, 0.03383, 0.41899, 0.01293, 0.39535],
|
|
4294
|
+
[0.01293, 0.39535, -0.01322, 0.36572, 228e-5, 0.32016, 0.04162, 0.31091],
|
|
4295
|
+
[0.04162, 0.31091, 0.07307, 0.30352, 0.10452, 0.29614, 0.13597, 0.28875],
|
|
4296
|
+
[0.13597, 0.28875, 0.16184, 0.28266, 0.17934, 0.25963, 0.17737, 0.23422],
|
|
4297
|
+
[0.17737, 0.23422, 0.17501, 0.20334, 0.17264, 0.17245, 0.17028, 0.14156],
|
|
4298
|
+
[0.17028, 0.14156, 0.16734, 0.10291, 0.20787, 0.07475, 0.2454, 0.08939],
|
|
4299
|
+
[0.2454, 0.08939, 0.27538, 0.10108, 0.30536, 0.11278, 0.33534, 0.12447],
|
|
4300
|
+
[0.33534, 0.12447, 0.36, 0.1341, 0.38834, 0.12529, 0.40237, 0.10364],
|
|
4301
|
+
[0.40237, 0.10364, 0.41945, 0.07733, 0.43652, 0.05101, 0.45359, 0.0247]
|
|
4302
|
+
]);
|
|
4303
|
+
var squareShape = createShape([
|
|
4304
|
+
[1, 0.5375, 1, 0.67725, 1, 0.74712, 0.97806, 0.80253],
|
|
4305
|
+
[0.97806, 0.80253, 0.94628, 0.88278, 0.88278, 0.94628, 0.80253, 0.97806],
|
|
4306
|
+
[0.80253, 0.97806, 0.74713, 1, 0.67725, 1, 0.5375, 1],
|
|
4307
|
+
[0.5375, 1, 0.5125, 1, 0.4875, 1, 0.4625, 1],
|
|
4308
|
+
[0.4625, 1, 0.32275, 1, 0.25288, 1, 0.19747, 0.97806],
|
|
4309
|
+
[0.19747, 0.97806, 0.11722, 0.94628, 0.05372, 0.88278, 0.02194, 0.80253],
|
|
4310
|
+
[0.02194, 0.80253, 0, 0.74713, 0, 0.67725, 0, 0.5375],
|
|
4311
|
+
[0, 0.5375, 0, 0.5125, 0, 0.4875, 0, 0.4625],
|
|
4312
|
+
[0, 0.4625, 0, 0.32275, 0, 0.25288, 0.02194, 0.19747],
|
|
4313
|
+
[0.02194, 0.19747, 0.0537, 0.11723, 0.11723, 0.05371, 0.19747, 0.02194],
|
|
4314
|
+
[0.19747, 0.02194, 0.25288, 0, 0.32275, 0, 0.4625, 0],
|
|
4315
|
+
[0.4625, 0, 0.4875, 0, 0.5125, 0, 0.5375, 0],
|
|
4316
|
+
[0.5375, 0, 0.67725, 0, 0.74712, 0, 0.80253, 0.02194],
|
|
4317
|
+
[0.80253, 0.02194, 0.88277, 0.05371, 0.9463, 0.11723, 0.97806, 0.19747],
|
|
4318
|
+
[0.97806, 0.19747, 1, 0.25288, 1, 0.32275, 1, 0.4625],
|
|
4319
|
+
[1, 0.4625, 1, 0.4875, 1, 0.5125, 1, 0.5375]
|
|
4320
|
+
]);
|
|
4321
|
+
var sunnyShape = createShape([
|
|
4322
|
+
[0.77016, 0.1213, 0.80126, 0.12342, 0.81681, 0.12448, 0.82938, 0.12995],
|
|
4323
|
+
[0.82938, 0.12995, 0.84756, 0.13791, 0.86208, 0.15244, 0.87004, 0.17062],
|
|
4324
|
+
[0.87004, 0.17062, 0.87554, 0.18318, 0.8766, 0.19874, 0.87871, 0.22983],
|
|
4325
|
+
[0.87871, 0.22983, 0.88031, 0.25348, 0.88192, 0.27714, 0.88353, 0.3008],
|
|
4326
|
+
[0.88353, 0.3008, 0.88439, 0.31338, 0.88481, 0.31968, 0.88618, 0.32568],
|
|
4327
|
+
[0.88618, 0.32568, 0.88816, 0.33436, 0.89159, 0.34264, 0.89633, 0.35018],
|
|
4328
|
+
[0.89633, 0.35018, 0.89961, 0.35541, 0.90376, 0.36015, 0.91204, 0.36965],
|
|
4329
|
+
[0.91204, 0.36965, 0.92764, 0.38751, 0.94323, 0.40537, 0.95882, 0.42324],
|
|
4330
|
+
[0.95882, 0.42324, 0.97932, 0.44674, 0.98957, 0.45847, 0.99457, 0.47124],
|
|
4331
|
+
[0.99457, 0.47124, 1.0018, 0.48973, 1.0018, 0.51027, 0.99457, 0.52876],
|
|
4332
|
+
[0.99457, 0.52876, 0.98957, 0.54153, 0.97932, 0.55326, 0.95882, 0.57676],
|
|
4333
|
+
[0.95882, 0.57676, 0.94323, 0.59463, 0.92764, 0.61249, 0.91204, 0.63035],
|
|
4334
|
+
[0.91204, 0.63035, 0.90376, 0.63985, 0.89961, 0.64459, 0.89633, 0.64982],
|
|
4335
|
+
[0.89633, 0.64982, 0.89159, 0.65736, 0.88816, 0.66564, 0.88618, 0.67432],
|
|
4336
|
+
[0.88618, 0.67432, 0.88481, 0.68032, 0.88439, 0.68662, 0.88353, 0.6992],
|
|
4337
|
+
[0.88353, 0.6992, 0.88192, 0.72286, 0.88031, 0.74652, 0.87871, 0.77017],
|
|
4338
|
+
[0.87871, 0.77017, 0.8766, 0.80126, 0.87554, 0.81682, 0.87004, 0.82938],
|
|
4339
|
+
[0.87004, 0.82938, 0.86208, 0.84756, 0.84756, 0.86209, 0.82938, 0.87005],
|
|
4340
|
+
[0.82938, 0.87005, 0.81681, 0.87552, 0.80126, 0.87658, 0.77016, 0.8787],
|
|
4341
|
+
[0.77016, 0.8787, 0.7465, 0.88031, 0.72285, 0.88192, 0.69919, 0.88352],
|
|
4342
|
+
[0.69919, 0.88352, 0.68661, 0.88438, 0.68032, 0.88482, 0.67431, 0.88617],
|
|
4343
|
+
[0.67431, 0.88617, 0.66563, 0.88815, 0.65735, 0.89158, 0.64981, 0.89632],
|
|
4344
|
+
[0.64981, 0.89632, 0.6446, 0.89961, 0.63985, 0.90376, 0.63035, 0.91205],
|
|
4345
|
+
[0.63035, 0.91205, 0.61248, 0.92764, 0.59462, 0.94323, 0.57675, 0.95882],
|
|
4346
|
+
[0.57675, 0.95882, 0.55327, 0.97932, 0.54153, 0.98955, 0.52875, 0.99455],
|
|
4347
|
+
[0.52875, 0.99455, 0.51027, 1.00182, 0.48973, 1.00182, 0.47125, 0.99455],
|
|
4348
|
+
[0.47125, 0.99455, 0.45847, 0.98955, 0.44673, 0.97932, 0.42325, 0.95882],
|
|
4349
|
+
[0.42325, 0.95882, 0.40538, 0.94323, 0.38752, 0.92764, 0.36965, 0.91205],
|
|
4350
|
+
[0.36965, 0.91205, 0.36015, 0.90376, 0.3554, 0.89961, 0.35019, 0.89632],
|
|
4351
|
+
[0.35019, 0.89632, 0.34265, 0.89158, 0.33437, 0.88815, 0.32569, 0.88617],
|
|
4352
|
+
[0.32569, 0.88617, 0.31968, 0.88482, 0.31339, 0.88438, 0.30081, 0.88352],
|
|
4353
|
+
[0.30081, 0.88352, 0.27715, 0.88192, 0.2535, 0.88031, 0.22984, 0.8787],
|
|
4354
|
+
[0.22984, 0.8787, 0.19874, 0.87658, 0.18319, 0.87552, 0.17062, 0.87005],
|
|
4355
|
+
[0.17062, 0.87005, 0.15244, 0.86209, 0.13792, 0.84756, 0.12996, 0.82938],
|
|
4356
|
+
[0.12996, 0.82938, 0.12446, 0.81682, 0.1234, 0.80126, 0.12129, 0.77017],
|
|
4357
|
+
[0.12129, 0.77017, 0.11968, 0.74652, 0.11807, 0.72286, 0.11647, 0.6992],
|
|
4358
|
+
[0.11647, 0.6992, 0.11561, 0.68662, 0.11519, 0.68032, 0.11382, 0.67432],
|
|
4359
|
+
[0.11382, 0.67432, 0.11185, 0.66564, 0.10841, 0.65736, 0.10367, 0.64982],
|
|
4360
|
+
[0.10367, 0.64982, 0.10039, 0.64459, 0.09624, 0.63985, 0.08796, 0.63035],
|
|
4361
|
+
[0.08796, 0.63035, 0.07236, 0.61249, 0.05677, 0.59463, 0.04118, 0.57676],
|
|
4362
|
+
[0.04118, 0.57676, 0.02068, 0.55326, 0.01043, 0.54153, 543e-5, 0.52876],
|
|
4363
|
+
[543e-5, 0.52876, -18e-4, 0.51027, -18e-4, 0.48973, 543e-5, 0.47124],
|
|
4364
|
+
[543e-5, 0.47124, 0.01043, 0.45847, 0.02068, 0.44674, 0.04118, 0.42324],
|
|
4365
|
+
[0.04118, 0.42324, 0.05677, 0.40537, 0.07236, 0.38751, 0.08796, 0.36965],
|
|
4366
|
+
[0.08796, 0.36965, 0.09624, 0.36015, 0.10039, 0.35541, 0.10367, 0.35018],
|
|
4367
|
+
[0.10367, 0.35018, 0.10841, 0.34264, 0.11184, 0.33436, 0.11382, 0.32568],
|
|
4368
|
+
[0.11382, 0.32568, 0.11519, 0.31968, 0.11561, 0.31338, 0.11647, 0.3008],
|
|
4369
|
+
[0.11647, 0.3008, 0.11808, 0.27714, 0.11969, 0.25348, 0.12129, 0.22983],
|
|
4370
|
+
[0.12129, 0.22983, 0.1234, 0.19874, 0.12446, 0.18318, 0.12996, 0.17062],
|
|
4371
|
+
[0.12996, 0.17062, 0.13792, 0.15244, 0.15244, 0.13791, 0.17062, 0.12995],
|
|
4372
|
+
[0.17062, 0.12995, 0.18319, 0.12448, 0.19874, 0.12342, 0.22984, 0.1213],
|
|
4373
|
+
[0.22984, 0.1213, 0.2535, 0.11969, 0.27716, 0.11808, 0.30081, 0.11648],
|
|
4374
|
+
[0.30081, 0.11648, 0.31339, 0.11562, 0.31968, 0.11518, 0.32569, 0.11383],
|
|
4375
|
+
[0.32569, 0.11383, 0.33437, 0.11185, 0.34266, 0.10842, 0.35019, 0.10368],
|
|
4376
|
+
[0.35019, 0.10368, 0.3554, 0.10039, 0.36015, 0.09624, 0.36965, 0.08795],
|
|
4377
|
+
[0.36965, 0.08795, 0.38752, 0.07236, 0.40538, 0.05677, 0.42325, 0.04118],
|
|
4378
|
+
[0.42325, 0.04118, 0.44673, 0.02068, 0.45847, 0.01045, 0.47125, 545e-5],
|
|
4379
|
+
[0.47125, 545e-5, 0.48973, -182e-5, 0.51027, -182e-5, 0.52875, 545e-5],
|
|
4380
|
+
[0.52875, 545e-5, 0.54153, 0.01045, 0.55327, 0.02068, 0.57675, 0.04118],
|
|
4381
|
+
[0.57675, 0.04118, 0.59462, 0.05677, 0.61248, 0.07236, 0.63035, 0.08795],
|
|
4382
|
+
[0.63035, 0.08795, 0.63985, 0.09624, 0.6446, 0.10039, 0.64981, 0.10368],
|
|
4383
|
+
[0.64981, 0.10368, 0.65735, 0.10842, 0.66563, 0.11185, 0.67431, 0.11383],
|
|
4384
|
+
[0.67431, 0.11383, 0.68032, 0.11518, 0.68661, 0.11562, 0.69919, 0.11648],
|
|
4385
|
+
[0.69919, 0.11648, 0.72285, 0.11808, 0.7465, 0.11969, 0.77016, 0.1213]
|
|
4386
|
+
]);
|
|
4387
|
+
var triangleShape = createShape([
|
|
4388
|
+
[0.33058, 0.2095, 0.37847, 0.12601, 0.40242, 0.08427, 0.43146, 0.06665],
|
|
4389
|
+
[0.43146, 0.06665, 0.47358, 0.04108, 0.52643, 0.04108, 0.56854, 0.06665],
|
|
4390
|
+
[0.56854, 0.06665, 0.59758, 0.08427, 0.62153, 0.12601, 0.66943, 0.2095],
|
|
4391
|
+
[0.66943, 0.2095, 0.75568, 0.35983, 0.84194, 0.51017, 0.92819, 0.66051],
|
|
4392
|
+
[0.92819, 0.66051, 0.97563, 0.7432, 0.99935, 0.78452, 0.99998, 0.81829],
|
|
4393
|
+
[0.99998, 0.81829, 1.00088, 0.86728, 0.97451, 0.91273, 0.93153, 0.93626],
|
|
4394
|
+
[0.93153, 0.93626, 0.90188, 0.95253, 0.85417, 0.95253, 0.75877, 0.95253],
|
|
4395
|
+
[0.75877, 0.95253, 0.58626, 0.95253, 0.41375, 0.95253, 0.24124, 0.95253],
|
|
4396
|
+
[0.24124, 0.95253, 0.14583, 0.95253, 0.09812, 0.95253, 0.06847, 0.93626],
|
|
4397
|
+
[0.06847, 0.93626, 0.02548, 0.91274, -89e-5, 0.86729, 2e-5, 0.81829],
|
|
4398
|
+
[2e-5, 0.81829, 65e-5, 0.78452, 0.02437, 0.7432, 0.07181, 0.66051],
|
|
4399
|
+
[0.07181, 0.66051, 0.15807, 0.51017, 0.24432, 0.35983, 0.33058, 0.2095]
|
|
4400
|
+
]);
|
|
4401
|
+
var verySunnyShape = createShape([
|
|
4402
|
+
[0.42725, 0.04123, 0.46018, -0.01374, 0.53981, -0.01374, 0.57275, 0.04123],
|
|
4403
|
+
[0.57275, 0.04123, 0.58508, 0.06182, 0.59741, 0.08241, 0.60974, 0.10301],
|
|
4404
|
+
[0.60974, 0.10301, 0.62896, 0.13504, 0.66687, 0.15076, 0.70309, 0.14166],
|
|
4405
|
+
[0.70309, 0.14166, 0.72638, 0.13583, 0.74967, 0.13, 0.77296, 0.12416],
|
|
4406
|
+
[0.77296, 0.12416, 0.83512, 0.1086, 0.8914, 0.16488, 0.87583, 0.22704],
|
|
4407
|
+
[0.87583, 0.22704, 0.87, 0.25033, 0.86417, 0.27362, 0.85833, 0.29691],
|
|
4408
|
+
[0.85833, 0.29691, 0.84924, 0.33313, 0.86496, 0.37103, 0.89699, 0.39025],
|
|
4409
|
+
[0.89699, 0.39025, 0.91758, 0.40258, 0.93818, 0.41492, 0.95877, 0.42725],
|
|
4410
|
+
[0.95877, 0.42725, 1.01374, 0.46019, 1.01374, 0.53981, 0.95877, 0.57275],
|
|
4411
|
+
[0.95877, 0.57275, 0.93818, 0.58508, 0.91758, 0.59742, 0.89699, 0.60975],
|
|
4412
|
+
[0.89699, 0.60975, 0.86496, 0.62897, 0.84924, 0.66687, 0.85833, 0.70309],
|
|
4413
|
+
[0.85833, 0.70309, 0.86417, 0.72638, 0.87, 0.74967, 0.87583, 0.77296],
|
|
4414
|
+
[0.87583, 0.77296, 0.8914, 0.83512, 0.83512, 0.8914, 0.77296, 0.87584],
|
|
4415
|
+
[0.77296, 0.87584, 0.74967, 0.87, 0.72638, 0.86417, 0.70309, 0.85834],
|
|
4416
|
+
[0.70309, 0.85834, 0.66687, 0.84924, 0.62896, 0.86496, 0.60974, 0.89699],
|
|
4417
|
+
[0.60974, 0.89699, 0.59741, 0.91759, 0.58508, 0.93818, 0.57275, 0.95877],
|
|
4418
|
+
[0.57275, 0.95877, 0.53981, 1.01374, 0.46018, 1.01374, 0.42725, 0.95877],
|
|
4419
|
+
[0.42725, 0.95877, 0.41491, 0.93818, 0.40258, 0.91759, 0.39025, 0.89699],
|
|
4420
|
+
[0.39025, 0.89699, 0.37103, 0.86496, 0.33312, 0.84924, 0.29691, 0.85834],
|
|
4421
|
+
[0.29691, 0.85834, 0.27361, 0.86417, 0.25031, 0.87, 0.22702, 0.87584],
|
|
4422
|
+
[0.22702, 0.87584, 0.16489, 0.8914, 0.10859, 0.83512, 0.12416, 0.77296],
|
|
4423
|
+
[0.12416, 0.77296, 0.12999, 0.74967, 0.13583, 0.72638, 0.14167, 0.70309],
|
|
4424
|
+
[0.14167, 0.70309, 0.15075, 0.66687, 0.13505, 0.62897, 0.103, 0.60975],
|
|
4425
|
+
[0.103, 0.60975, 0.08241, 0.59742, 0.06181, 0.58508, 0.04121, 0.57275],
|
|
4426
|
+
[0.04121, 0.57275, -0.01373, 0.53981, -0.01373, 0.46019, 0.04121, 0.42725],
|
|
4427
|
+
[0.04121, 0.42725, 0.06181, 0.41492, 0.08241, 0.40258, 0.103, 0.39025],
|
|
4428
|
+
[0.103, 0.39025, 0.13505, 0.37103, 0.15075, 0.33313, 0.14167, 0.29691],
|
|
4429
|
+
[0.14167, 0.29691, 0.13583, 0.27362, 0.12999, 0.25033, 0.12416, 0.22704],
|
|
4430
|
+
[0.12416, 0.22704, 0.10859, 0.16488, 0.16489, 0.1086, 0.22702, 0.12416],
|
|
4431
|
+
[0.22702, 0.12416, 0.25031, 0.13, 0.27361, 0.13583, 0.29691, 0.14166],
|
|
4432
|
+
[0.29691, 0.14166, 0.33312, 0.15076, 0.37103, 0.13504, 0.39025, 0.10301],
|
|
4433
|
+
[0.39025, 0.10301, 0.40258, 0.08241, 0.41491, 0.06182, 0.42725, 0.04123]
|
|
4434
|
+
]);
|
|
4435
|
+
function reversePolygon(polygon) {
|
|
4436
|
+
const reversedFeatures = polygon.features.map((f) => {
|
|
4437
|
+
const reversedCubics = f.cubics.map((c) => c.reverse()).reverse();
|
|
4438
|
+
if (f.type === "corner") {
|
|
4439
|
+
return cornerFeature(reversedCubics, f.convex);
|
|
4440
|
+
} else {
|
|
4441
|
+
return edgeFeature(reversedCubics);
|
|
4442
|
+
}
|
|
4443
|
+
}).reverse();
|
|
4444
|
+
return RoundedPolygon.fromFeatures(
|
|
4445
|
+
reversedFeatures,
|
|
4446
|
+
polygon.centerX,
|
|
4447
|
+
polygon.centerY
|
|
4448
|
+
);
|
|
4449
|
+
}
|
|
4450
|
+
function rotate180(polygon) {
|
|
4451
|
+
return polygon.transformed((x, y) => [1 - x, 1 - y]);
|
|
4452
|
+
}
|
|
4453
|
+
function flipV(polygon) {
|
|
4454
|
+
const flipped = polygon.transformed((x, y) => [x, 1 - y]);
|
|
4455
|
+
return reversePolygon(flipped);
|
|
4456
|
+
}
|
|
4457
|
+
var MD3Shapes = {
|
|
4458
|
+
arch: flipV(archShape),
|
|
4459
|
+
arrow: flipV(arrowShape),
|
|
4460
|
+
boom: boomShape,
|
|
4461
|
+
bun: bunShape,
|
|
4462
|
+
burst: burstShape,
|
|
4463
|
+
circle: circleShape,
|
|
4464
|
+
clamshell: clamshellShape,
|
|
4465
|
+
diamond: diamondShape,
|
|
4466
|
+
fan: rotate180(fanShape),
|
|
4467
|
+
flower: flowerShape,
|
|
4468
|
+
gem: flipV(gemShape),
|
|
4469
|
+
ghostish: flipV(ghostishShape),
|
|
4470
|
+
heart: flipV(heartShape),
|
|
4471
|
+
clover4Leaf: clover4LeafShape,
|
|
4472
|
+
clover8Leaf: clover8LeafShape,
|
|
4473
|
+
oval: flipV(ovalShape),
|
|
4474
|
+
pentagon: flipV(pentagonShape),
|
|
4475
|
+
pill: flipV(pillShape),
|
|
4476
|
+
pixelCircle: pixelCircleShape,
|
|
4477
|
+
pixelTriangle: pixelTriangleShape,
|
|
4478
|
+
puffyDiamond: puffyDiamondShape,
|
|
4479
|
+
puffy: puffyShape,
|
|
4480
|
+
semiCircle: flipV(semiCircleShape),
|
|
4481
|
+
cookie12Sided: cookie12SidedShape,
|
|
4482
|
+
cookie4Sided: cookie4SidedShape,
|
|
4483
|
+
cookie6Sided: cookie6SidedShape,
|
|
4484
|
+
cookie7Sided: cookie7SidedShape,
|
|
4485
|
+
cookie9Sided: cookie9SidedShape,
|
|
4486
|
+
slanted: flipV(slantedShape),
|
|
4487
|
+
softBoom: softBoomShape,
|
|
4488
|
+
softBurst: softBurstShape,
|
|
4489
|
+
square: squareShape,
|
|
4490
|
+
sunny: sunnyShape,
|
|
4491
|
+
triangle: flipV(triangleShape),
|
|
4492
|
+
verySunny: verySunnyShape
|
|
4493
|
+
};
|
|
4494
|
+
|
|
4495
|
+
// src/shapes/render/shape-rendering.ts
|
|
4496
|
+
function toSvgPath(cubics, width = 1, height = 1) {
|
|
4497
|
+
if (cubics.length === 0) return "";
|
|
4498
|
+
const paddingX = width * 0.015;
|
|
4499
|
+
const paddingY = height * 0.015;
|
|
4500
|
+
const sx = width - 2 * paddingX;
|
|
4501
|
+
const sy = height - 2 * paddingY;
|
|
4502
|
+
const flipY = (y) => paddingY + sy * (1 - y);
|
|
4503
|
+
const parts = [
|
|
4504
|
+
`M ${fmt(paddingX + cubics[0].anchor0X * sx)} ${fmt(flipY(cubics[0].anchor0Y))}`
|
|
4505
|
+
];
|
|
4506
|
+
for (const c of cubics) {
|
|
4507
|
+
parts.push(
|
|
4508
|
+
`C ${fmt(paddingX + c.control0X * sx)} ${fmt(flipY(c.control0Y))},${fmt(paddingX + c.control1X * sx)} ${fmt(flipY(c.control1Y))},${fmt(paddingX + c.anchor1X * sx)} ${fmt(flipY(c.anchor1Y))}`
|
|
4509
|
+
);
|
|
4510
|
+
}
|
|
4511
|
+
parts.push("Z");
|
|
4512
|
+
return parts.join(" ");
|
|
4513
|
+
}
|
|
4514
|
+
function toClipPath(polygon, width, height) {
|
|
4515
|
+
const pathData = toSvgPath(polygon.cubics, width, height);
|
|
4516
|
+
return `path('${pathData}')`;
|
|
4517
|
+
}
|
|
4518
|
+
function fmt(v) {
|
|
4519
|
+
return Number(v.toFixed(4)).toString();
|
|
4520
|
+
}
|
|
4521
|
+
|
|
4522
|
+
// src/ui/navigation/navigation-shape-utils.ts
|
|
4523
|
+
function getNavigationShapeStyle(shape, width = 56, height = 56) {
|
|
4524
|
+
if (!shape || shape === "pill" || shape === "circle") {
|
|
4525
|
+
return void 0;
|
|
4526
|
+
}
|
|
4527
|
+
const polygon = MD3Shapes[shape];
|
|
4528
|
+
if (!polygon) {
|
|
4529
|
+
return void 0;
|
|
4530
|
+
}
|
|
4531
|
+
return {
|
|
4532
|
+
clipPath: toClipPath(polygon, width, height)
|
|
4533
|
+
};
|
|
4534
|
+
}
|
|
4535
|
+
function isSquareShape(shape) {
|
|
4536
|
+
return Boolean(shape && shape !== "pill");
|
|
4537
|
+
}
|
|
4538
|
+
var NavigationBarContext = React37__namespace.createContext({ variant: "flexible" });
|
|
2630
4539
|
function cloneIconWithFill(icon, selected) {
|
|
2631
|
-
if (!
|
|
4540
|
+
if (!React37__namespace.isValidElement(icon)) return icon;
|
|
2632
4541
|
if (icon.type === Icon) {
|
|
2633
|
-
return
|
|
4542
|
+
return React37__namespace.cloneElement(
|
|
2634
4543
|
icon,
|
|
2635
4544
|
{ fill: selected ? 1 : 0, animateFill: true }
|
|
2636
4545
|
);
|
|
2637
4546
|
}
|
|
2638
4547
|
return icon;
|
|
2639
4548
|
}
|
|
2640
|
-
function ActivePill(
|
|
2641
|
-
|
|
4549
|
+
function ActivePill({
|
|
4550
|
+
shape = "pill",
|
|
4551
|
+
width = 56,
|
|
4552
|
+
height = 32
|
|
4553
|
+
}) {
|
|
4554
|
+
const { activeIndicatorTransition } = React37__namespace.useContext(NavigationBarContext);
|
|
4555
|
+
const shapeStyle = getNavigationShapeStyle(shape, width, height);
|
|
2642
4556
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2643
4557
|
react.m.div,
|
|
2644
4558
|
{
|
|
2645
|
-
className:
|
|
2646
|
-
|
|
2647
|
-
|
|
4559
|
+
className: cn(
|
|
4560
|
+
"bg-m3-secondary-container pointer-events-none",
|
|
4561
|
+
shapeStyle ? "absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 rounded-none" : shape === "circle" ? "absolute inset-0 rounded-full" : "absolute inset-0 rounded-full"
|
|
4562
|
+
),
|
|
4563
|
+
style: __spreadValues(__spreadValues({
|
|
2648
4564
|
zIndex: 0
|
|
2649
|
-
},
|
|
4565
|
+
}, shapeStyle ? { width, height } : {}), shapeStyle),
|
|
2650
4566
|
initial: { opacity: 0, scale: 0.5 },
|
|
2651
4567
|
animate: { opacity: 1, scale: 1 },
|
|
2652
4568
|
exit: { opacity: 0, scale: 0.5 },
|
|
@@ -2654,11 +4570,42 @@ function ActivePill() {
|
|
|
2654
4570
|
}
|
|
2655
4571
|
);
|
|
2656
4572
|
}
|
|
2657
|
-
function HoverStateLayer(
|
|
2658
|
-
|
|
4573
|
+
function HoverStateLayer({
|
|
4574
|
+
shape = "pill",
|
|
4575
|
+
width = 56,
|
|
4576
|
+
height = 32
|
|
4577
|
+
}) {
|
|
4578
|
+
const shapeStyle = getNavigationShapeStyle(shape, width, height);
|
|
4579
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
4580
|
+
"div",
|
|
4581
|
+
{
|
|
4582
|
+
className: cn(
|
|
4583
|
+
"bg-m3-on-surface opacity-0 group-hover:opacity-[0.08] group-focus-visible:opacity-[0.10] active:opacity-[0.10] transition-opacity duration-200 pointer-events-none z-0",
|
|
4584
|
+
shapeStyle ? "absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 rounded-none" : shape === "circle" ? "absolute inset-0 rounded-full" : "absolute inset-0 rounded-[16px]"
|
|
4585
|
+
),
|
|
4586
|
+
style: __spreadValues(__spreadValues({}, shapeStyle ? { width, height } : {}), shapeStyle)
|
|
4587
|
+
}
|
|
4588
|
+
);
|
|
2659
4589
|
}
|
|
2660
|
-
function RippleLayer({
|
|
2661
|
-
|
|
4590
|
+
function RippleLayer({
|
|
4591
|
+
ripples,
|
|
4592
|
+
onRippleDone,
|
|
4593
|
+
shape = "pill",
|
|
4594
|
+
width = 56,
|
|
4595
|
+
height = 32
|
|
4596
|
+
}) {
|
|
4597
|
+
const shapeStyle = getNavigationShapeStyle(shape, width, height);
|
|
4598
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
4599
|
+
"div",
|
|
4600
|
+
{
|
|
4601
|
+
className: cn(
|
|
4602
|
+
"overflow-hidden pointer-events-none z-0",
|
|
4603
|
+
shapeStyle ? "absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 rounded-none" : shape === "circle" ? "absolute inset-0 rounded-full" : "absolute inset-0 rounded-[16px]"
|
|
4604
|
+
),
|
|
4605
|
+
style: __spreadValues(__spreadValues({}, shapeStyle ? { width, height } : {}), shapeStyle),
|
|
4606
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(Ripple, { ripples, onRippleDone })
|
|
4607
|
+
}
|
|
4608
|
+
);
|
|
2662
4609
|
}
|
|
2663
4610
|
function IconContainer({ selected, badge, children }) {
|
|
2664
4611
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -2676,7 +4623,7 @@ function IconContainer({ selected, badge, children }) {
|
|
|
2676
4623
|
}
|
|
2677
4624
|
);
|
|
2678
4625
|
}
|
|
2679
|
-
var NavigationBarItemComponent =
|
|
4626
|
+
var NavigationBarItemComponent = React37__namespace.forwardRef(
|
|
2680
4627
|
({
|
|
2681
4628
|
selected,
|
|
2682
4629
|
icon,
|
|
@@ -2684,23 +4631,37 @@ var NavigationBarItemComponent = React36__namespace.forwardRef(
|
|
|
2684
4631
|
onClick,
|
|
2685
4632
|
disabled = false,
|
|
2686
4633
|
badge,
|
|
4634
|
+
shape: shapeProp,
|
|
4635
|
+
shapeSize: shapeSizeProp,
|
|
4636
|
+
hideLabel = false,
|
|
2687
4637
|
className,
|
|
2688
4638
|
"aria-label": ariaLabelProp,
|
|
2689
4639
|
asChild = false,
|
|
2690
4640
|
children
|
|
2691
4641
|
}, ref) => {
|
|
2692
|
-
var _a;
|
|
4642
|
+
var _a, _b, _c;
|
|
2693
4643
|
const {
|
|
2694
4644
|
variant,
|
|
2695
4645
|
itemLayout,
|
|
4646
|
+
shape: contextShape,
|
|
4647
|
+
labelVisibility: contextLabelVisibility,
|
|
4648
|
+
shapeSize: contextShapeSize,
|
|
2696
4649
|
itemClassName: contextItemClassName
|
|
2697
|
-
} =
|
|
4650
|
+
} = React37__namespace.useContext(NavigationBarContext);
|
|
4651
|
+
const activeShape = (_a = shapeProp != null ? shapeProp : contextShape) != null ? _a : "pill";
|
|
4652
|
+
const isSquare = isSquareShape(activeShape);
|
|
4653
|
+
const resolvedShapeSize = (_b = shapeSizeProp != null ? shapeSizeProp : contextShapeSize) != null ? _b : 56;
|
|
2698
4654
|
const isForcedHorizontal = itemLayout === "horizontal";
|
|
2699
4655
|
const isResponsiveHorizontal = (variant === "flexible" || variant === "xr") && itemLayout === void 0;
|
|
4656
|
+
const shouldShowLabel = !hideLabel && (() => {
|
|
4657
|
+
if (contextLabelVisibility === "unlabeled") return false;
|
|
4658
|
+
if (contextLabelVisibility === "auto") return selected;
|
|
4659
|
+
return true;
|
|
4660
|
+
})();
|
|
2700
4661
|
const { ripples, onPointerDown, removeRipple } = useRippleState({
|
|
2701
4662
|
disabled
|
|
2702
4663
|
});
|
|
2703
|
-
const handleClick =
|
|
4664
|
+
const handleClick = React37__namespace.useCallback(
|
|
2704
4665
|
(e) => {
|
|
2705
4666
|
if (disabled) {
|
|
2706
4667
|
e.preventDefault();
|
|
@@ -2724,8 +4685,10 @@ var NavigationBarItemComponent = React36__namespace.forwardRef(
|
|
|
2724
4685
|
contextItemClassName,
|
|
2725
4686
|
className
|
|
2726
4687
|
);
|
|
4688
|
+
const iconPillWidth = isSquare ? resolvedShapeSize : 56;
|
|
4689
|
+
const iconPillHeight = isSquare ? resolvedShapeSize : 32;
|
|
2727
4690
|
if (asChild && children) {
|
|
2728
|
-
const child =
|
|
4691
|
+
const child = React37__namespace.Children.only(children);
|
|
2729
4692
|
const innerContent = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
2730
4693
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
2731
4694
|
"div",
|
|
@@ -2733,10 +4696,12 @@ var NavigationBarItemComponent = React36__namespace.forwardRef(
|
|
|
2733
4696
|
className: cn(
|
|
2734
4697
|
"relative flex items-center justify-center flex-col gap-y-1 w-full px-1 py-1.5",
|
|
2735
4698
|
isResponsiveHorizontal && "min-[600px]:flex-row min-[600px]:gap-y-0 min-[600px]:gap-x-1.5 min-[600px]:h-10 min-[600px]:px-4 min-[600px]:py-0 min-[600px]:rounded-full min-[600px]:w-auto",
|
|
2736
|
-
isForcedHorizontal && "flex-row gap-y-0 gap-x-1.5 h-10 px-4 py-0 rounded-full w-auto"
|
|
4699
|
+
isForcedHorizontal && "flex-row gap-y-0 gap-x-1.5 h-10 px-4 py-0 rounded-full w-auto",
|
|
4700
|
+
// When label is hidden and not horizontal, remove bottom gap
|
|
4701
|
+
!shouldShowLabel && !isForcedHorizontal && "gap-y-0"
|
|
2737
4702
|
),
|
|
2738
4703
|
children: [
|
|
2739
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
4704
|
+
!isSquare && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2740
4705
|
"div",
|
|
2741
4706
|
{
|
|
2742
4707
|
className: cn(
|
|
@@ -2745,9 +4710,18 @@ var NavigationBarItemComponent = React36__namespace.forwardRef(
|
|
|
2745
4710
|
isForcedHorizontal && "block!"
|
|
2746
4711
|
),
|
|
2747
4712
|
children: [
|
|
2748
|
-
/* @__PURE__ */ jsxRuntime.jsx(react.AnimatePresence, { initial: false, children: selected && /* @__PURE__ */ jsxRuntime.jsx(ActivePill, {}) }),
|
|
2749
|
-
/* @__PURE__ */ jsxRuntime.jsx(HoverStateLayer, {}),
|
|
2750
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4713
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.AnimatePresence, { initial: false, children: selected && /* @__PURE__ */ jsxRuntime.jsx(ActivePill, { shape: activeShape, width: 56, height: 40 }) }),
|
|
4714
|
+
/* @__PURE__ */ jsxRuntime.jsx(HoverStateLayer, { shape: activeShape, width: 56, height: 40 }),
|
|
4715
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4716
|
+
RippleLayer,
|
|
4717
|
+
{
|
|
4718
|
+
ripples,
|
|
4719
|
+
onRippleDone: removeRipple,
|
|
4720
|
+
shape: activeShape,
|
|
4721
|
+
width: 56,
|
|
4722
|
+
height: 40
|
|
4723
|
+
}
|
|
4724
|
+
)
|
|
2751
4725
|
]
|
|
2752
4726
|
}
|
|
2753
4727
|
),
|
|
@@ -2756,23 +4730,47 @@ var NavigationBarItemComponent = React36__namespace.forwardRef(
|
|
|
2756
4730
|
{
|
|
2757
4731
|
className: cn(
|
|
2758
4732
|
"relative flex items-center justify-center shrink-0 z-10",
|
|
2759
|
-
"h-8 w-
|
|
2760
|
-
isResponsiveHorizontal && "min-[600px]:size-6 min-[600px]:w-auto min-[600px]:h-auto",
|
|
2761
|
-
isForcedHorizontal && "size-6 w-auto h-auto"
|
|
4733
|
+
isSquare ? "mx-auto" : "h-8 w-14 mx-auto rounded-[16px]",
|
|
4734
|
+
!isSquare && isResponsiveHorizontal && "min-[600px]:size-6 min-[600px]:w-auto min-[600px]:h-auto",
|
|
4735
|
+
!isSquare && isForcedHorizontal && "size-6 w-auto h-auto"
|
|
2762
4736
|
),
|
|
4737
|
+
style: isSquare ? { width: resolvedShapeSize, height: resolvedShapeSize } : void 0,
|
|
2763
4738
|
children: [
|
|
2764
4739
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
2765
4740
|
"div",
|
|
2766
4741
|
{
|
|
2767
4742
|
className: cn(
|
|
2768
4743
|
"absolute inset-0 z-0",
|
|
2769
|
-
isResponsiveHorizontal && "min-[600px]:hidden",
|
|
2770
|
-
isForcedHorizontal && "hidden"
|
|
4744
|
+
!isSquare && isResponsiveHorizontal && "min-[600px]:hidden",
|
|
4745
|
+
!isSquare && isForcedHorizontal && "hidden"
|
|
2771
4746
|
),
|
|
2772
4747
|
children: [
|
|
2773
|
-
/* @__PURE__ */ jsxRuntime.jsx(react.AnimatePresence, { initial: false, children: selected && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2774
|
-
|
|
2775
|
-
|
|
4748
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.AnimatePresence, { initial: false, children: selected && /* @__PURE__ */ jsxRuntime.jsx(
|
|
4749
|
+
ActivePill,
|
|
4750
|
+
{
|
|
4751
|
+
shape: activeShape,
|
|
4752
|
+
width: iconPillWidth,
|
|
4753
|
+
height: iconPillHeight
|
|
4754
|
+
}
|
|
4755
|
+
) }),
|
|
4756
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4757
|
+
HoverStateLayer,
|
|
4758
|
+
{
|
|
4759
|
+
shape: activeShape,
|
|
4760
|
+
width: iconPillWidth,
|
|
4761
|
+
height: iconPillHeight
|
|
4762
|
+
}
|
|
4763
|
+
),
|
|
4764
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4765
|
+
RippleLayer,
|
|
4766
|
+
{
|
|
4767
|
+
ripples,
|
|
4768
|
+
onRippleDone: removeRipple,
|
|
4769
|
+
shape: activeShape,
|
|
4770
|
+
width: iconPillWidth,
|
|
4771
|
+
height: iconPillHeight
|
|
4772
|
+
}
|
|
4773
|
+
)
|
|
2776
4774
|
]
|
|
2777
4775
|
}
|
|
2778
4776
|
),
|
|
@@ -2780,15 +4778,19 @@ var NavigationBarItemComponent = React36__namespace.forwardRef(
|
|
|
2780
4778
|
]
|
|
2781
4779
|
}
|
|
2782
4780
|
),
|
|
2783
|
-
/* @__PURE__ */ jsxRuntime.jsx(react.AnimatePresence, { mode: "popLayout", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2784
|
-
|
|
4781
|
+
label && /* @__PURE__ */ jsxRuntime.jsx(react.AnimatePresence, { mode: "popLayout", initial: false, children: shouldShowLabel && /* @__PURE__ */ jsxRuntime.jsx(
|
|
4782
|
+
react.m.span,
|
|
2785
4783
|
{
|
|
4784
|
+
initial: { opacity: 0, height: 0, scale: 0.85, y: -2 },
|
|
4785
|
+
animate: { opacity: 1, height: "auto", scale: 1, y: 0 },
|
|
4786
|
+
exit: { opacity: 0, height: 0, scale: 0.85, y: -2 },
|
|
4787
|
+
transition: SPRING_TRANSITION_EXPRESSIVE,
|
|
2786
4788
|
className: cn(
|
|
2787
|
-
"z-10 transition-
|
|
2788
|
-
selected ? "text-m3-on-surface" : "text-m3-on-surface-variant",
|
|
2789
|
-
"
|
|
4789
|
+
"z-10 transition-colors duration-200 truncate px-1 inline-block overflow-hidden",
|
|
4790
|
+
selected ? "text-m3-on-surface font-medium" : "text-m3-on-surface-variant font-medium",
|
|
4791
|
+
"text-[12px] leading-4 tracking-[0.5px]"
|
|
2790
4792
|
),
|
|
2791
|
-
children: (
|
|
4793
|
+
children: (_c = child.props.children) != null ? _c : label
|
|
2792
4794
|
},
|
|
2793
4795
|
"nav-label"
|
|
2794
4796
|
) })
|
|
@@ -2804,11 +4806,14 @@ var NavigationBarItemComponent = React36__namespace.forwardRef(
|
|
|
2804
4806
|
role: "menuitem",
|
|
2805
4807
|
"aria-current": selected ? "page" : void 0,
|
|
2806
4808
|
"aria-disabled": disabled ? true : void 0,
|
|
2807
|
-
"aria-label":
|
|
4809
|
+
"aria-label": (
|
|
4810
|
+
// Always provide aria-label even when label is visually hidden
|
|
4811
|
+
ariaLabelProp || (typeof label === "string" ? label : void 0)
|
|
4812
|
+
),
|
|
2808
4813
|
onClick: handleClick,
|
|
2809
4814
|
onPointerDown,
|
|
2810
4815
|
className: itemClassName,
|
|
2811
|
-
children:
|
|
4816
|
+
children: React37__namespace.cloneElement(child, { children: innerContent })
|
|
2812
4817
|
}
|
|
2813
4818
|
);
|
|
2814
4819
|
}
|
|
@@ -2820,7 +4825,10 @@ var NavigationBarItemComponent = React36__namespace.forwardRef(
|
|
|
2820
4825
|
role: "menuitem",
|
|
2821
4826
|
"aria-current": selected ? "page" : void 0,
|
|
2822
4827
|
"aria-disabled": disabled ? true : void 0,
|
|
2823
|
-
"aria-label":
|
|
4828
|
+
"aria-label": (
|
|
4829
|
+
// Always provide aria-label even when label is visually hidden
|
|
4830
|
+
ariaLabelProp || (typeof label === "string" ? label : void 0)
|
|
4831
|
+
),
|
|
2824
4832
|
onClick: handleClick,
|
|
2825
4833
|
onPointerDown,
|
|
2826
4834
|
className: itemClassName,
|
|
@@ -2831,10 +4839,12 @@ var NavigationBarItemComponent = React36__namespace.forwardRef(
|
|
|
2831
4839
|
className: cn(
|
|
2832
4840
|
"relative flex items-center justify-center flex-col gap-y-1 w-full px-1 py-1.5",
|
|
2833
4841
|
isResponsiveHorizontal && "min-[600px]:flex-row min-[600px]:gap-y-0 min-[600px]:gap-x-1.5 min-[600px]:h-10 min-[600px]:px-4 min-[600px]:py-0 min-[600px]:rounded-full min-[600px]:w-auto",
|
|
2834
|
-
isForcedHorizontal && "flex-row gap-y-0 gap-x-1.5 h-10 px-4 py-0 rounded-full w-auto"
|
|
4842
|
+
isForcedHorizontal && "flex-row gap-y-0 gap-x-1.5 h-10 px-4 py-0 rounded-full w-auto",
|
|
4843
|
+
// When label is hidden and not horizontal, remove bottom gap
|
|
4844
|
+
!shouldShowLabel && !isForcedHorizontal && "gap-y-0"
|
|
2835
4845
|
),
|
|
2836
4846
|
children: [
|
|
2837
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
4847
|
+
!isSquare && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2838
4848
|
"div",
|
|
2839
4849
|
{
|
|
2840
4850
|
className: cn(
|
|
@@ -2843,9 +4853,18 @@ var NavigationBarItemComponent = React36__namespace.forwardRef(
|
|
|
2843
4853
|
isForcedHorizontal && "block!"
|
|
2844
4854
|
),
|
|
2845
4855
|
children: [
|
|
2846
|
-
/* @__PURE__ */ jsxRuntime.jsx(react.AnimatePresence, { initial: false, children: selected && /* @__PURE__ */ jsxRuntime.jsx(ActivePill, {}) }),
|
|
2847
|
-
/* @__PURE__ */ jsxRuntime.jsx(HoverStateLayer, {}),
|
|
2848
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4856
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.AnimatePresence, { initial: false, children: selected && /* @__PURE__ */ jsxRuntime.jsx(ActivePill, { shape: activeShape, width: 56, height: 40 }) }),
|
|
4857
|
+
/* @__PURE__ */ jsxRuntime.jsx(HoverStateLayer, { shape: activeShape, width: 56, height: 40 }),
|
|
4858
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4859
|
+
RippleLayer,
|
|
4860
|
+
{
|
|
4861
|
+
ripples,
|
|
4862
|
+
onRippleDone: removeRipple,
|
|
4863
|
+
shape: activeShape,
|
|
4864
|
+
width: 56,
|
|
4865
|
+
height: 40
|
|
4866
|
+
}
|
|
4867
|
+
)
|
|
2849
4868
|
]
|
|
2850
4869
|
}
|
|
2851
4870
|
),
|
|
@@ -2854,23 +4873,47 @@ var NavigationBarItemComponent = React36__namespace.forwardRef(
|
|
|
2854
4873
|
{
|
|
2855
4874
|
className: cn(
|
|
2856
4875
|
"relative flex items-center justify-center shrink-0 z-10",
|
|
2857
|
-
"h-8 w-
|
|
2858
|
-
isResponsiveHorizontal && "min-[600px]:size-6 min-[600px]:w-auto min-[600px]:h-auto",
|
|
2859
|
-
isForcedHorizontal && "size-6 w-auto h-auto"
|
|
4876
|
+
isSquare ? "mx-auto" : "h-8 w-14 mx-auto rounded-[16px]",
|
|
4877
|
+
!isSquare && isResponsiveHorizontal && "min-[600px]:size-6 min-[600px]:w-auto min-[600px]:h-auto",
|
|
4878
|
+
!isSquare && isForcedHorizontal && "size-6 w-auto h-auto"
|
|
2860
4879
|
),
|
|
4880
|
+
style: isSquare ? { width: resolvedShapeSize, height: resolvedShapeSize } : void 0,
|
|
2861
4881
|
children: [
|
|
2862
4882
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
2863
4883
|
"div",
|
|
2864
4884
|
{
|
|
2865
4885
|
className: cn(
|
|
2866
4886
|
"absolute inset-0 z-0",
|
|
2867
|
-
isResponsiveHorizontal && "min-[600px]:hidden",
|
|
2868
|
-
isForcedHorizontal && "hidden"
|
|
4887
|
+
!isSquare && isResponsiveHorizontal && "min-[600px]:hidden",
|
|
4888
|
+
!isSquare && isForcedHorizontal && "hidden"
|
|
2869
4889
|
),
|
|
2870
4890
|
children: [
|
|
2871
|
-
/* @__PURE__ */ jsxRuntime.jsx(react.AnimatePresence, { initial: false, children: selected && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2872
|
-
|
|
2873
|
-
|
|
4891
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.AnimatePresence, { initial: false, children: selected && /* @__PURE__ */ jsxRuntime.jsx(
|
|
4892
|
+
ActivePill,
|
|
4893
|
+
{
|
|
4894
|
+
shape: activeShape,
|
|
4895
|
+
width: iconPillWidth,
|
|
4896
|
+
height: iconPillHeight
|
|
4897
|
+
}
|
|
4898
|
+
) }),
|
|
4899
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4900
|
+
HoverStateLayer,
|
|
4901
|
+
{
|
|
4902
|
+
shape: activeShape,
|
|
4903
|
+
width: iconPillWidth,
|
|
4904
|
+
height: iconPillHeight
|
|
4905
|
+
}
|
|
4906
|
+
),
|
|
4907
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4908
|
+
RippleLayer,
|
|
4909
|
+
{
|
|
4910
|
+
ripples,
|
|
4911
|
+
onRippleDone: removeRipple,
|
|
4912
|
+
shape: activeShape,
|
|
4913
|
+
width: iconPillWidth,
|
|
4914
|
+
height: iconPillHeight
|
|
4915
|
+
}
|
|
4916
|
+
)
|
|
2874
4917
|
]
|
|
2875
4918
|
}
|
|
2876
4919
|
),
|
|
@@ -2878,13 +4921,17 @@ var NavigationBarItemComponent = React36__namespace.forwardRef(
|
|
|
2878
4921
|
]
|
|
2879
4922
|
}
|
|
2880
4923
|
),
|
|
2881
|
-
/* @__PURE__ */ jsxRuntime.jsx(react.AnimatePresence, { mode: "popLayout", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2882
|
-
|
|
4924
|
+
label && /* @__PURE__ */ jsxRuntime.jsx(react.AnimatePresence, { mode: "popLayout", initial: false, children: shouldShowLabel && /* @__PURE__ */ jsxRuntime.jsx(
|
|
4925
|
+
react.m.span,
|
|
2883
4926
|
{
|
|
4927
|
+
initial: { opacity: 0, height: 0, scale: 0.85, y: -2 },
|
|
4928
|
+
animate: { opacity: 1, height: "auto", scale: 1, y: 0 },
|
|
4929
|
+
exit: { opacity: 0, height: 0, scale: 0.85, y: -2 },
|
|
4930
|
+
transition: SPRING_TRANSITION_EXPRESSIVE,
|
|
2884
4931
|
className: cn(
|
|
2885
|
-
"z-10 transition-
|
|
2886
|
-
selected ? "text-m3-on-surface" : "text-m3-on-surface-variant",
|
|
2887
|
-
"
|
|
4932
|
+
"z-10 transition-colors duration-200 truncate px-1 inline-block overflow-hidden",
|
|
4933
|
+
selected ? "text-m3-on-surface font-medium" : "text-m3-on-surface-variant font-medium",
|
|
4934
|
+
"text-[12px] leading-4 tracking-[0.5px]"
|
|
2888
4935
|
),
|
|
2889
4936
|
children: label
|
|
2890
4937
|
},
|
|
@@ -2900,15 +4947,15 @@ var NavigationBarItemComponent = React36__namespace.forwardRef(
|
|
|
2900
4947
|
}
|
|
2901
4948
|
);
|
|
2902
4949
|
NavigationBarItemComponent.displayName = "NavigationBarItem";
|
|
2903
|
-
var NavigationBarItem =
|
|
4950
|
+
var NavigationBarItem = React37__namespace.memo(NavigationBarItemComponent);
|
|
2904
4951
|
var navContainerVariants = classVarianceAuthority.cva(
|
|
2905
4952
|
"flex items-center justify-center select-none transition-transform duration-300 z-50",
|
|
2906
4953
|
{
|
|
2907
4954
|
variants: {
|
|
2908
4955
|
variant: {
|
|
2909
|
-
flexible: "bottom-0 left-0 right-0 w-full h-16 pb-safe",
|
|
2910
|
-
baseline: "bottom-0 left-0 right-0 w-full h-20 pb-safe",
|
|
2911
|
-
xr: "bottom-6 left-1/2 -translate-x-1/2 w-auto max-w-[calc(100%-2rem)] min-[600px]:max-w-fit h-20 min-[600px]:h-16 rounded-[48px] px-2"
|
|
4956
|
+
flexible: "bottom-0 left-0 right-0 w-full min-h-16 py-1 pb-safe",
|
|
4957
|
+
baseline: "bottom-0 left-0 right-0 w-full min-h-20 py-1 pb-safe",
|
|
4958
|
+
xr: "bottom-6 left-1/2 -translate-x-1/2 w-auto max-w-[calc(100%-2rem)] min-[600px]:max-w-fit min-h-20 min-[600px]:min-h-16 rounded-[48px] px-2 py-1"
|
|
2912
4959
|
},
|
|
2913
4960
|
position: {
|
|
2914
4961
|
fixed: "fixed",
|
|
@@ -2926,10 +4973,13 @@ var navContainerVariants = classVarianceAuthority.cva(
|
|
|
2926
4973
|
}
|
|
2927
4974
|
}
|
|
2928
4975
|
);
|
|
2929
|
-
var NavigationBarComponent =
|
|
4976
|
+
var NavigationBarComponent = React37__namespace.forwardRef(
|
|
2930
4977
|
({
|
|
2931
4978
|
variant = "flexible",
|
|
2932
4979
|
itemLayout,
|
|
4980
|
+
shape,
|
|
4981
|
+
labelVisibility,
|
|
4982
|
+
shapeSize,
|
|
2933
4983
|
hideOnScroll = false,
|
|
2934
4984
|
elevated = false,
|
|
2935
4985
|
fixed = true,
|
|
@@ -2940,11 +4990,18 @@ var NavigationBarComponent = React36__namespace.forwardRef(
|
|
|
2940
4990
|
className,
|
|
2941
4991
|
style
|
|
2942
4992
|
}, ref) => {
|
|
2943
|
-
const [isVisible, setIsVisible] =
|
|
2944
|
-
const lastScrollY =
|
|
4993
|
+
const [isVisible, setIsVisible] = React37__namespace.useState(true);
|
|
4994
|
+
const lastScrollY = React37__namespace.useRef(
|
|
2945
4995
|
typeof window !== "undefined" ? window.scrollY : 0
|
|
2946
4996
|
);
|
|
2947
|
-
|
|
4997
|
+
const isSquare = isSquareShape(shape);
|
|
4998
|
+
const effectiveShapeSize = shapeSize != null ? shapeSize : isSquare ? 56 : 32;
|
|
4999
|
+
const computedMinHeight = React37__namespace.useMemo(() => {
|
|
5000
|
+
const baseHeight = variant === "baseline" ? 80 : 64;
|
|
5001
|
+
const requiredHeight = itemLayout === "horizontal" || labelVisibility === "unlabeled" ? effectiveShapeSize + 16 : effectiveShapeSize + 32;
|
|
5002
|
+
return Math.max(baseHeight, requiredHeight);
|
|
5003
|
+
}, [variant, itemLayout, labelVisibility, effectiveShapeSize]);
|
|
5004
|
+
React37__namespace.useEffect(() => {
|
|
2948
5005
|
if (typeof window === "undefined" || !hideOnScroll) {
|
|
2949
5006
|
setIsVisible(true);
|
|
2950
5007
|
return;
|
|
@@ -2990,6 +5047,9 @@ var NavigationBarComponent = React36__namespace.forwardRef(
|
|
|
2990
5047
|
value: {
|
|
2991
5048
|
variant,
|
|
2992
5049
|
itemLayout,
|
|
5050
|
+
shape,
|
|
5051
|
+
labelVisibility,
|
|
5052
|
+
shapeSize,
|
|
2993
5053
|
activeIndicatorTransition,
|
|
2994
5054
|
itemClassName
|
|
2995
5055
|
},
|
|
@@ -3000,7 +5060,7 @@ var NavigationBarComponent = React36__namespace.forwardRef(
|
|
|
3000
5060
|
role: "navigation",
|
|
3001
5061
|
"aria-label": "Main navigation",
|
|
3002
5062
|
className: navBaseClasses,
|
|
3003
|
-
style,
|
|
5063
|
+
style: __spreadValues({ minHeight: computedMinHeight }, style),
|
|
3004
5064
|
initial: false,
|
|
3005
5065
|
animate: {
|
|
3006
5066
|
y: isVisible ? "0%" : variant === "xr" ? "calc(100% + 40px)" : "100%"
|
|
@@ -3012,8 +5072,8 @@ var NavigationBarComponent = React36__namespace.forwardRef(
|
|
|
3012
5072
|
role: "menubar",
|
|
3013
5073
|
"aria-orientation": "horizontal",
|
|
3014
5074
|
className: cn(
|
|
3015
|
-
"flex w-full h-full mx-auto",
|
|
3016
|
-
variant === "xr" ? "gap-0 min-[600px]:gap-1.5
|
|
5075
|
+
"flex w-full h-full mx-auto items-center justify-center",
|
|
5076
|
+
variant === "xr" ? "gap-0 min-[600px]:gap-1.5 px-1" : "max-w-7xl gap-1.5"
|
|
3017
5077
|
),
|
|
3018
5078
|
children
|
|
3019
5079
|
}
|
|
@@ -3025,8 +5085,12 @@ var NavigationBarComponent = React36__namespace.forwardRef(
|
|
|
3025
5085
|
}
|
|
3026
5086
|
);
|
|
3027
5087
|
NavigationBarComponent.displayName = "NavigationBar";
|
|
3028
|
-
var NavigationBar =
|
|
3029
|
-
var NavigationRailContext =
|
|
5088
|
+
var NavigationBar = React37__namespace.memo(NavigationBarComponent);
|
|
5089
|
+
var NavigationRailContext = React37__namespace.createContext({
|
|
5090
|
+
variant: "collapsed",
|
|
5091
|
+
labelVisibility: "labeled",
|
|
5092
|
+
activeIndicatorWidth: "hug"
|
|
5093
|
+
});
|
|
3030
5094
|
var MD3_MODAL_TRANSITION = {
|
|
3031
5095
|
type: "tween",
|
|
3032
5096
|
ease: [0.05, 0.7, 0.1, 1],
|
|
@@ -3037,9 +5101,9 @@ var railContainerVariants = classVarianceAuthority.cva(
|
|
|
3037
5101
|
{
|
|
3038
5102
|
variants: {
|
|
3039
5103
|
variant: {
|
|
3040
|
-
collapsed: "items-center h-full pt-11 pb-
|
|
3041
|
-
expanded: "items-start h-full pt-11 pb-
|
|
3042
|
-
modal: "bg-m3-surface shadow-lg rounded-r-[var(--m3-shape-corner-large)] h-full pt-11 pb-
|
|
5104
|
+
collapsed: "items-center h-full pt-11 pb-14 shadow-none bg-m3-surface rounded-none",
|
|
5105
|
+
expanded: "items-start h-full pt-11 pb-14 shadow-none bg-m3-surface rounded-none",
|
|
5106
|
+
modal: "bg-m3-surface shadow-lg rounded-r-[var(--m3-shape-corner-large)] h-full pt-11 pb-14",
|
|
3043
5107
|
xr: "h-fit py-5 rounded-[48px] shadow-xl bg-m3-surface border border-white/5"
|
|
3044
5108
|
},
|
|
3045
5109
|
narrow: {
|
|
@@ -3058,9 +5122,9 @@ var railContainerVariants = classVarianceAuthority.cva(
|
|
|
3058
5122
|
}
|
|
3059
5123
|
);
|
|
3060
5124
|
function cloneIconWithFill2(icon, selected) {
|
|
3061
|
-
if (!
|
|
5125
|
+
if (!React37__namespace.isValidElement(icon)) return icon;
|
|
3062
5126
|
if (icon.type === Icon) {
|
|
3063
|
-
return
|
|
5127
|
+
return React37__namespace.cloneElement(
|
|
3064
5128
|
icon,
|
|
3065
5129
|
{ fill: selected ? 1 : 0, animateFill: true }
|
|
3066
5130
|
);
|
|
@@ -3082,14 +5146,28 @@ function setFocusedItem(items, index) {
|
|
|
3082
5146
|
target.focus();
|
|
3083
5147
|
}
|
|
3084
5148
|
}
|
|
3085
|
-
function ActivePill2({
|
|
3086
|
-
|
|
5149
|
+
function ActivePill2({
|
|
5150
|
+
layoutId,
|
|
5151
|
+
disableInitial = false,
|
|
5152
|
+
shape = "pill",
|
|
5153
|
+
width = 56,
|
|
5154
|
+
height = 32
|
|
5155
|
+
}) {
|
|
5156
|
+
const { activeIndicatorTransition } = React37__namespace.useContext(NavigationRailContext);
|
|
5157
|
+
const shapeStyle = getNavigationShapeStyle(shape, width, height);
|
|
3087
5158
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3088
5159
|
react.m.div,
|
|
3089
5160
|
{
|
|
3090
5161
|
layoutId,
|
|
3091
|
-
className:
|
|
3092
|
-
|
|
5162
|
+
className: cn(
|
|
5163
|
+
"bg-m3-secondary-container pointer-events-none",
|
|
5164
|
+
shapeStyle ? "absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 rounded-none" : "absolute inset-0 rounded-full"
|
|
5165
|
+
),
|
|
5166
|
+
style: __spreadValues(__spreadValues({
|
|
5167
|
+
zIndex: 0,
|
|
5168
|
+
originX: 0.5,
|
|
5169
|
+
originY: 0.5
|
|
5170
|
+
}, shapeStyle ? { width, height } : {}), shapeStyle),
|
|
3093
5171
|
initial: disableInitial ? false : { opacity: 0, scale: 0.5 },
|
|
3094
5172
|
animate: { opacity: 1, scale: 1 },
|
|
3095
5173
|
exit: { opacity: 0, scale: 0.5, transition: { duration: 0.15 } },
|
|
@@ -3097,11 +5175,42 @@ function ActivePill2({ layoutId, disableInitial = false }) {
|
|
|
3097
5175
|
}
|
|
3098
5176
|
);
|
|
3099
5177
|
}
|
|
3100
|
-
function HoverStateLayer2(
|
|
3101
|
-
|
|
5178
|
+
function HoverStateLayer2({
|
|
5179
|
+
shape = "pill",
|
|
5180
|
+
width = 56,
|
|
5181
|
+
height = 32
|
|
5182
|
+
}) {
|
|
5183
|
+
const shapeStyle = getNavigationShapeStyle(shape, width, height);
|
|
5184
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
5185
|
+
"div",
|
|
5186
|
+
{
|
|
5187
|
+
className: cn(
|
|
5188
|
+
"bg-m3-on-surface opacity-0 group-hover:opacity-[0.08] transition-opacity duration-200 pointer-events-none z-0",
|
|
5189
|
+
shapeStyle ? "absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 rounded-none" : "absolute inset-0 rounded-full"
|
|
5190
|
+
),
|
|
5191
|
+
style: __spreadValues(__spreadValues({}, shapeStyle ? { width, height } : {}), shapeStyle)
|
|
5192
|
+
}
|
|
5193
|
+
);
|
|
3102
5194
|
}
|
|
3103
|
-
function RippleLayer2({
|
|
3104
|
-
|
|
5195
|
+
function RippleLayer2({
|
|
5196
|
+
ripples,
|
|
5197
|
+
onRippleDone,
|
|
5198
|
+
shape = "pill",
|
|
5199
|
+
width = 56,
|
|
5200
|
+
height = 32
|
|
5201
|
+
}) {
|
|
5202
|
+
const shapeStyle = getNavigationShapeStyle(shape, width, height);
|
|
5203
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
5204
|
+
"div",
|
|
5205
|
+
{
|
|
5206
|
+
className: cn(
|
|
5207
|
+
"overflow-hidden pointer-events-none z-0",
|
|
5208
|
+
shapeStyle ? "absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 rounded-none" : "absolute inset-0 rounded-full"
|
|
5209
|
+
),
|
|
5210
|
+
style: __spreadValues(__spreadValues({}, shapeStyle ? { width, height } : {}), shapeStyle),
|
|
5211
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(Ripple, { ripples, onRippleDone })
|
|
5212
|
+
}
|
|
5213
|
+
);
|
|
3105
5214
|
}
|
|
3106
5215
|
function IconContainer2({ selected, badge, children }) {
|
|
3107
5216
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -3119,7 +5228,7 @@ function IconContainer2({ selected, badge, children }) {
|
|
|
3119
5228
|
}
|
|
3120
5229
|
);
|
|
3121
5230
|
}
|
|
3122
|
-
var NavigationRailItemComponent =
|
|
5231
|
+
var NavigationRailItemComponent = React37__namespace.forwardRef(
|
|
3123
5232
|
({
|
|
3124
5233
|
selected,
|
|
3125
5234
|
icon,
|
|
@@ -3127,24 +5236,37 @@ var NavigationRailItemComponent = React36__namespace.forwardRef(
|
|
|
3127
5236
|
onClick,
|
|
3128
5237
|
disabled = false,
|
|
3129
5238
|
badge,
|
|
5239
|
+
shape: shapeProp,
|
|
5240
|
+
shapeSize: shapeSizeProp,
|
|
5241
|
+
activeIndicatorWidth: activeIndicatorWidthProp,
|
|
3130
5242
|
className,
|
|
3131
5243
|
"aria-label": ariaLabelProp,
|
|
3132
5244
|
asChild = false,
|
|
3133
5245
|
children
|
|
3134
5246
|
}, ref) => {
|
|
3135
|
-
var _a;
|
|
3136
|
-
const {
|
|
3137
|
-
|
|
3138
|
-
|
|
5247
|
+
var _a, _b, _c, _d;
|
|
5248
|
+
const {
|
|
5249
|
+
variant,
|
|
5250
|
+
labelVisibility,
|
|
5251
|
+
shape: contextShape,
|
|
5252
|
+
shapeSize: contextShapeSize,
|
|
5253
|
+
activeIndicatorWidth: contextActiveIndicatorWidth
|
|
5254
|
+
} = React37__namespace.useContext(NavigationRailContext);
|
|
5255
|
+
const activeShape = (_a = shapeProp != null ? shapeProp : contextShape) != null ? _a : "pill";
|
|
5256
|
+
const isSquare = isSquareShape(activeShape);
|
|
5257
|
+
const resolvedShapeSize = (_b = shapeSizeProp != null ? shapeSizeProp : contextShapeSize) != null ? _b : 56;
|
|
5258
|
+
const activeIndicatorWidth = (_c = activeIndicatorWidthProp != null ? activeIndicatorWidthProp : contextActiveIndicatorWidth) != null ? _c : "hug";
|
|
3139
5259
|
const isExpanded = variant === "expanded" || variant === "modal";
|
|
3140
5260
|
const isModal = variant === "modal";
|
|
3141
5261
|
const enableLayout = !isModal;
|
|
3142
|
-
const
|
|
5262
|
+
const isExpandedPill = isExpanded && !isSquare;
|
|
5263
|
+
const expandedPillWidthClass = activeIndicatorWidth === "fill" ? "w-full" : "w-fit";
|
|
5264
|
+
const activePillId = `rail-pill-${React37__namespace.useId()}`;
|
|
3143
5265
|
const { ripples, onPointerDown, removeRipple } = useRippleState({
|
|
3144
5266
|
disabled
|
|
3145
5267
|
});
|
|
3146
5268
|
const showLabel = isExpanded || labelVisibility === "labeled" || labelVisibility === "auto" && selected;
|
|
3147
|
-
const handleClick =
|
|
5269
|
+
const handleClick = React37__namespace.useCallback(
|
|
3148
5270
|
(e) => {
|
|
3149
5271
|
if (disabled) {
|
|
3150
5272
|
e.preventDefault();
|
|
@@ -3163,8 +5285,10 @@ var NavigationRailItemComponent = React36__namespace.forwardRef(
|
|
|
3163
5285
|
isExpanded ? "w-full flex-row items-center px-3 h-14" : "w-full flex-col justify-center h-14",
|
|
3164
5286
|
className
|
|
3165
5287
|
);
|
|
5288
|
+
const iconPillWidth = isSquare ? resolvedShapeSize : 56;
|
|
5289
|
+
const iconPillHeight = isSquare ? resolvedShapeSize : 32;
|
|
3166
5290
|
if (asChild && children) {
|
|
3167
|
-
const child =
|
|
5291
|
+
const child = React37__namespace.Children.only(children);
|
|
3168
5292
|
const innerContent = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
3169
5293
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
3170
5294
|
react.m.div,
|
|
@@ -3172,31 +5296,71 @@ var NavigationRailItemComponent = React36__namespace.forwardRef(
|
|
|
3172
5296
|
layout: enableLayout,
|
|
3173
5297
|
className: cn(
|
|
3174
5298
|
"relative flex z-10",
|
|
3175
|
-
isExpanded ?
|
|
5299
|
+
isExpanded ? cn(
|
|
5300
|
+
"flex-row items-center h-14 px-4 gap-x-3 rounded-full",
|
|
5301
|
+
expandedPillWidthClass
|
|
5302
|
+
) : "flex-col items-center justify-center w-full gap-y-1 rounded-full"
|
|
3176
5303
|
),
|
|
3177
5304
|
children: [
|
|
3178
|
-
|
|
3179
|
-
|
|
3180
|
-
|
|
3181
|
-
|
|
3182
|
-
|
|
3183
|
-
|
|
3184
|
-
|
|
3185
|
-
|
|
3186
|
-
|
|
5305
|
+
isExpandedPill && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
5306
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.AnimatePresence, { initial: false, children: selected && /* @__PURE__ */ jsxRuntime.jsx(
|
|
5307
|
+
ActivePill2,
|
|
5308
|
+
{
|
|
5309
|
+
layoutId: activePillId,
|
|
5310
|
+
disableInitial: isModal,
|
|
5311
|
+
shape: activeShape
|
|
5312
|
+
}
|
|
5313
|
+
) }),
|
|
5314
|
+
/* @__PURE__ */ jsxRuntime.jsx(HoverStateLayer2, { shape: activeShape }),
|
|
5315
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5316
|
+
RippleLayer2,
|
|
5317
|
+
{
|
|
5318
|
+
ripples,
|
|
5319
|
+
onRippleDone: removeRipple,
|
|
5320
|
+
shape: activeShape
|
|
5321
|
+
}
|
|
5322
|
+
)
|
|
5323
|
+
] }),
|
|
3187
5324
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
3188
5325
|
react.m.div,
|
|
3189
5326
|
{
|
|
3190
5327
|
layout: enableLayout,
|
|
3191
5328
|
className: cn(
|
|
3192
5329
|
"relative flex items-center justify-center shrink-0 z-10",
|
|
3193
|
-
|
|
5330
|
+
isSquare ? "mx-auto" : isExpandedPill ? "size-6" : "h-8 w-14 mx-auto rounded-full"
|
|
3194
5331
|
),
|
|
3195
|
-
style: {
|
|
5332
|
+
style: isSquare ? { width: resolvedShapeSize, height: resolvedShapeSize } : void 0,
|
|
3196
5333
|
children: [
|
|
3197
|
-
!
|
|
3198
|
-
|
|
3199
|
-
|
|
5334
|
+
!isExpandedPill && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
5335
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.AnimatePresence, { initial: false, children: selected && /* @__PURE__ */ jsxRuntime.jsx(
|
|
5336
|
+
ActivePill2,
|
|
5337
|
+
{
|
|
5338
|
+
layoutId: activePillId,
|
|
5339
|
+
disableInitial: isModal,
|
|
5340
|
+
shape: activeShape,
|
|
5341
|
+
width: iconPillWidth,
|
|
5342
|
+
height: iconPillHeight
|
|
5343
|
+
}
|
|
5344
|
+
) }),
|
|
5345
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5346
|
+
HoverStateLayer2,
|
|
5347
|
+
{
|
|
5348
|
+
shape: activeShape,
|
|
5349
|
+
width: iconPillWidth,
|
|
5350
|
+
height: iconPillHeight
|
|
5351
|
+
}
|
|
5352
|
+
),
|
|
5353
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5354
|
+
RippleLayer2,
|
|
5355
|
+
{
|
|
5356
|
+
ripples,
|
|
5357
|
+
onRippleDone: removeRipple,
|
|
5358
|
+
shape: activeShape,
|
|
5359
|
+
width: iconPillWidth,
|
|
5360
|
+
height: iconPillHeight
|
|
5361
|
+
}
|
|
5362
|
+
)
|
|
5363
|
+
] }),
|
|
3200
5364
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3201
5365
|
react.m.div,
|
|
3202
5366
|
{
|
|
@@ -3218,10 +5382,10 @@ var NavigationRailItemComponent = React36__namespace.forwardRef(
|
|
|
3218
5382
|
transition: SPRING_TRANSITION,
|
|
3219
5383
|
className: cn(
|
|
3220
5384
|
"z-10 transition-colors duration-200 whitespace-nowrap",
|
|
3221
|
-
selected ? "text-m3-on-surface" : "text-m3-on-surface-variant",
|
|
3222
|
-
isExpanded ? "text-sm
|
|
5385
|
+
selected ? isExpandedPill ? "text-m3-on-secondary-container font-medium" : "text-m3-on-surface font-medium" : "text-m3-on-surface-variant font-medium",
|
|
5386
|
+
isExpanded ? "text-sm tracking-wide text-left" : "text-xs tracking-wide"
|
|
3223
5387
|
),
|
|
3224
|
-
children: (
|
|
5388
|
+
children: (_d = child.props.children) != null ? _d : label
|
|
3225
5389
|
},
|
|
3226
5390
|
"rail-label"
|
|
3227
5391
|
) })
|
|
@@ -3242,7 +5406,7 @@ var NavigationRailItemComponent = React36__namespace.forwardRef(
|
|
|
3242
5406
|
onPointerDown,
|
|
3243
5407
|
className: itemClassName,
|
|
3244
5408
|
tabIndex: -1,
|
|
3245
|
-
children:
|
|
5409
|
+
children: React37__namespace.cloneElement(child, { children: innerContent })
|
|
3246
5410
|
}
|
|
3247
5411
|
) });
|
|
3248
5412
|
}
|
|
@@ -3267,31 +5431,71 @@ var NavigationRailItemComponent = React36__namespace.forwardRef(
|
|
|
3267
5431
|
layout: enableLayout,
|
|
3268
5432
|
className: cn(
|
|
3269
5433
|
"relative flex z-10",
|
|
3270
|
-
isExpanded ?
|
|
5434
|
+
isExpanded ? cn(
|
|
5435
|
+
"flex-row items-center h-14 px-4 gap-x-3 rounded-full",
|
|
5436
|
+
expandedPillWidthClass
|
|
5437
|
+
) : "flex-col items-center justify-center w-full gap-y-1 rounded-full"
|
|
3271
5438
|
),
|
|
3272
5439
|
children: [
|
|
3273
|
-
|
|
3274
|
-
|
|
3275
|
-
|
|
3276
|
-
|
|
3277
|
-
|
|
3278
|
-
|
|
3279
|
-
|
|
3280
|
-
|
|
3281
|
-
|
|
5440
|
+
isExpandedPill && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
5441
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.AnimatePresence, { initial: false, children: selected && /* @__PURE__ */ jsxRuntime.jsx(
|
|
5442
|
+
ActivePill2,
|
|
5443
|
+
{
|
|
5444
|
+
layoutId: activePillId,
|
|
5445
|
+
disableInitial: isModal,
|
|
5446
|
+
shape: activeShape
|
|
5447
|
+
}
|
|
5448
|
+
) }),
|
|
5449
|
+
/* @__PURE__ */ jsxRuntime.jsx(HoverStateLayer2, { shape: activeShape }),
|
|
5450
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5451
|
+
RippleLayer2,
|
|
5452
|
+
{
|
|
5453
|
+
ripples,
|
|
5454
|
+
onRippleDone: removeRipple,
|
|
5455
|
+
shape: activeShape
|
|
5456
|
+
}
|
|
5457
|
+
)
|
|
5458
|
+
] }),
|
|
3282
5459
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
3283
5460
|
react.m.div,
|
|
3284
5461
|
{
|
|
3285
5462
|
layout: enableLayout,
|
|
3286
5463
|
className: cn(
|
|
3287
5464
|
"relative flex items-center justify-center shrink-0 z-10",
|
|
3288
|
-
|
|
5465
|
+
isSquare ? "mx-auto" : isExpandedPill ? "size-6" : "h-8 w-14 mx-auto rounded-full"
|
|
3289
5466
|
),
|
|
3290
|
-
style: {
|
|
5467
|
+
style: isSquare ? { width: resolvedShapeSize, height: resolvedShapeSize } : void 0,
|
|
3291
5468
|
children: [
|
|
3292
|
-
!
|
|
3293
|
-
|
|
3294
|
-
|
|
5469
|
+
!isExpandedPill && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
5470
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.AnimatePresence, { initial: false, children: selected && /* @__PURE__ */ jsxRuntime.jsx(
|
|
5471
|
+
ActivePill2,
|
|
5472
|
+
{
|
|
5473
|
+
layoutId: activePillId,
|
|
5474
|
+
disableInitial: isModal,
|
|
5475
|
+
shape: activeShape,
|
|
5476
|
+
width: iconPillWidth,
|
|
5477
|
+
height: iconPillHeight
|
|
5478
|
+
}
|
|
5479
|
+
) }),
|
|
5480
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5481
|
+
HoverStateLayer2,
|
|
5482
|
+
{
|
|
5483
|
+
shape: activeShape,
|
|
5484
|
+
width: iconPillWidth,
|
|
5485
|
+
height: iconPillHeight
|
|
5486
|
+
}
|
|
5487
|
+
),
|
|
5488
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5489
|
+
RippleLayer2,
|
|
5490
|
+
{
|
|
5491
|
+
ripples,
|
|
5492
|
+
onRippleDone: removeRipple,
|
|
5493
|
+
shape: activeShape,
|
|
5494
|
+
width: iconPillWidth,
|
|
5495
|
+
height: iconPillHeight
|
|
5496
|
+
}
|
|
5497
|
+
)
|
|
5498
|
+
] }),
|
|
3295
5499
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3296
5500
|
react.m.div,
|
|
3297
5501
|
{
|
|
@@ -3313,8 +5517,8 @@ var NavigationRailItemComponent = React36__namespace.forwardRef(
|
|
|
3313
5517
|
transition: SPRING_TRANSITION,
|
|
3314
5518
|
className: cn(
|
|
3315
5519
|
"z-10 transition-colors duration-200 whitespace-nowrap",
|
|
3316
|
-
selected ? "text-m3-on-surface" : "text-m3-on-surface-variant",
|
|
3317
|
-
isExpanded ? "text-sm
|
|
5520
|
+
selected ? isExpandedPill ? "text-m3-on-secondary-container font-medium" : "text-m3-on-surface font-medium" : "text-m3-on-surface-variant font-medium",
|
|
5521
|
+
isExpanded ? "text-sm tracking-wide text-left" : "text-xs tracking-wide"
|
|
3318
5522
|
),
|
|
3319
5523
|
children: label
|
|
3320
5524
|
},
|
|
@@ -3330,9 +5534,9 @@ var NavigationRailItemComponent = React36__namespace.forwardRef(
|
|
|
3330
5534
|
}
|
|
3331
5535
|
);
|
|
3332
5536
|
NavigationRailItemComponent.displayName = "NavigationRailItem";
|
|
3333
|
-
var NavigationRailItem =
|
|
5537
|
+
var NavigationRailItem = React37__namespace.memo(NavigationRailItemComponent);
|
|
3334
5538
|
function useRoving(navRef) {
|
|
3335
|
-
|
|
5539
|
+
React37__namespace.useEffect(() => {
|
|
3336
5540
|
if (!navRef.current) return;
|
|
3337
5541
|
const items = getMenuItems(navRef.current);
|
|
3338
5542
|
const selected = items.find(
|
|
@@ -3342,7 +5546,7 @@ function useRoving(navRef) {
|
|
|
3342
5546
|
const firstFocusable = selected != null ? selected : items[0];
|
|
3343
5547
|
if (firstFocusable) firstFocusable.tabIndex = 0;
|
|
3344
5548
|
}, [navRef]);
|
|
3345
|
-
return
|
|
5549
|
+
return React37__namespace.useCallback(
|
|
3346
5550
|
(e) => {
|
|
3347
5551
|
if (!navRef.current) return;
|
|
3348
5552
|
const items = getMenuItems(navRef.current);
|
|
@@ -3370,10 +5574,13 @@ function useRoving(navRef) {
|
|
|
3370
5574
|
[navRef]
|
|
3371
5575
|
);
|
|
3372
5576
|
}
|
|
3373
|
-
var NavigationRailComponent =
|
|
5577
|
+
var NavigationRailComponent = React37__namespace.forwardRef(
|
|
3374
5578
|
({
|
|
3375
5579
|
variant = "collapsed",
|
|
3376
5580
|
labelVisibility = "labeled",
|
|
5581
|
+
shape,
|
|
5582
|
+
shapeSize,
|
|
5583
|
+
activeIndicatorWidth = "hug",
|
|
3377
5584
|
header,
|
|
3378
5585
|
fab,
|
|
3379
5586
|
fabPlacement = "contained",
|
|
@@ -3387,12 +5594,13 @@ var NavigationRailComponent = React36__namespace.forwardRef(
|
|
|
3387
5594
|
style
|
|
3388
5595
|
}, ref) => {
|
|
3389
5596
|
const isModal = variant === "modal";
|
|
5597
|
+
const isExpanded = variant === "expanded" || variant === "modal";
|
|
3390
5598
|
const isXr = variant === "xr";
|
|
3391
5599
|
const isSpatial = isXr && fabPlacement === "spatialized";
|
|
3392
5600
|
const applyAnimation = !isXr || !isSpatial;
|
|
3393
|
-
const navRef =
|
|
5601
|
+
const navRef = React37__namespace.useRef(null);
|
|
3394
5602
|
const handleKeyDown = useRoving(navRef);
|
|
3395
|
-
const setRefs =
|
|
5603
|
+
const setRefs = React37__namespace.useCallback(
|
|
3396
5604
|
(node) => {
|
|
3397
5605
|
navRef.current = node;
|
|
3398
5606
|
if (typeof ref === "function") ref(node);
|
|
@@ -3428,10 +5636,12 @@ var NavigationRailComponent = React36__namespace.forwardRef(
|
|
|
3428
5636
|
transition: isModal ? MD3_MODAL_TRANSITION : SPRING_TRANSITION,
|
|
3429
5637
|
children: [
|
|
3430
5638
|
(header || fab && !isSpatial) && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3431
|
-
|
|
5639
|
+
react.m.div,
|
|
3432
5640
|
{
|
|
5641
|
+
layout: true,
|
|
3433
5642
|
className: cn(
|
|
3434
|
-
"flex w-full flex-col
|
|
5643
|
+
"flex w-full flex-col justify-start shrink-0 empty:hidden",
|
|
5644
|
+
isExpanded ? "items-start px-3" : "items-center",
|
|
3435
5645
|
navHeaderSpacing
|
|
3436
5646
|
),
|
|
3437
5647
|
children: [
|
|
@@ -3483,7 +5693,7 @@ var NavigationRailComponent = React36__namespace.forwardRef(
|
|
|
3483
5693
|
children: fab
|
|
3484
5694
|
}
|
|
3485
5695
|
),
|
|
3486
|
-
|
|
5696
|
+
React37__namespace.cloneElement(
|
|
3487
5697
|
navElement,
|
|
3488
5698
|
{
|
|
3489
5699
|
className: cn(navBaseClasses, "pointer-events-auto")
|
|
@@ -3497,6 +5707,9 @@ var NavigationRailComponent = React36__namespace.forwardRef(
|
|
|
3497
5707
|
const contextValue = {
|
|
3498
5708
|
variant,
|
|
3499
5709
|
labelVisibility,
|
|
5710
|
+
shape,
|
|
5711
|
+
shapeSize,
|
|
5712
|
+
activeIndicatorWidth,
|
|
3500
5713
|
activeIndicatorTransition
|
|
3501
5714
|
};
|
|
3502
5715
|
if (isModal) {
|
|
@@ -3525,7 +5738,7 @@ var NavigationRailComponent = React36__namespace.forwardRef(
|
|
|
3525
5738
|
}
|
|
3526
5739
|
);
|
|
3527
5740
|
NavigationRailComponent.displayName = "NavigationRail";
|
|
3528
|
-
var NavigationRail =
|
|
5741
|
+
var NavigationRail = React37__namespace.memo(NavigationRailComponent);
|
|
3529
5742
|
function useSearchKeyboard({
|
|
3530
5743
|
active,
|
|
3531
5744
|
onActiveChange,
|
|
@@ -3534,14 +5747,14 @@ function useSearchKeyboard({
|
|
|
3534
5747
|
itemCount,
|
|
3535
5748
|
onSelectSuggestion
|
|
3536
5749
|
}) {
|
|
3537
|
-
const [activeIndex, setActiveIndex] =
|
|
3538
|
-
const resetKeyRef =
|
|
5750
|
+
const [activeIndex, setActiveIndex] = React37__namespace.useState(-1);
|
|
5751
|
+
const resetKeyRef = React37__namespace.useRef(`${active}:${query}`);
|
|
3539
5752
|
const currentKey = `${active}:${query}`;
|
|
3540
5753
|
if (resetKeyRef.current !== currentKey) {
|
|
3541
5754
|
resetKeyRef.current = currentKey;
|
|
3542
5755
|
setActiveIndex(-1);
|
|
3543
5756
|
}
|
|
3544
|
-
const handleKeyDown =
|
|
5757
|
+
const handleKeyDown = React37__namespace.useCallback(
|
|
3545
5758
|
(e) => {
|
|
3546
5759
|
if (!active) return;
|
|
3547
5760
|
switch (e.key) {
|
|
@@ -3581,7 +5794,7 @@ function useSearchKeyboard({
|
|
|
3581
5794
|
query
|
|
3582
5795
|
]
|
|
3583
5796
|
);
|
|
3584
|
-
const resetActiveIndex =
|
|
5797
|
+
const resetActiveIndex = React37__namespace.useCallback(() => {
|
|
3585
5798
|
setActiveIndex(-1);
|
|
3586
5799
|
}, []);
|
|
3587
5800
|
return { activeIndex, handleKeyDown, resetActiveIndex };
|
|
@@ -3649,10 +5862,10 @@ function AnimatedPlaceholder({
|
|
|
3649
5862
|
className
|
|
3650
5863
|
}) {
|
|
3651
5864
|
const shouldReduceMotion = react.useReducedMotion();
|
|
3652
|
-
const containerRef =
|
|
3653
|
-
const spanRef =
|
|
3654
|
-
const [xOffset, setXOffset] =
|
|
3655
|
-
const recalculate =
|
|
5865
|
+
const containerRef = React37__namespace.useRef(null);
|
|
5866
|
+
const spanRef = React37__namespace.useRef(null);
|
|
5867
|
+
const [xOffset, setXOffset] = React37__namespace.useState(0);
|
|
5868
|
+
const recalculate = React37__namespace.useCallback(() => {
|
|
3656
5869
|
const container = containerRef.current;
|
|
3657
5870
|
const span = spanRef.current;
|
|
3658
5871
|
if (!container || !span || textAlign === "left") {
|
|
@@ -3667,10 +5880,10 @@ function AnimatedPlaceholder({
|
|
|
3667
5880
|
setXOffset(Math.max(0, containerWidth - textWidth));
|
|
3668
5881
|
}
|
|
3669
5882
|
}, [textAlign]);
|
|
3670
|
-
|
|
5883
|
+
React37__namespace.useLayoutEffect(() => {
|
|
3671
5884
|
recalculate();
|
|
3672
5885
|
}, [recalculate]);
|
|
3673
|
-
|
|
5886
|
+
React37__namespace.useEffect(() => {
|
|
3674
5887
|
const container = containerRef.current;
|
|
3675
5888
|
if (!container) return;
|
|
3676
5889
|
const observer = new ResizeObserver(recalculate);
|
|
@@ -3739,10 +5952,10 @@ function SearchBar({
|
|
|
3739
5952
|
activeIndex
|
|
3740
5953
|
}) {
|
|
3741
5954
|
const shouldReduceMotion = react.useReducedMotion();
|
|
3742
|
-
const inputRef =
|
|
3743
|
-
const prevActiveRef =
|
|
3744
|
-
const isRestoringFocusRef =
|
|
3745
|
-
|
|
5955
|
+
const inputRef = React37__namespace.useRef(null);
|
|
5956
|
+
const prevActiveRef = React37__namespace.useRef(active);
|
|
5957
|
+
const isRestoringFocusRef = React37__namespace.useRef(false);
|
|
5958
|
+
React37__namespace.useEffect(() => {
|
|
3746
5959
|
var _a;
|
|
3747
5960
|
let rafId;
|
|
3748
5961
|
if (prevActiveRef.current === true && active === false) {
|
|
@@ -3861,7 +6074,7 @@ function SearchBar({
|
|
|
3861
6074
|
) })
|
|
3862
6075
|
);
|
|
3863
6076
|
}
|
|
3864
|
-
var SearchContext =
|
|
6077
|
+
var SearchContext = React37__namespace.createContext(null);
|
|
3865
6078
|
function SearchProvider({
|
|
3866
6079
|
children,
|
|
3867
6080
|
value
|
|
@@ -3869,15 +6082,15 @@ function SearchProvider({
|
|
|
3869
6082
|
return /* @__PURE__ */ jsxRuntime.jsx(SearchContext.Provider, { value, children });
|
|
3870
6083
|
}
|
|
3871
6084
|
function useSearch() {
|
|
3872
|
-
const context =
|
|
6085
|
+
const context = React37__namespace.useContext(SearchContext);
|
|
3873
6086
|
if (!context) {
|
|
3874
6087
|
return { listboxId: "", activeIndex: -1 };
|
|
3875
6088
|
}
|
|
3876
6089
|
return context;
|
|
3877
6090
|
}
|
|
3878
6091
|
function useClickOutside(handler, enabled = true) {
|
|
3879
|
-
const ref =
|
|
3880
|
-
|
|
6092
|
+
const ref = React37.useRef(null);
|
|
6093
|
+
React37.useEffect(() => {
|
|
3881
6094
|
if (!enabled) return;
|
|
3882
6095
|
const listener = (event) => {
|
|
3883
6096
|
const el = ref.current;
|
|
@@ -3896,7 +6109,7 @@ function useClickOutside(handler, enabled = true) {
|
|
|
3896
6109
|
return ref;
|
|
3897
6110
|
}
|
|
3898
6111
|
function useSearchViewFocus(inputRef, active) {
|
|
3899
|
-
|
|
6112
|
+
React37__namespace.useEffect(() => {
|
|
3900
6113
|
if (!active) return;
|
|
3901
6114
|
let raf2;
|
|
3902
6115
|
const raf1 = requestAnimationFrame(() => {
|
|
@@ -3956,11 +6169,11 @@ var ROTATE_KEY_SPLINES = [
|
|
|
3956
6169
|
var ROTATE_VALUES = "0 24 24; 154 24 24; 309 24 24; 463 24 24; 617 24 24; 771 24 24; 926 24 24; 1080 24 24";
|
|
3957
6170
|
var DETERMINATE_CIRCLE = "M24 7 C34.49 7 41 13.51 41 24 C41 34.49 34.49 41 24 41 C13.51 41 7 34.49 7 24 C7 13.51 13.51 7 24 7 Z";
|
|
3958
6171
|
var DETERMINATE_SOFT_BURST = "M20.9 10.4 21.4 9.5 21.9 8.7 22.5 7.8 23.2 7.2 24.2 7 25.1 7.4 25.7 8.1 26.2 9 26.8 9.8 27.3 10.6 28.1 11.2 29 11.3 30 11 30.9 10.6 31.8 10.3 32.8 9.9 33.7 10 34.5 10.6 34.9 11.5 34.8 12.5 34.8 13.5 34.7 14.5 34.7 15.5 35.2 16.3 36 16.8 37 17.1 37.9 17.3 38.9 17.5 39.8 17.9 40.4 18.7 40.5 19.7 40 20.5 39.4 21.3 38.7 22 38.1 22.8 37.6 23.7 37.7 24.6 38.3 25.5 38.9 26.2 39.6 27 40.2 27.7 40.5 28.7 40.3 29.6 39.5 30.3 38.6 30.6 37.6 30.8 36.7 31 35.7 31.3 35 31.9 34.6 32.8 34.7 33.8 34.8 34.8 34.9 35.8 34.8 36.8 34.3 37.6 33.4 38.1 32.4 38 31.5 37.6 30.6 37.2 29.7 36.9 28.7 36.6 27.8 36.9 27.1 37.6 26.6 38.5 26.1 39.3 25.5 40.2 24.8 40.8 23.8 41 22.9 40.6 22.3 39.9 21.8 39 21.2 38.2 20.7 37.4 19.9 36.8 19 36.7 18 37 17.1 37.4 16.2 37.7 15.2 38.1 14.3 38 13.5 37.4 13.1 36.5 13.2 35.5 13.2 34.5 13.3 33.5 13.3 32.5 12.8 31.7 12 31.2 11 31 10.1 30.7 9.1 30.5 8.2 30.1 7.6 29.3 7.5 28.3 8 27.5 8.7 26.7 9.3 26 9.9 25.2 10.4 24.3 10.3 23.4 9.7 22.5 9.1 21.8 8.4 21 7.8 20.3 7.5 19.3 7.7 18.4 8.5 17.7 9.4 17.4 10.4 17.2 11.3 17 12.3 16.7 13 16.1 13.4 15.2 13.3 14.2 13.2 13.2 13.1 12.2 13.2 11.2 13.7 10.4 14.6 9.9 15.6 10 16.5 10.4 17.4 10.8 18.3 11.1 19.3 11.4 20.2 11.1Z";
|
|
3959
|
-
var IndeterminateSvg =
|
|
6172
|
+
var IndeterminateSvg = React37__namespace.memo(function IndeterminateSvg2({
|
|
3960
6173
|
size
|
|
3961
6174
|
}) {
|
|
3962
|
-
const [ready, setReady] =
|
|
3963
|
-
|
|
6175
|
+
const [ready, setReady] = React37__namespace.useState(false);
|
|
6176
|
+
React37__namespace.useEffect(() => {
|
|
3964
6177
|
const raf = requestAnimationFrame(() => setReady(true));
|
|
3965
6178
|
return () => cancelAnimationFrame(raf);
|
|
3966
6179
|
}, []);
|
|
@@ -4005,7 +6218,7 @@ var IndeterminateSvg = React36__namespace.memo(function IndeterminateSvg2({
|
|
|
4005
6218
|
}
|
|
4006
6219
|
);
|
|
4007
6220
|
});
|
|
4008
|
-
var DeterminateSvg =
|
|
6221
|
+
var DeterminateSvg = React37__namespace.memo(function DeterminateSvg2({
|
|
4009
6222
|
size,
|
|
4010
6223
|
progress
|
|
4011
6224
|
}) {
|
|
@@ -4030,7 +6243,7 @@ var DeterminateSvg = React36__namespace.memo(function DeterminateSvg2({
|
|
|
4030
6243
|
}
|
|
4031
6244
|
);
|
|
4032
6245
|
});
|
|
4033
|
-
var LoadingIndicator =
|
|
6246
|
+
var LoadingIndicator = React37__namespace.forwardRef(
|
|
4034
6247
|
(_a, ref) => {
|
|
4035
6248
|
var _b = _a, {
|
|
4036
6249
|
variant = "uncontained",
|
|
@@ -4145,7 +6358,7 @@ function getSinePath(startX, endX, phase, wl, amp) {
|
|
|
4145
6358
|
d += ` L ${endX.toFixed(2)} ${yEnd.toFixed(2)}`;
|
|
4146
6359
|
return d;
|
|
4147
6360
|
}
|
|
4148
|
-
var CircularProgress =
|
|
6361
|
+
var CircularProgress = React37__namespace.forwardRef(
|
|
4149
6362
|
(_a, ref) => {
|
|
4150
6363
|
var _b = _a, {
|
|
4151
6364
|
value,
|
|
@@ -4183,15 +6396,15 @@ var CircularProgress = React36__namespace.forwardRef(
|
|
|
4183
6396
|
const isWavy = shape === "wavy";
|
|
4184
6397
|
const BASELINE_SIZE = 48;
|
|
4185
6398
|
const scaleFactor = size / BASELINE_SIZE;
|
|
4186
|
-
const effectiveAmplitude =
|
|
6399
|
+
const effectiveAmplitude = React37__namespace.useMemo(
|
|
4187
6400
|
() => amplitude != null ? amplitude : 1.6 * scaleFactor,
|
|
4188
6401
|
[amplitude, scaleFactor]
|
|
4189
6402
|
);
|
|
4190
|
-
const effectiveWavelength =
|
|
6403
|
+
const effectiveWavelength = React37__namespace.useMemo(
|
|
4191
6404
|
() => wavelength != null ? wavelength : 15 * scaleFactor,
|
|
4192
6405
|
[wavelength, scaleFactor]
|
|
4193
6406
|
);
|
|
4194
|
-
const wavyActivePath =
|
|
6407
|
+
const wavyActivePath = React37__namespace.useMemo(
|
|
4195
6408
|
() => isWavy ? generateWavyCircularPath(
|
|
4196
6409
|
center,
|
|
4197
6410
|
radius,
|
|
@@ -4200,8 +6413,8 @@ var CircularProgress = React36__namespace.forwardRef(
|
|
|
4200
6413
|
) : null,
|
|
4201
6414
|
[isWavy, center, radius, effectiveAmplitude, effectiveWavelength]
|
|
4202
6415
|
);
|
|
4203
|
-
const circumference =
|
|
4204
|
-
const gapForTrack =
|
|
6416
|
+
const circumference = React37__namespace.useMemo(() => 2 * Math.PI * radius, [radius]);
|
|
6417
|
+
const gapForTrack = React37__namespace.useMemo(
|
|
4205
6418
|
() => (gapSize + trackHeight) / circumference,
|
|
4206
6419
|
[gapSize, trackHeight, circumference]
|
|
4207
6420
|
);
|
|
@@ -4390,9 +6603,9 @@ var CircularProgress = React36__namespace.forwardRef(
|
|
|
4390
6603
|
);
|
|
4391
6604
|
CircularProgress.displayName = "CircularProgress";
|
|
4392
6605
|
function useContainerWidth() {
|
|
4393
|
-
const [width, setWidth] =
|
|
4394
|
-
const observerRef =
|
|
4395
|
-
const ref =
|
|
6606
|
+
const [width, setWidth] = React37__namespace.useState(0);
|
|
6607
|
+
const observerRef = React37__namespace.useRef(null);
|
|
6608
|
+
const ref = React37__namespace.useCallback((node) => {
|
|
4396
6609
|
if (observerRef.current) {
|
|
4397
6610
|
observerRef.current.disconnect();
|
|
4398
6611
|
observerRef.current = null;
|
|
@@ -4406,7 +6619,7 @@ function useContainerWidth() {
|
|
|
4406
6619
|
observerRef.current = obs;
|
|
4407
6620
|
}
|
|
4408
6621
|
}, []);
|
|
4409
|
-
|
|
6622
|
+
React37__namespace.useEffect(() => {
|
|
4410
6623
|
return () => {
|
|
4411
6624
|
if (observerRef.current) {
|
|
4412
6625
|
observerRef.current.disconnect();
|
|
@@ -4416,7 +6629,7 @@ function useContainerWidth() {
|
|
|
4416
6629
|
return [ref, width];
|
|
4417
6630
|
}
|
|
4418
6631
|
function useMergedRef(...refs) {
|
|
4419
|
-
return
|
|
6632
|
+
return React37__namespace.useCallback(
|
|
4420
6633
|
(node) => {
|
|
4421
6634
|
for (const ref of refs) {
|
|
4422
6635
|
if (typeof ref === "function") {
|
|
@@ -4430,7 +6643,7 @@ function useMergedRef(...refs) {
|
|
|
4430
6643
|
[refs]
|
|
4431
6644
|
);
|
|
4432
6645
|
}
|
|
4433
|
-
var FlatLinearTrack =
|
|
6646
|
+
var FlatLinearTrack = React37__namespace.memo(function FlatLinearTrack2({
|
|
4434
6647
|
trackHeight,
|
|
4435
6648
|
activeColor,
|
|
4436
6649
|
trackColor,
|
|
@@ -4506,7 +6719,7 @@ var FlatLinearTrack = React36__namespace.memo(function FlatLinearTrack2({
|
|
|
4506
6719
|
}
|
|
4507
6720
|
);
|
|
4508
6721
|
});
|
|
4509
|
-
var WavyLinearTrack =
|
|
6722
|
+
var WavyLinearTrack = React37__namespace.memo(function WavyLinearTrack2({
|
|
4510
6723
|
trackHeight,
|
|
4511
6724
|
svgHeight,
|
|
4512
6725
|
amplitude,
|
|
@@ -4525,13 +6738,13 @@ var WavyLinearTrack = React36__namespace.memo(function WavyLinearTrack2({
|
|
|
4525
6738
|
}) {
|
|
4526
6739
|
const isDeterminate = typeof value === "number";
|
|
4527
6740
|
const clampedValue = isDeterminate ? Math.max(0, Math.min(100, value)) : 100;
|
|
4528
|
-
const titleId =
|
|
6741
|
+
const titleId = React37__namespace.useId();
|
|
4529
6742
|
const [containerRef, width] = useContainerWidth();
|
|
4530
|
-
const activePathRef =
|
|
4531
|
-
const trackPathRef =
|
|
6743
|
+
const activePathRef = React37__namespace.useRef(null);
|
|
6744
|
+
const trackPathRef = React37__namespace.useRef(null);
|
|
4532
6745
|
const amplitudeMV = react.useMotionValue(amplitude);
|
|
4533
6746
|
const fractionMV = react.useMotionValue(isDeterminate ? clampedValue / 100 : 1);
|
|
4534
|
-
|
|
6747
|
+
React37__namespace.useEffect(() => {
|
|
4535
6748
|
if (isDeterminate) {
|
|
4536
6749
|
const fraction = clampedValue / 100;
|
|
4537
6750
|
let targetAmp = amplitude;
|
|
@@ -4702,7 +6915,7 @@ var WavyLinearTrack = React36__namespace.memo(function WavyLinearTrack2({
|
|
|
4702
6915
|
}
|
|
4703
6916
|
);
|
|
4704
6917
|
});
|
|
4705
|
-
var LinearProgress =
|
|
6918
|
+
var LinearProgress = React37__namespace.forwardRef(
|
|
4706
6919
|
(_a, ref) => {
|
|
4707
6920
|
var _b = _a, {
|
|
4708
6921
|
value,
|
|
@@ -4743,10 +6956,10 @@ var LinearProgress = React36__namespace.forwardRef(
|
|
|
4743
6956
|
]);
|
|
4744
6957
|
const isDeterminate = value !== void 0;
|
|
4745
6958
|
const clampedValue = isDeterminate ? Math.min(100, Math.max(0, value)) : 0;
|
|
4746
|
-
const containerRef =
|
|
6959
|
+
const containerRef = React37__namespace.useRef(null);
|
|
4747
6960
|
const mergedRef = useMergedRef(ref, containerRef);
|
|
4748
|
-
const [isRtl, setIsRtl] =
|
|
4749
|
-
|
|
6961
|
+
const [isRtl, setIsRtl] = React37__namespace.useState(false);
|
|
6962
|
+
React37__namespace.useEffect(() => {
|
|
4750
6963
|
if (containerRef.current) {
|
|
4751
6964
|
const dir = getComputedStyle(containerRef.current).direction;
|
|
4752
6965
|
setIsRtl(dir === "rtl");
|
|
@@ -4754,16 +6967,16 @@ var LinearProgress = React36__namespace.forwardRef(
|
|
|
4754
6967
|
}, []);
|
|
4755
6968
|
const isWavy = shape === "wavy";
|
|
4756
6969
|
const resolvedTrackShape = trackShape != null ? trackShape : shape;
|
|
4757
|
-
const effectiveAmplitude =
|
|
4758
|
-
const svgHeight =
|
|
6970
|
+
const effectiveAmplitude = React37__namespace.useMemo(() => amplitude != null ? amplitude : 3, [amplitude]);
|
|
6971
|
+
const svgHeight = React37__namespace.useMemo(
|
|
4759
6972
|
() => isWavy ? trackHeight + effectiveAmplitude * 2 : trackHeight,
|
|
4760
6973
|
[isWavy, trackHeight, effectiveAmplitude]
|
|
4761
6974
|
);
|
|
4762
|
-
const shouldShowStop =
|
|
6975
|
+
const shouldShowStop = React37__namespace.useMemo(
|
|
4763
6976
|
() => isDeterminate && resolvedTrackShape === "flat" && (showStopIndicator === true || showStopIndicator === "auto" && isDeterminate),
|
|
4764
6977
|
[isDeterminate, resolvedTrackShape, showStopIndicator]
|
|
4765
6978
|
);
|
|
4766
|
-
const stopSize =
|
|
6979
|
+
const stopSize = React37__namespace.useMemo(
|
|
4767
6980
|
() => Math.max(2, trackHeight > 4 ? 4 : trackHeight / 2),
|
|
4768
6981
|
[trackHeight]
|
|
4769
6982
|
);
|
|
@@ -4836,7 +7049,7 @@ var LinearProgress = React36__namespace.forwardRef(
|
|
|
4836
7049
|
}
|
|
4837
7050
|
);
|
|
4838
7051
|
LinearProgress.displayName = "LinearProgress";
|
|
4839
|
-
var ProgressIndicator =
|
|
7052
|
+
var ProgressIndicator = React37__namespace.forwardRef((props, ref) => {
|
|
4840
7053
|
if (props.variant === "circular") {
|
|
4841
7054
|
return /* @__PURE__ */ jsxRuntime.jsx(CircularProgress, __spreadValues({ ref }, props));
|
|
4842
7055
|
}
|
|
@@ -4968,7 +7181,7 @@ function resolveDisabledBgClass(colorStyle) {
|
|
|
4968
7181
|
}
|
|
4969
7182
|
return "disabled:text-m3-on-surface/[0.38]";
|
|
4970
7183
|
}
|
|
4971
|
-
var IconButtonComponent =
|
|
7184
|
+
var IconButtonComponent = React37__namespace.forwardRef(
|
|
4972
7185
|
(_a, ref) => {
|
|
4973
7186
|
var _b = _a, {
|
|
4974
7187
|
className,
|
|
@@ -5010,18 +7223,18 @@ var IconButtonComponent = React36__namespace.forwardRef(
|
|
|
5010
7223
|
var _a2, _b2, _c, _d, _e;
|
|
5011
7224
|
const isToggle = variant === "toggle";
|
|
5012
7225
|
const isSelected = isToggle && !!selected;
|
|
5013
|
-
const resolvedColorClass =
|
|
7226
|
+
const resolvedColorClass = React37__namespace.useMemo(
|
|
5014
7227
|
() => isSelected ? colorStyles[colorStyle].selected : colorStyles[colorStyle].default,
|
|
5015
7228
|
[isSelected, colorStyle]
|
|
5016
7229
|
);
|
|
5017
|
-
const outlineWidthClass =
|
|
7230
|
+
const outlineWidthClass = React37__namespace.useMemo(
|
|
5018
7231
|
() => {
|
|
5019
7232
|
var _a3;
|
|
5020
7233
|
return colorStyle === "outlined" && !isSelected ? (_a3 = SIZE_OUTLINE_WIDTH[size]) != null ? _a3 : "border" : "";
|
|
5021
7234
|
},
|
|
5022
7235
|
[colorStyle, isSelected, size]
|
|
5023
7236
|
);
|
|
5024
|
-
const disabledBgClass =
|
|
7237
|
+
const disabledBgClass = React37__namespace.useMemo(
|
|
5025
7238
|
() => resolveDisabledBgClass(colorStyle),
|
|
5026
7239
|
[colorStyle]
|
|
5027
7240
|
);
|
|
@@ -5044,7 +7257,7 @@ var IconButtonComponent = React36__namespace.forwardRef(
|
|
|
5044
7257
|
const { ripples, onPointerDown, removeRipple } = useRippleState({
|
|
5045
7258
|
disabled: loading
|
|
5046
7259
|
});
|
|
5047
|
-
const handleClick =
|
|
7260
|
+
const handleClick = React37__namespace.useCallback(
|
|
5048
7261
|
(e) => {
|
|
5049
7262
|
if (loading) {
|
|
5050
7263
|
e.preventDefault();
|
|
@@ -5054,7 +7267,7 @@ var IconButtonComponent = React36__namespace.forwardRef(
|
|
|
5054
7267
|
},
|
|
5055
7268
|
[loading, onClick]
|
|
5056
7269
|
);
|
|
5057
|
-
const handleKeyDown =
|
|
7270
|
+
const handleKeyDown = React37__namespace.useCallback(
|
|
5058
7271
|
(e) => {
|
|
5059
7272
|
if (loading) return;
|
|
5060
7273
|
if ((e.key === "Enter" || e.key === " ") && onClick) {
|
|
@@ -5110,7 +7323,7 @@ var IconButtonComponent = React36__namespace.forwardRef(
|
|
|
5110
7323
|
width: isCustomSize ? `${iconSize}px` : void 0,
|
|
5111
7324
|
height: isCustomSize ? `${iconSize}px` : void 0
|
|
5112
7325
|
},
|
|
5113
|
-
children: isSelected && selectedIcon ? selectedIcon : asChild ?
|
|
7326
|
+
children: isSelected && selectedIcon ? selectedIcon : asChild ? React37__namespace.Children.only(children).props.children : children
|
|
5114
7327
|
}),
|
|
5115
7328
|
isSelected && selectedIcon ? "selected-content" : "content"
|
|
5116
7329
|
) })
|
|
@@ -5127,7 +7340,7 @@ var IconButtonComponent = React36__namespace.forwardRef(
|
|
|
5127
7340
|
className
|
|
5128
7341
|
);
|
|
5129
7342
|
if (asChild) {
|
|
5130
|
-
const child =
|
|
7343
|
+
const child = React37__namespace.Children.only(children);
|
|
5131
7344
|
return /* @__PURE__ */ jsxRuntime.jsx(react.LazyMotion, { features: react.domMax, strict: true, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
5132
7345
|
reactSlot.Slot,
|
|
5133
7346
|
__spreadProps(__spreadValues({
|
|
@@ -5144,7 +7357,7 @@ var IconButtonComponent = React36__namespace.forwardRef(
|
|
|
5144
7357
|
}),
|
|
5145
7358
|
className: containerClassName
|
|
5146
7359
|
}, restProps), {
|
|
5147
|
-
children:
|
|
7360
|
+
children: React37__namespace.cloneElement(child, { children: innerContent })
|
|
5148
7361
|
})
|
|
5149
7362
|
) });
|
|
5150
7363
|
}
|
|
@@ -5172,7 +7385,7 @@ var IconButtonComponent = React36__namespace.forwardRef(
|
|
|
5172
7385
|
}
|
|
5173
7386
|
);
|
|
5174
7387
|
IconButtonComponent.displayName = "IconButton";
|
|
5175
|
-
var IconButton =
|
|
7388
|
+
var IconButton = React37__namespace.memo(IconButtonComponent);
|
|
5176
7389
|
function TrailingAction({
|
|
5177
7390
|
query,
|
|
5178
7391
|
trailingIcon,
|
|
@@ -5232,7 +7445,7 @@ function SearchViewDocked({
|
|
|
5232
7445
|
activeIndex
|
|
5233
7446
|
}) {
|
|
5234
7447
|
const shouldReduceMotion = react.useReducedMotion();
|
|
5235
|
-
const inputRef =
|
|
7448
|
+
const inputRef = React37__namespace.useRef(null);
|
|
5236
7449
|
useSearchViewFocus(inputRef, active);
|
|
5237
7450
|
const dropdownRef = useClickOutside(() => {
|
|
5238
7451
|
onActiveChange(false);
|
|
@@ -5378,10 +7591,10 @@ function SearchViewFullScreen({
|
|
|
5378
7591
|
activeIndex
|
|
5379
7592
|
}) {
|
|
5380
7593
|
const shouldReduceMotion = react.useReducedMotion();
|
|
5381
|
-
const inputRef =
|
|
7594
|
+
const inputRef = React37__namespace.useRef(null);
|
|
5382
7595
|
useSearchViewFocus(inputRef, active);
|
|
5383
|
-
const [mounted, setMounted] =
|
|
5384
|
-
|
|
7596
|
+
const [mounted, setMounted] = React37__namespace.useState(false);
|
|
7597
|
+
React37__namespace.useEffect(() => {
|
|
5385
7598
|
setMounted(true);
|
|
5386
7599
|
}, []);
|
|
5387
7600
|
const handleFormSubmit = (e) => {
|
|
@@ -5539,10 +7752,10 @@ function SearchComponent({
|
|
|
5539
7752
|
className,
|
|
5540
7753
|
viewClassName
|
|
5541
7754
|
}) {
|
|
5542
|
-
const generatedId =
|
|
7755
|
+
const generatedId = React37__namespace.useId();
|
|
5543
7756
|
const searchId = id != null ? id : generatedId;
|
|
5544
7757
|
const listboxId = `${searchId}-listbox`;
|
|
5545
|
-
const itemCount =
|
|
7758
|
+
const itemCount = React37__namespace.Children.count(children);
|
|
5546
7759
|
const { activeIndex, handleKeyDown } = useSearchKeyboard({
|
|
5547
7760
|
active,
|
|
5548
7761
|
onActiveChange,
|
|
@@ -5601,9 +7814,9 @@ function formatBadgeLabel(children, max) {
|
|
|
5601
7814
|
return "";
|
|
5602
7815
|
}
|
|
5603
7816
|
function detectBadgeHasContent(badge) {
|
|
5604
|
-
return
|
|
7817
|
+
return React37__namespace.isValidElement(badge) && badge.props.children != null;
|
|
5605
7818
|
}
|
|
5606
|
-
var BadgeImpl =
|
|
7819
|
+
var BadgeImpl = React37__namespace.forwardRef(
|
|
5607
7820
|
(_a, ref) => {
|
|
5608
7821
|
var _b = _a, {
|
|
5609
7822
|
children,
|
|
@@ -5657,7 +7870,7 @@ var BadgeImpl = React36__namespace.forwardRef(
|
|
|
5657
7870
|
}
|
|
5658
7871
|
);
|
|
5659
7872
|
BadgeImpl.displayName = "Badge";
|
|
5660
|
-
|
|
7873
|
+
React37__namespace.memo(BadgeImpl);
|
|
5661
7874
|
function BadgedBox({
|
|
5662
7875
|
badge,
|
|
5663
7876
|
children,
|
|
@@ -5678,9 +7891,9 @@ function BadgedBox({
|
|
|
5678
7891
|
)
|
|
5679
7892
|
] });
|
|
5680
7893
|
}
|
|
5681
|
-
var TabsContext =
|
|
7894
|
+
var TabsContext = React37__namespace.createContext(null);
|
|
5682
7895
|
function useTabsContext() {
|
|
5683
|
-
const ctx =
|
|
7896
|
+
const ctx = React37__namespace.useContext(TabsContext);
|
|
5684
7897
|
if (!ctx) {
|
|
5685
7898
|
throw new Error(
|
|
5686
7899
|
"[MD3 Tabs] Component must be used within a <Tabs> root. Ensure <TabsList>, <Tab>, and <TabsContent> are descendants of <Tabs>."
|
|
@@ -5688,7 +7901,7 @@ function useTabsContext() {
|
|
|
5688
7901
|
}
|
|
5689
7902
|
return ctx;
|
|
5690
7903
|
}
|
|
5691
|
-
var TabsComponent =
|
|
7904
|
+
var TabsComponent = React37__namespace.forwardRef(
|
|
5692
7905
|
({
|
|
5693
7906
|
value: controlledValue,
|
|
5694
7907
|
defaultValue = "",
|
|
@@ -5697,35 +7910,35 @@ var TabsComponent = React36__namespace.forwardRef(
|
|
|
5697
7910
|
children,
|
|
5698
7911
|
className
|
|
5699
7912
|
}, ref) => {
|
|
5700
|
-
const [internalValue, setInternalValue] =
|
|
7913
|
+
const [internalValue, setInternalValue] = React37__namespace.useState(defaultValue);
|
|
5701
7914
|
const isControlled = controlledValue !== void 0;
|
|
5702
7915
|
const value = isControlled ? controlledValue : internalValue;
|
|
5703
|
-
const handleValueChange =
|
|
7916
|
+
const handleValueChange = React37__namespace.useCallback(
|
|
5704
7917
|
(newValue) => {
|
|
5705
7918
|
if (!isControlled) setInternalValue(newValue);
|
|
5706
7919
|
onValueChange == null ? void 0 : onValueChange(newValue);
|
|
5707
7920
|
},
|
|
5708
7921
|
[isControlled, onValueChange]
|
|
5709
7922
|
);
|
|
5710
|
-
const [focusedValue, setFocusedValue] =
|
|
5711
|
-
|
|
7923
|
+
const [focusedValue, setFocusedValue] = React37__namespace.useState(value);
|
|
7924
|
+
React37__namespace.useEffect(() => {
|
|
5712
7925
|
setFocusedValue(value);
|
|
5713
7926
|
}, [value]);
|
|
5714
|
-
const [tabValues, setTabValues] =
|
|
5715
|
-
const registerTab =
|
|
7927
|
+
const [tabValues, setTabValues] = React37__namespace.useState([]);
|
|
7928
|
+
const registerTab = React37__namespace.useCallback((tabValue) => {
|
|
5716
7929
|
setTabValues((prev) => {
|
|
5717
7930
|
if (prev.includes(tabValue)) return prev;
|
|
5718
7931
|
return [...prev, tabValue];
|
|
5719
7932
|
});
|
|
5720
7933
|
}, []);
|
|
5721
|
-
const unregisterTab =
|
|
7934
|
+
const unregisterTab = React37__namespace.useCallback((tabValue) => {
|
|
5722
7935
|
setTabValues((prev) => prev.filter((v) => v !== tabValue));
|
|
5723
7936
|
}, []);
|
|
5724
|
-
const hasAutoSelected =
|
|
5725
|
-
const [disabledValues, setDisabledValues] =
|
|
7937
|
+
const hasAutoSelected = React37__namespace.useRef(false);
|
|
7938
|
+
const [disabledValues, setDisabledValues] = React37__namespace.useState(
|
|
5726
7939
|
/* @__PURE__ */ new Set()
|
|
5727
7940
|
);
|
|
5728
|
-
const markTabDisabled =
|
|
7941
|
+
const markTabDisabled = React37__namespace.useCallback(
|
|
5729
7942
|
(tabValue, disabled) => {
|
|
5730
7943
|
setDisabledValues((prev) => {
|
|
5731
7944
|
const next = new Set(prev);
|
|
@@ -5739,7 +7952,7 @@ var TabsComponent = React36__namespace.forwardRef(
|
|
|
5739
7952
|
},
|
|
5740
7953
|
[]
|
|
5741
7954
|
);
|
|
5742
|
-
|
|
7955
|
+
React37__namespace.useEffect(() => {
|
|
5743
7956
|
if (isControlled || hasAutoSelected.current || tabValues.length === 0) {
|
|
5744
7957
|
return;
|
|
5745
7958
|
}
|
|
@@ -5754,9 +7967,9 @@ var TabsComponent = React36__namespace.forwardRef(
|
|
|
5754
7967
|
setFocusedValue(firstEnabled);
|
|
5755
7968
|
}
|
|
5756
7969
|
}, [tabValues, disabledValues, isControlled, value]);
|
|
5757
|
-
const id =
|
|
7970
|
+
const id = React37__namespace.useId();
|
|
5758
7971
|
const layoutGroupId = `tabs-${id}`;
|
|
5759
|
-
const contextValue =
|
|
7972
|
+
const contextValue = React37__namespace.useMemo(
|
|
5760
7973
|
() => ({
|
|
5761
7974
|
value,
|
|
5762
7975
|
onValueChange: handleValueChange,
|
|
@@ -5787,12 +8000,12 @@ var TabsComponent = React36__namespace.forwardRef(
|
|
|
5787
8000
|
}
|
|
5788
8001
|
);
|
|
5789
8002
|
TabsComponent.displayName = "Tabs";
|
|
5790
|
-
var Tabs =
|
|
5791
|
-
var TabsListContext =
|
|
8003
|
+
var Tabs = React37__namespace.memo(TabsComponent);
|
|
8004
|
+
var TabsListContext = React37__namespace.createContext(
|
|
5792
8005
|
null
|
|
5793
8006
|
);
|
|
5794
8007
|
function useTabsListContext() {
|
|
5795
|
-
const ctx =
|
|
8008
|
+
const ctx = React37__namespace.useContext(TabsListContext);
|
|
5796
8009
|
return ctx != null ? ctx : { variant: "primary", scrollable: false };
|
|
5797
8010
|
}
|
|
5798
8011
|
|
|
@@ -5876,7 +8089,7 @@ var TABS_CONTENT_TRANSITION = {
|
|
|
5876
8089
|
ease: "easeInOut"
|
|
5877
8090
|
};
|
|
5878
8091
|
var INDICATOR_MIN_WIDTH = 24;
|
|
5879
|
-
var TabComponent =
|
|
8092
|
+
var TabComponent = React37__namespace.forwardRef(
|
|
5880
8093
|
({
|
|
5881
8094
|
value,
|
|
5882
8095
|
icon,
|
|
@@ -5906,9 +8119,9 @@ var TabComponent = React36__namespace.forwardRef(
|
|
|
5906
8119
|
const isFocused = focusedValue === value;
|
|
5907
8120
|
const hasIcon = icon != null;
|
|
5908
8121
|
const isStackedIcon = hasIcon && !inlineIcon;
|
|
5909
|
-
const buttonRef =
|
|
5910
|
-
const isFirstMount =
|
|
5911
|
-
const mergedRef =
|
|
8122
|
+
const buttonRef = React37__namespace.useRef(null);
|
|
8123
|
+
const isFirstMount = React37__namespace.useRef(true);
|
|
8124
|
+
const mergedRef = React37__namespace.useCallback(
|
|
5912
8125
|
(node) => {
|
|
5913
8126
|
buttonRef.current = node;
|
|
5914
8127
|
if (typeof ref === "function") ref(node);
|
|
@@ -5916,15 +8129,15 @@ var TabComponent = React36__namespace.forwardRef(
|
|
|
5916
8129
|
},
|
|
5917
8130
|
[ref]
|
|
5918
8131
|
);
|
|
5919
|
-
|
|
8132
|
+
React37__namespace.useEffect(() => {
|
|
5920
8133
|
registerTab(value);
|
|
5921
8134
|
return () => unregisterTab(value);
|
|
5922
8135
|
}, [value, registerTab, unregisterTab]);
|
|
5923
|
-
|
|
8136
|
+
React37__namespace.useEffect(() => {
|
|
5924
8137
|
markTabDisabled(value, disabled);
|
|
5925
8138
|
return () => markTabDisabled(value, false);
|
|
5926
8139
|
}, [value, disabled, markTabDisabled]);
|
|
5927
|
-
const handleKeyDown =
|
|
8140
|
+
const handleKeyDown = React37__namespace.useCallback(
|
|
5928
8141
|
(e) => {
|
|
5929
8142
|
const isRtl = buttonRef.current ? getComputedStyle(buttonRef.current).direction === "rtl" : false;
|
|
5930
8143
|
const enabledValues = tabValues.filter((v) => !disabledValues.has(v));
|
|
@@ -5978,7 +8191,7 @@ var TabComponent = React36__namespace.forwardRef(
|
|
|
5978
8191
|
autoActivate
|
|
5979
8192
|
]
|
|
5980
8193
|
);
|
|
5981
|
-
|
|
8194
|
+
React37__namespace.useEffect(() => {
|
|
5982
8195
|
if (isFirstMount.current) {
|
|
5983
8196
|
isFirstMount.current = false;
|
|
5984
8197
|
return;
|
|
@@ -5987,7 +8200,7 @@ var TabComponent = React36__namespace.forwardRef(
|
|
|
5987
8200
|
buttonRef.current.focus({ preventScroll: true });
|
|
5988
8201
|
}
|
|
5989
8202
|
}, [isFocused]);
|
|
5990
|
-
|
|
8203
|
+
React37__namespace.useEffect(() => {
|
|
5991
8204
|
if (!isActive || !scrollable || !buttonRef.current) return;
|
|
5992
8205
|
const btn = buttonRef.current;
|
|
5993
8206
|
let container = btn.parentElement;
|
|
@@ -6124,8 +8337,8 @@ var TabComponent = React36__namespace.forwardRef(
|
|
|
6124
8337
|
}
|
|
6125
8338
|
);
|
|
6126
8339
|
TabComponent.displayName = "Tab";
|
|
6127
|
-
var Tab =
|
|
6128
|
-
var TabsContentComponent =
|
|
8340
|
+
var Tab = React37__namespace.memo(TabComponent);
|
|
8341
|
+
var TabsContentComponent = React37__namespace.forwardRef(
|
|
6129
8342
|
({ value, className, children }, ref) => {
|
|
6130
8343
|
var _a;
|
|
6131
8344
|
const { value: selectedValue, layoutGroupId } = useTabsContext();
|
|
@@ -6159,8 +8372,8 @@ var TabsContentComponent = React36__namespace.forwardRef(
|
|
|
6159
8372
|
}
|
|
6160
8373
|
);
|
|
6161
8374
|
TabsContentComponent.displayName = "TabsContent";
|
|
6162
|
-
var TabsContent =
|
|
6163
|
-
var TabsListComponent =
|
|
8375
|
+
var TabsContent = React37__namespace.memo(TabsContentComponent);
|
|
8376
|
+
var TabsListComponent = React37__namespace.forwardRef(
|
|
6164
8377
|
({
|
|
6165
8378
|
variant,
|
|
6166
8379
|
scrollable = false,
|
|
@@ -6171,12 +8384,12 @@ var TabsListComponent = React36__namespace.forwardRef(
|
|
|
6171
8384
|
}, ref) => {
|
|
6172
8385
|
const { layoutGroupId, value, setFocusedValue } = useTabsContext();
|
|
6173
8386
|
const listLayoutId = `${layoutGroupId}-list`;
|
|
6174
|
-
const listContextValue =
|
|
8387
|
+
const listContextValue = React37__namespace.useMemo(
|
|
6175
8388
|
() => ({ variant, scrollable }),
|
|
6176
8389
|
[variant, scrollable]
|
|
6177
8390
|
);
|
|
6178
8391
|
const bgColor = backgroundColor != null ? backgroundColor : "var(--md-sys-color-surface)";
|
|
6179
|
-
const handleBlur =
|
|
8392
|
+
const handleBlur = React37__namespace.useCallback(
|
|
6180
8393
|
(e) => {
|
|
6181
8394
|
const listEl = e.currentTarget;
|
|
6182
8395
|
if (listEl.contains(e.relatedTarget)) return;
|
|
@@ -6225,7 +8438,7 @@ var TabsListComponent = React36__namespace.forwardRef(
|
|
|
6225
8438
|
}
|
|
6226
8439
|
);
|
|
6227
8440
|
TabsListComponent.displayName = "TabsList";
|
|
6228
|
-
var TabsList =
|
|
8441
|
+
var TabsList = React37__namespace.memo(TabsListComponent);
|
|
6229
8442
|
|
|
6230
8443
|
// src/ui/toolbar/toolbar-colors.ts
|
|
6231
8444
|
var standardFloatingToolbarColors = {
|
|
@@ -6281,13 +8494,13 @@ function getToolbarColors(variant = "standard", customColors) {
|
|
|
6281
8494
|
return standardFloatingToolbarColors;
|
|
6282
8495
|
}
|
|
6283
8496
|
}
|
|
6284
|
-
var ToolbarContext =
|
|
8497
|
+
var ToolbarContext = React37__namespace.createContext(
|
|
6285
8498
|
null
|
|
6286
8499
|
);
|
|
6287
8500
|
function useToolbarContext() {
|
|
6288
|
-
return
|
|
8501
|
+
return React37__namespace.useContext(ToolbarContext);
|
|
6289
8502
|
}
|
|
6290
|
-
var BottomDockedToolbar =
|
|
8503
|
+
var BottomDockedToolbar = React37__namespace.forwardRef(
|
|
6291
8504
|
(_a, ref) => {
|
|
6292
8505
|
var _b = _a, {
|
|
6293
8506
|
variant = "standard",
|
|
@@ -6320,8 +8533,8 @@ var BottomDockedToolbar = React36__namespace.forwardRef(
|
|
|
6320
8533
|
const { scrollY } = react.useScroll(
|
|
6321
8534
|
scrollContainerRef ? { container: scrollContainerRef } : void 0
|
|
6322
8535
|
);
|
|
6323
|
-
const [isHidden, setIsHidden] =
|
|
6324
|
-
const lastScrollY =
|
|
8536
|
+
const [isHidden, setIsHidden] = React37__namespace.useState(false);
|
|
8537
|
+
const lastScrollY = React37__namespace.useRef(0);
|
|
6325
8538
|
react.useMotionValueEvent(scrollY, "change", (latest) => {
|
|
6326
8539
|
if (!hideOnScroll) return;
|
|
6327
8540
|
const diff = latest - lastScrollY.current;
|
|
@@ -6431,6 +8644,10 @@ var ToolbarToggleButtonTokens = {
|
|
|
6431
8644
|
PaddingX: 16,
|
|
6432
8645
|
Gap: 8
|
|
6433
8646
|
};
|
|
8647
|
+
var ToolbarToggleButtonRadiusTokens = {
|
|
8648
|
+
pillRadius: 24,
|
|
8649
|
+
pressedRadius: 12
|
|
8650
|
+
};
|
|
6434
8651
|
var ALIGNMENT_CLASS = {
|
|
6435
8652
|
start: "justify-start",
|
|
6436
8653
|
center: "justify-center",
|
|
@@ -6476,15 +8693,15 @@ function buildSlotVariants(xHidden, yHidden, isHorizontal) {
|
|
|
6476
8693
|
};
|
|
6477
8694
|
}
|
|
6478
8695
|
function applyItemClassName(nodes, itemClassName) {
|
|
6479
|
-
return
|
|
6480
|
-
if (!
|
|
8696
|
+
return React37__namespace.Children.map(nodes, (child) => {
|
|
8697
|
+
if (!React37__namespace.isValidElement(child)) return child;
|
|
6481
8698
|
const element = child;
|
|
6482
|
-
return
|
|
8699
|
+
return React37__namespace.cloneElement(element, {
|
|
6483
8700
|
className: cn(element.props.className, itemClassName)
|
|
6484
8701
|
});
|
|
6485
8702
|
});
|
|
6486
8703
|
}
|
|
6487
|
-
var FloatingToolbarBase =
|
|
8704
|
+
var FloatingToolbarBase = React37__namespace.forwardRef(
|
|
6488
8705
|
(_a, ref) => {
|
|
6489
8706
|
var _b = _a, {
|
|
6490
8707
|
expanded,
|
|
@@ -6656,11 +8873,11 @@ var FloatingToolbarBase = React36__namespace.forwardRef(
|
|
|
6656
8873
|
}
|
|
6657
8874
|
);
|
|
6658
8875
|
FloatingToolbarBase.displayName = "FloatingToolbarBase";
|
|
6659
|
-
var HorizontalFloatingToolbar =
|
|
8876
|
+
var HorizontalFloatingToolbar = React37__namespace.forwardRef((props, ref) => /* @__PURE__ */ jsxRuntime.jsx(FloatingToolbarBase, __spreadValues({ ref, orientation: "horizontal" }, props)));
|
|
6660
8877
|
HorizontalFloatingToolbar.displayName = "HorizontalFloatingToolbar";
|
|
6661
|
-
var VerticalFloatingToolbar =
|
|
8878
|
+
var VerticalFloatingToolbar = React37__namespace.forwardRef((props, ref) => /* @__PURE__ */ jsxRuntime.jsx(FloatingToolbarBase, __spreadValues({ ref, orientation: "vertical" }, props)));
|
|
6662
8879
|
VerticalFloatingToolbar.displayName = "VerticalFloatingToolbar";
|
|
6663
|
-
var FloatingToolbarWithFabBase =
|
|
8880
|
+
var FloatingToolbarWithFabBase = React37__namespace.forwardRef(
|
|
6664
8881
|
(_a, ref) => {
|
|
6665
8882
|
var _b = _a, {
|
|
6666
8883
|
expanded,
|
|
@@ -6788,9 +9005,9 @@ var FloatingToolbarWithFabBase = React36__namespace.forwardRef(
|
|
|
6788
9005
|
}
|
|
6789
9006
|
);
|
|
6790
9007
|
FloatingToolbarWithFabBase.displayName = "FloatingToolbarWithFabBase";
|
|
6791
|
-
var HorizontalFloatingToolbarWithFab =
|
|
9008
|
+
var HorizontalFloatingToolbarWithFab = React37__namespace.forwardRef((props, ref) => /* @__PURE__ */ jsxRuntime.jsx(FloatingToolbarWithFabBase, __spreadValues({ ref, orientation: "horizontal" }, props)));
|
|
6792
9009
|
HorizontalFloatingToolbarWithFab.displayName = "HorizontalFloatingToolbarWithFab";
|
|
6793
|
-
var VerticalFloatingToolbarWithFab =
|
|
9010
|
+
var VerticalFloatingToolbarWithFab = React37__namespace.forwardRef((props, ref) => /* @__PURE__ */ jsxRuntime.jsx(FloatingToolbarWithFabBase, __spreadValues({ ref, orientation: "vertical" }, props)));
|
|
6794
9011
|
VerticalFloatingToolbarWithFab.displayName = "VerticalFloatingToolbarWithFab";
|
|
6795
9012
|
var ToolbarDivider = ({
|
|
6796
9013
|
orientation: propsOrientation,
|
|
@@ -6826,7 +9043,7 @@ var VARIANT_TO_COLOR_STYLE = {
|
|
|
6826
9043
|
tonal: "tonal",
|
|
6827
9044
|
filled: "filled"
|
|
6828
9045
|
};
|
|
6829
|
-
var ToolbarIconButton =
|
|
9046
|
+
var ToolbarIconButton = React37__namespace.forwardRef(
|
|
6830
9047
|
(_a, ref) => {
|
|
6831
9048
|
var _b = _a, {
|
|
6832
9049
|
emphasis = "standard",
|
|
@@ -6888,13 +9105,13 @@ function useFloatingToolbarScrollBehavior(options = {}) {
|
|
|
6888
9105
|
expandThreshold = 10,
|
|
6889
9106
|
scrollContainerRef
|
|
6890
9107
|
} = options;
|
|
6891
|
-
const [isExpanded, setIsExpanded] =
|
|
6892
|
-
const [offset, setOffset] =
|
|
9108
|
+
const [isExpanded, setIsExpanded] = React37.useState(true);
|
|
9109
|
+
const [offset, setOffset] = React37.useState(0);
|
|
6893
9110
|
const { scrollY } = react.useScroll({
|
|
6894
9111
|
container: scrollContainerRef
|
|
6895
9112
|
});
|
|
6896
|
-
const lastScrollY =
|
|
6897
|
-
const accumulatedScroll =
|
|
9113
|
+
const lastScrollY = React37.useRef(0);
|
|
9114
|
+
const accumulatedScroll = React37.useRef(0);
|
|
6898
9115
|
react.useMotionValueEvent(scrollY, "change", (currentScrollY) => {
|
|
6899
9116
|
const deltaY = currentScrollY - lastScrollY.current;
|
|
6900
9117
|
if (currentScrollY < 0) return;
|
|
@@ -6916,7 +9133,7 @@ function useFloatingToolbarScrollBehavior(options = {}) {
|
|
|
6916
9133
|
}
|
|
6917
9134
|
}
|
|
6918
9135
|
});
|
|
6919
|
-
|
|
9136
|
+
React37.useEffect(() => {
|
|
6920
9137
|
if (typeof window !== "undefined") {
|
|
6921
9138
|
const matchMedia = window.matchMedia("(forced-colors: active)");
|
|
6922
9139
|
if (matchMedia.matches) {
|
|
@@ -6947,6 +9164,34 @@ function useFloatingToolbarScrollBehavior(options = {}) {
|
|
|
6947
9164
|
exitDirection
|
|
6948
9165
|
};
|
|
6949
9166
|
}
|
|
9167
|
+
var BUTTON_RADIUS_SPRING = FAST_EFFECTS_SPRING;
|
|
9168
|
+
({
|
|
9169
|
+
xs: {
|
|
9170
|
+
// 1dp
|
|
9171
|
+
squareShapeRadius: m3Tokens.cornerRadius.medium,
|
|
9172
|
+
// 12dp
|
|
9173
|
+
pressedShapeRadius: m3Tokens.cornerRadius.small},
|
|
9174
|
+
sm: {
|
|
9175
|
+
// 1dp
|
|
9176
|
+
squareShapeRadius: m3Tokens.cornerRadius.medium,
|
|
9177
|
+
// 12dp
|
|
9178
|
+
pressedShapeRadius: m3Tokens.cornerRadius.small},
|
|
9179
|
+
md: {
|
|
9180
|
+
// 1dp
|
|
9181
|
+
squareShapeRadius: m3Tokens.cornerRadius.large,
|
|
9182
|
+
// 16dp
|
|
9183
|
+
pressedShapeRadius: m3Tokens.cornerRadius.medium},
|
|
9184
|
+
lg: {
|
|
9185
|
+
// 2dp
|
|
9186
|
+
squareShapeRadius: m3Tokens.cornerRadius.extraLarge,
|
|
9187
|
+
// 28dp
|
|
9188
|
+
pressedShapeRadius: m3Tokens.cornerRadius.large},
|
|
9189
|
+
xl: {
|
|
9190
|
+
// 3dp
|
|
9191
|
+
squareShapeRadius: m3Tokens.cornerRadius.extraLarge,
|
|
9192
|
+
// 28dp
|
|
9193
|
+
pressedShapeRadius: m3Tokens.cornerRadius.large}
|
|
9194
|
+
});
|
|
6950
9195
|
var MOTION_PROP_KEYS = [
|
|
6951
9196
|
"animate",
|
|
6952
9197
|
"exit",
|
|
@@ -6970,36 +9215,41 @@ var MOTION_PROP_KEYS = [
|
|
|
6970
9215
|
"layoutId",
|
|
6971
9216
|
"onLayoutAnimationComplete"
|
|
6972
9217
|
];
|
|
6973
|
-
var ToolbarToggleButton =
|
|
9218
|
+
var ToolbarToggleButton = React37__namespace.forwardRef(
|
|
6974
9219
|
(_a, ref) => {
|
|
6975
9220
|
var _b = _a, {
|
|
6976
9221
|
emphasis = "standard",
|
|
6977
9222
|
selected = false,
|
|
6978
9223
|
icon,
|
|
6979
9224
|
children,
|
|
6980
|
-
|
|
6981
|
-
|
|
9225
|
+
pressExpand = true,
|
|
9226
|
+
pressExpandRatio = 0.06,
|
|
6982
9227
|
ripple = true,
|
|
6983
9228
|
asChild = false,
|
|
6984
9229
|
className,
|
|
6985
9230
|
type = "button",
|
|
6986
9231
|
disabled,
|
|
6987
|
-
onPointerDown: onPointerDownProp
|
|
9232
|
+
onPointerDown: onPointerDownProp,
|
|
9233
|
+
onPointerUp: onPointerUpProp,
|
|
9234
|
+
onPointerLeave: onPointerLeaveProp
|
|
6988
9235
|
} = _b, props = __objRest(_b, [
|
|
6989
9236
|
"emphasis",
|
|
6990
9237
|
"selected",
|
|
6991
9238
|
"icon",
|
|
6992
9239
|
"children",
|
|
6993
|
-
"
|
|
6994
|
-
"
|
|
9240
|
+
"pressExpand",
|
|
9241
|
+
"pressExpandRatio",
|
|
6995
9242
|
"ripple",
|
|
6996
9243
|
"asChild",
|
|
6997
9244
|
"className",
|
|
6998
9245
|
"type",
|
|
6999
9246
|
"disabled",
|
|
7000
|
-
"onPointerDown"
|
|
9247
|
+
"onPointerDown",
|
|
9248
|
+
"onPointerUp",
|
|
9249
|
+
"onPointerLeave"
|
|
7001
9250
|
]);
|
|
7002
9251
|
const context = useToolbarContext();
|
|
9252
|
+
const [isPressed, setIsPressed] = React37__namespace.useState(false);
|
|
7003
9253
|
const {
|
|
7004
9254
|
ripples,
|
|
7005
9255
|
onPointerDown: handleRipplePointerDown,
|
|
@@ -7007,8 +9257,9 @@ var ToolbarToggleButton = React36__namespace.forwardRef(
|
|
|
7007
9257
|
} = useRippleState({
|
|
7008
9258
|
disabled: Boolean(disabled) || !ripple
|
|
7009
9259
|
});
|
|
7010
|
-
const handlePointerDown =
|
|
9260
|
+
const handlePointerDown = React37__namespace.useCallback(
|
|
7011
9261
|
(e) => {
|
|
9262
|
+
setIsPressed(true);
|
|
7012
9263
|
if (!disabled && ripple) {
|
|
7013
9264
|
handleRipplePointerDown(e);
|
|
7014
9265
|
}
|
|
@@ -7016,7 +9267,21 @@ var ToolbarToggleButton = React36__namespace.forwardRef(
|
|
|
7016
9267
|
},
|
|
7017
9268
|
[disabled, ripple, handleRipplePointerDown, onPointerDownProp]
|
|
7018
9269
|
);
|
|
7019
|
-
const
|
|
9270
|
+
const handlePointerUp = React37__namespace.useCallback(
|
|
9271
|
+
(e) => {
|
|
9272
|
+
setIsPressed(false);
|
|
9273
|
+
onPointerUpProp == null ? void 0 : onPointerUpProp(e);
|
|
9274
|
+
},
|
|
9275
|
+
[onPointerUpProp]
|
|
9276
|
+
);
|
|
9277
|
+
const handlePointerLeave = React37__namespace.useCallback(
|
|
9278
|
+
(e) => {
|
|
9279
|
+
setIsPressed(false);
|
|
9280
|
+
onPointerLeaveProp == null ? void 0 : onPointerLeaveProp(e);
|
|
9281
|
+
},
|
|
9282
|
+
[onPointerLeaveProp]
|
|
9283
|
+
);
|
|
9284
|
+
const baseClasses = "relative overflow-hidden inline-flex items-center justify-center min-w-[95px] h-[48px] px-4 text-sm font-medium select-none focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-current/40 disabled:pointer-events-none disabled:opacity-38";
|
|
7020
9285
|
const variantClasses = {
|
|
7021
9286
|
standard: selected ? "bg-current/16 text-current hover:bg-current/20 active:bg-current/24" : "bg-transparent text-current hover:bg-current/8 active:bg-current/12",
|
|
7022
9287
|
tonal: selected ? "bg-m3-secondary-container text-m3-on-secondary-container hover:shadow-sm" : "bg-m3-surface-container-high text-m3-on-surface hover:bg-m3-surface-container-highest",
|
|
@@ -7028,27 +9293,17 @@ var ToolbarToggleButton = React36__namespace.forwardRef(
|
|
|
7028
9293
|
context == null ? void 0 : context.itemClassName,
|
|
7029
9294
|
className
|
|
7030
9295
|
);
|
|
7031
|
-
const
|
|
9296
|
+
const animateConfig = React37__namespace.useMemo(
|
|
7032
9297
|
() => ({
|
|
7033
|
-
|
|
7034
|
-
|
|
7035
|
-
0,
|
|
7036
|
-
-pressBounceOffset,
|
|
7037
|
-
pressBounceOffset,
|
|
7038
|
-
-pressBounceOffset / 2,
|
|
7039
|
-
pressBounceOffset / 2,
|
|
7040
|
-
0
|
|
7041
|
-
] : 0
|
|
9298
|
+
scaleX: pressExpand && isPressed ? 1 + pressExpandRatio : 1,
|
|
9299
|
+
borderRadius: isPressed ? ToolbarToggleButtonRadiusTokens.pressedRadius : ToolbarToggleButtonRadiusTokens.pillRadius
|
|
7042
9300
|
}),
|
|
7043
|
-
[
|
|
9301
|
+
[pressExpand, pressExpandRatio, isPressed]
|
|
7044
9302
|
);
|
|
7045
|
-
const transitionConfig =
|
|
7046
|
-
() =>
|
|
7047
|
-
|
|
7048
|
-
|
|
7049
|
-
duration: 0.35,
|
|
7050
|
-
ease: "easeInOut"
|
|
7051
|
-
}
|
|
9303
|
+
const transitionConfig = React37__namespace.useMemo(
|
|
9304
|
+
() => ({
|
|
9305
|
+
scaleX: FAST_SPATIAL_SPRING,
|
|
9306
|
+
borderRadius: BUTTON_RADIUS_SPRING
|
|
7052
9307
|
}),
|
|
7053
9308
|
[]
|
|
7054
9309
|
);
|
|
@@ -7067,7 +9322,7 @@ var ToolbarToggleButton = React36__namespace.forwardRef(
|
|
|
7067
9322
|
children && (typeof children === "string" || typeof children === "number" ? /* @__PURE__ */ jsxRuntime.jsx("span", { children }) : children)
|
|
7068
9323
|
] });
|
|
7069
9324
|
if (asChild) {
|
|
7070
|
-
const child =
|
|
9325
|
+
const child = React37__namespace.Children.only(children);
|
|
7071
9326
|
const childContent = child.props.children;
|
|
7072
9327
|
const innerChildContent = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
7073
9328
|
ripple && /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -7102,9 +9357,11 @@ var ToolbarToggleButton = React36__namespace.forwardRef(
|
|
|
7102
9357
|
ref,
|
|
7103
9358
|
"aria-pressed": selected,
|
|
7104
9359
|
className: combinedClassName,
|
|
7105
|
-
onPointerDown: handlePointerDown
|
|
9360
|
+
onPointerDown: handlePointerDown,
|
|
9361
|
+
onPointerUp: handlePointerUp,
|
|
9362
|
+
onPointerLeave: handlePointerLeave
|
|
7106
9363
|
}, strippedProps), {
|
|
7107
|
-
children:
|
|
9364
|
+
children: React37__namespace.cloneElement(child, { children: innerChildContent })
|
|
7108
9365
|
})
|
|
7109
9366
|
) });
|
|
7110
9367
|
}
|
|
@@ -7115,9 +9372,13 @@ var ToolbarToggleButton = React36__namespace.forwardRef(
|
|
|
7115
9372
|
type,
|
|
7116
9373
|
"aria-pressed": selected,
|
|
7117
9374
|
disabled,
|
|
7118
|
-
|
|
9375
|
+
animate: animateConfig,
|
|
7119
9376
|
transition: transitionConfig,
|
|
9377
|
+
initial: false,
|
|
9378
|
+
style: { transformOrigin: "center" },
|
|
7120
9379
|
onPointerDown: handlePointerDown,
|
|
9380
|
+
onPointerUp: handlePointerUp,
|
|
9381
|
+
onPointerLeave: handlePointerLeave,
|
|
7121
9382
|
className: combinedClassName
|
|
7122
9383
|
}, props), {
|
|
7123
9384
|
children: [
|
|
@@ -7221,7 +9482,9 @@ exports.VerticalMenuContent = VerticalMenuContent;
|
|
|
7221
9482
|
exports.VerticalMenuDivider = VerticalMenuDivider;
|
|
7222
9483
|
exports.VerticalMenuGroup = VerticalMenuGroup;
|
|
7223
9484
|
exports.appBarTypography = appBarTypography;
|
|
9485
|
+
exports.getNavigationShapeStyle = getNavigationShapeStyle;
|
|
7224
9486
|
exports.getToolbarColors = getToolbarColors;
|
|
9487
|
+
exports.isSquareShape = isSquareShape;
|
|
7225
9488
|
exports.standardFloatingToolbarColors = standardFloatingToolbarColors;
|
|
7226
9489
|
exports.surfaceContainerHighFloatingToolbarColors = surfaceContainerHighFloatingToolbarColors;
|
|
7227
9490
|
exports.surfaceContainerHighestFloatingToolbarColors = surfaceContainerHighestFloatingToolbarColors;
|