@btst/stack 1.7.0 → 1.9.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.
- package/dist/api/index.d.cts +2 -2
- package/dist/api/index.d.mts +2 -2
- package/dist/api/index.d.ts +2 -2
- package/dist/client/index.cjs +6 -2
- package/dist/client/index.d.cts +2 -1
- package/dist/client/index.d.mts +2 -1
- package/dist/client/index.d.ts +2 -1
- package/dist/client/index.mjs +6 -2
- package/dist/index.d.cts +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/packages/better-stack/src/plugins/cms/api/plugin.cjs +445 -16
- package/dist/packages/better-stack/src/plugins/cms/api/plugin.mjs +445 -16
- package/dist/packages/better-stack/src/plugins/cms/client/components/forms/content-form.cjs +24 -7
- package/dist/packages/better-stack/src/plugins/cms/client/components/forms/content-form.mjs +25 -8
- package/dist/packages/better-stack/src/plugins/cms/client/components/forms/relation-field.cjs +224 -0
- package/dist/packages/better-stack/src/plugins/cms/client/components/forms/relation-field.mjs +222 -0
- package/dist/packages/better-stack/src/plugins/cms/client/components/inverse-relations-panel.cjs +243 -0
- package/dist/packages/better-stack/src/plugins/cms/client/components/inverse-relations-panel.mjs +241 -0
- package/dist/packages/better-stack/src/plugins/cms/client/components/pages/content-editor-page.internal.cjs +56 -2
- package/dist/packages/better-stack/src/plugins/cms/client/components/pages/content-editor-page.internal.mjs +56 -2
- package/dist/packages/better-stack/src/plugins/cms/client/hooks/cms-hooks.cjs +190 -0
- package/dist/packages/better-stack/src/plugins/cms/client/hooks/cms-hooks.mjs +187 -1
- package/dist/packages/better-stack/src/plugins/cms/db.cjs +38 -0
- package/dist/packages/better-stack/src/plugins/cms/db.mjs +38 -0
- package/dist/packages/better-stack/src/plugins/route-docs/client/components/loading/docs-skeleton.cjs +43 -0
- package/dist/packages/better-stack/src/plugins/route-docs/client/components/loading/docs-skeleton.mjs +41 -0
- package/dist/packages/better-stack/src/plugins/route-docs/client/components/pages/docs-page.cjs +794 -0
- package/dist/packages/better-stack/src/plugins/route-docs/client/components/pages/docs-page.mjs +788 -0
- package/dist/packages/better-stack/src/plugins/route-docs/client/plugin.cjs +111 -0
- package/dist/packages/better-stack/src/plugins/route-docs/client/plugin.mjs +106 -0
- package/dist/packages/better-stack/src/plugins/route-docs/generator.cjs +244 -0
- package/dist/packages/better-stack/src/plugins/route-docs/generator.mjs +227 -0
- package/dist/packages/ui/src/components/auto-form/fields/object.cjs +81 -1
- package/dist/packages/ui/src/components/auto-form/fields/object.mjs +81 -1
- package/dist/packages/ui/src/components/dialog.cjs +6 -0
- package/dist/packages/ui/src/components/dialog.mjs +6 -1
- package/dist/packages/ui/src/components/sheet.cjs +25 -0
- package/dist/packages/ui/src/components/sheet.mjs +24 -1
- package/dist/plugins/api/index.d.cts +2 -2
- package/dist/plugins/api/index.d.mts +2 -2
- package/dist/plugins/api/index.d.ts +2 -2
- package/dist/plugins/blog/api/index.d.cts +1 -1
- package/dist/plugins/blog/api/index.d.mts +1 -1
- package/dist/plugins/blog/api/index.d.ts +1 -1
- package/dist/plugins/blog/client/hooks/index.d.cts +2 -2
- package/dist/plugins/blog/client/hooks/index.d.mts +2 -2
- package/dist/plugins/blog/client/hooks/index.d.ts +2 -2
- package/dist/plugins/blog/client/index.d.cts +1 -1
- package/dist/plugins/blog/client/index.d.mts +1 -1
- package/dist/plugins/blog/client/index.d.ts +1 -1
- package/dist/plugins/blog/query-keys.d.cts +2 -2
- package/dist/plugins/blog/query-keys.d.mts +2 -2
- package/dist/plugins/blog/query-keys.d.ts +2 -2
- package/dist/plugins/client/index.d.cts +2 -2
- package/dist/plugins/client/index.d.mts +2 -2
- package/dist/plugins/client/index.d.ts +2 -2
- package/dist/plugins/cms/api/index.d.cts +67 -3
- package/dist/plugins/cms/api/index.d.mts +67 -3
- package/dist/plugins/cms/api/index.d.ts +67 -3
- package/dist/plugins/cms/client/hooks/index.cjs +4 -0
- package/dist/plugins/cms/client/hooks/index.d.cts +82 -3
- package/dist/plugins/cms/client/hooks/index.d.mts +82 -3
- package/dist/plugins/cms/client/hooks/index.d.ts +82 -3
- package/dist/plugins/cms/client/hooks/index.mjs +1 -1
- package/dist/plugins/cms/query-keys.d.cts +1 -1
- package/dist/plugins/cms/query-keys.d.mts +1 -1
- package/dist/plugins/cms/query-keys.d.ts +1 -1
- package/dist/plugins/form-builder/api/index.d.cts +1 -1
- package/dist/plugins/form-builder/api/index.d.mts +1 -1
- package/dist/plugins/form-builder/api/index.d.ts +1 -1
- package/dist/plugins/open-api/api/index.d.cts +1 -1
- package/dist/plugins/open-api/api/index.d.mts +1 -1
- package/dist/plugins/open-api/api/index.d.ts +1 -1
- package/dist/plugins/route-docs/client/index.cjs +10 -0
- package/dist/plugins/route-docs/client/index.d.cts +126 -0
- package/dist/plugins/route-docs/client/index.d.mts +126 -0
- package/dist/plugins/route-docs/client/index.d.ts +126 -0
- package/dist/plugins/route-docs/client/index.mjs +1 -0
- package/dist/plugins/route-docs/client.css +3 -0
- package/dist/plugins/route-docs/style.css +19 -0
- package/dist/shared/{stack.L-UFwz2G.d.mts → stack.oGOteE6g.d.cts} +27 -5
- package/dist/shared/{stack.L-UFwz2G.d.ts → stack.oGOteE6g.d.mts} +27 -5
- package/dist/shared/{stack.L-UFwz2G.d.cts → stack.oGOteE6g.d.ts} +27 -5
- package/dist/shared/{stack.CSce37mX.d.cts → stack.u9iYV6vt.d.cts} +14 -2
- package/dist/shared/{stack.CSce37mX.d.mts → stack.u9iYV6vt.d.mts} +14 -2
- package/dist/shared/{stack.CSce37mX.d.ts → stack.u9iYV6vt.d.ts} +14 -2
- package/package.json +15 -1
- package/src/client/index.ts +11 -4
- package/src/plugins/cms/api/plugin.ts +667 -21
- package/src/plugins/cms/client/components/forms/content-form.tsx +60 -18
- package/src/plugins/cms/client/components/forms/relation-field.tsx +299 -0
- package/src/plugins/cms/client/components/inverse-relations-panel.tsx +329 -0
- package/src/plugins/cms/client/components/pages/content-editor-page.internal.tsx +127 -1
- package/src/plugins/cms/client/hooks/cms-hooks.tsx +344 -0
- package/src/plugins/cms/db.ts +38 -0
- package/src/plugins/cms/types.ts +99 -10
- package/src/plugins/route-docs/client/components/loading/docs-skeleton.tsx +82 -0
- package/src/plugins/route-docs/client/components/loading/index.tsx +1 -0
- package/src/plugins/route-docs/client/components/pages/docs-page.tsx +1240 -0
- package/src/plugins/route-docs/client/index.ts +7 -0
- package/src/plugins/route-docs/client/plugin.tsx +187 -0
- package/src/plugins/route-docs/client.css +3 -0
- package/src/plugins/route-docs/generator.ts +385 -0
- package/src/plugins/route-docs/index.ts +12 -0
- package/src/plugins/route-docs/style.css +19 -0
- package/src/types.ts +19 -1
- package/dist/shared/{stack.CcI4sYJP.d.mts → stack.DLhzx1-D.d.cts} +1 -1
- package/dist/shared/{stack.CcI4sYJP.d.ts → stack.DLhzx1-D.d.mts} +1 -1
- package/dist/shared/{stack.CcI4sYJP.d.cts → stack.DLhzx1-D.d.ts} +1 -1
|
@@ -72,6 +72,46 @@ function AutoFormObject({
|
|
|
72
72
|
return null;
|
|
73
73
|
}
|
|
74
74
|
if (zodBaseType === "ZodObject") {
|
|
75
|
+
const objectFieldConfig = fieldConfig?.[name] ?? {};
|
|
76
|
+
if (typeof objectFieldConfig.fieldType === "function") {
|
|
77
|
+
const zodInputProps2 = utils.zodToHtmlInputProps(item);
|
|
78
|
+
let isRequired2 = isRequiredByDependency || zodInputProps2.required || false;
|
|
79
|
+
if (objectFieldConfig.inputProps?.required !== void 0) {
|
|
80
|
+
isRequired2 = objectFieldConfig.inputProps.required;
|
|
81
|
+
}
|
|
82
|
+
const CustomComponent = objectFieldConfig.fieldType;
|
|
83
|
+
const ParentElement = objectFieldConfig.renderParent ?? DefaultParent;
|
|
84
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
85
|
+
form.FormField,
|
|
86
|
+
{
|
|
87
|
+
control: form$1.control,
|
|
88
|
+
name: key,
|
|
89
|
+
render: ({ field }) => {
|
|
90
|
+
const fieldProps = {
|
|
91
|
+
...zodInputProps2,
|
|
92
|
+
...field,
|
|
93
|
+
...objectFieldConfig.inputProps,
|
|
94
|
+
disabled: objectFieldConfig.inputProps?.disabled || isDisabled,
|
|
95
|
+
ref: void 0,
|
|
96
|
+
value: field.value
|
|
97
|
+
};
|
|
98
|
+
return /* @__PURE__ */ jsxRuntime.jsx(ParentElement, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
99
|
+
CustomComponent,
|
|
100
|
+
{
|
|
101
|
+
zodInputProps: zodInputProps2,
|
|
102
|
+
field,
|
|
103
|
+
fieldConfigItem: objectFieldConfig,
|
|
104
|
+
label: objectFieldConfig.label || itemName,
|
|
105
|
+
isRequired: isRequired2,
|
|
106
|
+
zodItem: item,
|
|
107
|
+
fieldProps
|
|
108
|
+
}
|
|
109
|
+
) }, `${key}.parent`);
|
|
110
|
+
}
|
|
111
|
+
},
|
|
112
|
+
key
|
|
113
|
+
);
|
|
114
|
+
}
|
|
75
115
|
return /* @__PURE__ */ jsxRuntime.jsxs(accordion.AccordionItem, { value: name, className: "border-none", children: [
|
|
76
116
|
/* @__PURE__ */ jsxRuntime.jsx(accordion.AccordionTrigger, { children: itemName }),
|
|
77
117
|
/* @__PURE__ */ jsxRuntime.jsx(accordion.AccordionContent, { className: "p-2", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -86,13 +126,53 @@ function AutoFormObject({
|
|
|
86
126
|
] }, key);
|
|
87
127
|
}
|
|
88
128
|
if (zodBaseType === "ZodArray") {
|
|
129
|
+
const arrayFieldConfig = fieldConfig?.[name] ?? {};
|
|
130
|
+
if (typeof arrayFieldConfig.fieldType === "function") {
|
|
131
|
+
const zodInputProps2 = utils.zodToHtmlInputProps(item);
|
|
132
|
+
let isRequired2 = isRequiredByDependency || zodInputProps2.required || false;
|
|
133
|
+
if (arrayFieldConfig.inputProps?.required !== void 0) {
|
|
134
|
+
isRequired2 = arrayFieldConfig.inputProps.required;
|
|
135
|
+
}
|
|
136
|
+
const CustomComponent = arrayFieldConfig.fieldType;
|
|
137
|
+
const ParentElement = arrayFieldConfig.renderParent ?? DefaultParent;
|
|
138
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
139
|
+
form.FormField,
|
|
140
|
+
{
|
|
141
|
+
control: form$1.control,
|
|
142
|
+
name: key,
|
|
143
|
+
render: ({ field }) => {
|
|
144
|
+
const fieldProps = {
|
|
145
|
+
...zodInputProps2,
|
|
146
|
+
...field,
|
|
147
|
+
...arrayFieldConfig.inputProps,
|
|
148
|
+
disabled: arrayFieldConfig.inputProps?.disabled || isDisabled,
|
|
149
|
+
ref: void 0,
|
|
150
|
+
value: field.value
|
|
151
|
+
};
|
|
152
|
+
return /* @__PURE__ */ jsxRuntime.jsx(ParentElement, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
153
|
+
CustomComponent,
|
|
154
|
+
{
|
|
155
|
+
zodInputProps: zodInputProps2,
|
|
156
|
+
field,
|
|
157
|
+
fieldConfigItem: arrayFieldConfig,
|
|
158
|
+
label: arrayFieldConfig.label || itemName,
|
|
159
|
+
isRequired: isRequired2,
|
|
160
|
+
zodItem: item,
|
|
161
|
+
fieldProps
|
|
162
|
+
}
|
|
163
|
+
) }, `${key}.parent`);
|
|
164
|
+
}
|
|
165
|
+
},
|
|
166
|
+
key
|
|
167
|
+
);
|
|
168
|
+
}
|
|
89
169
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
90
170
|
array,
|
|
91
171
|
{
|
|
92
172
|
name,
|
|
93
173
|
item,
|
|
94
174
|
form: form$1,
|
|
95
|
-
fieldConfig:
|
|
175
|
+
fieldConfig: arrayFieldConfig,
|
|
96
176
|
path: [...path, name]
|
|
97
177
|
},
|
|
98
178
|
key
|
|
@@ -56,6 +56,46 @@ function AutoFormObject({
|
|
|
56
56
|
return null;
|
|
57
57
|
}
|
|
58
58
|
if (zodBaseType === "ZodObject") {
|
|
59
|
+
const objectFieldConfig = fieldConfig?.[name] ?? {};
|
|
60
|
+
if (typeof objectFieldConfig.fieldType === "function") {
|
|
61
|
+
const zodInputProps2 = zodToHtmlInputProps(item);
|
|
62
|
+
let isRequired2 = isRequiredByDependency || zodInputProps2.required || false;
|
|
63
|
+
if (objectFieldConfig.inputProps?.required !== void 0) {
|
|
64
|
+
isRequired2 = objectFieldConfig.inputProps.required;
|
|
65
|
+
}
|
|
66
|
+
const CustomComponent = objectFieldConfig.fieldType;
|
|
67
|
+
const ParentElement = objectFieldConfig.renderParent ?? DefaultParent;
|
|
68
|
+
return /* @__PURE__ */ jsx(
|
|
69
|
+
FormField,
|
|
70
|
+
{
|
|
71
|
+
control: form.control,
|
|
72
|
+
name: key,
|
|
73
|
+
render: ({ field }) => {
|
|
74
|
+
const fieldProps = {
|
|
75
|
+
...zodInputProps2,
|
|
76
|
+
...field,
|
|
77
|
+
...objectFieldConfig.inputProps,
|
|
78
|
+
disabled: objectFieldConfig.inputProps?.disabled || isDisabled,
|
|
79
|
+
ref: void 0,
|
|
80
|
+
value: field.value
|
|
81
|
+
};
|
|
82
|
+
return /* @__PURE__ */ jsx(ParentElement, { children: /* @__PURE__ */ jsx(
|
|
83
|
+
CustomComponent,
|
|
84
|
+
{
|
|
85
|
+
zodInputProps: zodInputProps2,
|
|
86
|
+
field,
|
|
87
|
+
fieldConfigItem: objectFieldConfig,
|
|
88
|
+
label: objectFieldConfig.label || itemName,
|
|
89
|
+
isRequired: isRequired2,
|
|
90
|
+
zodItem: item,
|
|
91
|
+
fieldProps
|
|
92
|
+
}
|
|
93
|
+
) }, `${key}.parent`);
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
key
|
|
97
|
+
);
|
|
98
|
+
}
|
|
59
99
|
return /* @__PURE__ */ jsxs(AccordionItem, { value: name, className: "border-none", children: [
|
|
60
100
|
/* @__PURE__ */ jsx(AccordionTrigger, { children: itemName }),
|
|
61
101
|
/* @__PURE__ */ jsx(AccordionContent, { className: "p-2", children: /* @__PURE__ */ jsx(
|
|
@@ -70,13 +110,53 @@ function AutoFormObject({
|
|
|
70
110
|
] }, key);
|
|
71
111
|
}
|
|
72
112
|
if (zodBaseType === "ZodArray") {
|
|
113
|
+
const arrayFieldConfig = fieldConfig?.[name] ?? {};
|
|
114
|
+
if (typeof arrayFieldConfig.fieldType === "function") {
|
|
115
|
+
const zodInputProps2 = zodToHtmlInputProps(item);
|
|
116
|
+
let isRequired2 = isRequiredByDependency || zodInputProps2.required || false;
|
|
117
|
+
if (arrayFieldConfig.inputProps?.required !== void 0) {
|
|
118
|
+
isRequired2 = arrayFieldConfig.inputProps.required;
|
|
119
|
+
}
|
|
120
|
+
const CustomComponent = arrayFieldConfig.fieldType;
|
|
121
|
+
const ParentElement = arrayFieldConfig.renderParent ?? DefaultParent;
|
|
122
|
+
return /* @__PURE__ */ jsx(
|
|
123
|
+
FormField,
|
|
124
|
+
{
|
|
125
|
+
control: form.control,
|
|
126
|
+
name: key,
|
|
127
|
+
render: ({ field }) => {
|
|
128
|
+
const fieldProps = {
|
|
129
|
+
...zodInputProps2,
|
|
130
|
+
...field,
|
|
131
|
+
...arrayFieldConfig.inputProps,
|
|
132
|
+
disabled: arrayFieldConfig.inputProps?.disabled || isDisabled,
|
|
133
|
+
ref: void 0,
|
|
134
|
+
value: field.value
|
|
135
|
+
};
|
|
136
|
+
return /* @__PURE__ */ jsx(ParentElement, { children: /* @__PURE__ */ jsx(
|
|
137
|
+
CustomComponent,
|
|
138
|
+
{
|
|
139
|
+
zodInputProps: zodInputProps2,
|
|
140
|
+
field,
|
|
141
|
+
fieldConfigItem: arrayFieldConfig,
|
|
142
|
+
label: arrayFieldConfig.label || itemName,
|
|
143
|
+
isRequired: isRequired2,
|
|
144
|
+
zodItem: item,
|
|
145
|
+
fieldProps
|
|
146
|
+
}
|
|
147
|
+
) }, `${key}.parent`);
|
|
148
|
+
}
|
|
149
|
+
},
|
|
150
|
+
key
|
|
151
|
+
);
|
|
152
|
+
}
|
|
73
153
|
return /* @__PURE__ */ jsx(
|
|
74
154
|
AutoFormArray,
|
|
75
155
|
{
|
|
76
156
|
name,
|
|
77
157
|
item,
|
|
78
158
|
form,
|
|
79
|
-
fieldConfig:
|
|
159
|
+
fieldConfig: arrayFieldConfig,
|
|
80
160
|
path: [...path, name]
|
|
81
161
|
},
|
|
82
162
|
key
|
|
@@ -25,6 +25,11 @@ function Dialog({
|
|
|
25
25
|
}) {
|
|
26
26
|
return /* @__PURE__ */ jsxRuntime.jsx(DialogPrimitive__namespace.Root, { "data-slot": "dialog", ...props });
|
|
27
27
|
}
|
|
28
|
+
function DialogTrigger({
|
|
29
|
+
...props
|
|
30
|
+
}) {
|
|
31
|
+
return /* @__PURE__ */ jsxRuntime.jsx(DialogPrimitive__namespace.Trigger, { "data-slot": "dialog-trigger", ...props });
|
|
32
|
+
}
|
|
28
33
|
function DialogPortal({
|
|
29
34
|
...props
|
|
30
35
|
}) {
|
|
@@ -139,3 +144,4 @@ exports.DialogHeader = DialogHeader;
|
|
|
139
144
|
exports.DialogOverlay = DialogOverlay;
|
|
140
145
|
exports.DialogPortal = DialogPortal;
|
|
141
146
|
exports.DialogTitle = DialogTitle;
|
|
147
|
+
exports.DialogTrigger = DialogTrigger;
|
|
@@ -9,6 +9,11 @@ function Dialog({
|
|
|
9
9
|
}) {
|
|
10
10
|
return /* @__PURE__ */ jsx(DialogPrimitive.Root, { "data-slot": "dialog", ...props });
|
|
11
11
|
}
|
|
12
|
+
function DialogTrigger({
|
|
13
|
+
...props
|
|
14
|
+
}) {
|
|
15
|
+
return /* @__PURE__ */ jsx(DialogPrimitive.Trigger, { "data-slot": "dialog-trigger", ...props });
|
|
16
|
+
}
|
|
12
17
|
function DialogPortal({
|
|
13
18
|
...props
|
|
14
19
|
}) {
|
|
@@ -115,4 +120,4 @@ function DialogDescription({
|
|
|
115
120
|
);
|
|
116
121
|
}
|
|
117
122
|
|
|
118
|
-
export { Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle };
|
|
123
|
+
export { Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger };
|
|
@@ -81,7 +81,32 @@ function SheetContent({
|
|
|
81
81
|
)
|
|
82
82
|
] });
|
|
83
83
|
}
|
|
84
|
+
function SheetHeader({ className, ...props }) {
|
|
85
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
86
|
+
"div",
|
|
87
|
+
{
|
|
88
|
+
"data-slot": "sheet-header",
|
|
89
|
+
className: utils.cn("flex flex-col gap-1.5 p-4", className),
|
|
90
|
+
...props
|
|
91
|
+
}
|
|
92
|
+
);
|
|
93
|
+
}
|
|
94
|
+
function SheetTitle({
|
|
95
|
+
className,
|
|
96
|
+
...props
|
|
97
|
+
}) {
|
|
98
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
99
|
+
DialogPrimitive__namespace.Title,
|
|
100
|
+
{
|
|
101
|
+
"data-slot": "sheet-title",
|
|
102
|
+
className: utils.cn("text-foreground font-semibold", className),
|
|
103
|
+
...props
|
|
104
|
+
}
|
|
105
|
+
);
|
|
106
|
+
}
|
|
84
107
|
|
|
85
108
|
exports.Sheet = Sheet;
|
|
86
109
|
exports.SheetContent = SheetContent;
|
|
110
|
+
exports.SheetHeader = SheetHeader;
|
|
111
|
+
exports.SheetTitle = SheetTitle;
|
|
87
112
|
exports.SheetTrigger = SheetTrigger;
|
|
@@ -65,5 +65,28 @@ function SheetContent({
|
|
|
65
65
|
)
|
|
66
66
|
] });
|
|
67
67
|
}
|
|
68
|
+
function SheetHeader({ className, ...props }) {
|
|
69
|
+
return /* @__PURE__ */ jsx(
|
|
70
|
+
"div",
|
|
71
|
+
{
|
|
72
|
+
"data-slot": "sheet-header",
|
|
73
|
+
className: cn("flex flex-col gap-1.5 p-4", className),
|
|
74
|
+
...props
|
|
75
|
+
}
|
|
76
|
+
);
|
|
77
|
+
}
|
|
78
|
+
function SheetTitle({
|
|
79
|
+
className,
|
|
80
|
+
...props
|
|
81
|
+
}) {
|
|
82
|
+
return /* @__PURE__ */ jsx(
|
|
83
|
+
DialogPrimitive.Title,
|
|
84
|
+
{
|
|
85
|
+
"data-slot": "sheet-title",
|
|
86
|
+
className: cn("text-foreground font-semibold", className),
|
|
87
|
+
...props
|
|
88
|
+
}
|
|
89
|
+
);
|
|
90
|
+
}
|
|
68
91
|
|
|
69
|
-
export { Sheet, SheetContent, SheetTrigger };
|
|
92
|
+
export { Sheet, SheetContent, SheetHeader, SheetTitle, SheetTrigger };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { B as BackendPlugin } from '../../shared/stack.
|
|
2
|
-
export { C as ClientPlugin } from '../../shared/stack.
|
|
1
|
+
import { B as BackendPlugin } from '../../shared/stack.u9iYV6vt.cjs';
|
|
2
|
+
export { C as ClientPlugin } from '../../shared/stack.u9iYV6vt.cjs';
|
|
3
3
|
import { Endpoint } from 'better-call';
|
|
4
4
|
export { Endpoint, Router, createEndpoint, createRouter } from 'better-call';
|
|
5
5
|
export { Adapter, DatabaseDefinition, DbPlugin, createDbPlugin } from '@btst/db';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { B as BackendPlugin } from '../../shared/stack.
|
|
2
|
-
export { C as ClientPlugin } from '../../shared/stack.
|
|
1
|
+
import { B as BackendPlugin } from '../../shared/stack.u9iYV6vt.mjs';
|
|
2
|
+
export { C as ClientPlugin } from '../../shared/stack.u9iYV6vt.mjs';
|
|
3
3
|
import { Endpoint } from 'better-call';
|
|
4
4
|
export { Endpoint, Router, createEndpoint, createRouter } from 'better-call';
|
|
5
5
|
export { Adapter, DatabaseDefinition, DbPlugin, createDbPlugin } from '@btst/db';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { B as BackendPlugin } from '../../shared/stack.
|
|
2
|
-
export { C as ClientPlugin } from '../../shared/stack.
|
|
1
|
+
import { B as BackendPlugin } from '../../shared/stack.u9iYV6vt.js';
|
|
2
|
+
export { C as ClientPlugin } from '../../shared/stack.u9iYV6vt.js';
|
|
3
3
|
import { Endpoint } from 'better-call';
|
|
4
4
|
export { Endpoint, Router, createEndpoint, createRouter } from 'better-call';
|
|
5
5
|
export { Adapter, DatabaseDefinition, DbPlugin, createDbPlugin } from '@btst/db';
|
|
@@ -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.
|
|
5
|
+
import '../../../shared/stack.DLhzx1-D.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.
|
|
5
|
+
import '../../../shared/stack.DLhzx1-D.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.
|
|
5
|
+
import '../../../shared/stack.DLhzx1-D.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.
|
|
2
|
+
import { S as SerializedPost, c as createPostSchema, u as updatePostSchema, a as SerializedTag } from '../../../../shared/stack.DLhzx1-D.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
|
-
published: boolean;
|
|
132
131
|
title: string;
|
|
132
|
+
published: boolean;
|
|
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.
|
|
2
|
+
import { S as SerializedPost, c as createPostSchema, u as updatePostSchema, a as SerializedTag } from '../../../../shared/stack.DLhzx1-D.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
|
-
published: boolean;
|
|
132
131
|
title: string;
|
|
132
|
+
published: boolean;
|
|
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.
|
|
2
|
+
import { S as SerializedPost, c as createPostSchema, u as updatePostSchema, a as SerializedTag } from '../../../../shared/stack.DLhzx1-D.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
|
-
published: boolean;
|
|
132
131
|
title: string;
|
|
132
|
+
published: boolean;
|
|
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.
|
|
6
|
+
import { P as Post, S as SerializedPost } from '../../../shared/stack.DLhzx1-D.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.
|
|
6
|
+
import { P as Post, S as SerializedPost } from '../../../shared/stack.DLhzx1-D.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.
|
|
6
|
+
import { P as Post, S as SerializedPost } from '../../../shared/stack.DLhzx1-D.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.
|
|
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';
|
|
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;
|
|
147
148
|
slug: z.ZodOptional<z.ZodString>;
|
|
148
149
|
published: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
149
150
|
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.
|
|
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';
|
|
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;
|
|
147
148
|
slug: z.ZodOptional<z.ZodString>;
|
|
148
149
|
published: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
149
150
|
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.
|
|
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';
|
|
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;
|
|
147
148
|
slug: z.ZodOptional<z.ZodString>;
|
|
148
149
|
published: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
149
150
|
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,5 +1,5 @@
|
|
|
1
|
-
import { C as ClientPlugin } from '../../shared/stack.
|
|
2
|
-
export { P as PluginOverrides } from '../../shared/stack.
|
|
1
|
+
import { C as ClientPlugin } from '../../shared/stack.u9iYV6vt.cjs';
|
|
2
|
+
export { P as PluginOverrides } from '../../shared/stack.u9iYV6vt.cjs';
|
|
3
3
|
import { Route } from '@btst/yar';
|
|
4
4
|
export { Route, createRoute, createRouter } from '@btst/yar';
|
|
5
5
|
import { createClient } from 'better-call/client';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as ClientPlugin } from '../../shared/stack.
|
|
2
|
-
export { P as PluginOverrides } from '../../shared/stack.
|
|
1
|
+
import { C as ClientPlugin } from '../../shared/stack.u9iYV6vt.mjs';
|
|
2
|
+
export { P as PluginOverrides } from '../../shared/stack.u9iYV6vt.mjs';
|
|
3
3
|
import { Route } from '@btst/yar';
|
|
4
4
|
export { Route, createRoute, createRouter } from '@btst/yar';
|
|
5
5
|
import { createClient } from 'better-call/client';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as ClientPlugin } from '../../shared/stack.
|
|
2
|
-
export { P as PluginOverrides } from '../../shared/stack.
|
|
1
|
+
import { C as ClientPlugin } from '../../shared/stack.u9iYV6vt.js';
|
|
2
|
+
export { P as PluginOverrides } from '../../shared/stack.u9iYV6vt.js';
|
|
3
3
|
import { Route } from '@btst/yar';
|
|
4
4
|
export { Route, createRoute, createRouter } from '@btst/yar';
|
|
5
5
|
import { createClient } from 'better-call/client';
|
|
@@ -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 CMSBackendConfig, S as SerializedContentType, a as SerializedContentItemWithType } from '../../../shared/stack.
|
|
4
|
+
import { C as CMSBackendConfig, S as SerializedContentType, a as SerializedContentItemWithType, I as InverseRelation } from '../../../shared/stack.oGOteE6g.cjs';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* CMS backend plugin
|
|
@@ -16,8 +16,8 @@ declare const cmsBackendPlugin: (config: CMSBackendConfig) => _btst_stack_plugin
|
|
|
16
16
|
itemCount: number;
|
|
17
17
|
createdAt: string;
|
|
18
18
|
updatedAt: string;
|
|
19
|
-
name: string;
|
|
20
19
|
id: string;
|
|
20
|
+
name: string;
|
|
21
21
|
slug: string;
|
|
22
22
|
description?: string | undefined;
|
|
23
23
|
jsonSchema: string;
|
|
@@ -63,7 +63,7 @@ declare const cmsBackendPlugin: (config: CMSBackendConfig) => _btst_stack_plugin
|
|
|
63
63
|
data: z.ZodObject<{}, z.core.$loose>;
|
|
64
64
|
}, z.core.$strip>;
|
|
65
65
|
}, {
|
|
66
|
-
parsedData: unknown
|
|
66
|
+
parsedData: Record<string, unknown>;
|
|
67
67
|
createdAt: string;
|
|
68
68
|
updatedAt: string;
|
|
69
69
|
id: string;
|
|
@@ -92,6 +92,70 @@ declare const cmsBackendPlugin: (config: CMSBackendConfig) => _btst_stack_plugin
|
|
|
92
92
|
}, {
|
|
93
93
|
success: boolean;
|
|
94
94
|
}>;
|
|
95
|
+
getContentItemPopulated: better_call.StrictEndpoint<"/content/:typeSlug/:id/populated", {
|
|
96
|
+
method: "GET";
|
|
97
|
+
params: z.ZodObject<{
|
|
98
|
+
typeSlug: z.ZodString;
|
|
99
|
+
id: z.ZodString;
|
|
100
|
+
}, z.core.$strip>;
|
|
101
|
+
}, {
|
|
102
|
+
_relations: Record<string, SerializedContentItemWithType<Record<string, unknown>>[]>;
|
|
103
|
+
parsedData: Record<string, unknown>;
|
|
104
|
+
contentType?: SerializedContentType;
|
|
105
|
+
createdAt: string;
|
|
106
|
+
updatedAt: string;
|
|
107
|
+
id: string;
|
|
108
|
+
slug: string;
|
|
109
|
+
contentTypeId: string;
|
|
110
|
+
data: string;
|
|
111
|
+
authorId?: string | undefined;
|
|
112
|
+
}>;
|
|
113
|
+
listContentByRelation: better_call.StrictEndpoint<"/content/:typeSlug/by-relation", {
|
|
114
|
+
method: "GET";
|
|
115
|
+
params: z.ZodObject<{
|
|
116
|
+
typeSlug: z.ZodString;
|
|
117
|
+
}, z.core.$strip>;
|
|
118
|
+
query: z.ZodObject<{
|
|
119
|
+
field: z.ZodString;
|
|
120
|
+
targetId: z.ZodString;
|
|
121
|
+
limit: z.ZodDefault<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
|
|
122
|
+
offset: z.ZodDefault<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
|
|
123
|
+
}, z.core.$strip>;
|
|
124
|
+
}, {
|
|
125
|
+
items: SerializedContentItemWithType<Record<string, unknown>>[];
|
|
126
|
+
total: number;
|
|
127
|
+
limit: number;
|
|
128
|
+
offset: number;
|
|
129
|
+
}>;
|
|
130
|
+
getInverseRelations: better_call.StrictEndpoint<"/content-types/:slug/inverse-relations", {
|
|
131
|
+
method: "GET";
|
|
132
|
+
params: z.ZodObject<{
|
|
133
|
+
slug: z.ZodString;
|
|
134
|
+
}, z.core.$strip>;
|
|
135
|
+
query: z.ZodObject<{
|
|
136
|
+
itemId: z.ZodOptional<z.ZodString>;
|
|
137
|
+
}, z.core.$strip>;
|
|
138
|
+
}, {
|
|
139
|
+
inverseRelations: InverseRelation[];
|
|
140
|
+
}>;
|
|
141
|
+
listInverseRelationItems: better_call.StrictEndpoint<"/content-types/:slug/inverse-relations/:sourceType", {
|
|
142
|
+
method: "GET";
|
|
143
|
+
params: z.ZodObject<{
|
|
144
|
+
slug: z.ZodString;
|
|
145
|
+
sourceType: z.ZodString;
|
|
146
|
+
}, z.core.$strip>;
|
|
147
|
+
query: z.ZodObject<{
|
|
148
|
+
itemId: z.ZodString;
|
|
149
|
+
fieldName: z.ZodString;
|
|
150
|
+
limit: z.ZodDefault<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
|
|
151
|
+
offset: z.ZodDefault<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
|
|
152
|
+
}, z.core.$strip>;
|
|
153
|
+
}, {
|
|
154
|
+
items: SerializedContentItemWithType<Record<string, unknown>>[];
|
|
155
|
+
total: number;
|
|
156
|
+
limit: number;
|
|
157
|
+
offset: number;
|
|
158
|
+
}>;
|
|
95
159
|
}>;
|
|
96
160
|
type CMSApiRouter = ReturnType<ReturnType<typeof cmsBackendPlugin>["routes"]>;
|
|
97
161
|
|