studiocms 0.1.0-beta.28 → 0.1.0-beta.30

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/dist/cli/utils/effectBoxen.d.ts +1 -1
  3. package/dist/cli/utils/logger.d.ts +1 -1
  4. package/dist/cli/utils/useLibSQLDb.d.ts +1 -1
  5. package/dist/frontend/components/dashboard/DoubleSidebar.astro +1 -1
  6. package/dist/frontend/components/dashboard/MainSidebarContent.astro +1 -1
  7. package/dist/frontend/components/dashboard/SingleSidebar.astro +1 -1
  8. package/dist/frontend/components/dashboard/configuration/ConfigForm.astro +1 -1
  9. package/dist/frontend/components/dashboard/content-mgmt/CreateFolder.astro +1 -1
  10. package/dist/frontend/components/dashboard/content-mgmt/CreatePage.astro +1 -1
  11. package/dist/frontend/components/dashboard/content-mgmt/EditFolder.astro +1 -1
  12. package/dist/frontend/components/dashboard/content-mgmt/EditPage.astro +1 -1
  13. package/dist/frontend/components/dashboard/content-mgmt/InnerSidebarElement.astro +1 -1
  14. package/dist/frontend/components/dashboard/content-mgmt/PageHeader.astro +2 -2
  15. package/dist/frontend/components/dashboard/profile/APITokens.astro +2 -2
  16. package/dist/frontend/components/dashboard/profile/BasicInfo.astro +1 -1
  17. package/dist/frontend/components/dashboard/profile/Notifications.astro +1 -1
  18. package/dist/frontend/components/dashboard/profile/UpdatePassword.astro +1 -1
  19. package/dist/frontend/components/dashboard/sidebar/VersionCheck.astro +1 -1
  20. package/dist/frontend/components/dashboard/user-mgmt/InnerSidebarElement.astro +3 -3
  21. package/dist/frontend/pages/[dashboard]/content-management/diff.astro +1 -1
  22. package/dist/frontend/pages/[dashboard]/login.astro +2 -2
  23. package/dist/frontend/pages/[dashboard]/password-reset.astro +1 -1
  24. package/dist/frontend/pages/[dashboard]/smtp-configuration.astro +1 -1
  25. package/dist/frontend/pages/[dashboard]/unverified-email.astro +1 -1
  26. package/dist/frontend/pages/[dashboard]/user-management/edit.astro +2 -2
  27. package/dist/frontend/scripts/auth/formListener.js +1 -1
  28. package/dist/frontend/setup-pages/1-start.astro +1 -1
  29. package/dist/frontend/setup-pages/2-next.astro +1 -1
  30. package/dist/frontend/utils.d.ts +8 -8
  31. package/dist/virtuals/auth/core.d.ts +9 -9
  32. package/dist/virtuals/i18n/LanguageSelector.astro +1 -1
  33. package/dist/virtuals/i18n/client.js +15 -3
  34. package/dist/virtuals/scripts/template-editor.d.ts +1 -5
  35. package/dist/virtuals/scripts/template-editor.js +9 -12
  36. package/dist/virtuals/sdk/effect/db.d.ts +1 -1
  37. package/dist/virtuals/sdk/modules/get.d.ts +24 -24
  38. package/package.json +8 -8
  39. package/src/frontend/components/dashboard/DoubleSidebar.astro +1 -1
  40. package/src/frontend/components/dashboard/MainSidebarContent.astro +1 -1
  41. package/src/frontend/components/dashboard/SingleSidebar.astro +1 -1
  42. package/src/frontend/components/dashboard/configuration/ConfigForm.astro +1 -1
  43. package/src/frontend/components/dashboard/content-mgmt/CreateFolder.astro +1 -1
  44. package/src/frontend/components/dashboard/content-mgmt/CreatePage.astro +1 -1
  45. package/src/frontend/components/dashboard/content-mgmt/EditFolder.astro +1 -1
  46. package/src/frontend/components/dashboard/content-mgmt/EditPage.astro +1 -1
  47. package/src/frontend/components/dashboard/content-mgmt/InnerSidebarElement.astro +1 -1
  48. package/src/frontend/components/dashboard/content-mgmt/PageHeader.astro +2 -2
  49. package/src/frontend/components/dashboard/profile/APITokens.astro +2 -2
  50. package/src/frontend/components/dashboard/profile/BasicInfo.astro +1 -1
  51. package/src/frontend/components/dashboard/profile/Notifications.astro +1 -1
  52. package/src/frontend/components/dashboard/profile/UpdatePassword.astro +1 -1
  53. package/src/frontend/components/dashboard/sidebar/VersionCheck.astro +1 -1
  54. package/src/frontend/components/dashboard/user-mgmt/InnerSidebarElement.astro +3 -3
  55. package/src/frontend/pages/[dashboard]/content-management/diff.astro +1 -1
  56. package/src/frontend/pages/[dashboard]/login.astro +2 -2
  57. package/src/frontend/pages/[dashboard]/password-reset.astro +1 -1
  58. package/src/frontend/pages/[dashboard]/smtp-configuration.astro +1 -1
  59. package/src/frontend/pages/[dashboard]/unverified-email.astro +1 -1
  60. package/src/frontend/pages/[dashboard]/user-management/edit.astro +2 -2
  61. package/src/frontend/scripts/auth/formListener.ts +1 -1
  62. package/src/frontend/setup-pages/1-start.astro +1 -1
  63. package/src/frontend/setup-pages/2-next.astro +1 -1
  64. package/src/virtuals/i18n/LanguageSelector.astro +1 -1
  65. package/src/virtuals/i18n/client.ts +23 -3
  66. package/src/virtuals/scripts/template-editor.ts +9 -11
package/CHANGELOG.md CHANGED
@@ -1,5 +1,29 @@
1
1
  # studiocms
2
2
 
3
+ ## 0.1.0-beta.30
4
+
5
+ ### Patch Changes
6
+
7
+ - [#983](https://github.com/withstudiocms/studiocms/pull/983) [`044f30e`](https://github.com/withstudiocms/studiocms/commit/044f30e510eedfcdf3917db1884be9c0656c1c67) Thanks [@Adammatthiesen](https://github.com/Adammatthiesen)! - Updates usage of Toaster on first-time setup pages
8
+
9
+ - Updated dependencies [[`34e2c50`](https://github.com/withstudiocms/studiocms/commit/34e2c509914596d5e8bb75bceb6bf2b2cadeba3d), [`61091e1`](https://github.com/withstudiocms/studiocms/commit/61091e1e7633f1b4bf0fa3e0a09debb06b861fbe)]:
10
+ - @withstudiocms/component-registry@0.1.0-beta.6
11
+ - @withstudiocms/effect@0.1.0-beta.6
12
+ - @withstudiocms/auth-kit@0.1.0-beta.5
13
+
14
+ ## 0.1.0-beta.29
15
+
16
+ ### Patch Changes
17
+
18
+ - [#969](https://github.com/withstudiocms/studiocms/pull/969) [`7dd17fa`](https://github.com/withstudiocms/studiocms/commit/7dd17fa085bd747b500f920c53184f5b6f509abd) Thanks [@renovate](https://github.com/apps/renovate)! - fix(deps): update studiocms dependencies
19
+
20
+ - [#973](https://github.com/withstudiocms/studiocms/pull/973) [`76f30aa`](https://github.com/withstudiocms/studiocms/commit/76f30aab37bd5b94f418717788acd96f2e3cc62c) Thanks [@Adammatthiesen](https://github.com/Adammatthiesen)! - Updates StudioCMS UI and related Astro files to resolve Astro picocolor bug resulting in broken dev environments
21
+
22
+ - Updated dependencies [[`79286bf`](https://github.com/withstudiocms/studiocms/commit/79286bf1c914e9bcf4712c2165ccb978ad3118fe)]:
23
+ - @withstudiocms/effect@0.1.0-beta.5
24
+ - @withstudiocms/auth-kit@0.1.0-beta.4
25
+ - @withstudiocms/component-registry@0.1.0-beta.5
26
+
3
27
  ## 0.1.0-beta.28
4
28
 
5
29
  ### Patch Changes
@@ -37,4 +37,4 @@ console.log(message2);
37
37
  //
38
38
  ```
39
39
  */
40
- export declare const effectBoxen: <T>(fn: (boxen: typeof _boxen) => T) => Effect.Effect.AsEffect<Effect.Effect<T, Error, never>>;
40
+ export declare const effectBoxen: <T>(fn: (boxen: typeof _boxen) => T) => Effect.Effect<T, Error, never>;
@@ -9,4 +9,4 @@ export declare const logger: {
9
9
  * @param debug - A boolean flag indicating whether debug logging is enabled.
10
10
  * @returns An Effect-wrapped function that logs a debug message if debugging is enabled.
11
11
  */
12
- export declare const buildDebugLogger: (debug: boolean) => Effect.Effect<(message: string) => Effect.Effect.AsEffect<Effect.Effect<void, import("effect/Cause").UnknownException, never>>, never, never>;
12
+ export declare const buildDebugLogger: (debug: boolean) => Effect.Effect<(message: string) => Effect.Effect<void, import("effect/Cause").UnknownException, never>, never, never>;
@@ -271,6 +271,6 @@ export declare const Permissions: s.SQLiteTableWithColumns<{
271
271
  * const result = yield* execute((db) => db.select(...));
272
272
  */
273
273
  export declare const libSQLDrizzleClient: (url: string, authToken: string) => Effect.Effect<{
274
- execute: <T>(fn: (client: import("drizzle-orm/libsql").LibSQLDatabase<Record<string, never>> | import("@astrojs/db/runtime").Database) => Promise<T>) => Effect.Effect.AsEffect<Effect.Effect<T, LibSQLClientError, never>>;
274
+ execute: <T>(fn: (client: import("drizzle-orm/libsql").LibSQLDatabase<Record<string, never>> | import("@astrojs/db/runtime").Database) => Promise<T>) => Effect.Effect<T, LibSQLClientError, never>;
275
275
  makeQuery: <A, E, R, Input = never>(queryFn: (execute: import("@withstudiocms/effect/drizzle").ExecuteFn<Record<string, unknown>>, input: Input) => Effect.Effect<A, E, R>) => (...args: [Input] extends [never] ? [] : [input: Input]) => Effect.Effect<A, E, R>;
276
276
  }, LibSQLClientError, never>;
@@ -20,7 +20,7 @@ const { currentUser } = Astro.props as Props;
20
20
  </SuiDoubleSidebar>
21
21
 
22
22
  <script>
23
- import { DoubleSidebarHelper } from "studiocms:ui/components/sidebar";
23
+ import { DoubleSidebarHelper } from "studiocms:ui/components/sidebar/client";
24
24
 
25
25
  if (document.getElementById('sui-sidebars')) {
26
26
  const sidebar = new DoubleSidebarHelper();
@@ -247,7 +247,7 @@ const filteredPluginList = pluginList.filter((plugin) => !!plugin.settingsPage);
247
247
  </script>
248
248
 
249
249
  <script>
250
- import { DropdownHelper } from "studiocms:ui/components/dropdown";
250
+ import { DropdownHelper } from "studiocms:ui/components/dropdown/client";
251
251
  import { ThemeHelper } from '@studiocms/ui/utils/ThemeHelper.js';
252
252
 
253
253
  function sendPostRequest(url: string) {
@@ -14,7 +14,7 @@ const { currentUser } = Astro.props as Props;
14
14
  </Sidebar>
15
15
 
16
16
  <script>
17
- import { SingleSidebarHelper } from "studiocms:ui/components/sidebar";
17
+ import { SingleSidebarHelper } from "studiocms:ui/components/sidebar/client";
18
18
 
19
19
  function setupSidebar() {
20
20
  if (!document.getElementById('sui-sidebar')) return;
@@ -191,7 +191,7 @@ updateTrueFalseSelectOptions,
191
191
  </script>
192
192
 
193
193
  <script>
194
- import { toast } from "studiocms:ui/components/toaster";
194
+ import { toast } from "studiocms:ui/components/toaster/client";
195
195
  const configForm = document.querySelector('#site-config-form') as HTMLFormElement;
196
196
 
197
197
  configForm.addEventListener('submit', async (e) => {
@@ -43,7 +43,7 @@ const t = useTranslations(lang, '@studiocms/dashboard:content-folder');
43
43
  </script>
44
44
 
45
45
  <script>
46
- import { toast } from "studiocms:ui/components/toaster";
46
+ import { toast } from "studiocms:ui/components/toaster/client";
47
47
 
48
48
  const form = document.getElementById('create-folder-form') as HTMLFormElement;
49
49
  const createContainer = document.getElementById('create-folder-container') as HTMLDivElement;
@@ -309,7 +309,7 @@ const t = useTranslations(lang, '@studiocms/dashboard:content-page');
309
309
 
310
310
  <script>
311
311
  import type { tsPageDataInsert } from "studiocms:sdk/types";
312
- import { toast } from "studiocms:ui/components/toaster";
312
+ import { toast } from "studiocms:ui/components/toaster/client";
313
313
  import {
314
314
  formDataToRecord,
315
315
  studioCMSCreatePageDataSchema,
@@ -65,7 +65,7 @@ const t = useTranslations(lang, '@studiocms/dashboard:content-folder');
65
65
  </script>
66
66
 
67
67
  <script>
68
- import { toast } from "studiocms:ui/components/toaster";
68
+ import { toast } from "studiocms:ui/components/toaster/client";
69
69
 
70
70
  const form = document.getElementById('edit-folder-form') as HTMLFormElement;
71
71
  const createContainer = document.getElementById('edit-folder-container') as HTMLDivElement;
@@ -457,7 +457,7 @@ const t = useTranslations(lang, '@studiocms/dashboard:content-page');
457
457
 
458
458
  <script>
459
459
  import type { tsPageDataInsert } from "studiocms:sdk/types";
460
- import { toast } from "studiocms:ui/components/toaster";
460
+ import { toast } from "studiocms:ui/components/toaster/client";
461
461
  import {
462
462
  formDataToRecord,
463
463
  studioCMSEditPageDataAndContentSchema,
@@ -143,7 +143,7 @@ const t = useTranslations(lang, '@studiocms/dashboard:content-sidebar');
143
143
  </script>
144
144
 
145
145
  <script>
146
- import { DropdownHelper } from 'studiocms:ui/components/dropdown';
146
+ import { DropdownHelper } from 'studiocms:ui/components/dropdown/client';
147
147
 
148
148
  const createNewDropdown = new DropdownHelper('create-new-dropdown');
149
149
 
@@ -242,8 +242,8 @@ const currentMode = editPage
242
242
  </script>
243
243
 
244
244
  <script>
245
- import { ModalHelper } from 'studiocms:ui/components/modal';
246
- import { toast } from "studiocms:ui/components/toaster";
245
+ import { ModalHelper } from 'studiocms:ui/components/modal/client';
246
+ import { toast } from "studiocms:ui/components/toaster/client";
247
247
 
248
248
  const mode = (document.getElementById('current-mode-selector') as HTMLDivElement).dataset.mode;
249
249
 
@@ -142,8 +142,8 @@ const t = useTranslations(lang, '@studiocms/dashboard:profile');
142
142
  </script>
143
143
 
144
144
  <script>
145
- import { ModalHelper } from 'studiocms:ui/components/modal';
146
- import { toast } from 'studiocms:ui/components/toaster';
145
+ import { ModalHelper } from 'studiocms:ui/components/modal/client';
146
+ import { toast } from 'studiocms:ui/components/toaster/client';
147
147
 
148
148
  const createAPITokenModal = new ModalHelper('create-api-token-modal', 'create-api-token');
149
149
  const createTokenResponseModal = new ModalHelper('create-token-response-modal');
@@ -84,7 +84,7 @@ const t = useTranslations(lang, '@studiocms/dashboard:profile');
84
84
 
85
85
 
86
86
  <script>
87
- import { toast } from "studiocms:ui/components/toaster";
87
+ import { toast } from "studiocms:ui/components/toaster/client";
88
88
 
89
89
  const syncAvatar = document.getElementById('refresh-avatar') as HTMLButtonElement;
90
90
  const syncUrl = syncAvatar.dataset.url as string;
@@ -160,7 +160,7 @@ type TKey = Parameters<typeof t>[0];
160
160
  </script>
161
161
 
162
162
  <script>
163
- import { toast } from 'studiocms:ui/components/toaster';
163
+ import { toast } from 'studiocms:ui/components/toaster/client';
164
164
  import { getEnabledNotificationCheckboxes, formatNotificationOptions } from 'studiocms:notifier/client'
165
165
 
166
166
  const form = document.getElementById('notifications-form') as HTMLFormElement;
@@ -102,7 +102,7 @@ const t = useTranslations(lang, '@studiocms/dashboard:profile');
102
102
  </script>
103
103
 
104
104
  <script>
105
- import { toast } from "studiocms:ui/components/toaster";
105
+ import { toast } from "studiocms:ui/components/toaster/client";
106
106
  const passwordUpdateForm = document.getElementById('password-update-form') as HTMLFormElement;
107
107
 
108
108
  passwordUpdateForm.addEventListener('submit', async (e) => {
@@ -33,7 +33,7 @@ const status: false | 'outdated' | 'latest' | 'future' = (() => {
33
33
  </Button>
34
34
 
35
35
  <script>
36
- import { ModalHelper } from "studiocms:ui/components/modal";
36
+ import { ModalHelper } from "studiocms:ui/components/modal/client";
37
37
  import { dateTimeListener } from "../../../scripts/dateTimeListener.js";
38
38
  import { dateWithTimeAndZone } from "../../../scripts/dateWithTimeAndZone.js";
39
39
  import { timeAgo } from "../../../scripts/timeAgo.js";
@@ -142,9 +142,9 @@ const t = useTranslations(lang, '@studiocms/dashboard:user-mngmt-sidebar');
142
142
  </script>
143
143
 
144
144
  <script>
145
- import { DropdownHelper } from 'studiocms:ui/components/dropdown';
146
- import { ModalHelper } from 'studiocms:ui/components/modal';
147
- import { toast } from 'studiocms:ui/components/toaster';
145
+ import { DropdownHelper } from 'studiocms:ui/components/dropdown/client';
146
+ import { ModalHelper } from 'studiocms:ui/components/modal/client';
147
+ import { toast } from 'studiocms:ui/components/toaster/client';
148
148
 
149
149
  const createNewDropdown = new DropdownHelper('create-user-dropdown');
150
150
  const createNewUserModal = new ModalHelper('create-new-user-modal');
@@ -181,7 +181,7 @@ const { data: page } = possiblePage;
181
181
  </Layout>
182
182
 
183
183
  <script>
184
- import { toast } from "studiocms:ui/components/toaster";
184
+ import { toast } from "studiocms:ui/components/toaster/client";
185
185
 
186
186
  const revertMetaData = document.getElementById(
187
187
  "revert-metadata",
@@ -217,8 +217,8 @@ if (usernameAndPassword && SHOW_OAUTH) {
217
217
 
218
218
  <script>
219
219
  import { formListener } from '../../scripts/auth/formListener.js';
220
- import { ModalHelper } from 'studiocms:ui/components/modal';
221
- import { toast } from 'studiocms:ui/components/toaster';
220
+ import { ModalHelper } from 'studiocms:ui/components/modal/client';
221
+ import { toast } from 'studiocms:ui/components/toaster/client';
222
222
 
223
223
  const loginForm = document.getElementById('login-form') as HTMLFormElement | null;
224
224
  if (loginForm) {
@@ -155,7 +155,7 @@ if (!lookupToken) {
155
155
  </script>
156
156
 
157
157
  <script>
158
- import { toast } from "studiocms:ui/components/toaster";
158
+ import { toast } from "studiocms:ui/components/toaster/client";
159
159
 
160
160
  const resetForm = document.getElementById(
161
161
  "reset-password-form",
@@ -392,7 +392,7 @@ const notificationSettingKeys = Object.keys(notificationSettings.data).filter(
392
392
  </Layout>
393
393
 
394
394
  <script>
395
- import { toast } from "studiocms:ui/components/toaster";
395
+ import { toast } from "studiocms:ui/components/toaster/client";
396
396
 
397
397
  const smtpConfigForm = document.getElementById(
398
398
  "smtp-config-form",
@@ -50,7 +50,7 @@ if (!userId) {
50
50
  </Layout>
51
51
 
52
52
  <script>
53
- import { toast } from 'studiocms:ui/components/toaster';
53
+ import { toast } from 'studiocms:ui/components/toaster/client';
54
54
 
55
55
  document.getElementById('back-button')!.addEventListener('click', () => {
56
56
  window.location.href = '/';
@@ -323,8 +323,8 @@ if (isAdmin) allowedRanks.unshift({ label: 'Administrator', value: 'admin' });
323
323
  </script>
324
324
 
325
325
  <script>
326
- import { toast } from 'studiocms:ui/components/toaster';
327
- import { ModalHelper } from 'studiocms:ui/components/modal';
326
+ import { toast } from 'studiocms:ui/components/toaster/client';
327
+ import { ModalHelper } from 'studiocms:ui/components/modal/client';
328
328
 
329
329
  const resetLinkModal = new ModalHelper('password-reset-link-modal');
330
330
 
@@ -1,4 +1,4 @@
1
- import { toast as uiToast } from "studiocms:ui/components/toaster";
1
+ import { toast as uiToast } from "studiocms:ui/components/toaster/client";
2
2
  async function formListener(event, form, type, toast = uiToast, reload = () => {
3
3
  if (typeof window !== "undefined") {
4
4
  window.location.reload();
@@ -69,7 +69,7 @@ const ogSelectOptions = validImages.map(({ label, name: value }) => ({ label, va
69
69
  </Card>
70
70
 
71
71
  <script>
72
- import { toast } from 'studiocms:ui/components/toaster';
72
+ import { toast } from 'studiocms:ui/components/toaster/client';
73
73
 
74
74
  const form = document.querySelector('#setup-step-one') as HTMLFormElement;
75
75
 
@@ -130,7 +130,7 @@ const Providers = providerData
130
130
  </Card>
131
131
 
132
132
  <script>
133
- import { toast } from 'studiocms:ui/components/toaster';
133
+ import { toast } from 'studiocms:ui/components/toaster/client';
134
134
 
135
135
  const form = document.querySelector('#setup-step-two') as HTMLFormElement;
136
136
 
@@ -11,7 +11,7 @@ export declare class StudioCMSRouteConfig extends StudioCMSRouteConfig_base {
11
11
  /**
12
12
  * Process and derive route settings from the main configuration.
13
13
  */
14
- export declare const processedConfig: (args_0: RouteConfig) => Effect.Effect.AsEffect<Effect.Effect<ProcessedRouteConfig, never, never>>;
14
+ export declare const processedConfig: (args_0: RouteConfig) => Effect.Effect<ProcessedRouteConfig, never, never>;
15
15
  /**
16
16
  * Sets the `prerender` property to `false` for the given routes.
17
17
  *
@@ -28,38 +28,38 @@ export declare const setPrerenderFalse: (items: InjectedRoute[] | InjectedRoute)
28
28
  */
29
29
  export declare const mapProcessedConfig: (args_0: ProcessedRouteConfig & {
30
30
  dashboardRoute: (path: string) => string;
31
- }) => Effect.Effect.AsEffect<Effect.Effect<{
31
+ }) => Effect.Effect<{
32
32
  enabled: boolean;
33
33
  routes: {
34
34
  prerender: boolean;
35
35
  pattern: string;
36
36
  entrypoint: string | URL;
37
37
  }[];
38
- }[], never, never>>;
38
+ }[], never, never>;
39
39
  /**
40
40
  * Flat map processed configuration to route groups.
41
41
  */
42
- export declare const flatMapProcessedConfig: (config: Pick<RouteConfig, "dashboardRoute">) => (processed: ProcessedRouteConfig) => Effect.Effect.AsEffect<Effect.Effect.AsEffect<Effect.Effect<{
42
+ export declare const flatMapProcessedConfig: (config: Pick<RouteConfig, "dashboardRoute">) => (processed: ProcessedRouteConfig) => Effect.Effect<{
43
43
  enabled: boolean;
44
44
  routes: {
45
45
  prerender: boolean;
46
46
  pattern: string;
47
47
  entrypoint: string | URL;
48
48
  }[];
49
- }[], never, never>>>;
49
+ }[], never, never>;
50
50
  /**
51
51
  * Map route groups to a flat array of routes.
52
52
  */
53
53
  export declare const mapRouteGroups: (routeGroups: {
54
54
  enabled: boolean;
55
55
  routes: InjectedRoute[];
56
- }[]) => Effect.Effect.AsEffect<Effect.Effect<InjectedRoute[], never, never>>;
56
+ }[]) => Effect.Effect<InjectedRoute[], never, never>;
57
57
  /**
58
58
  * Inject extra routes from the configuration.
59
59
  */
60
- export declare const injectExtraRoutes: (config: Pick<RouteConfig, "extraRoutes">) => (routes: InjectedRoute[]) => Effect.Effect.AsEffect<Effect.Effect<InjectedRoute[], never, never>>;
60
+ export declare const injectExtraRoutes: (config: Pick<RouteConfig, "extraRoutes">) => (routes: InjectedRoute[]) => Effect.Effect<InjectedRoute[], never, never>;
61
61
  /**
62
62
  * Inject middleware based on the configuration.
63
63
  */
64
- export declare const injectMiddleware: ({ dbStartPage }: Pick<RouteConfig, "dbStartPage">) => (routes: InjectedRoute[]) => Effect.Effect.AsEffect<Effect.Effect<InjectedRoutesWithMiddleware, never, never>>;
64
+ export declare const injectMiddleware: ({ dbStartPage }: Pick<RouteConfig, "dbStartPage">) => (routes: InjectedRoute[]) => Effect.Effect<InjectedRoutesWithMiddleware, never, never>;
65
65
  export {};
@@ -21,26 +21,26 @@ import { Effect } from '../../effect.js';
21
21
  * ```
22
22
  */
23
23
  export declare const Encryption: Effect.Effect<{
24
- readonly encrypt: (data: Uint8Array<ArrayBufferLike>) => Effect.Effect.AsEffect<Effect.Effect<Uint8Array<ArrayBufferLike>, import("@withstudiocms/auth-kit/errors").EncryptionError, never>>;
24
+ readonly encrypt: (data: Uint8Array<ArrayBufferLike>) => Effect.Effect<Uint8Array<ArrayBufferLike>, import("@withstudiocms/auth-kit/errors").EncryptionError, never>;
25
25
  readonly encryptToString: (data: string) => Effect.Effect<Uint8Array<ArrayBufferLike>, import("@withstudiocms/auth-kit/errors").EncryptionError, never>;
26
- readonly decrypt: (data: Uint8Array<ArrayBufferLike>) => Effect.Effect.AsEffect<Effect.Effect<Uint8Array<ArrayBufferLike>, import("@withstudiocms/auth-kit/errors").DecryptionError, never>>;
26
+ readonly decrypt: (data: Uint8Array<ArrayBufferLike>) => Effect.Effect<Uint8Array<ArrayBufferLike>, import("@withstudiocms/auth-kit/errors").DecryptionError, never>;
27
27
  readonly decryptToString: (data: Uint8Array<ArrayBufferLike>) => Effect.Effect<string, import("@withstudiocms/auth-kit/errors").DecryptionError, never>;
28
28
  }, import("@withstudiocms/auth-kit/errors").EncryptionError, never>, Password: Effect.Effect<{
29
29
  readonly hashPassword: (password: string, _salt?: string | undefined) => Effect.Effect<string, import("@withstudiocms/effect/scrypt").ScryptError, never>;
30
30
  readonly verifyPasswordHash: (hash: string, password: string) => Effect.Effect<boolean, import("@withstudiocms/effect/scrypt").ScryptError | import("@withstudiocms/auth-kit/errors").PasswordError, never>;
31
31
  readonly verifyPasswordStrength: (pass: string) => Effect.Effect<string | true, import("@withstudiocms/auth-kit/errors").PasswordError | import("@withstudiocms/auth-kit/errors").CheckIfUnsafeError | import("@effect/platform/HttpClientError").ResponseError, never>;
32
32
  }, never, never>, Session: Effect.Effect<{
33
- readonly generateSessionToken: () => Effect.Effect.AsEffect<Effect.Effect<string, import("@withstudiocms/auth-kit/errors").SessionError, never>>;
33
+ readonly generateSessionToken: () => Effect.Effect<string, import("@withstudiocms/auth-kit/errors").SessionError, never>;
34
34
  readonly createSession: (token: string, userId: string) => Effect.Effect<import("@withstudiocms/auth-kit/types").UserSession, import("@withstudiocms/auth-kit/errors").SessionError, never>;
35
35
  readonly validateSessionToken: (token: string) => Effect.Effect<import("@withstudiocms/auth-kit/types").SessionValidationResult, import("@withstudiocms/auth-kit/errors").SessionError, never>;
36
- readonly invalidateSession: (sessionId: string) => Effect.Effect.AsEffect<Effect.Effect<void, import("@withstudiocms/auth-kit/errors").SessionError, never>>;
37
- readonly setSessionTokenCookie: (context: import("astro").APIContext<Record<string, any>, Record<string, string | undefined>> | import("astro").AstroGlobal<Record<string, any>, import("astro/runtime/server/index.js").AstroComponentFactory, Record<string, string | undefined>>, token: string, expiresAt: Date, secure?: boolean | undefined) => Effect.Effect.AsEffect<Effect.Effect<void, import("@withstudiocms/auth-kit/errors").SessionError, never>>;
38
- readonly deleteSessionTokenCookie: (context: import("astro").APIContext<Record<string, any>, Record<string, string | undefined>> | import("astro").AstroGlobal<Record<string, any>, import("astro/runtime/server/index.js").AstroComponentFactory, Record<string, string | undefined>>, secure?: boolean | undefined) => Effect.Effect.AsEffect<Effect.Effect<void, import("@withstudiocms/auth-kit/errors").SessionError, never>>;
39
- readonly setOAuthSessionTokenCookie: (context: import("astro").APIContext<Record<string, any>, Record<string, string | undefined>> | import("astro").AstroGlobal<Record<string, any>, import("astro/runtime/server/index.js").AstroComponentFactory, Record<string, string | undefined>>, key: string, value: string, secure?: boolean | undefined) => Effect.Effect.AsEffect<Effect.Effect<void, import("@withstudiocms/auth-kit/errors").SessionError, never>>;
36
+ readonly invalidateSession: (sessionId: string) => Effect.Effect<void, import("@withstudiocms/auth-kit/errors").SessionError, never>;
37
+ readonly setSessionTokenCookie: (context: import("astro").APIContext<Record<string, any>, Record<string, string | undefined>> | import("astro").AstroGlobal<Record<string, any>, import("astro/runtime/server/index.js").AstroComponentFactory, Record<string, string | undefined>>, token: string, expiresAt: Date, secure?: boolean | undefined) => Effect.Effect<void, import("@withstudiocms/auth-kit/errors").SessionError, never>;
38
+ readonly deleteSessionTokenCookie: (context: import("astro").APIContext<Record<string, any>, Record<string, string | undefined>> | import("astro").AstroGlobal<Record<string, any>, import("astro/runtime/server/index.js").AstroComponentFactory, Record<string, string | undefined>>, secure?: boolean | undefined) => Effect.Effect<void, import("@withstudiocms/auth-kit/errors").SessionError, never>;
39
+ readonly setOAuthSessionTokenCookie: (context: import("astro").APIContext<Record<string, any>, Record<string, string | undefined>> | import("astro").AstroGlobal<Record<string, any>, import("astro/runtime/server/index.js").AstroComponentFactory, Record<string, string | undefined>>, key: string, value: string, secure?: boolean | undefined) => Effect.Effect<void, import("@withstudiocms/auth-kit/errors").SessionError, never>;
40
40
  readonly createUserSession: (userId: string, context: import("astro").APIContext<Record<string, any>, Record<string, string | undefined>> | import("astro").AstroGlobal<Record<string, any>, import("astro/runtime/server/index.js").AstroComponentFactory, Record<string, string | undefined>>, secure?: boolean | undefined) => Effect.Effect<void, import("@withstudiocms/auth-kit/errors").SessionError, never>;
41
41
  }, import("@withstudiocms/auth-kit/errors").SessionError, never>, User: Effect.Effect<{
42
42
  readonly verifyUsernameInput: (username: string) => Effect.Effect<string | true, import("@withstudiocms/auth-kit/errors").CheckIfUnsafeError | import("@withstudiocms/auth-kit/errors").UserError, never>;
43
- readonly createUserAvatar: (email: string) => Effect.Effect.AsEffect<Effect.Effect<string, import("@withstudiocms/auth-kit/errors").UserError, never>>;
43
+ readonly createUserAvatar: (email: string) => Effect.Effect<string, import("@withstudiocms/auth-kit/errors").UserError, never>;
44
44
  readonly createLocalUser: (name: string, username: string, email: string, password: string) => Effect.Effect<{
45
45
  name: string;
46
46
  username: string;
@@ -84,7 +84,7 @@ export declare const Encryption: Effect.Effect<{
84
84
  notifications: string | null;
85
85
  }, import("@withstudiocms/effect/scrypt").ScryptError | import("@withstudiocms/auth-kit/errors").UserError, never>;
86
86
  readonly getUserPasswordHash: (userId: string) => Effect.Effect<string, import("@withstudiocms/auth-kit/errors").UserError, never>;
87
- readonly getUserFromEmail: (email: string) => Effect.Effect.AsEffect<Effect.Effect<import("@withstudiocms/auth-kit/types").CombinedUserData | null | undefined, import("@withstudiocms/auth-kit/errors").UserError, never>>;
87
+ readonly getUserFromEmail: (email: string) => Effect.Effect<import("@withstudiocms/auth-kit/types").CombinedUserData | null | undefined, import("@withstudiocms/auth-kit/errors").UserError, never>;
88
88
  readonly getUserData: (context: import("astro").APIContext<Record<string, any>, Record<string, string | undefined>> | import("astro").AstroGlobal<Record<string, any>, import("astro/runtime/server/index.js").AstroComponentFactory, Record<string, string | undefined>>) => Effect.Effect<import("@withstudiocms/auth-kit/types").UserSessionData, import("@withstudiocms/auth-kit/errors").SessionError | import("@withstudiocms/auth-kit/errors").UserError, never>;
89
89
  readonly getUserPermissionLevel: (userData: import("@withstudiocms/auth-kit/types").UserSessionData | import("@withstudiocms/auth-kit/types").CombinedUserData | null) => Effect.Effect<import("@withstudiocms/auth-kit/types").UserPermissionLevel, import("@withstudiocms/auth-kit/errors").UserError, never>;
90
90
  readonly isUserAllowed: (userData: import("@withstudiocms/auth-kit/types").UserSessionData | import("@withstudiocms/auth-kit/types").CombinedUserData | null, requiredPerms: "owner" | "admin" | "editor" | "visitor" | "unknown") => Effect.Effect<boolean, import("@withstudiocms/auth-kit/errors").UserError, never>;
@@ -30,7 +30,7 @@ import { languageSelectorOptions } from './config.js';
30
30
  </Dropdown>
31
31
 
32
32
  <script>
33
- import { DropdownHelper } from 'studiocms:ui/components/dropdown';
33
+ import { DropdownHelper } from 'studiocms:ui/components/dropdown/client';
34
34
  import { $localeSettings, defaultLang } from "studiocms:i18n/client";
35
35
 
36
36
  const languageSelector = new DropdownHelper('language-selector');
@@ -79,18 +79,30 @@ const updateSelectElmLabel = (el, translation) => {
79
79
  const updateTrueFalseSelectOptions = (el, t) => {
80
80
  const ul = document.querySelector(`#${el}-dropdown`);
81
81
  if (!ul) return;
82
- const trueOption = ul.querySelector('li[data-value="true"]');
83
- const falseOption = ul.querySelector('li[data-value="false"]');
82
+ const trueOption = ul.querySelector('li[value="true"]');
83
+ const falseOption = ul.querySelector('li[value="false"]');
84
84
  if (trueOption) trueOption.textContent = t.true;
85
85
  if (falseOption) falseOption.textContent = t.false;
86
+ const selected = ul.querySelector("li.selected");
87
+ const currentValueSpan = document.querySelector(`#${el}-value-span`);
88
+ const selectedValue = selected?.getAttribute("value");
89
+ if (currentValueSpan && selectedValue) {
90
+ currentValueSpan.textContent = selectedValue === "true" ? t.true : t.false;
91
+ }
86
92
  };
87
93
  const updateSelectOptions = (el, t) => {
88
94
  const ul = document.querySelector(`#${el}-dropdown`);
89
95
  if (!ul) return;
90
96
  for (const key in t) {
91
- const option = ul.querySelector(`li[data-value="${key}"]`);
97
+ const option = ul.querySelector(`li[value="${key}"]`);
92
98
  if (option) option.textContent = t[key];
93
99
  }
100
+ const selected = ul.querySelector("li.selected");
101
+ const currentValueSpan = document.querySelector(`#${el}-value-span`);
102
+ const selectedValue = selected?.getAttribute("value");
103
+ if (currentValueSpan && selectedValue) {
104
+ currentValueSpan.textContent = t[selectedValue];
105
+ }
94
106
  };
95
107
  function updateTabLabel(id, label) {
96
108
  const tab = document.querySelector(`button[data-tab-child="${id}"]`);
@@ -29,8 +29,4 @@ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29
29
  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30
30
 
31
31
  */
32
- import 'ace-builds/esm-resolver';
33
- import 'ace-builds/src-noconflict/mode-handlebars';
34
- import 'ace-builds/src-noconflict/theme-cloud_editor';
35
- import 'ace-builds/src-noconflict/theme-cloud_editor_dark';
36
- import 'ace-builds/src-noconflict/ext-language_tools';
32
+ export {};
@@ -1,13 +1,14 @@
1
1
  import { $i18n, baseTranslation, updateSelectOptions } from "studiocms:i18n/client";
2
- import { ModalHelper } from "studiocms:ui/components/modal";
3
- import { toast } from "studiocms:ui/components/toaster";
2
+ import { ModalHelper } from "studiocms:ui/components/modal/client";
3
+ import { toast } from "studiocms:ui/components/toaster/client";
4
4
  import * as ace from "ace-builds";
5
- import "ace-builds/esm-resolver";
6
- import "ace-builds/src-noconflict/mode-handlebars";
7
- import "ace-builds/src-noconflict/theme-cloud_editor";
8
- import "ace-builds/src-noconflict/theme-cloud_editor_dark";
9
- import "ace-builds/src-noconflict/ext-language_tools";
5
+ import modeHandlebars from "ace-builds/src-noconflict/mode-handlebars?url";
6
+ import themeLight from "ace-builds/src-noconflict/theme-cloud_editor?url";
7
+ import themeDark from "ace-builds/src-noconflict/theme-cloud_editor_dark?url";
10
8
  const { default: templateEngine } = await import("@withstudiocms/template-lang");
9
+ ace.config.setModuleUrl("ace/mode/handlebars", modeHandlebars);
10
+ ace.config.setModuleUrl("ace/theme/cloud_editor", themeLight);
11
+ ace.config.setModuleUrl("ace/theme/cloud_editor_dark", themeDark);
11
12
  const $ = (selector) => document.querySelector(selector);
12
13
  const $$ = (selector) => document.querySelectorAll(selector);
13
14
  const $$$ = (element, selectors) => element.querySelectorAll(selectors);
@@ -60,11 +61,7 @@ const editor = ace.edit("template-editor", {
60
61
  showPrintMargin: false,
61
62
  wrap: true,
62
63
  useWorker: false,
63
- displayIndentGuides: true,
64
- enableAutoIndent: true,
65
- enableBasicAutocompletion: true,
66
- enableLiveAutocompletion: true,
67
- enableSnippets: true
64
+ displayIndentGuides: true
68
65
  });
69
66
  function updateButtonState(button, isActive) {
70
67
  if (isActive) {
@@ -3,7 +3,7 @@ export { LibSQLClientError } from '@withstudiocms/effect/drizzle';
3
3
  declare const AstroDB_base: Effect.Service.Class<AstroDB, "studiocms/sdk/effect/db/AstroDB", {
4
4
  readonly effect: Effect.Effect<{
5
5
  db: import("@astrojs/db/runtime").Database;
6
- execute: <T>(fn: (client: import("drizzle-orm/libsql").LibSQLDatabase<Record<string, never>> | import("@astrojs/db/runtime").Database) => Promise<T>) => Effect.Effect.AsEffect<Effect.Effect<T, import("@withstudiocms/effect/drizzle").LibSQLClientError, never>>;
6
+ execute: <T>(fn: (client: import("drizzle-orm/libsql").LibSQLDatabase<Record<string, never>> | import("@astrojs/db/runtime").Database) => Promise<T>) => Effect.Effect<T, import("@withstudiocms/effect/drizzle").LibSQLClientError, never>;
7
7
  makeQuery: <A, E, R, Input = never>(queryFn: (execute: import("@withstudiocms/effect/drizzle").ExecuteFn<Record<string, unknown>>, input: Input) => Effect.Effect<A, E, R>) => (...args: [Input] extends [never] ? [] : [input: Input]) => Effect.Effect<A, E, R>;
8
8
  }, never, never>;
9
9
  }>;
@@ -8,7 +8,7 @@ declare const SDKCore_GET_base: Effect.Service.Class<SDKCore_GET, "studiocms/sdk
8
8
  readonly dependencies: readonly [import("effect/Layer").Layer<AstroDB, never, never>, import("effect/Layer").Layer<SDKCore_FolderTree, never, never>, import("effect/Layer").Layer<GetVersionFromNPM, never, never>, import("effect/Layer").Layer<SDKCore_Users, never, never>, import("effect/Layer").Layer<SDKCore_Collectors, never, never>, import("effect/Layer").Layer<SDKCore_CONFIG, never, never>];
9
9
  readonly effect: Effect.Effect<{
10
10
  databaseTable: {
11
- users: () => Effect.Effect.AsEffect<Effect.Effect<{
11
+ users: () => Effect.Effect<{
12
12
  name: string;
13
13
  password: string | null;
14
14
  email: string | null;
@@ -20,22 +20,22 @@ declare const SDKCore_GET_base: Effect.Service.Class<SDKCore_GET, "studiocms/sdk
20
20
  createdAt: Date | null;
21
21
  emailVerified: boolean;
22
22
  notifications: string | null;
23
- }[], import("@withstudiocms/effect/drizzle").LibSQLClientError, never>>;
24
- oAuthAccounts: () => Effect.Effect.AsEffect<Effect.Effect<{
23
+ }[], import("@withstudiocms/effect/drizzle").LibSQLClientError, never>;
24
+ oAuthAccounts: () => Effect.Effect<{
25
25
  provider: string;
26
26
  userId: string;
27
27
  providerUserId: string;
28
- }[], import("@withstudiocms/effect/drizzle").LibSQLClientError, never>>;
29
- sessionTable: () => Effect.Effect.AsEffect<Effect.Effect<{
28
+ }[], import("@withstudiocms/effect/drizzle").LibSQLClientError, never>;
29
+ sessionTable: () => Effect.Effect<{
30
30
  id: string;
31
31
  userId: string;
32
32
  expiresAt: Date;
33
- }[], import("@withstudiocms/effect/drizzle").LibSQLClientError, never>>;
34
- permissions: () => Effect.Effect.AsEffect<Effect.Effect<{
33
+ }[], import("@withstudiocms/effect/drizzle").LibSQLClientError, never>;
34
+ permissions: () => Effect.Effect<{
35
35
  user: string;
36
36
  rank: "unknown" | "owner" | "admin" | "editor" | "visitor";
37
- }[], import("@withstudiocms/effect/drizzle").LibSQLClientError, never>>;
38
- pageData: () => Effect.Effect.AsEffect<Effect.Effect<{
37
+ }[], import("@withstudiocms/effect/drizzle").LibSQLClientError, never>;
38
+ pageData: () => Effect.Effect<{
39
39
  title: string;
40
40
  description: string;
41
41
  slug: string;
@@ -55,29 +55,29 @@ declare const SDKCore_GET_base: Effect.Service.Class<SDKCore_GET, "studiocms/sdk
55
55
  showContributors: boolean | null;
56
56
  parentFolder: string | null;
57
57
  draft: boolean | null;
58
- }[], import("@withstudiocms/effect/drizzle").LibSQLClientError, never>>;
59
- pageDataTags: () => Effect.Effect.AsEffect<Effect.Effect<{
58
+ }[], import("@withstudiocms/effect/drizzle").LibSQLClientError, never>;
59
+ pageDataTags: () => Effect.Effect<{
60
60
  name: string;
61
61
  description: string;
62
62
  slug: string;
63
63
  id: number;
64
64
  meta: unknown;
65
- }[], import("@withstudiocms/effect/drizzle").LibSQLClientError, never>>;
66
- pageDataCategories: () => Effect.Effect.AsEffect<Effect.Effect<{
65
+ }[], import("@withstudiocms/effect/drizzle").LibSQLClientError, never>;
66
+ pageDataCategories: () => Effect.Effect<{
67
67
  name: string;
68
68
  description: string;
69
69
  slug: string;
70
70
  id: number;
71
71
  parent: number | null;
72
72
  meta: unknown;
73
- }[], import("@withstudiocms/effect/drizzle").LibSQLClientError, never>>;
74
- pageContent: () => Effect.Effect.AsEffect<Effect.Effect<{
73
+ }[], import("@withstudiocms/effect/drizzle").LibSQLClientError, never>;
74
+ pageContent: () => Effect.Effect<{
75
75
  id: string;
76
76
  contentLang: string;
77
77
  contentId: string;
78
78
  content: string | null;
79
- }[], import("@withstudiocms/effect/drizzle").LibSQLClientError, never>>;
80
- diffTracking: () => Effect.Effect.AsEffect<Effect.Effect<{
79
+ }[], import("@withstudiocms/effect/drizzle").LibSQLClientError, never>;
80
+ diffTracking: () => Effect.Effect<{
81
81
  id: string;
82
82
  userId: string;
83
83
  pageId: string;
@@ -85,25 +85,25 @@ declare const SDKCore_GET_base: Effect.Service.Class<SDKCore_GET, "studiocms/sdk
85
85
  pageMetaData: unknown;
86
86
  pageContentStart: string;
87
87
  diff: string | null;
88
- }[], import("@withstudiocms/effect/drizzle").LibSQLClientError, never>>;
89
- pageFolderStructure: () => Effect.Effect.AsEffect<Effect.Effect<{
88
+ }[], import("@withstudiocms/effect/drizzle").LibSQLClientError, never>;
89
+ pageFolderStructure: () => Effect.Effect<{
90
90
  name: string;
91
91
  id: string;
92
92
  parent: string | null;
93
- }[], import("@withstudiocms/effect/drizzle").LibSQLClientError, never>>;
94
- notificationSettings: () => Effect.Effect.AsEffect<Effect.Effect<{
93
+ }[], import("@withstudiocms/effect/drizzle").LibSQLClientError, never>;
94
+ notificationSettings: () => Effect.Effect<{
95
95
  id: string;
96
96
  emailVerification: boolean;
97
97
  requireAdminVerification: boolean;
98
98
  requireEditorVerification: boolean;
99
99
  oAuthBypassVerification: boolean;
100
- } | undefined, import("@withstudiocms/effect/drizzle").LibSQLClientError, never>>;
101
- emailVerificationTokens: () => Effect.Effect.AsEffect<Effect.Effect<{
100
+ } | undefined, import("@withstudiocms/effect/drizzle").LibSQLClientError, never>;
101
+ emailVerificationTokens: () => Effect.Effect<{
102
102
  id: string;
103
103
  userId: string;
104
104
  token: string;
105
105
  expiresAt: Date;
106
- }[], import("@withstudiocms/effect/drizzle").LibSQLClientError, never>>;
106
+ }[], import("@withstudiocms/effect/drizzle").LibSQLClientError, never>;
107
107
  };
108
108
  permissionsLists: {
109
109
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "studiocms",
3
- "version": "0.1.0-beta.28",
3
+ "version": "0.1.0-beta.30",
4
4
  "description": "Astro Native CMS for AstroDB. Built from the ground up by the Astro community.",
5
5
  "author": {
6
6
  "name": "withstudiocms",
@@ -145,12 +145,12 @@
145
145
  "type": "module",
146
146
  "dependencies": {
147
147
  "@iconify-json/flat-color-icons": "^1.2.3",
148
- "@iconify-json/simple-icons": "^1.2.55",
148
+ "@iconify-json/simple-icons": "^1.2.57",
149
149
  "@iconify-json/circle-flags": "^1.2.10",
150
150
  "@inox-tools/runtime-logger": "^0.7.0",
151
151
  "@nanostores/i18n": "^1.2.2",
152
152
  "@nanostores/persistent": "^1.2.0",
153
- "@studiocms/ui": "^1.0.0-beta.3",
153
+ "@studiocms/ui": "^1.0.0-beta.4",
154
154
  "@withstudiocms/cli-kit": "^0.1.0",
155
155
  "ace-builds": "^1.43.4",
156
156
  "astro-integration-kit": "^0.19.1",
@@ -164,7 +164,7 @@
164
164
  "jose": "^6.1.0",
165
165
  "micromark": "^4.0.2",
166
166
  "micromark-extension-gfm": "^3.0.0",
167
- "magicast": "^0.3.5",
167
+ "magicast": "^0.5.1",
168
168
  "mdast-util-to-markdown": "^2.1.2",
169
169
  "mrmime": "^2.0.1",
170
170
  "nanostores": "^1.0.1",
@@ -174,10 +174,10 @@
174
174
  "tinyglobby": "^0.2.15",
175
175
  "ultrahtml": "^1.6.0",
176
176
  "@withstudiocms/internal_helpers": "0.1.0-beta.3",
177
- "@withstudiocms/auth-kit": "0.1.0-beta.3",
178
- "@withstudiocms/component-registry": "0.1.0-beta.4",
177
+ "@withstudiocms/auth-kit": "0.1.0-beta.5",
178
+ "@withstudiocms/component-registry": "0.1.0-beta.6",
179
179
  "@withstudiocms/config-utils": "0.1.0-beta.4",
180
- "@withstudiocms/effect": "0.1.0-beta.4",
180
+ "@withstudiocms/effect": "0.1.0-beta.6",
181
181
  "@withstudiocms/template-lang": "0.1.0-beta.1"
182
182
  },
183
183
  "devDependencies": {
@@ -193,7 +193,7 @@
193
193
  "@studiocms/web-vitals": "^4.5.3",
194
194
  "astro": "^5.12.9",
195
195
  "drizzle-orm": "^0.42.0",
196
- "effect": "^3.18.4",
196
+ "effect": "^3.19.2",
197
197
  "vite": "^6.3.4"
198
198
  },
199
199
  "peerDependenciesMeta": {
@@ -20,7 +20,7 @@ const { currentUser } = Astro.props as Props;
20
20
  </SuiDoubleSidebar>
21
21
 
22
22
  <script>
23
- import { DoubleSidebarHelper } from "studiocms:ui/components/sidebar";
23
+ import { DoubleSidebarHelper } from "studiocms:ui/components/sidebar/client";
24
24
 
25
25
  if (document.getElementById('sui-sidebars')) {
26
26
  const sidebar = new DoubleSidebarHelper();
@@ -247,7 +247,7 @@ const filteredPluginList = pluginList.filter((plugin) => !!plugin.settingsPage);
247
247
  </script>
248
248
 
249
249
  <script>
250
- import { DropdownHelper } from "studiocms:ui/components/dropdown";
250
+ import { DropdownHelper } from "studiocms:ui/components/dropdown/client";
251
251
  import { ThemeHelper } from '@studiocms/ui/utils/ThemeHelper.js';
252
252
 
253
253
  function sendPostRequest(url: string) {
@@ -14,7 +14,7 @@ const { currentUser } = Astro.props as Props;
14
14
  </Sidebar>
15
15
 
16
16
  <script>
17
- import { SingleSidebarHelper } from "studiocms:ui/components/sidebar";
17
+ import { SingleSidebarHelper } from "studiocms:ui/components/sidebar/client";
18
18
 
19
19
  function setupSidebar() {
20
20
  if (!document.getElementById('sui-sidebar')) return;
@@ -191,7 +191,7 @@ updateTrueFalseSelectOptions,
191
191
  </script>
192
192
 
193
193
  <script>
194
- import { toast } from "studiocms:ui/components/toaster";
194
+ import { toast } from "studiocms:ui/components/toaster/client";
195
195
  const configForm = document.querySelector('#site-config-form') as HTMLFormElement;
196
196
 
197
197
  configForm.addEventListener('submit', async (e) => {
@@ -43,7 +43,7 @@ const t = useTranslations(lang, '@studiocms/dashboard:content-folder');
43
43
  </script>
44
44
 
45
45
  <script>
46
- import { toast } from "studiocms:ui/components/toaster";
46
+ import { toast } from "studiocms:ui/components/toaster/client";
47
47
 
48
48
  const form = document.getElementById('create-folder-form') as HTMLFormElement;
49
49
  const createContainer = document.getElementById('create-folder-container') as HTMLDivElement;
@@ -309,7 +309,7 @@ const t = useTranslations(lang, '@studiocms/dashboard:content-page');
309
309
 
310
310
  <script>
311
311
  import type { tsPageDataInsert } from "studiocms:sdk/types";
312
- import { toast } from "studiocms:ui/components/toaster";
312
+ import { toast } from "studiocms:ui/components/toaster/client";
313
313
  import {
314
314
  formDataToRecord,
315
315
  studioCMSCreatePageDataSchema,
@@ -65,7 +65,7 @@ const t = useTranslations(lang, '@studiocms/dashboard:content-folder');
65
65
  </script>
66
66
 
67
67
  <script>
68
- import { toast } from "studiocms:ui/components/toaster";
68
+ import { toast } from "studiocms:ui/components/toaster/client";
69
69
 
70
70
  const form = document.getElementById('edit-folder-form') as HTMLFormElement;
71
71
  const createContainer = document.getElementById('edit-folder-container') as HTMLDivElement;
@@ -457,7 +457,7 @@ const t = useTranslations(lang, '@studiocms/dashboard:content-page');
457
457
 
458
458
  <script>
459
459
  import type { tsPageDataInsert } from "studiocms:sdk/types";
460
- import { toast } from "studiocms:ui/components/toaster";
460
+ import { toast } from "studiocms:ui/components/toaster/client";
461
461
  import {
462
462
  formDataToRecord,
463
463
  studioCMSEditPageDataAndContentSchema,
@@ -143,7 +143,7 @@ const t = useTranslations(lang, '@studiocms/dashboard:content-sidebar');
143
143
  </script>
144
144
 
145
145
  <script>
146
- import { DropdownHelper } from 'studiocms:ui/components/dropdown';
146
+ import { DropdownHelper } from 'studiocms:ui/components/dropdown/client';
147
147
 
148
148
  const createNewDropdown = new DropdownHelper('create-new-dropdown');
149
149
 
@@ -242,8 +242,8 @@ const currentMode = editPage
242
242
  </script>
243
243
 
244
244
  <script>
245
- import { ModalHelper } from 'studiocms:ui/components/modal';
246
- import { toast } from "studiocms:ui/components/toaster";
245
+ import { ModalHelper } from 'studiocms:ui/components/modal/client';
246
+ import { toast } from "studiocms:ui/components/toaster/client";
247
247
 
248
248
  const mode = (document.getElementById('current-mode-selector') as HTMLDivElement).dataset.mode;
249
249
 
@@ -142,8 +142,8 @@ const t = useTranslations(lang, '@studiocms/dashboard:profile');
142
142
  </script>
143
143
 
144
144
  <script>
145
- import { ModalHelper } from 'studiocms:ui/components/modal';
146
- import { toast } from 'studiocms:ui/components/toaster';
145
+ import { ModalHelper } from 'studiocms:ui/components/modal/client';
146
+ import { toast } from 'studiocms:ui/components/toaster/client';
147
147
 
148
148
  const createAPITokenModal = new ModalHelper('create-api-token-modal', 'create-api-token');
149
149
  const createTokenResponseModal = new ModalHelper('create-token-response-modal');
@@ -84,7 +84,7 @@ const t = useTranslations(lang, '@studiocms/dashboard:profile');
84
84
 
85
85
 
86
86
  <script>
87
- import { toast } from "studiocms:ui/components/toaster";
87
+ import { toast } from "studiocms:ui/components/toaster/client";
88
88
 
89
89
  const syncAvatar = document.getElementById('refresh-avatar') as HTMLButtonElement;
90
90
  const syncUrl = syncAvatar.dataset.url as string;
@@ -160,7 +160,7 @@ type TKey = Parameters<typeof t>[0];
160
160
  </script>
161
161
 
162
162
  <script>
163
- import { toast } from 'studiocms:ui/components/toaster';
163
+ import { toast } from 'studiocms:ui/components/toaster/client';
164
164
  import { getEnabledNotificationCheckboxes, formatNotificationOptions } from 'studiocms:notifier/client'
165
165
 
166
166
  const form = document.getElementById('notifications-form') as HTMLFormElement;
@@ -102,7 +102,7 @@ const t = useTranslations(lang, '@studiocms/dashboard:profile');
102
102
  </script>
103
103
 
104
104
  <script>
105
- import { toast } from "studiocms:ui/components/toaster";
105
+ import { toast } from "studiocms:ui/components/toaster/client";
106
106
  const passwordUpdateForm = document.getElementById('password-update-form') as HTMLFormElement;
107
107
 
108
108
  passwordUpdateForm.addEventListener('submit', async (e) => {
@@ -33,7 +33,7 @@ const status: false | 'outdated' | 'latest' | 'future' = (() => {
33
33
  </Button>
34
34
 
35
35
  <script>
36
- import { ModalHelper } from "studiocms:ui/components/modal";
36
+ import { ModalHelper } from "studiocms:ui/components/modal/client";
37
37
  import { dateTimeListener } from "../../../scripts/dateTimeListener.js";
38
38
  import { dateWithTimeAndZone } from "../../../scripts/dateWithTimeAndZone.js";
39
39
  import { timeAgo } from "../../../scripts/timeAgo.js";
@@ -142,9 +142,9 @@ const t = useTranslations(lang, '@studiocms/dashboard:user-mngmt-sidebar');
142
142
  </script>
143
143
 
144
144
  <script>
145
- import { DropdownHelper } from 'studiocms:ui/components/dropdown';
146
- import { ModalHelper } from 'studiocms:ui/components/modal';
147
- import { toast } from 'studiocms:ui/components/toaster';
145
+ import { DropdownHelper } from 'studiocms:ui/components/dropdown/client';
146
+ import { ModalHelper } from 'studiocms:ui/components/modal/client';
147
+ import { toast } from 'studiocms:ui/components/toaster/client';
148
148
 
149
149
  const createNewDropdown = new DropdownHelper('create-user-dropdown');
150
150
  const createNewUserModal = new ModalHelper('create-new-user-modal');
@@ -181,7 +181,7 @@ const { data: page } = possiblePage;
181
181
  </Layout>
182
182
 
183
183
  <script>
184
- import { toast } from "studiocms:ui/components/toaster";
184
+ import { toast } from "studiocms:ui/components/toaster/client";
185
185
 
186
186
  const revertMetaData = document.getElementById(
187
187
  "revert-metadata",
@@ -217,8 +217,8 @@ if (usernameAndPassword && SHOW_OAUTH) {
217
217
 
218
218
  <script>
219
219
  import { formListener } from '../../scripts/auth/formListener.js';
220
- import { ModalHelper } from 'studiocms:ui/components/modal';
221
- import { toast } from 'studiocms:ui/components/toaster';
220
+ import { ModalHelper } from 'studiocms:ui/components/modal/client';
221
+ import { toast } from 'studiocms:ui/components/toaster/client';
222
222
 
223
223
  const loginForm = document.getElementById('login-form') as HTMLFormElement | null;
224
224
  if (loginForm) {
@@ -155,7 +155,7 @@ if (!lookupToken) {
155
155
  </script>
156
156
 
157
157
  <script>
158
- import { toast } from "studiocms:ui/components/toaster";
158
+ import { toast } from "studiocms:ui/components/toaster/client";
159
159
 
160
160
  const resetForm = document.getElementById(
161
161
  "reset-password-form",
@@ -392,7 +392,7 @@ const notificationSettingKeys = Object.keys(notificationSettings.data).filter(
392
392
  </Layout>
393
393
 
394
394
  <script>
395
- import { toast } from "studiocms:ui/components/toaster";
395
+ import { toast } from "studiocms:ui/components/toaster/client";
396
396
 
397
397
  const smtpConfigForm = document.getElementById(
398
398
  "smtp-config-form",
@@ -50,7 +50,7 @@ if (!userId) {
50
50
  </Layout>
51
51
 
52
52
  <script>
53
- import { toast } from 'studiocms:ui/components/toaster';
53
+ import { toast } from 'studiocms:ui/components/toaster/client';
54
54
 
55
55
  document.getElementById('back-button')!.addEventListener('click', () => {
56
56
  window.location.href = '/';
@@ -323,8 +323,8 @@ if (isAdmin) allowedRanks.unshift({ label: 'Administrator', value: 'admin' });
323
323
  </script>
324
324
 
325
325
  <script>
326
- import { toast } from 'studiocms:ui/components/toaster';
327
- import { ModalHelper } from 'studiocms:ui/components/modal';
326
+ import { toast } from 'studiocms:ui/components/toaster/client';
327
+ import { ModalHelper } from 'studiocms:ui/components/modal/client';
328
328
 
329
329
  const resetLinkModal = new ModalHelper('password-reset-link-modal');
330
330
 
@@ -2,7 +2,7 @@
2
2
  * This tool is used by Auth Login pages
3
3
  */
4
4
 
5
- import { toast as uiToast } from 'studiocms:ui/components/toaster';
5
+ import { toast as uiToast } from 'studiocms:ui/components/toaster/client';
6
6
  import type { ToastProps } from '@studiocms/ui/types';
7
7
 
8
8
  /**
@@ -69,7 +69,7 @@ const ogSelectOptions = validImages.map(({ label, name: value }) => ({ label, va
69
69
  </Card>
70
70
 
71
71
  <script>
72
- import { toast } from 'studiocms:ui/components/toaster';
72
+ import { toast } from 'studiocms:ui/components/toaster/client';
73
73
 
74
74
  const form = document.querySelector('#setup-step-one') as HTMLFormElement;
75
75
 
@@ -130,7 +130,7 @@ const Providers = providerData
130
130
  </Card>
131
131
 
132
132
  <script>
133
- import { toast } from 'studiocms:ui/components/toaster';
133
+ import { toast } from 'studiocms:ui/components/toaster/client';
134
134
 
135
135
  const form = document.querySelector('#setup-step-two') as HTMLFormElement;
136
136
 
@@ -30,7 +30,7 @@ import { languageSelectorOptions } from './config.js';
30
30
  </Dropdown>
31
31
 
32
32
  <script>
33
- import { DropdownHelper } from 'studiocms:ui/components/dropdown';
33
+ import { DropdownHelper } from 'studiocms:ui/components/dropdown/client';
34
34
  import { $localeSettings, defaultLang } from "studiocms:i18n/client";
35
35
 
36
36
  const languageSelector = new DropdownHelper('language-selector');
@@ -199,19 +199,39 @@ export const updateSelectElmLabel = (el: string, translation: string) => {
199
199
  export const updateTrueFalseSelectOptions = (el: string, t: { true: string; false: string }) => {
200
200
  const ul = document.querySelector<HTMLUListElement>(`#${el}-dropdown`);
201
201
  if (!ul) return;
202
- const trueOption = ul.querySelector<HTMLLIElement>('li[data-value="true"]');
203
- const falseOption = ul.querySelector<HTMLLIElement>('li[data-value="false"]');
202
+ const trueOption = ul.querySelector<HTMLLIElement>('li[value="true"]');
203
+ const falseOption = ul.querySelector<HTMLLIElement>('li[value="false"]');
204
204
  if (trueOption) trueOption.textContent = t.true;
205
205
  if (falseOption) falseOption.textContent = t.false;
206
+
207
+ // get currently selected option
208
+ const selected = ul.querySelector<HTMLLIElement>('li.selected');
209
+ const currentValueSpan = document.querySelector<HTMLSpanElement>(`#${el}-value-span`);
210
+
211
+ const selectedValue = selected?.getAttribute('value');
212
+
213
+ if (currentValueSpan && selectedValue) {
214
+ currentValueSpan.textContent = selectedValue === 'true' ? t.true : t.false;
215
+ }
206
216
  };
207
217
 
208
218
  export const updateSelectOptions = (el: string, t: { [key: string]: string }) => {
209
219
  const ul = document.querySelector<HTMLUListElement>(`#${el}-dropdown`);
210
220
  if (!ul) return;
211
221
  for (const key in t) {
212
- const option = ul.querySelector<HTMLLIElement>(`li[data-value="${key}"]`);
222
+ const option = ul.querySelector<HTMLLIElement>(`li[value="${key}"]`);
213
223
  if (option) option.textContent = t[key];
214
224
  }
225
+
226
+ // get currently selected option
227
+ const selected = ul.querySelector<HTMLLIElement>('li.selected');
228
+ const currentValueSpan = document.querySelector<HTMLSpanElement>(`#${el}-value-span`);
229
+
230
+ const selectedValue = selected?.getAttribute('value');
231
+
232
+ if (currentValueSpan && selectedValue) {
233
+ currentValueSpan.textContent = t[selectedValue];
234
+ }
215
235
  };
216
236
 
217
237
  export function updateTabLabel(id: string, label: string) {
@@ -31,17 +31,19 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31
31
  */
32
32
 
33
33
  import { $i18n, baseTranslation, updateSelectOptions } from 'studiocms:i18n/client';
34
- import { ModalHelper } from 'studiocms:ui/components/modal';
35
- import { toast } from 'studiocms:ui/components/toaster';
34
+ import { ModalHelper } from 'studiocms:ui/components/modal/client';
35
+ import { toast } from 'studiocms:ui/components/toaster/client';
36
36
  import * as ace from 'ace-builds';
37
- import 'ace-builds/esm-resolver';
38
- import 'ace-builds/src-noconflict/mode-handlebars';
39
- import 'ace-builds/src-noconflict/theme-cloud_editor';
40
- import 'ace-builds/src-noconflict/theme-cloud_editor_dark';
41
- import 'ace-builds/src-noconflict/ext-language_tools';
37
+ import modeHandlebars from 'ace-builds/src-noconflict/mode-handlebars?url';
38
+ import themeLight from 'ace-builds/src-noconflict/theme-cloud_editor?url';
39
+ import themeDark from 'ace-builds/src-noconflict/theme-cloud_editor_dark?url';
42
40
 
43
41
  const { default: templateEngine } = await import('@withstudiocms/template-lang');
44
42
 
43
+ ace.config.setModuleUrl('ace/mode/handlebars', modeHandlebars);
44
+ ace.config.setModuleUrl('ace/theme/cloud_editor', themeLight);
45
+ ace.config.setModuleUrl('ace/theme/cloud_editor_dark', themeDark);
46
+
45
47
  // --- TYPE DEFINITIONS ---
46
48
  type EngineContext = {
47
49
  site: {
@@ -120,10 +122,6 @@ const editor = ace.edit('template-editor', {
120
122
  wrap: true,
121
123
  useWorker: false,
122
124
  displayIndentGuides: true,
123
- enableAutoIndent: true,
124
- enableBasicAutocompletion: true,
125
- enableLiveAutocompletion: true,
126
- enableSnippets: true,
127
125
  });
128
126
 
129
127
  // --- FUNCTION UTILITIES ---