@questpie/admin 3.0.4 → 3.0.6

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 (90) hide show
  1. package/README.md +99 -1
  2. package/dist/client/builder/types/field-types.d.mts +11 -0
  3. package/dist/client/components/blocks/block-editor-layout.mjs +2 -2
  4. package/dist/client/components/blocks/block-library-sidebar.mjs +89 -61
  5. package/dist/client/components/brand-logo.d.mts +25 -0
  6. package/dist/client/components/brand-logo.mjs +174 -0
  7. package/dist/client/components/media/media-grid.mjs +95 -78
  8. package/dist/client/components/primitives/select-multi.mjs +388 -368
  9. package/dist/client/components/primitives/select-single.mjs +344 -331
  10. package/dist/client/components/widgets/chart-widget.mjs +78 -62
  11. package/dist/client/components/widgets/progress-widget.mjs +39 -37
  12. package/dist/client/components/widgets/quick-actions-widget.mjs +111 -90
  13. package/dist/client/components/widgets/recent-items-widget.mjs +40 -38
  14. package/dist/client/components/widgets/table-widget.mjs +4 -3
  15. package/dist/client/components/widgets/timeline-widget.mjs +92 -74
  16. package/dist/client/components/widgets/value-widget.mjs +164 -144
  17. package/dist/client/create-admin-client.d.mts +7 -0
  18. package/dist/client/create-admin-client.mjs +25 -0
  19. package/dist/client/hooks/use-brand.d.mts +22 -0
  20. package/dist/client/hooks/use-brand.mjs +52 -0
  21. package/dist/client/hooks/use-server-actions.mjs +21 -16
  22. package/dist/client/preview/block-scope-context.d.mts +2 -2
  23. package/dist/client/preview/preview-banner.d.mts +2 -2
  24. package/dist/client/preview/preview-banner.mjs +75 -46
  25. package/dist/client/runtime/index.mjs +1 -1
  26. package/dist/client/runtime/provider.d.mts +4 -0
  27. package/dist/client/runtime/provider.mjs +38 -8
  28. package/dist/client/styles/base.css +4 -0
  29. package/dist/client/types/admin-config.d.mts +24 -0
  30. package/dist/client/views/auth/auth-layout.d.mts +6 -1
  31. package/dist/client/views/auth/auth-layout.mjs +116 -102
  32. package/dist/client/views/collection/auto-form-fields.mjs +2 -0
  33. package/dist/client/views/collection/field-renderer.mjs +3 -2
  34. package/dist/client/views/collection/table-view.mjs +26 -26
  35. package/dist/client/views/globals/global-form-view.mjs +908 -863
  36. package/dist/client/views/layout/admin-layout.mjs +151 -131
  37. package/dist/client/views/layout/admin-router.mjs +297 -180
  38. package/dist/client/views/layout/admin-sidebar.mjs +178 -156
  39. package/dist/client/views/pages/accept-invite-page.mjs +122 -144
  40. package/dist/client/views/pages/forgot-password-page.mjs +22 -30
  41. package/dist/client/views/pages/invite-page.mjs +24 -33
  42. package/dist/client/views/pages/login-page.mjs +24 -32
  43. package/dist/client/views/pages/reset-password-page.mjs +77 -92
  44. package/dist/client/views/pages/setup-page.mjs +73 -65
  45. package/dist/client.d.mts +6 -2
  46. package/dist/client.mjs +5 -2
  47. package/dist/index.d.mts +6 -2
  48. package/dist/index.mjs +5 -2
  49. package/dist/server/augmentation/dashboard.d.mts +23 -5
  50. package/dist/server/augmentation/form-layout.d.mts +10 -0
  51. package/dist/server/augmentation/index.d.mts +1 -1
  52. package/dist/server/augmentation.d.mts +1 -1
  53. package/dist/server/i18n/index.mjs +13 -7
  54. package/dist/server/i18n/messages/cs.mjs +391 -1
  55. package/dist/server/i18n/messages/de.mjs +389 -1
  56. package/dist/server/i18n/messages/en.mjs +102 -0
  57. package/dist/server/i18n/messages/es.mjs +389 -1
  58. package/dist/server/i18n/messages/fr.mjs +389 -1
  59. package/dist/server/i18n/messages/pl.mjs +393 -1
  60. package/dist/server/i18n/messages/pt.mjs +386 -1
  61. package/dist/server/i18n/messages/sk.mjs +133 -1
  62. package/dist/server/modules/admin/collections/account.d.mts +50 -50
  63. package/dist/server/modules/admin/collections/admin-locks.d.mts +53 -53
  64. package/dist/server/modules/admin/collections/admin-preferences.d.mts +39 -39
  65. package/dist/server/modules/admin/collections/admin-saved-views.d.mts +47 -47
  66. package/dist/server/modules/admin/collections/apikey.d.mts +68 -68
  67. package/dist/server/modules/admin/collections/assets.d.mts +20 -20
  68. package/dist/server/modules/admin/collections/session.d.mts +42 -42
  69. package/dist/server/modules/admin/collections/user.d.mts +32 -32
  70. package/dist/server/modules/admin/collections/verification.d.mts +36 -36
  71. package/dist/server/modules/admin/dto/admin-config.dto.mjs +19 -1
  72. package/dist/server/modules/admin/routes/admin-config.d.mts +2 -2
  73. package/dist/server/modules/admin/routes/execute-action.d.mts +9 -9
  74. package/dist/server/modules/admin/routes/execute-action.mjs +34 -28
  75. package/dist/server/modules/admin/routes/i18n-helpers.mjs +34 -0
  76. package/dist/server/modules/admin/routes/locales.d.mts +2 -2
  77. package/dist/server/modules/admin/routes/preview.d.mts +11 -11
  78. package/dist/server/modules/admin/routes/preview.mjs +25 -17
  79. package/dist/server/modules/admin/routes/reactive.d.mts +9 -9
  80. package/dist/server/modules/admin/routes/route-helpers.mjs +1 -1
  81. package/dist/server/modules/admin/routes/setup.mjs +10 -7
  82. package/dist/server/modules/admin/routes/translations.d.mts +4 -4
  83. package/dist/server/modules/admin/routes/widget-data.d.mts +5 -5
  84. package/dist/server/modules/admin-preferences/collections/saved-views.d.mts +23 -23
  85. package/dist/server.d.mts +4 -4
  86. package/dist/shared/preview-utils.d.mts +34 -1
  87. package/dist/shared/preview-utils.mjs +79 -1
  88. package/dist/shared.d.mts +2 -2
  89. package/dist/shared.mjs +2 -2
  90. package/package.json +3 -3
package/README.md CHANGED
@@ -46,7 +46,13 @@ Branding name, sidebar, dashboard, and admin locale are configured via `config/a
46
46
  import { adminConfig } from "#questpie/factories";
47
47
 
48
48
  export default adminConfig({
49
- branding: { name: "My Admin" },
49
+ branding: {
50
+ name: "My Admin",
51
+ // Optional — see "Whitelabeling" below
52
+ logo: "/brand/logo.svg",
53
+ tagline: "Powered by My Co.",
54
+ favicon: "/brand/favicon.ico",
55
+ },
50
56
  sidebar: {
51
57
  sections: [
52
58
  {
@@ -266,6 +272,98 @@ Import the admin base stylesheet and scan the admin package:
266
272
 
267
273
  `index.css` is an alias for `base.css`; import `base.css` directly when you want explicit control.
268
274
 
275
+ ## Whitelabeling
276
+
277
+ There are two layers, deliberately separated:
278
+
279
+ | Layer | Configured in | Covers |
280
+ | ------------ | ----------------------------------------------- | -------------------------------------------- |
281
+ | **Content** | `config/admin.ts` → `branding` | Name, logo, tagline, favicon |
282
+ | **Theme** | Your app's `admin.css` | Colors, fonts, radii, shadows, motion |
283
+ | **Chrome** | Files in `questpie/admin/components/` (see below) | Sidebar brand, nav item, auth layout |
284
+
285
+ ### Branding (config-driven)
286
+
287
+ ```ts
288
+ // config/admin.ts
289
+ export default adminConfig({
290
+ branding: {
291
+ name: "Acme Studio",
292
+ // String, or { src, srcDark } for separate light/dark images,
293
+ // or a server ComponentReference for an inline SVG.
294
+ logo: { src: "/brand/logo-light.svg", srcDark: "/brand/logo-dark.svg" },
295
+ // Replaces the "Built with QUESTPIE" footer on auth pages.
296
+ // Omit to render no footer text at all.
297
+ tagline: "Studio admin",
298
+ favicon: "/brand/favicon.ico",
299
+ },
300
+ });
301
+ ```
302
+
303
+ The logo also accepts an `I18nText` for `name`/`tagline` (`{ en: "...", sk: "..." }`)
304
+ and the same locale-map / translation-key shape used elsewhere in the admin.
305
+
306
+ ### Theming (CSS override)
307
+
308
+ The admin exposes every visual token as a CSS custom property in `base.css`. To
309
+ rebrand colors, fonts, or shape, override them in your app's `admin.css`
310
+ **after** the base import — source order ensures your overrides win:
311
+
312
+ ```css
313
+ /* admin.css */
314
+ @import "tailwindcss";
315
+ @import "@questpie/admin/client/styles/base.css";
316
+
317
+ /* Optional: load a brand font */
318
+ @import url("https://fonts.googleapis.com/css2?family=Caveat+Brush&display=swap");
319
+
320
+ :root,
321
+ .light {
322
+ --primary: oklch(0.65 0.2 25);
323
+ --ring: oklch(0.65 0.2 25);
324
+ --font-heading: "Caveat Brush", system-ui, sans-serif;
325
+ --surface-radius: 0.5rem;
326
+ }
327
+
328
+ .dark {
329
+ --primary: oklch(0.78 0.18 25); /* lifted L for dark surfaces */
330
+ --ring: oklch(0.78 0.18 25);
331
+ }
332
+ ```
333
+
334
+ `OKLCH` is recommended because the admin's derived hover/focus states use
335
+ `color-mix(in oklch, …)` — values stay perceptually consistent. HEX and `rgb()`
336
+ work too; `hsl()` is discouraged (no P3 gamut). See the full token list in
337
+ `@questpie/admin/client/styles/base.css`; common knobs:
338
+
339
+ - Colors: `--primary`, `--background`, `--foreground`, `--surface`, `--border`,
340
+ `--ring`, `--accent`, `--destructive`, `--success`, …
341
+ - Sidebar: `--sidebar`, `--sidebar-accent`, `--sidebar-active-background`, …
342
+ - Typography: `--font-sans`, `--font-mono`, `--font-chrome`, `--font-heading`
343
+ - Shape: `--control-radius`, `--surface-radius`, `--floating-radius`
344
+
345
+ ### Zero-FOUC favicon (optional, TanStack Start)
346
+
347
+ By default the favicon is applied client-side after the admin config loads.
348
+ For SSR-clean favicons, fetch your config in the route loader and add a link
349
+ yourself:
350
+
351
+ ```tsx
352
+ // routes/admin.tsx
353
+ export const Route = createFileRoute("/admin")({
354
+ loader: async ({ context }) => ({ config: await context.client.routes.getAdminConfig() }),
355
+ head: ({ loaderData }) => ({
356
+ links: [
357
+ { rel: "stylesheet", href: adminCss },
358
+ ...(loaderData?.config?.branding?.favicon
359
+ ? [{ rel: "icon", href: loaderData.config.branding.favicon }]
360
+ : []),
361
+ ],
362
+ }),
363
+ component: AdminLayout,
364
+ });
365
+ ```
366
+
269
367
  ## Chrome Overrides (File-First)
270
368
 
271
369
  Place component files in `questpie/admin/components/` to override specific UI chrome without changing your app shell:
@@ -506,6 +506,17 @@ interface FieldReactiveConfig<TData = any> {
506
506
  interface FieldLayoutItemWithReactive<TData = any> extends FieldReactiveConfig<TData> {
507
507
  field: string;
508
508
  className?: string;
509
+ /**
510
+ * Extra props forwarded to the field component. Use for component-specific
511
+ * configuration that doesn't have a dedicated layout key (e.g. relation
512
+ * field's `filter`, custom render functions).
513
+ *
514
+ * @example
515
+ * ```ts
516
+ * { field: f.counselorId, props: { filter: () => ({ role: "admin" }) } }
517
+ * ```
518
+ */
519
+ props?: Record<string, any>;
509
520
  }
510
521
  /**
511
522
  * Field layout item - can be a simple field name, field with config, section, or tabs
@@ -138,7 +138,7 @@ function BlockEditorLayout(t0) {
138
138
  }),
139
139
  /* @__PURE__ */ jsx("p", {
140
140
  className: "text-sm font-medium",
141
- children: "No blocks yet"
141
+ children: t("blocks.emptyTitle")
142
142
  }),
143
143
  /* @__PURE__ */ jsx("p", {
144
144
  className: "text-muted-foreground mt-1 text-xs",
@@ -153,7 +153,7 @@ function BlockEditorLayout(t0) {
153
153
  children: [/* @__PURE__ */ jsx(Icon, {
154
154
  icon: "ph:plus",
155
155
  className: "mr-2 h-4 w-4"
156
- }), "Add block"]
156
+ }), t("blocks.add")]
157
157
  })]
158
158
  });
159
159
  $[19] = handleOpenSidebar;
@@ -19,7 +19,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
19
19
  * Uses shadcn Sheet component for mobile-friendly sidebar.
20
20
  */
21
21
  function BlockLibrarySidebar(t0) {
22
- const $ = c(32);
22
+ const $ = c(44);
23
23
  const { open, onClose } = t0;
24
24
  const { t } = useTranslation();
25
25
  const actions = useBlockEditorActions();
@@ -113,54 +113,80 @@ function BlockLibrarySidebar(t0) {
113
113
  $[12] = t4;
114
114
  } else t4 = $[12];
115
115
  let t5;
116
- if ($[13] === Symbol.for("react.memo_cache_sentinel")) {
117
- t5 = /* @__PURE__ */ jsxs(SheetHeader, {
116
+ if ($[13] !== t) {
117
+ t5 = t("blocks.add");
118
+ $[13] = t;
119
+ $[14] = t5;
120
+ } else t5 = $[14];
121
+ let t6;
122
+ if ($[15] !== t5) {
123
+ t6 = /* @__PURE__ */ jsx(SheetTitle, { children: t5 });
124
+ $[15] = t5;
125
+ $[16] = t6;
126
+ } else t6 = $[16];
127
+ let t7;
128
+ if ($[17] !== t) {
129
+ t7 = t("blocks.libraryDescription");
130
+ $[17] = t;
131
+ $[18] = t7;
132
+ } else t7 = $[18];
133
+ let t8;
134
+ if ($[19] !== t7) {
135
+ t8 = /* @__PURE__ */ jsx(SheetDescription, { children: t7 });
136
+ $[19] = t7;
137
+ $[20] = t8;
138
+ } else t8 = $[20];
139
+ let t9;
140
+ if ($[21] !== t6 || $[22] !== t8) {
141
+ t9 = /* @__PURE__ */ jsxs(SheetHeader, {
118
142
  className: "space-y-2",
119
- children: [/* @__PURE__ */ jsx(SheetTitle, { children: "Add Block" }), /* @__PURE__ */ jsx(SheetDescription, { children: "Select a block type to add to your content" })]
143
+ children: [t6, t8]
120
144
  });
121
- $[13] = t5;
122
- } else t5 = $[13];
123
- let t6;
124
- if ($[14] === Symbol.for("react.memo_cache_sentinel")) {
125
- t6 = /* @__PURE__ */ jsx(Icon, {
145
+ $[21] = t6;
146
+ $[22] = t8;
147
+ $[23] = t9;
148
+ } else t9 = $[23];
149
+ let t10;
150
+ if ($[24] === Symbol.for("react.memo_cache_sentinel")) {
151
+ t10 = /* @__PURE__ */ jsx(Icon, {
126
152
  icon: "ph:magnifying-glass",
127
153
  className: "text-muted-foreground absolute top-1/2 left-3 h-4 w-4 -translate-y-1/2"
128
154
  });
129
- $[14] = t6;
130
- } else t6 = $[14];
131
- let t7;
132
- if ($[15] !== t) {
133
- t7 = t("blocks.searchPlaceholder");
134
- $[15] = t;
135
- $[16] = t7;
136
- } else t7 = $[16];
137
- let t8;
138
- if ($[17] === Symbol.for("react.memo_cache_sentinel")) {
139
- t8 = (e) => setSearch(e.target.value);
140
- $[17] = t8;
141
- } else t8 = $[17];
142
- let t9;
143
- if ($[18] !== search || $[19] !== t7) {
144
- t9 = /* @__PURE__ */ jsx("div", {
155
+ $[24] = t10;
156
+ } else t10 = $[24];
157
+ let t11;
158
+ if ($[25] !== t) {
159
+ t11 = t("blocks.searchPlaceholder");
160
+ $[25] = t;
161
+ $[26] = t11;
162
+ } else t11 = $[26];
163
+ let t12;
164
+ if ($[27] === Symbol.for("react.memo_cache_sentinel")) {
165
+ t12 = (e) => setSearch(e.target.value);
166
+ $[27] = t12;
167
+ } else t12 = $[27];
168
+ let t13;
169
+ if ($[28] !== search || $[29] !== t11) {
170
+ t13 = /* @__PURE__ */ jsx("div", {
145
171
  className: "px-6 py-4",
146
172
  children: /* @__PURE__ */ jsxs("div", {
147
173
  className: "relative",
148
- children: [t6, /* @__PURE__ */ jsx(Input, {
174
+ children: [t10, /* @__PURE__ */ jsx(Input, {
149
175
  ref: searchInputRef,
150
- placeholder: t7,
176
+ placeholder: t11,
151
177
  value: search,
152
- onChange: t8,
178
+ onChange: t12,
153
179
  className: "pl-9"
154
180
  })]
155
181
  })
156
182
  });
157
- $[18] = search;
158
- $[19] = t7;
159
- $[20] = t9;
160
- } else t9 = $[20];
161
- let t10;
162
- if ($[21] !== categories || $[22] !== handleSelectBlock || $[23] !== search) {
163
- t10 = /* @__PURE__ */ jsx("div", {
183
+ $[28] = search;
184
+ $[29] = t11;
185
+ $[30] = t13;
186
+ } else t13 = $[30];
187
+ let t14;
188
+ if ($[31] !== categories || $[32] !== handleSelectBlock || $[33] !== search || $[34] !== t) {
189
+ t14 = /* @__PURE__ */ jsx("div", {
164
190
  className: "flex-1 overflow-y-auto px-6 pb-6",
165
191
  children: categories.length === 0 ? /* @__PURE__ */ jsxs("div", {
166
192
  className: "flex flex-col items-center justify-center py-12 text-center",
@@ -171,11 +197,11 @@ function BlockLibrarySidebar(t0) {
171
197
  }),
172
198
  /* @__PURE__ */ jsx("p", {
173
199
  className: "text-muted-foreground text-sm",
174
- children: "No blocks found"
200
+ children: t("blocks.noSearchResults")
175
201
  }),
176
202
  search && /* @__PURE__ */ jsx("p", {
177
203
  className: "text-muted-foreground mt-1 text-xs",
178
- children: "Try a different search term"
204
+ children: t("blocks.tryDifferentSearch")
179
205
  })
180
206
  ]
181
207
  }) : /* @__PURE__ */ jsx("div", {
@@ -213,39 +239,41 @@ function BlockLibrarySidebar(t0) {
213
239
  })] }, category_0.key))
214
240
  })
215
241
  });
216
- $[21] = categories;
217
- $[22] = handleSelectBlock;
218
- $[23] = search;
219
- $[24] = t10;
220
- } else t10 = $[24];
221
- let t11;
222
- if ($[25] !== t10 || $[26] !== t9) {
223
- t11 = /* @__PURE__ */ jsxs(SheetContent, {
242
+ $[31] = categories;
243
+ $[32] = handleSelectBlock;
244
+ $[33] = search;
245
+ $[34] = t;
246
+ $[35] = t14;
247
+ } else t14 = $[35];
248
+ let t15;
249
+ if ($[36] !== t13 || $[37] !== t14 || $[38] !== t9) {
250
+ t15 = /* @__PURE__ */ jsxs(SheetContent, {
224
251
  side: "left",
225
252
  className: "qa-block-library flex w-full flex-col sm:max-w-md",
226
253
  children: [
227
- t5,
228
254
  t9,
229
- t10
255
+ t13,
256
+ t14
230
257
  ]
231
258
  });
232
- $[25] = t10;
233
- $[26] = t9;
234
- $[27] = t11;
235
- } else t11 = $[27];
236
- let t12;
237
- if ($[28] !== open || $[29] !== t11 || $[30] !== t4) {
238
- t12 = /* @__PURE__ */ jsx(Sheet, {
259
+ $[36] = t13;
260
+ $[37] = t14;
261
+ $[38] = t9;
262
+ $[39] = t15;
263
+ } else t15 = $[39];
264
+ let t16;
265
+ if ($[40] !== open || $[41] !== t15 || $[42] !== t4) {
266
+ t16 = /* @__PURE__ */ jsx(Sheet, {
239
267
  open,
240
268
  onOpenChange: t4,
241
- children: t11
269
+ children: t15
242
270
  });
243
- $[28] = open;
244
- $[29] = t11;
245
- $[30] = t4;
246
- $[31] = t12;
247
- } else t12 = $[31];
248
- return t12;
271
+ $[40] = open;
272
+ $[41] = t15;
273
+ $[42] = t4;
274
+ $[43] = t16;
275
+ } else t16 = $[43];
276
+ return t16;
249
277
  }
250
278
  function _temp2(a_0, b_0) {
251
279
  return (a_0.admin?.order ?? 999) - (b_0.admin?.order ?? 999);
@@ -0,0 +1,25 @@
1
+ import { BrandLogoConfig } from "../types/admin-config.mjs";
2
+ import * as React from "react";
3
+
4
+ //#region src/client/components/brand-logo.d.ts
5
+ interface BrandLogoMarkProps {
6
+ logo: BrandLogoConfig | null | undefined;
7
+ className?: string;
8
+ fallback?: React.ReactNode;
9
+ alt?: string;
10
+ }
11
+ /**
12
+ * Default renderer for `branding.logo`. Accepts:
13
+ * - a URL string (same image both modes)
14
+ * - `{ src, srcDark }` (separate light/dark images, switched by .dark class)
15
+ * - a `ComponentReference` (server-registered component, e.g. an SVG)
16
+ *
17
+ * When `logo` is null/undefined the `fallback` prop is rendered (typically
18
+ * the framework's built-in mark, e.g. `<QuestpieSymbol />`).
19
+ *
20
+ * Light/dark switching uses Tailwind's `dark:` variant against the
21
+ * `.dark` class the admin theme manager toggles on `<html>`.
22
+ */
23
+ declare const BrandLogoMark: React.NamedExoticComponent<BrandLogoMarkProps>;
24
+ //#endregion
25
+ export { BrandLogoMark, BrandLogoMarkProps };
@@ -0,0 +1,174 @@
1
+ import { cn } from "../lib/utils.mjs";
2
+ import { ComponentRenderer } from "./component-renderer.mjs";
3
+ import { c } from "react/compiler-runtime";
4
+ import * as React from "react";
5
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
6
+
7
+ //#region src/client/components/brand-logo.tsx
8
+ /**
9
+ * Default renderer for `branding.logo`. Accepts:
10
+ * - a URL string (same image both modes)
11
+ * - `{ src, srcDark }` (separate light/dark images, switched by .dark class)
12
+ * - a `ComponentReference` (server-registered component, e.g. an SVG)
13
+ *
14
+ * When `logo` is null/undefined the `fallback` prop is rendered (typically
15
+ * the framework's built-in mark, e.g. `<QuestpieSymbol />`).
16
+ *
17
+ * Light/dark switching uses Tailwind's `dark:` variant against the
18
+ * `.dark` class the admin theme manager toggles on `<html>`.
19
+ */
20
+ const BrandLogoMark = React.memo(function BrandLogoMark$1(t0) {
21
+ const $ = c(46);
22
+ const { logo, className, fallback: t1, alt: t2 } = t0;
23
+ const fallback = t1 === void 0 ? null : t1;
24
+ const alt = t2 === void 0 ? "" : t2;
25
+ if (logo == null) {
26
+ let t3$1;
27
+ if ($[0] !== fallback) {
28
+ t3$1 = /* @__PURE__ */ jsx(Fragment, { children: fallback });
29
+ $[0] = fallback;
30
+ $[1] = t3$1;
31
+ } else t3$1 = $[1];
32
+ return t3$1;
33
+ }
34
+ if (typeof logo === "string") {
35
+ let t3$1;
36
+ if ($[2] !== className) {
37
+ t3$1 = cn("size-6 shrink-0 object-contain", className);
38
+ $[2] = className;
39
+ $[3] = t3$1;
40
+ } else t3$1 = $[3];
41
+ let t4$1;
42
+ if ($[4] !== alt || $[5] !== logo || $[6] !== t3$1) {
43
+ t4$1 = /* @__PURE__ */ jsx("img", {
44
+ src: logo,
45
+ alt,
46
+ className: t3$1
47
+ });
48
+ $[4] = alt;
49
+ $[5] = logo;
50
+ $[6] = t3$1;
51
+ $[7] = t4$1;
52
+ } else t4$1 = $[7];
53
+ return t4$1;
54
+ }
55
+ if ("src" in logo) {
56
+ const { src, srcDark, alt: t3$1, width, height } = logo;
57
+ const imgAlt = t3$1 === void 0 ? alt : t3$1;
58
+ if (!srcDark) {
59
+ let t4$2;
60
+ if ($[8] !== className) {
61
+ t4$2 = cn("size-6 shrink-0 object-contain", className);
62
+ $[8] = className;
63
+ $[9] = t4$2;
64
+ } else t4$2 = $[9];
65
+ let t5$2;
66
+ if ($[10] !== height || $[11] !== imgAlt || $[12] !== src || $[13] !== t4$2 || $[14] !== width) {
67
+ t5$2 = /* @__PURE__ */ jsx("img", {
68
+ src,
69
+ alt: imgAlt,
70
+ width,
71
+ height,
72
+ className: t4$2
73
+ });
74
+ $[10] = height;
75
+ $[11] = imgAlt;
76
+ $[12] = src;
77
+ $[13] = t4$2;
78
+ $[14] = width;
79
+ $[15] = t5$2;
80
+ } else t5$2 = $[15];
81
+ return t5$2;
82
+ }
83
+ let t4$1;
84
+ if ($[16] !== className) {
85
+ t4$1 = cn("size-6 shrink-0 object-contain dark:hidden", className);
86
+ $[16] = className;
87
+ $[17] = t4$1;
88
+ } else t4$1 = $[17];
89
+ let t5$1;
90
+ if ($[18] !== height || $[19] !== imgAlt || $[20] !== src || $[21] !== t4$1 || $[22] !== width) {
91
+ t5$1 = /* @__PURE__ */ jsx("img", {
92
+ src,
93
+ alt: imgAlt,
94
+ width,
95
+ height,
96
+ className: t4$1
97
+ });
98
+ $[18] = height;
99
+ $[19] = imgAlt;
100
+ $[20] = src;
101
+ $[21] = t4$1;
102
+ $[22] = width;
103
+ $[23] = t5$1;
104
+ } else t5$1 = $[23];
105
+ let t6$1;
106
+ if ($[24] !== className) {
107
+ t6$1 = cn("hidden size-6 shrink-0 object-contain dark:block", className);
108
+ $[24] = className;
109
+ $[25] = t6$1;
110
+ } else t6$1 = $[25];
111
+ let t7;
112
+ if ($[26] !== height || $[27] !== imgAlt || $[28] !== srcDark || $[29] !== t6$1 || $[30] !== width) {
113
+ t7 = /* @__PURE__ */ jsx("img", {
114
+ src: srcDark,
115
+ alt: imgAlt,
116
+ width,
117
+ height,
118
+ className: t6$1
119
+ });
120
+ $[26] = height;
121
+ $[27] = imgAlt;
122
+ $[28] = srcDark;
123
+ $[29] = t6$1;
124
+ $[30] = width;
125
+ $[31] = t7;
126
+ } else t7 = $[31];
127
+ let t8;
128
+ if ($[32] !== t5$1 || $[33] !== t7) {
129
+ t8 = /* @__PURE__ */ jsxs(Fragment, { children: [t5$1, t7] });
130
+ $[32] = t5$1;
131
+ $[33] = t7;
132
+ $[34] = t8;
133
+ } else t8 = $[34];
134
+ return t8;
135
+ }
136
+ let t3;
137
+ if ($[35] !== logo.props) {
138
+ t3 = logo.props ?? {};
139
+ $[35] = logo.props;
140
+ $[36] = t3;
141
+ } else t3 = $[36];
142
+ let t4;
143
+ if ($[37] !== logo.type || $[38] !== t3) {
144
+ t4 = {
145
+ type: logo.type,
146
+ props: t3
147
+ };
148
+ $[37] = logo.type;
149
+ $[38] = t3;
150
+ $[39] = t4;
151
+ } else t4 = $[39];
152
+ let t5;
153
+ if ($[40] !== className) {
154
+ t5 = className ? { className } : void 0;
155
+ $[40] = className;
156
+ $[41] = t5;
157
+ } else t5 = $[41];
158
+ let t6;
159
+ if ($[42] !== fallback || $[43] !== t4 || $[44] !== t5) {
160
+ t6 = /* @__PURE__ */ jsx(ComponentRenderer, {
161
+ reference: t4,
162
+ fallback,
163
+ additionalProps: t5
164
+ });
165
+ $[42] = fallback;
166
+ $[43] = t4;
167
+ $[44] = t5;
168
+ $[45] = t6;
169
+ } else t6 = $[45];
170
+ return t6;
171
+ });
172
+
173
+ //#endregion
174
+ export { BrandLogoMark };