xmlui 0.11.11 → 0.11.13

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.
@@ -12,7 +12,6 @@ import Color from "color";
12
12
  import toast, { Toaster, ToastBar } from "react-hot-toast";
13
13
  import { useLocation, NavLink as NavLink$1, useNavigate, Link, Routes, Route, Navigate, useParams, useSearchParams } from "@remix-run/react";
14
14
  import * as SheetPrimitive from "@radix-ui/react-dialog";
15
- import * as ReactDropdownMenu from "@radix-ui/react-dropdown-menu";
16
15
  import { DropdownMenu as DropdownMenu$1, DropdownMenuTrigger, DropdownMenuPortal, DropdownMenuContent as DropdownMenuContent$1, DropdownMenuItem as DropdownMenuItem$1, DropdownMenuSub, DropdownMenuSubTrigger as DropdownMenuSubTrigger$1, DropdownMenuSubContent as DropdownMenuSubContent$1 } from "@radix-ui/react-dropdown-menu";
17
16
  import { createContext as createContext$1, useContextSelector } from "use-context-selector";
18
17
  import { parseRegExpLiteral } from "@eslint-community/regexpp";
@@ -2962,6 +2961,9 @@ const Button = React__default.forwardRef(function Button2({
2962
2961
  }, 0);
2963
2962
  }
2964
2963
  }, [autoFocus]);
2964
+ if (variant === "") {
2965
+ variant = defaultProps$1g.variant;
2966
+ }
2965
2967
  const iconToLeft = iconPosition === "start";
2966
2968
  if (!isSizeType(size)) {
2967
2969
  size = defaultProps$1g.size;
@@ -4546,9 +4548,10 @@ const TextBox = forwardRef(function TextBox2({
4546
4548
  useEffect(() => {
4547
4549
  setLocalValue(value);
4548
4550
  }, [value]);
4551
+ const normalizedInitialValue = initialValue ?? "";
4549
4552
  useEffect(() => {
4550
- updateState({ value: initialValue }, { initial: true });
4551
- }, [initialValue, updateState]);
4553
+ updateState({ value: normalizedInitialValue }, { initial: true });
4554
+ }, [normalizedInitialValue, updateState]);
4552
4555
  const updateValue = useCallback(
4553
4556
  (value2) => {
4554
4557
  setLocalValue(value2);
@@ -4630,6 +4633,15 @@ const TextBox = forwardRef(function TextBox2({
4630
4633
  required: required2
4631
4634
  }
4632
4635
  ),
4636
+ !readOnly2 && enabled2 && type == "search" && localValue?.length > 0 && /* @__PURE__ */ jsx(
4637
+ Adornment,
4638
+ {
4639
+ "data-part-id": PART_END_ADORNMENT,
4640
+ iconName: "close",
4641
+ className: styles$1g.adornment,
4642
+ onClick: () => updateValue("")
4643
+ }
4644
+ ),
4633
4645
  type === "password" && showPasswordToggle ? /* @__PURE__ */ jsx(
4634
4646
  Adornment,
4635
4647
  {
@@ -6764,6 +6776,7 @@ const XmlUiThemeDefinition = {
6764
6776
  resources: {
6765
6777
  // "font.inter": "https://rsms.me/inter/inter.css",
6766
6778
  },
6779
+ color: "$color-primary-500",
6767
6780
  themeVars: {
6768
6781
  "font-size": "15px",
6769
6782
  "boxShadow-Input": "$boxShadow-sm"
@@ -6785,46 +6798,55 @@ const XmlUiThemeDefinition = {
6785
6798
  const XmlUiGreenThemeDefinition = {
6786
6799
  id: "xmlui-green",
6787
6800
  extends: "xmlui",
6801
+ color: "$color-primary-500",
6788
6802
  themeVars: { ...greenThemeColors }
6789
6803
  };
6790
6804
  const XmlUiGrayThemeDefinition = {
6791
6805
  id: "xmlui-gray",
6792
6806
  extends: "xmlui",
6807
+ color: "$color-primary-500",
6793
6808
  themeVars: { ...grayThemeColors }
6794
6809
  };
6795
6810
  const XmlUiOrangeThemeDefinition = {
6796
6811
  id: "xmlui-orange",
6797
6812
  extends: "xmlui",
6813
+ color: "$color-primary-500",
6798
6814
  themeVars: { ...orangeThemeColors }
6799
6815
  };
6800
6816
  const XmlUiPurpleThemeDefinition = {
6801
6817
  id: "xmlui-purple",
6802
6818
  extends: "xmlui",
6819
+ color: "$color-primary-500",
6803
6820
  themeVars: { ...purpleThemeColors }
6804
6821
  };
6805
6822
  const XmlUiCyanThemeDefinition = {
6806
6823
  id: "xmlui-cyan",
6807
6824
  extends: "xmlui",
6825
+ color: "$color-primary-500",
6808
6826
  themeVars: { ...cyanThemeColors }
6809
6827
  };
6810
6828
  const XmlUiRedThemeDefinition = {
6811
6829
  id: "xmlui-red",
6812
6830
  extends: "xmlui",
6831
+ color: "$color-primary-500",
6813
6832
  themeVars: { ...redThemeColors }
6814
6833
  };
6815
6834
  const XmlUiDocsThemeDefinition = {
6816
6835
  id: "xmlui-docs",
6817
6836
  extends: "xmlui",
6837
+ color: "$color-primary-500",
6818
6838
  themeVars: {}
6819
6839
  };
6820
6840
  const XmlUiBlogThemeDefinition = {
6821
6841
  id: "xmlui-blog",
6822
6842
  extends: "xmlui",
6843
+ color: "$color-primary-500",
6823
6844
  themeVars: {}
6824
6845
  };
6825
6846
  const XmlUiWebThemeDefinition = {
6826
6847
  id: "xmlui-web",
6827
6848
  extends: "xmlui",
6849
+ color: "$color-primary-500",
6828
6850
  themeVars: {
6829
6851
  // --- Fundamental colors & typography
6830
6852
  "maxWidth-content-AppHeader": "1280px",
@@ -8209,9 +8231,16 @@ const DropDownNavGroup = forwardRef(function DropDownNavGroup2({
8209
8231
  Trigger2 = DropdownMenuSubTrigger$1;
8210
8232
  Content2 = DropdownMenuSubContent$1;
8211
8233
  }
8212
- const [expanded2, setExpanded] = useState(initiallyExpanded);
8234
+ const [expanded2, setExpanded] = useState(false);
8213
8235
  const [renderCount, setRenderCount] = useState(false);
8214
- useEffect(() => setRenderCount(true), []);
8236
+ useEffect(() => {
8237
+ setRenderCount(true);
8238
+ if (initiallyExpanded) {
8239
+ requestAnimationFrame(() => {
8240
+ setExpanded(true);
8241
+ });
8242
+ }
8243
+ }, [initiallyExpanded]);
8215
8244
  return /* @__PURE__ */ jsxs(
8216
8245
  Wrapper,
8217
8246
  {
@@ -18393,6 +18422,11 @@ const styles$Z = {
18393
18422
  wrapper: wrapper$h,
18394
18423
  DropdownMenuSeparator
18395
18424
  };
18425
+ const DropdownMenuContext = createContext(null);
18426
+ const useDropdownMenuContext = () => {
18427
+ const context = useContext(DropdownMenuContext);
18428
+ return context;
18429
+ };
18396
18430
  const defaultDropdownMenuProps = {
18397
18431
  alignment: "start",
18398
18432
  triggerButtonVariant: "ghost",
@@ -18433,11 +18467,44 @@ const DropdownMenu = forwardRef(function DropdownMenu2({
18433
18467
  }
18434
18468
  };
18435
18469
  }, []);
18436
- return /* @__PURE__ */ jsxs(
18437
- ReactDropdownMenu.Root,
18470
+ const closeMenu = useCallback(() => {
18471
+ setOpen(false);
18472
+ }, []);
18473
+ const contentRef = useRef(null);
18474
+ const handleKeyDown = useCallback((event) => {
18475
+ if (event.key === "Escape") {
18476
+ setOpen(false);
18477
+ return;
18478
+ }
18479
+ if (event.key === "ArrowDown" || event.key === "ArrowUp") {
18480
+ event.preventDefault();
18481
+ const content2 = contentRef.current;
18482
+ if (!content2) return;
18483
+ const menuItems = Array.from(
18484
+ content2.querySelectorAll('[role="menuitem"]:not([class*="disabled"])')
18485
+ );
18486
+ if (menuItems.length === 0) return;
18487
+ const currentIndex = menuItems.findIndex((item2) => item2 === document.activeElement);
18488
+ let nextIndex;
18489
+ if (currentIndex === -1) {
18490
+ nextIndex = event.key === "ArrowDown" ? 0 : menuItems.length - 1;
18491
+ } else if (event.key === "ArrowDown") {
18492
+ nextIndex = currentIndex < menuItems.length - 1 ? currentIndex + 1 : 0;
18493
+ } else {
18494
+ nextIndex = currentIndex > 0 ? currentIndex - 1 : menuItems.length - 1;
18495
+ }
18496
+ menuItems[nextIndex]?.focus();
18497
+ }
18498
+ if (event.key === "Enter" || event.key === " ") {
18499
+ return;
18500
+ }
18501
+ }, []);
18502
+ return /* @__PURE__ */ jsx(DropdownMenuContext.Provider, { value: { closeMenu }, children: /* @__PURE__ */ jsxs(
18503
+ Popover,
18438
18504
  {
18439
18505
  open,
18440
18506
  onOpenChange: async (isOpen) => {
18507
+ if (disabled2) return;
18441
18508
  if (isOpen) {
18442
18509
  if (closeTimeoutRef.current) {
18443
18510
  clearTimeout(closeTimeoutRef.current);
@@ -18455,31 +18522,51 @@ const DropdownMenu = forwardRef(function DropdownMenu2({
18455
18522
  }, 0);
18456
18523
  }
18457
18524
  },
18525
+ modal: false,
18458
18526
  children: [
18459
- /* @__PURE__ */ jsx(ReactDropdownMenu.Trigger, { ...rest, asChild: true, disabled: disabled2, ref, children: triggerTemplate ? triggerTemplate : /* @__PURE__ */ jsx(
18460
- Button,
18527
+ /* @__PURE__ */ jsx(
18528
+ PopoverTrigger,
18461
18529
  {
18462
- icon: /* @__PURE__ */ jsx(Icon$l, { name: triggerButtonIcon, fallback: "chevrondown" }),
18463
- iconPosition: triggerButtonIconPosition,
18464
- type: "button",
18465
- variant: triggerButtonVariant,
18466
- themeColor: triggerButtonThemeColor,
18530
+ ...rest,
18531
+ asChild: true,
18467
18532
  disabled: disabled2,
18468
- children: label2
18533
+ ref,
18534
+ "aria-haspopup": "menu",
18535
+ "aria-expanded": open,
18536
+ children: triggerTemplate ? triggerTemplate : /* @__PURE__ */ jsx(
18537
+ Button,
18538
+ {
18539
+ icon: /* @__PURE__ */ jsx(Icon$l, { name: triggerButtonIcon, fallback: "chevrondown" }),
18540
+ iconPosition: triggerButtonIconPosition,
18541
+ type: "button",
18542
+ variant: triggerButtonVariant,
18543
+ themeColor: triggerButtonThemeColor,
18544
+ disabled: disabled2,
18545
+ children: label2
18546
+ }
18547
+ )
18469
18548
  }
18470
- ) }),
18471
- /* @__PURE__ */ jsx(ReactDropdownMenu.Portal, { container: root2, children: /* @__PURE__ */ jsx(
18472
- ReactDropdownMenu.Content,
18549
+ ),
18550
+ /* @__PURE__ */ jsx(Portal, { container: root2, children: /* @__PURE__ */ jsx(
18551
+ PopoverContent,
18473
18552
  {
18553
+ ref: contentRef,
18474
18554
  align: alignment,
18475
18555
  style: style2,
18476
18556
  className: classnames(styles$Z.DropdownMenuContent, className),
18557
+ onOpenAutoFocus: (e) => {
18558
+ e.preventDefault();
18559
+ contentRef.current?.focus();
18560
+ },
18561
+ onKeyDownCapture: handleKeyDown,
18562
+ role: "menu",
18563
+ tabIndex: -1,
18477
18564
  children
18478
18565
  }
18479
18566
  ) })
18480
18567
  ]
18481
18568
  }
18482
- );
18569
+ ) });
18483
18570
  });
18484
18571
  const defaultMenuItemProps = {
18485
18572
  iconPosition: "start",
@@ -18497,26 +18584,45 @@ const MenuItem = forwardRef(function MenuItem2({
18497
18584
  enabled: enabled2 = true
18498
18585
  }, ref) {
18499
18586
  const iconToStart = iconPosition === "start";
18587
+ const context = useDropdownMenuContext();
18588
+ const handleClick = useCallback(
18589
+ (event) => {
18590
+ if (!enabled2) return;
18591
+ onClick(event);
18592
+ context?.closeMenu();
18593
+ },
18594
+ [enabled2, onClick, context]
18595
+ );
18596
+ const handleKeyDown = useCallback(
18597
+ (event) => {
18598
+ if (!enabled2) return;
18599
+ if (event.key === "Enter") {
18600
+ event.preventDefault();
18601
+ event.stopPropagation();
18602
+ onClick(event);
18603
+ context?.closeMenu();
18604
+ } else if (event.key === " ") {
18605
+ event.preventDefault();
18606
+ event.stopPropagation();
18607
+ onClick(event);
18608
+ context?.closeMenu();
18609
+ }
18610
+ },
18611
+ [enabled2, onClick, context]
18612
+ );
18500
18613
  return /* @__PURE__ */ jsxs(
18501
- ReactDropdownMenu.Item,
18614
+ "div",
18502
18615
  {
18503
18616
  style: style2,
18504
18617
  className: classnames(className, styles$Z.DropdownMenuItem, {
18505
18618
  [styles$Z.active]: active2,
18506
18619
  [styles$Z.disabled]: !enabled2
18507
18620
  }),
18508
- onClick: (event) => {
18509
- if (!enabled2) {
18510
- event.preventDefault();
18511
- event.stopPropagation();
18512
- return;
18513
- }
18514
- event.stopPropagation();
18515
- if (enabled2) {
18516
- onClick(event);
18517
- }
18518
- },
18519
18621
  ref,
18622
+ onClick: handleClick,
18623
+ onKeyDown: handleKeyDown,
18624
+ role: "menuitem",
18625
+ tabIndex: enabled2 ? 0 : -1,
18520
18626
  children: [
18521
18627
  iconToStart && icon2,
18522
18628
  /* @__PURE__ */ jsx("div", { className: styles$Z.wrapper, children: label2 ?? children }),
@@ -18525,17 +18631,38 @@ const MenuItem = forwardRef(function MenuItem2({
18525
18631
  }
18526
18632
  );
18527
18633
  });
18528
- const SubMenuItem = forwardRef(
18529
- function SubMenuItem2({ children, label: label2, triggerTemplate }, ref) {
18530
- const { root: root2 } = useTheme();
18531
- return /* @__PURE__ */ jsxs(ReactDropdownMenu.Sub, { children: [
18532
- /* @__PURE__ */ jsx(ReactDropdownMenu.SubTrigger, { className: styles$Z.DropdownMenuSubTrigger, asChild: true, ref, children: triggerTemplate ? triggerTemplate : /* @__PURE__ */ jsx("div", { children: label2 }) }),
18533
- /* @__PURE__ */ jsx(ReactDropdownMenu.Portal, { container: root2, children: /* @__PURE__ */ jsx(ReactDropdownMenu.SubContent, { className: styles$Z.DropdownMenuSubContent, children }) })
18534
- ] });
18535
- }
18536
- );
18634
+ const SubMenuItem = forwardRef(function SubMenuItem2({ children, label: label2, triggerTemplate }, ref) {
18635
+ const { root: root2 } = useTheme();
18636
+ const [open, setOpen] = useState(false);
18637
+ return /* @__PURE__ */ jsxs(Popover, { open, onOpenChange: setOpen, modal: false, children: [
18638
+ /* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx(
18639
+ "div",
18640
+ {
18641
+ className: styles$Z.DropdownMenuSubTrigger,
18642
+ role: "menuitem",
18643
+ tabIndex: 0,
18644
+ ref,
18645
+ onMouseEnter: () => setOpen(true),
18646
+ onMouseLeave: () => setOpen(false),
18647
+ children: triggerTemplate ? triggerTemplate : /* @__PURE__ */ jsx("div", { children: label2 })
18648
+ }
18649
+ ) }),
18650
+ /* @__PURE__ */ jsx(Portal, { container: root2, children: /* @__PURE__ */ jsx(
18651
+ PopoverContent,
18652
+ {
18653
+ className: styles$Z.DropdownMenuSubContent,
18654
+ side: "right",
18655
+ align: "start",
18656
+ onMouseEnter: () => setOpen(true),
18657
+ onMouseLeave: () => setOpen(false),
18658
+ onOpenAutoFocus: (e) => e.preventDefault(),
18659
+ children
18660
+ }
18661
+ ) })
18662
+ ] });
18663
+ });
18537
18664
  const MenuSeparator = forwardRef(function MenuSeparator2(props, ref) {
18538
- return /* @__PURE__ */ jsx(ReactDropdownMenu.Separator, { ref, className: styles$Z.DropdownMenuSeparator, ...props });
18665
+ return /* @__PURE__ */ jsx("div", { ref, className: styles$Z.DropdownMenuSeparator, role: "separator", ...props });
18539
18666
  });
18540
18667
  const DDMCOMP = "DropdownMenu";
18541
18668
  const DropdownMenuMd = createMetadata({
@@ -25666,8 +25793,6 @@ const NavLinkMd = createMetadata({
25666
25793
  [`fontFamily-${COMP$19}`]: "$fontFamily",
25667
25794
  [`textColor-${COMP$19}`]: "$textColor-primary",
25668
25795
  [`textColor-${COMP$19}--active`]: "$color-primary-500",
25669
- [`fontWeight-${COMP$19}--active`]: "$fontWeight-bold",
25670
- [`fontWeight-${COMP$19}--pressed`]: "$fontWeight-bold",
25671
25796
  [`thickness-indicator-${COMP$19}`]: "$space-0_5",
25672
25797
  [`outlineColor-${COMP$19}--focus`]: "$outlineColor--focus",
25673
25798
  [`outlineWidth-${COMP$19}--focus`]: "$outlineWidth--focus",
@@ -35298,9 +35423,10 @@ function isMediaBreakpoint(value) {
35298
35423
  }
35299
35424
  const tooltipBehavior = {
35300
35425
  name: "tooltip",
35301
- canAttach: (node) => {
35302
- const tooltipText = node.props?.tooltip;
35303
- const tooltipMarkdown = node.props?.tooltipMarkdown;
35426
+ canAttach: (context, node) => {
35427
+ const { extractValue } = context;
35428
+ const tooltipText = extractValue(node.props?.tooltip, true);
35429
+ const tooltipMarkdown = extractValue(node.props?.tooltipMarkdown, true);
35304
35430
  return !!tooltipText || !!tooltipMarkdown;
35305
35431
  },
35306
35432
  attach: (context, node, metadata) => {
@@ -35314,8 +35440,10 @@ const tooltipBehavior = {
35314
35440
  };
35315
35441
  const animationBehavior = {
35316
35442
  name: "animation",
35317
- canAttach: (node) => {
35318
- return !!node.props?.animation;
35443
+ canAttach: (context, node) => {
35444
+ const { extractValue } = context;
35445
+ const animation = extractValue(node.props?.animation, true);
35446
+ return !!animation;
35319
35447
  },
35320
35448
  attach: (context, node, metadata) => {
35321
35449
  const { extractValue } = context;
@@ -35329,10 +35457,13 @@ const animationBehavior = {
35329
35457
  };
35330
35458
  const labelBehavior = {
35331
35459
  name: "label",
35332
- canAttach: (node, metadata) => {
35460
+ canAttach: (context, node, metadata) => {
35333
35461
  if (metadata?.props?.label) {
35334
35462
  return false;
35335
- } else if (!node.props?.label) {
35463
+ }
35464
+ const { extractValue } = context;
35465
+ const label2 = extractValue(node.props?.label, true);
35466
+ if (!label2) {
35336
35467
  return false;
35337
35468
  }
35338
35469
  return true;
@@ -35369,14 +35500,15 @@ const labelBehavior = {
35369
35500
  };
35370
35501
  const variantBehavior = {
35371
35502
  name: "variant",
35372
- canAttach: (node) => {
35373
- const variant = node.props?.variant;
35503
+ canAttach: (context, node) => {
35504
+ const { extractValue } = context;
35505
+ const variant = extractValue(node.props?.variant, true);
35374
35506
  if (!variant) {
35375
35507
  return false;
35376
35508
  }
35377
35509
  if (node.type === "Button") {
35378
35510
  const variantStr = typeof variant === "string" ? variant : String(variant);
35379
- return !buttonVariantValues.includes(variantStr);
35511
+ return variantStr != void 0 && variantStr !== "" && !buttonVariantValues.includes(variantStr);
35380
35512
  }
35381
35513
  if (node.type === "Badge") {
35382
35514
  const variantStr = typeof variant === "string" ? variant : String(variant);
@@ -36602,7 +36734,7 @@ const defaultProps$o = {
36602
36734
  weekStartsOn: 0,
36603
36735
  inline: true,
36604
36736
  clearable: false,
36605
- clearToInitialValue: true,
36737
+ clearToInitialValue: false,
36606
36738
  required: false,
36607
36739
  readOnly: false,
36608
36740
  autoFocus: false,
@@ -37744,7 +37876,7 @@ const defaultProps$n = {
37744
37876
  hour24: true,
37745
37877
  seconds: false,
37746
37878
  clearable: false,
37747
- clearToInitialValue: true,
37879
+ clearToInitialValue: false,
37748
37880
  required: false,
37749
37881
  readOnly: false,
37750
37882
  autoFocus: false,
@@ -43902,29 +44034,30 @@ const inspectButtonComponentRenderer = createComponentRenderer(
43902
44034
  }
43903
44035
  );
43904
44036
  const themeVars$4 = `'{"padding-NestedApp": "var(--xmlui-padding-NestedApp)", "paddingHorizontal-NestedApp": "var(--xmlui-paddingHorizontal-NestedApp, var(--xmlui-padding-NestedApp))", "paddingVertical-NestedApp": "var(--xmlui-paddingVertical-NestedApp, var(--xmlui-padding-NestedApp))", "paddingLeft-NestedApp": "var(--xmlui-paddingLeft-NestedApp, var(--xmlui-paddingHorizontal-NestedApp, var(--xmlui-padding-NestedApp)))", "paddingRight-NestedApp": "var(--xmlui-paddingRight-NestedApp, var(--xmlui-paddingHorizontal-NestedApp, var(--xmlui-padding-NestedApp)))", "paddingTop-NestedApp": "var(--xmlui-paddingTop-NestedApp, var(--xmlui-paddingVertical-NestedApp, var(--xmlui-padding-NestedApp)))", "paddingBottom-NestedApp": "var(--xmlui-paddingBottom-NestedApp, var(--xmlui-paddingVertical-NestedApp, var(--xmlui-padding-NestedApp)))", "border-NestedApp": "var(--xmlui-border-NestedApp)", "borderHorizontal-NestedApp": "var(--xmlui-borderHorizontal-NestedApp, var(--xmlui-border-NestedApp))", "borderVertical-NestedApp": "var(--xmlui-borderVertical-NestedApp, var(--xmlui-border-NestedApp))", "borderLeft-NestedApp": "var(--xmlui-borderLeft-NestedApp, var(--xmlui-borderHorizontal-NestedApp, var(--xmlui-border-NestedApp)))", "borderRight-NestedApp": "var(--xmlui-borderRight-NestedApp, var(--xmlui-borderHorizontal-NestedApp, var(--xmlui-border-NestedApp)))", "borderTop-NestedApp": "var(--xmlui-borderTop-NestedApp, var(--xmlui-borderVertical-NestedApp, var(--xmlui-border-NestedApp)))", "borderBottom-NestedApp": "var(--xmlui-borderBottom-NestedApp, var(--xmlui-borderVertical-NestedApp, var(--xmlui-border-NestedApp)))", "borderWidth-NestedApp": "var(--xmlui-borderWidth-NestedApp)", "borderHorizontalWidth-NestedApp": "var(--xmlui-borderHorizontalWidth-NestedApp, var(--xmlui-borderWidth-NestedApp))", "borderLeftWidth-NestedApp": "var(--xmlui-borderLeftWidth-NestedApp, var(--xmlui-borderHorizontalWidth-NestedApp, var(--xmlui-borderWidth-NestedApp)))", "borderRightWidth-NestedApp": "var(--xmlui-borderRightWidth-NestedApp, var(--xmlui-borderHorizontalWidth-NestedApp, var(--xmlui-borderWidth-NestedApp)))", "borderVerticalWidth-NestedApp": "var(--xmlui-borderVerticalWidth-NestedApp, var(--xmlui-borderWidth-NestedApp))", "borderTopWidth-NestedApp": "var(--xmlui-borderTopWidth-NestedApp, var(--xmlui-borderVerticalWidth-NestedApp, var(--xmlui-borderWidth-NestedApp)))", "borderBottomWidth-NestedApp": "var(--xmlui-borderBottomWidth-NestedApp, var(--xmlui-borderVerticalWidth-NestedApp, var(--xmlui-borderWidth-NestedApp)))", "borderStyle-NestedApp": "var(--xmlui-borderStyle-NestedApp)", "borderHorizontalStyle-NestedApp": "var(--xmlui-borderHorizontalStyle-NestedApp, var(--xmlui-borderStyle-NestedApp))", "borderLeftStyle-NestedApp": "var(--xmlui-borderLeftStyle-NestedApp, var(--xmlui-borderHorizontalStyle-NestedApp, var(--xmlui-borderStyle-NestedApp)))", "borderRightStyle-NestedApp": "var(--xmlui-borderRightStyle-NestedApp, var(--xmlui-borderHorizontalStyle-NestedApp, var(--xmlui-borderStyle-NestedApp)))", "borderVerticalStyle-NestedApp": "var(--xmlui-borderVerticalStyle-NestedApp, var(--xmlui-borderStyle-NestedApp))", "borderTopStyle-NestedApp": "var(--xmlui-borderTopStyle-NestedApp, var(--xmlui-borderVerticalStyle-NestedApp, var(--xmlui-borderStyle-NestedApp)))", "borderBottomStyle-NestedApp": "var(--xmlui-borderBottomStyle-NestedApp, var(--xmlui-borderVerticalStyle-NestedApp, var(--xmlui-borderStyle-NestedApp)))", "borderColor-NestedApp": "var(--xmlui-borderColor-NestedApp)", "borderHorizontalColor-NestedApp": "var(--xmlui-borderHorizontalColor-NestedApp, var(--xmlui-borderColor-NestedApp))", "borderLeftColor-NestedApp": "var(--xmlui-borderLeftColor-NestedApp, var(--xmlui-borderHorizontalColor-NestedApp, var(--xmlui-borderColor-NestedApp)))", "borderRightColor-NestedApp": "var(--xmlui-borderRightColor-NestedApp, var(--xmlui-borderHorizontalColor-NestedApp, var(--xmlui-borderColor-NestedApp)))", "borderVerticalColor-NestedApp": "var(--xmlui-borderVerticalColor-NestedApp, var(--xmlui-borderColor-NestedApp))", "borderTopColor-NestedApp": "var(--xmlui-borderTopColor-NestedApp, var(--xmlui-borderVerticalColor-NestedApp, var(--xmlui-borderColor-NestedApp)))", "borderBottomColor-NestedApp": "var(--xmlui-borderBottomColor-NestedApp, var(--xmlui-borderVerticalColor-NestedApp, var(--xmlui-borderColor-NestedApp)))", "borderStartStartRadius-NestedApp": "var(--xmlui-borderStartStartRadius-NestedApp, var(--xmlui-borderRadius-NestedApp))", "borderStartEndRadius-NestedApp": "var(--xmlui-borderStartEndRadius-NestedApp, var(--xmlui-borderRadius-NestedApp))", "borderEndStartRadius-NestedApp": "var(--xmlui-borderEndStartRadius-NestedApp, var(--xmlui-borderRadius-NestedApp))", "borderEndEndRadius-NestedApp": "var(--xmlui-borderEndEndRadius-NestedApp, var(--xmlui-borderRadius-NestedApp))", "textColor-header-NestedApp": "var(--xmlui-textColor-header-NestedApp)", "fontFamily-header-NestedApp": "var(--xmlui-fontFamily-header-NestedApp)", "fontSize-header-NestedApp": "var(--xmlui-fontSize-header-NestedApp)", "fontStyle-header-NestedApp": "var(--xmlui-fontStyle-header-NestedApp)", "fontVariant-header-NestedApp": "var(--xmlui-fontVariant-header-NestedApp)", "fontWeight-header-NestedApp": "var(--xmlui-fontWeight-header-NestedApp)", "fontStretch-header-NestedApp": "var(--xmlui-fontStretch-header-NestedApp)", "textDecorationLine-header-NestedApp": "var(--xmlui-textDecorationLine-header-NestedApp)", "textDecorationColor-header-NestedApp": "var(--xmlui-textDecorationColor-header-NestedApp)", "textDecorationStyle-header-NestedApp": "var(--xmlui-textDecorationStyle-header-NestedApp)", "textDecorationThickness-header-NestedApp": "var(--xmlui-textDecorationThickness-header-NestedApp)", "textUnderlineOffset-header-NestedApp": "var(--xmlui-textUnderlineOffset-header-NestedApp)", "lineHeight-header-NestedApp": "var(--xmlui-lineHeight-header-NestedApp)", "backgroundColor-header-NestedApp": "var(--xmlui-backgroundColor-header-NestedApp)", "textTransform-header-NestedApp": "var(--xmlui-textTransform-header-NestedApp)", "letterSpacing-header-NestedApp": "var(--xmlui-letterSpacing-header-NestedApp)", "wordSpacing-header-NestedApp": "var(--xmlui-wordSpacing-header-NestedApp)", "textShadow-header-NestedApp": "var(--xmlui-textShadow-header-NestedApp)", "textIndent-header-NestedApp": "var(--xmlui-textIndent-header-NestedApp)", "textAlign-header-NestedApp": "var(--xmlui-textAlign-header-NestedApp)", "textAlignLast-header-NestedApp": "var(--xmlui-textAlignLast-header-NestedApp)", "wordBreak-header-NestedApp": "var(--xmlui-wordBreak-header-NestedApp)", "wordWrap-header-NestedApp": "var(--xmlui-wordWrap-header-NestedApp)", "direction-header-NestedApp": "var(--xmlui-direction-header-NestedApp)", "writingMode-header-NestedApp": "var(--xmlui-writingMode-header-NestedApp)", "lineBreak-header-NestedApp": "var(--xmlui-lineBreak-header-NestedApp)", "backgroundColor-frame-NestedApp": "var(--xmlui-backgroundColor-frame-NestedApp)", "gap-frame-NestedApp": "var(--xmlui-gap-frame-NestedApp)", "marginTop-NestedApp": "var(--xmlui-marginTop-NestedApp)", "marginBottom-NestedApp": "var(--xmlui-marginBottom-NestedApp)", "boxShadow-NestedApp": "var(--xmlui-boxShadow-NestedApp)", "backgroundColor-viewControls-NestedApp": "var(--xmlui-backgroundColor-viewControls-NestedApp)", "borderRadius-viewControls-NestedApp": "var(--xmlui-borderRadius-viewControls-NestedApp)", "padding-viewControls-NestedApp": "var(--xmlui-padding-viewControls-NestedApp)", "paddingVertical-viewControls-button-NestedApp": "var(--xmlui-paddingVertical-viewControls-button-NestedApp)", "paddingHorizontal-viewControls-button-NestedApp": "var(--xmlui-paddingHorizontal-viewControls-button-NestedApp)", "borderRadius-NestedApp": "var(--xmlui-borderRadius-NestedApp)", "borderBottom-header-NestedApp": "var(--xmlui-borderBottom-header-NestedApp)", "height-logo-splitView-NestedApp": "var(--xmlui-height-logo-splitView-NestedApp)", "width-logo-splitView-NestedApp": "var(--xmlui-width-logo-splitView-NestedApp)", "width-controls-NestedApp": "var(--xmlui-width-controls-NestedApp)", "padding-button-splitView-NestedApp": "var(--xmlui-padding-button-splitView-NestedApp)", "width-button-splitView-NestedApp": "var(--xmlui-width-button-splitView-NestedApp)", "height-button-splitView-NestedApp": "var(--xmlui-height-button-splitView-NestedApp)", "backgroundColor-code-splitView-NestedApp": "var(--xmlui-backgroundColor-code-splitView-NestedApp)", "backgroundColor-button-splitView-NestedApp--active": "var(--xmlui-backgroundColor-button-splitView-NestedApp--active)", "color-button-splitView-NestedApp": "var(--xmlui-color-button-splitView-NestedApp)", "color-button-splitView-NestedApp--active": "var(--xmlui-color-button-splitView-NestedApp--active)", "borderRadius-button-splitView-NestedApp": "var(--xmlui-borderRadius-button-splitView-NestedApp)", "borderColor-button-splitView-NestedApp": "var(--xmlui-borderColor-button-splitView-NestedApp)", "color-loadingText-NestedApp": "var(--xmlui-color-loadingText-NestedApp)"}'`;
43905
- const nestedAppPlaceholder = "_nestedAppPlaceholder_2bz33_14";
43906
- const loadingContainer = "_loadingContainer_2bz33_21";
43907
- const logoWrapper = "_logoWrapper_2bz33_34";
43908
- const animatedLogoPath = "_animatedLogoPath_2bz33_39";
43909
- const loadingText = "_loadingText_2bz33_47";
43910
- const nestedAppRoot = "_nestedAppRoot_2bz33_71";
43911
- const shouldAnimate = "_shouldAnimate_2bz33_79";
43912
- const initialized = "_initialized_2bz33_83";
43913
- const nestedAppContainer = "_nestedAppContainer_2bz33_90";
43914
- const contentContainer = "_contentContainer_2bz33_109";
43915
- const splitViewMarkdown = "_splitViewMarkdown_2bz33_116";
43916
- const hidden = "_hidden_2bz33_125";
43917
- const viewControls = "_viewControls_2bz33_134";
43918
- const logo = "_logo_2bz33_34";
43919
- const splitViewButton = "_splitViewButton_2bz33_146";
43920
- const show = "_show_2bz33_154";
43921
- const hide = "_hide_2bz33_161";
43922
- const header = "_header_2bz33_167";
43923
- const headerText = "_headerText_2bz33_175";
43924
- const headerButton = "_headerButton_2bz33_204";
43925
- const wrapper$3 = "_wrapper_2bz33_211";
43926
- const shadowRoot = "_shadowRoot_2bz33_214";
43927
- const content$1 = "_content_2bz33_109";
44037
+ const nestedAppPlaceholder = "_nestedAppPlaceholder_1n7j8_14";
44038
+ const loadingContainer = "_loadingContainer_1n7j8_21";
44039
+ const logoWrapper = "_logoWrapper_1n7j8_34";
44040
+ const animatedLogoPath = "_animatedLogoPath_1n7j8_39";
44041
+ const loadingText = "_loadingText_1n7j8_47";
44042
+ const nestedAppRoot = "_nestedAppRoot_1n7j8_71";
44043
+ const shouldAnimate = "_shouldAnimate_1n7j8_79";
44044
+ const initialized = "_initialized_1n7j8_83";
44045
+ const nestedAppContainer = "_nestedAppContainer_1n7j8_90";
44046
+ const contentContainer = "_contentContainer_1n7j8_109";
44047
+ const splitViewMarkdown = "_splitViewMarkdown_1n7j8_116";
44048
+ const hidden = "_hidden_1n7j8_125";
44049
+ const viewControls = "_viewControls_1n7j8_134";
44050
+ const logo = "_logo_1n7j8_34";
44051
+ const splitViewButton = "_splitViewButton_1n7j8_146";
44052
+ const show = "_show_1n7j8_154";
44053
+ const hide = "_hide_1n7j8_161";
44054
+ const header = "_header_1n7j8_167";
44055
+ const headerText = "_headerText_1n7j8_175";
44056
+ const headerButton = "_headerButton_1n7j8_204";
44057
+ const wrapper$3 = "_wrapper_1n7j8_211";
44058
+ const controlWrapper = "_controlWrapper_1n7j8_214";
44059
+ const shadowRoot = "_shadowRoot_1n7j8_219";
44060
+ const content$1 = "_content_1n7j8_109";
43928
44061
  const styles$e = {
43929
44062
  themeVars: themeVars$4,
43930
44063
  nestedAppPlaceholder,
@@ -43948,12 +44081,14 @@ const styles$e = {
43948
44081
  headerText,
43949
44082
  headerButton,
43950
44083
  wrapper: wrapper$3,
44084
+ controlWrapper,
43951
44085
  shadowRoot,
43952
44086
  content: content$1
43953
44087
  };
43954
44088
  const defaultProps$c = {
43955
44089
  allowPlaygroundPopup: true,
43956
44090
  withFrame: true,
44091
+ allowReset: true,
43957
44092
  components: EMPTY_ARRAY
43958
44093
  };
43959
44094
  const COMP$f = "NestedApp";
@@ -44094,6 +44229,11 @@ It supports both side-by-side and stacked layouts.`,
44094
44229
  description: "This property defines whether the nested app should be displayed with a frame.",
44095
44230
  valueType: "boolean",
44096
44231
  defaultValue: defaultProps$c.withFrame
44232
+ },
44233
+ allowReset: {
44234
+ description: "This property defines whether the reset button should be displayed in the header.",
44235
+ valueType: "boolean",
44236
+ defaultValue: defaultProps$c.allowReset
44097
44237
  }
44098
44238
  },
44099
44239
  themeVars: parseScssVar(styles$d.themeVars),
@@ -44133,7 +44273,8 @@ const appWithCodeViewComponentRenderer = createComponentRenderer(
44133
44273
  title: extractValue(node.props?.title),
44134
44274
  height: extractValue(node.props?.height),
44135
44275
  allowPlaygroundPopup: extractValue.asOptionalBoolean(node.props?.allowPlaygroundPopup),
44136
- withFrame: extractValue.asOptionalBoolean(node.props?.withFrame)
44276
+ withFrame: extractValue.asOptionalBoolean(node.props?.withFrame),
44277
+ allowReset: extractValue.asOptionalBoolean(node.props?.allowReset)
44137
44278
  }
44138
44279
  );
44139
44280
  }
@@ -47947,7 +48088,7 @@ function IconProvider({ children }) {
47947
48088
  /* @__PURE__ */ jsx("svg", { style: { display: "none" }, ref: spriteRootRef })
47948
48089
  ] });
47949
48090
  }
47950
- const version = "0.11.11";
48091
+ const version = "0.11.13";
47951
48092
  const miscellaneousUtils = {
47952
48093
  capitalize,
47953
48094
  pluralize: pluralize$1,
@@ -51465,7 +51606,7 @@ const ComponentAdapter = forwardRef(function ComponentAdapter2({
51465
51606
  const behaviors = componentRegistry.getBehaviors();
51466
51607
  if (!isCompoundComponent) {
51467
51608
  for (const behavior of behaviors) {
51468
- if (behavior.canAttach(rendererContext.node, descriptor)) {
51609
+ if (behavior.canAttach(rendererContext, rendererContext.node, descriptor)) {
51469
51610
  renderedNode = behavior.attach(rendererContext, renderedNode, descriptor);
51470
51611
  }
51471
51612
  }
@@ -52521,7 +52662,7 @@ const ComponentViewer = () => {
52521
52662
  return "";
52522
52663
  }
52523
52664
  const { start: start2, end: end2, fileId } = compSrc;
52524
- const slicedSrc = sources[fileId].slice(start2, end2);
52665
+ const slicedSrc = sources[fileId].slice(start2, end2).replace(/inspect[\s\n]*=[\s\n]*"true"[\s\n]*/g, "");
52525
52666
  let dropEmptyLines = true;
52526
52667
  const prunedLines = [];
52527
52668
  let trimBeginCount = void 0;
@@ -52537,7 +52678,7 @@ const ComponentViewer = () => {
52537
52678
  }
52538
52679
  }
52539
52680
  });
52540
- return prunedLines.map((line2) => line2.slice(trimBeginCount).replace(/inspect="true"/g, "")).join("\n");
52681
+ return prunedLines.map((line2) => line2.slice(trimBeginCount)).join("\n");
52541
52682
  }, [inspectedNode2, sources]);
52542
52683
  return define_process_env_default$2.VITE_USER_COMPONENTS_Inspect !== "false" && isOpen && inspectedNode2 !== null ? /* @__PURE__ */ jsx(InspectorDialog, { isOpen, setIsOpen, clickPosition, children: /* @__PURE__ */ jsx(
52543
52684
  AppWithCodeViewNative,
@@ -52547,6 +52688,7 @@ const ComponentViewer = () => {
52547
52688
  initiallyShowCode: appGlobals?.initiallyShowCode ?? true,
52548
52689
  splitView: true,
52549
52690
  controlsWidth: "120px",
52691
+ allowReset: false,
52550
52692
  closeButton: /* @__PURE__ */ jsx(
52551
52693
  Tooltip$1,
52552
52694
  {
@@ -55596,7 +55738,7 @@ function ApiInterceptorProvider({
55596
55738
  return;
55597
55739
  }
55598
55740
  void (async () => {
55599
- const { initMock } = await import("./initMock-Bndg9J7D.js");
55741
+ const { initMock } = await import("./initMock-B1fL_SOf.js");
55600
55742
  const apiInstance2 = await initMock(interceptor);
55601
55743
  setApiInstance(apiInstance2);
55602
55744
  setInitialized(true);
@@ -55613,7 +55755,7 @@ function ApiInterceptorProvider({
55613
55755
  if (define_process_env_default.VITE_MOCK_ENABLED) {
55614
55756
  const [{ createApiInterceptorWorker }, { initMock }] = await Promise.all([
55615
55757
  useWorker ? import("./apiInterceptorWorker-Wgm2_zjg.js") : Promise.resolve({ createApiInterceptorWorker: () => null }),
55616
- import("./initMock-Bndg9J7D.js")
55758
+ import("./initMock-B1fL_SOf.js")
55617
55759
  ]);
55618
55760
  if (interceptor || forceInitialize) {
55619
55761
  const apiInstance2 = await initMock(interceptor || {});
@@ -55650,7 +55792,7 @@ function ApiInterceptorProvider({
55650
55792
  void (async () => {
55651
55793
  const [{ createApiInterceptorWorker }, { initMock }] = await Promise.all([
55652
55794
  import("./apiInterceptorWorker-Wgm2_zjg.js"),
55653
- import("./initMock-Bndg9J7D.js")
55795
+ import("./initMock-B1fL_SOf.js")
55654
55796
  ]);
55655
55797
  const apiInstance2 = await initMock(interceptor);
55656
55798
  await createApiInterceptorWorker(apiInstance2, parentInterceptorWorker);
@@ -55975,6 +56117,7 @@ function AppWithCodeViewNative({
55975
56117
  markdown: markdown2,
55976
56118
  splitView,
55977
56119
  withFrame = true,
56120
+ allowReset = true,
55978
56121
  noHeader = false,
55979
56122
  initiallyShowCode = false,
55980
56123
  popOutUrl,
@@ -56057,7 +56200,7 @@ function AppWithCodeViewNative({
56057
56200
  )
56058
56201
  ] })
56059
56202
  ] }),
56060
- /* @__PURE__ */ jsxs("div", { className: styles$e.wrapper, style: { width: controlsWidth }, children: [
56203
+ /* @__PURE__ */ jsxs("div", { className: styles$e.controlWrapper, style: { width: controlsWidth }, children: [
56061
56204
  allowPlaygroundPopup && /* @__PURE__ */ jsx(
56062
56205
  Tooltip$1,
56063
56206
  {
@@ -56074,7 +56217,7 @@ function AppWithCodeViewNative({
56074
56217
  label: "View and edit in new full-width window"
56075
56218
  }
56076
56219
  ),
56077
- /* @__PURE__ */ jsx(
56220
+ allowReset && /* @__PURE__ */ jsx(
56078
56221
  Tooltip$1,
56079
56222
  {
56080
56223
  trigger: /* @__PURE__ */ jsx(
@@ -1,6 +1,6 @@
1
1
  import { delay as delay$1, HttpResponse, matchRequestUrl } from "msw";
2
2
  import { isArray, isObject, mapValues } from "lodash-es";
3
- import { r as runEventHandlerCode, g as getDate, d as delay, m as miscellaneousUtils, a as dateFunctions, o as orderBy, T as ThrowStatementError } from "./collectedComponentMetadata-DvV8yJ4N.js";
3
+ import { r as runEventHandlerCode, g as getDate, d as delay, m as miscellaneousUtils, a as dateFunctions, o as orderBy, T as ThrowStatementError } from "./collectedComponentMetadata-vckMPeLq.js";
4
4
  import Dexie from "dexie";
5
5
  var HttpStatusCode = /* @__PURE__ */ ((HttpStatusCode2) => {
6
6
  HttpStatusCode2[HttpStatusCode2["Continue"] = 100] = "Continue";