grapes-vue-lite 0.1.2 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +23 -4
- package/dist-lib/grapes-vue-lite.js +1789 -1752
- package/dist-lib/grapes-vue-lite.umd.cjs +12 -12
- package/dist-lib/style.css +1 -1
- package/dist-lib/types/components/EditorRoot.vue.d.ts +11 -6
- package/dist-lib/types/index.d.ts +0 -1
- package/package.json +8 -3
package/README.md
CHANGED
|
@@ -16,8 +16,7 @@ For local validation before publishing:
|
|
|
16
16
|
|
|
17
17
|
```bash
|
|
18
18
|
pnpm build
|
|
19
|
-
|
|
20
|
-
pnpm add ./grapes-vue-lite-0.1.0.tgz
|
|
19
|
+
pnpm check:release
|
|
21
20
|
```
|
|
22
21
|
|
|
23
22
|
## Commands
|
|
@@ -26,12 +25,22 @@ pnpm add ./grapes-vue-lite-0.1.0.tgz
|
|
|
26
25
|
pnpm install
|
|
27
26
|
pnpm dev
|
|
28
27
|
pnpm test:run
|
|
28
|
+
pnpm check:dist-import
|
|
29
|
+
pnpm check:package
|
|
30
|
+
pnpm check:release
|
|
31
|
+
pnpm check:types-consumer
|
|
32
|
+
pnpm pack:dry-run
|
|
29
33
|
pnpm build:lib
|
|
30
34
|
pnpm build
|
|
31
35
|
```
|
|
32
36
|
|
|
33
|
-
`pnpm
|
|
37
|
+
`pnpm check:package` verifies package export paths, generated declaration files, peer dependency shape, and embeddable library CSS.
|
|
38
|
+
`pnpm check:dist-import` verifies the built ESM and UMD/CJS entrypoints can be imported and expose the expected public exports.
|
|
39
|
+
`pnpm check:types-consumer` compiles a temporary TypeScript consumer that imports the built package through `package.json` exports.
|
|
40
|
+
`pnpm pack:dry-run` prints the exact npm tarball file list with a workspace-local npm cache; run it before publishing.
|
|
41
|
+
`pnpm build` runs smoke tests, type checks, the demo app build, the library build, and the package check.
|
|
34
42
|
`pnpm build:lib` emits the third-party integration package into `dist-lib`.
|
|
43
|
+
`pnpm check:release` runs the full publish gate: default build, built entrypoint import checks, consumer type checks, and npm pack dry-run. It is intentionally separate from `pnpm build` because it exercises npm and TypeScript entrypoints as an external consumer would.
|
|
35
44
|
|
|
36
45
|
## Third-party Vue Integration
|
|
37
46
|
|
|
@@ -102,6 +111,8 @@ function handleChange(projectJson: string) {
|
|
|
102
111
|
|
|
103
112
|
The package treats `vue` as a peer dependency, so the host application owns the Vue runtime version.
|
|
104
113
|
|
|
114
|
+
### Embedding Checklist
|
|
115
|
+
|
|
105
116
|
The editor fills its parent container by default. When embedding it in a dialog, drawer, tab pane, or any constrained area, set the host container height explicitly:
|
|
106
117
|
|
|
107
118
|
```vue
|
|
@@ -119,7 +130,15 @@ The editor fills its parent container by default. When embedding it in a dialog,
|
|
|
119
130
|
</style>
|
|
120
131
|
```
|
|
121
132
|
|
|
122
|
-
For full-screen usage, set the host container to `100dvh`. The library stylesheet avoids forcing `body`, `html`,
|
|
133
|
+
For full-screen usage, set the host container to `100dvh`. The library stylesheet scopes editor tokens, box sizing, form-control font rules, and overlays under `.app-shell`; it avoids forcing `body`, `html`, `#app`, or viewport-height layout so it does not override the host application's page layout.
|
|
134
|
+
|
|
135
|
+
Keyboard shortcuts are scoped to the active editor instance. Focus or pointer interaction inside an editor marks it active, typing targets are ignored, and multiple editors on the same page do not share command handling. Disable built-in shortcuts when a host application owns all keyboard handling:
|
|
136
|
+
|
|
137
|
+
```vue
|
|
138
|
+
<GrapesVueEditor :options="options" :shortcuts="false" />
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
Use `:emit-changes="false"` when the host only needs `@ready` and will pull project JSON manually, for example before saving a larger form.
|
|
123
142
|
|
|
124
143
|
## Current Editor Modules
|
|
125
144
|
|