Skip to content

Commit 9fe0552

Browse files
committed
v2
1 parent e503e1d commit 9fe0552

1,534 files changed

Lines changed: 13168 additions & 27404 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/ISSUE_TEMPLATE/bug.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ body:
1010
Thanks for filing this report. Keep every answer concise, reproducible, and grounded in observed evidence.
1111
Do not speculate or infer beyond the evidence. If a narrative section cannot be answered from the available evidence, respond with exactly `NOT_ENOUGH_INFO`.
1212
13-
If the same issue reproduces in plain Plite without Plate-specific code, open it in Plite instead: https://github.com/ianstormtaylor/slate/issues
13+
If the same issue reproduces in upstream Slate 0.x without Plate or Plite code, include that upstream link as comparison evidence.
1414
1515
Please only report one issue per submission. Break multiple issues into separate reports.
1616
@@ -134,8 +134,8 @@ body:
134134
description: Exact versions tested. Use `NOT_ENOUGH_INFO` for unknown values.
135135
placeholder: |
136136
plate:
137-
slate:
138-
slate-react:
137+
plite:
138+
plite-react:
139139
react:
140140
render: yaml
141141
validations:

.github/workflows/plite-ci.yml

Lines changed: 38 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -6,50 +6,50 @@ on:
66
- main
77
- next
88
paths:
9-
- 'packages/browser/**'
10-
- 'packages/plite/**'
11-
- 'packages/plite-dom/**'
12-
- 'packages/plite-history/**'
13-
- 'packages/plite-hyperscript/**'
14-
- 'packages/plite-layout/**'
15-
- 'packages/plite-react/**'
16-
- 'packages/yjs/**'
17-
- 'apps/plite/**'
18-
- 'apps/www/src/app/(app)/examples/plite/**'
19-
- 'apps/plite/tests/plite-browser/**'
20-
- 'content/docs/plite/**'
21-
- 'tooling/scripts/bench-targets.mjs'
22-
- 'package.json'
23-
- 'pnpm-lock.yaml'
24-
- 'pnpm-workspace.yaml'
25-
- 'turbo.json'
26-
- '.github/actions/pnpm-install/**'
27-
- '.github/workflows/slate-ci.yml'
9+
- "packages/browser/**"
10+
- "packages/plite/**"
11+
- "packages/plite-dom/**"
12+
- "packages/plite-history/**"
13+
- "packages/plite-hyperscript/**"
14+
- "packages/plite-layout/**"
15+
- "packages/plite-react/**"
16+
- "packages/yjs/**"
17+
- "apps/plite/**"
18+
- "apps/www/src/app/(app)/examples/plite/**"
19+
- "apps/plite/tests/plite-browser/**"
20+
- "content/docs/plite/**"
21+
- "tooling/scripts/bench-targets.mjs"
22+
- "package.json"
23+
- "pnpm-lock.yaml"
24+
- "pnpm-workspace.yaml"
25+
- "turbo.json"
26+
- ".github/actions/pnpm-install/**"
27+
- ".github/workflows/plite-ci.yml"
2828
pull_request:
2929
types:
3030
- opened
3131
- synchronize
3232
- reopened
3333
paths:
34-
- 'packages/browser/**'
35-
- 'packages/plite/**'
36-
- 'packages/plite-dom/**'
37-
- 'packages/plite-history/**'
38-
- 'packages/plite-hyperscript/**'
39-
- 'packages/plite-layout/**'
40-
- 'packages/plite-react/**'
41-
- 'packages/yjs/**'
42-
- 'apps/plite/**'
43-
- 'apps/www/src/app/(app)/examples/plite/**'
44-
- 'apps/plite/tests/plite-browser/**'
45-
- 'content/docs/plite/**'
46-
- 'tooling/scripts/bench-targets.mjs'
47-
- 'package.json'
48-
- 'pnpm-lock.yaml'
49-
- 'pnpm-workspace.yaml'
50-
- 'turbo.json'
51-
- '.github/actions/pnpm-install/**'
52-
- '.github/workflows/slate-ci.yml'
34+
- "packages/browser/**"
35+
- "packages/plite/**"
36+
- "packages/plite-dom/**"
37+
- "packages/plite-history/**"
38+
- "packages/plite-hyperscript/**"
39+
- "packages/plite-layout/**"
40+
- "packages/plite-react/**"
41+
- "packages/yjs/**"
42+
- "apps/plite/**"
43+
- "apps/www/src/app/(app)/examples/plite/**"
44+
- "apps/plite/tests/plite-browser/**"
45+
- "content/docs/plite/**"
46+
- "tooling/scripts/bench-targets.mjs"
47+
- "package.json"
48+
- "pnpm-lock.yaml"
49+
- "pnpm-workspace.yaml"
50+
- "turbo.json"
51+
- ".github/actions/pnpm-install/**"
52+
- ".github/workflows/plite-ci.yml"
5353
workflow_dispatch:
5454

5555
permissions:

.github/workflows/plite-deps-pr.yml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@ name: PliteDepsSync
22

33
on:
44
schedule:
5-
- cron: '0 6 * * *'
5+
- cron: "0 6 * * *"
66
workflow_dispatch:
77

88
permissions:
99
contents: write
1010

1111
concurrency:
12-
group: slate-deps-sync
12+
group: plite-deps-sync
1313
cancel-in-progress: false
1414

1515
jobs:
@@ -42,7 +42,7 @@ jobs:
4242
- name: ⬆️ Update Plite manifests
4343
run: >
4444
npx npm-check-updates@latest
45-
'/^(slate|plite-dom|slate-react|slate-hyperscript)$/'
45+
'/^@platejs\/(plite|plite-dom|plite-react|plite-hyperscript)$/'
4646
--configFileName .ncurc.yml
4747
--configFilePath tooling/config
4848
--mergeConfig
@@ -54,10 +54,10 @@ jobs:
5454
- name: 📦 Install updated deps
5555
run: pnpm install --no-frozen-lockfile
5656
env:
57-
HUSKY: '0'
57+
HUSKY: "0"
5858

5959
- name: 🔍 Detect Plite update changes
60-
id: slate-changes
60+
id: plite-changes
6161
run: |
6262
node <<'EOF'
6363
const { execFileSync } = require('node:child_process');
@@ -76,10 +76,10 @@ jobs:
7676
'optionalDependencies',
7777
];
7878
const targets = [
79-
'slate',
80-
'plite-dom',
81-
'plite-react',
82-
'plite-hyperscript',
79+
'@platejs/plite',
80+
'@platejs/plite-dom',
81+
'@platejs/plite-react',
82+
'@platejs/plite-hyperscript',
8383
];
8484
const changed = new Set();
8585
@@ -127,10 +127,10 @@ jobs:
127127
env:
128128
CHANGED_PACKAGES_JSON: ${{ steps.plite-changes.outputs.packages_json }}
129129
run: |
130-
if [ -f .changeset/slate.md ]; then
131-
echo "Updating existing .changeset/slate.md"
130+
if [ -f .changeset/plite.md ]; then
131+
echo "Updating existing .changeset/plite.md"
132132
else
133-
echo "Creating .changeset/slate.md"
133+
echo "Creating .changeset/plite.md"
134134
fi
135135
136136
node <<'EOF'
@@ -140,7 +140,7 @@ jobs:
140140
const message = `Updated ${packages.map((name) => `\`${name}\``).join(', ')}.`;
141141
142142
writeFileSync(
143-
'.changeset/slate.md',
143+
'.changeset/plite.md',
144144
`---\n"@platejs/plite": patch\n---\n\n${message}\n`
145145
);
146146
EOF

apps/www/next.config.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ const WORKSPACE_ALIAS_SUBPATHS = [
3838
'transports',
3939
];
4040

41-
const isSlateMode = process.env.PLATE_WWW_SLATE === '1';
41+
const isPliteMode = process.env.PLATE_WWW_PLITE === '1';
4242

4343
const addAliasEntries = (
4444
aliases: Record<string, string>,
@@ -141,7 +141,7 @@ const withMDX = createMDX({});
141141
const nextConfig = async (_phase: string) => {
142142
const isDev = _phase === PHASE_DEVELOPMENT_SERVER;
143143
const config: NextConfig = {
144-
distDir: isSlateMode ? '.next-slate' : '.next',
144+
distDir: isPliteMode ? '.next-slate' : '.next',
145145
typescript: {
146146
ignoreBuildErrors: true,
147147
},
@@ -179,7 +179,7 @@ const nextConfig = async (_phase: string) => {
179179
'/blocks/slate-to-html': ['./public/tailwind.css'],
180180
'/cn/docs/[[...slug]]': ['./src/registry/**/*', './public/r/**/*'],
181181
'/docs/[[...slug]]': ['./src/registry/**/*', './public/r/**/*'],
182-
'/docs/examples/slate-to-html': ['./public/tailwind.css'],
182+
'/docs/examples/plite-to-html': ['./public/tailwind.css'],
183183
'/view/slate-to-html': ['./public/tailwind.css'],
184184
},
185185
reactCompiler: !isDev,
@@ -210,19 +210,19 @@ const nextConfig = async (_phase: string) => {
210210
source: '/cn/docs/migration',
211211
},
212212
{
213-
destination: '/examples/slate/richtext',
213+
destination: '/examples/plite/richtext',
214214
permanent: true,
215-
source: '/docs/slate/examples',
215+
source: '/docs/plite/examples',
216216
},
217217
{
218-
destination: '/docs/slate/migration',
218+
destination: '/docs/plite/migration',
219219
permanent: true,
220-
source: '/docs/slate/migration/slate-v2',
220+
source: '/docs/plite/migration/plite',
221221
},
222222
{
223-
destination: '/docs/slate/why-this-fork',
223+
destination: '/docs/plite/why-this-fork',
224224
permanent: true,
225-
source: '/docs/slate/releases/slate-v2',
225+
source: '/docs/plite/releases/plite',
226226
},
227227
{
228228
destination: '/docs/installation/plate-ui#sync-copied-files',

apps/www/package.json

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"check:docs": "pnpm build:source && tsx --tsconfig ./scripts/tsconfig.scripts.json scripts/check-docs-source-parity.mts",
1414
"dev": "PLATE_WWW_DYNAMIC_DOCS=1 pnpm build:source:dev && PLATE_WWW_DYNAMIC_DOCS=1 next dev",
1515
"dev:highlight": "PLATE_WWW_DYNAMIC_DOCS=1 PLATE_WWW_CODE_HIGHLIGHT=1 pnpm build:source:dev && PLATE_WWW_DYNAMIC_DOCS=1 PLATE_WWW_CODE_HIGHLIGHT=1 next dev",
16-
"dev:slate": "PLATE_WWW_SLATE=1 PLATE_WWW_DEV_SOURCE=1 next dev --webpack",
16+
"dev:slate": "PLATE_WWW_PLITE=1 PLATE_WWW_DEV_SOURCE=1 next dev --webpack",
1717
"lint": "npx eslint . --ext .js,.jsx,.ts,.tsx",
1818
"lint:debug": "TIMING=1 DEBUG=eslint:cli-engine pnpm lint:fix",
1919
"lint:fix": "pnpm lint --fix",
@@ -89,12 +89,15 @@
8989
"@platejs/media": "workspace:^",
9090
"@platejs/mention": "workspace:^",
9191
"@platejs/playwright": "workspace:^",
92+
"@platejs/plite": "workspace:^",
93+
"@platejs/plite-dom": "workspace:^",
94+
"@platejs/plite-history": "workspace:^",
95+
"@platejs/plite-hyperscript": "workspace:^",
96+
"@platejs/plite-layout": "workspace:^",
97+
"@platejs/plite-react": "workspace:^",
9298
"@platejs/resizable": "workspace:^",
9399
"@platejs/selection": "workspace:^",
94100
"@platejs/slash-command": "workspace:^",
95-
"@platejs/slate": "workspace:^",
96-
"@platejs/slate-dom": "workspace:^",
97-
"@platejs/slate-react": "workspace:^",
98101
"@platejs/suggestion": "workspace:^",
99102
"@platejs/tabbable": "workspace:^",
100103
"@platejs/table": "workspace:^",
@@ -122,6 +125,7 @@
122125
"@radix-ui/react-select": "2.2.5",
123126
"@radix-ui/react-separator": "1.1.7",
124127
"@radix-ui/react-slot": "1.2.3",
128+
"@radix-ui/react-switch": "1.2.5",
125129
"@radix-ui/react-tabs": "1.1.12",
126130
"@radix-ui/react-toggle": "1.1.9",
127131
"@radix-ui/react-toggle-group": "1.1.10",
@@ -149,6 +153,8 @@
149153
"fumadocs-ui": "16.9.3",
150154
"fzf": "0.5.2",
151155
"html2canvas-pro": "1.5.11",
156+
"image-extensions": "^1.1.0",
157+
"is-url": "^1.2.4",
152158
"jotai": "2.8.4",
153159
"lodash": "4.17.21",
154160
"lowlight": "3.3.0",
@@ -162,6 +168,7 @@
162168
"pdf-lib": "1.17.1",
163169
"platejs": "workspace:^",
164170
"prismjs": "1.30.0",
171+
"radix-ui": "^1.4.3",
165172
"react": "19.2.4",
166173
"react-compiler-runtime": "^1.0.0",
167174
"react-day-picker": "8.10.1",
@@ -183,6 +190,7 @@
183190
"shadcn": "4.10.0",
184191
"shadcn-prose": "1.0.8",
185192
"slate": "0.124.1",
193+
"slate-dom": "0.124.1",
186194
"slate-react": "0.124.2",
187195
"sonner": "2.0.5",
188196
"stream-browserify": "3.0.0",
@@ -191,15 +199,8 @@
191199
"uploadthing": "7.7.2",
192200
"use-file-picker": "2.1.2",
193201
"y-webrtc": "10.3.0",
194-
"zod": "3.25.61",
195-
"@platejs/slate-history": "workspace:^",
196-
"@platejs/slate-hyperscript": "workspace:^",
197-
"@platejs/slate-layout": "workspace:^",
198-
"@radix-ui/react-switch": "1.2.5",
199-
"radix-ui": "^1.4.3",
200-
"image-extensions": "^1.1.0",
201-
"is-url": "^1.2.4",
202-
"yjs": "13.6.30"
202+
"yjs": "13.6.30",
203+
"zod": "3.25.61"
203204
},
204205
"devDependencies": {
205206
"@shikijs/compat": "1.1.7",

apps/www/scripts/check-docs-source-parity.mts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ const appOnlyDocsRoutes = new Set([
4343
'/docs/components',
4444
'/docs/examples',
4545
'/docs/examples/server-side',
46-
'/docs/examples/slate-to-html',
46+
'/docs/examples/plite-to-html',
4747
'/docs/plugins',
4848
]);
4949

0 commit comments

Comments
 (0)