@lingjingai/script-editor 0.1.22 → 0.1.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/INTEGRATION.md +2 -5
  2. package/package.json +2 -6
package/INTEGRATION.md CHANGED
@@ -12,15 +12,12 @@
12
12
 
13
13
  - **peer 依赖**:`react` / `react-dom` `^18 || ^19`。
14
14
  - **自带依赖**(会被一起装):`lucide-react`、`react-virtuoso`。
15
- - **本包尚未发布到 npm**(`workspace` 包,version `0.0.1`)。外部项目三选一:
16
- - **(a) monorepo / workspace**:`"@lingjingai/script-editor": "workspace:*"`。
17
- - **(b) tarball**:在本包目录 `npm run build && npm pack`,把 `.tgz` 拷过去 `npm i ./xxx.tgz`。
18
- - **(c) 发私有 npm** 后正常 `npm i`。
15
+ - **安装**:外部项目正常 `npm i @lingjingai/script-editor`;本 monorepo 内可用 `"@lingjingai/script-editor": "workspace:*"`。
19
16
  - **必须引入 CSS**(组件靠自带样式,不依赖 Tailwind):
20
17
  ```ts
21
18
  import "@lingjingai/script-editor/style.css";
22
19
  ```
23
- - **构建产物**:发布 / 外部消费走 `dist`(`tsup` 编译好的 JS + d.ts + style.css + paper-fibers.png),无需编译包内 TS。本仓 `apps/web` dev 通过 Vite 的 `conditions:["development"]` `src/index.ts` + `src/styles.css`,这样改包内源码能 HMR 生效;外部没有该 condition 时自动落到 `dist`。
20
+ - **构建产物**:发布 / 外部消费走 `dist`(`tsup` 编译好的 JS + d.ts + style.css + paper-fibers.png),无需编译包内 TS。`style.css` 始终导向 `dist/style.css`,避免宿主 Vite dev 的 `development` condition 解析到未发布的 `src/styles.css`。
24
21
 
25
22
  ---
26
23
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lingjingai/script-editor",
3
- "version": "0.1.22",
3
+ "version": "0.1.24",
4
4
  "description": "Pure, business-decoupled screenplay (剧本) editor: value:ScriptProject + onEdit(patch); dual-format (standard/asian), virtualized single-stream, click-to-edit; bundled CSS, business injected via adapters.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -13,14 +13,10 @@
13
13
  ],
14
14
  "exports": {
15
15
  ".": {
16
- "development": "./src/index.ts",
17
16
  "types": "./dist/index.d.ts",
18
17
  "default": "./dist/index.js"
19
18
  },
20
- "./style.css": {
21
- "development": "./src/styles.css",
22
- "default": "./dist/style.css"
23
- }
19
+ "./style.css": "./dist/style.css"
24
20
  },
25
21
  "main": "./dist/index.js",
26
22
  "types": "./dist/index.d.ts",