diff --git a/.changeset/README.md b/.changeset/README.md index e5b6d8d..e752409 100644 --- a/.changeset/README.md +++ b/.changeset/README.md @@ -1,8 +1,44 @@ # Changesets -Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works -with multi-package repos, or single-package repos to help you version and publish your code. You can -find the full documentation for it [in our repository](https://github.com/changesets/changesets) +This folder is managed by [`@changesets/cli`](https://github.com/changesets/changesets). -We have a quick list of common questions to get you started engaging with this project in -[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md) +## How this element uses changesets + +All four subpackages (`display`, `edit`, `manifest`, `server`) are released in +**lockstep** — they always share the same version. This is enforced via the +`fixed` group in `config.json`. + +Per-package CHANGELOG generation is **disabled** (`"changelog": false`). +Release notes live in the **root `CHANGELOG.md`** and are curated by hand for +narrative clarity. + +## Typical release flow + +1. Add a changeset describing the change (you will be prompted for bump level + and a one-line summary): + + ```sh + pnpm exec changeset + ``` + +2. When ready to release, apply versions and drop the changeset files: + + ```sh + pnpm exec changeset version + ``` + + This bumps all four subpackages to the same version. The root `package.json` + is `"private": true` and is untouched. + +3. Update the root `CHANGELOG.md` with a human-written entry for the new + version. + +4. Build and publish to npm: + + ```sh + pnpm build && pnpm exec changeset publish + ``` + + The build step is required because `changeset publish` does not build the + subpackages; it only runs `npm publish` against each one, which expects the + `dist/` folder (per each subpackage's `"files"` field) to already exist. diff --git a/.changeset/config.json b/.changeset/config.json index 6b37255..5f85ca4 100644 --- a/.changeset/config.json +++ b/.changeset/config.json @@ -1,10 +1,14 @@ { "$schema": "https://unpkg.com/@changesets/config@3.0.5/schema.json", - "changelog": "@changesets/cli/changelog", + "changelog": false, "commit": false, - "fixed": [], + "fixed": [ + [ + "@tailor-cms/ce-jodit-html-*" + ] + ], "linked": [], - "access": "restricted", + "access": "public", "baseBranch": "main", "updateInternalDependencies": "patch", "ignore": [] diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 79cf479..b5ad306 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,6 +1,6 @@ { "name": "Tailor - Jodit HTML Content Element", - "image": "mcr.microsoft.com/devcontainers/typescript-node:1-22-bookworm", + "image": "mcr.microsoft.com/devcontainers/typescript-node:4-24-trixie", "features": { "ghcr.io/devcontainers-extra/features/pnpm:2": {}, "ghcr.io/devcontainers/features/github-cli:1": {} diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml index 2ce6017..40e593b 100644 --- a/.github/actions/setup/action.yml +++ b/.github/actions/setup/action.yml @@ -1,4 +1,5 @@ name: Setup pnpm and install cache +description: Install pnpm, Node, workspace dependencies, and Playwright browsers runs: using: composite steps: diff --git a/CHANGELOG.md b/CHANGELOG.md index 0778266..c02659e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,21 @@ # Changelog +### v2.0.0 2026-04-25 + +Part of the [Tailor CEK v2 release line][xt-v2]. The four subpackages +(`@tailor-cms/ce-jodit-html-display`, `-edit`, `-manifest`, `-server`) now +release in lockstep. + +[xt-v2]: https://github.com/tailor-cms/xt/blob/main/CHANGELOG.md#v200-2026-04-25 + +#### Breaking changes +- Requires **Vuetify 4** and **Node `>=24`** +- Consumes `@tailor-cms/cek-common@^2.0.0` + +See the [xt v2.0.0 release notes][xt-v2] for the CEK v2 platform migration +guide. + + ### v1.0.0 2025-02-12 - Moved dotenv to dev dependencies. diff --git a/Dockerfile b/Dockerfile index 5007882..0c75a8c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ ARG PNPM_HOME="/root/.local/share/pnpm" -ARG PNPM_VERSION="9.15.0" +ARG PNPM_VERSION="10.12.3" -FROM node:22.12.0-alpine3.20 +FROM node:24-alpine ARG PNPM_HOME ARG PNPM_VERSION # github and ssh diff --git a/README.md b/README.md index 1863482..866d85c 100644 --- a/README.md +++ b/README.md @@ -1,24 +1,31 @@ -# ce-jodit-html +# Jodit HTML -Tailor Jodit HTML editor component. +Rich text content element powered by the Jodit editor. -## Usage +**Type:** `JODIT_HTML` -Run +## Data -```sh -pnpm dev -``` +| Field | Type | Description | +|-------|------|-------------| +| `content` | `string` | HTML content authored via Jodit | -Lint +## Edit -```sh -pnpm lint -``` +- Inline Jodit WYSIWYG editor activated on focus +- Debounced autosave and save-on-blur +- Toolbar rendered into a dedicated top toolbar slot + +## Display -Test +- Renders sanitized HTML content with element-scoped typography styles + +## Development ```sh +pnpm dev # Preview :8080 | Edit :8010 | Display :8020 | Server :8030 +pnpm build +pnpm lint pnpm test ``` diff --git a/package.json b/package.json index 83cce41..7fca5cd 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,6 @@ "description": "Tailor CMS Jodit HTML editor", "author": "Studion (https://github.com/tailor-cms)", "type": "module", - "version": "0.0.1", "private": true, "scripts": { "dev": "pnpm boot:cek", @@ -16,16 +15,19 @@ "test": "pnpm playwright test --config ./test/playwright.config.ts" }, "devDependencies": { - "@changesets/cli": "^2.29.5", - "@playwright/test": "1.53.2", - "@tailor-cms/cek-e2e": "^1.3.2", - "@tailor-cms/eslint-config": "1.1.2", - "@tailor-cms/tce-boot": "1.3.2", - "@types/node": "^24.0.11", - "dotenv": "^17.1.0", - "eslint": "^9.30.1", - "prettier": "^3.6.2", - "typescript": "^5.8.3" + "@changesets/cli": "^2.31.0", + "@playwright/test": "^1.59.1", + "@tailor-cms/cek-e2e": "2.0.1", + "@tailor-cms/eslint-config": "2.0.1", + "@tailor-cms/tce-boot": "2.0.1", + "@types/node": "^24.12.2", + "dotenv": "^17.4.2", + "eslint": "^9.39.4", + "prettier": "^3.8.3", + "typescript": "^6.0.3" }, - "packageManager": "pnpm@10.12.3" + "packageManager": "pnpm@10.12.3", + "engines": { + "node": ">=24" + } } diff --git a/packages/display/CHANGELOG.md b/packages/display/CHANGELOG.md deleted file mode 100644 index b43b494..0000000 --- a/packages/display/CHANGELOG.md +++ /dev/null @@ -1,49 +0,0 @@ -# @tailor-cms/ce-jodit-html-display - -## 0.1.0 - -### Minor Changes - -- Migrates package to the latest tce-boot version, adds AI config and devcontainers. Updates dependencies to the latest versions. - -## 0.0.8 - -### Patch Changes - -- Add editor min height. - -## 0.0.7 - -### Patch Changes - -- Bump tce-boot package and update accordingly. - -## 0.0.6 - -### Patch Changes - -- Updated edit frame background. - -## 0.0.5 - -### Patch Changes - -- Cleanup jodit config. - -## 0.0.4 - -### Patch Changes - -- Fixed color picker to match old functionality, fixed hmr. - -## 0.0.3 - -### Patch Changes - -- Cleaned up element placeholder. - -## 0.0.2 - -### Patch Changes - -- Added element placeholder. diff --git a/packages/display/package.json b/packages/display/package.json index 0997cc3..1f8a355 100644 --- a/packages/display/package.json +++ b/packages/display/package.json @@ -3,7 +3,7 @@ "description": "Tailor CMS Jodit HTML editor end-user component", "author": "Studion (https://github.com/tailor-cms)", "type": "module", - "version": "0.1.0", + "version": "2.0.0", "exports": { ".": { "import": "./dist/index.js", @@ -25,17 +25,22 @@ "prepublish": "pnpm build" }, "peerDependencies": { - "vue": "^3.5.13" + "vue": "^3.5.29" }, "devDependencies": { "@tailor-cms/ce-jodit-html-manifest": "workspace:*", - "@tailor-cms/eslint-config": "1.1.2", - "@vitejs/plugin-vue": "^6.0.0", - "typescript": "^5.8.3", - "vite": "^7.0.3", - "vue-tsc": "^3.0.1" + "@tailor-cms/eslint-config": "2.0.1", + "@vitejs/plugin-vue": "^6.0.6", + "typescript": "^6.0.3", + "vite": "^8.0.10", + "vite-plugin-lib-inject-css": "^2.2.2", + "vue-tsc": "^3.2.7", + "vuetify": "^4.0.6" }, "publishConfig": { "access": "public" + }, + "engines": { + "node": ">=24" } } diff --git a/packages/display/tsconfig.json b/packages/display/tsconfig.json index 6af2a0f..a77353d 100644 --- a/packages/display/tsconfig.json +++ b/packages/display/tsconfig.json @@ -19,6 +19,7 @@ "noUnusedParameters": true, "noFallthroughCasesInSwitch": true, "types": ["vite/client"], + "rootDir": "./src", "outDir": "dist" }, "include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue"], diff --git a/packages/display/tsconfig.node.json b/packages/display/tsconfig.node.json index a645f8f..494bfe0 100644 --- a/packages/display/tsconfig.node.json +++ b/packages/display/tsconfig.node.json @@ -3,8 +3,7 @@ "composite": true, "skipLibCheck": true, "module": "ESNext", - "moduleResolution": "bundler", - "allowSyntheticDefaultImports": true, + "moduleResolution": "bundler" }, "include": ["vite.config.ts"] } diff --git a/packages/display/vite.config.ts b/packages/display/vite.config.ts index 4c16da6..d197a68 100644 --- a/packages/display/vite.config.ts +++ b/packages/display/vite.config.ts @@ -1,11 +1,12 @@ import { defineConfig } from 'vite'; +import { libInjectCss } from 'vite-plugin-lib-inject-css'; import vue from '@vitejs/plugin-vue'; import { resolve } from 'node:path'; // https://vitejs.dev/config/ export default defineConfig({ - plugins: [vue()], + plugins: [vue(), libInjectCss()], build: { // In order to avoid display runtime issues // due to package missing (if dist is deleted for short time) @@ -18,20 +19,12 @@ export default defineConfig({ fileName: 'index', formats: ['es', 'cjs'], }, - commonjsOptions: { - strictRequires: 'auto', - }, - rollupOptions: { + rolldownOptions: { // make sure to externalize deps that shouldn't be bundled // into your library external: ['vue'], output: { - intro: 'import "./index.css";', - // Provide global variables to use in the UMD build - // for externalized deps - globals: { - vue: 'Vue', - }, + exports: 'named', }, }, }, diff --git a/packages/edit/CHANGELOG.md b/packages/edit/CHANGELOG.md deleted file mode 100644 index f4ef15f..0000000 --- a/packages/edit/CHANGELOG.md +++ /dev/null @@ -1,49 +0,0 @@ -# @tailor-cms/ce-jodit-html-edit - -## 0.1.0 - -### Minor Changes - -- Migrates package to the latest tce-boot version, adds AI config and devcontainers. Updates dependencies to the latest versions. - -## 0.0.8 - -### Patch Changes - -- Add editor min height. - -## 0.0.7 - -### Patch Changes - -- Bump tce-boot package and update accordingly. - -## 0.0.6 - -### Patch Changes - -- Updated edit frame background. - -## 0.0.5 - -### Patch Changes - -- Cleanup jodit config. - -## 0.0.4 - -### Patch Changes - -- Fixed color picker to match old functionality, fixed hmr. - -## 0.0.3 - -### Patch Changes - -- Cleaned up element placeholder. - -## 0.0.2 - -### Patch Changes - -- Added element placeholder. diff --git a/packages/edit/package.json b/packages/edit/package.json index c0aa03e..cf599ea 100644 --- a/packages/edit/package.json +++ b/packages/edit/package.json @@ -3,7 +3,7 @@ "description": "Tailor CMS Jodit HTML editor authoring component", "author": "Studion (https://github.com/tailor-cms)", "type": "module", - "version": "0.1.0", + "version": "2.0.0", "exports": { ".": { "import": "./dist/index.js", @@ -25,22 +25,28 @@ "prepublish": "pnpm build" }, "peerDependencies": { - "vue": "^3.5.13" + "vue": "^3.5.29" }, "devDependencies": { "@tailor-cms/ce-jodit-html-manifest": "workspace:*", - "@tailor-cms/eslint-config": "1.1.2", + "@tailor-cms/eslint-config": "2.0.1", "@types/lodash-es": "^4.17.12", - "@vitejs/plugin-vue": "^6.0.0", - "typescript": "^5.8.3", - "vite": "^7.0.3", - "vue-tsc": "^3.0.1" + "@vitejs/plugin-vue": "^6.0.6", + "typescript": "^6.0.3", + "vite": "^8.0.10", + "vite-plugin-lib-inject-css": "^2.2.2", + "vue-tsc": "^3.2.7", + "vuetify": "^4.0.6" }, "dependencies": { - "jodit": "^4.6.2", - "lodash-es": "^4.17.21" + "@tailor-cms/cek-common": "2.0.1", + "jodit": "^4.12.2", + "lodash-es": "^4.18.1" }, "publishConfig": { "access": "public" + }, + "engines": { + "node": ">=24" } } diff --git a/packages/edit/src/components/Edit.vue b/packages/edit/src/components/Edit.vue index 99e1f6d..fe00456 100644 --- a/packages/edit/src/components/Edit.vue +++ b/packages/edit/src/components/Edit.vue @@ -12,9 +12,9 @@