groove-dev 0.26.38 → 0.27.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 (171) hide show
  1. package/CHANGELOG.md +59 -0
  2. package/CLAUDE.md +24 -19
  3. package/node_modules/@groove-dev/cli/bin/groove.js +2 -0
  4. package/node_modules/@groove-dev/cli/package.json +1 -1
  5. package/node_modules/@groove-dev/cli/src/commands/nuke.js +16 -4
  6. package/node_modules/@groove-dev/cli/src/commands/stop.js +17 -2
  7. package/node_modules/@groove-dev/daemon/integrations-registry.json +681 -75
  8. package/node_modules/@groove-dev/daemon/package.json +1 -1
  9. package/node_modules/@groove-dev/daemon/src/adaptive.js +23 -25
  10. package/node_modules/@groove-dev/daemon/src/api.js +346 -22
  11. package/node_modules/@groove-dev/daemon/src/classifier.js +53 -6
  12. package/node_modules/@groove-dev/daemon/src/firstrun.js +14 -1
  13. package/node_modules/@groove-dev/daemon/src/gateways/manager.js +2 -2
  14. package/node_modules/@groove-dev/daemon/src/index.js +28 -4
  15. package/node_modules/@groove-dev/daemon/src/integrations.js +215 -14
  16. package/node_modules/@groove-dev/daemon/src/introducer.js +84 -11
  17. package/node_modules/@groove-dev/daemon/src/journalist.js +43 -1
  18. package/node_modules/@groove-dev/daemon/src/lockmanager.js +60 -0
  19. package/node_modules/@groove-dev/daemon/src/mcp-manager.js +270 -0
  20. package/node_modules/@groove-dev/daemon/src/memory.js +370 -0
  21. package/node_modules/@groove-dev/daemon/src/pm.js +1 -1
  22. package/node_modules/@groove-dev/daemon/src/process.js +141 -9
  23. package/node_modules/@groove-dev/daemon/src/registry.js +1 -1
  24. package/node_modules/@groove-dev/daemon/src/rotator.js +334 -31
  25. package/node_modules/@groove-dev/daemon/src/router.js +43 -0
  26. package/node_modules/@groove-dev/daemon/src/tokentracker.js +70 -18
  27. package/node_modules/@groove-dev/daemon/src/validate.js +5 -13
  28. package/node_modules/@groove-dev/daemon/templates/groove-slides.cjs +306 -0
  29. package/node_modules/@groove-dev/daemon/test/classifier.test.js +3 -5
  30. package/node_modules/@groove-dev/daemon/test/lockmanager.test.js +64 -0
  31. package/node_modules/@groove-dev/daemon/test/memory.test.js +252 -0
  32. package/node_modules/@groove-dev/daemon/test/rotator.test.js +108 -0
  33. package/node_modules/@groove-dev/daemon/test/router.test.js +64 -0
  34. package/node_modules/@groove-dev/daemon/test/slides-engine.test.js +230 -0
  35. package/node_modules/@groove-dev/daemon/test/tokentracker.test.js +78 -0
  36. package/node_modules/@groove-dev/gui/dist/assets/index-DjORRpF0.css +1 -0
  37. package/node_modules/@groove-dev/gui/dist/assets/index-eCrVowF0.js +652 -0
  38. package/node_modules/@groove-dev/gui/dist/index.html +2 -2
  39. package/node_modules/@groove-dev/gui/package.json +1 -4
  40. package/node_modules/@groove-dev/gui/src/components/agents/agent-chat.jsx +26 -17
  41. package/node_modules/@groove-dev/gui/src/components/agents/agent-config.jsx +22 -1
  42. package/node_modules/@groove-dev/gui/src/components/agents/agent-feed.jsx +53 -21
  43. package/node_modules/@groove-dev/gui/src/components/agents/agent-node.jsx +132 -90
  44. package/node_modules/@groove-dev/gui/src/components/agents/spawn-wizard.jsx +212 -1
  45. package/node_modules/@groove-dev/gui/src/components/dashboard/cache-ring.jsx +6 -2
  46. package/node_modules/@groove-dev/gui/src/components/dashboard/intel-panel.jsx +495 -174
  47. package/node_modules/@groove-dev/gui/src/components/dashboard/kpi-card.jsx +12 -2
  48. package/node_modules/@groove-dev/gui/src/components/dashboard/team-burn-panel.jsx +55 -0
  49. package/node_modules/@groove-dev/gui/src/components/layout/activity-bar.jsx +3 -3
  50. package/node_modules/@groove-dev/gui/src/components/layout/app-shell.jsx +24 -19
  51. package/node_modules/@groove-dev/gui/src/components/layout/command-palette.jsx +2 -2
  52. package/node_modules/@groove-dev/gui/src/components/marketplace/integration-wizard.jsx +391 -61
  53. package/node_modules/@groove-dev/gui/src/components/marketplace/marketplace-card.jsx +29 -7
  54. package/node_modules/@groove-dev/gui/src/lib/format.js +0 -6
  55. package/node_modules/@groove-dev/gui/src/lib/hooks/use-dashboard.js +23 -5
  56. package/node_modules/@groove-dev/gui/src/stores/groove.js +59 -9
  57. package/node_modules/@groove-dev/gui/src/views/agents.jsx +84 -10
  58. package/node_modules/@groove-dev/gui/src/views/dashboard.jsx +24 -21
  59. package/node_modules/@groove-dev/gui/src/views/marketplace.jsx +153 -85
  60. package/package.json +2 -8
  61. package/packages/cli/bin/groove.js +2 -0
  62. package/packages/cli/package.json +1 -1
  63. package/packages/cli/src/commands/nuke.js +16 -4
  64. package/packages/cli/src/commands/stop.js +17 -2
  65. package/packages/daemon/integrations-registry.json +681 -75
  66. package/packages/daemon/package.json +1 -1
  67. package/packages/daemon/src/adaptive.js +23 -25
  68. package/packages/daemon/src/api.js +346 -22
  69. package/packages/daemon/src/classifier.js +53 -6
  70. package/packages/daemon/src/firstrun.js +14 -1
  71. package/packages/daemon/src/gateways/manager.js +2 -2
  72. package/packages/daemon/src/index.js +28 -4
  73. package/packages/daemon/src/integrations.js +215 -14
  74. package/packages/daemon/src/introducer.js +84 -11
  75. package/packages/daemon/src/journalist.js +43 -1
  76. package/packages/daemon/src/lockmanager.js +60 -0
  77. package/packages/daemon/src/mcp-manager.js +270 -0
  78. package/packages/daemon/src/memory.js +370 -0
  79. package/packages/daemon/src/pm.js +1 -1
  80. package/packages/daemon/src/process.js +141 -9
  81. package/packages/daemon/src/registry.js +1 -1
  82. package/packages/daemon/src/rotator.js +334 -31
  83. package/packages/daemon/src/router.js +43 -0
  84. package/packages/daemon/src/tokentracker.js +70 -18
  85. package/packages/daemon/src/validate.js +5 -13
  86. package/packages/daemon/templates/groove-slides.cjs +306 -0
  87. package/packages/gui/dist/assets/index-DjORRpF0.css +1 -0
  88. package/packages/gui/dist/assets/index-eCrVowF0.js +652 -0
  89. package/packages/gui/dist/index.html +2 -2
  90. package/packages/gui/package.json +1 -4
  91. package/packages/gui/src/components/agents/agent-chat.jsx +26 -17
  92. package/packages/gui/src/components/agents/agent-config.jsx +22 -1
  93. package/packages/gui/src/components/agents/agent-feed.jsx +53 -21
  94. package/packages/gui/src/components/agents/agent-node.jsx +132 -90
  95. package/packages/gui/src/components/agents/spawn-wizard.jsx +212 -1
  96. package/packages/gui/src/components/dashboard/cache-ring.jsx +6 -2
  97. package/packages/gui/src/components/dashboard/intel-panel.jsx +495 -174
  98. package/packages/gui/src/components/dashboard/kpi-card.jsx +12 -2
  99. package/packages/gui/src/components/dashboard/team-burn-panel.jsx +55 -0
  100. package/packages/gui/src/components/layout/activity-bar.jsx +3 -3
  101. package/packages/gui/src/components/layout/app-shell.jsx +24 -19
  102. package/packages/gui/src/components/layout/command-palette.jsx +2 -2
  103. package/packages/gui/src/components/marketplace/integration-wizard.jsx +391 -61
  104. package/packages/gui/src/components/marketplace/marketplace-card.jsx +29 -7
  105. package/packages/gui/src/lib/format.js +0 -6
  106. package/packages/gui/src/lib/hooks/use-dashboard.js +23 -5
  107. package/packages/gui/src/stores/groove.js +59 -9
  108. package/packages/gui/src/views/agents.jsx +84 -10
  109. package/packages/gui/src/views/dashboard.jsx +24 -21
  110. package/packages/gui/src/views/marketplace.jsx +153 -85
  111. package/node_modules/@groove-dev/gui/dist/assets/index-CEFKgLGB.css +0 -1
  112. package/node_modules/@groove-dev/gui/dist/assets/index-CaKBNWcK.js +0 -638
  113. package/node_modules/@groove-dev/gui/dist/groove-logo-short.png +0 -0
  114. package/node_modules/@groove-dev/gui/dist/groove-logo.png +0 -0
  115. package/node_modules/@groove-dev/gui/public/groove-logo-short.png +0 -0
  116. package/node_modules/@groove-dev/gui/public/groove-logo.png +0 -0
  117. package/node_modules/@groove-dev/gui/src/components/ui/dropdown-menu.jsx +0 -60
  118. package/node_modules/@groove-dev/gui/src/lib/hooks/use-media-query.js +0 -18
  119. package/node_modules/@radix-ui/react-dropdown-menu/LICENSE +0 -21
  120. package/node_modules/@radix-ui/react-dropdown-menu/README.md +0 -3
  121. package/node_modules/@radix-ui/react-dropdown-menu/dist/index.d.mts +0 -97
  122. package/node_modules/@radix-ui/react-dropdown-menu/dist/index.d.ts +0 -97
  123. package/node_modules/@radix-ui/react-dropdown-menu/dist/index.js +0 -337
  124. package/node_modules/@radix-ui/react-dropdown-menu/dist/index.js.map +0 -7
  125. package/node_modules/@radix-ui/react-dropdown-menu/dist/index.mjs +0 -305
  126. package/node_modules/@radix-ui/react-dropdown-menu/dist/index.mjs.map +0 -7
  127. package/node_modules/@radix-ui/react-dropdown-menu/package.json +0 -75
  128. package/node_modules/@radix-ui/react-popover/LICENSE +0 -21
  129. package/node_modules/@radix-ui/react-popover/README.md +0 -3
  130. package/node_modules/@radix-ui/react-popover/dist/index.d.mts +0 -85
  131. package/node_modules/@radix-ui/react-popover/dist/index.d.ts +0 -85
  132. package/node_modules/@radix-ui/react-popover/dist/index.js +0 -352
  133. package/node_modules/@radix-ui/react-popover/dist/index.js.map +0 -7
  134. package/node_modules/@radix-ui/react-popover/dist/index.mjs +0 -320
  135. package/node_modules/@radix-ui/react-popover/dist/index.mjs.map +0 -7
  136. package/node_modules/@radix-ui/react-popover/package.json +0 -82
  137. package/node_modules/@radix-ui/react-separator/LICENSE +0 -21
  138. package/node_modules/@radix-ui/react-separator/README.md +0 -3
  139. package/node_modules/@radix-ui/react-separator/dist/index.d.mts +0 -21
  140. package/node_modules/@radix-ui/react-separator/dist/index.d.ts +0 -21
  141. package/node_modules/@radix-ui/react-separator/dist/index.js +0 -65
  142. package/node_modules/@radix-ui/react-separator/dist/index.js.map +0 -7
  143. package/node_modules/@radix-ui/react-separator/dist/index.mjs +0 -32
  144. package/node_modules/@radix-ui/react-separator/dist/index.mjs.map +0 -7
  145. package/node_modules/@radix-ui/react-separator/node_modules/@radix-ui/react-primitive/LICENSE +0 -21
  146. package/node_modules/@radix-ui/react-separator/node_modules/@radix-ui/react-primitive/README.md +0 -3
  147. package/node_modules/@radix-ui/react-separator/node_modules/@radix-ui/react-primitive/dist/index.d.mts +0 -52
  148. package/node_modules/@radix-ui/react-separator/node_modules/@radix-ui/react-primitive/dist/index.d.ts +0 -52
  149. package/node_modules/@radix-ui/react-separator/node_modules/@radix-ui/react-primitive/dist/index.js +0 -80
  150. package/node_modules/@radix-ui/react-separator/node_modules/@radix-ui/react-primitive/dist/index.js.map +0 -7
  151. package/node_modules/@radix-ui/react-separator/node_modules/@radix-ui/react-primitive/dist/index.mjs +0 -47
  152. package/node_modules/@radix-ui/react-separator/node_modules/@radix-ui/react-primitive/dist/index.mjs.map +0 -7
  153. package/node_modules/@radix-ui/react-separator/node_modules/@radix-ui/react-primitive/package.json +0 -69
  154. package/node_modules/@radix-ui/react-separator/node_modules/@radix-ui/react-slot/LICENSE +0 -21
  155. package/node_modules/@radix-ui/react-separator/node_modules/@radix-ui/react-slot/README.md +0 -3
  156. package/node_modules/@radix-ui/react-separator/node_modules/@radix-ui/react-slot/dist/index.d.mts +0 -22
  157. package/node_modules/@radix-ui/react-separator/node_modules/@radix-ui/react-slot/dist/index.d.ts +0 -22
  158. package/node_modules/@radix-ui/react-separator/node_modules/@radix-ui/react-slot/dist/index.js +0 -152
  159. package/node_modules/@radix-ui/react-separator/node_modules/@radix-ui/react-slot/dist/index.js.map +0 -7
  160. package/node_modules/@radix-ui/react-separator/node_modules/@radix-ui/react-slot/dist/index.mjs +0 -119
  161. package/node_modules/@radix-ui/react-separator/node_modules/@radix-ui/react-slot/dist/index.mjs.map +0 -7
  162. package/node_modules/@radix-ui/react-separator/node_modules/@radix-ui/react-slot/package.json +0 -64
  163. package/node_modules/@radix-ui/react-separator/package.json +0 -69
  164. package/packages/gui/dist/assets/index-CEFKgLGB.css +0 -1
  165. package/packages/gui/dist/assets/index-CaKBNWcK.js +0 -638
  166. package/packages/gui/dist/groove-logo-short.png +0 -0
  167. package/packages/gui/dist/groove-logo.png +0 -0
  168. package/packages/gui/public/groove-logo-short.png +0 -0
  169. package/packages/gui/public/groove-logo.png +0 -0
  170. package/packages/gui/src/components/ui/dropdown-menu.jsx +0 -60
  171. package/packages/gui/src/lib/hooks/use-media-query.js +0 -18
@@ -1,320 +0,0 @@
1
- "use client";
2
-
3
- // src/popover.tsx
4
- import * as React from "react";
5
- import { composeEventHandlers } from "@radix-ui/primitive";
6
- import { useComposedRefs } from "@radix-ui/react-compose-refs";
7
- import { createContextScope } from "@radix-ui/react-context";
8
- import { DismissableLayer } from "@radix-ui/react-dismissable-layer";
9
- import { useFocusGuards } from "@radix-ui/react-focus-guards";
10
- import { FocusScope } from "@radix-ui/react-focus-scope";
11
- import { useId } from "@radix-ui/react-id";
12
- import * as PopperPrimitive from "@radix-ui/react-popper";
13
- import { createPopperScope } from "@radix-ui/react-popper";
14
- import { Portal as PortalPrimitive } from "@radix-ui/react-portal";
15
- import { Presence } from "@radix-ui/react-presence";
16
- import { Primitive } from "@radix-ui/react-primitive";
17
- import { createSlot } from "@radix-ui/react-slot";
18
- import { useControllableState } from "@radix-ui/react-use-controllable-state";
19
- import { hideOthers } from "aria-hidden";
20
- import { RemoveScroll } from "react-remove-scroll";
21
- import { jsx } from "react/jsx-runtime";
22
- var POPOVER_NAME = "Popover";
23
- var [createPopoverContext, createPopoverScope] = createContextScope(POPOVER_NAME, [
24
- createPopperScope
25
- ]);
26
- var usePopperScope = createPopperScope();
27
- var [PopoverProvider, usePopoverContext] = createPopoverContext(POPOVER_NAME);
28
- var Popover = (props) => {
29
- const {
30
- __scopePopover,
31
- children,
32
- open: openProp,
33
- defaultOpen,
34
- onOpenChange,
35
- modal = false
36
- } = props;
37
- const popperScope = usePopperScope(__scopePopover);
38
- const triggerRef = React.useRef(null);
39
- const [hasCustomAnchor, setHasCustomAnchor] = React.useState(false);
40
- const [open, setOpen] = useControllableState({
41
- prop: openProp,
42
- defaultProp: defaultOpen ?? false,
43
- onChange: onOpenChange,
44
- caller: POPOVER_NAME
45
- });
46
- return /* @__PURE__ */ jsx(PopperPrimitive.Root, { ...popperScope, children: /* @__PURE__ */ jsx(
47
- PopoverProvider,
48
- {
49
- scope: __scopePopover,
50
- contentId: useId(),
51
- triggerRef,
52
- open,
53
- onOpenChange: setOpen,
54
- onOpenToggle: React.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]),
55
- hasCustomAnchor,
56
- onCustomAnchorAdd: React.useCallback(() => setHasCustomAnchor(true), []),
57
- onCustomAnchorRemove: React.useCallback(() => setHasCustomAnchor(false), []),
58
- modal,
59
- children
60
- }
61
- ) });
62
- };
63
- Popover.displayName = POPOVER_NAME;
64
- var ANCHOR_NAME = "PopoverAnchor";
65
- var PopoverAnchor = React.forwardRef(
66
- (props, forwardedRef) => {
67
- const { __scopePopover, ...anchorProps } = props;
68
- const context = usePopoverContext(ANCHOR_NAME, __scopePopover);
69
- const popperScope = usePopperScope(__scopePopover);
70
- const { onCustomAnchorAdd, onCustomAnchorRemove } = context;
71
- React.useEffect(() => {
72
- onCustomAnchorAdd();
73
- return () => onCustomAnchorRemove();
74
- }, [onCustomAnchorAdd, onCustomAnchorRemove]);
75
- return /* @__PURE__ */ jsx(PopperPrimitive.Anchor, { ...popperScope, ...anchorProps, ref: forwardedRef });
76
- }
77
- );
78
- PopoverAnchor.displayName = ANCHOR_NAME;
79
- var TRIGGER_NAME = "PopoverTrigger";
80
- var PopoverTrigger = React.forwardRef(
81
- (props, forwardedRef) => {
82
- const { __scopePopover, ...triggerProps } = props;
83
- const context = usePopoverContext(TRIGGER_NAME, __scopePopover);
84
- const popperScope = usePopperScope(__scopePopover);
85
- const composedTriggerRef = useComposedRefs(forwardedRef, context.triggerRef);
86
- const trigger = /* @__PURE__ */ jsx(
87
- Primitive.button,
88
- {
89
- type: "button",
90
- "aria-haspopup": "dialog",
91
- "aria-expanded": context.open,
92
- "aria-controls": context.contentId,
93
- "data-state": getState(context.open),
94
- ...triggerProps,
95
- ref: composedTriggerRef,
96
- onClick: composeEventHandlers(props.onClick, context.onOpenToggle)
97
- }
98
- );
99
- return context.hasCustomAnchor ? trigger : /* @__PURE__ */ jsx(PopperPrimitive.Anchor, { asChild: true, ...popperScope, children: trigger });
100
- }
101
- );
102
- PopoverTrigger.displayName = TRIGGER_NAME;
103
- var PORTAL_NAME = "PopoverPortal";
104
- var [PortalProvider, usePortalContext] = createPopoverContext(PORTAL_NAME, {
105
- forceMount: void 0
106
- });
107
- var PopoverPortal = (props) => {
108
- const { __scopePopover, forceMount, children, container } = props;
109
- const context = usePopoverContext(PORTAL_NAME, __scopePopover);
110
- return /* @__PURE__ */ jsx(PortalProvider, { scope: __scopePopover, forceMount, children: /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(PortalPrimitive, { asChild: true, container, children }) }) });
111
- };
112
- PopoverPortal.displayName = PORTAL_NAME;
113
- var CONTENT_NAME = "PopoverContent";
114
- var PopoverContent = React.forwardRef(
115
- (props, forwardedRef) => {
116
- const portalContext = usePortalContext(CONTENT_NAME, props.__scopePopover);
117
- const { forceMount = portalContext.forceMount, ...contentProps } = props;
118
- const context = usePopoverContext(CONTENT_NAME, props.__scopePopover);
119
- return /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: context.modal ? /* @__PURE__ */ jsx(PopoverContentModal, { ...contentProps, ref: forwardedRef }) : /* @__PURE__ */ jsx(PopoverContentNonModal, { ...contentProps, ref: forwardedRef }) });
120
- }
121
- );
122
- PopoverContent.displayName = CONTENT_NAME;
123
- var Slot = createSlot("PopoverContent.RemoveScroll");
124
- var PopoverContentModal = React.forwardRef(
125
- (props, forwardedRef) => {
126
- const context = usePopoverContext(CONTENT_NAME, props.__scopePopover);
127
- const contentRef = React.useRef(null);
128
- const composedRefs = useComposedRefs(forwardedRef, contentRef);
129
- const isRightClickOutsideRef = React.useRef(false);
130
- React.useEffect(() => {
131
- const content = contentRef.current;
132
- if (content) return hideOthers(content);
133
- }, []);
134
- return /* @__PURE__ */ jsx(RemoveScroll, { as: Slot, allowPinchZoom: true, children: /* @__PURE__ */ jsx(
135
- PopoverContentImpl,
136
- {
137
- ...props,
138
- ref: composedRefs,
139
- trapFocus: context.open,
140
- disableOutsidePointerEvents: true,
141
- onCloseAutoFocus: composeEventHandlers(props.onCloseAutoFocus, (event) => {
142
- event.preventDefault();
143
- if (!isRightClickOutsideRef.current) context.triggerRef.current?.focus();
144
- }),
145
- onPointerDownOutside: composeEventHandlers(
146
- props.onPointerDownOutside,
147
- (event) => {
148
- const originalEvent = event.detail.originalEvent;
149
- const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;
150
- const isRightClick = originalEvent.button === 2 || ctrlLeftClick;
151
- isRightClickOutsideRef.current = isRightClick;
152
- },
153
- { checkForDefaultPrevented: false }
154
- ),
155
- onFocusOutside: composeEventHandlers(
156
- props.onFocusOutside,
157
- (event) => event.preventDefault(),
158
- { checkForDefaultPrevented: false }
159
- )
160
- }
161
- ) });
162
- }
163
- );
164
- var PopoverContentNonModal = React.forwardRef(
165
- (props, forwardedRef) => {
166
- const context = usePopoverContext(CONTENT_NAME, props.__scopePopover);
167
- const hasInteractedOutsideRef = React.useRef(false);
168
- const hasPointerDownOutsideRef = React.useRef(false);
169
- return /* @__PURE__ */ jsx(
170
- PopoverContentImpl,
171
- {
172
- ...props,
173
- ref: forwardedRef,
174
- trapFocus: false,
175
- disableOutsidePointerEvents: false,
176
- onCloseAutoFocus: (event) => {
177
- props.onCloseAutoFocus?.(event);
178
- if (!event.defaultPrevented) {
179
- if (!hasInteractedOutsideRef.current) context.triggerRef.current?.focus();
180
- event.preventDefault();
181
- }
182
- hasInteractedOutsideRef.current = false;
183
- hasPointerDownOutsideRef.current = false;
184
- },
185
- onInteractOutside: (event) => {
186
- props.onInteractOutside?.(event);
187
- if (!event.defaultPrevented) {
188
- hasInteractedOutsideRef.current = true;
189
- if (event.detail.originalEvent.type === "pointerdown") {
190
- hasPointerDownOutsideRef.current = true;
191
- }
192
- }
193
- const target = event.target;
194
- const targetIsTrigger = context.triggerRef.current?.contains(target);
195
- if (targetIsTrigger) event.preventDefault();
196
- if (event.detail.originalEvent.type === "focusin" && hasPointerDownOutsideRef.current) {
197
- event.preventDefault();
198
- }
199
- }
200
- }
201
- );
202
- }
203
- );
204
- var PopoverContentImpl = React.forwardRef(
205
- (props, forwardedRef) => {
206
- const {
207
- __scopePopover,
208
- trapFocus,
209
- onOpenAutoFocus,
210
- onCloseAutoFocus,
211
- disableOutsidePointerEvents,
212
- onEscapeKeyDown,
213
- onPointerDownOutside,
214
- onFocusOutside,
215
- onInteractOutside,
216
- ...contentProps
217
- } = props;
218
- const context = usePopoverContext(CONTENT_NAME, __scopePopover);
219
- const popperScope = usePopperScope(__scopePopover);
220
- useFocusGuards();
221
- return /* @__PURE__ */ jsx(
222
- FocusScope,
223
- {
224
- asChild: true,
225
- loop: true,
226
- trapped: trapFocus,
227
- onMountAutoFocus: onOpenAutoFocus,
228
- onUnmountAutoFocus: onCloseAutoFocus,
229
- children: /* @__PURE__ */ jsx(
230
- DismissableLayer,
231
- {
232
- asChild: true,
233
- disableOutsidePointerEvents,
234
- onInteractOutside,
235
- onEscapeKeyDown,
236
- onPointerDownOutside,
237
- onFocusOutside,
238
- onDismiss: () => context.onOpenChange(false),
239
- children: /* @__PURE__ */ jsx(
240
- PopperPrimitive.Content,
241
- {
242
- "data-state": getState(context.open),
243
- role: "dialog",
244
- id: context.contentId,
245
- ...popperScope,
246
- ...contentProps,
247
- ref: forwardedRef,
248
- style: {
249
- ...contentProps.style,
250
- // re-namespace exposed content custom properties
251
- ...{
252
- "--radix-popover-content-transform-origin": "var(--radix-popper-transform-origin)",
253
- "--radix-popover-content-available-width": "var(--radix-popper-available-width)",
254
- "--radix-popover-content-available-height": "var(--radix-popper-available-height)",
255
- "--radix-popover-trigger-width": "var(--radix-popper-anchor-width)",
256
- "--radix-popover-trigger-height": "var(--radix-popper-anchor-height)"
257
- }
258
- }
259
- }
260
- )
261
- }
262
- )
263
- }
264
- );
265
- }
266
- );
267
- var CLOSE_NAME = "PopoverClose";
268
- var PopoverClose = React.forwardRef(
269
- (props, forwardedRef) => {
270
- const { __scopePopover, ...closeProps } = props;
271
- const context = usePopoverContext(CLOSE_NAME, __scopePopover);
272
- return /* @__PURE__ */ jsx(
273
- Primitive.button,
274
- {
275
- type: "button",
276
- ...closeProps,
277
- ref: forwardedRef,
278
- onClick: composeEventHandlers(props.onClick, () => context.onOpenChange(false))
279
- }
280
- );
281
- }
282
- );
283
- PopoverClose.displayName = CLOSE_NAME;
284
- var ARROW_NAME = "PopoverArrow";
285
- var PopoverArrow = React.forwardRef(
286
- (props, forwardedRef) => {
287
- const { __scopePopover, ...arrowProps } = props;
288
- const popperScope = usePopperScope(__scopePopover);
289
- return /* @__PURE__ */ jsx(PopperPrimitive.Arrow, { ...popperScope, ...arrowProps, ref: forwardedRef });
290
- }
291
- );
292
- PopoverArrow.displayName = ARROW_NAME;
293
- function getState(open) {
294
- return open ? "open" : "closed";
295
- }
296
- var Root2 = Popover;
297
- var Anchor2 = PopoverAnchor;
298
- var Trigger = PopoverTrigger;
299
- var Portal = PopoverPortal;
300
- var Content2 = PopoverContent;
301
- var Close = PopoverClose;
302
- var Arrow2 = PopoverArrow;
303
- export {
304
- Anchor2 as Anchor,
305
- Arrow2 as Arrow,
306
- Close,
307
- Content2 as Content,
308
- Popover,
309
- PopoverAnchor,
310
- PopoverArrow,
311
- PopoverClose,
312
- PopoverContent,
313
- PopoverPortal,
314
- PopoverTrigger,
315
- Portal,
316
- Root2 as Root,
317
- Trigger,
318
- createPopoverScope
319
- };
320
- //# sourceMappingURL=index.mjs.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../src/popover.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nimport { composeEventHandlers } from '@radix-ui/primitive';\nimport { useComposedRefs } from '@radix-ui/react-compose-refs';\nimport { createContextScope } from '@radix-ui/react-context';\nimport { DismissableLayer } from '@radix-ui/react-dismissable-layer';\nimport { useFocusGuards } from '@radix-ui/react-focus-guards';\nimport { FocusScope } from '@radix-ui/react-focus-scope';\nimport { useId } from '@radix-ui/react-id';\nimport * as PopperPrimitive from '@radix-ui/react-popper';\nimport { createPopperScope } from '@radix-ui/react-popper';\nimport { Portal as PortalPrimitive } from '@radix-ui/react-portal';\nimport { Presence } from '@radix-ui/react-presence';\nimport { Primitive } from '@radix-ui/react-primitive';\nimport { createSlot } from '@radix-ui/react-slot';\nimport { useControllableState } from '@radix-ui/react-use-controllable-state';\nimport { hideOthers } from 'aria-hidden';\nimport { RemoveScroll } from 'react-remove-scroll';\n\nimport type { Scope } from '@radix-ui/react-context';\n\n/* -------------------------------------------------------------------------------------------------\n * Popover\n * -----------------------------------------------------------------------------------------------*/\n\nconst POPOVER_NAME = 'Popover';\n\ntype ScopedProps<P> = P & { __scopePopover?: Scope };\nconst [createPopoverContext, createPopoverScope] = createContextScope(POPOVER_NAME, [\n createPopperScope,\n]);\nconst usePopperScope = createPopperScope();\n\ntype PopoverContextValue = {\n triggerRef: React.RefObject<HTMLButtonElement | null>;\n contentId: string;\n open: boolean;\n onOpenChange(open: boolean): void;\n onOpenToggle(): void;\n hasCustomAnchor: boolean;\n onCustomAnchorAdd(): void;\n onCustomAnchorRemove(): void;\n modal: boolean;\n};\n\nconst [PopoverProvider, usePopoverContext] =\n createPopoverContext<PopoverContextValue>(POPOVER_NAME);\n\ninterface PopoverProps {\n children?: React.ReactNode;\n open?: boolean;\n defaultOpen?: boolean;\n onOpenChange?: (open: boolean) => void;\n modal?: boolean;\n}\n\nconst Popover: React.FC<PopoverProps> = (props: ScopedProps<PopoverProps>) => {\n const {\n __scopePopover,\n children,\n open: openProp,\n defaultOpen,\n onOpenChange,\n modal = false,\n } = props;\n const popperScope = usePopperScope(__scopePopover);\n const triggerRef = React.useRef<HTMLButtonElement>(null);\n const [hasCustomAnchor, setHasCustomAnchor] = React.useState(false);\n const [open, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen ?? false,\n onChange: onOpenChange,\n caller: POPOVER_NAME,\n });\n\n return (\n <PopperPrimitive.Root {...popperScope}>\n <PopoverProvider\n scope={__scopePopover}\n contentId={useId()}\n triggerRef={triggerRef}\n open={open}\n onOpenChange={setOpen}\n onOpenToggle={React.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen])}\n hasCustomAnchor={hasCustomAnchor}\n onCustomAnchorAdd={React.useCallback(() => setHasCustomAnchor(true), [])}\n onCustomAnchorRemove={React.useCallback(() => setHasCustomAnchor(false), [])}\n modal={modal}\n >\n {children}\n </PopoverProvider>\n </PopperPrimitive.Root>\n );\n};\n\nPopover.displayName = POPOVER_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * PopoverAnchor\n * -----------------------------------------------------------------------------------------------*/\n\nconst ANCHOR_NAME = 'PopoverAnchor';\n\ntype PopoverAnchorElement = React.ComponentRef<typeof PopperPrimitive.Anchor>;\ntype PopperAnchorProps = React.ComponentPropsWithoutRef<typeof PopperPrimitive.Anchor>;\ninterface PopoverAnchorProps extends PopperAnchorProps {}\n\nconst PopoverAnchor = React.forwardRef<PopoverAnchorElement, PopoverAnchorProps>(\n (props: ScopedProps<PopoverAnchorProps>, forwardedRef) => {\n const { __scopePopover, ...anchorProps } = props;\n const context = usePopoverContext(ANCHOR_NAME, __scopePopover);\n const popperScope = usePopperScope(__scopePopover);\n const { onCustomAnchorAdd, onCustomAnchorRemove } = context;\n\n React.useEffect(() => {\n onCustomAnchorAdd();\n return () => onCustomAnchorRemove();\n }, [onCustomAnchorAdd, onCustomAnchorRemove]);\n\n return <PopperPrimitive.Anchor {...popperScope} {...anchorProps} ref={forwardedRef} />;\n }\n);\n\nPopoverAnchor.displayName = ANCHOR_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * PopoverTrigger\n * -----------------------------------------------------------------------------------------------*/\n\nconst TRIGGER_NAME = 'PopoverTrigger';\n\ntype PopoverTriggerElement = React.ComponentRef<typeof Primitive.button>;\ntype PrimitiveButtonProps = React.ComponentPropsWithoutRef<typeof Primitive.button>;\ninterface PopoverTriggerProps extends PrimitiveButtonProps {}\n\nconst PopoverTrigger = React.forwardRef<PopoverTriggerElement, PopoverTriggerProps>(\n (props: ScopedProps<PopoverTriggerProps>, forwardedRef) => {\n const { __scopePopover, ...triggerProps } = props;\n const context = usePopoverContext(TRIGGER_NAME, __scopePopover);\n const popperScope = usePopperScope(__scopePopover);\n const composedTriggerRef = useComposedRefs(forwardedRef, context.triggerRef);\n\n const trigger = (\n <Primitive.button\n type=\"button\"\n aria-haspopup=\"dialog\"\n aria-expanded={context.open}\n aria-controls={context.contentId}\n data-state={getState(context.open)}\n {...triggerProps}\n ref={composedTriggerRef}\n onClick={composeEventHandlers(props.onClick, context.onOpenToggle)}\n />\n );\n\n return context.hasCustomAnchor ? (\n trigger\n ) : (\n <PopperPrimitive.Anchor asChild {...popperScope}>\n {trigger}\n </PopperPrimitive.Anchor>\n );\n }\n);\n\nPopoverTrigger.displayName = TRIGGER_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * PopoverPortal\n * -----------------------------------------------------------------------------------------------*/\n\nconst PORTAL_NAME = 'PopoverPortal';\n\ntype PortalContextValue = { forceMount?: true };\nconst [PortalProvider, usePortalContext] = createPopoverContext<PortalContextValue>(PORTAL_NAME, {\n forceMount: undefined,\n});\n\ntype PortalProps = React.ComponentPropsWithoutRef<typeof PortalPrimitive>;\ninterface PopoverPortalProps {\n children?: React.ReactNode;\n /**\n * Specify a container element to portal the content into.\n */\n container?: PortalProps['container'];\n /**\n * Used to force mounting when more control is needed. Useful when\n * controlling animation with React animation libraries.\n */\n forceMount?: true;\n}\n\nconst PopoverPortal: React.FC<PopoverPortalProps> = (props: ScopedProps<PopoverPortalProps>) => {\n const { __scopePopover, forceMount, children, container } = props;\n const context = usePopoverContext(PORTAL_NAME, __scopePopover);\n return (\n <PortalProvider scope={__scopePopover} forceMount={forceMount}>\n <Presence present={forceMount || context.open}>\n <PortalPrimitive asChild container={container}>\n {children}\n </PortalPrimitive>\n </Presence>\n </PortalProvider>\n );\n};\n\nPopoverPortal.displayName = PORTAL_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * PopoverContent\n * -----------------------------------------------------------------------------------------------*/\n\nconst CONTENT_NAME = 'PopoverContent';\n\ninterface PopoverContentProps extends PopoverContentTypeProps {\n /**\n * Used to force mounting when more control is needed. Useful when\n * controlling animation with React animation libraries.\n */\n forceMount?: true;\n}\n\nconst PopoverContent = React.forwardRef<PopoverContentTypeElement, PopoverContentProps>(\n (props: ScopedProps<PopoverContentProps>, forwardedRef) => {\n const portalContext = usePortalContext(CONTENT_NAME, props.__scopePopover);\n const { forceMount = portalContext.forceMount, ...contentProps } = props;\n const context = usePopoverContext(CONTENT_NAME, props.__scopePopover);\n return (\n <Presence present={forceMount || context.open}>\n {context.modal ? (\n <PopoverContentModal {...contentProps} ref={forwardedRef} />\n ) : (\n <PopoverContentNonModal {...contentProps} ref={forwardedRef} />\n )}\n </Presence>\n );\n }\n);\n\nPopoverContent.displayName = CONTENT_NAME;\n\n/* -----------------------------------------------------------------------------------------------*/\n\nconst Slot = createSlot('PopoverContent.RemoveScroll');\n\ntype PopoverContentTypeElement = PopoverContentImplElement;\ninterface PopoverContentTypeProps\n extends Omit<PopoverContentImplProps, 'trapFocus' | 'disableOutsidePointerEvents'> {}\n\nconst PopoverContentModal = React.forwardRef<PopoverContentTypeElement, PopoverContentTypeProps>(\n (props: ScopedProps<PopoverContentTypeProps>, forwardedRef) => {\n const context = usePopoverContext(CONTENT_NAME, props.__scopePopover);\n const contentRef = React.useRef<HTMLDivElement>(null);\n const composedRefs = useComposedRefs(forwardedRef, contentRef);\n const isRightClickOutsideRef = React.useRef(false);\n\n // aria-hide everything except the content (better supported equivalent to setting aria-modal)\n React.useEffect(() => {\n const content = contentRef.current;\n if (content) return hideOthers(content);\n }, []);\n\n return (\n <RemoveScroll as={Slot} allowPinchZoom>\n <PopoverContentImpl\n {...props}\n ref={composedRefs}\n // we make sure we're not trapping once it's been closed\n // (closed !== unmounted when animating out)\n trapFocus={context.open}\n disableOutsidePointerEvents\n onCloseAutoFocus={composeEventHandlers(props.onCloseAutoFocus, (event) => {\n event.preventDefault();\n if (!isRightClickOutsideRef.current) context.triggerRef.current?.focus();\n })}\n onPointerDownOutside={composeEventHandlers(\n props.onPointerDownOutside,\n (event) => {\n const originalEvent = event.detail.originalEvent;\n const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;\n const isRightClick = originalEvent.button === 2 || ctrlLeftClick;\n\n isRightClickOutsideRef.current = isRightClick;\n },\n { checkForDefaultPrevented: false }\n )}\n // When focus is trapped, a `focusout` event may still happen.\n // We make sure we don't trigger our `onDismiss` in such case.\n onFocusOutside={composeEventHandlers(\n props.onFocusOutside,\n (event) => event.preventDefault(),\n { checkForDefaultPrevented: false }\n )}\n />\n </RemoveScroll>\n );\n }\n);\n\nconst PopoverContentNonModal = React.forwardRef<PopoverContentTypeElement, PopoverContentTypeProps>(\n (props: ScopedProps<PopoverContentTypeProps>, forwardedRef) => {\n const context = usePopoverContext(CONTENT_NAME, props.__scopePopover);\n const hasInteractedOutsideRef = React.useRef(false);\n const hasPointerDownOutsideRef = React.useRef(false);\n\n return (\n <PopoverContentImpl\n {...props}\n ref={forwardedRef}\n trapFocus={false}\n disableOutsidePointerEvents={false}\n onCloseAutoFocus={(event) => {\n props.onCloseAutoFocus?.(event);\n\n if (!event.defaultPrevented) {\n if (!hasInteractedOutsideRef.current) context.triggerRef.current?.focus();\n // Always prevent auto focus because we either focus manually or want user agent focus\n event.preventDefault();\n }\n\n hasInteractedOutsideRef.current = false;\n hasPointerDownOutsideRef.current = false;\n }}\n onInteractOutside={(event) => {\n props.onInteractOutside?.(event);\n\n if (!event.defaultPrevented) {\n hasInteractedOutsideRef.current = true;\n if (event.detail.originalEvent.type === 'pointerdown') {\n hasPointerDownOutsideRef.current = true;\n }\n }\n\n // Prevent dismissing when clicking the trigger.\n // As the trigger is already setup to close, without doing so would\n // cause it to close and immediately open.\n const target = event.target as HTMLElement;\n const targetIsTrigger = context.triggerRef.current?.contains(target);\n if (targetIsTrigger) event.preventDefault();\n\n // On Safari if the trigger is inside a container with tabIndex={0}, when clicked\n // we will get the pointer down outside event on the trigger, but then a subsequent\n // focus outside event on the container, we ignore any focus outside event when we've\n // already had a pointer down outside event.\n if (event.detail.originalEvent.type === 'focusin' && hasPointerDownOutsideRef.current) {\n event.preventDefault();\n }\n }}\n />\n );\n }\n);\n\n/* -----------------------------------------------------------------------------------------------*/\n\ntype PopoverContentImplElement = React.ComponentRef<typeof PopperPrimitive.Content>;\ntype FocusScopeProps = React.ComponentPropsWithoutRef<typeof FocusScope>;\ntype DismissableLayerProps = React.ComponentPropsWithoutRef<typeof DismissableLayer>;\ntype PopperContentProps = React.ComponentPropsWithoutRef<typeof PopperPrimitive.Content>;\ninterface PopoverContentImplProps\n extends Omit<PopperContentProps, 'onPlaced'>,\n Omit<DismissableLayerProps, 'onDismiss'> {\n /**\n * Whether focus should be trapped within the `Popover`\n * (default: false)\n */\n trapFocus?: FocusScopeProps['trapped'];\n\n /**\n * Event handler called when auto-focusing on open.\n * Can be prevented.\n */\n onOpenAutoFocus?: FocusScopeProps['onMountAutoFocus'];\n\n /**\n * Event handler called when auto-focusing on close.\n * Can be prevented.\n */\n onCloseAutoFocus?: FocusScopeProps['onUnmountAutoFocus'];\n}\n\nconst PopoverContentImpl = React.forwardRef<PopoverContentImplElement, PopoverContentImplProps>(\n (props: ScopedProps<PopoverContentImplProps>, forwardedRef) => {\n const {\n __scopePopover,\n trapFocus,\n onOpenAutoFocus,\n onCloseAutoFocus,\n disableOutsidePointerEvents,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside,\n onInteractOutside,\n ...contentProps\n } = props;\n const context = usePopoverContext(CONTENT_NAME, __scopePopover);\n const popperScope = usePopperScope(__scopePopover);\n\n // Make sure the whole tree has focus guards as our `Popover` may be\n // the last element in the DOM (because of the `Portal`)\n useFocusGuards();\n\n return (\n <FocusScope\n asChild\n loop\n trapped={trapFocus}\n onMountAutoFocus={onOpenAutoFocus}\n onUnmountAutoFocus={onCloseAutoFocus}\n >\n <DismissableLayer\n asChild\n disableOutsidePointerEvents={disableOutsidePointerEvents}\n onInteractOutside={onInteractOutside}\n onEscapeKeyDown={onEscapeKeyDown}\n onPointerDownOutside={onPointerDownOutside}\n onFocusOutside={onFocusOutside}\n onDismiss={() => context.onOpenChange(false)}\n >\n <PopperPrimitive.Content\n data-state={getState(context.open)}\n role=\"dialog\"\n id={context.contentId}\n {...popperScope}\n {...contentProps}\n ref={forwardedRef}\n style={{\n ...contentProps.style,\n // re-namespace exposed content custom properties\n ...{\n '--radix-popover-content-transform-origin': 'var(--radix-popper-transform-origin)',\n '--radix-popover-content-available-width': 'var(--radix-popper-available-width)',\n '--radix-popover-content-available-height': 'var(--radix-popper-available-height)',\n '--radix-popover-trigger-width': 'var(--radix-popper-anchor-width)',\n '--radix-popover-trigger-height': 'var(--radix-popper-anchor-height)',\n },\n }}\n />\n </DismissableLayer>\n </FocusScope>\n );\n }\n);\n\n/* -------------------------------------------------------------------------------------------------\n * PopoverClose\n * -----------------------------------------------------------------------------------------------*/\n\nconst CLOSE_NAME = 'PopoverClose';\n\ntype PopoverCloseElement = React.ComponentRef<typeof Primitive.button>;\ninterface PopoverCloseProps extends PrimitiveButtonProps {}\n\nconst PopoverClose = React.forwardRef<PopoverCloseElement, PopoverCloseProps>(\n (props: ScopedProps<PopoverCloseProps>, forwardedRef) => {\n const { __scopePopover, ...closeProps } = props;\n const context = usePopoverContext(CLOSE_NAME, __scopePopover);\n return (\n <Primitive.button\n type=\"button\"\n {...closeProps}\n ref={forwardedRef}\n onClick={composeEventHandlers(props.onClick, () => context.onOpenChange(false))}\n />\n );\n }\n);\n\nPopoverClose.displayName = CLOSE_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * PopoverArrow\n * -----------------------------------------------------------------------------------------------*/\n\nconst ARROW_NAME = 'PopoverArrow';\n\ntype PopoverArrowElement = React.ComponentRef<typeof PopperPrimitive.Arrow>;\ntype PopperArrowProps = React.ComponentPropsWithoutRef<typeof PopperPrimitive.Arrow>;\ninterface PopoverArrowProps extends PopperArrowProps {}\n\nconst PopoverArrow = React.forwardRef<PopoverArrowElement, PopoverArrowProps>(\n (props: ScopedProps<PopoverArrowProps>, forwardedRef) => {\n const { __scopePopover, ...arrowProps } = props;\n const popperScope = usePopperScope(__scopePopover);\n return <PopperPrimitive.Arrow {...popperScope} {...arrowProps} ref={forwardedRef} />;\n }\n);\n\nPopoverArrow.displayName = ARROW_NAME;\n\n/* -----------------------------------------------------------------------------------------------*/\n\nfunction getState(open: boolean) {\n return open ? 'open' : 'closed';\n}\n\nconst Root = Popover;\nconst Anchor = PopoverAnchor;\nconst Trigger = PopoverTrigger;\nconst Portal = PopoverPortal;\nconst Content = PopoverContent;\nconst Close = PopoverClose;\nconst Arrow = PopoverArrow;\n\nexport {\n createPopoverScope,\n //\n Popover,\n PopoverAnchor,\n PopoverTrigger,\n PopoverPortal,\n PopoverContent,\n PopoverClose,\n PopoverArrow,\n //\n Root,\n Anchor,\n Trigger,\n Portal,\n Content,\n Close,\n Arrow,\n};\nexport type {\n PopoverProps,\n PopoverAnchorProps,\n PopoverTriggerProps,\n PopoverPortalProps,\n PopoverContentProps,\n PopoverCloseProps,\n PopoverArrowProps,\n};\n"],
5
- "mappings": ";;;AAAA,YAAY,WAAW;AACvB,SAAS,4BAA4B;AACrC,SAAS,uBAAuB;AAChC,SAAS,0BAA0B;AACnC,SAAS,wBAAwB;AACjC,SAAS,sBAAsB;AAC/B,SAAS,kBAAkB;AAC3B,SAAS,aAAa;AACtB,YAAY,qBAAqB;AACjC,SAAS,yBAAyB;AAClC,SAAS,UAAU,uBAAuB;AAC1C,SAAS,gBAAgB;AACzB,SAAS,iBAAiB;AAC1B,SAAS,kBAAkB;AAC3B,SAAS,4BAA4B;AACrC,SAAS,kBAAkB;AAC3B,SAAS,oBAAoB;AA4DvB;AApDN,IAAM,eAAe;AAGrB,IAAM,CAAC,sBAAsB,kBAAkB,IAAI,mBAAmB,cAAc;AAAA,EAClF;AACF,CAAC;AACD,IAAM,iBAAiB,kBAAkB;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A,IAChF;AAAA,EAEJ;AACF;AAEA,aAAa,cAAc;AAM3B,IAAM,aAAa;AAMnB,IAAM,eAAqB;AAAA,EACzB,CAAC,OAAuC,iBAAiB;AACvD,UAAM,EAAE,gBAAgB,GAAG,WAAW,IAAI;AAC1C,UAAM,cAAc,eAAe,cAAc;AACjD,WAAO,oBAAiB,uBAAhB,EAAuB,GAAG,aAAc,GAAG,YAAY,KAAK,cAAc;AAAA,EACpF;AACF;AAEA,aAAa,cAAc;AAI3B,SAAS,SAAS,MAAe;AAC/B,SAAO,OAAO,SAAS;AACzB;AAEA,IAAMA,QAAO;AACb,IAAMC,UAAS;AACf,IAAM,UAAU;AAChB,IAAM,SAAS;AACf,IAAMC,WAAU;AAChB,IAAM,QAAQ;AACd,IAAMC,SAAQ;",
6
- "names": ["Root", "Anchor", "Content", "Arrow"]
7
- }
@@ -1,82 +0,0 @@
1
- {
2
- "name": "@radix-ui/react-popover",
3
- "version": "1.1.15",
4
- "license": "MIT",
5
- "source": "./src/index.ts",
6
- "main": "./dist/index.js",
7
- "module": "./dist/index.mjs",
8
- "files": [
9
- "dist",
10
- "README.md"
11
- ],
12
- "sideEffects": false,
13
- "dependencies": {
14
- "aria-hidden": "^1.2.4",
15
- "react-remove-scroll": "^2.6.3",
16
- "@radix-ui/primitive": "1.1.3",
17
- "@radix-ui/react-compose-refs": "1.1.2",
18
- "@radix-ui/react-dismissable-layer": "1.1.11",
19
- "@radix-ui/react-focus-guards": "1.1.3",
20
- "@radix-ui/react-focus-scope": "1.1.7",
21
- "@radix-ui/react-id": "1.1.1",
22
- "@radix-ui/react-context": "1.1.2",
23
- "@radix-ui/react-presence": "1.1.5",
24
- "@radix-ui/react-portal": "1.1.9",
25
- "@radix-ui/react-popper": "1.2.8",
26
- "@radix-ui/react-primitive": "2.1.3",
27
- "@radix-ui/react-slot": "1.2.3",
28
- "@radix-ui/react-use-controllable-state": "1.2.2"
29
- },
30
- "devDependencies": {
31
- "@types/react": "^19.0.7",
32
- "@types/react-dom": "^19.0.3",
33
- "eslint": "^9.18.0",
34
- "react": "^19.1.0",
35
- "react-dom": "^19.1.0",
36
- "typescript": "^5.7.3",
37
- "@repo/builder": "0.0.0",
38
- "@repo/eslint-config": "0.0.0",
39
- "@repo/typescript-config": "0.0.0"
40
- },
41
- "peerDependencies": {
42
- "@types/react": "*",
43
- "@types/react-dom": "*",
44
- "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",
45
- "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
46
- },
47
- "peerDependenciesMeta": {
48
- "@types/react": {
49
- "optional": true
50
- },
51
- "@types/react-dom": {
52
- "optional": true
53
- }
54
- },
55
- "homepage": "https://radix-ui.com/primitives",
56
- "repository": {
57
- "type": "git",
58
- "url": "git+https://github.com/radix-ui/primitives.git"
59
- },
60
- "bugs": {
61
- "url": "https://github.com/radix-ui/primitives/issues"
62
- },
63
- "scripts": {
64
- "lint": "eslint --max-warnings 0 src",
65
- "clean": "rm -rf dist",
66
- "typecheck": "tsc --noEmit",
67
- "build": "radix-build"
68
- },
69
- "types": "./dist/index.d.ts",
70
- "exports": {
71
- ".": {
72
- "import": {
73
- "types": "./dist/index.d.mts",
74
- "default": "./dist/index.mjs"
75
- },
76
- "require": {
77
- "types": "./dist/index.d.ts",
78
- "default": "./dist/index.js"
79
- }
80
- }
81
- }
82
- }
@@ -1,21 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) 2022 WorkOS
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
@@ -1,3 +0,0 @@
1
- # `react-separator`
2
-
3
- View docs [here](https://radix-ui.com/primitives/docs/components/separator).
@@ -1,21 +0,0 @@
1
- import * as React from 'react';
2
- import { Primitive } from '@radix-ui/react-primitive';
3
-
4
- declare const ORIENTATIONS: readonly ["horizontal", "vertical"];
5
- type Orientation = (typeof ORIENTATIONS)[number];
6
- type PrimitiveDivProps = React.ComponentPropsWithoutRef<typeof Primitive.div>;
7
- interface SeparatorProps extends PrimitiveDivProps {
8
- /**
9
- * Either `vertical` or `horizontal`. Defaults to `horizontal`.
10
- */
11
- orientation?: Orientation;
12
- /**
13
- * Whether or not the component is purely decorative. When true, accessibility-related attributes
14
- * are updated so that that the rendered element is removed from the accessibility tree.
15
- */
16
- decorative?: boolean;
17
- }
18
- declare const Separator: React.ForwardRefExoticComponent<SeparatorProps & React.RefAttributes<HTMLDivElement>>;
19
- declare const Root: React.ForwardRefExoticComponent<SeparatorProps & React.RefAttributes<HTMLDivElement>>;
20
-
21
- export { Root, Separator, type SeparatorProps };
@@ -1,21 +0,0 @@
1
- import * as React from 'react';
2
- import { Primitive } from '@radix-ui/react-primitive';
3
-
4
- declare const ORIENTATIONS: readonly ["horizontal", "vertical"];
5
- type Orientation = (typeof ORIENTATIONS)[number];
6
- type PrimitiveDivProps = React.ComponentPropsWithoutRef<typeof Primitive.div>;
7
- interface SeparatorProps extends PrimitiveDivProps {
8
- /**
9
- * Either `vertical` or `horizontal`. Defaults to `horizontal`.
10
- */
11
- orientation?: Orientation;
12
- /**
13
- * Whether or not the component is purely decorative. When true, accessibility-related attributes
14
- * are updated so that that the rendered element is removed from the accessibility tree.
15
- */
16
- decorative?: boolean;
17
- }
18
- declare const Separator: React.ForwardRefExoticComponent<SeparatorProps & React.RefAttributes<HTMLDivElement>>;
19
- declare const Root: React.ForwardRefExoticComponent<SeparatorProps & React.RefAttributes<HTMLDivElement>>;
20
-
21
- export { Root, Separator, type SeparatorProps };
@@ -1,65 +0,0 @@
1
- "use strict";
2
- var __create = Object.create;
3
- var __defProp = Object.defineProperty;
4
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
- var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getProtoOf = Object.getPrototypeOf;
7
- var __hasOwnProp = Object.prototype.hasOwnProperty;
8
- var __export = (target, all) => {
9
- for (var name in all)
10
- __defProp(target, name, { get: all[name], enumerable: true });
11
- };
12
- var __copyProps = (to, from, except, desc) => {
13
- if (from && typeof from === "object" || typeof from === "function") {
14
- for (let key of __getOwnPropNames(from))
15
- if (!__hasOwnProp.call(to, key) && key !== except)
16
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
- }
18
- return to;
19
- };
20
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
- // If the importer is in node compatibility mode or this is not an ESM
22
- // file that has been converted to a CommonJS file using a Babel-
23
- // compatible transform (i.e. "__esModule" has not been set), then set
24
- // "default" to the CommonJS "module.exports" for node compatibility.
25
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
- mod
27
- ));
28
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
-
30
- // src/index.ts
31
- var index_exports = {};
32
- __export(index_exports, {
33
- Root: () => Root,
34
- Separator: () => Separator
35
- });
36
- module.exports = __toCommonJS(index_exports);
37
-
38
- // src/separator.tsx
39
- var React = __toESM(require("react"));
40
- var import_react_primitive = require("@radix-ui/react-primitive");
41
- var import_jsx_runtime = require("react/jsx-runtime");
42
- var NAME = "Separator";
43
- var DEFAULT_ORIENTATION = "horizontal";
44
- var ORIENTATIONS = ["horizontal", "vertical"];
45
- var Separator = React.forwardRef((props, forwardedRef) => {
46
- const { decorative, orientation: orientationProp = DEFAULT_ORIENTATION, ...domProps } = props;
47
- const orientation = isValidOrientation(orientationProp) ? orientationProp : DEFAULT_ORIENTATION;
48
- const ariaOrientation = orientation === "vertical" ? orientation : void 0;
49
- const semanticProps = decorative ? { role: "none" } : { "aria-orientation": ariaOrientation, role: "separator" };
50
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
51
- import_react_primitive.Primitive.div,
52
- {
53
- "data-orientation": orientation,
54
- ...semanticProps,
55
- ...domProps,
56
- ref: forwardedRef
57
- }
58
- );
59
- });
60
- Separator.displayName = NAME;
61
- function isValidOrientation(orientation) {
62
- return ORIENTATIONS.includes(orientation);
63
- }
64
- var Root = Separator;
65
- //# sourceMappingURL=index.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../src/index.ts", "../src/separator.tsx"],
4
- "sourcesContent": ["export {\n Separator,\n //\n Root,\n} from './separator';\nexport type { SeparatorProps } from './separator';\n", "import * as React from 'react';\nimport { Primitive } from '@radix-ui/react-primitive';\n\n/* -------------------------------------------------------------------------------------------------\n * Separator\n * -----------------------------------------------------------------------------------------------*/\n\nconst NAME = 'Separator';\nconst DEFAULT_ORIENTATION = 'horizontal';\nconst ORIENTATIONS = ['horizontal', 'vertical'] as const;\n\ntype Orientation = (typeof ORIENTATIONS)[number];\ntype SeparatorElement = React.ComponentRef<typeof Primitive.div>;\ntype PrimitiveDivProps = React.ComponentPropsWithoutRef<typeof Primitive.div>;\ninterface SeparatorProps extends PrimitiveDivProps {\n /**\n * Either `vertical` or `horizontal`. Defaults to `horizontal`.\n */\n orientation?: Orientation;\n /**\n * Whether or not the component is purely decorative. When true, accessibility-related attributes\n * are updated so that that the rendered element is removed from the accessibility tree.\n */\n decorative?: boolean;\n}\n\nconst Separator = React.forwardRef<SeparatorElement, SeparatorProps>((props, forwardedRef) => {\n const { decorative, orientation: orientationProp = DEFAULT_ORIENTATION, ...domProps } = props;\n const orientation = isValidOrientation(orientationProp) ? orientationProp : DEFAULT_ORIENTATION;\n // `aria-orientation` defaults to `horizontal` so we only need it if `orientation` is vertical\n const ariaOrientation = orientation === 'vertical' ? orientation : undefined;\n const semanticProps = decorative\n ? { role: 'none' }\n : { 'aria-orientation': ariaOrientation, role: 'separator' };\n\n return (\n <Primitive.div\n data-orientation={orientation}\n {...semanticProps}\n {...domProps}\n ref={forwardedRef}\n />\n );\n});\n\nSeparator.displayName = NAME;\n\n/* -----------------------------------------------------------------------------------------------*/\n\nfunction isValidOrientation(orientation: any): orientation is Orientation {\n return ORIENTATIONS.includes(orientation);\n}\n\nconst Root = Separator;\n\nexport {\n Separator,\n //\n Root,\n};\nexport type { SeparatorProps };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,YAAuB;AACvB,6BAA0B;AAmCtB;AA7BJ,IAAM,OAAO;AACb,IAAM,sBAAsB;AAC5B,IAAM,eAAe,CAAC,cAAc,UAAU;AAiB9C,IAAM,YAAkB,iBAA6C,CAAC,OAAO,iBAAiB;AAC5F,QAAM,EAAE,YAAY,aAAa,kBAAkB,qBAAqB,GAAG,SAAS,IAAI;AACxF,QAAM,cAAc,mBAAmB,eAAe,IAAI,kBAAkB;AAE5E,QAAM,kBAAkB,gBAAgB,aAAa,cAAc;AACnE,QAAM,gBAAgB,aAClB,EAAE,MAAM,OAAO,IACf,EAAE,oBAAoB,iBAAiB,MAAM,YAAY;AAE7D,SACE;AAAA,IAAC,iCAAU;AAAA,IAAV;AAAA,MACC,oBAAkB;AAAA,MACjB,GAAG;AAAA,MACH,GAAG;AAAA,MACJ,KAAK;AAAA;AAAA,EACP;AAEJ,CAAC;AAED,UAAU,cAAc;AAIxB,SAAS,mBAAmB,aAA8C;AACxE,SAAO,aAAa,SAAS,WAAW;AAC1C;AAEA,IAAM,OAAO;",
6
- "names": []
7
- }
@@ -1,32 +0,0 @@
1
- // src/separator.tsx
2
- import * as React from "react";
3
- import { Primitive } from "@radix-ui/react-primitive";
4
- import { jsx } from "react/jsx-runtime";
5
- var NAME = "Separator";
6
- var DEFAULT_ORIENTATION = "horizontal";
7
- var ORIENTATIONS = ["horizontal", "vertical"];
8
- var Separator = React.forwardRef((props, forwardedRef) => {
9
- const { decorative, orientation: orientationProp = DEFAULT_ORIENTATION, ...domProps } = props;
10
- const orientation = isValidOrientation(orientationProp) ? orientationProp : DEFAULT_ORIENTATION;
11
- const ariaOrientation = orientation === "vertical" ? orientation : void 0;
12
- const semanticProps = decorative ? { role: "none" } : { "aria-orientation": ariaOrientation, role: "separator" };
13
- return /* @__PURE__ */ jsx(
14
- Primitive.div,
15
- {
16
- "data-orientation": orientation,
17
- ...semanticProps,
18
- ...domProps,
19
- ref: forwardedRef
20
- }
21
- );
22
- });
23
- Separator.displayName = NAME;
24
- function isValidOrientation(orientation) {
25
- return ORIENTATIONS.includes(orientation);
26
- }
27
- var Root = Separator;
28
- export {
29
- Root,
30
- Separator
31
- };
32
- //# sourceMappingURL=index.mjs.map