@btst/stack 1.5.2 → 1.7.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.cjs +7 -1
- 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/api/index.mjs +7 -1
- package/dist/client/index.d.cts +1 -1
- package/dist/client/index.d.mts +1 -1
- package/dist/client/index.d.ts +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/node_modules/.pnpm/@dnd-kit_accessibility@3.1.1_react@19.2.0/node_modules/@dnd-kit/accessibility/dist/accessibility.esm.cjs +68 -0
- package/dist/node_modules/.pnpm/@dnd-kit_accessibility@3.1.1_react@19.2.0/node_modules/@dnd-kit/accessibility/dist/accessibility.esm.mjs +60 -0
- 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 +3937 -0
- 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 +3907 -0
- package/dist/node_modules/.pnpm/@dnd-kit_modifiers@9.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/modifiers/dist/modifiers.esm.cjs +30 -0
- package/dist/node_modules/.pnpm/@dnd-kit_modifiers@9.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/modifiers/dist/modifiers.esm.mjs +28 -0
- 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 +675 -0
- 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 +661 -0
- package/dist/node_modules/.pnpm/@dnd-kit_utilities@3.2.2_react@19.2.0/node_modules/@dnd-kit/utilities/dist/utilities.esm.cjs +358 -0
- package/dist/node_modules/.pnpm/@dnd-kit_utilities@3.2.2_react@19.2.0/node_modules/@dnd-kit/utilities/dist/utilities.esm.mjs +332 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-tabs@1.1.13_@types_react-dom@19.2.3_@types_react@19.2.6__@types_react@1_865f042350eb43f3338b0fffb33f6246/node_modules/@radix-ui/react-tabs/dist/index.cjs +211 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-tabs@1.1.13_@types_react-dom@19.2.3_@types_react@19.2.6__@types_react@1_865f042350eb43f3338b0fffb33f6246/node_modules/@radix-ui/react-tabs/dist/index.mjs +188 -0
- package/dist/packages/better-stack/src/plugins/cms/api/plugin.cjs +3 -2
- package/dist/packages/better-stack/src/plugins/cms/api/plugin.mjs +3 -2
- package/dist/packages/better-stack/src/plugins/cms/client/components/forms/content-form.cjs +15 -15
- package/dist/packages/better-stack/src/plugins/cms/client/components/forms/content-form.mjs +16 -16
- package/dist/packages/better-stack/src/plugins/form-builder/api/plugin.cjs +588 -0
- package/dist/packages/better-stack/src/plugins/form-builder/api/plugin.mjs +586 -0
- package/dist/packages/better-stack/src/plugins/form-builder/client/components/forms/form-renderer.cjs +131 -0
- package/dist/packages/better-stack/src/plugins/form-builder/client/components/forms/form-renderer.mjs +129 -0
- package/dist/packages/better-stack/src/plugins/form-builder/client/components/loading/form-builder-skeleton.cjs +32 -0
- package/dist/packages/better-stack/src/plugins/form-builder/client/components/loading/form-builder-skeleton.mjs +30 -0
- package/dist/packages/better-stack/src/plugins/form-builder/client/components/loading/form-list-skeleton.cjs +21 -0
- package/dist/packages/better-stack/src/plugins/form-builder/client/components/loading/form-list-skeleton.mjs +19 -0
- package/dist/packages/better-stack/src/plugins/form-builder/client/components/loading/submissions-skeleton.cjs +34 -0
- package/dist/packages/better-stack/src/plugins/form-builder/client/components/loading/submissions-skeleton.mjs +32 -0
- package/dist/packages/better-stack/src/plugins/form-builder/client/components/pages/404-page.cjs +20 -0
- package/dist/packages/better-stack/src/plugins/form-builder/client/components/pages/404-page.mjs +18 -0
- package/dist/packages/better-stack/src/plugins/form-builder/client/components/pages/form-builder-page.cjs +19 -0
- package/dist/packages/better-stack/src/plugins/form-builder/client/components/pages/form-builder-page.internal.cjs +186 -0
- package/dist/packages/better-stack/src/plugins/form-builder/client/components/pages/form-builder-page.internal.mjs +184 -0
- package/dist/packages/better-stack/src/plugins/form-builder/client/components/pages/form-builder-page.mjs +17 -0
- package/dist/packages/better-stack/src/plugins/form-builder/client/components/pages/form-list-page.cjs +19 -0
- package/dist/packages/better-stack/src/plugins/form-builder/client/components/pages/form-list-page.internal.cjs +165 -0
- package/dist/packages/better-stack/src/plugins/form-builder/client/components/pages/form-list-page.internal.mjs +163 -0
- package/dist/packages/better-stack/src/plugins/form-builder/client/components/pages/form-list-page.mjs +17 -0
- package/dist/packages/better-stack/src/plugins/form-builder/client/components/pages/submissions-page.cjs +19 -0
- package/dist/packages/better-stack/src/plugins/form-builder/client/components/pages/submissions-page.internal.cjs +177 -0
- package/dist/packages/better-stack/src/plugins/form-builder/client/components/pages/submissions-page.internal.mjs +175 -0
- package/dist/packages/better-stack/src/plugins/form-builder/client/components/pages/submissions-page.mjs +17 -0
- package/dist/packages/better-stack/src/plugins/form-builder/client/components/shared/default-error.cjs +17 -0
- package/dist/packages/better-stack/src/plugins/form-builder/client/components/shared/default-error.mjs +15 -0
- package/dist/packages/better-stack/src/plugins/form-builder/client/components/shared/empty-state.cjs +16 -0
- package/dist/packages/better-stack/src/plugins/form-builder/client/components/shared/empty-state.mjs +14 -0
- package/dist/packages/better-stack/src/plugins/form-builder/client/components/shared/page-wrapper.cjs +27 -0
- package/dist/packages/better-stack/src/plugins/form-builder/client/components/shared/page-wrapper.mjs +25 -0
- package/dist/packages/better-stack/src/plugins/form-builder/client/components/shared/pagination.cjs +39 -0
- package/dist/packages/better-stack/src/plugins/form-builder/client/components/shared/pagination.mjs +37 -0
- package/dist/packages/better-stack/src/plugins/form-builder/client/hooks/form-builder-hooks.cjs +551 -0
- package/dist/packages/better-stack/src/plugins/form-builder/client/hooks/form-builder-hooks.mjs +537 -0
- package/dist/packages/better-stack/src/plugins/form-builder/client/localization/form-builder-common.cjs +36 -0
- package/dist/packages/better-stack/src/plugins/form-builder/client/localization/form-builder-common.mjs +34 -0
- package/dist/packages/better-stack/src/plugins/form-builder/client/localization/form-builder-editor.cjs +19 -0
- package/dist/packages/better-stack/src/plugins/form-builder/client/localization/form-builder-editor.mjs +17 -0
- package/dist/packages/better-stack/src/plugins/form-builder/client/localization/form-builder-list.cjs +21 -0
- package/dist/packages/better-stack/src/plugins/form-builder/client/localization/form-builder-list.mjs +19 -0
- package/dist/packages/better-stack/src/plugins/form-builder/client/localization/form-builder-submissions.cjs +19 -0
- package/dist/packages/better-stack/src/plugins/form-builder/client/localization/form-builder-submissions.mjs +17 -0
- package/dist/packages/better-stack/src/plugins/form-builder/client/localization/form-builder-toasts.cjs +14 -0
- package/dist/packages/better-stack/src/plugins/form-builder/client/localization/form-builder-toasts.mjs +12 -0
- package/dist/packages/better-stack/src/plugins/form-builder/client/localization/index.cjs +17 -0
- package/dist/packages/better-stack/src/plugins/form-builder/client/localization/index.mjs +15 -0
- package/dist/packages/better-stack/src/plugins/form-builder/client/plugin.cjs +278 -0
- package/dist/packages/better-stack/src/plugins/form-builder/client/plugin.mjs +276 -0
- package/dist/packages/better-stack/src/plugins/form-builder/db.cjs +99 -0
- package/dist/packages/better-stack/src/plugins/form-builder/db.mjs +97 -0
- package/dist/packages/better-stack/src/plugins/form-builder/schemas.cjs +82 -0
- package/dist/packages/better-stack/src/plugins/form-builder/schemas.mjs +74 -0
- package/dist/packages/better-stack/src/plugins/form-builder/utils.cjs +37 -0
- package/dist/packages/better-stack/src/plugins/form-builder/utils.mjs +29 -0
- package/dist/packages/better-stack/src/plugins/open-api/api/generator.cjs +300 -0
- package/dist/packages/better-stack/src/plugins/open-api/api/generator.mjs +284 -0
- package/dist/packages/better-stack/src/plugins/open-api/api/plugin.cjs +115 -0
- package/dist/packages/better-stack/src/plugins/open-api/api/plugin.mjs +113 -0
- package/dist/packages/better-stack/src/plugins/open-api/db.cjs +7 -0
- package/dist/packages/better-stack/src/plugins/open-api/db.mjs +5 -0
- package/dist/packages/better-stack/src/plugins/open-api/logo.cjs +8 -0
- package/dist/packages/better-stack/src/plugins/open-api/logo.mjs +6 -0
- package/dist/packages/ui/src/components/auto-form/index.cjs +2 -12
- package/dist/packages/ui/src/components/auto-form/index.mjs +2 -9
- package/dist/packages/ui/src/components/auto-form/stepped-auto-form.cjs +377 -0
- package/dist/packages/ui/src/components/auto-form/stepped-auto-form.mjs +368 -0
- package/dist/packages/ui/src/components/auto-form/utils.cjs +1 -56
- package/dist/packages/ui/src/components/auto-form/utils.mjs +2 -56
- package/dist/packages/ui/src/components/form-builder/canvas.cjs +111 -0
- package/dist/packages/ui/src/components/form-builder/canvas.mjs +109 -0
- package/dist/packages/ui/src/components/form-builder/components/index.cjs +570 -0
- package/dist/packages/ui/src/components/form-builder/components/index.mjs +553 -0
- package/dist/packages/ui/src/components/form-builder/edit-field-dialog.cjs +131 -0
- package/dist/packages/ui/src/components/form-builder/edit-field-dialog.mjs +129 -0
- package/dist/packages/ui/src/components/form-builder/form-preview.cjs +73 -0
- package/dist/packages/ui/src/components/form-builder/form-preview.mjs +71 -0
- package/dist/packages/ui/src/components/form-builder/index.cjs +353 -0
- package/dist/packages/ui/src/components/form-builder/index.mjs +344 -0
- package/dist/packages/ui/src/components/form-builder/nested-field-editor-dialog.cjs +263 -0
- package/dist/packages/ui/src/components/form-builder/nested-field-editor-dialog.mjs +261 -0
- package/dist/packages/ui/src/components/form-builder/palette.cjs +52 -0
- package/dist/packages/ui/src/components/form-builder/palette.mjs +49 -0
- package/dist/packages/ui/src/components/form-builder/schema-utils.cjs +120 -0
- package/dist/packages/ui/src/components/form-builder/schema-utils.mjs +114 -0
- package/dist/packages/ui/src/components/form-builder/sortable-field.cjs +151 -0
- package/dist/packages/ui/src/components/form-builder/sortable-field.mjs +148 -0
- package/dist/packages/ui/src/components/form-builder/step-tabs.cjs +180 -0
- package/dist/packages/ui/src/components/form-builder/step-tabs.mjs +178 -0
- package/dist/packages/ui/src/components/form-builder/types.cjs +7 -0
- package/dist/packages/ui/src/components/form-builder/types.mjs +5 -0
- package/dist/packages/ui/src/components/form-builder/validation-schemas.cjs +67 -0
- package/dist/packages/ui/src/components/form-builder/validation-schemas.mjs +56 -0
- package/dist/packages/ui/src/components/tabs.cjs +70 -0
- package/dist/packages/ui/src/components/tabs.mjs +65 -0
- package/dist/packages/ui/src/lib/schema-converter.cjs +130 -0
- package/dist/packages/ui/src/lib/schema-converter.mjs +124 -0
- 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/client/index.cjs +6 -0
- package/dist/plugins/cms/client/index.d.cts +6 -113
- package/dist/plugins/cms/client/index.d.mts +6 -113
- package/dist/plugins/cms/client/index.d.ts +6 -113
- package/dist/plugins/cms/client/index.mjs +1 -0
- package/dist/plugins/form-builder/api/index.cjs +7 -0
- package/dist/plugins/form-builder/api/index.d.cts +141 -0
- package/dist/plugins/form-builder/api/index.d.mts +141 -0
- package/dist/plugins/form-builder/api/index.d.ts +141 -0
- package/dist/plugins/form-builder/api/index.mjs +1 -0
- package/dist/plugins/form-builder/client/components/index.cjs +29 -0
- package/dist/plugins/form-builder/client/components/index.d.cts +93 -0
- package/dist/plugins/form-builder/client/components/index.d.mts +93 -0
- package/dist/plugins/form-builder/client/components/index.d.ts +93 -0
- package/dist/plugins/form-builder/client/components/index.mjs +18 -0
- package/dist/plugins/form-builder/client/hooks/index.cjs +19 -0
- package/dist/plugins/form-builder/client/hooks/index.d.cts +154 -0
- package/dist/plugins/form-builder/client/hooks/index.d.mts +154 -0
- package/dist/plugins/form-builder/client/hooks/index.d.ts +154 -0
- package/dist/plugins/form-builder/client/hooks/index.mjs +1 -0
- package/dist/plugins/form-builder/client/index.cjs +13 -0
- package/dist/plugins/form-builder/client/index.d.cts +381 -0
- package/dist/plugins/form-builder/client/index.d.mts +381 -0
- package/dist/plugins/form-builder/client/index.d.ts +381 -0
- package/dist/plugins/form-builder/client/index.mjs +2 -0
- package/dist/plugins/form-builder/client.css +3 -0
- package/dist/plugins/form-builder/query-keys.cjs +143 -0
- package/dist/plugins/form-builder/query-keys.d.cts +74 -0
- package/dist/plugins/form-builder/query-keys.d.mts +74 -0
- package/dist/plugins/form-builder/query-keys.d.ts +74 -0
- package/dist/plugins/form-builder/query-keys.mjs +141 -0
- package/dist/plugins/form-builder/style.css +19 -0
- package/dist/plugins/open-api/api/index.cjs +9 -0
- package/dist/plugins/open-api/api/index.d.cts +95 -0
- package/dist/plugins/open-api/api/index.d.mts +95 -0
- package/dist/plugins/open-api/api/index.d.ts +95 -0
- package/dist/plugins/open-api/api/index.mjs +2 -0
- package/dist/shared/stack.AX5nZ6A3.d.cts +86 -0
- package/dist/shared/stack.AX5nZ6A3.d.mts +86 -0
- package/dist/shared/stack.AX5nZ6A3.d.ts +86 -0
- package/dist/shared/stack.BIh2AXaW.d.cts +123 -0
- package/dist/shared/stack.BIh2AXaW.d.mts +123 -0
- package/dist/shared/stack.BIh2AXaW.d.ts +123 -0
- package/dist/shared/{stack.ByOugz9d.d.cts → stack.CSce37mX.d.cts} +15 -2
- package/dist/shared/{stack.ByOugz9d.d.mts → stack.CSce37mX.d.mts} +15 -2
- package/dist/shared/{stack.ByOugz9d.d.ts → stack.CSce37mX.d.ts} +15 -2
- package/dist/shared/stack.DzH_wcvr.d.cts +195 -0
- package/dist/shared/stack.DzH_wcvr.d.mts +195 -0
- package/dist/shared/stack.DzH_wcvr.d.ts +195 -0
- package/package.json +67 -1
- package/src/api/index.ts +14 -2
- package/src/plugins/cms/api/plugin.ts +9 -4
- package/src/plugins/cms/client/components/forms/content-form.tsx +23 -25
- package/src/plugins/cms/client/index.ts +11 -0
- package/src/plugins/form-builder/api/index.ts +1 -0
- package/src/plugins/form-builder/api/plugin.ts +776 -0
- package/src/plugins/form-builder/client/components/forms/form-renderer.tsx +253 -0
- package/src/plugins/form-builder/client/components/index.tsx +24 -0
- package/src/plugins/form-builder/client/components/loading/form-builder-skeleton.tsx +42 -0
- package/src/plugins/form-builder/client/components/loading/form-list-skeleton.tsx +25 -0
- package/src/plugins/form-builder/client/components/loading/index.tsx +3 -0
- package/src/plugins/form-builder/client/components/loading/submissions-skeleton.tsx +40 -0
- package/src/plugins/form-builder/client/components/pages/404-page.tsx +28 -0
- package/src/plugins/form-builder/client/components/pages/form-builder-page.internal.tsx +253 -0
- package/src/plugins/form-builder/client/components/pages/form-builder-page.tsx +26 -0
- package/src/plugins/form-builder/client/components/pages/form-list-page.internal.tsx +231 -0
- package/src/plugins/form-builder/client/components/pages/form-list-page.tsx +22 -0
- package/src/plugins/form-builder/client/components/pages/submissions-page.internal.tsx +268 -0
- package/src/plugins/form-builder/client/components/pages/submissions-page.tsx +26 -0
- package/src/plugins/form-builder/client/components/shared/default-error.tsx +30 -0
- package/src/plugins/form-builder/client/components/shared/empty-state.tsx +26 -0
- package/src/plugins/form-builder/client/components/shared/page-wrapper.tsx +32 -0
- package/src/plugins/form-builder/client/components/shared/pagination.tsx +52 -0
- package/src/plugins/form-builder/client/hooks/form-builder-hooks.tsx +799 -0
- package/src/plugins/form-builder/client/hooks/index.tsx +1 -0
- package/src/plugins/form-builder/client/index.ts +22 -0
- package/src/plugins/form-builder/client/localization/form-builder-common.ts +36 -0
- package/src/plugins/form-builder/client/localization/form-builder-editor.ts +18 -0
- package/src/plugins/form-builder/client/localization/form-builder-list.ts +17 -0
- package/src/plugins/form-builder/client/localization/form-builder-submissions.ts +17 -0
- package/src/plugins/form-builder/client/localization/form-builder-toasts.ts +10 -0
- package/src/plugins/form-builder/client/localization/index.ts +15 -0
- package/src/plugins/form-builder/client/overrides.ts +146 -0
- package/src/plugins/form-builder/client/plugin.tsx +488 -0
- package/src/plugins/form-builder/client.css +3 -0
- package/src/plugins/form-builder/db.ts +99 -0
- package/src/plugins/form-builder/query-keys.ts +198 -0
- package/src/plugins/form-builder/schemas.ts +122 -0
- package/src/plugins/form-builder/style.css +19 -0
- package/src/plugins/form-builder/types.ts +317 -0
- package/src/plugins/form-builder/utils.ts +63 -0
- package/src/plugins/open-api/api/generator.ts +433 -0
- package/src/plugins/open-api/api/index.ts +8 -0
- package/src/plugins/open-api/api/plugin.ts +243 -0
- package/src/plugins/open-api/db.ts +7 -0
- package/src/plugins/open-api/logo.ts +7 -0
- package/src/types.ts +15 -1
- package/dist/shared/{stack.DLhzx1-D.d.mts → stack.CcI4sYJP.d.cts} +1 -1
- package/dist/shared/{stack.DLhzx1-D.d.ts → stack.CcI4sYJP.d.mts} +1 -1
- package/dist/shared/{stack.DLhzx1-D.d.cts → stack.CcI4sYJP.d.ts} +1 -1
package/dist/api/index.cjs
CHANGED
|
@@ -11,8 +11,14 @@ function betterStack(config) {
|
|
|
11
11
|
for (const [pluginKey, plugin] of Object.entries(plugins)) {
|
|
12
12
|
betterDbSchema = betterDbSchema.use(plugin.dbPlugin);
|
|
13
13
|
}
|
|
14
|
+
const adapterInstance = adapter(betterDbSchema);
|
|
15
|
+
const context = {
|
|
16
|
+
plugins,
|
|
17
|
+
basePath,
|
|
18
|
+
adapter: adapterInstance
|
|
19
|
+
};
|
|
14
20
|
for (const [pluginKey, plugin] of Object.entries(plugins)) {
|
|
15
|
-
const pluginRoutes = plugin.routes(
|
|
21
|
+
const pluginRoutes = plugin.routes(adapterInstance, context);
|
|
16
22
|
for (const [routeKey, endpoint] of Object.entries(pluginRoutes)) {
|
|
17
23
|
const compositeKey = `${pluginKey}_${routeKey}`;
|
|
18
24
|
allRoutes[compositeKey] = endpoint;
|
package/dist/api/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { B as BackendPlugin } from '../shared/stack.
|
|
1
|
+
import { e as PrefixedPluginRoutes, f as BackendLibConfig, g as BackendLib } from '../shared/stack.CSce37mX.cjs';
|
|
2
|
+
export { B as BackendPlugin, a as BetterStackContext } from '../shared/stack.CSce37mX.cjs';
|
|
3
3
|
export { toNodeHandler } from 'better-call/node';
|
|
4
4
|
import '@btst/yar';
|
|
5
5
|
import '@btst/db';
|
package/dist/api/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { B as BackendPlugin } from '../shared/stack.
|
|
1
|
+
import { e as PrefixedPluginRoutes, f as BackendLibConfig, g as BackendLib } from '../shared/stack.CSce37mX.mjs';
|
|
2
|
+
export { B as BackendPlugin, a as BetterStackContext } from '../shared/stack.CSce37mX.mjs';
|
|
3
3
|
export { toNodeHandler } from 'better-call/node';
|
|
4
4
|
import '@btst/yar';
|
|
5
5
|
import '@btst/db';
|
package/dist/api/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { B as BackendPlugin } from '../shared/stack.
|
|
1
|
+
import { e as PrefixedPluginRoutes, f as BackendLibConfig, g as BackendLib } from '../shared/stack.CSce37mX.js';
|
|
2
|
+
export { B as BackendPlugin, a as BetterStackContext } from '../shared/stack.CSce37mX.js';
|
|
3
3
|
export { toNodeHandler } from 'better-call/node';
|
|
4
4
|
import '@btst/yar';
|
|
5
5
|
import '@btst/db';
|
package/dist/api/index.mjs
CHANGED
|
@@ -9,8 +9,14 @@ function betterStack(config) {
|
|
|
9
9
|
for (const [pluginKey, plugin] of Object.entries(plugins)) {
|
|
10
10
|
betterDbSchema = betterDbSchema.use(plugin.dbPlugin);
|
|
11
11
|
}
|
|
12
|
+
const adapterInstance = adapter(betterDbSchema);
|
|
13
|
+
const context = {
|
|
14
|
+
plugins,
|
|
15
|
+
basePath,
|
|
16
|
+
adapter: adapterInstance
|
|
17
|
+
};
|
|
12
18
|
for (const [pluginKey, plugin] of Object.entries(plugins)) {
|
|
13
|
-
const pluginRoutes = plugin.routes(
|
|
19
|
+
const pluginRoutes = plugin.routes(adapterInstance, context);
|
|
14
20
|
for (const [routeKey, endpoint] of Object.entries(pluginRoutes)) {
|
|
15
21
|
const compositeKey = `${pluginKey}_${routeKey}`;
|
|
16
22
|
allRoutes[compositeKey] = endpoint;
|
package/dist/client/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { S as Sitemap, C as ClientPlugin,
|
|
1
|
+
import { S as Sitemap, C as ClientPlugin, b as PluginRoutes, c as ClientLibConfig, d as ClientLib } from '../shared/stack.CSce37mX.cjs';
|
|
2
2
|
import '@btst/yar';
|
|
3
3
|
import '@btst/db';
|
|
4
4
|
import 'better-call';
|
package/dist/client/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { S as Sitemap, C as ClientPlugin,
|
|
1
|
+
import { S as Sitemap, C as ClientPlugin, b as PluginRoutes, c as ClientLibConfig, d as ClientLib } from '../shared/stack.CSce37mX.mjs';
|
|
2
2
|
import '@btst/yar';
|
|
3
3
|
import '@btst/db';
|
|
4
4
|
import 'better-call';
|
package/dist/client/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { S as Sitemap, C as ClientPlugin,
|
|
1
|
+
import { S as Sitemap, C as ClientPlugin, b as PluginRoutes, c as ClientLibConfig, d as ClientLib } from '../shared/stack.CSce37mX.js';
|
|
2
2
|
import '@btst/yar';
|
|
3
3
|
import '@btst/db';
|
|
4
4
|
import 'better-call';
|
package/dist/index.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { betterStack } from './api/index.cjs';
|
|
2
2
|
export { toNodeHandler } from 'better-call/node';
|
|
3
|
-
export {
|
|
3
|
+
export { g as BackendLib, f as BackendLibConfig, B as BackendPlugin, a as BetterStackContext } from './shared/stack.CSce37mX.cjs';
|
|
4
4
|
import '@btst/yar';
|
|
5
5
|
import '@btst/db';
|
|
6
6
|
import 'better-call';
|
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { betterStack } from './api/index.mjs';
|
|
2
2
|
export { toNodeHandler } from 'better-call/node';
|
|
3
|
-
export {
|
|
3
|
+
export { g as BackendLib, f as BackendLibConfig, B as BackendPlugin, a as BetterStackContext } from './shared/stack.CSce37mX.mjs';
|
|
4
4
|
import '@btst/yar';
|
|
5
5
|
import '@btst/db';
|
|
6
6
|
import 'better-call';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { betterStack } from './api/index.js';
|
|
2
2
|
export { toNodeHandler } from 'better-call/node';
|
|
3
|
-
export {
|
|
3
|
+
export { g as BackendLib, f as BackendLibConfig, B as BackendPlugin, a as BetterStackContext } from './shared/stack.CSce37mX.js';
|
|
4
4
|
import '@btst/yar';
|
|
5
5
|
import '@btst/db';
|
|
6
6
|
import 'better-call';
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const React = require('react');
|
|
4
|
+
|
|
5
|
+
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e.default : e; }
|
|
6
|
+
|
|
7
|
+
const React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
8
|
+
|
|
9
|
+
const hiddenStyles = {
|
|
10
|
+
display: 'none'
|
|
11
|
+
};
|
|
12
|
+
function HiddenText(_ref) {
|
|
13
|
+
let {
|
|
14
|
+
id,
|
|
15
|
+
value
|
|
16
|
+
} = _ref;
|
|
17
|
+
return React__default.createElement("div", {
|
|
18
|
+
id: id,
|
|
19
|
+
style: hiddenStyles
|
|
20
|
+
}, value);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
function LiveRegion(_ref) {
|
|
24
|
+
let {
|
|
25
|
+
id,
|
|
26
|
+
announcement,
|
|
27
|
+
ariaLiveType = "assertive"
|
|
28
|
+
} = _ref;
|
|
29
|
+
// Hide element visually but keep it readable by screen readers
|
|
30
|
+
const visuallyHidden = {
|
|
31
|
+
position: 'fixed',
|
|
32
|
+
top: 0,
|
|
33
|
+
left: 0,
|
|
34
|
+
width: 1,
|
|
35
|
+
height: 1,
|
|
36
|
+
margin: -1,
|
|
37
|
+
border: 0,
|
|
38
|
+
padding: 0,
|
|
39
|
+
overflow: 'hidden',
|
|
40
|
+
clip: 'rect(0 0 0 0)',
|
|
41
|
+
clipPath: 'inset(100%)',
|
|
42
|
+
whiteSpace: 'nowrap'
|
|
43
|
+
};
|
|
44
|
+
return React__default.createElement("div", {
|
|
45
|
+
id: id,
|
|
46
|
+
style: visuallyHidden,
|
|
47
|
+
role: "status",
|
|
48
|
+
"aria-live": ariaLiveType,
|
|
49
|
+
"aria-atomic": true
|
|
50
|
+
}, announcement);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
function useAnnouncement() {
|
|
54
|
+
const [announcement, setAnnouncement] = React.useState('');
|
|
55
|
+
const announce = React.useCallback(value => {
|
|
56
|
+
if (value != null) {
|
|
57
|
+
setAnnouncement(value);
|
|
58
|
+
}
|
|
59
|
+
}, []);
|
|
60
|
+
return {
|
|
61
|
+
announce,
|
|
62
|
+
announcement
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
exports.HiddenText = HiddenText;
|
|
67
|
+
exports.LiveRegion = LiveRegion;
|
|
68
|
+
exports.useAnnouncement = useAnnouncement;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import React__default, { useState, useCallback } from 'react';
|
|
2
|
+
|
|
3
|
+
const hiddenStyles = {
|
|
4
|
+
display: 'none'
|
|
5
|
+
};
|
|
6
|
+
function HiddenText(_ref) {
|
|
7
|
+
let {
|
|
8
|
+
id,
|
|
9
|
+
value
|
|
10
|
+
} = _ref;
|
|
11
|
+
return React__default.createElement("div", {
|
|
12
|
+
id: id,
|
|
13
|
+
style: hiddenStyles
|
|
14
|
+
}, value);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
function LiveRegion(_ref) {
|
|
18
|
+
let {
|
|
19
|
+
id,
|
|
20
|
+
announcement,
|
|
21
|
+
ariaLiveType = "assertive"
|
|
22
|
+
} = _ref;
|
|
23
|
+
// Hide element visually but keep it readable by screen readers
|
|
24
|
+
const visuallyHidden = {
|
|
25
|
+
position: 'fixed',
|
|
26
|
+
top: 0,
|
|
27
|
+
left: 0,
|
|
28
|
+
width: 1,
|
|
29
|
+
height: 1,
|
|
30
|
+
margin: -1,
|
|
31
|
+
border: 0,
|
|
32
|
+
padding: 0,
|
|
33
|
+
overflow: 'hidden',
|
|
34
|
+
clip: 'rect(0 0 0 0)',
|
|
35
|
+
clipPath: 'inset(100%)',
|
|
36
|
+
whiteSpace: 'nowrap'
|
|
37
|
+
};
|
|
38
|
+
return React__default.createElement("div", {
|
|
39
|
+
id: id,
|
|
40
|
+
style: visuallyHidden,
|
|
41
|
+
role: "status",
|
|
42
|
+
"aria-live": ariaLiveType,
|
|
43
|
+
"aria-atomic": true
|
|
44
|
+
}, announcement);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
function useAnnouncement() {
|
|
48
|
+
const [announcement, setAnnouncement] = useState('');
|
|
49
|
+
const announce = useCallback(value => {
|
|
50
|
+
if (value != null) {
|
|
51
|
+
setAnnouncement(value);
|
|
52
|
+
}
|
|
53
|
+
}, []);
|
|
54
|
+
return {
|
|
55
|
+
announce,
|
|
56
|
+
announcement
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export { HiddenText, LiveRegion, useAnnouncement };
|