@btst/stack 1.11.0 → 1.12.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 (163) hide show
  1. package/dist/node_modules/.pnpm/@dnd-kit_core@6.3.1_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@dnd-kit/core/dist/core.esm.cjs +1 -1
  2. package/dist/node_modules/.pnpm/@dnd-kit_core@6.3.1_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@dnd-kit/core/dist/core.esm.mjs +1 -1
  3. package/dist/node_modules/.pnpm/@dnd-kit_sortable@10.0.0_@dnd-kit_core@6.3.1_react-dom@19.2.0_react@19.2.0__react@19.2.0__react@19.2.0/node_modules/@dnd-kit/sortable/dist/sortable.esm.cjs +77 -0
  4. package/dist/node_modules/.pnpm/@dnd-kit_sortable@10.0.0_@dnd-kit_core@6.3.1_react-dom@19.2.0_react@19.2.0__react@19.2.0__react@19.2.0/node_modules/@dnd-kit/sortable/dist/sortable.esm.mjs +79 -3
  5. package/dist/node_modules/.pnpm/@radix-ui_react-avatar@1.1.11_@types_react-dom@19.2.3_@types_react@19.2.6__@types_react_850cfbef1935a6e49a6ad6c93c7ca70d/node_modules/@radix-ui/react-avatar/dist/index.cjs +140 -0
  6. package/dist/node_modules/.pnpm/@radix-ui_react-avatar@1.1.11_@types_react-dom@19.2.3_@types_react@19.2.6__@types_react_850cfbef1935a6e49a6ad6c93c7ca70d/node_modules/@radix-ui/react-avatar/dist/index.mjs +119 -0
  7. package/dist/node_modules/.pnpm/@radix-ui_react-context@1.1.3_@types_react@19.2.6_react@19.2.0/node_modules/@radix-ui/react-context/dist/index.cjs +80 -0
  8. package/dist/node_modules/.pnpm/@radix-ui_react-context@1.1.3_@types_react@19.2.6_react@19.2.0/node_modules/@radix-ui/react-context/dist/index.mjs +64 -0
  9. package/dist/node_modules/.pnpm/@radix-ui_react-use-is-hydrated@0.1.0_@types_react@19.2.6_react@19.2.0/node_modules/@radix-ui/react-use-is-hydrated/dist/index.cjs +18 -0
  10. package/dist/node_modules/.pnpm/@radix-ui_react-use-is-hydrated@0.1.0_@types_react@19.2.6_react@19.2.0/node_modules/@radix-ui/react-use-is-hydrated/dist/index.mjs +16 -0
  11. package/dist/packages/better-stack/src/plugins/kanban/api/plugin.cjs +846 -0
  12. package/dist/packages/better-stack/src/plugins/kanban/api/plugin.mjs +844 -0
  13. package/dist/packages/better-stack/src/plugins/kanban/client/components/forms/board-form.cjs +85 -0
  14. package/dist/packages/better-stack/src/plugins/kanban/client/components/forms/board-form.mjs +83 -0
  15. package/dist/packages/better-stack/src/plugins/kanban/client/components/forms/column-form.cjs +72 -0
  16. package/dist/packages/better-stack/src/plugins/kanban/client/components/forms/column-form.mjs +70 -0
  17. package/dist/packages/better-stack/src/plugins/kanban/client/components/forms/task-form.cjs +200 -0
  18. package/dist/packages/better-stack/src/plugins/kanban/client/components/forms/task-form.mjs +198 -0
  19. package/dist/packages/better-stack/src/plugins/kanban/client/components/loading/board-skeleton.cjs +47 -0
  20. package/dist/packages/better-stack/src/plugins/kanban/client/components/loading/board-skeleton.mjs +45 -0
  21. package/dist/packages/better-stack/src/plugins/kanban/client/components/loading/boards-list-skeleton.cjs +30 -0
  22. package/dist/packages/better-stack/src/plugins/kanban/client/components/loading/boards-list-skeleton.mjs +28 -0
  23. package/dist/packages/better-stack/src/plugins/kanban/client/components/pages/404-page.cjs +27 -0
  24. package/dist/packages/better-stack/src/plugins/kanban/client/components/pages/404-page.mjs +25 -0
  25. package/dist/packages/better-stack/src/plugins/kanban/client/components/pages/board-page.cjs +31 -0
  26. package/dist/packages/better-stack/src/plugins/kanban/client/components/pages/board-page.internal.cjs +458 -0
  27. package/dist/packages/better-stack/src/plugins/kanban/client/components/pages/board-page.internal.mjs +456 -0
  28. package/dist/packages/better-stack/src/plugins/kanban/client/components/pages/board-page.mjs +29 -0
  29. package/dist/packages/better-stack/src/plugins/kanban/client/components/pages/boards-list-page.cjs +30 -0
  30. package/dist/packages/better-stack/src/plugins/kanban/client/components/pages/boards-list-page.internal.cjs +72 -0
  31. package/dist/packages/better-stack/src/plugins/kanban/client/components/pages/boards-list-page.internal.mjs +70 -0
  32. package/dist/packages/better-stack/src/plugins/kanban/client/components/pages/boards-list-page.mjs +28 -0
  33. package/dist/packages/better-stack/src/plugins/kanban/client/components/pages/new-board-page.cjs +30 -0
  34. package/dist/packages/better-stack/src/plugins/kanban/client/components/pages/new-board-page.internal.cjs +51 -0
  35. package/dist/packages/better-stack/src/plugins/kanban/client/components/pages/new-board-page.internal.mjs +49 -0
  36. package/dist/packages/better-stack/src/plugins/kanban/client/components/pages/new-board-page.mjs +28 -0
  37. package/dist/packages/better-stack/src/plugins/kanban/client/components/shared/column-content.cjs +76 -0
  38. package/dist/packages/better-stack/src/plugins/kanban/client/components/shared/column-content.mjs +74 -0
  39. package/dist/packages/better-stack/src/plugins/kanban/client/components/shared/default-error.cjs +27 -0
  40. package/dist/packages/better-stack/src/plugins/kanban/client/components/shared/default-error.mjs +25 -0
  41. package/dist/packages/better-stack/src/plugins/kanban/client/components/shared/empty-state.cjs +32 -0
  42. package/dist/packages/better-stack/src/plugins/kanban/client/components/shared/empty-state.mjs +30 -0
  43. package/dist/packages/better-stack/src/plugins/kanban/client/components/shared/kanban-board.cjs +78 -0
  44. package/dist/packages/better-stack/src/plugins/kanban/client/components/shared/kanban-board.mjs +76 -0
  45. package/dist/packages/better-stack/src/plugins/kanban/client/components/shared/page-wrapper.cjs +15 -0
  46. package/dist/packages/better-stack/src/plugins/kanban/client/components/shared/page-wrapper.mjs +13 -0
  47. package/dist/packages/better-stack/src/plugins/kanban/client/components/shared/task-card.cjs +68 -0
  48. package/dist/packages/better-stack/src/plugins/kanban/client/components/shared/task-card.mjs +66 -0
  49. package/dist/packages/better-stack/src/plugins/kanban/client/components/shared/user-avatar.cjs +32 -0
  50. package/dist/packages/better-stack/src/plugins/kanban/client/components/shared/user-avatar.mjs +30 -0
  51. package/dist/packages/better-stack/src/plugins/kanban/client/hooks/kanban-hooks.cjs +391 -0
  52. package/dist/packages/better-stack/src/plugins/kanban/client/hooks/kanban-hooks.mjs +381 -0
  53. package/dist/packages/better-stack/src/plugins/kanban/client/plugin.cjs +290 -0
  54. package/dist/packages/better-stack/src/plugins/kanban/client/plugin.mjs +288 -0
  55. package/dist/packages/better-stack/src/plugins/kanban/db.cjs +125 -0
  56. package/dist/packages/better-stack/src/plugins/kanban/db.mjs +123 -0
  57. package/dist/packages/better-stack/src/plugins/kanban/schemas.cjs +117 -0
  58. package/dist/packages/better-stack/src/plugins/kanban/schemas.mjs +102 -0
  59. package/dist/packages/better-stack/src/plugins/kanban/utils.cjs +49 -0
  60. package/dist/packages/better-stack/src/plugins/kanban/utils.mjs +45 -0
  61. package/dist/packages/ui/src/components/avatar.cjs +58 -0
  62. package/dist/packages/ui/src/components/avatar.mjs +54 -0
  63. package/dist/packages/ui/src/components/command.cjs +3 -3
  64. package/dist/packages/ui/src/components/command.mjs +3 -3
  65. package/dist/packages/ui/src/components/form-builder/index.mjs +2 -2
  66. package/dist/packages/ui/src/components/kanban.cjs +835 -0
  67. package/dist/packages/ui/src/components/kanban.mjs +805 -0
  68. package/dist/packages/ui/src/components/popover.cjs +8 -3
  69. package/dist/packages/ui/src/components/popover.mjs +9 -4
  70. package/dist/packages/ui/src/components/search-select.cjs +75 -0
  71. package/dist/packages/ui/src/components/search-select.mjs +73 -0
  72. package/dist/packages/ui/src/lib/compose-refs.cjs +56 -0
  73. package/dist/packages/ui/src/lib/compose-refs.mjs +39 -0
  74. package/dist/plugins/blog/api/index.d.cts +1 -1
  75. package/dist/plugins/blog/api/index.d.mts +1 -1
  76. package/dist/plugins/blog/api/index.d.ts +1 -1
  77. package/dist/plugins/blog/client/hooks/index.d.cts +2 -2
  78. package/dist/plugins/blog/client/hooks/index.d.mts +2 -2
  79. package/dist/plugins/blog/client/hooks/index.d.ts +2 -2
  80. package/dist/plugins/blog/client/index.d.cts +1 -1
  81. package/dist/plugins/blog/client/index.d.mts +1 -1
  82. package/dist/plugins/blog/client/index.d.ts +1 -1
  83. package/dist/plugins/blog/query-keys.d.cts +2 -2
  84. package/dist/plugins/blog/query-keys.d.mts +2 -2
  85. package/dist/plugins/blog/query-keys.d.ts +2 -2
  86. package/dist/plugins/kanban/api/index.cjs +7 -0
  87. package/dist/plugins/kanban/api/index.d.cts +403 -0
  88. package/dist/plugins/kanban/api/index.d.mts +403 -0
  89. package/dist/plugins/kanban/api/index.d.ts +403 -0
  90. package/dist/plugins/kanban/api/index.mjs +1 -0
  91. package/dist/plugins/kanban/client/components/index.cjs +35 -0
  92. package/dist/plugins/kanban/client/components/index.d.cts +102 -0
  93. package/dist/plugins/kanban/client/components/index.d.mts +102 -0
  94. package/dist/plugins/kanban/client/components/index.d.ts +102 -0
  95. package/dist/plugins/kanban/client/components/index.mjs +15 -0
  96. package/dist/plugins/kanban/client/hooks/index.cjs +15 -0
  97. package/dist/plugins/kanban/client/hooks/index.d.cts +143 -0
  98. package/dist/plugins/kanban/client/hooks/index.d.mts +143 -0
  99. package/dist/plugins/kanban/client/hooks/index.d.ts +143 -0
  100. package/dist/plugins/kanban/client/hooks/index.mjs +1 -0
  101. package/dist/plugins/kanban/client/index.cjs +7 -0
  102. package/dist/plugins/kanban/client/index.d.cts +196 -0
  103. package/dist/plugins/kanban/client/index.d.mts +196 -0
  104. package/dist/plugins/kanban/client/index.d.ts +196 -0
  105. package/dist/plugins/kanban/client/index.mjs +1 -0
  106. package/dist/plugins/kanban/client.css +68 -0
  107. package/dist/plugins/kanban/query-keys.cjs +105 -0
  108. package/dist/plugins/kanban/query-keys.d.cts +59 -0
  109. package/dist/plugins/kanban/query-keys.d.mts +59 -0
  110. package/dist/plugins/kanban/query-keys.d.ts +59 -0
  111. package/dist/plugins/kanban/query-keys.mjs +103 -0
  112. package/dist/plugins/kanban/style.css +7 -0
  113. package/dist/plugins/ui-builder/style.css +6 -0
  114. package/dist/shared/stack.DKDMI-QO.d.cts +70 -0
  115. package/dist/shared/stack.DKDMI-QO.d.mts +70 -0
  116. package/dist/shared/stack.DKDMI-QO.d.ts +70 -0
  117. package/dist/shared/stack.FeaWkglm.d.cts +190 -0
  118. package/dist/shared/stack.FeaWkglm.d.mts +190 -0
  119. package/dist/shared/stack.FeaWkglm.d.ts +190 -0
  120. package/package.json +56 -2
  121. package/src/plugins/kanban/api/index.ts +6 -0
  122. package/src/plugins/kanban/api/plugin.ts +1245 -0
  123. package/src/plugins/kanban/client/components/forms/board-form.tsx +108 -0
  124. package/src/plugins/kanban/client/components/forms/column-form.tsx +97 -0
  125. package/src/plugins/kanban/client/components/forms/task-form.tsx +274 -0
  126. package/src/plugins/kanban/client/components/index.tsx +21 -0
  127. package/src/plugins/kanban/client/components/loading/board-skeleton.tsx +49 -0
  128. package/src/plugins/kanban/client/components/loading/boards-list-skeleton.tsx +34 -0
  129. package/src/plugins/kanban/client/components/loading/index.tsx +2 -0
  130. package/src/plugins/kanban/client/components/pages/404-page.tsx +28 -0
  131. package/src/plugins/kanban/client/components/pages/board-page.internal.tsx +575 -0
  132. package/src/plugins/kanban/client/components/pages/board-page.tsx +31 -0
  133. package/src/plugins/kanban/client/components/pages/boards-list-page.internal.tsx +101 -0
  134. package/src/plugins/kanban/client/components/pages/boards-list-page.tsx +26 -0
  135. package/src/plugins/kanban/client/components/pages/new-board-page.internal.tsx +65 -0
  136. package/src/plugins/kanban/client/components/pages/new-board-page.tsx +26 -0
  137. package/src/plugins/kanban/client/components/shared/column-content.tsx +108 -0
  138. package/src/plugins/kanban/client/components/shared/default-error.tsx +32 -0
  139. package/src/plugins/kanban/client/components/shared/empty-state.tsx +37 -0
  140. package/src/plugins/kanban/client/components/shared/kanban-board.tsx +87 -0
  141. package/src/plugins/kanban/client/components/shared/page-wrapper.tsx +20 -0
  142. package/src/plugins/kanban/client/components/shared/task-card.tsx +79 -0
  143. package/src/plugins/kanban/client/components/shared/user-avatar.tsx +63 -0
  144. package/src/plugins/kanban/client/hooks/index.tsx +11 -0
  145. package/src/plugins/kanban/client/hooks/kanban-hooks.tsx +560 -0
  146. package/src/plugins/kanban/client/index.ts +8 -0
  147. package/src/plugins/kanban/client/localization/index.ts +28 -0
  148. package/src/plugins/kanban/client/localization/kanban-common.ts +69 -0
  149. package/src/plugins/kanban/client/localization/kanban-forms.ts +70 -0
  150. package/src/plugins/kanban/client/localization/kanban-list.ts +36 -0
  151. package/src/plugins/kanban/client/overrides.ts +145 -0
  152. package/src/plugins/kanban/client/plugin.tsx +463 -0
  153. package/src/plugins/kanban/client.css +68 -0
  154. package/src/plugins/kanban/db.ts +125 -0
  155. package/src/plugins/kanban/query-keys.ts +154 -0
  156. package/src/plugins/kanban/schemas.ts +143 -0
  157. package/src/plugins/kanban/style.css +7 -0
  158. package/src/plugins/kanban/types.ts +106 -0
  159. package/src/plugins/kanban/utils.ts +107 -0
  160. package/src/plugins/ui-builder/style.css +6 -0
  161. package/dist/shared/{stack.DLhzx1-D.d.cts → stack.CcI4sYJP.d.cts} +1 -1
  162. package/dist/shared/{stack.DLhzx1-D.d.mts → stack.CcI4sYJP.d.mts} +1 -1
  163. package/dist/shared/{stack.DLhzx1-D.d.ts → stack.CcI4sYJP.d.ts} +1 -1
@@ -19,21 +19,26 @@ function PopoverContent({
19
19
  className,
20
20
  align = "center",
21
21
  sideOffset = 4,
22
+ usePortal = true,
22
23
  ...props
23
24
  }) {
24
- return /* @__PURE__ */ jsxRuntime.jsx(index.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
25
+ const content = /* @__PURE__ */ jsxRuntime.jsx(
25
26
  index.Content,
26
27
  {
27
28
  "data-slot": "popover-content",
28
29
  align,
29
30
  sideOffset,
30
31
  className: utils.cn(
31
- "bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",
32
+ "bg-popover text-popover-foreground pointer-events-auto data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",
32
33
  className
33
34
  ),
34
35
  ...props
35
36
  }
36
- ) });
37
+ );
38
+ if (!usePortal) {
39
+ return content;
40
+ }
41
+ return /* @__PURE__ */ jsxRuntime.jsx(index.Portal, { children: content });
37
42
  }
38
43
 
39
44
  exports.Popover = Popover;
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
  import { jsx } from 'react/jsx-runtime';
3
- import { Root as Root2, Trigger, Portal, Content as Content2 } from '../../../../node_modules/.pnpm/@radix-ui_react-popover@1.1.15_@types_react-dom@19.2.3_@types_react@19.2.6__@types_reac_5c5a3ca63b34dfe7d9d23f1e8cee675c/node_modules/@radix-ui/react-popover/dist/index.mjs';
3
+ import { Root as Root2, Trigger, Content as Content2, Portal } from '../../../../node_modules/.pnpm/@radix-ui_react-popover@1.1.15_@types_react-dom@19.2.3_@types_react@19.2.6__@types_reac_5c5a3ca63b34dfe7d9d23f1e8cee675c/node_modules/@radix-ui/react-popover/dist/index.mjs';
4
4
  import { cn } from '../lib/utils.mjs';
5
5
 
6
6
  function Popover({
@@ -17,21 +17,26 @@ function PopoverContent({
17
17
  className,
18
18
  align = "center",
19
19
  sideOffset = 4,
20
+ usePortal = true,
20
21
  ...props
21
22
  }) {
22
- return /* @__PURE__ */ jsx(Portal, { children: /* @__PURE__ */ jsx(
23
+ const content = /* @__PURE__ */ jsx(
23
24
  Content2,
24
25
  {
25
26
  "data-slot": "popover-content",
26
27
  align,
27
28
  sideOffset,
28
29
  className: cn(
29
- "bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",
30
+ "bg-popover text-popover-foreground pointer-events-auto data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",
30
31
  className
31
32
  ),
32
33
  ...props
33
34
  }
34
- ) });
35
+ );
36
+ if (!usePortal) {
37
+ return content;
38
+ }
39
+ return /* @__PURE__ */ jsx(Portal, { children: content });
35
40
  }
36
41
 
37
42
  export { Popover, PopoverContent, PopoverTrigger };
@@ -0,0 +1,75 @@
1
+ "use client";
2
+ 'use strict';
3
+
4
+ const jsxRuntime = require('react/jsx-runtime');
5
+ const React = require('react');
6
+ const LucideIcons = require('lucide-react');
7
+ const utils = require('../lib/utils.cjs');
8
+ const button = require('./button.cjs');
9
+ const command = require('./command.cjs');
10
+ const popover = require('./popover.cjs');
11
+
12
+ function SearchSelect({
13
+ options,
14
+ value,
15
+ onChange,
16
+ placeholder = "Select option",
17
+ emptyMessage = "No option found."
18
+ }) {
19
+ const id = React.useId();
20
+ const [open, setOpen] = React.useState(false);
21
+ return /* @__PURE__ */ jsxRuntime.jsxs(popover.Popover, { open, onOpenChange: setOpen, modal: false, children: [
22
+ /* @__PURE__ */ jsxRuntime.jsx(popover.PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(
23
+ button.Button,
24
+ {
25
+ id,
26
+ variant: "outline",
27
+ role: "combobox",
28
+ "aria-expanded": open,
29
+ className: "bg-background hover:bg-background border-input w-full justify-between px-3 font-normal outline-offset-0 outline-none focus-visible:outline-[3px]",
30
+ children: [
31
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: utils.cn("truncate", !value && "text-muted-foreground"), children: value ? options.find((option) => option.value === value)?.label : placeholder }),
32
+ /* @__PURE__ */ jsxRuntime.jsx(
33
+ LucideIcons.ChevronDownIcon,
34
+ {
35
+ size: 16,
36
+ className: "text-muted-foreground/80 shrink-0",
37
+ "aria-hidden": "true"
38
+ }
39
+ )
40
+ ]
41
+ }
42
+ ) }),
43
+ /* @__PURE__ */ jsxRuntime.jsx(
44
+ popover.PopoverContent,
45
+ {
46
+ className: "border-input w-full min-w-[var(--radix-popper-anchor-width)] p-0 z-[9999]",
47
+ align: "start",
48
+ usePortal: false,
49
+ children: /* @__PURE__ */ jsxRuntime.jsxs(command.Command, { children: [
50
+ /* @__PURE__ */ jsxRuntime.jsx(command.CommandInput, { placeholder: "Search options..." }),
51
+ /* @__PURE__ */ jsxRuntime.jsxs(command.CommandList, { children: [
52
+ /* @__PURE__ */ jsxRuntime.jsx(command.CommandEmpty, { children: emptyMessage }),
53
+ /* @__PURE__ */ jsxRuntime.jsx(command.CommandGroup, { children: options.map((option) => /* @__PURE__ */ jsxRuntime.jsxs(
54
+ command.CommandItem,
55
+ {
56
+ value: option.value,
57
+ onSelect: (currentValue) => {
58
+ onChange(currentValue === value ? "" : currentValue);
59
+ setOpen(false);
60
+ },
61
+ children: [
62
+ option.label,
63
+ value === option.value && /* @__PURE__ */ jsxRuntime.jsx(LucideIcons.CheckIcon, { size: 16, className: "ml-auto" })
64
+ ]
65
+ },
66
+ option.value
67
+ )) })
68
+ ] })
69
+ ] })
70
+ }
71
+ )
72
+ ] });
73
+ }
74
+
75
+ module.exports = SearchSelect;
@@ -0,0 +1,73 @@
1
+ "use client";
2
+ import { jsxs, jsx } from 'react/jsx-runtime';
3
+ import { useId, useState } from 'react';
4
+ import { ChevronDownIcon, CheckIcon } from 'lucide-react';
5
+ import { cn } from '../lib/utils.mjs';
6
+ import { Button } from './button.mjs';
7
+ import { Command, CommandInput, CommandList, CommandEmpty, CommandGroup, CommandItem } from './command.mjs';
8
+ import { Popover, PopoverTrigger, PopoverContent } from './popover.mjs';
9
+
10
+ function SearchSelect({
11
+ options,
12
+ value,
13
+ onChange,
14
+ placeholder = "Select option",
15
+ emptyMessage = "No option found."
16
+ }) {
17
+ const id = useId();
18
+ const [open, setOpen] = useState(false);
19
+ return /* @__PURE__ */ jsxs(Popover, { open, onOpenChange: setOpen, modal: false, children: [
20
+ /* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(
21
+ Button,
22
+ {
23
+ id,
24
+ variant: "outline",
25
+ role: "combobox",
26
+ "aria-expanded": open,
27
+ className: "bg-background hover:bg-background border-input w-full justify-between px-3 font-normal outline-offset-0 outline-none focus-visible:outline-[3px]",
28
+ children: [
29
+ /* @__PURE__ */ jsx("span", { className: cn("truncate", !value && "text-muted-foreground"), children: value ? options.find((option) => option.value === value)?.label : placeholder }),
30
+ /* @__PURE__ */ jsx(
31
+ ChevronDownIcon,
32
+ {
33
+ size: 16,
34
+ className: "text-muted-foreground/80 shrink-0",
35
+ "aria-hidden": "true"
36
+ }
37
+ )
38
+ ]
39
+ }
40
+ ) }),
41
+ /* @__PURE__ */ jsx(
42
+ PopoverContent,
43
+ {
44
+ className: "border-input w-full min-w-[var(--radix-popper-anchor-width)] p-0 z-[9999]",
45
+ align: "start",
46
+ usePortal: false,
47
+ children: /* @__PURE__ */ jsxs(Command, { children: [
48
+ /* @__PURE__ */ jsx(CommandInput, { placeholder: "Search options..." }),
49
+ /* @__PURE__ */ jsxs(CommandList, { children: [
50
+ /* @__PURE__ */ jsx(CommandEmpty, { children: emptyMessage }),
51
+ /* @__PURE__ */ jsx(CommandGroup, { children: options.map((option) => /* @__PURE__ */ jsxs(
52
+ CommandItem,
53
+ {
54
+ value: option.value,
55
+ onSelect: (currentValue) => {
56
+ onChange(currentValue === value ? "" : currentValue);
57
+ setOpen(false);
58
+ },
59
+ children: [
60
+ option.label,
61
+ value === option.value && /* @__PURE__ */ jsx(CheckIcon, { size: 16, className: "ml-auto" })
62
+ ]
63
+ },
64
+ option.value
65
+ )) })
66
+ ] })
67
+ ] })
68
+ }
69
+ )
70
+ ] });
71
+ }
72
+
73
+ export { SearchSelect as default };
@@ -0,0 +1,56 @@
1
+ 'use strict';
2
+
3
+ const React = require('react');
4
+
5
+ function _interopNamespaceCompat(e) {
6
+ if (e && typeof e === 'object' && 'default' in e) return e;
7
+ const n = Object.create(null);
8
+ if (e) {
9
+ for (const k in e) {
10
+ n[k] = e[k];
11
+ }
12
+ }
13
+ n.default = e;
14
+ return n;
15
+ }
16
+
17
+ const React__namespace = /*#__PURE__*/_interopNamespaceCompat(React);
18
+
19
+ function setRef(ref, value) {
20
+ if (typeof ref === "function") {
21
+ return ref(value);
22
+ }
23
+ if (ref !== null && ref !== void 0) {
24
+ ref.current = value;
25
+ }
26
+ }
27
+ function composeRefs(...refs) {
28
+ return (node) => {
29
+ let hasCleanup = false;
30
+ const cleanups = refs.map((ref) => {
31
+ const cleanup = setRef(ref, node);
32
+ if (!hasCleanup && typeof cleanup === "function") {
33
+ hasCleanup = true;
34
+ }
35
+ return cleanup;
36
+ });
37
+ if (hasCleanup) {
38
+ return () => {
39
+ for (let i = 0; i < cleanups.length; i++) {
40
+ const cleanup = cleanups[i];
41
+ if (typeof cleanup === "function") {
42
+ cleanup();
43
+ } else {
44
+ setRef(refs[i], null);
45
+ }
46
+ }
47
+ };
48
+ }
49
+ };
50
+ }
51
+ function useComposedRefs(...refs) {
52
+ return React__namespace.useCallback(composeRefs(...refs), refs);
53
+ }
54
+
55
+ exports.composeRefs = composeRefs;
56
+ exports.useComposedRefs = useComposedRefs;
@@ -0,0 +1,39 @@
1
+ import * as React from 'react';
2
+
3
+ function setRef(ref, value) {
4
+ if (typeof ref === "function") {
5
+ return ref(value);
6
+ }
7
+ if (ref !== null && ref !== void 0) {
8
+ ref.current = value;
9
+ }
10
+ }
11
+ function composeRefs(...refs) {
12
+ return (node) => {
13
+ let hasCleanup = false;
14
+ const cleanups = refs.map((ref) => {
15
+ const cleanup = setRef(ref, node);
16
+ if (!hasCleanup && typeof cleanup === "function") {
17
+ hasCleanup = true;
18
+ }
19
+ return cleanup;
20
+ });
21
+ if (hasCleanup) {
22
+ return () => {
23
+ for (let i = 0; i < cleanups.length; i++) {
24
+ const cleanup = cleanups[i];
25
+ if (typeof cleanup === "function") {
26
+ cleanup();
27
+ } else {
28
+ setRef(refs[i], null);
29
+ }
30
+ }
31
+ };
32
+ }
33
+ };
34
+ }
35
+ function useComposedRefs(...refs) {
36
+ return React.useCallback(composeRefs(...refs), refs);
37
+ }
38
+
39
+ export { composeRefs, useComposedRefs };
@@ -2,6 +2,6 @@ export { B as BlogApiContext, c as BlogApiRouter, a as BlogBackendHooks, N as Ne
2
2
  import '@btst/stack/plugins/api';
3
3
  import 'better-call';
4
4
  import 'zod';
5
- import '../../../shared/stack.DLhzx1-D.cjs';
5
+ import '../../../shared/stack.CcI4sYJP.cjs';
6
6
  import '@tanstack/react-query';
7
7
  import '@btst/stack/plugins/client';
@@ -2,6 +2,6 @@ export { B as BlogApiContext, c as BlogApiRouter, a as BlogBackendHooks, N as Ne
2
2
  import '@btst/stack/plugins/api';
3
3
  import 'better-call';
4
4
  import 'zod';
5
- import '../../../shared/stack.DLhzx1-D.mjs';
5
+ import '../../../shared/stack.CcI4sYJP.mjs';
6
6
  import '@tanstack/react-query';
7
7
  import '@btst/stack/plugins/client';
@@ -2,6 +2,6 @@ export { B as BlogApiContext, c as BlogApiRouter, a as BlogBackendHooks, N as Ne
2
2
  import '@btst/stack/plugins/api';
3
3
  import 'better-call';
4
4
  import 'zod';
5
- import '../../../shared/stack.DLhzx1-D.js';
5
+ import '../../../shared/stack.CcI4sYJP.js';
6
6
  import '@tanstack/react-query';
7
7
  import '@btst/stack/plugins/client';
@@ -1,5 +1,5 @@
1
1
  import * as _tanstack_react_query from '@tanstack/react-query';
2
- import { S as SerializedPost, c as createPostSchema, u as updatePostSchema, a as SerializedTag } from '../../../../shared/stack.DLhzx1-D.cjs';
2
+ import { S as SerializedPost, c as createPostSchema, u as updatePostSchema, a as SerializedTag } from '../../../../shared/stack.CcI4sYJP.cjs';
3
3
  import { z } from 'zod';
4
4
 
5
5
  /**
@@ -128,8 +128,8 @@ declare function useSuspenseTags(): {
128
128
  };
129
129
  /** Create a new post */
130
130
  declare function useCreatePost(): _tanstack_react_query.UseMutationResult<SerializedPost | null, Error, {
131
- title: string;
132
131
  published: boolean;
132
+ title: string;
133
133
  content: string;
134
134
  excerpt: string;
135
135
  tags: ({
@@ -1,5 +1,5 @@
1
1
  import * as _tanstack_react_query from '@tanstack/react-query';
2
- import { S as SerializedPost, c as createPostSchema, u as updatePostSchema, a as SerializedTag } from '../../../../shared/stack.DLhzx1-D.mjs';
2
+ import { S as SerializedPost, c as createPostSchema, u as updatePostSchema, a as SerializedTag } from '../../../../shared/stack.CcI4sYJP.mjs';
3
3
  import { z } from 'zod';
4
4
 
5
5
  /**
@@ -128,8 +128,8 @@ declare function useSuspenseTags(): {
128
128
  };
129
129
  /** Create a new post */
130
130
  declare function useCreatePost(): _tanstack_react_query.UseMutationResult<SerializedPost | null, Error, {
131
- title: string;
132
131
  published: boolean;
132
+ title: string;
133
133
  content: string;
134
134
  excerpt: string;
135
135
  tags: ({
@@ -1,5 +1,5 @@
1
1
  import * as _tanstack_react_query from '@tanstack/react-query';
2
- import { S as SerializedPost, c as createPostSchema, u as updatePostSchema, a as SerializedTag } from '../../../../shared/stack.DLhzx1-D.js';
2
+ import { S as SerializedPost, c as createPostSchema, u as updatePostSchema, a as SerializedTag } from '../../../../shared/stack.CcI4sYJP.js';
3
3
  import { z } from 'zod';
4
4
 
5
5
  /**
@@ -128,8 +128,8 @@ declare function useSuspenseTags(): {
128
128
  };
129
129
  /** Create a new post */
130
130
  declare function useCreatePost(): _tanstack_react_query.UseMutationResult<SerializedPost | null, Error, {
131
- title: string;
132
131
  published: boolean;
132
+ title: string;
133
133
  content: string;
134
134
  excerpt: string;
135
135
  tags: ({
@@ -3,7 +3,7 @@ import * as react from 'react';
3
3
  import { ComponentType } from 'react';
4
4
  import * as _btst_yar from '@btst/yar';
5
5
  import { QueryClient } from '@tanstack/react-query';
6
- import { P as Post, S as SerializedPost } from '../../../shared/stack.DLhzx1-D.cjs';
6
+ import { P as Post, S as SerializedPost } from '../../../shared/stack.CcI4sYJP.cjs';
7
7
  export { UsePostsOptions, UsePostsResult } from './hooks/index.cjs';
8
8
  import 'zod';
9
9
 
@@ -3,7 +3,7 @@ import * as react from 'react';
3
3
  import { ComponentType } from 'react';
4
4
  import * as _btst_yar from '@btst/yar';
5
5
  import { QueryClient } from '@tanstack/react-query';
6
- import { P as Post, S as SerializedPost } from '../../../shared/stack.DLhzx1-D.mjs';
6
+ import { P as Post, S as SerializedPost } from '../../../shared/stack.CcI4sYJP.mjs';
7
7
  export { UsePostsOptions, UsePostsResult } from './hooks/index.mjs';
8
8
  import 'zod';
9
9
 
@@ -3,7 +3,7 @@ import * as react from 'react';
3
3
  import { ComponentType } from 'react';
4
4
  import * as _btst_yar from '@btst/yar';
5
5
  import { QueryClient } from '@tanstack/react-query';
6
- import { P as Post, S as SerializedPost } from '../../../shared/stack.DLhzx1-D.js';
6
+ import { P as Post, S as SerializedPost } from '../../../shared/stack.CcI4sYJP.js';
7
7
  export { UsePostsOptions, UsePostsResult } from './hooks/index.js';
8
8
  import 'zod';
9
9
 
@@ -1,7 +1,7 @@
1
1
  import * as _btst_stack_plugins_api from '@btst/stack/plugins/api';
2
2
  import * as better_call from 'better-call';
3
3
  import { z } from 'zod';
4
- import { c as createPostSchema, u as updatePostSchema, P as Post, T as Tag, S as SerializedPost, a as SerializedTag } from '../../shared/stack.DLhzx1-D.cjs';
4
+ import { c as createPostSchema, u as updatePostSchema, P as Post, T as Tag, S as SerializedPost, a as SerializedTag } from '../../shared/stack.CcI4sYJP.cjs';
5
5
  import * as _tanstack_react_query from '@tanstack/react-query';
6
6
  import { createApiClient } from '@btst/stack/plugins/client';
7
7
 
@@ -144,10 +144,10 @@ declare const blogBackendPlugin: (hooks?: BlogBackendHooks) => _btst_stack_plugi
144
144
  readonly createPost: better_call.StrictEndpoint<"/posts", {
145
145
  method: "POST";
146
146
  body: z.ZodObject<{
147
- title: z.ZodString;
148
147
  slug: z.ZodOptional<z.ZodString>;
149
148
  published: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
150
149
  createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
150
+ title: z.ZodString;
151
151
  content: z.ZodString;
152
152
  excerpt: z.ZodString;
153
153
  image: z.ZodOptional<z.ZodString>;
@@ -1,7 +1,7 @@
1
1
  import * as _btst_stack_plugins_api from '@btst/stack/plugins/api';
2
2
  import * as better_call from 'better-call';
3
3
  import { z } from 'zod';
4
- import { c as createPostSchema, u as updatePostSchema, P as Post, T as Tag, S as SerializedPost, a as SerializedTag } from '../../shared/stack.DLhzx1-D.mjs';
4
+ import { c as createPostSchema, u as updatePostSchema, P as Post, T as Tag, S as SerializedPost, a as SerializedTag } from '../../shared/stack.CcI4sYJP.mjs';
5
5
  import * as _tanstack_react_query from '@tanstack/react-query';
6
6
  import { createApiClient } from '@btst/stack/plugins/client';
7
7
 
@@ -144,10 +144,10 @@ declare const blogBackendPlugin: (hooks?: BlogBackendHooks) => _btst_stack_plugi
144
144
  readonly createPost: better_call.StrictEndpoint<"/posts", {
145
145
  method: "POST";
146
146
  body: z.ZodObject<{
147
- title: z.ZodString;
148
147
  slug: z.ZodOptional<z.ZodString>;
149
148
  published: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
150
149
  createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
150
+ title: z.ZodString;
151
151
  content: z.ZodString;
152
152
  excerpt: z.ZodString;
153
153
  image: z.ZodOptional<z.ZodString>;
@@ -1,7 +1,7 @@
1
1
  import * as _btst_stack_plugins_api from '@btst/stack/plugins/api';
2
2
  import * as better_call from 'better-call';
3
3
  import { z } from 'zod';
4
- import { c as createPostSchema, u as updatePostSchema, P as Post, T as Tag, S as SerializedPost, a as SerializedTag } from '../../shared/stack.DLhzx1-D.js';
4
+ import { c as createPostSchema, u as updatePostSchema, P as Post, T as Tag, S as SerializedPost, a as SerializedTag } from '../../shared/stack.CcI4sYJP.js';
5
5
  import * as _tanstack_react_query from '@tanstack/react-query';
6
6
  import { createApiClient } from '@btst/stack/plugins/client';
7
7
 
@@ -144,10 +144,10 @@ declare const blogBackendPlugin: (hooks?: BlogBackendHooks) => _btst_stack_plugi
144
144
  readonly createPost: better_call.StrictEndpoint<"/posts", {
145
145
  method: "POST";
146
146
  body: z.ZodObject<{
147
- title: z.ZodString;
148
147
  slug: z.ZodOptional<z.ZodString>;
149
148
  published: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
150
149
  createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
150
+ title: z.ZodString;
151
151
  content: z.ZodString;
152
152
  excerpt: z.ZodString;
153
153
  image: z.ZodOptional<z.ZodString>;
@@ -0,0 +1,7 @@
1
+ 'use strict';
2
+
3
+ const plugin = require('../../../packages/better-stack/src/plugins/kanban/api/plugin.cjs');
4
+
5
+
6
+
7
+ exports.kanbanBackendPlugin = plugin.kanbanBackendPlugin;