@pixpilot/shadcn-ui 2.1.0 → 3.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (114) hide show
  1. package/dist/button-extended/ButtonExtended.d.cts +2 -2
  2. package/dist/button-extended/ButtonExtended.d.ts +2 -2
  3. package/dist/card/Card.d.ts +3 -3
  4. package/dist/color-select/ColorSelect.d.cts +2 -2
  5. package/dist/color-select/ColorSelect.d.ts +2 -2
  6. package/dist/confirmation-dialog/ConfirmationDialog.cjs +2 -2
  7. package/dist/confirmation-dialog/ConfirmationDialog.js +2 -2
  8. package/dist/confirmation-dialog/mcp.js +3 -3
  9. package/dist/content-card/ContentCard.d.cts +2 -2
  10. package/dist/content-card/ContentCard.d.ts +2 -2
  11. package/dist/date-picker/DatePicker.d.cts +2 -2
  12. package/dist/date-picker/DatePicker.d.ts +2 -2
  13. package/dist/dialog/Dialog.d.cts +5 -5
  14. package/dist/dialog/Dialog.d.ts +5 -5
  15. package/dist/dialog/mcp.js +1 -1
  16. package/dist/dialog-registry/dialog-registry.cjs +24 -0
  17. package/dist/dialog-registry/dialog-registry.d.cts +23 -0
  18. package/dist/dialog-registry/dialog-registry.d.ts +23 -0
  19. package/dist/dialog-registry/dialog-registry.js +23 -0
  20. package/dist/dialog-registry/index.d.cts +3 -0
  21. package/dist/dialog-registry/index.d.ts +3 -0
  22. package/dist/dialog-registry/mcp.js +51 -0
  23. package/dist/dialog-registry/register-dialog.cjs +20 -0
  24. package/dist/dialog-registry/register-dialog.d.cts +21 -0
  25. package/dist/dialog-registry/register-dialog.d.ts +21 -0
  26. package/dist/dialog-registry/register-dialog.js +20 -0
  27. package/dist/dialog-registry/show-dialog.cjs +17 -0
  28. package/dist/dialog-registry/show-dialog.d.cts +18 -0
  29. package/dist/dialog-registry/show-dialog.d.ts +18 -0
  30. package/dist/dialog-registry/show-dialog.js +17 -0
  31. package/dist/drawer/Drawer.cjs +57 -0
  32. package/dist/drawer/Drawer.d.cts +40 -0
  33. package/dist/drawer/Drawer.d.ts +40 -0
  34. package/dist/drawer/Drawer.js +49 -0
  35. package/dist/drawer/index.d.cts +3 -0
  36. package/dist/drawer/index.d.ts +3 -0
  37. package/dist/drawer/index.js +4 -0
  38. package/dist/drawer/mcp.js +55 -0
  39. package/dist/drawer-registry/drawer-registry.cjs +28 -0
  40. package/dist/drawer-registry/drawer-registry.d.cts +27 -0
  41. package/dist/drawer-registry/drawer-registry.d.ts +27 -0
  42. package/dist/drawer-registry/drawer-registry.js +27 -0
  43. package/dist/drawer-registry/index.d.cts +3 -0
  44. package/dist/drawer-registry/index.d.ts +3 -0
  45. package/dist/drawer-registry/mcp.js +51 -0
  46. package/dist/drawer-registry/register-drawer.cjs +20 -0
  47. package/dist/drawer-registry/register-drawer.d.cts +21 -0
  48. package/dist/drawer-registry/register-drawer.d.ts +21 -0
  49. package/dist/drawer-registry/register-drawer.js +20 -0
  50. package/dist/drawer-registry/show-drawer.cjs +17 -0
  51. package/dist/drawer-registry/show-drawer.d.cts +18 -0
  52. package/dist/drawer-registry/show-drawer.d.ts +18 -0
  53. package/dist/drawer-registry/show-drawer.js +17 -0
  54. package/dist/file-upload/FileUpload.d.cts +2 -2
  55. package/dist/file-upload/FileUpload.d.ts +2 -2
  56. package/dist/file-upload-inline/FileUploadInline.d.cts +2 -2
  57. package/dist/file-upload-inline/FileUploadInline.d.ts +2 -2
  58. package/dist/file-upload-root/FileUploadRoot.d.cts +2 -2
  59. package/dist/file-upload-root/FileUploadRoot.d.ts +2 -2
  60. package/dist/generated/mcp-registry.js +38 -32
  61. package/dist/index.cjs +32 -9
  62. package/dist/index.d.cts +14 -6
  63. package/dist/index.d.ts +14 -6
  64. package/dist/index.js +11 -5
  65. package/dist/input/Input.d.cts +2 -2
  66. package/dist/overlay-provider/OverlayProvider.cjs +47 -0
  67. package/dist/overlay-provider/OverlayProvider.d.cts +18 -0
  68. package/dist/overlay-provider/OverlayProvider.d.ts +18 -0
  69. package/dist/overlay-provider/OverlayProvider.js +42 -0
  70. package/dist/overlay-provider/index.d.cts +2 -0
  71. package/dist/overlay-provider/index.d.ts +2 -0
  72. package/dist/overlay-provider/mcp.js +35 -0
  73. package/dist/overlay-provider/overlay-registry.cjs +104 -0
  74. package/dist/overlay-provider/overlay-registry.d.cts +91 -0
  75. package/dist/overlay-provider/overlay-registry.d.ts +91 -0
  76. package/dist/overlay-provider/overlay-registry.js +94 -0
  77. package/dist/overlay-provider/types.d.cts +20 -0
  78. package/dist/overlay-provider/types.d.ts +20 -0
  79. package/dist/rating/Rating.d.cts +3 -3
  80. package/dist/rating/Rating.d.ts +3 -3
  81. package/dist/select/Select.d.cts +2 -2
  82. package/dist/select/Select.d.ts +2 -2
  83. package/dist/tags-input/TagsInput.d.cts +2 -2
  84. package/dist/tags-input/TagsInput.d.ts +2 -2
  85. package/dist/tags-input/TagsInputInline.d.cts +2 -2
  86. package/dist/tags-input/TagsInputInline.d.ts +2 -2
  87. package/dist/theme-toggle/ThemeModeDropdown.d.cts +2 -2
  88. package/dist/theme-toggle/ThemeModeDropdown.d.ts +2 -2
  89. package/dist/theme-toggle/ThemeModeSwitchInside.d.cts +2 -2
  90. package/dist/theme-toggle/ThemeModeSwitchInside.d.ts +2 -2
  91. package/dist/theme-toggle/ThemeModeSwitchOutside.d.cts +2 -2
  92. package/dist/theme-toggle/ThemeModeSwitchOutside.d.ts +2 -2
  93. package/dist/theme-toggle/ThemeModeToggleButton.d.cts +2 -2
  94. package/dist/theme-toggle/ThemeModeToggleButton.d.ts +2 -2
  95. package/package.json +3 -3
  96. package/dist/dialog-provider/DialogProvider.cjs +0 -40
  97. package/dist/dialog-provider/DialogProvider.d.cts +0 -28
  98. package/dist/dialog-provider/DialogProvider.d.ts +0 -28
  99. package/dist/dialog-provider/DialogProvider.js +0 -36
  100. package/dist/dialog-provider/dialog-registry.cjs +0 -100
  101. package/dist/dialog-provider/dialog-registry.d.cts +0 -150
  102. package/dist/dialog-provider/dialog-registry.d.ts +0 -150
  103. package/dist/dialog-provider/dialog-registry.js +0 -93
  104. package/dist/dialog-provider/index.d.cts +0 -4
  105. package/dist/dialog-provider/index.d.ts +0 -4
  106. package/dist/dialog-provider/mcp.js +0 -24
  107. package/dist/dialog-provider/register-dialog.cjs +0 -64
  108. package/dist/dialog-provider/register-dialog.d.cts +0 -98
  109. package/dist/dialog-provider/register-dialog.d.ts +0 -98
  110. package/dist/dialog-provider/register-dialog.js +0 -61
  111. package/dist/dialog-provider/show-dialog.cjs +0 -30
  112. package/dist/dialog-provider/show-dialog.d.cts +0 -24
  113. package/dist/dialog-provider/show-dialog.d.ts +0 -24
  114. package/dist/dialog-provider/show-dialog.js +0 -28
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime1 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime2 from "react/jsx-runtime";
2
2
  import { Button, Tooltip, TooltipContent, TooltipTrigger, buttonVariants } from "@pixpilot/shadcn";
3
3
  import React from "react";
4
4
  import { VariantProps } from "class-variance-authority";
@@ -50,7 +50,7 @@ interface ButtonExtendedProps extends React.ComponentProps<typeof Button>, Varia
50
50
  }
51
51
  declare function ButtonExtended(props: ButtonExtendedProps & {
52
52
  ref?: React.Ref<HTMLButtonElement>;
53
- }): react_jsx_runtime1.JSX.Element;
53
+ }): react_jsx_runtime2.JSX.Element;
54
54
  declare namespace ButtonExtended {
55
55
  var displayName: string;
56
56
  }
@@ -1,6 +1,6 @@
1
1
  import { Button, Tooltip, TooltipContent, TooltipTrigger, buttonVariants } from "@pixpilot/shadcn";
2
2
  import React from "react";
3
- import * as react_jsx_runtime3 from "react/jsx-runtime";
3
+ import * as react_jsx_runtime0 from "react/jsx-runtime";
4
4
  import { VariantProps } from "class-variance-authority";
5
5
 
6
6
  //#region src/button-extended/ButtonExtended.d.ts
@@ -50,7 +50,7 @@ interface ButtonExtendedProps extends React.ComponentProps<typeof Button>, Varia
50
50
  }
51
51
  declare function ButtonExtended(props: ButtonExtendedProps & {
52
52
  ref?: React.Ref<HTMLButtonElement>;
53
- }): react_jsx_runtime3.JSX.Element;
53
+ }): react_jsx_runtime0.JSX.Element;
54
54
  declare namespace ButtonExtended {
55
55
  var displayName: string;
56
56
  }
@@ -1,15 +1,15 @@
1
1
  import { Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from "@pixpilot/shadcn";
2
2
  import React from "react";
3
- import * as react_jsx_runtime0 from "react/jsx-runtime";
3
+ import * as react_jsx_runtime1 from "react/jsx-runtime";
4
4
 
5
5
  //#region src/card/Card.d.ts
6
6
  declare function CardTitle$1({
7
7
  className,
8
8
  ...props
9
- }: React.ComponentProps<typeof CardTitle>): react_jsx_runtime0.JSX.Element;
9
+ }: React.ComponentProps<typeof CardTitle>): react_jsx_runtime1.JSX.Element;
10
10
  declare function CardHeader$1({
11
11
  className,
12
12
  ...props
13
- }: React.ComponentProps<typeof CardHeader>): react_jsx_runtime0.JSX.Element;
13
+ }: React.ComponentProps<typeof CardHeader>): react_jsx_runtime1.JSX.Element;
14
14
  //#endregion
15
15
  export { Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader$1 as CardHeader, CardTitle$1 as CardTitle };
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime5 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime27 from "react/jsx-runtime";
2
2
  import { Select, SelectContent } from "@pixpilot/shadcn";
3
3
  import React, { ComponentProps } from "react";
4
4
 
@@ -17,6 +17,6 @@ type BaseColorSelectProps = {
17
17
  keyboardMode?: 'cycle' | 'dropdown';
18
18
  className?: string;
19
19
  } & Omit<ComponentProps<typeof Select>, 'value' | 'onValueChange' | 'children'>;
20
- declare function ColorSelect(props: BaseColorSelectProps): react_jsx_runtime5.JSX.Element;
20
+ declare function ColorSelect(props: BaseColorSelectProps): react_jsx_runtime27.JSX.Element;
21
21
  //#endregion
22
22
  export { BaseColorSelectProps, ColorSelect, ColorSelectOption };
@@ -1,6 +1,6 @@
1
1
  import { Select, SelectContent } from "@pixpilot/shadcn";
2
2
  import React, { ComponentProps } from "react";
3
- import * as react_jsx_runtime2 from "react/jsx-runtime";
3
+ import * as react_jsx_runtime3 from "react/jsx-runtime";
4
4
 
5
5
  //#region src/color-select/ColorSelect.d.ts
6
6
  interface ColorSelectOption {
@@ -17,6 +17,6 @@ type BaseColorSelectProps = {
17
17
  keyboardMode?: 'cycle' | 'dropdown';
18
18
  className?: string;
19
19
  } & Omit<ComponentProps<typeof Select>, 'value' | 'onValueChange' | 'children'>;
20
- declare function ColorSelect(props: BaseColorSelectProps): react_jsx_runtime2.JSX.Element;
20
+ declare function ColorSelect(props: BaseColorSelectProps): react_jsx_runtime3.JSX.Element;
21
21
  //#endregion
22
22
  export { BaseColorSelectProps, ColorSelect, ColorSelectOption };
@@ -1,7 +1,7 @@
1
1
  const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
2
2
  const require_get_id = require('../utils/get-id.cjs');
3
3
  const require_variant_config = require('../variant-config.cjs');
4
- const require_dialog_registry = require('../dialog-provider/dialog-registry.cjs');
4
+ const require_dialog_registry = require('../dialog-registry/dialog-registry.cjs');
5
5
  let __pixpilot_shadcn = require("@pixpilot/shadcn");
6
6
  __pixpilot_shadcn = require_rolldown_runtime.__toESM(__pixpilot_shadcn);
7
7
  let react_jsx_runtime = require("react/jsx-runtime");
@@ -16,7 +16,7 @@ const variantMap = {
16
16
  };
17
17
  const ConfirmationDialog = require_dialog_registry.dialog.create((props) => {
18
18
  const { id, title = "Confirmation Dialog", variant, showIcon = true } = props;
19
- const modal = require_dialog_registry.dialog.useDialog();
19
+ const modal = require_dialog_registry.dialog.use();
20
20
  const handleConfirm = () => {
21
21
  props.onConfirm?.();
22
22
  modal.resolve(true);
@@ -1,6 +1,6 @@
1
1
  import { getId } from "../utils/get-id.js";
2
2
  import { variantConfig } from "../variant-config.js";
3
- import { dialog } from "../dialog-provider/dialog-registry.js";
3
+ import { dialog } from "../dialog-registry/dialog-registry.js";
4
4
  import { Button, Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, cn } from "@pixpilot/shadcn";
5
5
  import { jsx, jsxs } from "react/jsx-runtime";
6
6
 
@@ -13,7 +13,7 @@ const variantMap = {
13
13
  };
14
14
  const ConfirmationDialog = dialog.create((props) => {
15
15
  const { id, title = "Confirmation Dialog", variant, showIcon = true } = props;
16
- const modal = dialog.useDialog();
16
+ const modal = dialog.use();
17
17
  const handleConfirm = () => {
18
18
  props.onConfirm?.();
19
19
  modal.resolve(true);
@@ -4,7 +4,7 @@ import { defineProps } from "../mcp/src/utils.js";
4
4
  const meta = {
5
5
  name: "ConfirmationDialog",
6
6
  category: "Overlays",
7
- description: "A prebuilt confirm/cancel dialog with variant styling and icon, shown imperatively via the dialog helper inside a DialogProvider.",
7
+ description: "A prebuilt confirm/cancel dialog with variant styling and icon, shown imperatively via the `dialog` helper (see `registerDialog`) under an OverlayProvider.",
8
8
  props: defineProps({
9
9
  id: "Optional identifier for the dialog instance used by the imperative dialog helper.",
10
10
  title: {
@@ -36,12 +36,12 @@ const meta = {
36
36
  defaultValue: "true"
37
37
  }
38
38
  }),
39
- notes: ["Render a DialogProvider near the app root, then show this dialog imperatively via the exported `dialog` helper."],
39
+ notes: ["Render an OverlayProvider near the app root, then show this dialog imperatively via the exported `dialog` helper."],
40
40
  examples: [{
41
41
  title: "Show a confirmation",
42
42
  code: "const ok = await dialog.show(ConfirmationDialog, { title: \"Delete item?\", variant: \"destructive\", confirmText: \"Delete\" });\nif (ok) deleteItem();"
43
43
  }],
44
- related: ["Dialog", "DialogProvider"],
44
+ related: ["Dialog", "registerDialog"],
45
45
  keywords: [
46
46
  "confirm",
47
47
  "dialog",
@@ -1,6 +1,6 @@
1
1
  import { Card } from "../card/Card.cjs";
2
2
  import "../card/index.cjs";
3
- import * as react_jsx_runtime10 from "react/jsx-runtime";
3
+ import * as react_jsx_runtime5 from "react/jsx-runtime";
4
4
  import React, { ReactNode } from "react";
5
5
 
6
6
  //#region src/content-card/ContentCard.d.ts
@@ -9,7 +9,7 @@ interface SectionCardProps extends React.ComponentProps<typeof Card> {
9
9
  children: ReactNode;
10
10
  marginBottom?: boolean;
11
11
  }
12
- declare function ContentCard(props: SectionCardProps): react_jsx_runtime10.JSX.Element;
12
+ declare function ContentCard(props: SectionCardProps): react_jsx_runtime5.JSX.Element;
13
13
  declare namespace ContentCard {
14
14
  var displayName: string;
15
15
  }
@@ -1,7 +1,7 @@
1
1
  import { Card } from "../card/Card.js";
2
2
  import "../card/index.js";
3
3
  import React, { ReactNode } from "react";
4
- import * as react_jsx_runtime5 from "react/jsx-runtime";
4
+ import * as react_jsx_runtime7 from "react/jsx-runtime";
5
5
 
6
6
  //#region src/content-card/ContentCard.d.ts
7
7
  interface SectionCardProps extends React.ComponentProps<typeof Card> {
@@ -9,7 +9,7 @@ interface SectionCardProps extends React.ComponentProps<typeof Card> {
9
9
  children: ReactNode;
10
10
  marginBottom?: boolean;
11
11
  }
12
- declare function ContentCard(props: SectionCardProps): react_jsx_runtime5.JSX.Element;
12
+ declare function ContentCard(props: SectionCardProps): react_jsx_runtime7.JSX.Element;
13
13
  declare namespace ContentCard {
14
14
  var displayName: string;
15
15
  }
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime11 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime6 from "react/jsx-runtime";
2
2
  import { Calendar } from "@pixpilot/shadcn";
3
3
  import { ComponentProps } from "react";
4
4
 
@@ -10,7 +10,7 @@ type DatePickerProps = {
10
10
  placeholder?: string;
11
11
  showClearButton?: boolean;
12
12
  } & Omit<ComponentProps<typeof Calendar>, 'selected' | 'onSelect' | 'mode'>;
13
- declare function DatePicker(props: DatePickerProps): react_jsx_runtime11.JSX.Element;
13
+ declare function DatePicker(props: DatePickerProps): react_jsx_runtime6.JSX.Element;
14
14
  declare namespace DatePicker {
15
15
  var displayName: string;
16
16
  }
@@ -1,6 +1,6 @@
1
1
  import { Calendar } from "@pixpilot/shadcn";
2
2
  import { ComponentProps } from "react";
3
- import * as react_jsx_runtime12 from "react/jsx-runtime";
3
+ import * as react_jsx_runtime8 from "react/jsx-runtime";
4
4
 
5
5
  //#region src/date-picker/DatePicker.d.ts
6
6
  type DatePickerProps = {
@@ -10,7 +10,7 @@ type DatePickerProps = {
10
10
  placeholder?: string;
11
11
  showClearButton?: boolean;
12
12
  } & Omit<ComponentProps<typeof Calendar>, 'selected' | 'onSelect' | 'mode'>;
13
- declare function DatePicker(props: DatePickerProps): react_jsx_runtime12.JSX.Element;
13
+ declare function DatePicker(props: DatePickerProps): react_jsx_runtime8.JSX.Element;
14
14
  declare namespace DatePicker {
15
15
  var displayName: string;
16
16
  }
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime12 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime18 from "react/jsx-runtime";
2
2
  import { DialogClose, DialogContent } from "@pixpilot/shadcn";
3
3
  import * as React$1 from "react";
4
4
 
@@ -10,18 +10,18 @@ declare const DialogContent$1: React$1.ForwardRefExoticComponent<DialogContentPr
10
10
  declare function DialogHeader({
11
11
  className,
12
12
  ...props
13
- }: React$1.HTMLAttributes<HTMLDivElement>): react_jsx_runtime12.JSX.Element;
13
+ }: React$1.HTMLAttributes<HTMLDivElement>): react_jsx_runtime18.JSX.Element;
14
14
  declare function DialogBody({
15
15
  className,
16
16
  ...props
17
- }: React$1.HTMLAttributes<HTMLDivElement>): react_jsx_runtime12.JSX.Element;
17
+ }: React$1.HTMLAttributes<HTMLDivElement>): react_jsx_runtime18.JSX.Element;
18
18
  declare function DialogFooter({
19
19
  className,
20
20
  ...props
21
- }: React$1.HTMLAttributes<HTMLDivElement>): react_jsx_runtime12.JSX.Element;
21
+ }: React$1.HTMLAttributes<HTMLDivElement>): react_jsx_runtime18.JSX.Element;
22
22
  declare function DialogClose$1({
23
23
  className,
24
24
  ...props
25
- }: React$1.ComponentPropsWithoutRef<typeof DialogClose>): react_jsx_runtime12.JSX.Element;
25
+ }: React$1.ComponentPropsWithoutRef<typeof DialogClose>): react_jsx_runtime18.JSX.Element;
26
26
  //#endregion
27
27
  export { DialogBody, DialogClose$1 as DialogClose, DialogContent$1 as DialogContent, DialogContentProps, DialogFooter, DialogHeader };
@@ -1,6 +1,6 @@
1
1
  import { DialogClose, DialogContent } from "@pixpilot/shadcn";
2
2
  import * as React$1 from "react";
3
- import * as react_jsx_runtime6 from "react/jsx-runtime";
3
+ import * as react_jsx_runtime9 from "react/jsx-runtime";
4
4
 
5
5
  //#region src/dialog/Dialog.d.ts
6
6
  interface DialogContentProps extends React$1.ComponentPropsWithoutRef<typeof DialogContent> {
@@ -10,18 +10,18 @@ declare const DialogContent$1: React$1.ForwardRefExoticComponent<DialogContentPr
10
10
  declare function DialogHeader$1({
11
11
  className,
12
12
  ...props
13
- }: React$1.HTMLAttributes<HTMLDivElement>): react_jsx_runtime6.JSX.Element;
13
+ }: React$1.HTMLAttributes<HTMLDivElement>): react_jsx_runtime9.JSX.Element;
14
14
  declare function DialogBody({
15
15
  className,
16
16
  ...props
17
- }: React$1.HTMLAttributes<HTMLDivElement>): react_jsx_runtime6.JSX.Element;
17
+ }: React$1.HTMLAttributes<HTMLDivElement>): react_jsx_runtime9.JSX.Element;
18
18
  declare function DialogFooter$1({
19
19
  className,
20
20
  ...props
21
- }: React$1.HTMLAttributes<HTMLDivElement>): react_jsx_runtime6.JSX.Element;
21
+ }: React$1.HTMLAttributes<HTMLDivElement>): react_jsx_runtime9.JSX.Element;
22
22
  declare function DialogClose$1({
23
23
  className,
24
24
  ...props
25
- }: React$1.ComponentPropsWithoutRef<typeof DialogClose>): react_jsx_runtime6.JSX.Element;
25
+ }: React$1.ComponentPropsWithoutRef<typeof DialogClose>): react_jsx_runtime9.JSX.Element;
26
26
  //#endregion
27
27
  export { DialogBody, DialogClose$1 as DialogClose, DialogContent$1 as DialogContent, DialogContentProps, DialogFooter$1 as DialogFooter, DialogHeader$1 as DialogHeader };
@@ -40,7 +40,7 @@ const meta = {
40
40
  title: "Dialog with body and footer",
41
41
  code: "<Dialog>\n <DialogTrigger asChild><Button>Open</Button></DialogTrigger>\n <DialogContent>\n <DialogHeader><DialogTitle>Edit</DialogTitle></DialogHeader>\n <DialogBody>{form}</DialogBody>\n <DialogFooter><DialogClose asChild><Button>Save</Button></DialogClose></DialogFooter>\n </DialogContent>\n</Dialog>"
42
42
  }],
43
- related: ["ConfirmationDialog", "DialogProvider"],
43
+ related: ["ConfirmationDialog", "registerDialog"],
44
44
  keywords: [
45
45
  "dialog",
46
46
  "modal",
@@ -0,0 +1,24 @@
1
+ const require_overlay_registry = require('../overlay-provider/overlay-registry.cjs');
2
+
3
+ //#region src/dialog-registry/dialog-registry.ts
4
+ const useDialog = require_overlay_registry.useOverlay;
5
+ /**
6
+ * Convenience registry facade for dialog operations.
7
+ *
8
+ * Use this when you prefer a single import with discoverable methods instead of
9
+ * importing `registerDialog`, `showDialog`, `hideDialog`, `removeDialog`, and
10
+ * `unregisterDialog` separately.
11
+ *
12
+ * Usage:
13
+ * ```ts
14
+ * const projectDialog = dialog.register('project-dialog', ProjectDialog);
15
+ * await projectDialog.show({ projectId: 'project-1' });
16
+ * await dialog.show('project-dialog', { projectId: 'project-2' });
17
+ * dialog.unregister('project-dialog');
18
+ * ```
19
+ */
20
+ const dialog = require_overlay_registry.overlayRegistry;
21
+
22
+ //#endregion
23
+ exports.dialog = dialog;
24
+ exports.useDialog = useDialog;
@@ -0,0 +1,23 @@
1
+ import { OverlayRegistry } from "../overlay-provider/types.cjs";
2
+ import * as _ebay_nice_modal_react0 from "@ebay/nice-modal-react";
3
+
4
+ //#region src/dialog-registry/dialog-registry.d.ts
5
+ declare const useDialog: typeof _ebay_nice_modal_react0.useModal;
6
+ /**
7
+ * Convenience registry facade for dialog operations.
8
+ *
9
+ * Use this when you prefer a single import with discoverable methods instead of
10
+ * importing `registerDialog`, `showDialog`, `hideDialog`, `removeDialog`, and
11
+ * `unregisterDialog` separately.
12
+ *
13
+ * Usage:
14
+ * ```ts
15
+ * const projectDialog = dialog.register('project-dialog', ProjectDialog);
16
+ * await projectDialog.show({ projectId: 'project-1' });
17
+ * await dialog.show('project-dialog', { projectId: 'project-2' });
18
+ * dialog.unregister('project-dialog');
19
+ * ```
20
+ */
21
+ declare const dialog: OverlayRegistry;
22
+ //#endregion
23
+ export { dialog, useDialog };
@@ -0,0 +1,23 @@
1
+ import { OverlayRegistry } from "../overlay-provider/types.js";
2
+ import * as _ebay_nice_modal_react0 from "@ebay/nice-modal-react";
3
+
4
+ //#region src/dialog-registry/dialog-registry.d.ts
5
+ declare const useDialog: typeof _ebay_nice_modal_react0.useModal;
6
+ /**
7
+ * Convenience registry facade for dialog operations.
8
+ *
9
+ * Use this when you prefer a single import with discoverable methods instead of
10
+ * importing `registerDialog`, `showDialog`, `hideDialog`, `removeDialog`, and
11
+ * `unregisterDialog` separately.
12
+ *
13
+ * Usage:
14
+ * ```ts
15
+ * const projectDialog = dialog.register('project-dialog', ProjectDialog);
16
+ * await projectDialog.show({ projectId: 'project-1' });
17
+ * await dialog.show('project-dialog', { projectId: 'project-2' });
18
+ * dialog.unregister('project-dialog');
19
+ * ```
20
+ */
21
+ declare const dialog: OverlayRegistry;
22
+ //#endregion
23
+ export { dialog, useDialog };
@@ -0,0 +1,23 @@
1
+ import { overlayRegistry, useOverlay } from "../overlay-provider/overlay-registry.js";
2
+
3
+ //#region src/dialog-registry/dialog-registry.ts
4
+ const useDialog = useOverlay;
5
+ /**
6
+ * Convenience registry facade for dialog operations.
7
+ *
8
+ * Use this when you prefer a single import with discoverable methods instead of
9
+ * importing `registerDialog`, `showDialog`, `hideDialog`, `removeDialog`, and
10
+ * `unregisterDialog` separately.
11
+ *
12
+ * Usage:
13
+ * ```ts
14
+ * const projectDialog = dialog.register('project-dialog', ProjectDialog);
15
+ * await projectDialog.show({ projectId: 'project-1' });
16
+ * await dialog.show('project-dialog', { projectId: 'project-2' });
17
+ * dialog.unregister('project-dialog');
18
+ * ```
19
+ */
20
+ const dialog = overlayRegistry;
21
+
22
+ //#endregion
23
+ export { dialog, useDialog };
@@ -0,0 +1,3 @@
1
+ import { dialog, useDialog } from "./dialog-registry.cjs";
2
+ import { registerDialog } from "./register-dialog.cjs";
3
+ import { ShowDialogProps, showDialog } from "./show-dialog.cjs";
@@ -0,0 +1,3 @@
1
+ import { dialog, useDialog } from "./dialog-registry.js";
2
+ import { registerDialog } from "./register-dialog.js";
3
+ import { ShowDialogProps, showDialog } from "./show-dialog.js";
@@ -0,0 +1,51 @@
1
+ import { defineProps } from "../mcp/src/utils.js";
2
+
3
+ //#region src/dialog-registry/mcp.ts
4
+ const meta = {
5
+ name: "registerDialog",
6
+ category: "Overlays",
7
+ description: "Imperative dialog API built on the overlay provider (there is no `DialogProvider` component — mount `OverlayProvider`). `registerDialog(id, Component, defaultProps?)` registers a dialog once so you can open it from anywhere with a typed `show(props)` call — no JSX trigger or local open state. The same folder also exports `showDialog`, the `dialog` registry facade, and the `useDialog` hook.",
8
+ props: defineProps({}),
9
+ notes: [
10
+ "Mount `<OverlayProvider>` once near the app root; this facade shares that single provider with the drawer imperative API (`registerDrawer`). There is no separate DialogProvider component to render.",
11
+ "`registerDialog(id, Component, defaultProps?)` returns a typed controller — call `controller.show(props)` (resolves when the dialog closes), `controller.hide()`, and `controller.remove()`. Props passed as `defaultProps` become optional in `show`.",
12
+ "The registered component receives controlled `open` and `onOpenChange` props automatically (wrapped with NiceModal), so it does not manage its own open state.",
13
+ "`showDialog(id, props?)` opens a dialog by id when the typed controller is not in scope; prefer `registerDialog(...).show(...)` when the component is available in the same module.",
14
+ "The `dialog` facade groups the same operations under one import: `dialog.register`, `dialog.show`, `dialog.hide`, `dialog.remove`, `dialog.unregister`.",
15
+ "`useDialog()` (alias of `useOverlay`) reads dialog state from inside a component."
16
+ ],
17
+ examples: [
18
+ {
19
+ title: "Register and show with a typed controller",
20
+ code: "const projectDialog = registerDialog('project-dialog', ProjectDialog, { mode: 'edit' });\nawait projectDialog.show({ projectId: 'project-1' });"
21
+ },
22
+ {
23
+ title: "Open a dialog by id from anywhere",
24
+ code: "await showDialog('project-dialog', { projectId: 'project-2' });"
25
+ },
26
+ {
27
+ title: "The `dialog` registry facade",
28
+ code: "const projectDialog = dialog.register('project-dialog', ProjectDialog);\nawait projectDialog.show({ projectId: 'project-1' });\ndialog.unregister('project-dialog');"
29
+ }
30
+ ],
31
+ related: [
32
+ "OverlayProvider",
33
+ "registerDrawer",
34
+ "Dialog",
35
+ "ConfirmationDialog"
36
+ ],
37
+ keywords: [
38
+ "dialog",
39
+ "provider",
40
+ "modal",
41
+ "imperative",
42
+ "show-dialog",
43
+ "register-dialog",
44
+ "use-dialog",
45
+ "overlay",
46
+ "dialog-provider"
47
+ ]
48
+ };
49
+
50
+ //#endregion
51
+ export { meta };
@@ -0,0 +1,20 @@
1
+ const require_overlay_registry = require('../overlay-provider/overlay-registry.cjs');
2
+
3
+ //#region src/dialog-registry/register-dialog.ts
4
+ /**
5
+ * Registers a dialog component and returns a typed controller for it.
6
+ *
7
+ * The component is wrapped with NiceModal automatically and receives controlled
8
+ * `open` and `onOpenChange` props. Props supplied as `defaultProps` become
9
+ * optional when calling `show`.
10
+ *
11
+ * Usage:
12
+ * ```ts
13
+ * const projectDialog = registerDialog('project-dialog', ProjectDialog, { mode: 'edit' });
14
+ * await projectDialog.show({ projectId: 'project-1' });
15
+ * ```
16
+ */
17
+ const registerDialog = require_overlay_registry.registerOverlay;
18
+
19
+ //#endregion
20
+ exports.registerDialog = registerDialog;
@@ -0,0 +1,21 @@
1
+ import { registerOverlay } from "../overlay-provider/overlay-registry.cjs";
2
+ import "../overlay-provider/index.cjs";
3
+
4
+ //#region src/dialog-registry/register-dialog.d.ts
5
+
6
+ /**
7
+ * Registers a dialog component and returns a typed controller for it.
8
+ *
9
+ * The component is wrapped with NiceModal automatically and receives controlled
10
+ * `open` and `onOpenChange` props. Props supplied as `defaultProps` become
11
+ * optional when calling `show`.
12
+ *
13
+ * Usage:
14
+ * ```ts
15
+ * const projectDialog = registerDialog('project-dialog', ProjectDialog, { mode: 'edit' });
16
+ * await projectDialog.show({ projectId: 'project-1' });
17
+ * ```
18
+ */
19
+ declare const registerDialog: typeof registerOverlay;
20
+ //#endregion
21
+ export { registerDialog };
@@ -0,0 +1,21 @@
1
+ import { registerOverlay } from "../overlay-provider/overlay-registry.js";
2
+ import "../overlay-provider/index.js";
3
+
4
+ //#region src/dialog-registry/register-dialog.d.ts
5
+
6
+ /**
7
+ * Registers a dialog component and returns a typed controller for it.
8
+ *
9
+ * The component is wrapped with NiceModal automatically and receives controlled
10
+ * `open` and `onOpenChange` props. Props supplied as `defaultProps` become
11
+ * optional when calling `show`.
12
+ *
13
+ * Usage:
14
+ * ```ts
15
+ * const projectDialog = registerDialog('project-dialog', ProjectDialog, { mode: 'edit' });
16
+ * await projectDialog.show({ projectId: 'project-1' });
17
+ * ```
18
+ */
19
+ declare const registerDialog: typeof registerOverlay;
20
+ //#endregion
21
+ export { registerDialog };
@@ -0,0 +1,20 @@
1
+ import { registerOverlay } from "../overlay-provider/overlay-registry.js";
2
+
3
+ //#region src/dialog-registry/register-dialog.ts
4
+ /**
5
+ * Registers a dialog component and returns a typed controller for it.
6
+ *
7
+ * The component is wrapped with NiceModal automatically and receives controlled
8
+ * `open` and `onOpenChange` props. Props supplied as `defaultProps` become
9
+ * optional when calling `show`.
10
+ *
11
+ * Usage:
12
+ * ```ts
13
+ * const projectDialog = registerDialog('project-dialog', ProjectDialog, { mode: 'edit' });
14
+ * await projectDialog.show({ projectId: 'project-1' });
15
+ * ```
16
+ */
17
+ const registerDialog = registerOverlay;
18
+
19
+ //#endregion
20
+ export { registerDialog };
@@ -0,0 +1,17 @@
1
+ const require_overlay_registry = require('../overlay-provider/overlay-registry.cjs');
2
+
3
+ //#region src/dialog-registry/show-dialog.ts
4
+ /**
5
+ * Opens a registered dialog by id when the caller does not have its typed
6
+ * controller. Prefer `registerDialog(...).show(...)` when the dialog component
7
+ * is available in the same module.
8
+ *
9
+ * Usage:
10
+ * ```ts
11
+ * await showDialog('project-dialog', { projectId: 'project-1' });
12
+ * ```
13
+ */
14
+ const showDialog = require_overlay_registry.showOverlay;
15
+
16
+ //#endregion
17
+ exports.showDialog = showDialog;
@@ -0,0 +1,18 @@
1
+ import { ShowOverlayProps, showOverlay } from "../overlay-provider/overlay-registry.cjs";
2
+ import "../overlay-provider/index.cjs";
3
+
4
+ //#region src/dialog-registry/show-dialog.d.ts
5
+ type ShowDialogProps = ShowOverlayProps;
6
+ /**
7
+ * Opens a registered dialog by id when the caller does not have its typed
8
+ * controller. Prefer `registerDialog(...).show(...)` when the dialog component
9
+ * is available in the same module.
10
+ *
11
+ * Usage:
12
+ * ```ts
13
+ * await showDialog('project-dialog', { projectId: 'project-1' });
14
+ * ```
15
+ */
16
+ declare const showDialog: typeof showOverlay;
17
+ //#endregion
18
+ export { ShowDialogProps, showDialog };
@@ -0,0 +1,18 @@
1
+ import { ShowOverlayProps, showOverlay } from "../overlay-provider/overlay-registry.js";
2
+ import "../overlay-provider/index.js";
3
+
4
+ //#region src/dialog-registry/show-dialog.d.ts
5
+ type ShowDialogProps = ShowOverlayProps;
6
+ /**
7
+ * Opens a registered dialog by id when the caller does not have its typed
8
+ * controller. Prefer `registerDialog(...).show(...)` when the dialog component
9
+ * is available in the same module.
10
+ *
11
+ * Usage:
12
+ * ```ts
13
+ * await showDialog('project-dialog', { projectId: 'project-1' });
14
+ * ```
15
+ */
16
+ declare const showDialog: typeof showOverlay;
17
+ //#endregion
18
+ export { ShowDialogProps, showDialog };
@@ -0,0 +1,17 @@
1
+ import { showOverlay } from "../overlay-provider/overlay-registry.js";
2
+
3
+ //#region src/dialog-registry/show-dialog.ts
4
+ /**
5
+ * Opens a registered dialog by id when the caller does not have its typed
6
+ * controller. Prefer `registerDialog(...).show(...)` when the dialog component
7
+ * is available in the same module.
8
+ *
9
+ * Usage:
10
+ * ```ts
11
+ * await showDialog('project-dialog', { projectId: 'project-1' });
12
+ * ```
13
+ */
14
+ const showDialog = showOverlay;
15
+
16
+ //#endregion
17
+ export { showDialog };