@tulip-systems/core 0.5.13 → 0.5.15
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/auth/client.d.mts +5 -4
- package/dist/auth/client.mjs +6 -5
- package/dist/auth.mjs +2 -2
- package/dist/components/client.mjs +2 -2
- package/dist/components/common/icons.d.mts +52 -52
- package/dist/components/common/status.d.mts +3 -3
- package/dist/components/editor/components/content.client.d.mts +2 -2
- package/dist/components/editor/components/editor.client.d.mts +6 -6
- package/dist/components/editor/components/editor.client.d.mts.map +1 -1
- package/dist/components/editor/components/menu.client.d.mts +3 -3
- package/dist/components/header/back-button.client.d.mts +2 -2
- package/dist/components/header/bottom-bar.client.d.mts +3 -3
- package/dist/components/header/breadcrumbs.client.d.mts +7 -7
- package/dist/components/header/header.client.d.mts +2 -2
- package/dist/components/header/mobile-nav-switcher.client.d.mts +2 -2
- package/dist/components/header/top-bar.client.d.mts +4 -4
- package/dist/components/layouts/admin-content.client.d.mts +2 -2
- package/dist/components/layouts/admin-error-pages.d.mts +4 -4
- package/dist/components/layouts/admin-layout.d.mts +2 -2
- package/dist/components/layouts/admin-layout.mjs +1 -1
- package/dist/components/layouts/admin-layout.mjs.map +1 -1
- package/dist/components/layouts/admin-loading.d.mts +2 -2
- package/dist/components/layouts/empty-page.d.mts +4 -4
- package/dist/components/layouts/error-page.d.mts +9 -9
- package/dist/components/layouts/error-sections.d.mts +5 -5
- package/dist/components/layouts/list-layout.d.mts +2 -2
- package/dist/components/layouts/providers.client.d.mts +2 -2
- package/dist/components/layouts/root-error-pages.d.mts +2 -2
- package/dist/components/layouts/root-layout.server.d.mts +4 -4
- package/dist/components/layouts/root-layout.server.d.mts.map +1 -1
- package/dist/components/layouts/root-loading.d.mts +2 -2
- package/dist/components/layouts/tab-layout.d.mts +2 -2
- package/dist/components/lists/data-list.d.mts +5 -5
- package/dist/components/lists/data-stack.d.mts +8 -8
- package/dist/components/navigation/admin-sidebar-header.client.mjs +3 -2
- package/dist/components/navigation/admin-sidebar-header.client.mjs.map +1 -1
- package/dist/components/navigation/admin-sidebar-paths.client.d.mts +10 -10
- package/dist/components/ui/accordion.d.mts +5 -5
- package/dist/components/ui/alert-dialog.d.mts +12 -12
- package/dist/components/ui/alert.d.mts +6 -6
- package/dist/components/ui/aspect-ratio.d.mts +2 -2
- package/dist/components/ui/avatar.client.d.mts +4 -4
- package/dist/components/ui/badge.d.mts +4 -4
- package/dist/components/ui/breadcrumb.d.mts +8 -8
- package/dist/components/ui/button.d.mts +4 -4
- package/dist/components/ui/calendar.d.mts +3 -3
- package/dist/components/ui/card.d.mts +7 -7
- package/dist/components/ui/carousel.d.mts +6 -6
- package/dist/components/ui/chart.client.d.mts +5 -5
- package/dist/components/ui/checkbox.d.mts +2 -2
- package/dist/components/ui/collapsible.client.d.mts +4 -4
- package/dist/components/ui/color-picker.client.d.mts +2 -2
- package/dist/components/ui/combobox-dropdown.client.d.mts +2 -2
- package/dist/components/ui/combobox.client.d.mts +2 -2
- package/dist/components/ui/command.d.mts +10 -10
- package/dist/components/ui/context-menu.d.mts +16 -16
- package/dist/components/ui/date-picker.client.d.mts +2 -2
- package/dist/components/ui/dialog.client.d.mts +11 -11
- package/dist/components/ui/drawer.client.d.mts +11 -11
- package/dist/components/ui/dropdown-menu.d.mts +16 -16
- package/dist/components/ui/form.client.d.mts +7 -7
- package/dist/components/ui/hover-card.client.d.mts +4 -4
- package/dist/components/ui/input-recipient.d.mts +2 -2
- package/dist/components/ui/input.d.mts +2 -2
- package/dist/components/ui/label.d.mts +2 -2
- package/dist/components/ui/navigation-menu.d.mts +11 -11
- package/dist/components/ui/pagination.d.mts +8 -8
- package/dist/components/ui/popover.d.mts +5 -5
- package/dist/components/ui/progress.client.d.mts +2 -2
- package/dist/components/ui/radio-group.d.mts +3 -3
- package/dist/components/ui/resizable.client.d.mts +4 -4
- package/dist/components/ui/scroll-area.d.mts +3 -3
- package/dist/components/ui/select.client.d.mts +11 -11
- package/dist/components/ui/separator.d.mts +2 -2
- package/dist/components/ui/sheet.client.d.mts +9 -9
- package/dist/components/ui/sidebar.client.d.mts +26 -26
- package/dist/components/ui/skeleton.d.mts +2 -2
- package/dist/components/ui/slider.d.mts +2 -2
- package/dist/components/ui/sonner.client.d.mts +2 -2
- package/dist/components/ui/sonner.client.mjs +1 -1
- package/dist/components/ui/switch.d.mts +2 -2
- package/dist/components/ui/tabs.d.mts +5 -5
- package/dist/components/ui/textarea.d.mts +2 -2
- package/dist/components/ui/time-input.client.d.mts +2 -2
- package/dist/components/ui/toggle-group.client.d.mts +3 -3
- package/dist/components/ui/toggle.d.mts +4 -4
- package/dist/components/ui/toggle.d.mts.map +1 -1
- package/dist/components/ui/tooltip.client.d.mts +5 -5
- package/dist/components.mjs +2 -2
- package/dist/lib/client.mjs +1 -1
- package/dist/lib/hooks/use-action.d.mts +2 -2
- package/dist/lib/hooks/use-indicator.d.mts +2 -2
- package/dist/modules/auth/components/allowed.client.d.mts +2 -2
- package/dist/modules/auth/components/allowed.client.mjs +2 -3
- package/dist/modules/auth/components/allowed.client.mjs.map +1 -1
- package/dist/modules/auth/components/auth-layout.server.d.mts +2 -2
- package/dist/modules/auth/components/auth-layout.server.d.mts.map +1 -1
- package/dist/modules/auth/components/auth-loading.d.mts +2 -2
- package/dist/modules/auth/components/create-first-user-page.client.d.mts +2 -2
- package/dist/modules/auth/components/create-first-user-page.client.mjs +4 -3
- package/dist/modules/auth/components/create-first-user-page.client.mjs.map +1 -1
- package/dist/modules/auth/components/forget-password-page.client.d.mts +2 -2
- package/dist/modules/auth/components/forget-password-page.client.mjs +4 -3
- package/dist/modules/auth/components/forget-password-page.client.mjs.map +1 -1
- package/dist/modules/auth/components/guard-first-user.server.d.mts +2 -2
- package/dist/modules/auth/components/guard-first-user.server.d.mts.map +1 -1
- package/dist/modules/auth/components/guard.server.d.mts +3 -2
- package/dist/modules/auth/components/guard.server.d.mts.map +1 -1
- package/dist/modules/auth/components/guard.server.mjs +1 -0
- package/dist/modules/auth/components/guard.server.mjs.map +1 -1
- package/dist/modules/auth/components/login-page.client.d.mts +2 -2
- package/dist/modules/auth/components/login-page.client.mjs +4 -3
- package/dist/modules/auth/components/login-page.client.mjs.map +1 -1
- package/dist/modules/auth/components/reset-password-page.client.d.mts +2 -2
- package/dist/modules/auth/components/reset-password-page.client.mjs +4 -3
- package/dist/modules/auth/components/reset-password-page.client.mjs.map +1 -1
- package/dist/modules/auth/components/update-password-command.d.mts +2 -2
- package/dist/modules/auth/components/update-password-command.mjs +1 -1
- package/dist/modules/auth/handler/{client.client.d.mts → create-client.client.d.mts} +288 -168
- package/dist/modules/auth/handler/create-client.client.d.mts.map +1 -0
- package/dist/modules/auth/handler/create-client.client.mjs +26 -0
- package/dist/modules/auth/handler/create-client.client.mjs.map +1 -0
- package/dist/modules/auth/handler/init.d.mts +133 -133
- package/dist/modules/auth/handler/init.d.mts.map +1 -1
- package/dist/modules/auth/hooks/use-auth-client.d.mts +24 -0
- package/dist/modules/auth/hooks/use-auth-client.d.mts.map +1 -0
- package/dist/modules/auth/hooks/use-auth-client.mjs +31 -0
- package/dist/modules/auth/hooks/use-auth-client.mjs.map +1 -0
- package/dist/modules/auth/hooks/use-permission.d.mts +8 -35
- package/dist/modules/auth/hooks/use-permission.d.mts.map +1 -1
- package/dist/modules/auth/hooks/use-permission.mjs +47 -93
- package/dist/modules/auth/hooks/use-permission.mjs.map +1 -1
- package/dist/modules/auth/hooks/use-session.d.mts +5 -119
- package/dist/modules/auth/hooks/use-session.d.mts.map +1 -1
- package/dist/modules/auth/hooks/use-session.mjs +15 -17
- package/dist/modules/auth/hooks/use-session.mjs.map +1 -1
- package/dist/modules/auth/lib/helpers.server.mjs +1 -1
- package/dist/modules/auth/lib/validators.d.mts +2 -2
- package/dist/modules/auth/lib/validators.d.mts.map +1 -1
- package/dist/modules/commands/components/alert-dialog-command.client.d.mts +11 -11
- package/dist/modules/commands/components/click-command.client.d.mts +2 -2
- package/dist/modules/commands/components/command-trigger.client.d.mts +4 -4
- package/dist/modules/commands/components/dialog-command.client.d.mts +8 -8
- package/dist/modules/commands/components/dropdown-command.client.d.mts +5 -5
- package/dist/modules/commands/components/empty-command.client.d.mts +2 -2
- package/dist/modules/commands/components/form-dialog-command.client.d.mts +12 -12
- package/dist/modules/commands/hooks/use-command-menu.client.mjs.map +1 -1
- package/dist/modules/commands/hooks/use-command-mutation.client.mjs +1 -1
- package/dist/modules/commands/menus/context-menu.client.d.mts +2 -2
- package/dist/modules/commands/menus/dropdown-menu.client.d.mts +3 -3
- package/dist/modules/commands/menus/inline-menu.client.d.mts +3 -3
- package/dist/modules/commands/menus/responsive-menu.client.d.mts +3 -3
- package/dist/modules/commands/utils/archive-command.client.d.mts +3 -3
- package/dist/modules/commands/utils/delete-command.client.d.mts +3 -3
- package/dist/modules/config/db/helpers.d.mts +5 -5
- package/dist/modules/config/db/helpers.d.mts.map +1 -1
- package/dist/modules/config/lib/config.d.mts +1 -1
- package/dist/modules/config/lib/config.mjs.map +1 -1
- package/dist/modules/data-tables/components/cell/common.client.d.mts +5 -5
- package/dist/modules/data-tables/components/filters/combobox.client.d.mts +2 -2
- package/dist/modules/data-tables/components/filters/slider.client.d.mts +2 -2
- package/dist/modules/data-tables/components/search-input.client.d.mts +2 -2
- package/dist/modules/data-tables/hooks/use-context.client.d.mts +2 -2
- package/dist/modules/data-tables/strategies/helpers/sorting.mjs +1 -1
- package/dist/modules/data-tables/tables/data-table/components/table.d.mts +2 -2
- package/dist/modules/data-tables/tables/inline-table/components/cells/common.d.mts +2 -2
- package/dist/modules/data-tables/tables/inline-table/components/cells/drag-handle.client.d.mts +2 -2
- package/dist/modules/data-tables/tables/inline-table/components/cells/read-only.d.mts +2 -2
- package/dist/modules/data-tables/tables/inline-table/components/table.d.mts +2 -2
- package/dist/modules/data-tables/tables/inline-table/hooks/context.client.d.mts +2 -2
- package/dist/modules/inline-edit/components/combobox-dropdown.client.d.mts +2 -2
- package/dist/modules/inline-edit/components/combobox-dropdown.client.d.mts.map +1 -1
- package/dist/modules/inline-edit/components/combobox.client.d.mts +2 -2
- package/dist/modules/inline-edit/components/combobox.client.d.mts.map +1 -1
- package/dist/modules/inline-edit/components/date-input.client.d.mts +2 -2
- package/dist/modules/inline-edit/components/date-input.client.d.mts.map +1 -1
- package/dist/modules/inline-edit/components/date-picker.client.d.mts +2 -2
- package/dist/modules/inline-edit/components/date-picker.client.d.mts.map +1 -1
- package/dist/modules/inline-edit/components/editor.client.d.mts +2 -2
- package/dist/modules/inline-edit/components/input-recipient.client.d.mts +2 -2
- package/dist/modules/inline-edit/components/input-toggle.client.d.mts +2 -2
- package/dist/modules/inline-edit/components/input.client.d.mts +4 -4
- package/dist/modules/inline-edit/components/select.client.d.mts +6 -6
- package/dist/modules/inline-edit/components/switch.client.d.mts +2 -2
- package/dist/modules/inline-edit/components/toggle.client.d.mts +2 -2
- package/dist/modules/inline-edit/hooks/context.client.d.mts +2 -2
- package/dist/modules/inline-edit/hooks/context.client.d.mts.map +1 -1
- package/dist/modules/inline-edit/hooks/use-inline.client.mjs +2 -6
- package/dist/modules/inline-edit/hooks/use-inline.client.mjs.map +1 -1
- package/dist/modules/storage/components/dropzone.client.d.mts +4 -4
- package/dist/modules/storage/components/image-grid.client.d.mts +3 -3
- package/dist/modules/storage/components/image-grid.client.mjs +1 -1
- package/dist/modules/storage/components/upload-zone.client.d.mts +2 -2
- package/dist/modules/storage/components/upload-zone.client.mjs +1 -2
- package/dist/modules/storage/components/upload-zone.client.mjs.map +1 -1
- package/dist/modules/storage/lib/create-upload.client.d.mts.map +1 -1
- package/dist/modules/storage/lib/proxy.server.mjs +1 -1
- package/dist/modules/storage/lib/router.server.d.mts +2354 -2324
- package/dist/modules/storage/lib/router.server.d.mts.map +1 -1
- package/dist/modules/storage/lib/router.server.mjs +2 -3
- package/dist/modules/storage/lib/router.server.mjs.map +1 -1
- package/dist/modules/storage/lib/service.server.d.mts +18 -18
- package/dist/modules/storage/lib/validators.d.mts +90 -90
- package/dist/modules/storage/lib/validators.d.mts.map +1 -1
- package/package.json +1 -1
- package/src/components/layouts/admin-layout.tsx +1 -3
- package/src/components/navigation/admin-sidebar-header.client.tsx +3 -20
- package/src/modules/auth/components/allowed.client.tsx +2 -2
- package/src/modules/auth/components/create-first-user-page.client.tsx +3 -2
- package/src/modules/auth/components/forget-password-page.client.tsx +2 -1
- package/src/modules/auth/components/guard.server.tsx +2 -0
- package/src/modules/auth/components/login-page.client.tsx +2 -1
- package/src/modules/auth/components/reset-password-page.client.tsx +3 -1
- package/src/modules/auth/entry.client.ts +13 -1
- package/src/modules/auth/entry.ts +11 -0
- package/src/modules/auth/handler/create-client.client.ts +53 -0
- package/src/modules/auth/hooks/use-auth-client.tsx +38 -0
- package/src/modules/auth/hooks/use-permission.ts +49 -94
- package/src/modules/auth/hooks/use-session.ts +16 -16
- package/src/modules/commands/hooks/use-command-menu.client.tsx +0 -6
- package/src/modules/config/lib/config.ts +3 -2
- package/src/modules/inline-edit/hooks/use-inline.client.tsx +1 -1
- package/src/modules/storage/components/upload-zone.client.tsx +0 -2
- package/src/modules/storage/lib/router.server.ts +5 -4
- package/dist/modules/auth/handler/client.client.d.mts.map +0 -1
- package/dist/modules/auth/handler/client.client.mjs +0 -21
- package/dist/modules/auth/handler/client.client.mjs.map +0 -1
- package/src/modules/auth/components/guard.client.tsx +0 -12
- package/src/modules/auth/handler/client.client.ts +0 -16
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-client.client.d.mts","names":[],"sources":["../../../../src/modules/auth/handler/create-client.client.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;;;KAYY,6CACa,iDACW;;AAFpC;;EAEoC,OAAA,CAAA,EAAA,MAAA;EAS9B;;;EAIU,EAAA,EAJV,cAIU;EACS,KAAA,EAJhB,MAIgB;CACW;AACL,iBAHf,kBAGe,CAAA,uBAFN,aAEM,EAAA,eAAA,UAAgB,MAAA,GADX,IACW,EAAtC,CAAA,CAAA,KAAA,EAAA,qBAAA,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;;;;;;;;;;;;;;;;YAAx5D;;eAA4D,eAAA;;;;;eAA+U;kBAA+C;;;WAAwG;eAAwC;;qBAAqF;cAAyC;;0BAAA,kBAAA,CAA+E,oBAAA;;;;;qBAAA,kBAAA,CAAA;;;;;;;;;;;;;;;;;;;;+BAA27B,YAAA;;cAAA,kBAAA,CAAmG,gBAAA,UAAA,cAAA;kBAAA,kBAAA,CAAmG,gBAAA;;;;;uBAAuM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAJrxK,kCACa,iDACW,UAChC,kBAAkB,mBAAiB,gBAAgB"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { url } from "../../../lib/utils/url.mjs";
|
|
2
|
+
import "client-only";
|
|
3
|
+
import { passkeyClient } from "@better-auth/passkey/client";
|
|
4
|
+
import { adminClient, emailOTPClient, inferAdditionalFields } from "better-auth/client/plugins";
|
|
5
|
+
import { createAuthClient } from "better-auth/react";
|
|
6
|
+
|
|
7
|
+
//#region src/modules/auth/handler/create-client.client.ts
|
|
8
|
+
function createAuthClient$1(props) {
|
|
9
|
+
const { ac, roles } = props;
|
|
10
|
+
return createAuthClient({
|
|
11
|
+
baseURL: props.baseURL ?? url(),
|
|
12
|
+
plugins: [
|
|
13
|
+
emailOTPClient(),
|
|
14
|
+
passkeyClient(),
|
|
15
|
+
adminClient({
|
|
16
|
+
ac,
|
|
17
|
+
roles
|
|
18
|
+
}),
|
|
19
|
+
inferAdditionalFields()
|
|
20
|
+
]
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
//#endregion
|
|
25
|
+
export { createAuthClient$1 as createAuthClient };
|
|
26
|
+
//# sourceMappingURL=create-client.client.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-client.client.mjs","names":["createAuthClient","createBetterAuthClient"],"sources":["../../../../src/modules/auth/handler/create-client.client.ts"],"sourcesContent":["import \"client-only\";\n\nimport { url } from \"@/lib/utils/url\";\nimport { passkeyClient } from \"@better-auth/passkey/client\";\nimport { adminClient, emailOTPClient, inferAdditionalFields } from \"better-auth/client/plugins\";\nimport { AccessControl, Role } from \"better-auth/plugins\";\nimport { createAuthClient as createBetterAuthClient } from \"better-auth/react\";\nimport { AuthClient } from \"./init\";\n\n/**\n * Create auth client\n */\nexport type CreateAuthClientProps<\n TAccessControl extends AccessControl,\n TRoles extends { [key in string]: Role },\n> = {\n /**\n * Base URL for the auth client\n */\n baseURL?: string;\n /**\n * Access control instance\n */\n ac: TAccessControl;\n roles: TRoles;\n};\n\nexport function createAuthClient<\n TAccessControl extends AccessControl,\n TRoles extends { [key in string]: Role },\n>(props: CreateAuthClientProps<TAccessControl, TRoles>) {\n const { ac, roles } = props;\n\n const baseURL = props.baseURL ?? url();\n\n return createBetterAuthClient({\n baseURL,\n plugins: [\n emailOTPClient(),\n passkeyClient(),\n adminClient({ ac, roles }),\n inferAdditionalFields<AuthClient>(),\n ],\n });\n}\n\n/**\n * Client auth type\n */\nexport type ClientAuth<\n TAccessControl extends AccessControl,\n TRoles extends { [key in string]: Role },\n> = ReturnType<typeof createAuthClient<TAccessControl, TRoles>>;\n"],"mappings":";;;;;;;AA2BA,SAAgBA,mBAGd,OAAsD;CACtD,MAAM,EAAE,IAAI,UAAU;AAItB,QAAOC,iBAAuB;EAC5B,SAHc,MAAM,WAAW,KAAK;EAIpC,SAAS;GACP,gBAAgB;GAChB,eAAe;GACf,YAAY;IAAE;IAAI;IAAO,CAAC;GAC1B,uBAAmC;GACpC;EACF,CAAC"}
|