@middag-io/react 0.35.1 → 0.35.3

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 (23) hide show
  1. package/README.md +40 -147
  2. package/dist-lib/{DateField-CcRD2r-Z.js → DateField-CryguepA.js} +1 -1
  3. package/dist-lib/{DocumentField-DjnK9T7o.js → DocumentField-4wTGkMH-.js} +2 -2
  4. package/dist-lib/{FormPanelBlock-BYyMr-xN.js → FormPanelBlock-CbM3PiH7.js} +4 -4
  5. package/dist-lib/{MarkdownContent-C-X2QGA2.js → MarkdownContent-D0w3DYm6.js} +16 -16
  6. package/dist-lib/{PhoneField-BF70G_PS.js → PhoneField-BtLI699n.js} +2 -2
  7. package/dist-lib/base/theme/tailwind-theme.css +1 -1
  8. package/dist-lib/{combobox-BRe2Y-kB.js → combobox-oPnHtaA6.js} +1857 -1772
  9. package/dist-lib/components/reui/index.d.ts +1 -1
  10. package/dist-lib/contracts/block-data/data-display.d.ts +1 -1
  11. package/dist-lib/contracts/generated/contract-schema.d.ts +1 -1
  12. package/dist-lib/contracts/generated/contract-types.d.ts +3 -3
  13. package/dist-lib/contracts/generated/contract-types.d.ts.map +1 -1
  14. package/dist-lib/contracts/generated/index.d.ts +1 -1
  15. package/dist-lib/middag-react.js +2243 -3701
  16. package/dist-lib/{resolve-field-error-DLX1h_6J.js → resolve-field-error-DbMTg4Lj.js} +26 -26
  17. package/dist-lib/useTranslation-D-tjJhTn.js +48 -0
  18. package/package.json +5 -1
  19. package/dist-lib/MarkdownContent-D5FIjx_W.js +0 -2
  20. package/dist-lib/useTranslation-BuyMWJ9T.js +0 -321
  21. /package/dist-lib/{DateRangeField-DKZMfKB2.js → DateRangeField-o5tUrAR8.js} +0 -0
  22. /package/dist-lib/{dist-DdfRh_k3.js → dist-axU0pUop.js} +0 -0
  23. /package/dist-lib/{document-validation-DX0fB9cu.js → document-validation-BSjTDZhG.js} +0 -0
package/README.md CHANGED
@@ -16,14 +16,10 @@ Shared React UI library for the MIDDAG ecosystem. Consumed by Moodle (`local_mid
16
16
  ### Quick start (recommended)
17
17
 
18
18
  ```bash
19
- # Community (no auth needed)
20
19
  npx create-middag-ui
21
-
22
- # Pro (source maps, mock SPA, full exports)
23
- npx @middag-io/create-middag-ui
24
20
  ```
25
21
 
26
- The wizard detects your host platform (Moodle/WordPress), configures authentication, and scaffolds a `ui/` directory with a working mock build.
22
+ The wizard detects your host platform (Moodle/WordPress), configures authentication, and scaffolds a `ui/` directory with a working build.
27
23
 
28
24
  ### Manual install
29
25
 
@@ -45,8 +41,6 @@ npm install @middag-io/react react react-dom @inertiajs/react @inertiajs/core
45
41
 
46
42
  Create a token at [github.com/settings/tokens](https://github.com/settings/tokens) with `read:packages` scope. See [Authentication](https://ui-docs.middag.io/authentication) for details.
47
43
 
48
- > **GitHub Packages access requires:** membership in the [middag-io](https://github.com/middag-io) organization on GitHub. The token alone is not sufficient — you must have read access to the `middag-io/middag-react` repository.
49
-
50
44
  ### Distribution
51
45
 
52
46
  `@middag-io/react` is the complete rendering engine — every block, shell, layout, contract and registry you need to build plugins. Two ways to install it:
@@ -172,11 +166,10 @@ src/
172
166
  lib/ # Generic utilities and hooks
173
167
  assets/ # Fonts, lottie animations
174
168
  index.ts # Barrel export
175
- demo/ # FREE demo harness (standalone SPA, Community only — `npm run dev`)
176
- packages/react-demo/mock/ # PRO demo (host-sim + premium blocks — `npm run dev:pro`)
177
- scripts/ # Tooling (sync, doctor)
169
+ demo/ # Demo harness (standalone SPA — `npm run dev`)
170
+ docs/ # Guides, reference and the public JSON schemas
171
+ scripts/ # Tooling (contracts codegen, docs payload, sync, doctor)
178
172
  .githooks/ # Git hooks (pre-commit, commit-msg, pre-push)
179
- .changeset/ # Changesets config for automated versioning
180
173
  ```
181
174
 
182
175
  ### What belongs here vs host plugins
@@ -189,11 +182,6 @@ scripts/ # Tooling (sync, doctor)
189
182
  | i18n provider (generic) | i18n resolver (host-specific) |
190
183
  | Type contracts | API endpoints, DB queries |
191
184
  | ReUI examples (reference) | Custom components |
192
- | Mock build (dev playground) | AMD build (Moodle), ESM bundle (WP) |
193
-
194
- ### Extension model
195
-
196
- Extensions implement `ExtensionPage` (extends `PageContract`) for licensed features. The build gate excludes unlicensed extensions at compile time. Host plugins handle server-side license checks and only send contracts for active extensions.
197
185
 
198
186
  ## Development
199
187
 
@@ -201,61 +189,23 @@ Extensions implement `ExtensionPage` (extends `PageContract`) for licensed featu
201
189
  # Check environment
202
190
  npm run doctor
203
191
 
204
- # FREE demo harness -- standalone SPA, Community engine only, no server needed
192
+ # Demo harness -- standalone SPA, no server needed
205
193
  npm run dev # http://localhost:5173
206
194
 
207
- # PRO demo -- host-sim shells + premium blocks (packages/react-demo)
208
- npm run dev:pro # http://localhost:5174
209
-
210
195
  # Typecheck
211
196
  npm run typecheck
212
197
 
213
198
  # Lint
214
199
  npm run lint:fix
215
200
 
201
+ # Tests
202
+ npm test
203
+
216
204
  # Build ESM lib
217
205
  npm run build
218
206
  ```
219
207
 
220
- ### Dogfood the FREE scaffold
221
-
222
- `npm run dev:scaffold-free` reproduces exactly what `npx create-middag-ui` produces: it
223
- generates a real FREE project in `.scaffold-free/` (gitignored), installs `@middag-io/react`
224
- from the **public npm registry**, and starts its dev server. This is the real consumer
225
- experience — it does **not** use your local source.
226
-
227
- To test your **local** lib changes in that scaffold before publishing, use the `:local`
228
- variant — it builds `dist-lib/` and `npm link`s it into the generated project:
229
-
230
- ```bash
231
- npm run dev:scaffold-free # public npm lib (real consumer) → http://localhost:5176
232
- npm run dev:scaffold-free:local # link your LOCAL built lib (dogfood) → http://localhost:5176
233
-
234
- # Real-time loop after :local — edit src/, then in a second terminal:
235
- npm run build -- --watch # rebuild dist-lib on change; reload the browser to see it
236
- ```
237
-
238
- `.scaffold-free/` is throwaway. `:local` always regenerates from scratch; plain
239
- `dev:scaffold-free` reuses an existing scaffold (pass `-- --fresh` to wipe it).
240
-
241
- ### FREE demo vs PRO demo
242
-
243
- There are two in-repo demos, plus the scaffold dogfood above. All three are dev-time
244
- tools — none of them is the production runtime (hosts render via Inertia, not these SPAs).
245
-
246
- | Demo | Command | Source | Depends on PRO? |
247
- |---------------------|-------------------|-----------------------|--------------------------------------|
248
- | FREE demo harness | `npm run dev` | `demo/` | No — Community engine (`src/`) only |
249
- | PRO demo | `npm run dev:pro` | `packages/react-demo` | Yes — `@middag-io/react-pro` + mocks |
250
-
251
- The FREE harness consumes the engine from `src/` via Vite aliases (instant HMR), mocks
252
- `@inertiajs/*` with self-contained adapters in `demo/adapters/`, and renders Community
253
- `PageContract`s only. It never imports `@middag-io/react-pro` and needs no GitHub
254
- Packages auth — it is the demo that ships with the public repo after the FREE/PRO split.
255
-
256
- ### Host switching (PRO demo only)
257
-
258
- The PRO demo build includes a host switcher (M/W button in sidebar footer) to preview the UI inside Moodle Boost header or WordPress admin chrome.
208
+ The demo harness consumes the engine from `src/` via Vite aliases (instant HMR), mocks `@inertiajs/*` with self-contained adapters in `demo/adapters/`, and renders `PageContract`s end to end.
259
209
 
260
210
  ### ReUI component examples
261
211
 
@@ -278,25 +228,15 @@ A GitHub Action runs weekly (Mondays 8:00 UTC) to check for new examples and ope
278
228
 
279
229
  Configured via `.githooks/` (activated by `npm run prepare`):
280
230
 
281
- | Hook | Trigger | Protection |
282
- |--------------|--------------|--------------------------------------|
283
- | `pre-commit` | `git commit` | Typecheck + lint on staged files |
284
- | `commit-msg` | `git commit` | Enforces Conventional Commits format |
285
- | `pre-push` | `git push` | Full typecheck + lib build |
231
+ | Hook | Trigger | Protection |
232
+ |--------------|--------------|-------------------------------------------|
233
+ | `pre-commit` | `git commit` | Typecheck + lint on staged files |
234
+ | `commit-msg` | `git commit` | Enforces Conventional Commits format |
235
+ | `pre-push` | `git push` | Typecheck + contract drift + lib build |
286
236
 
287
237
  ## Versioning
288
238
 
289
- Uses [Changesets](https://github.com/changesets/changesets) for automated versioning and changelog with GitHub-linked entries.
290
-
291
- ```bash
292
- # After finishing a feature:
293
- npx changeset # select patch/minor/major, write summary
294
- git add . && git commit # include the .changeset/*.md file
295
-
296
- # On merge to main:
297
- # GitHub Action opens "Version Packages" PR
298
- # Merge that PR to publish to GitHub Packages
299
- ```
239
+ [release-please](https://github.com/googleapis/release-please) owns versioning: it scans Conventional Commits on `main`, opens a release PR (version bump + `CHANGELOG.md`) and, on merge, cuts the tag + GitHub release and publishes. Commit types decide the bump (0.x rule: `feat`/breaking = minor, `fix` = patch).
300
240
 
301
241
  ## CLI
302
242
 
@@ -304,8 +244,7 @@ The package includes a CLI for bootstrapping and maintaining the UI layer in con
304
244
 
305
245
  | Command | Description |
306
246
  |-----------------------------------------|------------------------------------------------------------|
307
- | `npx create-middag-ui` | Bootstrap `ui/` (Community) |
308
- | `npx @middag-io/create-middag-ui` | Bootstrap `ui/` (PRO) |
247
+ | `npx create-middag-ui` | Bootstrap `ui/` |
309
248
  | `npx @middag-io/react doctor` | Validate consumer project setup (deps, configs, peer deps) |
310
249
  | `npx @middag-io/react dev` | Start mock dev server from consumer project |
311
250
  | `npx @middag-io/react add-block <type>` | Scaffold a new block type with component + mock factory |
@@ -313,85 +252,39 @@ The package includes a CLI for bootstrapping and maintaining the UI layer in con
313
252
 
314
253
  ## Scripts
315
254
 
316
- | Command | Description |
317
- |-------------------------------------------|-----------------------------------------------|
318
- | `npm run doctor` | Validate development environment |
319
- | `npm run dev` | FREE demo harness (`demo/`, Community only) |
320
- | `npm run dev:pro` | PRO demo (react-demo: host-sim + premium) |
321
- | `npm run dev:scaffold-free` | Run the FREE scaffold output (public npm lib) |
322
- | `npm run dev:scaffold-free:local` | FREE scaffold linked to your local built lib |
323
- | `npm run build` | Build ESM lib to `dist-lib/` |
324
- | `cd packages/react-demo && npm run build` | Build mock SPA to `packages/react-demo/dist/` |
325
- | `npm run typecheck` | TypeScript type check |
326
- | `npm run lint` | ESLint check |
327
- | `npm run lint:fix` | ESLint auto-fix |
328
- | `npm run format` | Prettier format |
329
- | `npm run format:check` | Prettier check |
330
- | `npm run sync:examples` | Sync ReUI examples from registry |
331
- | `npm run changeset` | Create a changeset for versioning |
332
- | `npm run release` | Build + publish (used by CI) |
255
+ | Command | Description |
256
+ |---------------------------|------------------------------------------------|
257
+ | `npm run doctor` | Validate development environment |
258
+ | `npm run dev` | Demo harness (`demo/`) |
259
+ | `npm run build` | Build ESM lib to `dist-lib/` |
260
+ | `npm run typecheck` | TypeScript type check |
261
+ | `npm run lint` | ESLint check |
262
+ | `npm run lint:fix` | ESLint auto-fix |
263
+ | `npm run format` | Prettier format |
264
+ | `npm run format:check` | Prettier check |
265
+ | `npm test` | Vitest run (all tests) |
266
+ | `npm run gen:contracts` | Regenerate contract types from JSON schemas |
267
+ | `npm run sync:examples` | Sync ReUI examples from registry |
268
+ | `npm run docs:build` | Build + verify the public docs payload |
333
269
 
334
270
  ## Peer Dependencies
335
271
 
336
272
  - `react` ^19.0.0
337
273
  - `react-dom` ^19.0.0
338
- - `@inertiajs/react` ^2.0.0
339
- - `@inertiajs/core` ^2.0.0
340
-
341
- ## Mock Build Deployment (Cloudflare Pages)
342
-
343
- The mock SPA is deployed automatically to Cloudflare Pages on every push to `main`.
344
-
345
- **Live URL:** `https://ui-demo.middag.io`
346
-
347
- ### First-time setup
348
-
349
- 1. Create the Cloudflare Pages project:
350
- ```bash
351
- npx wrangler pages project create middag-react-mock --production-branch main
352
- ```
353
-
354
- 2. Add repository secrets in GitHub (`Settings > Secrets and variables > Actions`):
355
- - `CLOUDFLARE_API_TOKEN` — API token with "Cloudflare Pages: Edit" permission
356
- - `CLOUDFLARE_ACCOUNT_ID` — your Cloudflare account ID (found in dashboard URL or Workers & Pages overview)
357
-
358
- 3. Push to `main` — the `deploy-mock.yml` workflow runs automatically.
359
-
360
- ### Manual deploy (local)
361
-
362
- ```bash
363
- cd packages/react-demo && npm run deploy
364
- ```
274
+ - `@inertiajs/react` ^3.0.0
275
+ - `@inertiajs/core` ^3.0.0
365
276
 
366
277
  ## CI/CD
367
278
 
368
- | Workflow | Trigger | What it does |
369
- |--------------------------------|-------------------------------------------|----------------------------------------------------------------|
370
- | `publish.yml` | Push to main | Typecheck + Changesets publish to GitHub Packages + npm public |
371
- | `publish-create-middag-ui.yml` | Push to main (packages/create-middag-ui/) | Publish to npm (Community) + GitHub Packages (PRO) |
372
- | `deploy-mock.yml` | Push to main / manual | Build mock + deploy to Cloudflare Pages |
373
- | `sync-examples.yml` | Monday 8:00 UTC / manual | Sync ReUI examples, opens PR if updates |
374
-
375
- ### Required secrets
376
-
377
- | Secret | Registry | Purpose |
378
- |-------------------------|------------------|-------------------------------------------------|
379
- | `GITHUB_TOKEN` | GitHub Packages | Publish `@middag-io/react` (auto-provided) |
380
- | `NPM_TOKEN` | npm (public) | Publish `@middag-io/react` + `create-middag-ui` |
381
- | `CLOUDFLARE_API_TOKEN` | Cloudflare Pages | Deploy mock SPA |
382
- | `CLOUDFLARE_ACCOUNT_ID` | Cloudflare Pages | Account identifier |
279
+ | Workflow | Trigger | What it does |
280
+ |------------------------------|------------------------------------|-----------------------------------------------------------------|
281
+ | `ci.yml` | Pull requests to main | Static checks + contract drift + tests/coverage + build |
282
+ | `publish.yml` | Push to main | release-please → publish to GitHub Packages + npm public → docs |
283
+ | `notify-schemas-updated.yml` | Push to main (docs/public/schemas) | Notifies downstream consumers of schema changes |
284
+ | `sync-examples.yml` | Monday 8:00 UTC / manual | Sync ReUI examples, opens PR if updates |
383
285
 
384
286
  ## License
385
287
 
386
- **Tiered.** Two packages, two licenses:
387
-
388
- - **`@middag-io/react`** (this library — npm public + GitHub Packages): **Apache-2.0 OSS**. The
389
- rendering engine, the standard Community blocks, shells, layouts, contracts and registries. Free to use, fork and
390
- ship. See [`LICENSE`](./LICENSE).
391
- - **`@middag-io/react-pro`** (GitHub Packages, MIDDAG team only): **proprietary / UNLICENSED**.
392
- The reserved developer-experience toolkit. Access-gated by GitHub Packages auth — no runtime
393
- licensing.
394
- - **`mock/`**: not published. The MIDDAG demo pages / dev harness, reserved in-repo.
288
+ **Apache-2.0 OSS.** The rendering engine, the standard Community blocks, shells, layouts, contracts and registries. Free to use, fork and ship. See [`LICENSE`](./LICENSE).
395
289
 
396
- The Pro tier reserves the **developer experience** (the MIDDAG pages and dev toolkit), not the
397
- component code — there is no runtime license gate.
290
+ > The commercial **Pro** tier (`@middag-io/react-pro` — additional blocks, an application shell, extra themes) is a separate, proprietary package distributed via GitHub Packages. It is not part of this repository and is not needed to build with this library.
@@ -1,6 +1,6 @@
1
1
  import { t as e } from "./button-Bm0X9WO5.js";
2
2
  import { i as t, o as n, s as r, t as i } from "./calendar-CucaItjm.js";
3
- import { t as a } from "./useTranslation-BuyMWJ9T.js";
3
+ import { t as a } from "./useTranslation-D-tjJhTn.js";
4
4
  import { n as o, r as s, t as c } from "./popover-BaiQ-JSz.js";
5
5
  import { t as l } from "./input-BC9whKEm.js";
6
6
  import { useCallback as u, useState as d } from "react";
@@ -1,6 +1,6 @@
1
- import { t as e } from "./useTranslation-BuyMWJ9T.js";
1
+ import { t as e } from "./useTranslation-D-tjJhTn.js";
2
2
  import { t } from "./input-BC9whKEm.js";
3
- import "./document-validation-DX0fB9cu.js";
3
+ import "./document-validation-BSjTDZhG.js";
4
4
  import { useCallback as n, useMemo as r } from "react";
5
5
  import { jsx as i } from "react/jsx-runtime";
6
6
  //#region src/base/form/fields/DocumentField.tsx
@@ -1,6 +1,6 @@
1
- import { $ as e, A as t, D as n, Dt as r, E as i, Et as a, Ft as o, J as s, K as c, Nt as l, O as u, Ot as d, Pt as f, T as p, Tt as m, U as h, V as g, Y as _, Z as v, _ as y, a as b, at as x, b as S, c as C, d as ee, et as w, f as T, g as E, h as D, i as O, jt as k, kt as A, l as te, m as ne, n as re, nt as ie, o as ae, p as oe, r as se, t as j, tt as ce, u as le, v as ue, w as de, wt as fe, y as pe } from "./resolve-field-error-DLX1h_6J.js";
1
+ import { $ as e, A as t, D as n, Dt as r, E as i, Et as a, Ft as o, J as s, K as c, Nt as l, O as u, Ot as d, Pt as f, T as p, Tt as m, U as h, V as g, Y as _, Z as v, _ as y, a as b, at as x, b as S, c as C, d as ee, et as w, f as T, g as E, h as D, i as O, jt as k, kt as A, l as te, m as ne, n as re, nt as ie, o as ae, p as oe, r as se, t as j, tt as ce, u as le, v as ue, w as de, wt as fe, y as pe } from "./resolve-field-error-DbMTg4Lj.js";
2
2
  import { t as me } from "./button-Bm0X9WO5.js";
3
- import { t as he } from "./useTranslation-BuyMWJ9T.js";
3
+ import { t as he } from "./useTranslation-D-tjJhTn.js";
4
4
  import { t as ge } from "./utils-CpaZ5_iF.js";
5
5
  import { t as _e } from "./skeleton-xL_Hzxj-.js";
6
6
  import M, { Suspense as N, lazy as P, useCallback as ve, useEffect as ye, useId as be, useMemo as F, useRef as xe, useState as Se } from "react";
@@ -1283,7 +1283,7 @@ function Yt(e, t, n) {
1283
1283
  }
1284
1284
  case "document": {
1285
1285
  let e = o.documentType ?? "generic", n = o.documentScope ?? "any", r = k(), i = async (t) => {
1286
- let { isValidDocument: r } = await import("./document-validation-DX0fB9cu.js");
1286
+ let { isValidDocument: r } = await import("./document-validation-BSjTDZhG.js");
1287
1287
  return r(t, e, n);
1288
1288
  };
1289
1289
  return c ? r.min(1, t("middag.ui.validation.required")).refine(i, t("middag.ui.validation.document_invalid")) : r.refine(async (e) => e === "" || await i(e), t("middag.ui.validation.document_invalid"));
@@ -1298,7 +1298,7 @@ function Xt(e, t, n) {
1298
1298
  }
1299
1299
  //#endregion
1300
1300
  //#region src/base/form/FormField.tsx
1301
- var Zt = P(() => import("./PhoneField-BF70G_PS.js").then((e) => ({ default: e.PhoneField }))), Qt = P(() => import("./DateField-CcRD2r-Z.js").then((e) => ({ default: e.DateField }))), $t = P(() => import("./DocumentField-DjnK9T7o.js").then((e) => ({ default: e.DocumentField }))), en = P(() => import("./DateRangeField-DKZMfKB2.js").then((e) => ({ default: e.DateRangeField })));
1301
+ var Zt = P(() => import("./PhoneField-BtLI699n.js").then((e) => ({ default: e.PhoneField }))), Qt = P(() => import("./DateField-CryguepA.js").then((e) => ({ default: e.DateField }))), $t = P(() => import("./DocumentField-4wTGkMH-.js").then((e) => ({ default: e.DocumentField }))), en = P(() => import("./DateRangeField-o5tUrAR8.js").then((e) => ({ default: e.DateRangeField })));
1302
1302
  function tn() {
1303
1303
  return /* @__PURE__ */ I(_e, { className: "h-9 w-full rounded-md" });
1304
1304
  }
@@ -1,5 +1,5 @@
1
1
  import { i as e, n as t, t as n } from "./chunk-DeC0fbbY.js";
2
- import { t as r } from "./useTranslation-BuyMWJ9T.js";
2
+ import { t as r } from "./useTranslation-D-tjJhTn.js";
3
3
  import { N as i, ht as a, t as o } from "./HugeiconsIcon-CKqc2W1S.js";
4
4
  import { t as s } from "./utils-CpaZ5_iF.js";
5
5
  import { t as c } from "./skeleton-xL_Hzxj-.js";
@@ -13319,7 +13319,7 @@ function sl(e) {
13319
13319
  }
13320
13320
  //#endregion
13321
13321
  //#region src/base/partials/MarkdownContent/index.tsx
13322
- var cl = {
13322
+ var cl = /* @__PURE__ */ t({ MarkdownContent: () => hl }), ll = {
13323
13323
  ...Wc,
13324
13324
  tagNames: (Wc.tagNames ?? []).filter((e) => e !== "script" && e !== "style"),
13325
13325
  attributes: {
@@ -13328,7 +13328,7 @@ var cl = {
13328
13328
  span: [...Wc.attributes?.span ?? [], "className"]
13329
13329
  }
13330
13330
  };
13331
- function ll({ code: e }) {
13331
+ function ul({ code: e }) {
13332
13332
  let { t } = r(), [n, c] = u(!1);
13333
13333
  return /* @__PURE__ */ f("button", {
13334
13334
  type: "button",
@@ -13344,17 +13344,17 @@ function ll({ code: e }) {
13344
13344
  })
13345
13345
  });
13346
13346
  }
13347
- function ul(e) {
13347
+ function dl(e) {
13348
13348
  try {
13349
13349
  return new URL(e, window.location.origin).origin !== window.location.origin;
13350
13350
  } catch {
13351
13351
  return !1;
13352
13352
  }
13353
13353
  }
13354
- function dl(e) {
13355
- return typeof e == "string" ? e : Array.isArray(e) ? e.map(dl).join("") : e && typeof e == "object" && "props" in e ? dl(e.props?.children) : String(e ?? "");
13354
+ function fl(e) {
13355
+ return typeof e == "string" ? e : Array.isArray(e) ? e.map(fl).join("") : e && typeof e == "object" && "props" in e ? fl(e.props?.children) : String(e ?? "");
13356
13356
  }
13357
- var fl = {
13357
+ var pl = {
13358
13358
  h1: ({ children: e, ...t }) => /* @__PURE__ */ f("h1", {
13359
13359
  className: "text-foreground mt-6 mb-4 text-2xl font-bold first:mt-0",
13360
13360
  ...t,
@@ -13404,7 +13404,7 @@ var fl = {
13404
13404
  className: "border-border my-6",
13405
13405
  ...e
13406
13406
  }),
13407
- a: ({ href: e, children: t, ...n }) => e ? ul(e) ? /* @__PURE__ */ f("a", {
13407
+ a: ({ href: e, children: t, ...n }) => e ? dl(e) ? /* @__PURE__ */ f("a", {
13408
13408
  href: e,
13409
13409
  target: "_blank",
13410
13410
  rel: "noopener noreferrer",
@@ -13424,14 +13424,14 @@ var fl = {
13424
13424
  children: t
13425
13425
  }),
13426
13426
  pre: ({ children: e, ...t }) => {
13427
- let n = dl(e);
13427
+ let n = fl(e);
13428
13428
  return /* @__PURE__ */ p("div", {
13429
13429
  className: "group/codeblock relative mb-4",
13430
13430
  children: [/* @__PURE__ */ f("pre", {
13431
13431
  className: "overflow-x-auto rounded-lg bg-zinc-900 p-4 text-sm text-zinc-100 dark:bg-zinc-950",
13432
13432
  ...t,
13433
13433
  children: e
13434
- }), /* @__PURE__ */ f(ll, { code: n })]
13434
+ }), /* @__PURE__ */ f(ul, { code: n })]
13435
13435
  });
13436
13436
  },
13437
13437
  code: ({ className: e, children: t, ...n }) => e ? /* @__PURE__ */ f("code", {
@@ -13474,7 +13474,7 @@ var fl = {
13474
13474
  children: e
13475
13475
  })
13476
13476
  };
13477
- function pl() {
13477
+ function ml() {
13478
13478
  return /* @__PURE__ */ p("div", {
13479
13479
  className: "max-w-[720px] space-y-3",
13480
13480
  children: [
@@ -13485,9 +13485,9 @@ function pl() {
13485
13485
  ]
13486
13486
  });
13487
13487
  }
13488
- function ml({ content: e, maxHeight: t, isLoading: n }) {
13488
+ function hl({ content: e, maxHeight: t, isLoading: n }) {
13489
13489
  let { t: i } = r();
13490
- return n ? /* @__PURE__ */ f(pl, {}) : !e || e.trim().length === 0 ? /* @__PURE__ */ f("div", {
13490
+ return n ? /* @__PURE__ */ f(ml, {}) : !e || e.trim().length === 0 ? /* @__PURE__ */ f("div", {
13491
13491
  className: "max-w-[720px]",
13492
13492
  children: /* @__PURE__ */ f("p", {
13493
13493
  className: "text-muted-foreground text-sm italic",
@@ -13497,11 +13497,11 @@ function ml({ content: e, maxHeight: t, isLoading: n }) {
13497
13497
  className: s("prose-reset max-w-[720px]", t && "overflow-y-auto"),
13498
13498
  style: t ? { maxHeight: `${t}px` } : void 0,
13499
13499
  children: /* @__PURE__ */ f(no, {
13500
- rehypePlugins: [Vc, [sl, cl]],
13501
- components: fl,
13500
+ rehypePlugins: [Vc, [sl, ll]],
13501
+ components: pl,
13502
13502
  children: e
13503
13503
  })
13504
13504
  });
13505
13505
  }
13506
13506
  //#endregion
13507
- export { h as n, ml as t };
13507
+ export { cl as n, h as r, hl as t };
@@ -1,7 +1,7 @@
1
1
  import { i as e, t } from "./chunk-DeC0fbbY.js";
2
2
  import { t as n } from "./button-Bm0X9WO5.js";
3
- import { f as r, h as i, l as a, m as o, o as s, p as c, s as l, t as u, u as d } from "./combobox-BRe2Y-kB.js";
4
- import { t as f } from "./useTranslation-BuyMWJ9T.js";
3
+ import { f as r, h as i, l as a, m as o, o as s, p as c, s as l, t as u, u as d } from "./combobox-oPnHtaA6.js";
4
+ import { t as f } from "./useTranslation-D-tjJhTn.js";
5
5
  import { t as p, z as m } from "./HugeiconsIcon-CKqc2W1S.js";
6
6
  import { t as h } from "./utils-CpaZ5_iF.js";
7
7
  import { t as g } from "./scroll-area-D94_a2-1.js";
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Tailwind THEME CONTRACT — compile-time utility→token mapping (E1.8).
2
+ * Tailwind THEME CONTRACT — compile-time utility→token mapping.
3
3
  *
4
4
  * Single source of truth for how Tailwind utility classes resolve to the
5
5
  * MIDDAG runtime tokens (tokens.css / theme-bridge.css). Imported by TWO