zerocodejs 1.0.1-beta.19 → 1.0.1-beta.20
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.ja.md +14 -0
- package/README.md +14 -0
- package/dist/core/utils/dom-utils.d.ts +3 -0
- package/dist/core/utils/dom-utils.d.ts.map +1 -1
- package/dist/zerocode-ssr.es.js +262 -262
- package/dist/zerocode.es.js +2831 -2830
- package/dist/zerocode.umd.js +43 -43
- package/dist/zerocodejs.css +1 -1
- package/package.json +5 -1
package/README.ja.md
CHANGED
|
@@ -104,6 +104,10 @@ import 'zerocodejs/style.css';
|
|
|
104
104
|
</script>
|
|
105
105
|
```
|
|
106
106
|
|
|
107
|
+
### スタイルシートの読み込み順
|
|
108
|
+
|
|
109
|
+
**`zerocodejs/style.css`**(または `dist/zerocodejs.css`)は、**強いグローバルリセット(Tailwind の Preflight、`input { appearance: none }` など)より後に**読み込むことを推奨します。クラスは `zcode-` でスコープされますが、チェックボックス・ラジオ・`select` などネイティブ要素は広い `input` / `select` リセットの影響を受けることがあります。
|
|
110
|
+
|
|
107
111
|
## コンポーネント
|
|
108
112
|
|
|
109
113
|
### `<zcode-editor>`
|
|
@@ -130,6 +134,16 @@ import 'zerocodejs/style.css';
|
|
|
130
134
|
|
|
131
135
|
詳細は [技術仕様書 – zcode-studio](./TECHNICAL_SPECIFICATION.md#zcode-studio)。
|
|
132
136
|
|
|
137
|
+
## サーバーサイドレンダリング(SSR)
|
|
138
|
+
|
|
139
|
+
**Node.js** や Next.js などでは、公式サブパス **`zerocodejs/ssr`** から `renderToHtml` / `renderCssToHtml` を import することを推奨します。Vue・Web Components を含まない軽量バンドル(`package.json` の `exports["./ssr"]`)です。テンプレート処理には **jsdom** が必要です(`zerocodejs` の依存として入ります)。
|
|
140
|
+
|
|
141
|
+
```javascript
|
|
142
|
+
import { renderToHtml, renderCssToHtml } from 'zerocodejs/ssr';
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
従来どおり **`zerocodejs`** 本体から同じ関数を import することもできます。
|
|
146
|
+
|
|
133
147
|
## 既存データの読み込み
|
|
134
148
|
|
|
135
149
|
既存データを読み込む場合は、JavaScriptで属性を設定します:
|
package/README.md
CHANGED
|
@@ -97,6 +97,10 @@ import 'zerocodejs/style.css';
|
|
|
97
97
|
</script>
|
|
98
98
|
```
|
|
99
99
|
|
|
100
|
+
### Stylesheet load order
|
|
101
|
+
|
|
102
|
+
Import **`zerocodejs/style.css`** after any aggressive global reset (for example Tailwind Preflight or rules that set `input { appearance: none }`). ZeroCode scopes UI with `zcode-` classes, but native checkboxes, radios, and selects can still be affected by broad `input` / `select` resets.
|
|
103
|
+
|
|
100
104
|
## Components
|
|
101
105
|
|
|
102
106
|
### `<zcode-editor>`
|
|
@@ -123,6 +127,16 @@ For **trusted users / agencies**: same **shell as `zcode-editor`** (page, parts,
|
|
|
123
127
|
|
|
124
128
|
See [Technical Specification – zcode-studio](./TECHNICAL_SPECIFICATION.md#zcode-studio).
|
|
125
129
|
|
|
130
|
+
## Server-side rendering (SSR)
|
|
131
|
+
|
|
132
|
+
For **Node.js** or app frameworks (e.g. Next.js), import from the **`zerocodejs/ssr`** subpath. It is the supported `package.json` export for the SSR bundle (no Vue / Web Components). Template processing needs **jsdom** (already a dependency of `zerocodejs`).
|
|
133
|
+
|
|
134
|
+
```javascript
|
|
135
|
+
import { renderToHtml, renderCssToHtml } from 'zerocodejs/ssr';
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
The main **`zerocodejs`** entry also exports these functions if you prefer one resolution from the full library.
|
|
139
|
+
|
|
126
140
|
## Loading Existing Data
|
|
127
141
|
|
|
128
142
|
To load existing data, set attributes via JavaScript:
|
|
@@ -2,6 +2,9 @@
|
|
|
2
2
|
* DOM操作のユーティリティ
|
|
3
3
|
* 環境に応じて適切なDOMParserを返す
|
|
4
4
|
*/
|
|
5
|
+
/** WHATWG nodeType — Node.js has no global `Node`; use these in SSR paths. */
|
|
6
|
+
export declare const DOM_NODE_TYPE_ELEMENT = 1;
|
|
7
|
+
export declare const DOM_NODE_TYPE_TEXT = 3;
|
|
5
8
|
export declare function getDOMParser(): typeof DOMParser;
|
|
6
9
|
/**
|
|
7
10
|
* Shadow DOM内で実行されるスクリプトに対して、そのShadow DOM内の要素にアクセスできるようにする拡張スクリプトを生成
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dom-utils.d.ts","sourceRoot":"","sources":["../../../src/core/utils/dom-utils.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,wBAAgB,YAAY,IAAI,OAAO,SAAS,CAuB/C;AAED;;;;GAIG;AACH,wBAAgB,8BAA8B,CAAC,UAAU,EAAE,UAAU,GAAG,MAAM,CA8V7E;AAED;;;;GAIG;AACH,wBAAgB,wBAAwB,CACtC,UAAU,EAAE,UAAU,EACtB,aAAa,GAAE,OAAe,GAC7B,IAAI,CAyCN;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,IAAI,MAAM,CAkCzC;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,WAAW,EAAE,MAAM,GAAE,MAAU,GAAG,IAAI,CAuB9E"}
|
|
1
|
+
{"version":3,"file":"dom-utils.d.ts","sourceRoot":"","sources":["../../../src/core/utils/dom-utils.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,8EAA8E;AAC9E,eAAO,MAAM,qBAAqB,IAAI,CAAC;AACvC,eAAO,MAAM,kBAAkB,IAAI,CAAC;AAEpC,wBAAgB,YAAY,IAAI,OAAO,SAAS,CAuB/C;AAED;;;;GAIG;AACH,wBAAgB,8BAA8B,CAAC,UAAU,EAAE,UAAU,GAAG,MAAM,CA8V7E;AAED;;;;GAIG;AACH,wBAAgB,wBAAwB,CACtC,UAAU,EAAE,UAAU,EACtB,aAAa,GAAE,OAAe,GAC7B,IAAI,CAyCN;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,IAAI,MAAM,CAkCzC;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,WAAW,EAAE,MAAM,GAAE,MAAU,GAAG,IAAI,CAuB9E"}
|