@tulip-systems/core 0.7.0 → 0.8.1
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/server.d.mts +3 -3
- package/dist/auth/server.mjs +3 -3
- package/dist/components/editor/components/editor.client.d.mts +4 -3
- package/dist/components/editor/components/editor.client.d.mts.map +1 -1
- package/dist/components/editor/components/editor.client.mjs +5 -2
- package/dist/components/editor/components/editor.client.mjs.map +1 -1
- package/dist/components/editor/extensions/file-handler/extension.d.mts +4 -4
- package/dist/components/editor/extensions/file-handler/extension.d.mts.map +1 -1
- package/dist/components/editor/extensions/file-handler/extension.mjs.map +1 -1
- package/dist/components/editor/extensions/file-handler/strategy.d.mts +4 -6
- package/dist/components/editor/extensions/file-handler/strategy.d.mts.map +1 -1
- package/dist/components/editor/extensions/file-handler/strategy.mjs +11 -11
- package/dist/components/editor/extensions/file-handler/strategy.mjs.map +1 -1
- package/dist/components/editor/extensions/file-handler/utils.mjs +1 -1
- package/dist/components/editor/extensions/file-handler/utils.mjs.map +1 -1
- package/dist/components/editor/extensions/image/extension.mjs +9 -9
- package/dist/components/editor/extensions/image/extension.mjs.map +1 -1
- package/dist/components/editor/lib/constants.d.mts +1 -1
- package/dist/components/editor/lib/constants.mjs +1 -1
- package/dist/components/editor/lib/extensions.d.mts +1 -1
- package/dist/components/editor/lib/helpers.d.mts +11 -3
- package/dist/components/editor/lib/helpers.d.mts.map +1 -1
- package/dist/components/editor/lib/helpers.mjs +27 -13
- package/dist/components/editor/lib/helpers.mjs.map +1 -1
- package/dist/components/ui/combobox-dropdown.client.mjs +1 -0
- package/dist/components/ui/combobox-dropdown.client.mjs.map +1 -1
- package/dist/components/ui/combobox.client.mjs +1 -1
- package/dist/components/ui/combobox.client.mjs.map +1 -1
- package/dist/components.d.mts +2 -2
- package/dist/components.mjs +2 -2
- package/dist/config/server.d.mts +1 -3
- package/dist/config/server.mjs +1 -4
- package/dist/config.d.mts +2 -2
- package/dist/config.mjs +1 -1
- package/dist/data-tables/client.d.mts +2 -1
- package/dist/data-tables/client.mjs +2 -1
- package/dist/data-tables.d.mts +1 -1
- package/dist/database/client.d.mts +1 -0
- package/dist/database/client.mjs +1 -0
- package/dist/database/server.d.mts +2 -0
- package/dist/database/server.mjs +3 -0
- package/dist/database.d.mts +3 -0
- package/dist/database.mjs +3 -0
- package/dist/emails/client.d.mts +1 -0
- package/dist/emails/client.mjs +1 -0
- package/dist/emails/server.d.mts +2 -0
- package/dist/emails/server.mjs +3 -0
- package/dist/emails.d.mts +1 -0
- package/dist/emails.mjs +1 -0
- package/dist/lib/utils/markdown.d.mts +10 -0
- package/dist/lib/utils/markdown.d.mts.map +1 -0
- package/dist/lib/utils/markdown.mjs +15 -0
- package/dist/lib/utils/markdown.mjs.map +1 -0
- package/dist/lib/utils/url.mjs +2 -1
- package/dist/lib/utils/url.mjs.map +1 -1
- package/dist/lib/utils/user-agent.mjs +15 -0
- package/dist/lib/utils/user-agent.mjs.map +1 -1
- package/dist/lib.d.mts +2 -2
- package/dist/lib.mjs +2 -2
- package/dist/modules/auth/components/create-first-user-guard.server.d.mts +16 -0
- package/dist/modules/auth/components/create-first-user-guard.server.d.mts.map +1 -0
- package/dist/modules/auth/components/create-first-user-guard.server.mjs +16 -0
- package/dist/modules/auth/components/create-first-user-guard.server.mjs.map +1 -0
- package/dist/modules/auth/components/guard.server.d.mts +2 -2
- package/dist/modules/auth/components/guard.server.mjs +1 -1
- package/dist/modules/auth/components/guard.server.mjs.map +1 -1
- package/dist/modules/auth/db/schema.d.mts +1 -1
- package/dist/modules/auth/db/schema.mjs +2 -2
- package/dist/modules/auth/handler/create-client.client.d.mts +4838 -229
- package/dist/modules/auth/handler/create-client.client.d.mts.map +1 -1
- package/dist/modules/auth/handler/create-client.client.mjs.map +1 -1
- package/dist/modules/auth/handler/proxy.server.mjs +2 -2
- package/dist/modules/auth/handler/proxy.server.mjs.map +1 -1
- package/dist/modules/auth/handler/route.server.d.mts +2 -2
- package/dist/modules/auth/handler/route.server.d.mts.map +1 -1
- package/dist/modules/auth/handler/route.server.mjs.map +1 -1
- package/dist/modules/auth/handler/{init.d.mts → service.server.d.mts} +322 -90
- package/dist/modules/auth/handler/service.server.d.mts.map +1 -0
- package/dist/modules/auth/handler/{init.mjs → service.server.mjs} +19 -8
- package/dist/modules/auth/handler/service.server.mjs.map +1 -0
- package/dist/modules/auth/hooks/use-session.d.mts +9 -4
- package/dist/modules/auth/hooks/use-session.d.mts.map +1 -1
- package/dist/modules/auth/lib/helpers.server.d.mts +1 -1
- package/dist/modules/auth/lib/permissions.d.mts +1 -1
- package/dist/modules/auth/lib/validators.mjs +1 -1
- package/dist/modules/config/lib/context.d.mts +9 -10
- package/dist/modules/config/lib/context.d.mts.map +1 -1
- package/dist/modules/config/lib/context.mjs.map +1 -1
- package/dist/modules/data-tables/lib/converters/search.d.mts +1 -1
- package/dist/modules/data-tables/lib/converters/sorting.d.mts +1 -1
- package/dist/modules/data-tables/server/get-data.server.d.mts +3 -3
- package/dist/modules/data-tables/server/get-data.server.mjs +1 -1
- package/dist/modules/data-tables/server/get-data.server.mjs.map +1 -1
- package/dist/modules/data-tables/strategies/infinite/strategy.d.mts +1 -1
- package/dist/modules/data-tables/strategies/infinite/strategy.mjs +3 -0
- package/dist/modules/data-tables/strategies/infinite/strategy.mjs.map +1 -1
- package/dist/modules/data-tables/tables/data-table/components/row.mjs +5 -15
- package/dist/modules/data-tables/tables/data-table/components/row.mjs.map +1 -1
- package/dist/modules/data-tables/tables/inline-table/components/body.mjs +1 -1
- package/dist/modules/data-tables/tables/inline-table/components/body.mjs.map +1 -1
- package/dist/modules/data-tables/tables/inline-table/components/row.client.mjs +13 -23
- package/dist/modules/data-tables/tables/inline-table/components/row.client.mjs.map +1 -1
- package/dist/modules/data-tables/tables/inline-table/components/table.d.mts +1 -0
- package/dist/modules/data-tables/tables/inline-table/components/table.d.mts.map +1 -1
- package/dist/modules/data-tables/tables/inline-table/components/table.mjs +2 -1
- package/dist/modules/data-tables/tables/inline-table/components/table.mjs.map +1 -1
- package/dist/modules/data-tables/tables/inline-table/hooks/context.client.d.mts +5 -1
- package/dist/modules/data-tables/tables/inline-table/hooks/context.client.d.mts.map +1 -1
- package/dist/modules/data-tables/tables/inline-table/hooks/context.client.mjs +2 -1
- package/dist/modules/data-tables/tables/inline-table/hooks/context.client.mjs.map +1 -1
- package/dist/modules/data-tables/tables/inline-table/hooks/use-hotkeys.client.d.mts +30 -0
- package/dist/modules/data-tables/tables/inline-table/hooks/use-hotkeys.client.d.mts.map +1 -0
- package/dist/modules/data-tables/tables/inline-table/hooks/use-hotkeys.client.mjs +77 -9
- package/dist/modules/data-tables/tables/inline-table/hooks/use-hotkeys.client.mjs.map +1 -1
- package/dist/modules/{config/db → database/lib}/helpers.d.mts +2 -2
- package/dist/modules/database/lib/helpers.d.mts.map +1 -0
- package/dist/modules/{config/db → database/lib}/helpers.mjs +1 -1
- package/dist/modules/database/lib/helpers.mjs.map +1 -0
- package/dist/modules/database/lib/service.server.d.mts +34 -0
- package/dist/modules/database/lib/service.server.d.mts.map +1 -0
- package/dist/modules/database/lib/service.server.mjs +24 -0
- package/dist/modules/database/lib/service.server.mjs.map +1 -0
- package/dist/modules/{config/db → database/lib}/types.d.mts +1 -1
- package/dist/modules/database/lib/types.d.mts.map +1 -0
- package/dist/modules/emails/lib/service.server.d.mts +29 -0
- package/dist/modules/emails/lib/service.server.d.mts.map +1 -0
- package/dist/modules/emails/lib/service.server.mjs +21 -0
- package/dist/modules/emails/lib/service.server.mjs.map +1 -0
- package/dist/modules/inline-edit/components/date-input.client.mjs +1 -1
- package/dist/modules/inline-edit/components/date-input.client.mjs.map +1 -1
- package/dist/modules/inline-edit/components/date-picker.client.mjs +1 -0
- package/dist/modules/inline-edit/components/date-picker.client.mjs.map +1 -1
- package/dist/modules/inline-edit/components/date-time.client.mjs +1 -0
- package/dist/modules/inline-edit/components/date-time.client.mjs.map +1 -1
- package/dist/modules/inline-edit/components/editor.client.mjs +1 -0
- package/dist/modules/inline-edit/components/editor.client.mjs.map +1 -1
- package/dist/modules/inline-edit/components/input-recipient.client.mjs +1 -0
- package/dist/modules/inline-edit/components/input-recipient.client.mjs.map +1 -1
- package/dist/modules/inline-edit/components/input-toggle.client.mjs +1 -0
- package/dist/modules/inline-edit/components/input-toggle.client.mjs.map +1 -1
- package/dist/modules/inline-edit/components/input.client.d.mts.map +1 -1
- package/dist/modules/inline-edit/components/input.client.mjs +3 -0
- package/dist/modules/inline-edit/components/input.client.mjs.map +1 -1
- package/dist/modules/inline-edit/components/select.client.d.mts.map +1 -1
- package/dist/modules/inline-edit/components/select.client.mjs +1 -0
- package/dist/modules/inline-edit/components/select.client.mjs.map +1 -1
- package/dist/modules/inline-edit/components/switch.client.mjs +1 -0
- package/dist/modules/inline-edit/components/switch.client.mjs.map +1 -1
- package/dist/modules/inline-edit/components/toggle.client.mjs +1 -0
- package/dist/modules/inline-edit/components/toggle.client.mjs.map +1 -1
- package/dist/modules/router/handler/context.server.d.mts +12 -10
- package/dist/modules/router/handler/context.server.d.mts.map +1 -1
- package/dist/modules/router/handler/init.server.d.mts +13 -11
- package/dist/modules/router/handler/init.server.d.mts.map +1 -1
- package/dist/modules/router/handler/init.server.mjs +2 -2
- package/dist/modules/router/handler/init.server.mjs.map +1 -1
- package/dist/modules/router/handler/route.server.d.mts +1 -1
- package/dist/modules/storage/components/dropzone.client.d.mts +2 -2
- package/dist/modules/storage/components/dropzone.client.d.mts.map +1 -1
- package/dist/modules/storage/components/dropzone.client.mjs.map +1 -1
- package/dist/modules/storage/components/image-grid.client.d.mts +3 -3
- package/dist/modules/storage/components/image-grid.client.d.mts.map +1 -1
- package/dist/modules/storage/components/image-grid.client.mjs +20 -22
- package/dist/modules/storage/components/image-grid.client.mjs.map +1 -1
- package/dist/modules/storage/components/image.client.d.mts +8 -0
- package/dist/modules/storage/components/image.client.d.mts.map +1 -0
- package/dist/modules/storage/components/image.client.mjs +17 -0
- package/dist/modules/storage/components/image.client.mjs.map +1 -0
- package/dist/modules/storage/components/upload-button.client.d.mts +12 -0
- package/dist/modules/storage/components/upload-button.client.d.mts.map +1 -0
- package/dist/modules/storage/components/upload-button.client.mjs +34 -0
- package/dist/modules/storage/components/upload-button.client.mjs.map +1 -0
- package/dist/modules/storage/components/upload-zone-context.client.d.mts +5 -5
- package/dist/modules/storage/components/upload-zone-context.client.d.mts.map +1 -1
- package/dist/modules/storage/components/upload-zone-context.client.mjs +2 -2
- package/dist/modules/storage/components/upload-zone-context.client.mjs.map +1 -1
- package/dist/modules/storage/components/upload-zone.client.d.mts +4 -4
- package/dist/modules/storage/components/upload-zone.client.d.mts.map +1 -1
- package/dist/modules/storage/components/upload-zone.client.mjs +16 -9
- package/dist/modules/storage/components/upload-zone.client.mjs.map +1 -1
- package/dist/modules/storage/lib/constants.d.mts +1 -5
- package/dist/modules/storage/lib/constants.d.mts.map +1 -1
- package/dist/modules/storage/lib/constants.mjs +1 -13
- package/dist/modules/storage/lib/constants.mjs.map +1 -1
- package/dist/modules/storage/lib/helpers.d.mts +14 -28
- package/dist/modules/storage/lib/helpers.d.mts.map +1 -1
- package/dist/modules/storage/lib/helpers.mjs +17 -75
- package/dist/modules/storage/lib/helpers.mjs.map +1 -1
- package/dist/modules/storage/lib/procedures.server.d.mts +1991 -0
- package/dist/modules/{auth/handler/init.d.mts.map → storage/lib/procedures.server.d.mts.map} +1 -1
- package/dist/modules/storage/lib/procedures.server.mjs +22 -0
- package/dist/modules/storage/lib/procedures.server.mjs.map +1 -0
- package/dist/modules/storage/lib/router-handlers.server.d.mts +41 -0
- package/dist/modules/storage/lib/router-handlers.server.d.mts.map +1 -0
- package/dist/modules/storage/lib/router-handlers.server.mjs +124 -0
- package/dist/modules/storage/lib/router-handlers.server.mjs.map +1 -0
- package/dist/modules/storage/lib/schema.d.mts +68 -958
- package/dist/modules/storage/lib/schema.d.mts.map +1 -1
- package/dist/modules/storage/lib/schema.mjs +28 -65
- package/dist/modules/storage/lib/schema.mjs.map +1 -1
- package/dist/modules/storage/lib/service.server.d.mts +2155 -141
- package/dist/modules/storage/lib/service.server.d.mts.map +1 -1
- package/dist/modules/storage/lib/service.server.mjs +453 -242
- package/dist/modules/storage/lib/service.server.mjs.map +1 -1
- package/dist/modules/storage/lib/upload.client.d.mts +58 -0
- package/dist/modules/storage/lib/upload.client.d.mts.map +1 -0
- package/dist/modules/storage/lib/upload.client.mjs +87 -0
- package/dist/modules/storage/lib/upload.client.mjs.map +1 -0
- package/dist/modules/storage/lib/validators.d.mts +297 -835
- package/dist/modules/storage/lib/validators.d.mts.map +1 -1
- package/dist/modules/storage/lib/validators.mjs +32 -76
- package/dist/modules/storage/lib/validators.mjs.map +1 -1
- package/dist/modules/storage/providers/adapters/s3.server.d.mts +19 -0
- package/dist/modules/storage/providers/adapters/s3.server.d.mts.map +1 -0
- package/dist/modules/storage/providers/adapters/s3.server.mjs +173 -0
- package/dist/modules/storage/providers/adapters/s3.server.mjs.map +1 -0
- package/dist/modules/storage/providers/lib/constants.d.mts +6 -0
- package/dist/modules/storage/providers/lib/constants.d.mts.map +1 -0
- package/dist/modules/storage/providers/lib/constants.mjs +6 -0
- package/dist/modules/storage/providers/lib/constants.mjs.map +1 -0
- package/dist/modules/storage/providers/lib/errors.d.mts +12 -0
- package/dist/modules/storage/providers/lib/errors.d.mts.map +1 -0
- package/dist/modules/storage/providers/lib/errors.mjs +13 -0
- package/dist/modules/storage/providers/lib/errors.mjs.map +1 -0
- package/dist/modules/storage/providers/lib/types.d.mts +21 -0
- package/dist/modules/storage/providers/lib/types.d.mts.map +1 -0
- package/dist/modules/storage/providers/lib/validators.d.mts +112 -0
- package/dist/modules/storage/providers/lib/validators.d.mts.map +1 -0
- package/dist/modules/storage/providers/lib/validators.mjs +75 -0
- package/dist/modules/storage/providers/lib/validators.mjs.map +1 -0
- package/dist/router/server.d.mts +1 -1
- package/dist/storage/client.d.mts +4 -2
- package/dist/storage/client.mjs +4 -2
- package/dist/storage/server.d.mts +5 -4
- package/dist/storage/server.mjs +5 -4
- package/dist/storage.d.mts +9 -6
- package/dist/storage.mjs +8 -6
- package/package.json +18 -5
- package/src/components/editor/components/editor.client.tsx +9 -1
- package/src/components/editor/extensions/file-handler/extension.ts +4 -4
- package/src/components/editor/extensions/file-handler/strategy.ts +15 -40
- package/src/components/editor/extensions/file-handler/utils.ts +1 -1
- package/src/components/editor/extensions/image/extension.ts +10 -10
- package/src/components/editor/lib/helpers.ts +28 -11
- package/src/components/ui/combobox-dropdown.client.tsx +1 -0
- package/src/components/ui/combobox.client.tsx +1 -1
- package/src/entry.ts +12 -51
- package/src/lib/entry.ts +1 -5
- package/src/lib/utils/markdown.ts +10 -0
- package/src/lib/utils/url.ts +2 -1
- package/src/lib/utils/user-agent.ts +15 -0
- package/src/modules/auth/components/{guard-first-user.server.tsx → create-first-user-guard.server.tsx} +8 -8
- package/src/modules/auth/components/guard.server.tsx +1 -1
- package/src/modules/auth/entry.server.ts +4 -5
- package/src/modules/auth/handler/create-client.client.ts +2 -2
- package/src/modules/auth/handler/proxy.server.ts +1 -1
- package/src/modules/auth/handler/route.server.ts +2 -2
- package/src/modules/auth/handler/{init.ts → service.server.ts} +30 -9
- package/src/modules/config/entry.server.ts +0 -9
- package/src/modules/config/entry.ts +2 -2
- package/src/modules/config/lib/context.ts +9 -9
- package/src/modules/data-tables/entry.client.ts +1 -0
- package/src/modules/data-tables/server/get-data.server.ts +1 -1
- package/src/modules/data-tables/strategies/infinite/strategy.ts +4 -1
- package/src/modules/data-tables/tables/data-table/components/row.tsx +12 -21
- package/src/modules/data-tables/tables/inline-table/components/body.tsx +1 -1
- package/src/modules/data-tables/tables/inline-table/components/row.client.tsx +24 -30
- package/src/modules/data-tables/tables/inline-table/components/table.tsx +6 -1
- package/src/modules/data-tables/tables/inline-table/hooks/context.client.tsx +5 -0
- package/src/modules/data-tables/tables/inline-table/hooks/use-hotkeys.client.ts +119 -91
- package/src/modules/database/entry.client.ts +0 -0
- package/src/modules/database/entry.server.ts +4 -0
- package/src/modules/database/entry.ts +5 -0
- package/src/modules/database/lib/service.server.ts +33 -0
- package/src/modules/emails/entry.client.ts +0 -0
- package/src/modules/emails/entry.server.ts +4 -0
- package/src/modules/emails/entry.ts +0 -0
- package/src/modules/emails/lib/service.server.ts +29 -0
- package/src/modules/inline-edit/components/date-input.client.tsx +1 -1
- package/src/modules/inline-edit/components/date-picker.client.tsx +1 -0
- package/src/modules/inline-edit/components/date-time.client.tsx +1 -0
- package/src/modules/inline-edit/components/editor.client.tsx +3 -0
- package/src/modules/inline-edit/components/input-recipient.client.tsx +1 -0
- package/src/modules/inline-edit/components/input-toggle.client.tsx +1 -0
- package/src/modules/inline-edit/components/input.client.tsx +3 -0
- package/src/modules/inline-edit/components/select.client.tsx +5 -1
- package/src/modules/inline-edit/components/switch.client.tsx +1 -0
- package/src/modules/inline-edit/components/toggle.client.tsx +1 -0
- package/src/modules/router/handler/init.server.ts +2 -2
- package/src/modules/storage/components/dropzone.client.tsx +1 -1
- package/src/modules/storage/components/image-grid.client.tsx +23 -20
- package/src/modules/storage/components/image.client.tsx +8 -0
- package/src/modules/storage/components/upload-zone-context.client.tsx +11 -8
- package/src/modules/storage/components/upload-zone.client.tsx +22 -16
- package/src/modules/storage/entry.client.ts +3 -1
- package/src/modules/storage/entry.server.ts +9 -3
- package/src/modules/storage/entry.ts +13 -1
- package/src/modules/storage/lib/constants.ts +0 -11
- package/src/modules/storage/lib/helpers.ts +18 -65
- package/src/modules/storage/lib/procedures.server.ts +60 -0
- package/src/modules/storage/lib/router-handlers.server.ts +178 -0
- package/src/modules/storage/lib/schema.ts +26 -97
- package/src/modules/storage/lib/service.server.ts +636 -374
- package/src/modules/storage/lib/upload.client.ts +156 -0
- package/src/modules/storage/lib/validators.ts +50 -111
- package/src/modules/storage/providers/adapters/s3.server.ts +281 -0
- package/src/modules/storage/providers/lib/constants.ts +3 -0
- package/src/modules/storage/providers/lib/errors.ts +21 -0
- package/src/modules/storage/providers/lib/types.ts +28 -0
- package/src/modules/storage/providers/lib/validators.ts +122 -0
- package/dist/lib/config/constants.d.mts +0 -5
- package/dist/lib/config/constants.d.mts.map +0 -1
- package/dist/lib/config/constants.mjs +0 -6
- package/dist/lib/config/constants.mjs.map +0 -1
- package/dist/modules/auth/components/guard-first-user.server.d.mts +0 -18
- package/dist/modules/auth/components/guard-first-user.server.d.mts.map +0 -1
- package/dist/modules/auth/components/guard-first-user.server.mjs +0 -16
- package/dist/modules/auth/components/guard-first-user.server.mjs.map +0 -1
- package/dist/modules/auth/handler/init.mjs.map +0 -1
- package/dist/modules/config/db/helpers.d.mts.map +0 -1
- package/dist/modules/config/db/helpers.mjs.map +0 -1
- package/dist/modules/config/db/init.d.mts +0 -20
- package/dist/modules/config/db/init.d.mts.map +0 -1
- package/dist/modules/config/db/init.mjs +0 -15
- package/dist/modules/config/db/init.mjs.map +0 -1
- package/dist/modules/config/db/types.d.mts.map +0 -1
- package/dist/modules/config/providers/email.d.mts +0 -12
- package/dist/modules/config/providers/email.d.mts.map +0 -1
- package/dist/modules/config/providers/email.mjs +0 -11
- package/dist/modules/config/providers/email.mjs.map +0 -1
- package/dist/modules/storage/config/filters.d.mts +0 -17
- package/dist/modules/storage/config/filters.d.mts.map +0 -1
- package/dist/modules/storage/config/filters.mjs +0 -17
- package/dist/modules/storage/config/filters.mjs.map +0 -1
- package/dist/modules/storage/lib/create-client.server.d.mts +0 -11
- package/dist/modules/storage/lib/create-client.server.d.mts.map +0 -1
- package/dist/modules/storage/lib/create-client.server.mjs +0 -11
- package/dist/modules/storage/lib/create-client.server.mjs.map +0 -1
- package/dist/modules/storage/lib/create-upload.client.d.mts +0 -56
- package/dist/modules/storage/lib/create-upload.client.d.mts.map +0 -1
- package/dist/modules/storage/lib/create-upload.client.mjs +0 -98
- package/dist/modules/storage/lib/create-upload.client.mjs.map +0 -1
- package/dist/modules/storage/lib/proxy.server.d.mts +0 -21
- package/dist/modules/storage/lib/proxy.server.d.mts.map +0 -1
- package/dist/modules/storage/lib/proxy.server.mjs +0 -46
- package/dist/modules/storage/lib/proxy.server.mjs.map +0 -1
- package/dist/modules/storage/lib/router.server.d.mts +0 -31002
- package/dist/modules/storage/lib/router.server.d.mts.map +0 -1
- package/dist/modules/storage/lib/router.server.mjs +0 -86
- package/dist/modules/storage/lib/router.server.mjs.map +0 -1
- package/src/lib/config/constants.ts +0 -1
- package/src/lib/utils/time-picker.ts +0 -139
- package/src/modules/config/db/init.ts +0 -21
- package/src/modules/config/providers/email.ts +0 -13
- package/src/modules/storage/config/filters.ts +0 -12
- package/src/modules/storage/lib/create-client.server.ts +0 -14
- package/src/modules/storage/lib/create-upload.client.ts +0 -134
- package/src/modules/storage/lib/proxy.server.ts +0 -63
- package/src/modules/storage/lib/router.server.ts +0 -182
- /package/src/modules/{config/db → database/lib}/helpers.ts +0 -0
- /package/src/modules/{config/db → database/lib}/types.ts +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"combobox.client.mjs","names":["Command","CommandPrimitive","CommandList"],"sources":["../../../src/components/ui/combobox.client.tsx"],"sourcesContent":["\"use client\";\n\nimport { Command as CommandPrimitive } from \"cmdk\";\nimport { useState } from \"react\";\nimport {\n Command,\n CommandEmpty,\n CommandGroup,\n CommandItem,\n CommandList,\n} from \"@/components/ui/command.client\";\nimport { Popover, PopoverAnchor, PopoverContent } from \"@/components/ui/popover.client\";\nimport { cn } from \"@/lib/entry\";\n\nexport type ComboboxItem = {\n id: string;\n label: string;\n disabled?: boolean;\n};\n\nexport type ComboboxProps<TValue> = {\n value: TValue;\n onSelect?: (id: TValue) => void;\n onBlur?: (e: React.FocusEvent<HTMLInputElement>) => void;\n options: ComboboxItem[];\n emptyMessage?: string;\n placeholder?: string;\n disabled?: boolean;\n className?: string;\n};\n\nexport function Combobox<TValue>({\n value,\n onSelect,\n onBlur,\n options,\n placeholder,\n disabled,\n emptyMessage = \"Geen items gevonden\",\n className,\n}: ComboboxProps<TValue>) {\n const [open, setOpen] = useState(false);\n\n const selected = options.find((option) => option.id === value);\n\n return (\n <Popover open={open} onOpenChange={setOpen}>\n <Command className=\"overflow-auto bg-transparent text-foreground\">\n <PopoverAnchor asChild>\n <CommandPrimitive.Input\n data-input\n value={value?.toString() ?? \"\"}\n placeholder={placeholder}\n disabled={disabled}\n onValueChange={(value) => onSelect?.(value as TValue)}\n onKeyDown={(e) => setOpen(e.key !== \"Escape\")}\n onMouseDown={() => setOpen((open) => !!value || !open)}\n onBlur={(e) => {\n setOpen(false);\n onBlur?.(e);\n }}\n onFocus={() => setOpen(true)}\n className={cn(\n \"flex h-8 w-full min-w-0 rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-xs outline-none transition-[color,box-shadow] selection:bg-primary selection:text-primary-foreground file:inline-flex file:h-7 file:border-0 file:bg-transparent file:font-medium file:text-foreground file:text-sm placeholder:text-muted-foreground disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm\",\n \"focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50\",\n \"aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40\",\n className,\n )}\n />\n </PopoverAnchor>\n\n {!open && <CommandList aria-hidden=\"true\" className=\"hidden\" />}\n\n <PopoverContent\n asChild\n onOpenAutoFocus={(e) => e.preventDefault()}\n onInteractOutside={(e) => {\n if (e.target instanceof Element && e.target.hasAttribute(\"cmdk-input\")) {\n e.preventDefault();\n }\n }}\n className=\"w-[var(--radix-popover-trigger-width)] p-0\"\n >\n <CommandList>\n {options.length > 0 && (\n <CommandGroup>\n {options.map((option) => (\n <CommandItem\n key={option.id}\n value={option.id}\n onMouseDown={(e) => e.preventDefault()}\n className={cn(selected?.id === option.id && \"font-bold\")}\n onSelect={(id) => {\n onSelect?.(id as TValue);\n setOpen(false);\n }}\n >\n {option.label}\n </CommandItem>\n ))}\n </CommandGroup>\n )}\n\n <CommandEmpty>{emptyMessage}</CommandEmpty>\n </CommandList>\n </PopoverContent>\n </Command>\n </Popover>\n );\n}\n"],"mappings":";;;;;;;;;;AA+BA,SAAgB,SAAiB,EAC/B,OACA,UACA,QACA,SACA,aACA,UACA,eAAe,uBACf,aACwB;CACxB,MAAM,CAAC,MAAM,WAAW,SAAS,MAAM;CAEvC,MAAM,WAAW,QAAQ,MAAM,WAAW,OAAO,OAAO,MAAM;AAE9D,QACE,oBAAC;EAAc;EAAM,cAAc;YACjC,qBAACA;GAAQ,WAAU;;IACjB,oBAAC;KAAc;eACb,oBAACC,QAAiB;MAChB;
|
|
1
|
+
{"version":3,"file":"combobox.client.mjs","names":["Command","CommandPrimitive","CommandList"],"sources":["../../../src/components/ui/combobox.client.tsx"],"sourcesContent":["\"use client\";\n\nimport { Command as CommandPrimitive } from \"cmdk\";\nimport { useState } from \"react\";\nimport {\n Command,\n CommandEmpty,\n CommandGroup,\n CommandItem,\n CommandList,\n} from \"@/components/ui/command.client\";\nimport { Popover, PopoverAnchor, PopoverContent } from \"@/components/ui/popover.client\";\nimport { cn } from \"@/lib/entry\";\n\nexport type ComboboxItem = {\n id: string;\n label: string;\n disabled?: boolean;\n};\n\nexport type ComboboxProps<TValue> = {\n value: TValue;\n onSelect?: (id: TValue) => void;\n onBlur?: (e: React.FocusEvent<HTMLInputElement>) => void;\n options: ComboboxItem[];\n emptyMessage?: string;\n placeholder?: string;\n disabled?: boolean;\n className?: string;\n};\n\nexport function Combobox<TValue>({\n value,\n onSelect,\n onBlur,\n options,\n placeholder,\n disabled,\n emptyMessage = \"Geen items gevonden\",\n className,\n}: ComboboxProps<TValue>) {\n const [open, setOpen] = useState(false);\n\n const selected = options.find((option) => option.id === value);\n\n return (\n <Popover open={open} onOpenChange={setOpen}>\n <Command className=\"overflow-auto bg-transparent text-foreground\">\n <PopoverAnchor asChild>\n <CommandPrimitive.Input\n data-inline-input=\"combobox\"\n value={value?.toString() ?? \"\"}\n placeholder={placeholder}\n disabled={disabled}\n onValueChange={(value) => onSelect?.(value as TValue)}\n onKeyDown={(e) => setOpen(e.key !== \"Escape\")}\n onMouseDown={() => setOpen((open) => !!value || !open)}\n onBlur={(e) => {\n setOpen(false);\n onBlur?.(e);\n }}\n onFocus={() => setOpen(true)}\n className={cn(\n \"flex h-8 w-full min-w-0 rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-xs outline-none transition-[color,box-shadow] selection:bg-primary selection:text-primary-foreground file:inline-flex file:h-7 file:border-0 file:bg-transparent file:font-medium file:text-foreground file:text-sm placeholder:text-muted-foreground disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm\",\n \"focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50\",\n \"aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40\",\n className,\n )}\n />\n </PopoverAnchor>\n\n {!open && <CommandList aria-hidden=\"true\" className=\"hidden\" />}\n\n <PopoverContent\n asChild\n onOpenAutoFocus={(e) => e.preventDefault()}\n onInteractOutside={(e) => {\n if (e.target instanceof Element && e.target.hasAttribute(\"cmdk-input\")) {\n e.preventDefault();\n }\n }}\n className=\"w-[var(--radix-popover-trigger-width)] p-0\"\n >\n <CommandList>\n {options.length > 0 && (\n <CommandGroup>\n {options.map((option) => (\n <CommandItem\n key={option.id}\n value={option.id}\n onMouseDown={(e) => e.preventDefault()}\n className={cn(selected?.id === option.id && \"font-bold\")}\n onSelect={(id) => {\n onSelect?.(id as TValue);\n setOpen(false);\n }}\n >\n {option.label}\n </CommandItem>\n ))}\n </CommandGroup>\n )}\n\n <CommandEmpty>{emptyMessage}</CommandEmpty>\n </CommandList>\n </PopoverContent>\n </Command>\n </Popover>\n );\n}\n"],"mappings":";;;;;;;;;;AA+BA,SAAgB,SAAiB,EAC/B,OACA,UACA,QACA,SACA,aACA,UACA,eAAe,uBACf,aACwB;CACxB,MAAM,CAAC,MAAM,WAAW,SAAS,MAAM;CAEvC,MAAM,WAAW,QAAQ,MAAM,WAAW,OAAO,OAAO,MAAM;AAE9D,QACE,oBAAC;EAAc;EAAM,cAAc;YACjC,qBAACA;GAAQ,WAAU;;IACjB,oBAAC;KAAc;eACb,oBAACC,QAAiB;MAChB,qBAAkB;MAClB,OAAO,OAAO,UAAU,IAAI;MACf;MACH;MACV,gBAAgB,UAAU,WAAW,MAAgB;MACrD,YAAY,MAAM,QAAQ,EAAE,QAAQ,SAAS;MAC7C,mBAAmB,SAAS,SAAS,CAAC,CAAC,SAAS,CAAC,KAAK;MACtD,SAAS,MAAM;AACb,eAAQ,MAAM;AACd,gBAAS,EAAE;;MAEb,eAAe,QAAQ,KAAK;MAC5B,WAAW,GACT,kbACA,iFACA,0GACA,UACD;OACD;MACY;IAEf,CAAC,QAAQ,oBAACC;KAAY,eAAY;KAAO,WAAU;MAAW;IAE/D,oBAAC;KACC;KACA,kBAAkB,MAAM,EAAE,gBAAgB;KAC1C,oBAAoB,MAAM;AACxB,UAAI,EAAE,kBAAkB,WAAW,EAAE,OAAO,aAAa,aAAa,CACpE,GAAE,gBAAgB;;KAGtB,WAAU;eAEV,qBAACA,4BACE,QAAQ,SAAS,KAChB,oBAAC,0BACE,QAAQ,KAAK,WACZ,oBAAC;MAEC,OAAO,OAAO;MACd,cAAc,MAAM,EAAE,gBAAgB;MACtC,WAAW,GAAG,UAAU,OAAO,OAAO,MAAM,YAAY;MACxD,WAAW,OAAO;AAChB,kBAAW,GAAa;AACxB,eAAQ,MAAM;;gBAGf,OAAO;QATH,OAAO,GAUA,CACd,GACW,EAGjB,oBAAC,0BAAc,eAA4B,IAC/B;MACC;;IACT;GACF"}
|
package/dist/components.d.mts
CHANGED
|
@@ -10,7 +10,7 @@ import { TimeInput, TimeInputProps } from "./components/ui/input-time.mjs";
|
|
|
10
10
|
import { Icon, Icons } from "./components/common/icons.mjs";
|
|
11
11
|
import { CreateStatusComponentProps, StatusBadge, StatusField, createStatusConfig, createStatusVariants, findStatus } from "./components/common/status.mjs";
|
|
12
12
|
import { createFileHandlerUploadStrategy } from "./components/editor/extensions/file-handler/strategy.mjs";
|
|
13
|
-
import { convertEditorContentToHTML, convertHTMLToEditorContent } from "./components/editor/lib/helpers.mjs";
|
|
13
|
+
import { convertEditorContentToHTML, convertEditorContentToMarkdown, convertHTMLToEditorContent, convertMarkdownToEditorContent } from "./components/editor/lib/helpers.mjs";
|
|
14
14
|
import { AdminErrorPage, AdminNotAllowedPage, AdminNotFoundPage } from "./components/layouts/admin-error-pages.mjs";
|
|
15
15
|
import { AdminLoadingLayout } from "./components/layouts/admin-loading.mjs";
|
|
16
16
|
import { EmptyPage, EmptyPageDescription, EmptyPageProps, EmptyPageTitle } from "./components/layouts/empty-page.mjs";
|
|
@@ -37,4 +37,4 @@ import { Skeleton } from "./components/ui/skeleton.mjs";
|
|
|
37
37
|
import { Slider } from "./components/ui/slider.mjs";
|
|
38
38
|
import { Spinner } from "./components/ui/spinner.mjs";
|
|
39
39
|
import { Textarea } from "./components/ui/textarea.mjs";
|
|
40
|
-
export { AdminErrorPage, AdminLoadingLayout, AdminNotAllowedPage, AdminNotFoundPage, Alert, AlertAction, AlertDescription, AlertTitle, Badge, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, CreateStatusComponentProps, DataList, DataListItem, DataListItemProps, DataListProps, DataListTitle, DataListTitleProps, DataListValue, DataListValueProps, DataStack, DataStackColumn, DataStackColumnProps, DataStackGrid, DataStackGridProps, DataStackLayout, DataStackLayoutProps, DataStackProps, DataStackRow, DataStackRowProps, DataStackTitle, DataStackTitleProps, DataStackValue, DataStackValueProps, DateInput, DateInputProps, DefaultErrorSection, EditorJSONContent, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyPage, EmptyPageDescription, EmptyPageProps, EmptyPageTitle, EmptyTitle, ErrorPage, ErrorPageCode, ErrorPageDescription, ErrorPageIcon, Icon, Icons, Input, Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle, Kbd, KbdGroup, Label, ListLayout, Loader, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, NotAllowedSection, NotFoundSection, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, RadioGroup, RadioGroupItem, RootLoading, RootNotFoundPage, ScrollArea, ScrollBar, Separator, ServerErrorSection, Skeleton, Slider, Spinner, StatusBadge, StatusField, Tab, TabLayout, TabLayoutProps, Textarea, TimeInput, TimeInputProps, badgeVariants, buttonGroupVariants, buttonVariants, convertEditorContentToHTML, convertHTMLToEditorContent, createFileHandlerUploadStrategy, createStatusConfig, createStatusVariants, findStatus, navigationMenuTriggerStyle };
|
|
40
|
+
export { AdminErrorPage, AdminLoadingLayout, AdminNotAllowedPage, AdminNotFoundPage, Alert, AlertAction, AlertDescription, AlertTitle, Badge, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, CreateStatusComponentProps, DataList, DataListItem, DataListItemProps, DataListProps, DataListTitle, DataListTitleProps, DataListValue, DataListValueProps, DataStack, DataStackColumn, DataStackColumnProps, DataStackGrid, DataStackGridProps, DataStackLayout, DataStackLayoutProps, DataStackProps, DataStackRow, DataStackRowProps, DataStackTitle, DataStackTitleProps, DataStackValue, DataStackValueProps, DateInput, DateInputProps, DefaultErrorSection, EditorJSONContent, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyPage, EmptyPageDescription, EmptyPageProps, EmptyPageTitle, EmptyTitle, ErrorPage, ErrorPageCode, ErrorPageDescription, ErrorPageIcon, Icon, Icons, Input, Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle, Kbd, KbdGroup, Label, ListLayout, Loader, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, NotAllowedSection, NotFoundSection, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, RadioGroup, RadioGroupItem, RootLoading, RootNotFoundPage, ScrollArea, ScrollBar, Separator, ServerErrorSection, Skeleton, Slider, Spinner, StatusBadge, StatusField, Tab, TabLayout, TabLayoutProps, Textarea, TimeInput, TimeInputProps, badgeVariants, buttonGroupVariants, buttonVariants, convertEditorContentToHTML, convertEditorContentToMarkdown, convertHTMLToEditorContent, convertMarkdownToEditorContent, createFileHandlerUploadStrategy, createStatusConfig, createStatusVariants, findStatus, navigationMenuTriggerStyle };
|
package/dist/components.mjs
CHANGED
|
@@ -2,7 +2,7 @@ import { Icons } from "./components/common/icons.mjs";
|
|
|
2
2
|
import { Badge, badgeVariants } from "./components/ui/badge.mjs";
|
|
3
3
|
import { StatusBadge, StatusField, createStatusConfig, createStatusVariants, findStatus } from "./components/common/status.mjs";
|
|
4
4
|
import { createFileHandlerUploadStrategy } from "./components/editor/extensions/file-handler/strategy.mjs";
|
|
5
|
-
import { convertEditorContentToHTML, convertHTMLToEditorContent } from "./components/editor/lib/helpers.mjs";
|
|
5
|
+
import { convertEditorContentToHTML, convertEditorContentToMarkdown, convertHTMLToEditorContent, convertMarkdownToEditorContent } from "./components/editor/lib/helpers.mjs";
|
|
6
6
|
import { Button, buttonVariants } from "./components/ui/button.mjs";
|
|
7
7
|
import { Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator } from "./components/ui/breadcrumb.mjs";
|
|
8
8
|
import { ScrollArea, ScrollBar } from "./components/ui/scroll-area.mjs";
|
|
@@ -37,4 +37,4 @@ import { RadioGroup, RadioGroupItem } from "./components/ui/radio-group.mjs";
|
|
|
37
37
|
import { Slider } from "./components/ui/slider.mjs";
|
|
38
38
|
import { Spinner } from "./components/ui/spinner.mjs";
|
|
39
39
|
|
|
40
|
-
export { AdminErrorPage, AdminLoadingLayout, AdminNotAllowedPage, AdminNotFoundPage, Alert, AlertAction, AlertDescription, AlertTitle, Badge, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, DataList, DataListItem, DataListTitle, DataListValue, DataStack, DataStackColumn, DataStackGrid, DataStackLayout, DataStackRow, DataStackTitle, DataStackValue, DateInput, DefaultErrorSection, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyPage, EmptyPageDescription, EmptyPageTitle, EmptyTitle, ErrorPage, ErrorPageCode, ErrorPageDescription, ErrorPageIcon, Icons, Input, Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle, Kbd, KbdGroup, Label, ListLayout, Loader, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, NotAllowedSection, NotFoundSection, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, RadioGroup, RadioGroupItem, RootLoading, RootNotFoundPage, ScrollArea, ScrollBar, Separator, ServerErrorSection, Skeleton, Slider, Spinner, StatusBadge, StatusField, TabLayout, Textarea, TimeInput, badgeVariants, buttonGroupVariants, buttonVariants, convertEditorContentToHTML, convertHTMLToEditorContent, createFileHandlerUploadStrategy, createStatusConfig, createStatusVariants, findStatus, navigationMenuTriggerStyle };
|
|
40
|
+
export { AdminErrorPage, AdminLoadingLayout, AdminNotAllowedPage, AdminNotFoundPage, Alert, AlertAction, AlertDescription, AlertTitle, Badge, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, DataList, DataListItem, DataListTitle, DataListValue, DataStack, DataStackColumn, DataStackGrid, DataStackLayout, DataStackRow, DataStackTitle, DataStackValue, DateInput, DefaultErrorSection, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyPage, EmptyPageDescription, EmptyPageTitle, EmptyTitle, ErrorPage, ErrorPageCode, ErrorPageDescription, ErrorPageIcon, Icons, Input, Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle, Kbd, KbdGroup, Label, ListLayout, Loader, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, NotAllowedSection, NotFoundSection, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, RadioGroup, RadioGroupItem, RootLoading, RootNotFoundPage, ScrollArea, ScrollBar, Separator, ServerErrorSection, Skeleton, Slider, Spinner, StatusBadge, StatusField, TabLayout, Textarea, TimeInput, badgeVariants, buttonGroupVariants, buttonVariants, convertEditorContentToHTML, convertEditorContentToMarkdown, convertHTMLToEditorContent, convertMarkdownToEditorContent, createFileHandlerUploadStrategy, createStatusConfig, createStatusVariants, findStatus, navigationMenuTriggerStyle };
|
package/dist/config/server.d.mts
CHANGED
package/dist/config/server.mjs
CHANGED
package/dist/config.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Path, PathGroup, PathSubItem, Paths } from "./modules/config/paths/types.mjs";
|
|
2
|
+
import { TDatabaseSchema } from "./modules/database/lib/types.mjs";
|
|
3
|
+
import { baseColumns, generateDefaultUUID } from "./modules/database/lib/helpers.mjs";
|
|
2
4
|
import { TulipConfig, defineTulipConfig } from "./modules/config/lib/config.mjs";
|
|
3
|
-
import { baseColumns, generateDefaultUUID } from "./modules/config/db/helpers.mjs";
|
|
4
|
-
import { TDatabaseSchema } from "./modules/config/db/types.mjs";
|
|
5
5
|
import { TulipContext, createContext } from "./modules/config/lib/context.mjs";
|
|
6
6
|
import { createPaths } from "./modules/config/paths/helpers.mjs";
|
|
7
7
|
export { Path, PathGroup, PathSubItem, Paths, TDatabaseSchema, TulipConfig, TulipContext, baseColumns, createContext, createPaths, defineTulipConfig, generateDefaultUUID };
|
package/dist/config.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { baseColumns, generateDefaultUUID } from "./modules/
|
|
1
|
+
import { baseColumns, generateDefaultUUID } from "./modules/database/lib/helpers.mjs";
|
|
2
2
|
import { defineTulipConfig } from "./modules/config/lib/config.mjs";
|
|
3
3
|
import { createContext } from "./modules/config/lib/context.mjs";
|
|
4
4
|
import { createPaths } from "./modules/config/paths/helpers.mjs";
|
|
@@ -12,6 +12,7 @@ import { DataTable } from "../modules/data-tables/tables/data-table/components/t
|
|
|
12
12
|
import { TableInlineCell } from "../modules/data-tables/tables/inline-table/components/cells/common.mjs";
|
|
13
13
|
import { TableDragHandle, TableDragHandleProps, createTableDragHandleCell } from "../modules/data-tables/tables/inline-table/components/cells/drag-handle.client.mjs";
|
|
14
14
|
import { InlineDataTableReadOnly } from "../modules/data-tables/tables/inline-table/components/cells/read-only.mjs";
|
|
15
|
+
import { INLINE_INPUT_ATTR, InlineDataTableHotkeysConfig, useInlineDataTableHotkeys } from "../modules/data-tables/tables/inline-table/hooks/use-hotkeys.client.mjs";
|
|
15
16
|
import { InlineTableContextValue, InlineTableProvider, useInlineTableContext } from "../modules/data-tables/tables/inline-table/hooks/context.client.mjs";
|
|
16
17
|
import { InlineTable } from "../modules/data-tables/tables/inline-table/components/table.mjs";
|
|
17
|
-
export { DataTable, InfiniteStrategyMeta, InlineDataTableReadOnly, InlineTable, InlineTableContextValue, InlineTableProvider, PaginationStrategy, TableConfigContextValue, TableConfigProvider, TableDateCell, TableDragHandle, TableDragHandleProps, TableFilterCombobox, TableFilterComboboxOption, TableFilterComboboxProps, TableFilterSlider, TableFilterSliderProps, TableInlineCell, TableNumberCell, TableSearchInput, TableStatusCell, TableTextCell, UseInfiniteStrategyInput, UsePaginationStrategyInput, createTableConfig, createTableDragHandleCell, createTableIndexCell, createTableSelectCell, useInfiniteStrategy, useInlineTableContext, usePaginationStrategy, useTable, useTableConfigContext };
|
|
18
|
+
export { DataTable, INLINE_INPUT_ATTR, InfiniteStrategyMeta, InlineDataTableHotkeysConfig, InlineDataTableReadOnly, InlineTable, InlineTableContextValue, InlineTableProvider, PaginationStrategy, TableConfigContextValue, TableConfigProvider, TableDateCell, TableDragHandle, TableDragHandleProps, TableFilterCombobox, TableFilterComboboxOption, TableFilterComboboxProps, TableFilterSlider, TableFilterSliderProps, TableInlineCell, TableNumberCell, TableSearchInput, TableStatusCell, TableTextCell, UseInfiniteStrategyInput, UsePaginationStrategyInput, createTableConfig, createTableDragHandleCell, createTableIndexCell, createTableSelectCell, useInfiniteStrategy, useInlineDataTableHotkeys, useInlineTableContext, usePaginationStrategy, useTable, useTableConfigContext };
|
|
@@ -13,6 +13,7 @@ import { TableInlineCell } from "../modules/data-tables/tables/inline-table/comp
|
|
|
13
13
|
import { TableDragHandle, createTableDragHandleCell } from "../modules/data-tables/tables/inline-table/components/cells/drag-handle.client.mjs";
|
|
14
14
|
import { InlineDataTableReadOnly } from "../modules/data-tables/tables/inline-table/components/cells/read-only.mjs";
|
|
15
15
|
import { InlineTableProvider, useInlineTableContext } from "../modules/data-tables/tables/inline-table/hooks/context.client.mjs";
|
|
16
|
+
import { INLINE_INPUT_ATTR, useInlineDataTableHotkeys } from "../modules/data-tables/tables/inline-table/hooks/use-hotkeys.client.mjs";
|
|
16
17
|
import { InlineTable } from "../modules/data-tables/tables/inline-table/components/table.mjs";
|
|
17
18
|
|
|
18
|
-
export { DataTable, InlineDataTableReadOnly, InlineTable, InlineTableProvider, TableConfigProvider, TableDateCell, TableDragHandle, TableFilterCombobox, TableFilterSlider, TableInlineCell, TableNumberCell, TableSearchInput, TableStatusCell, TableTextCell, createTableConfig, createTableDragHandleCell, createTableIndexCell, createTableSelectCell, useInfiniteStrategy, useInlineTableContext, usePaginationStrategy, useTable, useTableConfigContext };
|
|
19
|
+
export { DataTable, INLINE_INPUT_ATTR, InlineDataTableReadOnly, InlineTable, InlineTableProvider, TableConfigProvider, TableDateCell, TableDragHandle, TableFilterCombobox, TableFilterSlider, TableInlineCell, TableNumberCell, TableSearchInput, TableStatusCell, TableTextCell, createTableConfig, createTableDragHandleCell, createTableIndexCell, createTableSelectCell, useInfiniteStrategy, useInlineDataTableHotkeys, useInlineTableContext, usePaginationStrategy, useTable, useTableConfigContext };
|
package/dist/data-tables.d.mts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { ParseFilter, ParseFilterArraySchema, ParseFilterBooleanSchema, ParseFilterDatetimeSchema, ParseFilterEnumSchema, ParseFilterStringSchema, ParseFilterTupleSchema, parseFilterArray, parseFilterBoolean, parseFilterDatetime, parseFilterEnum, parseFilterString, parseFilterTuple } from "./modules/data-tables/lib/filters/parsers.mjs";
|
|
2
1
|
import { Table, TableBody, TableCaption, TableCell, TableFooter, TableRow } from "./modules/data-tables/components/table.mjs";
|
|
3
2
|
import { TableColumnHeader } from "./modules/data-tables/components/column-header.mjs";
|
|
4
3
|
import { TableHead, TableHeader, TableHeaderCell, TableHeaderProps, TableHeaderRow } from "./modules/data-tables/components/header.mjs";
|
|
5
4
|
import { TableLayout } from "./modules/data-tables/components/layout.mjs";
|
|
6
5
|
import { TableSkeleton } from "./modules/data-tables/components/skeleton.mjs";
|
|
7
6
|
import { TableToolbar, TableToolbarList } from "./modules/data-tables/components/toolbar.mjs";
|
|
7
|
+
import { ParseFilter, ParseFilterArraySchema, ParseFilterBooleanSchema, ParseFilterDatetimeSchema, ParseFilterEnumSchema, ParseFilterStringSchema, ParseFilterTupleSchema, parseFilterArray, parseFilterBoolean, parseFilterDatetime, parseFilterEnum, parseFilterString, parseFilterTuple } from "./modules/data-tables/lib/filters/parsers.mjs";
|
|
8
8
|
import { TableFiltersDef, TableFiltersResult, createTableFilters } from "./modules/data-tables/lib/filters/config.mjs";
|
|
9
9
|
import { mergeFilters, parseFiltersVisibility } from "./modules/data-tables/lib/filters/helpers.mjs";
|
|
10
10
|
import { resolveFilterDescriptors, resolveFiltersSchema, resolveFiltersSearchParams, resolveVisibilityState } from "./modules/data-tables/lib/filters/resolvers.mjs";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
package/dist/emails.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"markdown.d.mts","names":[],"sources":["../../../src/lib/utils/markdown.ts"],"mappings":";;;;;AAKA;cAAa,cAAA,EAAc,UAAA"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import MarkdownIt from "markdown-it";
|
|
2
|
+
|
|
3
|
+
//#region src/lib/utils/markdown.ts
|
|
4
|
+
/**
|
|
5
|
+
* Convert markdown to HTML
|
|
6
|
+
*/
|
|
7
|
+
const markdownParser = new MarkdownIt({
|
|
8
|
+
html: false,
|
|
9
|
+
linkify: true,
|
|
10
|
+
breaks: true
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
//#endregion
|
|
14
|
+
export { markdownParser };
|
|
15
|
+
//# sourceMappingURL=markdown.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"markdown.mjs","names":[],"sources":["../../../src/lib/utils/markdown.ts"],"sourcesContent":["import MarkdownIt from \"markdown-it\";\n\n/**\n * Convert markdown to HTML\n */\nexport const markdownParser = new MarkdownIt({\n html: false, // safer default\n linkify: true,\n breaks: true,\n});\n"],"mappings":";;;;;;AAKA,MAAa,iBAAiB,IAAI,WAAW;CAC3C,MAAM;CACN,SAAS;CACT,QAAQ;CACT,CAAC"}
|
package/dist/lib/utils/url.mjs
CHANGED
|
@@ -6,7 +6,8 @@
|
|
|
6
6
|
*/
|
|
7
7
|
function url(path = "") {
|
|
8
8
|
const base = process.env.NEXT_PUBLIC_DEPLOYMENT_URL ?? process.env.NEXT_PUBLIC_VERCEL_URL;
|
|
9
|
-
|
|
9
|
+
const protocol = process.env.NODE_ENV === "production" ? "https" : "http";
|
|
10
|
+
if (base) return `${protocol}://${base}${path}`;
|
|
10
11
|
return `http://localhost:${process.env.NEXT_PUBLIC_PORT ?? 3e3}${path}`;
|
|
11
12
|
}
|
|
12
13
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"url.mjs","names":[],"sources":["../../../src/lib/utils/url.ts"],"sourcesContent":["/**\n * Get the production url for a path\n * @param {string} path\n * @returns {string}\n */\nexport function url(path: string = \"\"): string {\n const base = process.env.NEXT_PUBLIC_DEPLOYMENT_URL ?? process.env.NEXT_PUBLIC_VERCEL_URL;\n\n if (base) return
|
|
1
|
+
{"version":3,"file":"url.mjs","names":[],"sources":["../../../src/lib/utils/url.ts"],"sourcesContent":["/**\n * Get the production url for a path\n * @param {string} path\n * @returns {string}\n */\nexport function url(path: string = \"\"): string {\n const base = process.env.NEXT_PUBLIC_DEPLOYMENT_URL ?? process.env.NEXT_PUBLIC_VERCEL_URL;\n const protocol = process.env.NODE_ENV === \"production\" ? \"https\" : \"http\";\n\n if (base) return `${protocol}://${base}${path}`;\n\n return `http://localhost:${process.env.NEXT_PUBLIC_PORT ?? 3000}${path}`;\n}\n"],"mappings":";;;;;;AAKA,SAAgB,IAAI,OAAe,IAAY;CAC7C,MAAM,OAAO,QAAQ,IAAI,8BAA8B,QAAQ,IAAI;CACnE,MAAM,WAAW,QAAQ,IAAI,aAAa,eAAe,UAAU;AAEnE,KAAI,KAAM,QAAO,GAAG,SAAS,KAAK,OAAO;AAEzC,QAAO,oBAAoB,QAAQ,IAAI,oBAAoB,MAAO"}
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
//#region src/lib/utils/user-agent.ts
|
|
2
|
+
/**
|
|
3
|
+
* Detects the browser name and version from a user agent string.
|
|
4
|
+
* @param ua - The user agent string.
|
|
5
|
+
* @returns An object with the browser name and optional version.
|
|
6
|
+
*/
|
|
2
7
|
function detectBrowser(ua) {
|
|
3
8
|
let m = ua.match(/Edg\/(\d+)/);
|
|
4
9
|
if (m) return {
|
|
@@ -24,6 +29,11 @@ function detectBrowser(ua) {
|
|
|
24
29
|
}
|
|
25
30
|
return { name: "Unknown browser" };
|
|
26
31
|
}
|
|
32
|
+
/**
|
|
33
|
+
* Detects the operating system name and version from a user agent string.
|
|
34
|
+
* @param ua - The user agent string.
|
|
35
|
+
* @returns An object with the OS name and optional version.
|
|
36
|
+
*/
|
|
27
37
|
function detectOS(ua) {
|
|
28
38
|
let m = ua.match(/Mac OS X ([\d_]+)/);
|
|
29
39
|
if (m) return {
|
|
@@ -48,6 +58,11 @@ function detectOS(ua) {
|
|
|
48
58
|
if (/Linux/.test(ua)) return { name: "Linux" };
|
|
49
59
|
return { name: "Unknown OS" };
|
|
50
60
|
}
|
|
61
|
+
/**
|
|
62
|
+
* Detects the device type (Desktop, Mobile, or Tablet) from a user agent string.
|
|
63
|
+
* @param ua - The user agent string.
|
|
64
|
+
* @returns The device type as "Desktop", "Mobile", or "Tablet".
|
|
65
|
+
*/
|
|
51
66
|
function detectDevice(ua) {
|
|
52
67
|
const s = ua.toLowerCase();
|
|
53
68
|
if (s.includes("ipad") || s.includes("tablet")) return "Tablet";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user-agent.mjs","names":[],"sources":["../../../src/lib/utils/user-agent.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"user-agent.mjs","names":[],"sources":["../../../src/lib/utils/user-agent.ts"],"sourcesContent":["/**\n * Detects the browser name and version from a user agent string.\n * @param ua - The user agent string.\n * @returns An object with the browser name and optional version.\n */\nexport function detectBrowser(ua: string): { name: string; version?: string } {\n // Edge\n let m = ua.match(/Edg\\/(\\d+)/);\n if (m) return { name: \"Edge\", version: m[1] };\n\n // Chrome (not Edge/Opera)\n m = ua.match(/Chrome\\/(\\d+)/);\n if (m && !/Edg\\//.test(ua) && !/OPR\\//.test(ua)) {\n return { name: \"Chrome\", version: m[1] };\n }\n\n // Firefox\n m = ua.match(/Firefox\\/(\\d+)/);\n if (m) return { name: \"Firefox\", version: m[1] };\n\n // Safari\n if (/Safari\\/\\d+/.test(ua) && /Version\\/(\\d+)/.test(ua)) {\n m = ua.match(/Version\\/(\\d+)/);\n if (m) return { name: \"Safari\", version: m[1] };\n }\n\n return { name: \"Unknown browser\" };\n}\n\n/**\n * Detects the operating system name and version from a user agent string.\n * @param ua - The user agent string.\n * @returns An object with the OS name and optional version.\n */\nexport function detectOS(ua: string): { name: string; version?: string } {\n // macOS\n let m = ua.match(/Mac OS X ([\\d_]+)/);\n if (m) {\n return { name: \"macOS\", version: m[1]?.replace(/_/g, \".\") };\n }\n\n // Windows\n m = ua.match(/Windows NT ([\\d.]+)/);\n if (m) return { name: \"Windows\", version: m[1] };\n\n // iOS\n m = ua.match(/iPhone OS ([\\d_]+)/) || ua.match(/CPU (?:iPhone )?OS ([\\d_]+)/);\n if (m) {\n return { name: \"iOS\", version: m[1]?.replace(/_/g, \".\") };\n }\n\n // Android\n m = ua.match(/Android ([\\d.]+)/);\n if (m) return { name: \"Android\", version: m[1] };\n\n if (/Linux/.test(ua)) return { name: \"Linux\" };\n\n return { name: \"Unknown OS\" };\n}\n\n/**\n * Detects the device type (Desktop, Mobile, or Tablet) from a user agent string.\n * @param ua - The user agent string.\n * @returns The device type as \"Desktop\", \"Mobile\", or \"Tablet\".\n */\nexport function detectDevice(ua: string): \"Desktop\" | \"Mobile\" | \"Tablet\" {\n const s = ua.toLowerCase();\n\n if (s.includes(\"ipad\") || s.includes(\"tablet\")) return \"Tablet\";\n if (\n s.includes(\"mobi\") ||\n s.includes(\"iphone\") ||\n (s.includes(\"android\") && !s.includes(\"tablet\"))\n ) {\n return \"Mobile\";\n }\n return \"Desktop\";\n}\n"],"mappings":";;;;;;AAKA,SAAgB,cAAc,IAAgD;CAE5E,IAAI,IAAI,GAAG,MAAM,aAAa;AAC9B,KAAI,EAAG,QAAO;EAAE,MAAM;EAAQ,SAAS,EAAE;EAAI;AAG7C,KAAI,GAAG,MAAM,gBAAgB;AAC7B,KAAI,KAAK,CAAC,QAAQ,KAAK,GAAG,IAAI,CAAC,QAAQ,KAAK,GAAG,CAC7C,QAAO;EAAE,MAAM;EAAU,SAAS,EAAE;EAAI;AAI1C,KAAI,GAAG,MAAM,iBAAiB;AAC9B,KAAI,EAAG,QAAO;EAAE,MAAM;EAAW,SAAS,EAAE;EAAI;AAGhD,KAAI,cAAc,KAAK,GAAG,IAAI,iBAAiB,KAAK,GAAG,EAAE;AACvD,MAAI,GAAG,MAAM,iBAAiB;AAC9B,MAAI,EAAG,QAAO;GAAE,MAAM;GAAU,SAAS,EAAE;GAAI;;AAGjD,QAAO,EAAE,MAAM,mBAAmB;;;;;;;AAQpC,SAAgB,SAAS,IAAgD;CAEvE,IAAI,IAAI,GAAG,MAAM,oBAAoB;AACrC,KAAI,EACF,QAAO;EAAE,MAAM;EAAS,SAAS,EAAE,IAAI,QAAQ,MAAM,IAAI;EAAE;AAI7D,KAAI,GAAG,MAAM,sBAAsB;AACnC,KAAI,EAAG,QAAO;EAAE,MAAM;EAAW,SAAS,EAAE;EAAI;AAGhD,KAAI,GAAG,MAAM,qBAAqB,IAAI,GAAG,MAAM,8BAA8B;AAC7E,KAAI,EACF,QAAO;EAAE,MAAM;EAAO,SAAS,EAAE,IAAI,QAAQ,MAAM,IAAI;EAAE;AAI3D,KAAI,GAAG,MAAM,mBAAmB;AAChC,KAAI,EAAG,QAAO;EAAE,MAAM;EAAW,SAAS,EAAE;EAAI;AAEhD,KAAI,QAAQ,KAAK,GAAG,CAAE,QAAO,EAAE,MAAM,SAAS;AAE9C,QAAO,EAAE,MAAM,cAAc;;;;;;;AAQ/B,SAAgB,aAAa,IAA6C;CACxE,MAAM,IAAI,GAAG,aAAa;AAE1B,KAAI,EAAE,SAAS,OAAO,IAAI,EAAE,SAAS,SAAS,CAAE,QAAO;AACvD,KACE,EAAE,SAAS,OAAO,IAClB,EAAE,SAAS,SAAS,IACnB,EAAE,SAAS,UAAU,IAAI,CAAC,EAAE,SAAS,SAAS,CAE/C,QAAO;AAET,QAAO"}
|
package/dist/lib.d.mts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ConfigWithIcon } from "./lib/types/config.mjs";
|
|
2
|
-
import { BUCKET_NAME } from "./lib/config/constants.mjs";
|
|
3
2
|
import { arrayMove } from "./lib/utils/array-move.mjs";
|
|
4
3
|
import { cn } from "./lib/utils/cn.mjs";
|
|
5
4
|
import { formatAssetSize, formatCurrency, formatDate, formatDateTime, formatDuration, formatPhone, formatTime, formatUserAgent } from "./lib/utils/format.mjs";
|
|
6
5
|
import { generateManifest } from "./lib/utils/manifest.mjs";
|
|
6
|
+
import { markdownParser } from "./lib/utils/markdown.mjs";
|
|
7
7
|
import { url } from "./lib/utils/url.mjs";
|
|
8
|
-
export {
|
|
8
|
+
export { ConfigWithIcon, arrayMove, cn, formatAssetSize, formatCurrency, formatDate, formatDateTime, formatDuration, formatPhone, formatTime, formatUserAgent, generateManifest, markdownParser, url };
|
package/dist/lib.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { cn } from "./lib/utils/cn.mjs";
|
|
2
|
-
import {
|
|
2
|
+
import { markdownParser } from "./lib/utils/markdown.mjs";
|
|
3
3
|
import { arrayMove } from "./lib/utils/array-move.mjs";
|
|
4
4
|
import { formatAssetSize, formatCurrency, formatDate, formatDateTime, formatDuration, formatPhone, formatTime, formatUserAgent } from "./lib/utils/format.mjs";
|
|
5
5
|
import { generateManifest } from "./lib/utils/manifest.mjs";
|
|
6
6
|
import { url } from "./lib/utils/url.mjs";
|
|
7
7
|
|
|
8
|
-
export {
|
|
8
|
+
export { arrayMove, cn, formatAssetSize, formatCurrency, formatDate, formatDateTime, formatDuration, formatPhone, formatTime, formatUserAgent, generateManifest, markdownParser, url };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { TDatabaseSchema } from "../../database/lib/types.mjs";
|
|
2
|
+
import { TulipContext } from "../../config/lib/context.mjs";
|
|
3
|
+
import "../../../config.mjs";
|
|
4
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
5
|
+
import { PropsWithChildren } from "react";
|
|
6
|
+
import "server-cli-only";
|
|
7
|
+
|
|
8
|
+
//#region src/modules/auth/components/create-first-user-guard.server.d.ts
|
|
9
|
+
type AuthGuardFirstUserProps<TSchema extends TDatabaseSchema> = PropsWithChildren<Pick<TulipContext<TSchema>, "db">>;
|
|
10
|
+
declare function CreateFirstUserPageGuard<TSchema extends TDatabaseSchema>({
|
|
11
|
+
children,
|
|
12
|
+
db
|
|
13
|
+
}: AuthGuardFirstUserProps<TSchema>): Promise<react_jsx_runtime0.JSX.Element>;
|
|
14
|
+
//#endregion
|
|
15
|
+
export { CreateFirstUserPageGuard };
|
|
16
|
+
//# sourceMappingURL=create-first-user-guard.server.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-first-user-guard.server.d.mts","names":[],"sources":["../../../../src/modules/auth/components/create-first-user-guard.server.tsx"],"mappings":";;;;;;;;KAQK,uBAAA,iBAAwC,eAAA,IAAmB,iBAAA,CAC9D,IAAA,CAAK,YAAA,CAAa,OAAA;AAAA,iBAGE,wBAAA,iBAAyC,eAAA,CAAA,CAAA;EAC7D,QAAA;EACA;AAAA,GACC,uBAAA,CAAwB,OAAA,IAAQ,OAAA,CAAA,kBAAA,CAAA,GAAA,CAAA,OAAA"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { users } from "../db/schema.mjs";
|
|
2
|
+
import { Fragment, jsx } from "react/jsx-runtime";
|
|
3
|
+
import { redirect } from "next/navigation";
|
|
4
|
+
import "server-cli-only";
|
|
5
|
+
import { connection } from "next/server";
|
|
6
|
+
|
|
7
|
+
//#region src/modules/auth/components/create-first-user-guard.server.tsx
|
|
8
|
+
async function CreateFirstUserPageGuard({ children, db }) {
|
|
9
|
+
await connection();
|
|
10
|
+
if ((await db.select().from(users).limit(1)).length > 0) redirect("/auth/login");
|
|
11
|
+
return /* @__PURE__ */ jsx(Fragment, { children });
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
//#endregion
|
|
15
|
+
export { CreateFirstUserPageGuard };
|
|
16
|
+
//# sourceMappingURL=create-first-user-guard.server.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-first-user-guard.server.mjs","names":[],"sources":["../../../../src/modules/auth/components/create-first-user-guard.server.tsx"],"sourcesContent":["import \"server-cli-only\";\n\nimport { redirect } from \"next/navigation\";\nimport { connection } from \"next/server\";\nimport type { PropsWithChildren } from \"react\";\nimport type { TDatabaseSchema, TulipContext } from \"@/modules/config/entry\";\nimport { users } from \"../db/schema\";\n\ntype AuthGuardFirstUserProps<TSchema extends TDatabaseSchema> = PropsWithChildren<\n Pick<TulipContext<TSchema>, \"db\">\n>;\n\nexport async function CreateFirstUserPageGuard<TSchema extends TDatabaseSchema>({\n children,\n db,\n}: AuthGuardFirstUserProps<TSchema>) {\n await connection();\n\n const allUsers = await db.select().from(users).limit(1);\n const usersExist = allUsers.length > 0;\n\n if (usersExist) redirect(\"/auth/login\");\n\n return <>{children}</>;\n}\n"],"mappings":";;;;;;;AAYA,eAAsB,yBAA0D,EAC9E,UACA,MACmC;AACnC,OAAM,YAAY;AAKlB,MAHiB,MAAM,GAAG,QAAQ,CAAC,KAAK,MAAM,CAAC,MAAM,EAAE,EAC3B,SAAS,EAErB,UAAS,cAAc;AAEvC,QAAO,gCAAG,WAAY"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { TDatabaseSchema } from "../../
|
|
1
|
+
import { TDatabaseSchema } from "../../database/lib/types.mjs";
|
|
2
2
|
import { TulipContext } from "../../config/lib/context.mjs";
|
|
3
3
|
import "../../../config.mjs";
|
|
4
4
|
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
5
5
|
import { PropsWithChildren } from "react";
|
|
6
|
-
import "server-only";
|
|
6
|
+
import "server-cli-only";
|
|
7
7
|
|
|
8
8
|
//#region src/modules/auth/components/guard.server.d.ts
|
|
9
9
|
declare function AuthGuard<TSchema extends TDatabaseSchema>({
|
|
@@ -3,7 +3,7 @@ import { HydrateClient } from "../../router/lib/query-client.server.mjs";
|
|
|
3
3
|
import { getSession } from "../lib/helpers.server.mjs";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
5
|
import { redirect } from "next/navigation";
|
|
6
|
-
import "server-only";
|
|
6
|
+
import "server-cli-only";
|
|
7
7
|
|
|
8
8
|
//#region src/modules/auth/components/guard.server.tsx
|
|
9
9
|
async function AuthGuard({ children, auth }) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"guard.server.mjs","names":[],"sources":["../../../../src/modules/auth/components/guard.server.tsx"],"sourcesContent":["import \"server-only\";\n\nimport { redirect } from \"next/navigation\";\nimport type { PropsWithChildren } from \"react\";\nimport type { TDatabaseSchema, TulipContext } from \"@/modules/config/entry\";\nimport { getQueryClient } from \"@/modules/router/lib/query-client\";\nimport { HydrateClient } from \"@/modules/router/lib/query-client.server\";\nimport { getSession } from \"../lib/helpers.server\";\n\nexport async function AuthGuard<TSchema extends TDatabaseSchema>({\n children,\n auth,\n}: PropsWithChildren<Pick<TulipContext<TSchema>, \"auth\">>) {\n const session = await getSession({ auth });\n if (!session) redirect(\"/auth/login\");\n\n const queryClient = getQueryClient();\n queryClient.prefetchQuery({\n queryKey: [\"session\"],\n queryFn: async () => session,\n });\n\n return <HydrateClient>{children}</HydrateClient>;\n}\n"],"mappings":";;;;;;;;AASA,eAAsB,UAA2C,EAC/D,UACA,QACyD;CACzD,MAAM,UAAU,MAAM,WAAW,EAAE,MAAM,CAAC;AAC1C,KAAI,CAAC,QAAS,UAAS,cAAc;AAGrC,CADoB,gBAAgB,CACxB,cAAc;EACxB,UAAU,CAAC,UAAU;EACrB,SAAS,YAAY;EACtB,CAAC;AAEF,QAAO,oBAAC,iBAAe,WAAyB"}
|
|
1
|
+
{"version":3,"file":"guard.server.mjs","names":[],"sources":["../../../../src/modules/auth/components/guard.server.tsx"],"sourcesContent":["import \"server-cli-only\";\n\nimport { redirect } from \"next/navigation\";\nimport type { PropsWithChildren } from \"react\";\nimport type { TDatabaseSchema, TulipContext } from \"@/modules/config/entry\";\nimport { getQueryClient } from \"@/modules/router/lib/query-client\";\nimport { HydrateClient } from \"@/modules/router/lib/query-client.server\";\nimport { getSession } from \"../lib/helpers.server\";\n\nexport async function AuthGuard<TSchema extends TDatabaseSchema>({\n children,\n auth,\n}: PropsWithChildren<Pick<TulipContext<TSchema>, \"auth\">>) {\n const session = await getSession({ auth });\n if (!session) redirect(\"/auth/login\");\n\n const queryClient = getQueryClient();\n queryClient.prefetchQuery({\n queryKey: [\"session\"],\n queryFn: async () => session,\n });\n\n return <HydrateClient>{children}</HydrateClient>;\n}\n"],"mappings":";;;;;;;;AASA,eAAsB,UAA2C,EAC/D,UACA,QACyD;CACzD,MAAM,UAAU,MAAM,WAAW,EAAE,MAAM,CAAC;AAC1C,KAAI,CAAC,QAAS,UAAS,cAAc;AAGrC,CADoB,gBAAgB,CACxB,cAAc;EACxB,UAAU,CAAC,UAAU;EACrB,SAAS,YAAY;EACtB,CAAC;AAEF,QAAO,oBAAC,iBAAe,WAAyB"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { baseColumns } from "../../
|
|
2
|
-
import { relations, sql } from "drizzle-orm";
|
|
1
|
+
import { baseColumns } from "../../database/lib/helpers.mjs";
|
|
3
2
|
import { pgTable } from "drizzle-orm/pg-core";
|
|
3
|
+
import { relations, sql } from "drizzle-orm";
|
|
4
4
|
|
|
5
5
|
//#region src/modules/auth/db/schema.ts
|
|
6
6
|
/**
|