zerocodejs 1.0.1-beta.0
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/LICENSE +21 -0
- package/README.md +161 -0
- package/dist/__tests__/fixtures/sample-data.d.ts +23 -0
- package/dist/__tests__/fixtures/sample-data.d.ts.map +1 -0
- package/dist/__tests__/fixtures/sample-templates.d.ts +25 -0
- package/dist/__tests__/fixtures/sample-templates.d.ts.map +1 -0
- package/dist/components/ZeroCodeCMS.vue.d.ts +142 -0
- package/dist/components/ZeroCodeCMS.vue.d.ts.map +1 -0
- package/dist/components/ZeroCodeEditor.vue.d.ts +341 -0
- package/dist/components/ZeroCodeEditor.vue.d.ts.map +1 -0
- package/dist/components/ZeroCodePreview.vue.d.ts +36 -0
- package/dist/components/ZeroCodePreview.vue.d.ts.map +1 -0
- package/dist/core/composables/useZeroCodeData.d.ts +91 -0
- package/dist/core/composables/useZeroCodeData.d.ts.map +1 -0
- package/dist/core/composables/useZeroCodeRenderer.d.ts +7 -0
- package/dist/core/composables/useZeroCodeRenderer.d.ts.map +1 -0
- package/dist/core/renderer/renderer.d.ts +20 -0
- package/dist/core/renderer/renderer.d.ts.map +1 -0
- package/dist/core/utils/component-initializer.d.ts +6 -0
- package/dist/core/utils/component-initializer.d.ts.map +1 -0
- package/dist/core/utils/component-initializer.test.d.ts +2 -0
- package/dist/core/utils/component-initializer.test.d.ts.map +1 -0
- package/dist/core/utils/css-manager.d.ts +41 -0
- package/dist/core/utils/css-manager.d.ts.map +1 -0
- package/dist/core/utils/dom-utils.d.ts +29 -0
- package/dist/core/utils/dom-utils.d.ts.map +1 -0
- package/dist/core/utils/field-extractor.d.ts +8 -0
- package/dist/core/utils/field-extractor.d.ts.map +1 -0
- package/dist/core/utils/field-extractor.test.d.ts +2 -0
- package/dist/core/utils/field-extractor.test.d.ts.map +1 -0
- package/dist/core/utils/i18n-setup.d.ts +26 -0
- package/dist/core/utils/i18n-setup.d.ts.map +1 -0
- package/dist/core/utils/image-utils.d.ts +7 -0
- package/dist/core/utils/image-utils.d.ts.map +1 -0
- package/dist/core/utils/image-utils.test.d.ts +2 -0
- package/dist/core/utils/image-utils.test.d.ts.map +1 -0
- package/dist/core/utils/path-utils.d.ts +18 -0
- package/dist/core/utils/path-utils.d.ts.map +1 -0
- package/dist/core/utils/path-utils.test.d.ts +2 -0
- package/dist/core/utils/path-utils.test.d.ts.map +1 -0
- package/dist/core/utils/sanitize.d.ts +10 -0
- package/dist/core/utils/sanitize.d.ts.map +1 -0
- package/dist/core/utils/storage.d.ts +16 -0
- package/dist/core/utils/storage.d.ts.map +1 -0
- package/dist/core/utils/storage.test.d.ts +2 -0
- package/dist/core/utils/storage.test.d.ts.map +1 -0
- package/dist/core/utils/template-processor.d.ts +12 -0
- package/dist/core/utils/template-processor.d.ts.map +1 -0
- package/dist/core/utils/template-processor.test.d.ts +2 -0
- package/dist/core/utils/template-processor.test.d.ts.map +1 -0
- package/dist/core/utils/template-regex.d.ts +29 -0
- package/dist/core/utils/template-regex.d.ts.map +1 -0
- package/dist/core/utils/template-utils.d.ts +14 -0
- package/dist/core/utils/template-utils.d.ts.map +1 -0
- package/dist/core/utils/template-utils.test.d.ts +2 -0
- package/dist/core/utils/template-utils.test.d.ts.map +1 -0
- package/dist/core/utils/validation.d.ts +2 -0
- package/dist/core/utils/validation.d.ts.map +1 -0
- package/dist/core/utils/validation.test.d.ts +2 -0
- package/dist/core/utils/validation.test.d.ts.map +1 -0
- package/dist/css/common.css +677 -0
- package/dist/css/docs.css +396 -0
- package/dist/css/index.css +1039 -0
- package/dist/css/page.css +290 -0
- package/dist/css/sample.css +26 -0
- package/dist/css/site-common.css +218 -0
- package/dist/features/add/components/AddPanel.vue.d.ts +41 -0
- package/dist/features/add/components/AddPanel.vue.d.ts.map +1 -0
- package/dist/features/add/composables/useAddMode.d.ts +84 -0
- package/dist/features/add/composables/useAddMode.d.ts.map +1 -0
- package/dist/features/data-viewer/components/DataViewer.vue.d.ts +11 -0
- package/dist/features/data-viewer/components/DataViewer.vue.d.ts.map +1 -0
- package/dist/features/delete/components/DeletePanel.vue.d.ts +17 -0
- package/dist/features/delete/components/DeletePanel.vue.d.ts.map +1 -0
- package/dist/features/delete/composables/useDeleteMode.d.ts +20 -0
- package/dist/features/delete/composables/useDeleteMode.d.ts.map +1 -0
- package/dist/features/editor/components/ContextMenu.vue.d.ts +18 -0
- package/dist/features/editor/components/ContextMenu.vue.d.ts.map +1 -0
- package/dist/features/editor/components/EditPanel.vue.d.ts +39 -0
- package/dist/features/editor/components/EditPanel.vue.d.ts.map +1 -0
- package/dist/features/editor/components/ImageSelectModal.vue.d.ts +23 -0
- package/dist/features/editor/components/ImageSelectModal.vue.d.ts.map +1 -0
- package/dist/features/editor/components/RichTextEditor.vue.d.ts +11 -0
- package/dist/features/editor/components/RichTextEditor.vue.d.ts.map +1 -0
- package/dist/features/editor/components/SettingsPanel.vue.d.ts +25 -0
- package/dist/features/editor/components/SettingsPanel.vue.d.ts.map +1 -0
- package/dist/features/editor/components/Toolbar.vue.d.ts +21 -0
- package/dist/features/editor/components/Toolbar.vue.d.ts.map +1 -0
- package/dist/features/editor/composables/useClickHandlers.d.ts +8 -0
- package/dist/features/editor/composables/useClickHandlers.d.ts.map +1 -0
- package/dist/features/editor/composables/useContextMenu.d.ts +20 -0
- package/dist/features/editor/composables/useContextMenu.d.ts.map +1 -0
- package/dist/features/editor/composables/useEditMode.d.ts +66 -0
- package/dist/features/editor/composables/useEditMode.d.ts.map +1 -0
- package/dist/features/editor/composables/useEditorMode.d.ts +7 -0
- package/dist/features/editor/composables/useEditorMode.d.ts.map +1 -0
- package/dist/features/editor/composables/useModeSwitcher.d.ts +7 -0
- package/dist/features/editor/composables/useModeSwitcher.d.ts.map +1 -0
- package/dist/features/editor/composables/useOutlineManager.d.ts +5 -0
- package/dist/features/editor/composables/useOutlineManager.d.ts.map +1 -0
- package/dist/features/images-manager/components/ImagesManagerPanel.vue.d.ts +12 -0
- package/dist/features/images-manager/components/ImagesManagerPanel.vue.d.ts.map +1 -0
- package/dist/features/images-manager/composables/useImagesManager.d.ts +47 -0
- package/dist/features/images-manager/composables/useImagesManager.d.ts.map +1 -0
- package/dist/features/parent-selector/composables/useParentSelector.d.ts +9 -0
- package/dist/features/parent-selector/composables/useParentSelector.d.ts.map +1 -0
- package/dist/features/parts-manager/components/MonacoEditor.vue.d.ts +20 -0
- package/dist/features/parts-manager/components/MonacoEditor.vue.d.ts.map +1 -0
- package/dist/features/parts-manager/components/PartsManagerPanel.vue.d.ts +10 -0
- package/dist/features/parts-manager/components/PartsManagerPanel.vue.d.ts.map +1 -0
- package/dist/features/parts-manager/composables/usePartsManager.d.ts +190 -0
- package/dist/features/parts-manager/composables/usePartsManager.d.ts.map +1 -0
- package/dist/features/preview/PreviewArea.vue.d.ts +15 -0
- package/dist/features/preview/PreviewArea.vue.d.ts.map +1 -0
- package/dist/features/reorder/components/ReorderPanel.vue.d.ts +14 -0
- package/dist/features/reorder/components/ReorderPanel.vue.d.ts.map +1 -0
- package/dist/features/reorder/composables/useReorderMode.d.ts +9 -0
- package/dist/features/reorder/composables/useReorderMode.d.ts.map +1 -0
- package/dist/footer.html +10 -0
- package/dist/header.html +10 -0
- package/dist/i18n/index.d.ts +454 -0
- package/dist/i18n/index.d.ts.map +1 -0
- package/dist/i18n/locales/en.d.ts +231 -0
- package/dist/i18n/locales/en.d.ts.map +1 -0
- package/dist/i18n/locales/ja.d.ts +223 -0
- package/dist/i18n/locales/ja.d.ts.map +1 -0
- package/dist/images/customer-avatar.jpg +0 -0
- package/dist/images/default-avatar.jpg +0 -0
- package/dist/images/default.jpg +0 -0
- package/dist/images/hero-bg.jpg +0 -0
- package/dist/images/kv_image.jpg +0 -0
- package/dist/images/page-specific-hero.jpg +0 -0
- package/dist/images/sample-1.jpg +0 -0
- package/dist/images/sample-2.jpg +0 -0
- package/dist/images/sample-3.jpg +0 -0
- package/dist/images/zcode_top_01.png +0 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/js/accordion.js +24 -0
- package/dist/js/common.js +1093 -0
- package/dist/types/index.d.ts +96 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/web-component.d.ts +14 -0
- package/dist/web-component.d.ts.map +1 -0
- package/dist/web-components/zcode-cms.d.ts +29 -0
- package/dist/web-components/zcode-cms.d.ts.map +1 -0
- package/dist/web-components/zcode-editor.d.ts +29 -0
- package/dist/web-components/zcode-editor.d.ts.map +1 -0
- package/dist/zerocode.es.js +28710 -0
- package/dist/zerocode.es.js.map +1 -0
- package/dist/zerocode.umd.js +490 -0
- package/dist/zerocode.umd.js.map +1 -0
- package/dist/zerocodejs.css +1 -0
- package/package.json +94 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Atsumi
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
# ZeroCode.js
|
|
2
|
+
|
|
3
|
+
フレームワーク非依存のWeb ComponentsベースのCMSエディターライブラリ
|
|
4
|
+
|
|
5
|
+
> **Status: Beta**
|
|
6
|
+
>
|
|
7
|
+
> ZeroCode.js は現在ベータ版です。仕様・API・データ形式は予告なく変更される可能性があります(破壊的変更を含む)。
|
|
8
|
+
> 不具合報告・改善提案・ユースケース共有・ドキュメントのズレの指摘を歓迎します。
|
|
9
|
+
>
|
|
10
|
+
> - **Issue**: [../../issues](../../issues)
|
|
11
|
+
> - **Discussion**: [../../discussions](../../discussions)(運用していない場合は Issue でOK)
|
|
12
|
+
> - **Contributing**: [./CONTRIBUTING.md](./CONTRIBUTING.md)
|
|
13
|
+
|
|
14
|
+
> ⭐ **スターをお願いします**
|
|
15
|
+
> このプロジェクトに共感していただけたら、[GitHub でスター](https://github.com/atsumi-code/zerocode)をいただけると励みになります。
|
|
16
|
+
|
|
17
|
+
## 特徴
|
|
18
|
+
|
|
19
|
+
- **フレームワーク非依存**: Web Componentsとして実装されているため、どのフレームワークでも使用可能
|
|
20
|
+
- **視覚的編集**: クリック操作でコンテンツを編集・追加・削除・並べ替え
|
|
21
|
+
- **パーツ管理**: 再利用可能なパーツを作成・管理
|
|
22
|
+
- **画像管理**: 画像のアップロード・管理機能
|
|
23
|
+
- **柔軟なテンプレート**: カスタムHTMLテンプレート構文で動的なコンテンツを定義
|
|
24
|
+
- **高速**: Vue 3とViteによる高速な開発体験
|
|
25
|
+
|
|
26
|
+
## インストール
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
npm install zerocodejs
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
ZeroCode.jsは内部でVue 3を使用しています。npm 7以降では、peer dependenciesが自動的にインストールされるため、`npm install zerocodejs`だけでVueも一緒にインストールされます。
|
|
33
|
+
|
|
34
|
+
> **注意:** npm 6以前を使用している場合は、明示的に`npm install zerocodejs vue`を実行してください。
|
|
35
|
+
|
|
36
|
+
## クイックスタート
|
|
37
|
+
|
|
38
|
+
### 基本的な使用例
|
|
39
|
+
|
|
40
|
+
```html
|
|
41
|
+
<!DOCTYPE html>
|
|
42
|
+
<html lang="ja">
|
|
43
|
+
<head>
|
|
44
|
+
<meta charset="UTF-8">
|
|
45
|
+
<title>ZeroCode.js Example</title>
|
|
46
|
+
<link rel="stylesheet" href="node_modules/zerocodejs/dist/style.css">
|
|
47
|
+
</head>
|
|
48
|
+
<body>
|
|
49
|
+
<zcode-cms id="cms" locale="ja">
|
|
50
|
+
<link slot="css" rel="stylesheet" href="/css/common.css" />
|
|
51
|
+
<script slot="script" src="/js/accordion.js"></script>
|
|
52
|
+
</zcode-cms>
|
|
53
|
+
|
|
54
|
+
<script type="module">
|
|
55
|
+
import 'zerocodejs';
|
|
56
|
+
|
|
57
|
+
const cms = document.getElementById('cms');
|
|
58
|
+
cms.setAttribute('page', JSON.stringify([]));
|
|
59
|
+
cms.setAttribute('parts-common', JSON.stringify([]));
|
|
60
|
+
cms.setAttribute('parts-individual', JSON.stringify([]));
|
|
61
|
+
cms.setAttribute('parts-special', JSON.stringify([]));
|
|
62
|
+
cms.setAttribute('images-common', JSON.stringify([]));
|
|
63
|
+
cms.setAttribute('images-individual', JSON.stringify([]));
|
|
64
|
+
cms.setAttribute('images-special', JSON.stringify([]));
|
|
65
|
+
</script>
|
|
66
|
+
</body>
|
|
67
|
+
</html>
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
### Reactでの使用例
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
npm install zerocodejs
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
```jsx
|
|
77
|
+
import { useEffect } from 'react';
|
|
78
|
+
import 'zerocodejs';
|
|
79
|
+
import 'zerocodejs/style.css';
|
|
80
|
+
|
|
81
|
+
function App() {
|
|
82
|
+
useEffect(() => {
|
|
83
|
+
const cms = document.getElementById('cms');
|
|
84
|
+
if (cms) {
|
|
85
|
+
cms.setAttribute('page', JSON.stringify([]));
|
|
86
|
+
cms.setAttribute('parts-common', JSON.stringify([]));
|
|
87
|
+
cms.setAttribute('parts-individual', JSON.stringify([]));
|
|
88
|
+
cms.setAttribute('parts-special', JSON.stringify([]));
|
|
89
|
+
cms.setAttribute('images-common', JSON.stringify([]));
|
|
90
|
+
cms.setAttribute('images-individual', JSON.stringify([]));
|
|
91
|
+
cms.setAttribute('images-special', JSON.stringify([]));
|
|
92
|
+
}
|
|
93
|
+
}, []);
|
|
94
|
+
|
|
95
|
+
return <zcode-cms id="cms" locale="ja" />;
|
|
96
|
+
}
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
### Vueでの使用例
|
|
100
|
+
|
|
101
|
+
```bash
|
|
102
|
+
npm install zerocodejs
|
|
103
|
+
# Vueは既にインストール済み
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
```vue
|
|
107
|
+
<template>
|
|
108
|
+
<zcode-cms id="cms" locale="ja" />
|
|
109
|
+
</template>
|
|
110
|
+
|
|
111
|
+
<script setup>
|
|
112
|
+
import 'zerocodejs';
|
|
113
|
+
import 'zerocodejs/style.css';
|
|
114
|
+
</script>
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
### エンジニア用管理画面
|
|
118
|
+
|
|
119
|
+
```html
|
|
120
|
+
<zcode-editor id="editor" locale="ja">
|
|
121
|
+
<link slot="css" rel="stylesheet" href="/css/common.css" />
|
|
122
|
+
<script slot="script" src="/js/accordion.js"></script>
|
|
123
|
+
</zcode-editor>
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
### CDN経由で使用する場合
|
|
127
|
+
|
|
128
|
+
```html
|
|
129
|
+
<!-- Vueを先に読み込む -->
|
|
130
|
+
<script src="https://unpkg.com/vue@3/dist/vue.global.js"></script>
|
|
131
|
+
<!-- ZeroCode.jsを読み込む -->
|
|
132
|
+
<script src="https://unpkg.com/zerocodejs/dist/zerocode.umd.js"></script>
|
|
133
|
+
<link rel="stylesheet" href="https://unpkg.com/zerocodejs/dist/style.css">
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
## ドキュメント
|
|
137
|
+
|
|
138
|
+
- [技術仕様書](./TECHNICAL_SPECIFICATION.md)
|
|
139
|
+
- [実装TODO](./TODO.md)
|
|
140
|
+
- [AI向けガイドライン](./AGENTS.md)
|
|
141
|
+
|
|
142
|
+
## セキュリティ
|
|
143
|
+
|
|
144
|
+
ZeroCode.jsはフロントエンドライブラリのため、クライアント側での完全なセキュリティ保証はできません。
|
|
145
|
+
|
|
146
|
+
### 推奨事項
|
|
147
|
+
|
|
148
|
+
- **サーバー側での検証を必須とする**: データ保存前にサーバー側で検証してください
|
|
149
|
+
- **認証・認可の実装**: パーツデータの変更は認証されたユーザーのみ許可してください
|
|
150
|
+
- **送信元の検証**: `save-request`イベントの`source`フィールドを確認してください
|
|
151
|
+
- **パーツテンプレートの管理**: パーツテンプレートは信頼できるソースからのみ使用してください
|
|
152
|
+
|
|
153
|
+
詳細は[技術仕様書](./TECHNICAL_SPECIFICATION.md)のセキュリティセクションを参照してください。
|
|
154
|
+
|
|
155
|
+
## ライセンス
|
|
156
|
+
|
|
157
|
+
MIT License
|
|
158
|
+
|
|
159
|
+
---
|
|
160
|
+
|
|
161
|
+
**最終更新日**: 2025年1月
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ComponentData, PartData, TypeData, ZeroCodeData, ImageData } from '../../types';
|
|
2
|
+
export declare const sampleComponentData: ComponentData;
|
|
3
|
+
export declare const samplePartData: PartData;
|
|
4
|
+
export declare const sampleTypeData: TypeData;
|
|
5
|
+
export declare const sampleImageData: ImageData[];
|
|
6
|
+
export declare const sampleZeroCodeData: ZeroCodeData;
|
|
7
|
+
export declare const sampleBackendData: {
|
|
8
|
+
user: {
|
|
9
|
+
name: string;
|
|
10
|
+
email: string;
|
|
11
|
+
profile: {
|
|
12
|
+
age: number;
|
|
13
|
+
city: string;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
items: {
|
|
17
|
+
id: number;
|
|
18
|
+
name: string;
|
|
19
|
+
price: number;
|
|
20
|
+
}[];
|
|
21
|
+
shop_id: string;
|
|
22
|
+
};
|
|
23
|
+
//# sourceMappingURL=sample-data.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sample-data.d.ts","sourceRoot":"","sources":["../../../src/__tests__/fixtures/sample-data.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,QAAQ,EAAE,QAAQ,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAE9F,eAAO,MAAM,mBAAmB,EAAE,aAUjC,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,QAK5B,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,QAK5B,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,SAAS,EAWtC,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,YA2BhC,CAAC;AAEF,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;CAc7B,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export declare const sampleTemplates: {
|
|
2
|
+
simpleText: string;
|
|
3
|
+
optionalField: string;
|
|
4
|
+
withValidation: string;
|
|
5
|
+
groupedField: string;
|
|
6
|
+
richText: string;
|
|
7
|
+
optionalRichText: string;
|
|
8
|
+
textarea: string;
|
|
9
|
+
image: string;
|
|
10
|
+
radio: string;
|
|
11
|
+
checkbox: string;
|
|
12
|
+
select: string;
|
|
13
|
+
selectMultiple: string;
|
|
14
|
+
zIf: string;
|
|
15
|
+
zEmpty: string;
|
|
16
|
+
zTag: string;
|
|
17
|
+
zFor: string;
|
|
18
|
+
zSlot: string;
|
|
19
|
+
backendData: string;
|
|
20
|
+
nestedBackendData: string;
|
|
21
|
+
arrayBackendData: string;
|
|
22
|
+
urlPlaceholder: string;
|
|
23
|
+
complex: string;
|
|
24
|
+
};
|
|
25
|
+
//# sourceMappingURL=sample-templates.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sample-templates.d.ts","sourceRoot":"","sources":["../../../src/__tests__/fixtures/sample-templates.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;CAgC3B,CAAC"}
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
import { validateData as validateDataUtil } from '../core/utils/validation';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
locale?: string;
|
|
4
|
+
page?: string;
|
|
5
|
+
cssCommon?: string;
|
|
6
|
+
cssIndividual?: string;
|
|
7
|
+
cssSpecial?: string;
|
|
8
|
+
partsCommon?: string;
|
|
9
|
+
partsIndividual?: string;
|
|
10
|
+
partsSpecial?: string;
|
|
11
|
+
imagesCommon?: string;
|
|
12
|
+
imagesIndividual?: string;
|
|
13
|
+
imagesSpecial?: string;
|
|
14
|
+
config?: string;
|
|
15
|
+
endpoints?: string;
|
|
16
|
+
backendData?: string;
|
|
17
|
+
};
|
|
18
|
+
declare function getData(path?: string): unknown;
|
|
19
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {
|
|
20
|
+
getData: typeof getData;
|
|
21
|
+
setData: (pathOrData: string | Partial<import('..').ZeroCodeData>, value?: unknown) => void;
|
|
22
|
+
validateData: typeof validateDataUtil;
|
|
23
|
+
cmsData: {
|
|
24
|
+
page: {
|
|
25
|
+
[x: string]: unknown;
|
|
26
|
+
id: string;
|
|
27
|
+
part_id: string;
|
|
28
|
+
slots?: Record<string, import('..').ComponentData[] | import('..').SlotConfig> | undefined;
|
|
29
|
+
}[];
|
|
30
|
+
css: {
|
|
31
|
+
common?: string | undefined;
|
|
32
|
+
individual?: string | undefined;
|
|
33
|
+
special?: string | undefined;
|
|
34
|
+
};
|
|
35
|
+
parts: {
|
|
36
|
+
common: {
|
|
37
|
+
id: string;
|
|
38
|
+
type: string;
|
|
39
|
+
description: string;
|
|
40
|
+
parts: {
|
|
41
|
+
id: string;
|
|
42
|
+
title: string;
|
|
43
|
+
description: string;
|
|
44
|
+
body: string;
|
|
45
|
+
slots?: Record<string, {
|
|
46
|
+
allowedParts?: string[];
|
|
47
|
+
}> | undefined;
|
|
48
|
+
slotOnly?: boolean | undefined;
|
|
49
|
+
}[];
|
|
50
|
+
}[];
|
|
51
|
+
individual: {
|
|
52
|
+
id: string;
|
|
53
|
+
type: string;
|
|
54
|
+
description: string;
|
|
55
|
+
parts: {
|
|
56
|
+
id: string;
|
|
57
|
+
title: string;
|
|
58
|
+
description: string;
|
|
59
|
+
body: string;
|
|
60
|
+
slots?: Record<string, {
|
|
61
|
+
allowedParts?: string[];
|
|
62
|
+
}> | undefined;
|
|
63
|
+
slotOnly?: boolean | undefined;
|
|
64
|
+
}[];
|
|
65
|
+
}[];
|
|
66
|
+
special: {
|
|
67
|
+
id: string;
|
|
68
|
+
type: string;
|
|
69
|
+
description: string;
|
|
70
|
+
parts: {
|
|
71
|
+
id: string;
|
|
72
|
+
title: string;
|
|
73
|
+
description: string;
|
|
74
|
+
body: string;
|
|
75
|
+
slots?: Record<string, {
|
|
76
|
+
allowedParts?: string[];
|
|
77
|
+
}> | undefined;
|
|
78
|
+
slotOnly?: boolean | undefined;
|
|
79
|
+
}[];
|
|
80
|
+
}[];
|
|
81
|
+
};
|
|
82
|
+
images: {
|
|
83
|
+
common: {
|
|
84
|
+
id: string;
|
|
85
|
+
name: string;
|
|
86
|
+
url: string;
|
|
87
|
+
mimeType?: string | undefined;
|
|
88
|
+
needsUpload?: boolean | undefined;
|
|
89
|
+
}[];
|
|
90
|
+
individual: {
|
|
91
|
+
id: string;
|
|
92
|
+
name: string;
|
|
93
|
+
url: string;
|
|
94
|
+
mimeType?: string | undefined;
|
|
95
|
+
needsUpload?: boolean | undefined;
|
|
96
|
+
}[];
|
|
97
|
+
special: {
|
|
98
|
+
id: string;
|
|
99
|
+
name: string;
|
|
100
|
+
url: string;
|
|
101
|
+
mimeType?: string | undefined;
|
|
102
|
+
needsUpload?: boolean | undefined;
|
|
103
|
+
}[];
|
|
104
|
+
};
|
|
105
|
+
backendData?: Record<string, unknown> | undefined;
|
|
106
|
+
};
|
|
107
|
+
currentMode: import('vue').Ref<import('../features/editor/composables/useEditorMode').EditorMode, import('../features/editor/composables/useEditorMode').EditorMode>;
|
|
108
|
+
switchMode: (mode: import('../features/editor/composables/useEditorMode').EditorMode) => void;
|
|
109
|
+
allowDynamicContentInteraction: import('vue').Ref<NonNullable<boolean | undefined>, NonNullable<boolean | undefined>>;
|
|
110
|
+
devRightPadding: import('vue').Ref<NonNullable<boolean | undefined>, NonNullable<boolean | undefined>>;
|
|
111
|
+
devRightPaddingValue: import('vue').ComputedRef<NonNullable<boolean | undefined>>;
|
|
112
|
+
settingsPanelOpen: import('vue').Ref<boolean, boolean>;
|
|
113
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
114
|
+
containerRef: HTMLDivElement;
|
|
115
|
+
previewAreaRef: import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{
|
|
116
|
+
cmsData: import('..').ZeroCodeData;
|
|
117
|
+
fullPageHtml: string;
|
|
118
|
+
onAddClick?: (path: string) => void;
|
|
119
|
+
allowDynamicContentInteraction?: boolean;
|
|
120
|
+
}> & Readonly<{}>, {
|
|
121
|
+
previewArea: import('vue').Ref<HTMLElement | null, HTMLElement | null>;
|
|
122
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
|
|
123
|
+
previewArea: HTMLDivElement;
|
|
124
|
+
htmlContainer: HTMLDivElement;
|
|
125
|
+
}, HTMLDivElement, import('vue').ComponentProvideOptions, {
|
|
126
|
+
P: {};
|
|
127
|
+
B: {};
|
|
128
|
+
D: {};
|
|
129
|
+
C: {};
|
|
130
|
+
M: {};
|
|
131
|
+
Defaults: {};
|
|
132
|
+
}, Readonly<{
|
|
133
|
+
cmsData: import('..').ZeroCodeData;
|
|
134
|
+
fullPageHtml: string;
|
|
135
|
+
onAddClick?: (path: string) => void;
|
|
136
|
+
allowDynamicContentInteraction?: boolean;
|
|
137
|
+
}> & Readonly<{}>, {
|
|
138
|
+
previewArea: import('vue').Ref<HTMLElement | null, HTMLElement | null>;
|
|
139
|
+
}, {}, {}, {}, {}> | null;
|
|
140
|
+
}, HTMLDivElement>;
|
|
141
|
+
export default _default;
|
|
142
|
+
//# sourceMappingURL=ZeroCodeCMS.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ZeroCodeCMS.vue.d.ts","sourceRoot":"","sources":["../../src/components/ZeroCodeCMS.vue"],"names":[],"mappings":"AAyLA;AAg4BA,OAAO,EAAE,YAAY,IAAI,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAQ5E,KAAK,WAAW,GAAG;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAwDF,iBAAS,OAAO,CAAC,IAAI,CAAC,EAAE,MAAM,WAU7B;;;;;;;;;;;;;;;;;;;;;;;;;;;;oCA/GD,CAn0BwB;;;;;;;;;;;;;;;oCAm0BxB,CAn0BwB;;;;;;;;;;;;;;;oCAm0BxB,CAn0BwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAk/DxB,wBASG"}
|