From 6b373d18d78c794c1916e1f807e5732951336868 Mon Sep 17 00:00:00 2001 From: Naffah Abdulla Rasheed Date: Wed, 4 Nov 2026 12:41:46 +0500 Subject: [PATCH 01/18] Rename to @javaabu/forms; ESM + CJS build, prepare, coverage, examples and CI on next-gen Closes #2 Co-Authored-By: Claude Opus 5.5 --- .changeset/initial-release.md | 5 - .changeset/rename-to-javaabu-forms.md | 5 + .github/workflows/ci.yml | 25 ++++- .prettierignore | 1 + AGENTS.md | 6 +- README.md | 13 ++- docs/basic-usage/map-input.md | 2 +- docs/basic-usage/wysiwyg.md | 2 +- docs/installation-and-setup.md | 12 +- docs/migrating-from-blade.md | 4 +- eslint.config.js | 2 +- examples/index.html | 24 ++++ playground/index.html => examples/onu.html | 4 +- {playground/src => examples/onu}/main.tsx | 2 +- {playground/src => examples/onu}/styles.css | 0 {playground/src => examples}/vite-env.d.ts | 0 examples/vite.config.ts | 19 ++++ package.json | 31 +++++- playground/vite.config.ts | 9 -- pnpm-lock.yaml | 115 ++++++++++++++++---- src/components/textarea.tsx | 2 +- src/index.ts | 2 +- src/styles/tailwind.css | 4 +- tsconfig.json | 2 +- vite.config.ts | 23 ++-- vitest.config.ts | 6 + 26 files changed, 240 insertions(+), 80 deletions(-) delete mode 100644 .changeset/initial-release.md create mode 100644 .changeset/rename-to-javaabu-forms.md create mode 100644 examples/index.html rename playground/index.html => examples/onu.html (73%) rename {playground/src => examples/onu}/main.tsx (98%) rename {playground/src => examples/onu}/styles.css (100%) rename {playground/src => examples}/vite-env.d.ts (100%) create mode 100644 examples/vite.config.ts delete mode 100644 playground/vite.config.ts diff --git a/.changeset/initial-release.md b/.changeset/initial-release.md deleted file mode 100644 index 3c66eed..0000000 --- a/.changeset/initial-release.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@javaabu/react-forms": minor ---- - -First release: React versions of the javaabu/forms Blade components on Onu. Includes model binding, old input, Laravel validation errors, method spoofing, the select2 cascades and fallbacks, file uploads, conditional sections, and listing tables with select-all and sorting. diff --git a/.changeset/rename-to-javaabu-forms.md b/.changeset/rename-to-javaabu-forms.md new file mode 100644 index 0000000..0f70a34 --- /dev/null +++ b/.changeset/rename-to-javaabu-forms.md @@ -0,0 +1,5 @@ +--- +"@javaabu/forms": minor +--- + +Renamed from `@javaabu/react-forms` to `@javaabu/forms`. The package now ships CommonJS next to ESM, and builds itself when installed from Git (`github:Javaabu/react-forms#next-gen`). diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7270e4b..bba850e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,16 +2,24 @@ name: CI on: push: - branches: [main] + branches: [main, next-gen] pull_request: +concurrency: + group: ci-${{ github.ref }} + cancel-in-progress: true + +permissions: + contents: read + jobs: check: + name: Lint, typecheck, test, build runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - uses: pnpm/action-setup@v4 - - uses: actions/setup-node@v4 + - uses: actions/setup-node@v5 with: node-version: 22 cache: pnpm @@ -19,5 +27,14 @@ jobs: - run: pnpm lint - run: pnpm format:check - run: pnpm typecheck - - run: pnpm test + - name: Unit tests with coverage + run: pnpm test:coverage + - name: Upload coverage + uses: codecov/codecov-action@v5 + with: + files: coverage/lcov.info + token: ${{ secrets.CODECOV_TOKEN }} + fail_ci_if_error: false - run: pnpm build + - name: Examples + run: pnpm examples:build diff --git a/.prettierignore b/.prettierignore index 941f8aa..ba0ab70 100644 --- a/.prettierignore +++ b/.prettierignore @@ -3,3 +3,4 @@ coverage pnpm-lock.yaml CHANGELOG.md docs +examples/dist diff --git a/AGENTS.md b/AGENTS.md index 616d58f..d694cdf 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -1,6 +1,6 @@ # React Forms: notes for AI coding agents -`@javaabu/react-forms` is the React port of the [`javaabu/forms`](https://github.com/Javaabu/forms) Blade components and the form behaviour of [`@javaabu/js-utilities`](https://github.com/Javaabu/js-utilities), built on [`@javaabu/onu`](https://github.com/Javaabu/onu). +`@javaabu/forms` is the React port of the [`javaabu/forms`](https://github.com/Javaabu/forms) Blade components and the form behaviour of [`@javaabu/js-utilities`](https://github.com/Javaabu/js-utilities), built on [`@javaabu/onu`](https://github.com/Javaabu/onu). ## Layout @@ -11,7 +11,7 @@ | `src/support` | Ports of the Laravel / javaabu helpers (`Str`, `data_get`, `AllowedMimeTypes`, …) | | `src/locales` | `en` / `dv` strings (from `lang/*/strings.php`) | | `src/editor`, `src/maps` | Separate entries for the heavy Onu editor and maps | -| `playground` | `pnpm dev`: every component on one page (`?dv` for Dhivehi) | +| `examples` | `pnpm examples`: one page per integration (`?dv` for Dhivehi) | | `docs` | One page per Blade docs page, plus `migrating-from-blade.md` | ## Rules @@ -28,5 +28,5 @@ pnpm install pnpm lint && pnpm format:check && pnpm typecheck pnpm test pnpm build -pnpm dev +pnpm examples ``` diff --git a/README.md b/README.md index 2e75548..e706c31 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,11 @@ -# React Forms +# Forms for React -`@javaabu/react-forms` is the React port of [`javaabu/forms`](https://github.com/Javaabu/forms), the Laravel Blade components. It also covers the form behaviour of [`@javaabu/js-utilities`](https://github.com/Javaabu/js-utilities). It is built on [Onu](https://www.npmjs.com/package/@javaabu/onu), Javaabu's React UI library, so it inherits RTL and Dhivehi support, Thaana typing, theming and WCAG 2.2 AA accessibility. +[![Tests](https://github.com/Javaabu/react-forms/actions/workflows/ci.yml/badge.svg?branch=next-gen)](https://github.com/Javaabu/react-forms/actions/workflows/ci.yml?query=branch%3Anext-gen) +[![Coverage](https://codecov.io/gh/Javaabu/react-forms/branch/next-gen/graph/badge.svg)](https://codecov.io/gh/Javaabu/react-forms/tree/next-gen) +[![npm](https://img.shields.io/npm/v/@javaabu/forms.svg)](https://www.npmjs.com/package/@javaabu/forms) +[![License](https://img.shields.io/github/license/Javaabu/react-forms.svg)](LICENSE.md) + +`@javaabu/forms` is the React port of [`javaabu/forms`](https://github.com/Javaabu/forms), the Laravel Blade components. It also covers the form behaviour of [`@javaabu/js-utilities`](https://github.com/Javaabu/js-utilities). It is built on [Onu](https://www.npmjs.com/package/@javaabu/onu), Javaabu's React UI library, so it inherits RTL and Dhivehi support, Thaana typing, theming and WCAG 2.2 AA accessibility. The API follows the Blade components. Blade attributes become camelCase props, and slots become props or children. @@ -14,7 +19,7 @@ The API follows the Blade components. Blade attributes become camelCase props, a ``` ```tsx -import * as Forms from "@javaabu/react-forms" +import * as Forms from "@javaabu/forms" ; @@ -43,7 +48,7 @@ import * as Forms from "@javaabu/react-forms" ```bash pnpm install -pnpm dev # playground with every component (add ?dv for Dhivehi) +pnpm examples # one page per integration (add ?dv for Dhivehi) pnpm test pnpm lint && pnpm typecheck && pnpm format:check pnpm build diff --git a/docs/basic-usage/map-input.md b/docs/basic-usage/map-input.md index 31d5403..7487f1f 100644 --- a/docs/basic-usage/map-input.md +++ b/docs/basic-usage/map-input.md @@ -4,7 +4,7 @@ sidebar_position: 8.5 --- ```tsx -import { MapInput } from "@javaabu/react-forms/maps" +import { MapInput } from "@javaabu/forms/maps" diff --git a/docs/basic-usage/wysiwyg.md b/docs/basic-usage/wysiwyg.md index 6929876..a378732 100644 --- a/docs/basic-usage/wysiwyg.md +++ b/docs/basic-usage/wysiwyg.md @@ -4,7 +4,7 @@ sidebar_position: 8 --- ```tsx -import { Wysiwyg } from "@javaabu/react-forms/editor" +import { Wysiwyg } from "@javaabu/forms/editor" diff --git a/docs/installation-and-setup.md b/docs/installation-and-setup.md index 1e814dd..5f30e89 100644 --- a/docs/installation-and-setup.md +++ b/docs/installation-and-setup.md @@ -4,7 +4,7 @@ sidebar_position: 1.2 --- ```bash -npm install @javaabu/react-forms @javaabu/onu +npm install @javaabu/forms @javaabu/onu ``` `@javaabu/onu` is a peer dependency. Set Onu up first (see its installation guide), then let Tailwind CSS v4 see this package's classes too: @@ -12,14 +12,14 @@ npm install @javaabu/react-forms @javaabu/onu ```css @import "tailwindcss"; @import "@javaabu/onu/tailwind.css"; -@import "@javaabu/react-forms/tailwind.css"; +@import "@javaabu/forms/tailwind.css"; ``` Wrap the app once: ```tsx import { OnuProvider, ThemeProvider } from "@javaabu/onu" -import { FormsProvider } from "@javaabu/react-forms" +import { FormsProvider } from "@javaabu/forms" @@ -48,7 +48,7 @@ The package strings follow Onu's locale. English and Dhivehi are built in. A namespace import reads like Blade's `x-forms::` prefix and avoids clashes with the globals `Date`, `Number`, `File` and `Image`: ```tsx -import * as Forms from "@javaabu/react-forms" +import * as Forms from "@javaabu/forms" ``` @@ -56,6 +56,6 @@ import * as Forms from "@javaabu/react-forms" The rich text editor and the map input have their own entries, so their heavy dependencies only load when you use them: ```tsx -import { Wysiwyg } from "@javaabu/react-forms/editor" -import { MapInput } from "@javaabu/react-forms/maps" +import { Wysiwyg } from "@javaabu/forms/editor" +import { MapInput } from "@javaabu/forms/maps" ``` diff --git a/docs/migrating-from-blade.md b/docs/migrating-from-blade.md index d73ba2e..04f39db 100644 --- a/docs/migrating-from-blade.md +++ b/docs/migrating-from-blade.md @@ -14,12 +14,12 @@ Attributes become camelCase props (`show-label` → `showLabel`, `:options="$x"` | `x-forms::form-group`, `label`, `label-required`, `input-help`, `errors` | `FormGroup`, `Label`, `LabelRequired`, `InputHelp`, `Errors` | `FormField`, `Label`, `RequiredMarker`, `HelpText`, `FieldErrors` | | `x-forms::input`, `text`, `email`, `password`, `number`, `tel`, `url`, `hidden`, `latitude`, `longitude` | `Input`, `Text`, `Email`, `Password`, `Number`, `Tel`, `Url`, `Hidden`, `Latitude`, `Longitude` | `TextInput`, `EmailInput`, `PasswordInput`, `NumberInput`, `UrlInput`, `HiddenInput` | | `x-forms::textarea` | `Textarea` | `Textarea` | -| `x-forms::wysiwyg`, `textarea wysiwyg` | `Wysiwyg` (`@javaabu/react-forms/editor`) | `WysiwygEditor` | +| `x-forms::wysiwyg`, `textarea wysiwyg` | `Wysiwyg` (`@javaabu/forms/editor`) | `WysiwygEditor` | | `x-forms::checkbox`, `radio` | `Checkbox`, `Radio` | `Checkbox`, native radio | | `x-forms::date`, `datetime`, `time` | `Date`, `Datetime`, `Time` | `DatePicker`, `DateTimePicker`, `TimePicker` | | `x-forms::select`, `select2` | `Select`, `Select2` | `Select`, `SearchableSelect`, `MultiSelect`, `ApiSelect`, `QuickCreateSelect` | | `x-forms::file`, `file-upload`, `image`, `image-upload` | `File`, `FileUpload`, `Image`, `ImageUpload` | `FileInput`, `ImageInput` | -| `x-forms::map-input` | `MapInput` (`@javaabu/react-forms/maps`) | `MapPicker`, `MapRadius`, `MapPolygon` | +| `x-forms::map-input` | `MapInput` (`@javaabu/forms/maps`) | `MapPicker`, `MapRadius`, `MapPolygon` | | `x-forms::conditional-wrapper` | `ConditionalWrapper` | `ConditionalDisplay` | | `x-forms::button`, `submit`, `link-button`, `button-group` | `Button`, `Submit`, `LinkButton`, `ButtonGroup` | `Button`, `LinkButton`, `ButtonGroup` | | `x-forms::alert` | `Alert` | `Callout` | diff --git a/eslint.config.js b/eslint.config.js index 5256648..b78020d 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -8,7 +8,7 @@ const physical = /(^|[\s:"'`])-?(ml|mr|pl|pr|left|right|rounded-l|rounded-r|border-l|border-r|text-left|text-right)(-|\b)/ export default tseslint.config( - { ignores: ["dist", "coverage", "node_modules"] }, + { ignores: ["dist", "coverage", "node_modules", "examples/dist"] }, js.configs.recommended, ...tseslint.configs.recommended, { diff --git a/examples/index.html b/examples/index.html new file mode 100644 index 0000000..b15d8e0 --- /dev/null +++ b/examples/index.html @@ -0,0 +1,24 @@ + + + + + + @javaabu/forms examples + + + +

@javaabu/forms examples

+

Each page renders the same forms through a different integration.

+
    +
  • Onu (Dhivehi): every component on the Onu adapter
  • +
+ + diff --git a/playground/index.html b/examples/onu.html similarity index 73% rename from playground/index.html rename to examples/onu.html index d55dd8f..b6cf5aa 100644 --- a/playground/index.html +++ b/examples/onu.html @@ -4,10 +4,10 @@ - react-forms playground + @javaabu/forms with Onu
- + diff --git a/playground/src/main.tsx b/examples/onu/main.tsx similarity index 98% rename from playground/src/main.tsx rename to examples/onu/main.tsx index a23313f..1a927d8 100644 --- a/playground/src/main.tsx +++ b/examples/onu/main.tsx @@ -46,7 +46,7 @@ function App() {
-

@javaabu/react-forms

+

@javaabu/forms

setRtl((v) => !v)}> {rtl ? "English" : "ދިވެހި"} diff --git a/playground/src/styles.css b/examples/onu/styles.css similarity index 100% rename from playground/src/styles.css rename to examples/onu/styles.css diff --git a/playground/src/vite-env.d.ts b/examples/vite-env.d.ts similarity index 100% rename from playground/src/vite-env.d.ts rename to examples/vite-env.d.ts diff --git a/examples/vite.config.ts b/examples/vite.config.ts new file mode 100644 index 0000000..ccd7a39 --- /dev/null +++ b/examples/vite.config.ts @@ -0,0 +1,19 @@ +import { resolve } from "node:path" +import tailwindcss from "@tailwindcss/vite" +import react from "@vitejs/plugin-react" +import { defineConfig } from "vite" + +/** One page per integration, rendered against the source. `pnpm examples` serves them, `pnpm examples:build` builds them. */ +const pages = ["index", "onu"] + +export default defineConfig({ + root: import.meta.dirname, + plugins: [react(), tailwindcss()], + build: { + outDir: "dist", + emptyOutDir: true, + rollupOptions: { + input: Object.fromEntries(pages.map((page) => [page, resolve(import.meta.dirname, `${page}.html`)])), + }, + }, +}) diff --git a/package.json b/package.json index e9183c2..c128c00 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { - "name": "@javaabu/react-forms", + "name": "@javaabu/forms", "version": "0.0.0", - "description": "React port of the javaabu/forms Laravel Blade components, built on the Onu UI library: model binding, old input, Laravel errors and the js-utilities behaviours.", + "description": "React version of the javaabu/forms Laravel Blade components: model binding, old input, Laravel validation errors, Inertia and Wayfinder support, with adapters for Onu, shadcn/ui or any UI framework.", "license": "MIT", "author": { "name": "Javaabu Pvt. Ltd.", @@ -20,7 +20,9 @@ "forms", "laravel", "inertia", + "wayfinder", "onu", + "shadcn", "rtl", "dhivehi", "javaabu" @@ -33,20 +35,25 @@ "dist", "src/styles", "docs", + "resources", + "llms.txt", "README.md" ], "exports": { ".": { "types": "./dist/index.d.ts", - "default": "./dist/index.js" + "import": "./dist/index.js", + "require": "./dist/index.cjs" }, "./editor": { "types": "./dist/editor/index.d.ts", - "default": "./dist/editor/index.js" + "import": "./dist/editor/index.js", + "require": "./dist/editor/index.cjs" }, "./maps": { "types": "./dist/maps/index.d.ts", - "default": "./dist/maps/index.js" + "import": "./dist/maps/index.js", + "require": "./dist/maps/index.cjs" }, "./tailwind.css": "./src/styles/tailwind.css", "./package.json": "./package.json" @@ -57,15 +64,18 @@ }, "scripts": { "build": "vite build && tsc -p tsconfig.build.json", + "prepare": "pnpm build", "test": "vitest run", "test:watch": "vitest", + "test:coverage": "vitest run --coverage", "typecheck": "tsc --noEmit -p tsconfig.json", "lint": "eslint .", "format": "prettier --write .", "format:check": "prettier --check .", "changeset": "changeset", "release": "pnpm build && changeset publish", - "dev": "vite --config playground/vite.config.ts" + "examples": "vite --config examples/vite.config.ts", + "examples:build": "vite build --config examples/vite.config.ts" }, "peerDependencies": { "@javaabu/onu": "^0.1.0", @@ -87,6 +97,7 @@ "@types/react": "^19.3.0", "@types/react-dom": "^19.3.0", "@vitejs/plugin-react": "^6.1.2", + "@vitest/coverage-v8": "^5.1.0", "eslint": "^10.12.0", "eslint-plugin-react-hooks": "^7.1.1", "globals": "^17.13.0", @@ -99,5 +110,13 @@ "typescript-eslint": "^8.72.0", "vite": "^8.3.4", "vitest": "^5.0.5" + }, + "main": "./dist/index.cjs", + "module": "./dist/index.js", + "types": "./dist/index.d.ts", + "peerDependenciesMeta": { + "@javaabu/onu": { + "optional": true + } } } diff --git a/playground/vite.config.ts b/playground/vite.config.ts deleted file mode 100644 index a36064f..0000000 --- a/playground/vite.config.ts +++ /dev/null @@ -1,9 +0,0 @@ -import tailwindcss from "@tailwindcss/vite" -import react from "@vitejs/plugin-react" -import { defineConfig } from "vite" - -/** A page that renders every component against the source, for manual and screenshot checks. */ -export default defineConfig({ - root: import.meta.dirname, - plugins: [react(), tailwindcss()], -}) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 49c9d3b..570e0bc 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -31,7 +31,7 @@ importers: version: 4.3.3(vite@8.3.4(@types/node@26.6.5)(jiti@2.7.0)(yaml@2.9.1)) '@testing-library/jest-dom': specifier: ^7.0.1 - version: 7.0.1(@testing-library/dom@10.4.2)(vitest@5.0.5(@types/node@26.6.5)(jsdom@30.1.3)(vite@8.3.4(@types/node@26.6.5)(jiti@2.7.0)(yaml@2.9.1))) + version: 7.0.1(@testing-library/dom@10.4.2)(vitest@5.0.5) '@testing-library/react': specifier: ^16.3.3 version: 16.3.3(@testing-library/dom@10.4.2)(@types/react-dom@19.3.0(@types/react@19.3.0))(@types/react@19.3.0)(react-dom@19.3.1(react@19.3.1))(react@19.3.1) @@ -50,6 +50,9 @@ importers: '@vitejs/plugin-react': specifier: ^6.1.2 version: 6.1.2(vite@8.3.4(@types/node@26.6.5)(jiti@2.7.0)(yaml@2.9.1)) + '@vitest/coverage-v8': + specifier: ^5.1.0 + version: 5.1.0(vitest@5.0.5) eslint: specifier: ^10.12.0 version: 10.13.0(jiti@2.7.0) @@ -85,7 +88,7 @@ importers: version: 8.3.4(@types/node@26.6.5)(jiti@2.7.0)(yaml@2.9.1) vitest: specifier: ^5.0.5 - version: 5.0.5(@types/node@26.6.5)(jsdom@30.1.3)(vite@8.3.4(@types/node@26.6.5)(jiti@2.7.0)(yaml@2.9.1)) + version: 5.0.5(@types/node@26.6.5)(@vitest/coverage-v8@5.1.0)(jsdom@30.1.3)(vite@8.3.4(@types/node@26.6.5)(jiti@2.7.0)(yaml@2.9.1)) packages: @@ -159,9 +162,6 @@ packages: resolution: {integrity: sha512-NpugTzbKgGrNe45Ui32cN8vCFFMxVtP/9rtfwv0nP5FRDAjvYBxJcLVpYA9mr1jxP6cnIT7x9LUzuDTbWYYNRA==} engines: {node: '>=6.9.0'} - '@babel/runtime@8.0.7': - resolution: {integrity: sha512-k0hagDDq/6w4v+0Sp4wFvIz/yswH5O7Va6aRTnD7N62Tnborp4X+YB+H3XUcWVSR4aE47WPEXiIIZchBs0GmYg==} - '@babel/template@7.29.7': resolution: {integrity: sha512-puq+Gf35oI24FeN11LkoUQFqv9uwNeWpxXZi/Ji3rRIoKAzKnxRaZ+Gkj0vKS9ZCiTESfng1N9LyOyXvo+m+Gg==} engines: {node: '>=6.9.0'} @@ -201,6 +201,10 @@ packages: '@types/react': optional: true + '@bcoe/v8-coverage@1.0.2': + resolution: {integrity: sha512-6zABk/ECA/QYSCQ1NGiVwwbQerUCZ+TQbp64Q3AgmfNvurHH0j8TtXa1qbShXA6qqkpAj4V5W8pP6mLe1mcMqA==} + engines: {node: '>=18'} + '@bramus/specificity@2.4.3': resolution: {integrity: sha512-0GEz8qJWokkUVYQYRukmkSHIFNoBH8QTreeHrAFbvz1XFYc3Y+puhMs8PQ5x8GNugiC2l5jvDBXKLbBIByeSBw==} hasBin: true @@ -1705,6 +1709,23 @@ packages: oxc-transform-react: optional: true + '@vitest/coverage-v8@5.1.0': + resolution: {integrity: sha512-OY9aShBQG5KOIw2zCo9fDoCHI9RHliNHJ//nM7m6jGg41Hyke9JOGWmeMlK74xYErsxMoK8mIB3gAeEyFVA7LA==} + peerDependencies: + '@vitest/browser': 5.1.0 + vitest: 5.1.0 + peerDependenciesMeta: + '@vitest/browser': + optional: true + + '@vitest/istanbul-lib-coverage@2.1.0': + resolution: {integrity: sha512-WOjuS+xcjSIy7ruYBQ+9BUcV7XZQ0FyVcbWbWxW9TRx/kLGx5SQaeFRIFDJxjNplb6YsT7SpKo2zuXXUo91OIQ==} + engines: {node: '>=22'} + + '@vitest/istanbul-lib-report@2.1.0': + resolution: {integrity: sha512-+ZFta25nWtGCOBG9/IET8w1RO5Oawsd6H8Uf6AJ9EA/StFuKVtKAEJEJ6uRt84OH+T4YkI0ASmIHAhRA+0KVxw==} + engines: {node: '>=22'} + '@vitest/mocker@5.0.5': resolution: {integrity: sha512-xLL3lkDegJZw+MGoGaCCsFayDZthGgpAtr3Vziyfc4p7xH89K7KRPcRBBh/kEYm0Aqkt5DtTmkYpBtRV/FrHZg==} peerDependencies: @@ -1755,6 +1776,9 @@ packages: resolution: {integrity: sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==} engines: {node: '>=12'} + ast-v8-to-istanbul@1.0.7: + resolution: {integrity: sha512-kFL68AG6ajd8fg248zwM9GQrUWEp79gsmjum34OEXjs4yHuUMZfYKwOLW9GMmB4oNvVrj+EAGxsP7ye2UR9UlA==} + attr-accept@4.0.1: resolution: {integrity: sha512-rOKAGOwbnTUvwTL8rNA0hWnU3uX9tOI20di4KjR5I1ez/RJmnA37W3zz4EMxGC2YnI289yPjRy63CdAZeQFZ4Q==} engines: {node: '>= 22'} @@ -1996,8 +2020,8 @@ packages: file-entry-cache@11.1.5: resolution: {integrity: sha512-+PFTHITI08JIGhnNpGNI8T8inUpgZfk3GNEqfT9R2zZV2iFXg3CvqzSl/uEhs7TSGujYRELEANyDvS8Fj7+S7Q==} - file-selector@5.0.1: - resolution: {integrity: sha512-v0g/PTeuQgvKCBrVRsfVudvwXlRHSWHEQkVgKawgCGHkEpKA1clp3Om5jvEVhz8G9W/mOYjJH9FhkH4C888PgQ==} + file-selector@5.0.2: + resolution: {integrity: sha512-1hAy178VaMCWWj/vSUITOTpLWH1PoGW3eO7i3kPIppuSyOHBm3o1cHq+CvKAM5hQKQXlazrDt/3K1HCXgs7MpQ==} engines: {node: '>= 22'} find-up@5.0.0: @@ -2115,6 +2139,9 @@ packages: jju@1.4.0: resolution: {integrity: sha512-8wb9Yw966OSxApiCt0K3yNJL8pnNeIv+OEq2YMidz4FKP6nonSRoOXc80iXY4JaN2FC11B9qsNmDsm+ZOfMROA==} + js-tokens@10.0.0: + resolution: {integrity: sha512-lM/UBzQmfJRo9ABXbPWemivdCW8V2G8FHaHdypQaIy523snUjog0W71ayWXTjiR+ixeMyVHN2XcpnTd/liPg/Q==} + js-tokens@4.0.0: resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} @@ -2333,6 +2360,9 @@ packages: magic-string@1.4.3: resolution: {integrity: sha512-z12OxmaPGE0F4xlpGdjuAUckipLpQlTAuAmyGhNoD7ODpYUzvDfvtxUbjM/jwznyP178oju/KDdyi220wNJ0RQ==} + magicast@0.5.5: + resolution: {integrity: sha512-UicdXN8zQ3JHlxVq+28afMXPr1z7WNY6+7EJnzTdQWkTAlMLF5fNCCKxJHBQwGaNGR11581EiQmQzx73+MvszA==} + mdn-data@2.27.1: resolution: {integrity: sha512-9Yubnt3e8A0OKwxYSXyhLymGW4sCufcLG6VdiDdUGVkPhpqLxlvP5vl1983gQjJl3tqbrM731mjaZaP68AgosQ==} @@ -2520,11 +2550,15 @@ packages: '@types/react': optional: true - react-resizable-panels@4.14.7: - resolution: {integrity: sha512-UP8lccy1yGA8p8c6UvPaMDnqYePv/CWOv3R6rTAJ9f+UmuaeiTFDJlvcp5rFu5GJcQ1ofCmkjbzp0HceJXZRbw==} + react-resizable-panels@4.18.0: + resolution: {integrity: sha512-ACofxw/KAyxYa+3uCT9FAFR38HeoDhnSP5Lw9Jgm8u3fDcrDlQxArgW67P6ohd/SUVKMv4Lw4u37aV/G76Sp3Q==} peerDependencies: + '@types/react': ^18.2.6 || ^19.0.0 react: ^18.0.0 || ^19.0.0 react-dom: ^18.0.0 || ^19.0.0 + peerDependenciesMeta: + '@types/react': + optional: true react-stately@3.51.0: resolution: {integrity: sha512-YJcmkAXu2XOQP97hO/qz/cC3qv9kni3oVhwBlxWr358BHePJUpY15XwL3YSRMKxYt4EkslPqAz11JRirMfANGw==} @@ -2635,6 +2669,10 @@ packages: resolution: {integrity: sha512-wXR/dYpcqKmfWpEdZjiKJOwCNFndD0DMnrW/cYjVGttEkBfVgcLFHoNrlj47mjOVic9yyNu65alsgF4NQyTa2g==} engines: {node: '>=12.0.0'} + tinyrainbow@3.2.0: + resolution: {integrity: sha512-LgO3D9yZJjApUiuUfl9iFAwrtaX4+lok3wJIqttGoKCHlWUqHqbQpnxCf82L8FjgKsh4iGo78hqJwgL8F6To2A==} + engines: {node: '>=14.0.0'} + tldts-core@7.4.18: resolution: {integrity: sha512-KI2PKvCmvQI/xD6ypPqkU0i7oxNXR/O58RLRaHR4svsgVUQ2JE/XC8BtMbG6PSehD27I8sZJRcC1ASnCy6lp3g==} @@ -2968,8 +3006,6 @@ snapshots: '@babel/runtime@7.29.10': {} - '@babel/runtime@8.0.7': {} - '@babel/template@7.29.7': dependencies: '@babel/code-frame': 7.29.7 @@ -2995,7 +3031,7 @@ snapshots: '@base-ui/react@1.9.0(@date-fns/tz@1.5.0)(@types/react@19.3.0)(date-fns@4.4.0)(react-dom@19.3.1(react@19.3.1))(react@19.3.1)': dependencies: - '@babel/runtime': 8.0.7 + '@babel/runtime': 7.29.10 '@base-ui/utils': 0.5.0(@types/react@19.3.0)(react-dom@19.3.1(react@19.3.1))(react@19.3.1) '@floating-ui/react-dom': 2.1.9(react-dom@19.3.1(react@19.3.1))(react@19.3.1) '@floating-ui/utils': 0.2.12 @@ -3009,7 +3045,7 @@ snapshots: '@base-ui/utils@0.5.0(@types/react@19.3.0)(react-dom@19.3.1(react@19.3.1))(react@19.3.1)': dependencies: - '@babel/runtime': 8.0.7 + '@babel/runtime': 7.29.10 '@floating-ui/utils': 0.2.12 react: 19.3.1 react-dom: 19.3.1(react@19.3.1) @@ -3018,6 +3054,8 @@ snapshots: optionalDependencies: '@types/react': 19.3.0 + '@bcoe/v8-coverage@1.0.2': {} + '@bramus/specificity@2.4.3': dependencies: css-tree: 3.2.1 @@ -3333,7 +3371,7 @@ snapshots: react-dropzone: 20.1.4(@types/react@19.3.0)(react@19.3.1) react-hook-form: 7.90.0(@types/react@19.3.0)(react@19.3.1) react-phone-number-input: 3.4.18(react-dom@19.3.1(react@19.3.1))(react@19.3.1) - react-resizable-panels: 4.14.7(react-dom@19.3.1(react@19.3.1))(react@19.3.1) + react-resizable-panels: 4.18.0(@types/react@19.3.0)(react-dom@19.3.1(react@19.3.1))(react@19.3.1) sonner: 2.0.8(@types/react@19.3.0)(react-dom@19.3.1(react@19.3.1))(react@19.3.1) tailwind-merge: 3.7.0 tailwindcss: 4.3.3 @@ -4328,7 +4366,7 @@ snapshots: picocolors: 1.1.1 pretty-format: 27.5.1 - '@testing-library/jest-dom@7.0.1(@testing-library/dom@10.4.2)(vitest@5.0.5(@types/node@26.6.5)(jsdom@30.1.3)(vite@8.3.4(@types/node@26.6.5)(jiti@2.7.0)(yaml@2.9.1)))': + '@testing-library/jest-dom@7.0.1(@testing-library/dom@10.4.2)(vitest@5.0.5)': dependencies: '@adobe/css-tools': 4.5.0 '@testing-library/dom': 10.4.2 @@ -4338,7 +4376,7 @@ snapshots: picocolors: 1.1.1 redent: 3.0.0 optionalDependencies: - vitest: 5.0.5(@types/node@26.6.5)(jsdom@30.1.3)(vite@8.3.4(@types/node@26.6.5)(jiti@2.7.0)(yaml@2.9.1)) + vitest: 5.0.5(@types/node@26.6.5)(@vitest/coverage-v8@5.1.0)(jsdom@30.1.3)(vite@8.3.4(@types/node@26.6.5)(jiti@2.7.0)(yaml@2.9.1)) '@testing-library/react@16.3.3(@testing-library/dom@10.4.2)(@types/react-dom@19.3.0(@types/react@19.3.0))(@types/react@19.3.0)(react-dom@19.3.1(react@19.3.1))(react@19.3.1)': dependencies: @@ -4477,6 +4515,24 @@ snapshots: '@rolldown/pluginutils': 1.0.1 vite: 8.3.4(@types/node@26.6.5)(jiti@2.7.0)(yaml@2.9.1) + '@vitest/coverage-v8@5.1.0(vitest@5.0.5)': + dependencies: + '@bcoe/v8-coverage': 1.0.2 + '@vitest/istanbul-lib-coverage': 2.1.0 + '@vitest/istanbul-lib-report': 2.1.0 + ast-v8-to-istanbul: 1.0.7 + magicast: 0.5.5 + obug: 3.0.0 + std-env: 4.3.0 + tinyrainbow: 3.2.0 + vitest: 5.0.5(@types/node@26.6.5)(@vitest/coverage-v8@5.1.0)(jsdom@30.1.3)(vite@8.3.4(@types/node@26.6.5)(jiti@2.7.0)(yaml@2.9.1)) + + '@vitest/istanbul-lib-coverage@2.1.0': {} + + '@vitest/istanbul-lib-report@2.1.0': + dependencies: + '@vitest/istanbul-lib-coverage': 2.1.0 + '@vitest/mocker@5.0.5(vite@8.3.4(@types/node@26.6.5)(jiti@2.7.0)(yaml@2.9.1))': dependencies: '@jridgewell/trace-mapping': 0.3.31 @@ -4517,6 +4573,12 @@ snapshots: assertion-error@2.0.1: {} + ast-v8-to-istanbul@1.0.7: + dependencies: + '@jridgewell/trace-mapping': 0.3.31 + estree-walker: 3.0.3 + js-tokens: 10.0.0 + attr-accept@4.0.1: {} balanced-match@4.0.4: {} @@ -4757,7 +4819,7 @@ snapshots: dependencies: flat-cache: 6.1.23 - file-selector@5.0.1: {} + file-selector@5.0.2: {} find-up@5.0.0: dependencies: @@ -4845,6 +4907,8 @@ snapshots: jju@1.4.0: {} + js-tokens@10.0.0: {} + js-tokens@4.0.0: {} jsdom@30.1.3: @@ -5026,6 +5090,12 @@ snapshots: dependencies: '@jridgewell/sourcemap-codec': 1.6.0 + magicast@0.5.5: + dependencies: + '@babel/parser': 7.29.9 + '@babel/types': 7.29.8 + source-map-js: 1.2.2 + mdn-data@2.27.1: {} min-indent@1.0.1: {} @@ -5211,7 +5281,7 @@ snapshots: react-dropzone@20.1.4(@types/react@19.3.0)(react@19.3.1): dependencies: attr-accept: 4.0.1 - file-selector: 5.0.1 + file-selector: 5.0.2 react: 19.3.1 optionalDependencies: '@types/react': 19.3.0 @@ -5255,10 +5325,12 @@ snapshots: optionalDependencies: '@types/react': 19.3.0 - react-resizable-panels@4.14.7(react-dom@19.3.1(react@19.3.1))(react@19.3.1): + react-resizable-panels@4.18.0(@types/react@19.3.0)(react-dom@19.3.1(react@19.3.1))(react@19.3.1): dependencies: react: 19.3.1 react-dom: 19.3.1(react@19.3.1) + optionalDependencies: + '@types/react': 19.3.0 react-stately@3.51.0(react@19.3.1): dependencies: @@ -5360,6 +5432,8 @@ snapshots: fdir: 6.5.0(picomatch@4.0.7) picomatch: 4.0.7 + tinyrainbow@3.2.0: {} + tldts-core@7.4.18: {} tldts@7.4.18: @@ -5456,7 +5530,7 @@ snapshots: jiti: 2.7.0 yaml: 2.9.1 - vitest@5.0.5(@types/node@26.6.5)(jsdom@30.1.3)(vite@8.3.4(@types/node@26.6.5)(jiti@2.7.0)(yaml@2.9.1)): + vitest@5.0.5(@types/node@26.6.5)(@vitest/coverage-v8@5.1.0)(jsdom@30.1.3)(vite@8.3.4(@types/node@26.6.5)(jiti@2.7.0)(yaml@2.9.1)): dependencies: '@types/chai': 5.2.3 '@vitest/mocker': 5.0.5(vite@8.3.4(@types/node@26.6.5)(jiti@2.7.0)(yaml@2.9.1)) @@ -5474,6 +5548,7 @@ snapshots: why-is-node-running: 3.2.1 optionalDependencies: '@types/node': 26.6.5 + '@vitest/coverage-v8': 5.1.0(vitest@5.0.5) jsdom: 30.1.3 transitivePeerDependencies: - msw diff --git a/src/components/textarea.tsx b/src/components/textarea.tsx index b8a2d17..73f1ef6 100644 --- a/src/components/textarea.tsx +++ b/src/components/textarea.tsx @@ -25,7 +25,7 @@ export interface TextareaProps extends FieldProps, PlaceholderProps, NativeTexta /** * ``. For a rich text editor use `Wysiwyg` from - * `@javaabu/react-forms/editor` (Blade's `wysiwyg` attribute). + * `@javaabu/forms/editor` (Blade's `wysiwyg` attribute). */ export function Textarea(props: TextareaProps) { const { field, rest } = splitFieldProps(props) diff --git a/src/index.ts b/src/index.ts index 8f4ceff..d5fe4fd 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,5 +1,5 @@ // Recommended usage mirrors Blade's ``: -// import * as Forms from "@javaabu/react-forms" +// import * as Forms from "@javaabu/forms" // // Configuration, binding and the field registry diff --git a/src/styles/tailwind.css b/src/styles/tailwind.css index ddf1f00..0821b9c 100644 --- a/src/styles/tailwind.css +++ b/src/styles/tailwind.css @@ -1,8 +1,8 @@ /* - * Let Tailwind CSS v4 see the classes used inside @javaabu/react-forms. + * Let Tailwind CSS v4 see the classes used inside @javaabu/forms. * * @import "tailwindcss"; * @import "@javaabu/onu/tailwind.css"; - * @import "@javaabu/react-forms/tailwind.css"; + * @import "@javaabu/forms/tailwind.css"; */ @source "../../dist"; diff --git a/tsconfig.json b/tsconfig.json index 4e5738f..f6286d7 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -16,5 +16,5 @@ "resolveJsonModule": true, "types": ["vitest/globals", "@testing-library/jest-dom"] }, - "include": ["src", "test", "playground", "vite.config.ts", "vitest.config.ts"] + "include": ["src", "test", "examples", "vite.config.ts", "vitest.config.ts"] } diff --git a/vite.config.ts b/vite.config.ts index cedb9b1..5700297 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -12,12 +12,19 @@ const isExternal = (id: string) => externals.some((dep) => id === dep || id.startsWith(`${dep}/`)) || /^(react|react-dom)(\/|$)/.test(id) /** Library entry points, mirrored by package.json `exports`. */ -const entries = { +export const entries: Record = { index: "src/index.ts", "editor/index": "src/editor/index.tsx", "maps/index": "src/maps/index.tsx", } +const output = { + preserveModules: true, + preserveModulesRoot: "src", + // Every module may run on the client; mark them for React Server Components. + banner: '"use client";', +} + export default defineConfig({ plugins: [react()], build: { @@ -27,18 +34,14 @@ export default defineConfig({ sourcemap: true, minify: false, lib: { - entry: Object.fromEntries(Object.entries(entries).map(([k, v]) => [k, resolve(__dirname, v)])), - formats: ["es"], + entry: Object.fromEntries(Object.entries(entries).map(([k, v]) => [k, resolve(import.meta.dirname, v)])), }, rollupOptions: { external: isExternal, - output: { - preserveModules: true, - preserveModulesRoot: "src", - entryFileNames: "[name].js", - // Every module may run on the client; mark them for React Server Components. - banner: '"use client";', - }, + output: [ + { ...output, format: "es" as const, entryFileNames: "[name].js" }, + { ...output, format: "cjs" as const, entryFileNames: "[name].cjs", exports: "named" as const }, + ], }, }, }) diff --git a/vitest.config.ts b/vitest.config.ts index 811c195..e97a7e5 100644 --- a/vitest.config.ts +++ b/vitest.config.ts @@ -11,5 +11,11 @@ export default defineConfig({ css: false, // Onu imports `lucide-react/dynamic` without an extension; let Vite resolve it as an app bundler would. server: { deps: { inline: [/@javaabu\/onu/] } }, + coverage: { + provider: "v8", + include: ["src/**/*.{ts,tsx}"], + exclude: ["src/**/*.test.{ts,tsx}", "src/**/types.ts"], + reporter: ["text-summary", "lcov", "json-summary"], + }, }, }) From 4565fde555c98e3f59f45d714afb6f35e522b5fe Mon Sep 17 00:00:00 2001 From: Naffah Abdulla Rasheed Date: Wed, 4 Nov 2026 13:03:50 +0500 Subject: [PATCH 02/18] UI-framework-agnostic core with an adapter registry; Onu adapter MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The core (binding, old input, errors, ids, labels, value precedence, submit) no longer imports Onu. Components render through adapter slots resolved as FormsProvider components → ui adapter → the HTML base adapter. The Onu adapter lives in @javaabu/forms/onu (+ /onu/editor, /onu/maps) and the v0 component tests now run through it. Refs #3, #4 Co-Authored-By: Claude Opus 5.5 --- .changeset/ui-agnostic-core.md | 5 + examples/onu/main.tsx | 139 +-- examples/shared/demo.tsx | 149 +++ package.json | 51 +- pnpm-lock.yaml | 778 +++++++++--- src/adapters/html/index.tsx | 1095 +++++++++++++++++ src/adapters/onu/editor.tsx | 22 + src/adapters/onu/index.tsx | 537 ++++++++ src/adapters/onu/maps.tsx | 61 + .../onu/onu.test.tsx} | 44 +- src/components/buttons.tsx | 66 +- src/components/checkbox.tsx | 235 ++-- src/components/dates.tsx | 115 +- src/components/display.tsx | 224 ++-- src/components/field.tsx | 176 ++- src/components/files.tsx | 269 ++-- src/components/form.tsx | 555 ++++++++- src/components/format.tsx | 13 +- src/components/inputs.tsx | 256 ++-- src/components/listing.tsx | 185 +-- .../index.tsx => components/map-input.tsx} | 129 +- src/components/select-cascade.ts | 2 +- src/components/select.tsx | 165 +-- src/components/textarea.tsx | 68 +- src/components/wysiwyg.tsx | 52 + src/context/forms-provider.tsx | 126 -- src/core/adapter.ts | 559 +++++++++ src/{context => core}/binding.tsx | 2 +- src/core/errors.ts | 228 ++++ src/core/form-context.tsx | 103 ++ src/core/locales/dv.ts | 75 ++ src/core/locales/en.ts | 81 ++ src/{ => core}/locales/index.ts | 0 src/core/provider.tsx | 167 +++ src/{context => core}/registry.ts | 20 +- src/core/remote.ts | 64 + src/core/router.ts | 202 +++ src/core/strings.ts | 49 + src/core/thaana.ts | 53 + src/editor/index.tsx | 64 - src/html.ts | 2 + src/index.ts | 87 +- src/locales/dv.ts | 66 - src/locales/en.ts | 72 -- src/onu-editor.ts | 2 + src/onu-maps.ts | 2 + src/onu.ts | 2 + src/support/options.ts | 6 +- vite.config.ts | 6 +- 49 files changed, 5796 insertions(+), 1633 deletions(-) create mode 100644 .changeset/ui-agnostic-core.md create mode 100644 examples/shared/demo.tsx create mode 100644 src/adapters/html/index.tsx create mode 100644 src/adapters/onu/editor.tsx create mode 100644 src/adapters/onu/index.tsx create mode 100644 src/adapters/onu/maps.tsx rename src/{components/forms.test.tsx => adapters/onu/onu.test.tsx} (92%) rename src/{maps/index.tsx => components/map-input.tsx} (57%) create mode 100644 src/components/wysiwyg.tsx delete mode 100644 src/context/forms-provider.tsx create mode 100644 src/core/adapter.ts rename src/{context => core}/binding.tsx (98%) create mode 100644 src/core/errors.ts create mode 100644 src/core/form-context.tsx create mode 100644 src/core/locales/dv.ts create mode 100644 src/core/locales/en.ts rename src/{ => core}/locales/index.ts (100%) create mode 100644 src/core/provider.tsx rename src/{context => core}/registry.ts (93%) create mode 100644 src/core/remote.ts create mode 100644 src/core/router.ts create mode 100644 src/core/strings.ts create mode 100644 src/core/thaana.ts delete mode 100644 src/editor/index.tsx create mode 100644 src/html.ts delete mode 100644 src/locales/dv.ts delete mode 100644 src/locales/en.ts create mode 100644 src/onu-editor.ts create mode 100644 src/onu-maps.ts create mode 100644 src/onu.ts diff --git a/.changeset/ui-agnostic-core.md b/.changeset/ui-agnostic-core.md new file mode 100644 index 0000000..2824fce --- /dev/null +++ b/.changeset/ui-agnostic-core.md @@ -0,0 +1,5 @@ +--- +"@javaabu/forms": minor +--- + +The core no longer depends on Onu. Components render through an adapter: `` with `onu` from `@javaabu/forms/onu`, and `components={{ Select: MySelect }}` replaces single components for the whole app or one form. Without an adapter, components render plain HTML (`@javaabu/forms/html`). `Wysiwyg` and `MapInput` are now in the main entry. Onu's editor and maps come from `@javaabu/forms/onu/editor` and `/onu/maps`, combined with `mergeAdapters(onu, onuEditor, onuMaps)`. The `./editor` and `./maps` entries are gone. Onu is now an optional peer dependency (`^0.2.1`). diff --git a/examples/onu/main.tsx b/examples/onu/main.tsx index 1a927d8..2356af1 100644 --- a/examples/onu/main.tsx +++ b/examples/onu/main.tsx @@ -1,140 +1,25 @@ -import * as React from "react" import { createRoot } from "react-dom/client" import { OnuProvider, ThemeProvider } from "@javaabu/onu" import { dv } from "@javaabu/onu/locales/dv" +import { useTranslation } from "@javaabu/i18n/react" -import * as Forms from "../../src" +import { FormsProvider, mergeAdapters } from "../../src" +import { onu } from "../../src/onu" +import { onuEditor } from "../../src/onu-editor" +import { Demo } from "../shared/demo" import "./styles.css" -const article = { - title: "Harbour works update", - slug: "harbour-works-update", - body: "First line\nSecond line", - status: "draft", - category: { id: 2, name: "News" }, - tags: [{ id: 1 }, { id: 3 }], - published_at: "2026-10-01 09:30:00", - is_featured: true, - channels: ["email"], - type: "quiz", - views: 1250, - media: [{ collection_name: "attachment", original_url: "/storage/1/report.pdf", file_name: "report.pdf" }], -} - -const users = [ - { - id: 1, - name: "Aishath Ali", - email: "aishath@example.com", - active: true, - role: { value: "admin", label: "Admin", color: "success" }, - }, - { - id: 2, - name: "Ibrahim Hassan", - email: "ibrahim@example.com", - active: false, - role: { value: "editor", label: "Editor", color: "warning" }, - }, -] +const ui = mergeAdapters(onu, onuEditor) function App() { - const [rtl, setRtl] = React.useState(new URLSearchParams(location.search).has("dv")) + const { direction } = useTranslation() return ( - - -
-
-

@javaabu/forms

- setRtl((v) => !v)}> - {rtl ? "English" : "ދިވެހި"} - -
- - - Your changes have been saved. - - - - new Promise((resolve) => setTimeout(() => resolve(values), 800))} - > - - - - - - - - - - - - - - - - - - - - Save - - - - - - - - - - - - - - - - - } - > - {users.map((user) => ( - - - - - - - ))} - - - - Home content - Profile content - - - -
-
+ {/* Onu has its own locale for its built-in strings; keep it in step with the page. */} + + + +
) diff --git a/examples/shared/demo.tsx b/examples/shared/demo.tsx new file mode 100644 index 0000000..e81d02a --- /dev/null +++ b/examples/shared/demo.tsx @@ -0,0 +1,149 @@ +import * as React from "react" +import { setLocale } from "@javaabu/i18n" +import { useTranslation } from "@javaabu/i18n/react" + +import * as Forms from "../../src" + +const article = { + title: "Harbour works update", + slug: "harbour-works-update", + body: "First line\nSecond line", + status: "draft", + category: { id: 2, name: "News" }, + tags: [{ id: 1 }, { id: 3 }], + published_at: "2026-10-01 09:30:00", + is_featured: true, + channels: ["email"], + type: "quiz", + views: 1250, + media: [{ collection_name: "attachment", original_url: "/storage/1/report.pdf", file_name: "report.pdf" }], +} + +const users = [ + { + id: 1, + name: "Aishath Ali", + email: "aishath@example.com", + active: true, + role: { value: "admin", label: "Admin", color: "success" }, + }, + { + id: 2, + name: "Ibrahim Hassan", + email: "ibrahim@example.com", + active: false, + role: { value: "editor", label: "Editor", color: "warning" }, + }, +] + +/** `?dv` starts the page in Dhivehi. */ +export function useDemoLocale() { + const { locale, direction } = useTranslation() + React.useEffect(() => { + if (new URLSearchParams(location.search).has("dv")) setLocale("dv") + }, []) + React.useEffect(() => { + document.documentElement.lang = locale + document.documentElement.dir = direction + }, [locale, direction]) + return { rtl: direction === "rtl", toggle: () => setLocale(direction === "rtl" ? "en" : "dv") } +} + +/** The same forms on every example page; only the adapter around them changes. */ +export function Demo({ title }: { title: string }) { + const { rtl, toggle } = useDemoLocale() + return ( +
+
+

{title}

+ + {rtl ? "English" : "ދިވެހި"} + +
+ + + Your changes have been saved. + + + + new Promise((resolve) => setTimeout(() => resolve(values), 800))} + > + + + + + + + + + + + + + + + + + + + + + + Save + + + + + + + + + + + + + + + + + } + > + {users.map((user) => ( + + + + + + + ))} + + + + Home content + Profile content + + + +
+ ) +} diff --git a/package.json b/package.json index c128c00..5cb98df 100644 --- a/package.json +++ b/package.json @@ -45,15 +45,25 @@ "import": "./dist/index.js", "require": "./dist/index.cjs" }, - "./editor": { - "types": "./dist/editor/index.d.ts", - "import": "./dist/editor/index.js", - "require": "./dist/editor/index.cjs" + "./html": { + "types": "./dist/html.d.ts", + "import": "./dist/html.js", + "require": "./dist/html.cjs" }, - "./maps": { - "types": "./dist/maps/index.d.ts", - "import": "./dist/maps/index.js", - "require": "./dist/maps/index.cjs" + "./onu": { + "types": "./dist/onu.d.ts", + "import": "./dist/onu.js", + "require": "./dist/onu.cjs" + }, + "./onu/editor": { + "types": "./dist/onu-editor.d.ts", + "import": "./dist/onu-editor.js", + "require": "./dist/onu-editor.cjs" + }, + "./onu/maps": { + "types": "./dist/onu-maps.d.ts", + "import": "./dist/onu-maps.js", + "require": "./dist/onu-maps.cjs" }, "./tailwind.css": "./src/styles/tailwind.css", "./package.json": "./package.json" @@ -78,7 +88,7 @@ "examples:build": "vite build --config examples/vite.config.ts" }, "peerDependencies": { - "@javaabu/onu": "^0.1.0", + "@javaabu/onu": "^0.2.1", "react": "^18.3.0 || ^19.0.0", "react-dom": "^18.3.0 || ^19.0.0" }, @@ -88,16 +98,27 @@ "@fontsource-variable/inter": "^5.3.0", "@fontsource-variable/jetbrains-mono": "^5.3.0", "@fontsource-variable/noto-sans-thaana": "^5.3.0", - "@javaabu/onu": "^0.1.0", + "@javaabu/onu": "^0.2.1", "@tailwindcss/vite": "^4.3.3", + "@tanstack/react-query": "^5.104.5", "@testing-library/jest-dom": "^7.0.1", "@testing-library/react": "^16.3.3", "@testing-library/user-event": "^14.6.8", + "@tiptap/core": "^3.32.2", + "@tiptap/extension-image": "^3.32.2", + "@tiptap/extension-placeholder": "^3.32.2", + "@tiptap/extension-table": "^3.32.2", + "@tiptap/extension-text-align": "^3.32.2", + "@tiptap/pm": "^3.32.2", + "@tiptap/react": "^3.32.2", + "@tiptap/starter-kit": "^3.32.2", + "@tiptap/static-renderer": "^3.32.2", + "@tiptap/suggestion": "^3.32.2", "@types/node": "^26.6.4", "@types/react": "^19.3.0", "@types/react-dom": "^19.3.0", "@vitejs/plugin-react": "^6.1.2", - "@vitest/coverage-v8": "^5.1.0", + "@vitest/coverage-v8": "^5.0.5", "eslint": "^10.12.0", "eslint-plugin-react-hooks": "^7.1.1", "globals": "^17.13.0", @@ -118,5 +139,13 @@ "@javaabu/onu": { "optional": true } + }, + "pnpm": { + "onlyBuiltDependencies": [ + "@javaabu/i18n" + ] + }, + "dependencies": { + "@javaabu/i18n": "github:Javaabu/i18n#build-on-git-install" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 570e0bc..d25998f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -7,6 +7,10 @@ settings: importers: .: + dependencies: + '@javaabu/i18n': + specifier: github:Javaabu/i18n#build-on-git-install + version: https://codeload.github.com/Javaabu/i18n/tar.gz/76730212d6f0f1d87a78635ed6e005dd5713cbba(react@19.3.1) devDependencies: '@changesets/cli': specifier: ^3.0.3 @@ -24,11 +28,14 @@ importers: specifier: ^5.3.0 version: 5.3.0 '@javaabu/onu': - specifier: ^0.1.0 - version: 0.1.0(@date-fns/tz@1.5.0)(@fontsource-variable/inter@5.3.0)(@fontsource-variable/jetbrains-mono@5.3.0)(@fontsource-variable/noto-sans-thaana@5.3.0)(@types/react-dom@19.3.0(@types/react@19.3.0))(@types/react@19.3.0)(react-dom@19.3.1(react@19.3.1))(react@19.3.1)(tailwindcss@4.3.3) + specifier: ^0.2.1 + version: 0.2.1(57d55d6dbb0eaaaa1f7be11acef43371) '@tailwindcss/vite': specifier: ^4.3.3 version: 4.3.3(vite@8.3.4(@types/node@26.6.5)(jiti@2.7.0)(yaml@2.9.1)) + '@tanstack/react-query': + specifier: ^5.104.5 + version: 5.104.5(@types/react@19.3.0)(react@19.3.1) '@testing-library/jest-dom': specifier: ^7.0.1 version: 7.0.1(@testing-library/dom@10.4.2)(vitest@5.0.5) @@ -38,6 +45,36 @@ importers: '@testing-library/user-event': specifier: ^14.6.8 version: 14.6.8(@testing-library/dom@10.4.2) + '@tiptap/core': + specifier: ^3.32.2 + version: 3.32.2(@tiptap/pm@3.32.2) + '@tiptap/extension-image': + specifier: ^3.32.2 + version: 3.32.2(@tiptap/core@3.32.2(@tiptap/pm@3.32.2)) + '@tiptap/extension-placeholder': + specifier: ^3.32.2 + version: 3.32.2(@tiptap/extensions@3.32.2(@tiptap/core@3.32.2(@tiptap/pm@3.32.2))(@tiptap/pm@3.32.2)) + '@tiptap/extension-table': + specifier: ^3.32.2 + version: 3.32.2(@tiptap/core@3.32.2(@tiptap/pm@3.32.2))(@tiptap/pm@3.32.2) + '@tiptap/extension-text-align': + specifier: ^3.32.2 + version: 3.32.2(@tiptap/core@3.32.2(@tiptap/pm@3.32.2)) + '@tiptap/pm': + specifier: ^3.32.2 + version: 3.32.2 + '@tiptap/react': + specifier: ^3.32.2 + version: 3.32.2(@floating-ui/dom@1.8.0)(@tiptap/core@3.32.2(@tiptap/pm@3.32.2))(@tiptap/pm@3.32.2)(@types/react-dom@19.3.0(@types/react@19.3.0))(@types/react@19.3.0)(react-dom@19.3.1(react@19.3.1))(react@19.3.1) + '@tiptap/starter-kit': + specifier: ^3.32.2 + version: 3.32.2 + '@tiptap/static-renderer': + specifier: ^3.32.2 + version: 3.32.2(@tiptap/core@3.32.2(@tiptap/pm@3.32.2))(@tiptap/pm@3.32.2)(react-dom@19.3.1(react@19.3.1))(react@19.3.1) + '@tiptap/suggestion': + specifier: ^3.32.2 + version: 3.32.2(@floating-ui/dom@1.8.0)(@tiptap/core@3.32.2(@tiptap/pm@3.32.2))(@tiptap/pm@3.32.2) '@types/node': specifier: ^26.6.4 version: 26.6.5 @@ -51,8 +88,8 @@ importers: specifier: ^6.1.2 version: 6.1.2(vite@8.3.4(@types/node@26.6.5)(jiti@2.7.0)(yaml@2.9.1)) '@vitest/coverage-v8': - specifier: ^5.1.0 - version: 5.1.0(vitest@5.0.5) + specifier: ^5.0.5 + version: 5.0.5(vitest@5.0.5) eslint: specifier: ^10.12.0 version: 10.13.0(jiti@2.7.0) @@ -88,7 +125,7 @@ importers: version: 8.3.4(@types/node@26.6.5)(jiti@2.7.0)(yaml@2.9.1) vitest: specifier: ^5.0.5 - version: 5.0.5(@types/node@26.6.5)(@vitest/coverage-v8@5.1.0)(jsdom@30.1.3)(vite@8.3.4(@types/node@26.6.5)(jiti@2.7.0)(yaml@2.9.1)) + version: 5.0.5(@types/node@26.6.5)(@vitest/coverage-v8@5.0.5)(jsdom@30.1.3)(vite@8.3.4(@types/node@26.6.5)(jiti@2.7.0)(yaml@2.9.1)) packages: @@ -174,33 +211,6 @@ packages: resolution: {integrity: sha512-Vj1jF3cPfxg7OAfoI7QnVKLoILlm2JF9pnVHrX8qx7AHMiYWT+NDAA7jChlNgRS4WTLc/fD1lXLmPixluj+3Gg==} engines: {node: '>=6.9.0'} - '@base-ui/react@1.9.0': - resolution: {integrity: sha512-S8CSYosASBKtpL8SWUfS78rFElfLijiCgA7oHOK22jCJ95FULsYyKwBNFOgudt0RA+/7yNc7F81bOvQnRgbBiQ==} - engines: {node: '>=14.0.0'} - peerDependencies: - '@date-fns/tz': ^1.2.0 - '@types/react': ^17 || ^18 || ^19 - date-fns: ^4.0.0 - react: ^17 || ^18 || ^19 - react-dom: ^17 || ^18 || ^19 - peerDependenciesMeta: - '@date-fns/tz': - optional: true - '@types/react': - optional: true - date-fns: - optional: true - - '@base-ui/utils@0.5.0': - resolution: {integrity: sha512-dYGGcEttjkYiMoa5nHm8vLaJ2UcuTWxo3BFAwOYXeRg/q7UVVvA6cacEIXEs3FgBfK1CGtW1ptElqs7wsx+t9A==} - peerDependencies: - '@types/react': ^17 || ^18 || ^19 - react: ^17 || ^18 || ^19 - react-dom: ^17 || ^18 || ^19 - peerDependenciesMeta: - '@types/react': - optional: true - '@bcoe/v8-coverage@1.0.2': resolution: {integrity: sha512-6zABk/ECA/QYSCQ1NGiVwwbQerUCZ+TQbp64Q3AgmfNvurHH0j8TtXa1qbShXA6qqkpAj4V5W8pP6mLe1mcMqA==} engines: {node: '>=18'} @@ -448,8 +458,21 @@ packages: '@internationalized/string@3.2.10': resolution: {integrity: sha512-PDx6//vHSpRnHfxqMqto11zQvhsaU74O3mKv2F/0eicGZcl9NLjQmGlbHz/LsJh5tLKp4A4L7ZVTzN1/MmMTvA==} - '@javaabu/onu@0.1.0': - resolution: {integrity: sha512-A31c8LX3LK73hLqkCfZ1fYTO8bM+T9MSZT/nChIOdO29R8ogCYHd9tuNcr2TmG7Xxj5M2SU1Z2F6XywETyu8wQ==} + '@javaabu/i18n@https://codeload.github.com/Javaabu/i18n/tar.gz/76730212d6f0f1d87a78635ed6e005dd5713cbba': + resolution: {tarball: https://codeload.github.com/Javaabu/i18n/tar.gz/76730212d6f0f1d87a78635ed6e005dd5713cbba} + version: 0.0.0 + engines: {node: '>=20.19'} + peerDependencies: + react: ^18.0.0 || ^19.0.0 + vue: ^3.3.0 + peerDependenciesMeta: + react: + optional: true + vue: + optional: true + + '@javaabu/onu@0.2.1': + resolution: {integrity: sha512-GE4takAQwNQqD9ZmQooH7KMBrLUoiR4UzJsDCGr6cLYigoLF22tjRD3CzrdVGVl+SAhz2jjwOozxzyvAyTNmxA==} peerDependencies: '@deck.gl/aggregation-layers': ^9.4.0 '@deck.gl/core': ^9.4.0 @@ -470,11 +493,9 @@ packages: '@fullcalendar/timegrid': ^6.1.21 '@googlemaps/markerclusterer': ^2.6.2 '@iconify/react': ^6.0.2 + '@tanstack/react-query': ^5.104.1 '@tiptap/core': ^3.31.4 - '@tiptap/extension-code-block-lowlight': ^3.31.4 - '@tiptap/extension-drag-handle-react': ^3.31.4 '@tiptap/extension-image': ^3.31.4 - '@tiptap/extension-link': ^3.31.4 '@tiptap/extension-placeholder': ^3.31.4 '@tiptap/extension-table': ^3.31.4 '@tiptap/extension-text-align': ^3.31.4 @@ -486,12 +507,11 @@ packages: '@turf/turf': ^7.4.0 '@vis.gl/react-google-maps': ^1.10.1 barcode-detector: ^3.2.2 - lowlight: ^3.3.0 media-chrome: ^4.19.3 - react: ^18.3.0 || ^19.0.0 - react-dom: ^18.3.0 || ^19.0.0 + react: ^19.0.0 + react-dom: ^19.0.0 react-easy-crop: ^6.2.4 - react-querybuilder: ^8.24.4 + react-hook-form: ^7.89.0 recharts: ^3.10.1 shiki: ^4.5.0 signature_pad: ^5.1.4 @@ -541,14 +561,8 @@ packages: optional: true '@tiptap/core': optional: true - '@tiptap/extension-code-block-lowlight': - optional: true - '@tiptap/extension-drag-handle-react': - optional: true '@tiptap/extension-image': optional: true - '@tiptap/extension-link': - optional: true '@tiptap/extension-placeholder': optional: true '@tiptap/extension-table': @@ -571,14 +585,10 @@ packages: optional: true barcode-detector: optional: true - lowlight: - optional: true media-chrome: optional: true react-easy-crop: optional: true - react-querybuilder: - optional: true recharts: optional: true shiki: @@ -1605,6 +1615,192 @@ packages: peerDependencies: '@testing-library/dom': '>=7.21.4' + '@tiptap/core@3.32.2': + resolution: {integrity: sha512-EitM8KY3agYfnp/bqhfxcaReVq4CUqVzMqoSIl7xSfYABTGYoTDtVXUdYSGutcCBFjc86BbXjrOlDlqkgC8BsQ==} + peerDependencies: + '@tiptap/pm': 3.32.2 + + '@tiptap/extension-blockquote@3.32.2': + resolution: {integrity: sha512-VLcdnbOm7G52NpUhgbyo3XIOz6Eky7/DyGYuYnCpEUe0TE5xk7Qs6ukrh9vaf2XhyeLDHsmVZuzybGrdtqoC0w==} + peerDependencies: + '@tiptap/core': 3.32.2 + '@tiptap/pm': 3.32.2 + + '@tiptap/extension-bold@3.32.2': + resolution: {integrity: sha512-5Q8bScZEZbIBB2tBgnc7Cr6XuH2Nt/6l1HP3FO0wWO7nqXPOcodEbjslePI3v1iag+LNWX16BZ8fDrJr/PbxXA==} + peerDependencies: + '@tiptap/core': 3.32.2 + + '@tiptap/extension-bubble-menu@3.32.2': + resolution: {integrity: sha512-mwxWtLHiwhtzXpvdjoegH10eIA8CJr5INGAzUSfzRp4v13zH3rDbsoafljwEi+V5JfcSY/bbXf1akOtsny4yXw==} + peerDependencies: + '@tiptap/core': 3.32.2 + '@tiptap/pm': 3.32.2 + + '@tiptap/extension-bullet-list@3.32.2': + resolution: {integrity: sha512-YP7IlC3swrNPlnFHIgVDsDl70geqqWtcAkbuncQEs5FJ9UQg432VwVfwCUW4NsG532p5AqlTTwOKcSLS7p/pqA==} + peerDependencies: + '@tiptap/extension-list': 3.32.2 + + '@tiptap/extension-code-block@3.32.2': + resolution: {integrity: sha512-KFkPMMgXEgXImGpbUsrHNaERtvOGbJ/JiWn0zHNGSJCf6frn44OLeRFPpEMptmwMqtJxftBVFbEbcPOlATYqDw==} + peerDependencies: + '@tiptap/core': 3.32.2 + '@tiptap/pm': 3.32.2 + + '@tiptap/extension-code@3.32.2': + resolution: {integrity: sha512-jm7qXuDmBzQYPemm/9chLepQjCNVtZhaoU9N2f4GxdUi8u/fi3AQLP7xlXjRCQUyam50FVqIIWgD567mLQ3sMg==} + peerDependencies: + '@tiptap/core': 3.32.2 + + '@tiptap/extension-document@3.32.2': + resolution: {integrity: sha512-zKWj8jh1kpckfSwle+kqFn0ZnYvkhb7nz89nrNvpnnsQMbbGU2/+bUAfYU3XSEKZr3VBvW176FtlMPD8ggC3Cg==} + peerDependencies: + '@tiptap/core': 3.32.2 + + '@tiptap/extension-dropcursor@3.32.2': + resolution: {integrity: sha512-mE9muf4KSY3s+LCaHG/G957pVHVF2q46i+YkZF3ZG70errQcyZ5YFKnce9PSL1fiL0VLL+2UhMAL2QDM5oDiNA==} + peerDependencies: + '@tiptap/extensions': 3.32.2 + + '@tiptap/extension-floating-menu@3.32.2': + resolution: {integrity: sha512-JPyJQvJlGDxn2v7Mr8Yft2BmcXaHiapVsXBMYiOJh5BeWbnwUYFWNH9h5PU/xTOz2zVEV79Kh4HmpgXZS3FCbg==} + peerDependencies: + '@floating-ui/dom': ^1.0.0 + '@tiptap/core': 3.32.2 + '@tiptap/pm': 3.32.2 + + '@tiptap/extension-gapcursor@3.32.2': + resolution: {integrity: sha512-7W/iX8h6KQ2HK2SfvzCIgySOEJwTM4owqz1tXVOPiLPvKSvDDa9GQsp60+xNyqDNHuplE8bRsZ5dH1nilgAaAg==} + peerDependencies: + '@tiptap/extensions': 3.32.2 + + '@tiptap/extension-hard-break@3.32.2': + resolution: {integrity: sha512-oIdXmya2XBzp3Cw9Nr36agPvr9ZXP3p2fQXaFflxYYBKOG3UUzw38CId7J6K1jYxBf8c1zodbiKFEL7rttJ6fQ==} + peerDependencies: + '@tiptap/core': 3.32.2 + + '@tiptap/extension-heading@3.32.2': + resolution: {integrity: sha512-AE2WNA3jVnPV/cVyTwTmtmGZqX8LiiGicDHXX4bdvfzv+Aez4sgzdkuFjOGWtnEy43NnXdoI1UX7y/984NM0iA==} + peerDependencies: + '@tiptap/core': 3.32.2 + + '@tiptap/extension-horizontal-rule@3.32.2': + resolution: {integrity: sha512-Pl0YRS60R339yHrAWGhPT9WHIlD72BO6SGVdj8lBs2OAaYw5RQL/1BGZi+7UvAyc2yJxaRC4XN9X4jdQHDUq9A==} + peerDependencies: + '@tiptap/core': 3.32.2 + '@tiptap/pm': 3.32.2 + + '@tiptap/extension-image@3.32.2': + resolution: {integrity: sha512-TRjp//2r1MTE1emLXxEki6+D0bOPYaX41CnM1hrUnp1iw/cS0a4XBXAWXxK/EFEl94zrqWrafkarU9rXpnBHeg==} + peerDependencies: + '@tiptap/core': 3.32.2 + + '@tiptap/extension-italic@3.32.2': + resolution: {integrity: sha512-aqk8OK4Xo59qZni7YSy42/ltQFb2IOmli3YERIq1XPQ4vl5sxoYhL+sFoOPmvbjHvaHZpK6n8vPh1SmAnB570A==} + peerDependencies: + '@tiptap/core': 3.32.2 + + '@tiptap/extension-link@3.32.2': + resolution: {integrity: sha512-EwQtMXsU1Vc03n+yud7lfaR+RjHTPwFyI/hcEylvJba7iIXDSLA/ey4mnpwt2od8CEx/ZcOutIryORKVR9Py/Q==} + peerDependencies: + '@tiptap/core': 3.32.2 + '@tiptap/pm': 3.32.2 + + '@tiptap/extension-list-item@3.32.2': + resolution: {integrity: sha512-vTdPfzZODLVXog/NMs6zcaTOhtlh6ptJidlMg8l1TLhO+YQyEyO/K45aV429D9xTo/BOVazreav/C+hgemSnYg==} + peerDependencies: + '@tiptap/extension-list': 3.32.2 + + '@tiptap/extension-list-keymap@3.32.2': + resolution: {integrity: sha512-SioQO8TqRb8aq9L+GpI/a/F7HCSBarm3Uvqtt2YttyazjSjEedu1zSnaa93V+WEFmlqyXnxVa24vv2zj6qlavQ==} + peerDependencies: + '@tiptap/extension-list': 3.32.2 + + '@tiptap/extension-list@3.32.2': + resolution: {integrity: sha512-rLYk3GXSswrCakyZwo8VW0+yjnYhLJSBRvzClneIrlPhqQ2r/oDUjeqkpm8lGvwREw1lDSh7wefGhkhTRcQkAw==} + peerDependencies: + '@tiptap/core': 3.32.2 + '@tiptap/pm': 3.32.2 + + '@tiptap/extension-ordered-list@3.32.2': + resolution: {integrity: sha512-WQw2fLtJAxCYftKAk+YNlPDc+OxtXK4nNfXRBwr6oC67SoJtoLe0bo5jS6vF+cEqzHjDaboJi+O3MSNp2L2VQA==} + peerDependencies: + '@tiptap/extension-list': 3.32.2 + + '@tiptap/extension-paragraph@3.32.2': + resolution: {integrity: sha512-3bqC//4GEhUiux3dhW/TJuveBp9ADv4nHlqBdVQa3A+USGbaBvE9YvXxA32wZL0leSRykxEnHbNHZ1J4KjIynQ==} + peerDependencies: + '@tiptap/core': 3.32.2 + + '@tiptap/extension-placeholder@3.32.2': + resolution: {integrity: sha512-T+QVayKhakLbFhne7nEdo8omHcEevo8ksEYdKSCeTLoaVInaAiG9WwkKSJymhQ81EbOMS1WsO0XJnb3mrx9PHw==} + peerDependencies: + '@tiptap/extensions': 3.32.2 + + '@tiptap/extension-strike@3.32.2': + resolution: {integrity: sha512-i3d4vCrZySS9g5nGa5W0LS6LPMKxcAnJO6uADTnGVlKK0ewklcWWZbZ9GB/Fpx/IjKAvXWeayjfsNpTae/yVZg==} + peerDependencies: + '@tiptap/core': 3.32.2 + + '@tiptap/extension-table@3.32.2': + resolution: {integrity: sha512-CIFQaKOwdNFPaApymZRNhAnpGpl3Y53V1sqTgQV9FtI4qi6H3mAR032GtasUzo7DpBaOHpNNbMgph0yyVCJF9g==} + peerDependencies: + '@tiptap/core': 3.32.2 + '@tiptap/pm': 3.32.2 + + '@tiptap/extension-text-align@3.32.2': + resolution: {integrity: sha512-o1DKPodB0FKqpdYp/OKyM6nYSbZXnPEC9rWx/O/Vccs2OOeF08iOO3cKYs1lS/qNg/xFeR8gKxGMrve7CfCkKA==} + peerDependencies: + '@tiptap/core': 3.32.2 + + '@tiptap/extension-text@3.32.2': + resolution: {integrity: sha512-W6G7UbQ71TyvZvORDdj6u8By8B/Dymy8KoaKGaNHqB82SpM42ZK2TmeFBHI0Lo4wTkZJL3LuI+QthaDvh0USsA==} + peerDependencies: + '@tiptap/core': 3.32.2 + + '@tiptap/extension-underline@3.32.2': + resolution: {integrity: sha512-kY7B5ocKx3JzqIl2kLXGvnLGZRxuYEFzMkpgJ6Vh6/VTTK+JCeOVItYEQGFrAxrodIMmhIrXpi1jF57s6iZswg==} + peerDependencies: + '@tiptap/core': 3.32.2 + + '@tiptap/extensions@3.32.2': + resolution: {integrity: sha512-TUE1JedPjYQ/T527f2a4xz+4Xi1a5nIgW8KwC0DjmqbaHirlz0eCNI2nMEN70pu5WPpqgXmki3lCF3LScQxIGw==} + peerDependencies: + '@tiptap/core': 3.32.2 + '@tiptap/pm': 3.32.2 + + '@tiptap/pm@3.32.2': + resolution: {integrity: sha512-4cuUbYf55NnYBIvDBK/K1VFVQ4pocKwAZC5TAy4s9dptvazxVHkQVMbiQsyhwfIbM4rxmHWkM/6omaFfTB++/g==} + + '@tiptap/react@3.32.2': + resolution: {integrity: sha512-IrraXFTp6S9R+GlCzavMUQel0wK9wafXU3VnaujeC/REi6sYWNuyBe0jICimdbEk1dU32UvlkvPCuIDRPKlzaQ==} + peerDependencies: + '@tiptap/core': 3.32.2 + '@tiptap/pm': 3.32.2 + '@types/react': ^17.0.0 || ^18.0.0 || ^19.0.0 + '@types/react-dom': ^17.0.0 || ^18.0.0 || ^19.0.0 + react: ^17.0.0 || ^18.0.0 || ^19.0.0 + react-dom: ^17.0.0 || ^18.0.0 || ^19.0.0 + + '@tiptap/starter-kit@3.32.2': + resolution: {integrity: sha512-6K+oOMF4orhnOxivgUTKiSpNAEftHyWOcfFIvIEMUP044b34obBUogzMTfM3RjtewZtQXVafO9zmGU30IllC1g==} + + '@tiptap/static-renderer@3.32.2': + resolution: {integrity: sha512-2q+Ox47fWQQdHupAP1QAFoCTbFN69j0bM+Lemxw9KMLCUT0+ALjUJkkVEeme18uelJkaJ4hufH4buKaJpADh9A==} + peerDependencies: + '@tiptap/core': 3.32.2 + '@tiptap/pm': 3.32.2 + react: ^17.0.0 || ^18.0.0 || ^19.0.0 + react-dom: ^17.0.0 || ^18.0.0 || ^19.0.0 + + '@tiptap/suggestion@3.32.2': + resolution: {integrity: sha512-AD6WQ+mEFLok8svJv6Ibffyao+vXBGn3klQo4gCXH+UHwtgct5tF4goL9Rsz8J6zcDmYfx5W8AqYjBiQIyRNHA==} + peerDependencies: + '@floating-ui/dom': ^1.0.0 + '@tiptap/core': 3.32.2 + '@tiptap/pm': 3.32.2 + '@types/aria-query@5.0.4': resolution: {integrity: sha512-rfT93uj5s0PRL7EzccGMs3brplhcrghnDoV26NqKhCAS1hVo+WdNsPvE/yb6ilfr5hi2MEk6d5EWJTKdxg8jVw==} @@ -1634,6 +1830,9 @@ packages: '@types/react@19.3.0': resolution: {integrity: sha512-N0rFCuH9YoxG9/m61l9MfpJKfmLOVU0em7ipIz6TRgSSkvReLB9vL85GB+yr8Bs5leqpvg96JSwF4ZS1s4viQg==} + '@types/use-sync-external-store@0.0.6': + resolution: {integrity: sha512-zFDAD+tlpf2r4asuHEj0XH6pY6i0g5NeAHPn+15wk3BV6JA69eERFXC1gyGThDkVa1zCyKr5jox1+2LbV/AMLg==} + '@typescript-eslint/eslint-plugin@8.72.0': resolution: {integrity: sha512-aysKgysPX9XOv/dk95UkvUDe++Q3n3dJPG9CEWT3RUccxfkPJ+Qn6nhKPDhZXU6Ofo9kgwGWwKyQCnZIXTgngg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -1709,21 +1908,21 @@ packages: oxc-transform-react: optional: true - '@vitest/coverage-v8@5.1.0': - resolution: {integrity: sha512-OY9aShBQG5KOIw2zCo9fDoCHI9RHliNHJ//nM7m6jGg41Hyke9JOGWmeMlK74xYErsxMoK8mIB3gAeEyFVA7LA==} + '@vitest/coverage-v8@5.0.5': + resolution: {integrity: sha512-4KpkGdIrSqBihx/JyP/e+S+IKB98etg1XDQiLAxksLfcShnwi1VReGeOT9NI43hLHbknosKp/1CCLn9Zgcs8mg==} peerDependencies: - '@vitest/browser': 5.1.0 - vitest: 5.1.0 + '@vitest/browser': 5.0.5 + vitest: 5.0.5 peerDependenciesMeta: '@vitest/browser': optional: true - '@vitest/istanbul-lib-coverage@2.1.0': - resolution: {integrity: sha512-WOjuS+xcjSIy7ruYBQ+9BUcV7XZQ0FyVcbWbWxW9TRx/kLGx5SQaeFRIFDJxjNplb6YsT7SpKo2zuXXUo91OIQ==} + '@vitest/istanbul-lib-coverage@1.0.2': + resolution: {integrity: sha512-9J/JMwOf9AoJhAywhrn7ScKTL38hsWQP/qPG60OtaAFcQ5OXPwKsxZFlbnuCKmZ61m8/lGgHYnFpdyQZUvG/iA==} engines: {node: '>=22'} - '@vitest/istanbul-lib-report@2.1.0': - resolution: {integrity: sha512-+ZFta25nWtGCOBG9/IET8w1RO5Oawsd6H8Uf6AJ9EA/StFuKVtKAEJEJ6uRt84OH+T4YkI0ASmIHAhRA+0KVxw==} + '@vitest/istanbul-lib-report@1.0.2': + resolution: {integrity: sha512-gUsfXZJbzPamoIY5TvHFiMMoXESBrUMo+xqaj+rYrWI69+EnvRlYBlP96ZnHPY4vX8kyUpgAnFUCg5wZG/HkDQ==} engines: {node: '>=22'} '@vitest/mocker@5.0.5': @@ -1779,10 +1978,6 @@ packages: ast-v8-to-istanbul@1.0.7: resolution: {integrity: sha512-kFL68AG6ajd8fg248zwM9GQrUWEp79gsmjum34OEXjs4yHuUMZfYKwOLW9GMmB4oNvVrj+EAGxsP7ye2UR9UlA==} - attr-accept@4.0.1: - resolution: {integrity: sha512-rOKAGOwbnTUvwTL8rNA0hWnU3uX9tOI20di4KjR5I1ez/RJmnA37W3zz4EMxGC2YnI289yPjRy63CdAZeQFZ4Q==} - engines: {node: '>= 22'} - balanced-match@4.0.4: resolution: {integrity: sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==} engines: {node: 18 || 20 || >=22} @@ -1993,6 +2188,10 @@ packages: fast-deep-equal@3.1.3: resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} + fast-equals@5.4.5: + resolution: {integrity: sha512-yKEpcFuRPu/pTQL2VB8YKE2yFldrLlIsoWtJeBnAdqEhvu21OgkFT0C8njf/xYc2LSZGEr3K9JGjthHJxnVLvQ==} + engines: {node: '>=6.0.0'} + fast-json-stable-stringify@2.1.0: resolution: {integrity: sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==} @@ -2020,10 +2219,6 @@ packages: file-entry-cache@11.1.5: resolution: {integrity: sha512-+PFTHITI08JIGhnNpGNI8T8inUpgZfk3GNEqfT9R2zZV2iFXg3CvqzSl/uEhs7TSGujYRELEANyDvS8Fj7+S7Q==} - file-selector@5.0.2: - resolution: {integrity: sha512-1hAy178VaMCWWj/vSUITOTpLWH1PoGW3eO7i3kPIppuSyOHBm3o1cHq+CvKAM5hQKQXlazrDt/3K1HCXgs7MpQ==} - engines: {node: '>= 22'} - find-up@5.0.0: resolution: {integrity: sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==} engines: {node: '>=10'} @@ -2326,6 +2521,9 @@ packages: resolution: {integrity: sha512-WkUDrojuJs0xkgGf2udWxa3yGBRxPtxUkB79i6aCZLRgc7PM8fZe9TosfPDcvEpQZbuFASnHYmRLBLUbmLOIIA==} engines: {node: '>= 12.0.0'} + linkifyjs@4.4.0: + resolution: {integrity: sha512-InTexvtbai+2c+dEVGcc6O6P2DMVIiwD9a/i4zFroazOIYLOS6FSVmAJ7kFeumnCMx6/gQqNAkbUvgMubV4+MA==} + locate-path@6.0.0: resolution: {integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==} engines: {node: '>=10'} @@ -2401,6 +2599,9 @@ packages: resolution: {integrity: sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==} engines: {node: '>= 0.8.0'} + orderedmap@2.1.1: + resolution: {integrity: sha512-TvAWxi0nDe1j/rtMcWcIj94+Ffe6n7zhow33h40SKxmsmozs6dz/e+EajymfoFcHd7sxNn8yHM8839uixMOV6g==} + p-limit@3.1.0: resolution: {integrity: sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==} engines: {node: '>=10'} @@ -2450,6 +2651,45 @@ packages: prop-types@15.8.1: resolution: {integrity: sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==} + prosemirror-changeset@2.4.6: + resolution: {integrity: sha512-P0cY3DSLm4M2boUOCmHDyaID5o6HgWmb21Bvs9p8lLqfJjKBBEHG5Ma5qW5SCmwOYamtWOLf2k+yvt6077zlTg==} + + prosemirror-commands@1.7.2: + resolution: {integrity: sha512-q6Q6szxqdu9Xd6EcdKsqXghu5nQdZTpB4Q9yd04WRc7/jt763e/rT60Owh0L1GYY+T46o5rD+9lEN36dZS43tw==} + + prosemirror-dropcursor@1.8.4: + resolution: {integrity: sha512-VmKxhcA6a+h5oPSYmfF1ZNeQqPbyYaIxqZsKqeYCyTlPtrjUgNaHL3P8vVaO19oqAV0zuaM/axkowZHrB1P3Tg==} + + prosemirror-gapcursor@1.4.1: + resolution: {integrity: sha512-pMdYaEnjNMSwl11yjEGtgTmLkR08m/Vl+Jj443167p9eB3HVQKhYCc4gmHVDsLPODfZfjr/MmirsdyZziXbQKw==} + + prosemirror-history@1.5.1: + resolution: {integrity: sha512-onlwnqKvgtFg6srZOmDOAhlAy1FIHQpOExORybX0S+DvJepE5tPALrB9iGet/2sqqqrelSnB10OoiOJqAvu2DA==} + + prosemirror-inputrules@1.5.1: + resolution: {integrity: sha512-7wj4uMjKaXWAQ1CDgxNzNtR9AlsuwzHfdFH1ygEHA2KHF2DOEaXl1CJfNPAKCg9qNEh4rum975QLaCiQPyY6Fw==} + + prosemirror-keymap@1.2.3: + resolution: {integrity: sha512-4HucRlpiLd1IPQQXNqeo81BGtkY8Ai5smHhKW9jjPKRc2wQIxksg7Hl1tTI2IfT2B/LgX6bfYvXxEpJl7aKYKw==} + + prosemirror-model@1.25.12: + resolution: {integrity: sha512-Ue2gTmXMa7EhpLNhC7J+h4+ykD8ha12K6rrZFFKKJHBForfIStw5gJ6Zrf1mqqAa9NmpmEB4wp9bKmA4eUVjWg==} + + prosemirror-schema-list@1.6.0: + resolution: {integrity: sha512-G1srDtan+VqWn+qpmWFj/6j0YsZ5zMU+ZIlGVIW41a5JF2jAI3jzfMRWmSABmEH2Qoq1PmAG/o2mucMMdLOsLg==} + + prosemirror-state@1.4.4: + resolution: {integrity: sha512-6jiYHH2CIGbCfnxdHbXZ12gySFY/fz/ulZE333G6bPqIZ4F+TXo9ifiR86nAHpWnfoNjOb3o5ESi7J8Uz1jXHw==} + + prosemirror-tables@1.8.5: + resolution: {integrity: sha512-V/0cDCsHKHe/tfWkeCmthNUcEp1IVO3p6vwN8XtwE9PZQLAZJigbw3QoraAdfJPir4NKJtNvOB8oYGKRl+t0Dw==} + + prosemirror-transform@1.12.4: + resolution: {integrity: sha512-2/WuPum3pn+O/Vi2vzpi8210ICUe2kIPXdLYjQ09Pv5DtT5bcKWMJhAKPBwvpPjpp5iOYUVwVEr0gOM1BY1Mgw==} + + prosemirror-view@1.42.9: + resolution: {integrity: sha512-bKbfzeKZOu2H2JQU2TaJmYu6EBcor3VnGIR4jR31cbEt1ztUnfUB6bKGV1+fJzOJdrVWR+tRU0208zM3oQx4wA==} + punycode@2.3.1: resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==} engines: {node: '>=6'} @@ -2498,16 +2738,6 @@ packages: peerDependencies: react: ^19.3.1 - react-dropzone@20.1.4: - resolution: {integrity: sha512-LyjT9iQySNkJGC6yL+XTlmfTRxHhPx0eSoTh+WlR0Ge+W35rLcRH/oH7w5bzijfPHeCFcLnO9G7i+hX+LINAAA==} - engines: {node: '>= 22'} - peerDependencies: - '@types/react': '*' - react: '>= 18' - peerDependenciesMeta: - '@types/react': - optional: true - react-hook-form@7.90.0: resolution: {integrity: sha512-+NdG0FLzCPhFOp2NNxaUYLF9fyZhNjx9FTBBSYWF71/l6BBlmIc/j6xlp3DbaHWLJbIG7Zd8oznA19xJClU97w==} engines: {node: '>=18.0.0'} @@ -2550,16 +2780,6 @@ packages: '@types/react': optional: true - react-resizable-panels@4.18.0: - resolution: {integrity: sha512-ACofxw/KAyxYa+3uCT9FAFR38HeoDhnSP5Lw9Jgm8u3fDcrDlQxArgW67P6ohd/SUVKMv4Lw4u37aV/G76Sp3Q==} - peerDependencies: - '@types/react': ^18.2.6 || ^19.0.0 - react: ^18.0.0 || ^19.0.0 - react-dom: ^18.0.0 || ^19.0.0 - peerDependenciesMeta: - '@types/react': - optional: true - react-stately@3.51.0: resolution: {integrity: sha512-YJcmkAXu2XOQP97hO/qz/cC3qv9kni3oVhwBlxWr358BHePJUpY15XwL3YSRMKxYt4EkslPqAz11JRirMfANGw==} peerDependencies: @@ -2587,14 +2807,14 @@ packages: resolution: {integrity: sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==} engines: {node: '>=0.10.0'} - reselect@5.3.0: - resolution: {integrity: sha512-XGoLeRAVzUTcJ1qkxPQhDJyIZ5d6zzZD9nT7AEZOaaU9UbWclhycElmhO+VD5bFeLuzhPBaOV2oXC8uG35ZSpg==} - rolldown@1.2.14: resolution: {integrity: sha512-eTBTTqMR6uHKLgcUqpJP8ntzDI6V4LYA8negAMBEI7gkgVvOdrx6VsvS2Ym+83KhOPdLCHWJu0w7UQFJZhHKNw==} engines: {node: ^20.19.0 || >=22.12.0} hasBin: true + rope-sequence@1.3.4: + resolution: {integrity: sha512-UT5EDe2cu2E/6O4igUr5PSFs23nvvukicWHx6GnOPlHAiiYbzNuCRQCuiUdHJQcqKalLKlrYJnjY0ySGsXNQXQ==} + saxes@6.0.0: resolution: {integrity: sha512-xAg7SOnEhrm5zI3puOOKyy1OMcMlIJZYNJY7xLBwSze0UjhPLnWfj2GF2EpT0jmzaJKIWKHLsaSSajf35bcYnA==} engines: {node: '>=v12.22.7'} @@ -2850,6 +3070,9 @@ packages: jsdom: optional: true + w3c-keyname@2.2.8: + resolution: {integrity: sha512-dpojBhNsCNN7T82Tm7k26A6G9ML3NkhDsnw9n/eoxSRlVBB4CEtIQ/KTCLI2Fwf3ataSXRhYFkQi3SlnFwPvPQ==} + w3c-xmlserializer@6.0.0: resolution: {integrity: sha512-4Nsy8K5Tr6SPDH9jhKJOHf7ChDrc1zufZTVSF7x72hwuEXBqxqk9G6cK+K2NRUtB3iELRJqjXb4JPDMBjMTl2Q==} engines: {node: ^22.22.2 || ^24.15.0 || >=26.0.0} @@ -3029,31 +3252,6 @@ snapshots: '@babel/helper-string-parser': 7.29.7 '@babel/helper-validator-identifier': 7.29.7 - '@base-ui/react@1.9.0(@date-fns/tz@1.5.0)(@types/react@19.3.0)(date-fns@4.4.0)(react-dom@19.3.1(react@19.3.1))(react@19.3.1)': - dependencies: - '@babel/runtime': 7.29.10 - '@base-ui/utils': 0.5.0(@types/react@19.3.0)(react-dom@19.3.1(react@19.3.1))(react@19.3.1) - '@floating-ui/react-dom': 2.1.9(react-dom@19.3.1(react@19.3.1))(react@19.3.1) - '@floating-ui/utils': 0.2.12 - react: 19.3.1 - react-dom: 19.3.1(react@19.3.1) - use-sync-external-store: 1.7.0(react@19.3.1) - optionalDependencies: - '@date-fns/tz': 1.5.0 - '@types/react': 19.3.0 - date-fns: 4.4.0 - - '@base-ui/utils@0.5.0(@types/react@19.3.0)(react-dom@19.3.1(react@19.3.1))(react@19.3.1)': - dependencies: - '@babel/runtime': 7.29.10 - '@floating-ui/utils': 0.2.12 - react: 19.3.1 - react-dom: 19.3.1(react@19.3.1) - reselect: 5.3.0 - use-sync-external-store: 1.7.0(react@19.3.1) - optionalDependencies: - '@types/react': 19.3.0 - '@bcoe/v8-coverage@1.0.2': {} '@bramus/specificity@2.4.3': @@ -3345,9 +3543,12 @@ snapshots: dependencies: '@swc/helpers': 0.5.23 - '@javaabu/onu@0.1.0(@date-fns/tz@1.5.0)(@fontsource-variable/inter@5.3.0)(@fontsource-variable/jetbrains-mono@5.3.0)(@fontsource-variable/noto-sans-thaana@5.3.0)(@types/react-dom@19.3.0(@types/react@19.3.0))(@types/react@19.3.0)(react-dom@19.3.1(react@19.3.1))(react@19.3.1)(tailwindcss@4.3.3)': + '@javaabu/i18n@https://codeload.github.com/Javaabu/i18n/tar.gz/76730212d6f0f1d87a78635ed6e005dd5713cbba(react@19.3.1)': + optionalDependencies: + react: 19.3.1 + + '@javaabu/onu@0.2.1(57d55d6dbb0eaaaa1f7be11acef43371)': dependencies: - '@base-ui/react': 1.9.0(@date-fns/tz@1.5.0)(@types/react@19.3.0)(date-fns@4.4.0)(react-dom@19.3.1(react@19.3.1))(react@19.3.1) '@dnd-kit/dom': 0.5.1 '@dnd-kit/helpers': 0.5.1 '@dnd-kit/react': 0.5.1(react-dom@19.3.1(react@19.3.1))(react@19.3.1) @@ -3368,10 +3569,8 @@ snapshots: react-aria-components: 1.22.1(react-dom@19.3.1(react@19.3.1))(react@19.3.1) react-day-picker: 10.0.2(@types/react@19.3.0)(react@19.3.1) react-dom: 19.3.1(react@19.3.1) - react-dropzone: 20.1.4(@types/react@19.3.0)(react@19.3.1) react-hook-form: 7.90.0(@types/react@19.3.0)(react@19.3.1) react-phone-number-input: 3.4.18(react-dom@19.3.1(react@19.3.1))(react@19.3.1) - react-resizable-panels: 4.18.0(@types/react@19.3.0)(react-dom@19.3.1(react@19.3.1))(react@19.3.1) sonner: 2.0.8(@types/react@19.3.0)(react-dom@19.3.1(react@19.3.1))(react@19.3.1) tailwind-merge: 3.7.0 tailwindcss: 4.3.3 @@ -3382,8 +3581,17 @@ snapshots: '@fontsource-variable/inter': 5.3.0 '@fontsource-variable/jetbrains-mono': 5.3.0 '@fontsource-variable/noto-sans-thaana': 5.3.0 + '@tiptap/core': 3.32.2(@tiptap/pm@3.32.2) + '@tiptap/extension-image': 3.32.2(@tiptap/core@3.32.2(@tiptap/pm@3.32.2)) + '@tiptap/extension-placeholder': 3.32.2(@tiptap/extensions@3.32.2(@tiptap/core@3.32.2(@tiptap/pm@3.32.2))(@tiptap/pm@3.32.2)) + '@tiptap/extension-table': 3.32.2(@tiptap/core@3.32.2(@tiptap/pm@3.32.2))(@tiptap/pm@3.32.2) + '@tiptap/extension-text-align': 3.32.2(@tiptap/core@3.32.2(@tiptap/pm@3.32.2)) + '@tiptap/pm': 3.32.2 + '@tiptap/react': 3.32.2(@floating-ui/dom@1.8.0)(@tiptap/core@3.32.2(@tiptap/pm@3.32.2))(@tiptap/pm@3.32.2)(@types/react-dom@19.3.0(@types/react@19.3.0))(@types/react@19.3.0)(react-dom@19.3.1(react@19.3.1))(react@19.3.1) + '@tiptap/starter-kit': 3.32.2 + '@tiptap/static-renderer': 3.32.2(@tiptap/core@3.32.2(@tiptap/pm@3.32.2))(@tiptap/pm@3.32.2)(react-dom@19.3.1(react@19.3.1))(react@19.3.1) + '@tiptap/suggestion': 3.32.2(@floating-ui/dom@1.8.0)(@tiptap/core@3.32.2(@tiptap/pm@3.32.2))(@tiptap/pm@3.32.2) transitivePeerDependencies: - - '@date-fns/tz' - '@types/react' - '@types/react-dom' @@ -4376,7 +4584,7 @@ snapshots: picocolors: 1.1.1 redent: 3.0.0 optionalDependencies: - vitest: 5.0.5(@types/node@26.6.5)(@vitest/coverage-v8@5.1.0)(jsdom@30.1.3)(vite@8.3.4(@types/node@26.6.5)(jiti@2.7.0)(yaml@2.9.1)) + vitest: 5.0.5(@types/node@26.6.5)(@vitest/coverage-v8@5.0.5)(jsdom@30.1.3)(vite@8.3.4(@types/node@26.6.5)(jiti@2.7.0)(yaml@2.9.1)) '@testing-library/react@16.3.3(@testing-library/dom@10.4.2)(@types/react-dom@19.3.0(@types/react@19.3.0))(@types/react@19.3.0)(react-dom@19.3.1(react@19.3.1))(react@19.3.1)': dependencies: @@ -4392,6 +4600,209 @@ snapshots: dependencies: '@testing-library/dom': 10.4.2 + '@tiptap/core@3.32.2(@tiptap/pm@3.32.2)': + dependencies: + '@tiptap/pm': 3.32.2 + + '@tiptap/extension-blockquote@3.32.2(@tiptap/core@3.32.2(@tiptap/pm@3.32.2))(@tiptap/pm@3.32.2)': + dependencies: + '@tiptap/core': 3.32.2(@tiptap/pm@3.32.2) + '@tiptap/pm': 3.32.2 + + '@tiptap/extension-bold@3.32.2(@tiptap/core@3.32.2(@tiptap/pm@3.32.2))': + dependencies: + '@tiptap/core': 3.32.2(@tiptap/pm@3.32.2) + + '@tiptap/extension-bubble-menu@3.32.2(@tiptap/core@3.32.2(@tiptap/pm@3.32.2))(@tiptap/pm@3.32.2)': + dependencies: + '@floating-ui/dom': 1.8.0 + '@tiptap/core': 3.32.2(@tiptap/pm@3.32.2) + '@tiptap/pm': 3.32.2 + optional: true + + '@tiptap/extension-bullet-list@3.32.2(@tiptap/extension-list@3.32.2(@tiptap/core@3.32.2(@tiptap/pm@3.32.2))(@tiptap/pm@3.32.2))': + dependencies: + '@tiptap/extension-list': 3.32.2(@tiptap/core@3.32.2(@tiptap/pm@3.32.2))(@tiptap/pm@3.32.2) + + '@tiptap/extension-code-block@3.32.2(@tiptap/core@3.32.2(@tiptap/pm@3.32.2))(@tiptap/pm@3.32.2)': + dependencies: + '@tiptap/core': 3.32.2(@tiptap/pm@3.32.2) + '@tiptap/pm': 3.32.2 + + '@tiptap/extension-code@3.32.2(@tiptap/core@3.32.2(@tiptap/pm@3.32.2))': + dependencies: + '@tiptap/core': 3.32.2(@tiptap/pm@3.32.2) + + '@tiptap/extension-document@3.32.2(@tiptap/core@3.32.2(@tiptap/pm@3.32.2))': + dependencies: + '@tiptap/core': 3.32.2(@tiptap/pm@3.32.2) + + '@tiptap/extension-dropcursor@3.32.2(@tiptap/extensions@3.32.2(@tiptap/core@3.32.2(@tiptap/pm@3.32.2))(@tiptap/pm@3.32.2))': + dependencies: + '@tiptap/extensions': 3.32.2(@tiptap/core@3.32.2(@tiptap/pm@3.32.2))(@tiptap/pm@3.32.2) + + '@tiptap/extension-floating-menu@3.32.2(@floating-ui/dom@1.8.0)(@tiptap/core@3.32.2(@tiptap/pm@3.32.2))(@tiptap/pm@3.32.2)': + dependencies: + '@floating-ui/dom': 1.8.0 + '@tiptap/core': 3.32.2(@tiptap/pm@3.32.2) + '@tiptap/pm': 3.32.2 + optional: true + + '@tiptap/extension-gapcursor@3.32.2(@tiptap/extensions@3.32.2(@tiptap/core@3.32.2(@tiptap/pm@3.32.2))(@tiptap/pm@3.32.2))': + dependencies: + '@tiptap/extensions': 3.32.2(@tiptap/core@3.32.2(@tiptap/pm@3.32.2))(@tiptap/pm@3.32.2) + + '@tiptap/extension-hard-break@3.32.2(@tiptap/core@3.32.2(@tiptap/pm@3.32.2))': + dependencies: + '@tiptap/core': 3.32.2(@tiptap/pm@3.32.2) + + '@tiptap/extension-heading@3.32.2(@tiptap/core@3.32.2(@tiptap/pm@3.32.2))': + dependencies: + '@tiptap/core': 3.32.2(@tiptap/pm@3.32.2) + + '@tiptap/extension-horizontal-rule@3.32.2(@tiptap/core@3.32.2(@tiptap/pm@3.32.2))(@tiptap/pm@3.32.2)': + dependencies: + '@tiptap/core': 3.32.2(@tiptap/pm@3.32.2) + '@tiptap/pm': 3.32.2 + + '@tiptap/extension-image@3.32.2(@tiptap/core@3.32.2(@tiptap/pm@3.32.2))': + dependencies: + '@tiptap/core': 3.32.2(@tiptap/pm@3.32.2) + + '@tiptap/extension-italic@3.32.2(@tiptap/core@3.32.2(@tiptap/pm@3.32.2))': + dependencies: + '@tiptap/core': 3.32.2(@tiptap/pm@3.32.2) + + '@tiptap/extension-link@3.32.2(@tiptap/core@3.32.2(@tiptap/pm@3.32.2))(@tiptap/pm@3.32.2)': + dependencies: + '@tiptap/core': 3.32.2(@tiptap/pm@3.32.2) + '@tiptap/pm': 3.32.2 + linkifyjs: 4.4.0 + + '@tiptap/extension-list-item@3.32.2(@tiptap/extension-list@3.32.2(@tiptap/core@3.32.2(@tiptap/pm@3.32.2))(@tiptap/pm@3.32.2))': + dependencies: + '@tiptap/extension-list': 3.32.2(@tiptap/core@3.32.2(@tiptap/pm@3.32.2))(@tiptap/pm@3.32.2) + + '@tiptap/extension-list-keymap@3.32.2(@tiptap/extension-list@3.32.2(@tiptap/core@3.32.2(@tiptap/pm@3.32.2))(@tiptap/pm@3.32.2))': + dependencies: + '@tiptap/extension-list': 3.32.2(@tiptap/core@3.32.2(@tiptap/pm@3.32.2))(@tiptap/pm@3.32.2) + + '@tiptap/extension-list@3.32.2(@tiptap/core@3.32.2(@tiptap/pm@3.32.2))(@tiptap/pm@3.32.2)': + dependencies: + '@tiptap/core': 3.32.2(@tiptap/pm@3.32.2) + '@tiptap/pm': 3.32.2 + + '@tiptap/extension-ordered-list@3.32.2(@tiptap/extension-list@3.32.2(@tiptap/core@3.32.2(@tiptap/pm@3.32.2))(@tiptap/pm@3.32.2))': + dependencies: + '@tiptap/extension-list': 3.32.2(@tiptap/core@3.32.2(@tiptap/pm@3.32.2))(@tiptap/pm@3.32.2) + + '@tiptap/extension-paragraph@3.32.2(@tiptap/core@3.32.2(@tiptap/pm@3.32.2))': + dependencies: + '@tiptap/core': 3.32.2(@tiptap/pm@3.32.2) + + '@tiptap/extension-placeholder@3.32.2(@tiptap/extensions@3.32.2(@tiptap/core@3.32.2(@tiptap/pm@3.32.2))(@tiptap/pm@3.32.2))': + dependencies: + '@tiptap/extensions': 3.32.2(@tiptap/core@3.32.2(@tiptap/pm@3.32.2))(@tiptap/pm@3.32.2) + + '@tiptap/extension-strike@3.32.2(@tiptap/core@3.32.2(@tiptap/pm@3.32.2))': + dependencies: + '@tiptap/core': 3.32.2(@tiptap/pm@3.32.2) + + '@tiptap/extension-table@3.32.2(@tiptap/core@3.32.2(@tiptap/pm@3.32.2))(@tiptap/pm@3.32.2)': + dependencies: + '@tiptap/core': 3.32.2(@tiptap/pm@3.32.2) + '@tiptap/pm': 3.32.2 + + '@tiptap/extension-text-align@3.32.2(@tiptap/core@3.32.2(@tiptap/pm@3.32.2))': + dependencies: + '@tiptap/core': 3.32.2(@tiptap/pm@3.32.2) + + '@tiptap/extension-text@3.32.2(@tiptap/core@3.32.2(@tiptap/pm@3.32.2))': + dependencies: + '@tiptap/core': 3.32.2(@tiptap/pm@3.32.2) + + '@tiptap/extension-underline@3.32.2(@tiptap/core@3.32.2(@tiptap/pm@3.32.2))': + dependencies: + '@tiptap/core': 3.32.2(@tiptap/pm@3.32.2) + + '@tiptap/extensions@3.32.2(@tiptap/core@3.32.2(@tiptap/pm@3.32.2))(@tiptap/pm@3.32.2)': + dependencies: + '@tiptap/core': 3.32.2(@tiptap/pm@3.32.2) + '@tiptap/pm': 3.32.2 + + '@tiptap/pm@3.32.2': + dependencies: + prosemirror-changeset: 2.4.6 + prosemirror-commands: 1.7.2 + prosemirror-dropcursor: 1.8.4 + prosemirror-gapcursor: 1.4.1 + prosemirror-history: 1.5.1 + prosemirror-inputrules: 1.5.1 + prosemirror-keymap: 1.2.3 + prosemirror-model: 1.25.12 + prosemirror-schema-list: 1.6.0 + prosemirror-state: 1.4.4 + prosemirror-tables: 1.8.5 + prosemirror-transform: 1.12.4 + prosemirror-view: 1.42.9 + + '@tiptap/react@3.32.2(@floating-ui/dom@1.8.0)(@tiptap/core@3.32.2(@tiptap/pm@3.32.2))(@tiptap/pm@3.32.2)(@types/react-dom@19.3.0(@types/react@19.3.0))(@types/react@19.3.0)(react-dom@19.3.1(react@19.3.1))(react@19.3.1)': + dependencies: + '@tiptap/core': 3.32.2(@tiptap/pm@3.32.2) + '@tiptap/pm': 3.32.2 + '@types/react': 19.3.0 + '@types/react-dom': 19.3.0(@types/react@19.3.0) + '@types/use-sync-external-store': 0.0.6 + fast-equals: 5.4.5 + react: 19.3.1 + react-dom: 19.3.1(react@19.3.1) + use-sync-external-store: 1.7.0(react@19.3.1) + optionalDependencies: + '@tiptap/extension-bubble-menu': 3.32.2(@tiptap/core@3.32.2(@tiptap/pm@3.32.2))(@tiptap/pm@3.32.2) + '@tiptap/extension-floating-menu': 3.32.2(@floating-ui/dom@1.8.0)(@tiptap/core@3.32.2(@tiptap/pm@3.32.2))(@tiptap/pm@3.32.2) + transitivePeerDependencies: + - '@floating-ui/dom' + + '@tiptap/starter-kit@3.32.2': + dependencies: + '@tiptap/core': 3.32.2(@tiptap/pm@3.32.2) + '@tiptap/extension-blockquote': 3.32.2(@tiptap/core@3.32.2(@tiptap/pm@3.32.2))(@tiptap/pm@3.32.2) + '@tiptap/extension-bold': 3.32.2(@tiptap/core@3.32.2(@tiptap/pm@3.32.2)) + '@tiptap/extension-bullet-list': 3.32.2(@tiptap/extension-list@3.32.2(@tiptap/core@3.32.2(@tiptap/pm@3.32.2))(@tiptap/pm@3.32.2)) + '@tiptap/extension-code': 3.32.2(@tiptap/core@3.32.2(@tiptap/pm@3.32.2)) + '@tiptap/extension-code-block': 3.32.2(@tiptap/core@3.32.2(@tiptap/pm@3.32.2))(@tiptap/pm@3.32.2) + '@tiptap/extension-document': 3.32.2(@tiptap/core@3.32.2(@tiptap/pm@3.32.2)) + '@tiptap/extension-dropcursor': 3.32.2(@tiptap/extensions@3.32.2(@tiptap/core@3.32.2(@tiptap/pm@3.32.2))(@tiptap/pm@3.32.2)) + '@tiptap/extension-gapcursor': 3.32.2(@tiptap/extensions@3.32.2(@tiptap/core@3.32.2(@tiptap/pm@3.32.2))(@tiptap/pm@3.32.2)) + '@tiptap/extension-hard-break': 3.32.2(@tiptap/core@3.32.2(@tiptap/pm@3.32.2)) + '@tiptap/extension-heading': 3.32.2(@tiptap/core@3.32.2(@tiptap/pm@3.32.2)) + '@tiptap/extension-horizontal-rule': 3.32.2(@tiptap/core@3.32.2(@tiptap/pm@3.32.2))(@tiptap/pm@3.32.2) + '@tiptap/extension-italic': 3.32.2(@tiptap/core@3.32.2(@tiptap/pm@3.32.2)) + '@tiptap/extension-link': 3.32.2(@tiptap/core@3.32.2(@tiptap/pm@3.32.2))(@tiptap/pm@3.32.2) + '@tiptap/extension-list': 3.32.2(@tiptap/core@3.32.2(@tiptap/pm@3.32.2))(@tiptap/pm@3.32.2) + '@tiptap/extension-list-item': 3.32.2(@tiptap/extension-list@3.32.2(@tiptap/core@3.32.2(@tiptap/pm@3.32.2))(@tiptap/pm@3.32.2)) + '@tiptap/extension-list-keymap': 3.32.2(@tiptap/extension-list@3.32.2(@tiptap/core@3.32.2(@tiptap/pm@3.32.2))(@tiptap/pm@3.32.2)) + '@tiptap/extension-ordered-list': 3.32.2(@tiptap/extension-list@3.32.2(@tiptap/core@3.32.2(@tiptap/pm@3.32.2))(@tiptap/pm@3.32.2)) + '@tiptap/extension-paragraph': 3.32.2(@tiptap/core@3.32.2(@tiptap/pm@3.32.2)) + '@tiptap/extension-strike': 3.32.2(@tiptap/core@3.32.2(@tiptap/pm@3.32.2)) + '@tiptap/extension-text': 3.32.2(@tiptap/core@3.32.2(@tiptap/pm@3.32.2)) + '@tiptap/extension-underline': 3.32.2(@tiptap/core@3.32.2(@tiptap/pm@3.32.2)) + '@tiptap/extensions': 3.32.2(@tiptap/core@3.32.2(@tiptap/pm@3.32.2))(@tiptap/pm@3.32.2) + '@tiptap/pm': 3.32.2 + + '@tiptap/static-renderer@3.32.2(@tiptap/core@3.32.2(@tiptap/pm@3.32.2))(@tiptap/pm@3.32.2)(react-dom@19.3.1(react@19.3.1))(react@19.3.1)': + dependencies: + '@tiptap/core': 3.32.2(@tiptap/pm@3.32.2) + '@tiptap/pm': 3.32.2 + react: 19.3.1 + react-dom: 19.3.1(react@19.3.1) + + '@tiptap/suggestion@3.32.2(@floating-ui/dom@1.8.0)(@tiptap/core@3.32.2(@tiptap/pm@3.32.2))(@tiptap/pm@3.32.2)': + dependencies: + '@floating-ui/dom': 1.8.0 + '@tiptap/core': 3.32.2(@tiptap/pm@3.32.2) + '@tiptap/pm': 3.32.2 + '@types/aria-query@5.0.4': {} '@types/chai@5.2.3': @@ -4419,6 +4830,8 @@ snapshots: dependencies: csstype: 3.2.3 + '@types/use-sync-external-store@0.0.6': {} + '@typescript-eslint/eslint-plugin@8.72.0(@typescript-eslint/parser@8.72.0(eslint@10.13.0(jiti@2.7.0))(typescript@6.0.3))(eslint@10.13.0(jiti@2.7.0))(typescript@6.0.3)': dependencies: '@eslint-community/regexpp': 4.12.2 @@ -4515,23 +4928,23 @@ snapshots: '@rolldown/pluginutils': 1.0.1 vite: 8.3.4(@types/node@26.6.5)(jiti@2.7.0)(yaml@2.9.1) - '@vitest/coverage-v8@5.1.0(vitest@5.0.5)': + '@vitest/coverage-v8@5.0.5(vitest@5.0.5)': dependencies: '@bcoe/v8-coverage': 1.0.2 - '@vitest/istanbul-lib-coverage': 2.1.0 - '@vitest/istanbul-lib-report': 2.1.0 + '@vitest/istanbul-lib-coverage': 1.0.2 + '@vitest/istanbul-lib-report': 1.0.2 ast-v8-to-istanbul: 1.0.7 magicast: 0.5.5 obug: 3.0.0 std-env: 4.3.0 tinyrainbow: 3.2.0 - vitest: 5.0.5(@types/node@26.6.5)(@vitest/coverage-v8@5.1.0)(jsdom@30.1.3)(vite@8.3.4(@types/node@26.6.5)(jiti@2.7.0)(yaml@2.9.1)) + vitest: 5.0.5(@types/node@26.6.5)(@vitest/coverage-v8@5.0.5)(jsdom@30.1.3)(vite@8.3.4(@types/node@26.6.5)(jiti@2.7.0)(yaml@2.9.1)) - '@vitest/istanbul-lib-coverage@2.1.0': {} + '@vitest/istanbul-lib-coverage@1.0.2': {} - '@vitest/istanbul-lib-report@2.1.0': + '@vitest/istanbul-lib-report@1.0.2': dependencies: - '@vitest/istanbul-lib-coverage': 2.1.0 + '@vitest/istanbul-lib-coverage': 1.0.2 '@vitest/mocker@5.0.5(vite@8.3.4(@types/node@26.6.5)(jiti@2.7.0)(yaml@2.9.1))': dependencies: @@ -4579,8 +4992,6 @@ snapshots: estree-walker: 3.0.3 js-tokens: 10.0.0 - attr-accept@4.0.1: {} - balanced-match@4.0.4: {} baseline-browser-mapping@2.11.30: {} @@ -4797,6 +5208,8 @@ snapshots: fast-deep-equal@3.1.3: {} + fast-equals@5.4.5: {} + fast-json-stable-stringify@2.1.0: {} fast-levenshtein@2.0.6: {} @@ -4819,8 +5232,6 @@ snapshots: dependencies: flat-cache: 6.1.23 - file-selector@5.0.2: {} - find-up@5.0.0: dependencies: locate-path: 6.0.0 @@ -5060,6 +5471,8 @@ snapshots: lightningcss-win32-arm64-msvc: 1.33.0 lightningcss-win32-x64-msvc: 1.33.0 + linkifyjs@4.4.0: {} + locate-path@6.0.0: dependencies: p-locate: 5.0.0 @@ -5125,6 +5538,8 @@ snapshots: type-check: 0.4.0 word-wrap: 1.2.5 + orderedmap@2.1.1: {} + p-limit@3.1.0: dependencies: yocto-queue: 0.1.0 @@ -5169,6 +5584,80 @@ snapshots: object-assign: 4.1.1 react-is: 16.13.1 + prosemirror-changeset@2.4.6: + dependencies: + prosemirror-transform: 1.12.4 + + prosemirror-commands@1.7.2: + dependencies: + prosemirror-model: 1.25.12 + prosemirror-state: 1.4.4 + prosemirror-transform: 1.12.4 + + prosemirror-dropcursor@1.8.4: + dependencies: + prosemirror-state: 1.4.4 + prosemirror-transform: 1.12.4 + prosemirror-view: 1.42.9 + + prosemirror-gapcursor@1.4.1: + dependencies: + prosemirror-keymap: 1.2.3 + prosemirror-model: 1.25.12 + prosemirror-state: 1.4.4 + prosemirror-view: 1.42.9 + + prosemirror-history@1.5.1: + dependencies: + prosemirror-state: 1.4.4 + prosemirror-transform: 1.12.4 + prosemirror-view: 1.42.9 + rope-sequence: 1.3.4 + + prosemirror-inputrules@1.5.1: + dependencies: + prosemirror-state: 1.4.4 + prosemirror-transform: 1.12.4 + + prosemirror-keymap@1.2.3: + dependencies: + prosemirror-state: 1.4.4 + w3c-keyname: 2.2.8 + + prosemirror-model@1.25.12: + dependencies: + orderedmap: 2.1.1 + + prosemirror-schema-list@1.6.0: + dependencies: + prosemirror-model: 1.25.12 + prosemirror-state: 1.4.4 + prosemirror-transform: 1.12.4 + + prosemirror-state@1.4.4: + dependencies: + prosemirror-model: 1.25.12 + prosemirror-transform: 1.12.4 + prosemirror-view: 1.42.9 + + prosemirror-tables@1.8.5: + dependencies: + prosemirror-keymap: 1.2.3 + prosemirror-model: 1.25.12 + prosemirror-state: 1.4.4 + prosemirror-transform: 1.12.4 + prosemirror-view: 1.42.9 + + prosemirror-transform@1.12.4: + dependencies: + prosemirror-model: 1.25.12 + + prosemirror-view@1.42.9: + dependencies: + prosemirror-model: 1.25.12 + prosemirror-state: 1.4.4 + prosemirror-transform: 1.12.4 + punycode@2.3.1: {} qified@0.10.1: @@ -5278,14 +5767,6 @@ snapshots: react: 19.3.1 scheduler: 0.28.0 - react-dropzone@20.1.4(@types/react@19.3.0)(react@19.3.1): - dependencies: - attr-accept: 4.0.1 - file-selector: 5.0.2 - react: 19.3.1 - optionalDependencies: - '@types/react': 19.3.0 - react-hook-form@7.90.0(@types/react@19.3.0)(react@19.3.1): dependencies: react: 19.3.1 @@ -5325,13 +5806,6 @@ snapshots: optionalDependencies: '@types/react': 19.3.0 - react-resizable-panels@4.18.0(@types/react@19.3.0)(react-dom@19.3.1(react@19.3.1))(react@19.3.1): - dependencies: - react: 19.3.1 - react-dom: 19.3.1(react@19.3.1) - optionalDependencies: - '@types/react': 19.3.0 - react-stately@3.51.0(react@19.3.1): dependencies: '@internationalized/date': 3.12.4 @@ -5359,8 +5833,6 @@ snapshots: require-from-string@2.0.2: {} - reselect@5.3.0: {} - rolldown@1.2.14: dependencies: '@oxc-project/types': 0.154.0 @@ -5382,6 +5854,8 @@ snapshots: '@rolldown/binding-win32-arm64-msvc': 1.2.14 '@rolldown/binding-win32-x64-msvc': 1.2.14 + rope-sequence@1.3.4: {} + saxes@6.0.0: dependencies: xmlchars: 2.2.0 @@ -5530,7 +6004,7 @@ snapshots: jiti: 2.7.0 yaml: 2.9.1 - vitest@5.0.5(@types/node@26.6.5)(@vitest/coverage-v8@5.1.0)(jsdom@30.1.3)(vite@8.3.4(@types/node@26.6.5)(jiti@2.7.0)(yaml@2.9.1)): + vitest@5.0.5(@types/node@26.6.5)(@vitest/coverage-v8@5.0.5)(jsdom@30.1.3)(vite@8.3.4(@types/node@26.6.5)(jiti@2.7.0)(yaml@2.9.1)): dependencies: '@types/chai': 5.2.3 '@vitest/mocker': 5.0.5(vite@8.3.4(@types/node@26.6.5)(jiti@2.7.0)(yaml@2.9.1)) @@ -5548,11 +6022,13 @@ snapshots: why-is-node-running: 3.2.1 optionalDependencies: '@types/node': 26.6.5 - '@vitest/coverage-v8': 5.1.0(vitest@5.0.5) + '@vitest/coverage-v8': 5.0.5(vitest@5.0.5) jsdom: 30.1.3 transitivePeerDependencies: - msw + w3c-keyname@2.2.8: {} + w3c-xmlserializer@6.0.0: dependencies: xml-name-validator: 5.0.0 diff --git a/src/adapters/html/index.tsx b/src/adapters/html/index.tsx new file mode 100644 index 0000000..09f20b5 --- /dev/null +++ b/src/adapters/html/index.tsx @@ -0,0 +1,1095 @@ +"use client" + +import * as React from "react" + +import { + defineAdapter, + type AccordionSlotProps, + type ActionMenuSlotProps, + type AlertSlotProps, + type ButtonGroupSlotProps, + type ButtonSlotProps, + type CardSlotProps, + type CheckboxSlotProps, + type DateSlotProps, + type DescriptionItemSlotProps, + type DescriptionListSlotProps, + type EmptyStateSlotProps, + type ErrorSummarySlotProps, + type FieldErrorsSlotProps, + type FieldSlotProps, + type FileSlotProps, + type FormSlotProps, + type HelpTextSlotProps, + type IconName, + type IconSlotProps, + type ImageSlotProps, + type InputSlotProps, + type LabelSlotProps, + type LinkButtonSlotProps, + type LinkSlotProps, + type ModalSlotProps, + type NavTabsSlotProps, + type NumberSlotProps, + type PaginationSlotProps, + type RadioSlotProps, + type RequiredMarkerSlotProps, + type SelectOption, + type SelectSlotProps, + type StatusSlotProps, + type TabsSlotProps, + type TextareaSlotProps, + type WysiwygSlotProps, +} from "../../core/adapter" +import { useUi } from "../../core/provider" +import { useRemoteOptions } from "../../core/remote" +import { useFormsTranslation } from "../../core/strings" +import { thaanaKeyDown } from "../../core/thaana" + +/** + * The HTML adapter renders plain, unstyled elements with `data-slot` attributes + * to style them by. It is the fallback for every slot another adapter leaves + * out, and the reference for writing your own (see `docs/advanced-usage/adapters.md`). + */ + +function cx(...classes: Array) { + return classes.filter(Boolean).join(" ") || undefined +} + +/** Calls both handlers; the second is skipped when the first prevented the default. */ +function compose(first?: (e: E) => void, second?: (e: E) => void) { + if (!first) return second + if (!second) return first + return (event: E) => { + first(event) + if (!event.defaultPrevented) second(event) + } +} + +/* -------------------------------------------------------------------------- */ +/* Form scaffolding */ +/* -------------------------------------------------------------------------- */ + +function Form({ processing: _processing, ...props }: FormSlotProps) { + return
+} + +function Field({ + id, + label, + labelId, + hideLabel, + inline, + help, + helpId, + errors, + errorId, + disabled, + classNames, + children, +}: FieldSlotProps) { + const ui = useUi() + return ( +
+ {label ? ( + + {label} + + ) : null} +
+ {children} + {help ? {help} : null} + {errors.length ? : null} +
+
+ ) +} + +const SR_ONLY: React.CSSProperties = { + position: "absolute", + width: 1, + height: 1, + padding: 0, + margin: -1, + overflow: "hidden", + clip: "rect(0, 0, 0, 0)", + whiteSpace: "nowrap", + border: 0, +} + +function Label({ required: _required, ...props }: LabelSlotProps) { + return