@ecomcx/ecomweb-editor 1.20.0 → 1.22.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/README.md +15 -0
- package/package.json +3 -3
- package/src/i18n/index.ts +74 -0
- package/src/index.ts +3 -1
- package/src/legacy/basic.tsx +8 -30
- package/src/legacy/dynamic.tsx +15 -39
- package/src/locales/en/attrs.ts +72 -0
- package/src/locales/en/bindings.ts +26 -0
- package/src/locales/en/block-desc.ts +53 -0
- package/src/locales/en/block-titles.ts +43 -0
- package/src/locales/en/blocks.ts +39 -0
- package/src/locales/en/controls.ts +18 -0
- package/src/locales/en/hints.ts +142 -0
- package/src/locales/en/index.ts +20 -0
- package/src/locales/en/layout.ts +37 -0
- package/src/locales/en/legacy-basic.ts +54 -0
- package/src/locales/en/legacy-dynamic.ts +73 -0
- package/src/locales/en/legacy.ts +67 -0
- package/src/locales/en/motion.ts +33 -0
- package/src/locales/en/pattern-lib.ts +151 -0
- package/src/locales/en/patterns.ts +45 -0
- package/src/locales/en/shortcuts.ts +19 -0
- package/src/locales/en/v2.ts +177 -0
- package/src/locales/vi/attrs.ts +72 -0
- package/src/locales/vi/bindings.ts +26 -0
- package/src/locales/vi/block-desc.ts +53 -0
- package/src/locales/vi/block-titles.ts +43 -0
- package/src/locales/vi/blocks.ts +39 -0
- package/src/locales/vi/controls.ts +18 -0
- package/src/locales/vi/hints.ts +142 -0
- package/src/locales/vi/index.ts +24 -0
- package/src/locales/vi/layout.ts +37 -0
- package/src/locales/vi/legacy-basic.ts +54 -0
- package/src/locales/vi/legacy-dynamic.ts +73 -0
- package/src/locales/vi/legacy.ts +67 -0
- package/src/locales/vi/motion.ts +33 -0
- package/src/locales/vi/pattern-lib.ts +151 -0
- package/src/locales/vi/patterns.ts +45 -0
- package/src/locales/vi/shortcuts.ts +19 -0
- package/src/locales/vi/v2.ts +177 -0
- package/src/shared/animation-store.ts +38 -0
- package/src/shared/labels.ts +11 -134
- package/src/shared/patterns-kit.ts +7 -0
- package/src/shared/patterns-library.ts +152 -0
- package/src/shared/patterns.ts +6 -32
- package/src/v2/blocks/index.ts +5 -11
- package/src/v2/blocks/inline-style.ts +30 -0
- package/src/v2/blocks/layout.tsx +84 -14
- package/src/v2/blocks/media.tsx +21 -17
- package/src/v2/blocks/theme.tsx +43 -22
- package/src/v2/canvas/canvas.tsx +9 -1
- package/src/v2/core/bindings.ts +9 -8
- package/src/v2/core/model.ts +2 -2
- package/src/v2/editor.tsx +7 -4
- package/src/v2/i18n.ts +14 -0
- package/src/v2/index.ts +3 -1
- package/src/v2/labels.ts +11 -348
- package/src/v2/ui/attr-form.tsx +14 -29
- package/src/v2/ui/attr-hints.ts +87 -74
- package/src/v2/ui/bindings.tsx +10 -12
- package/src/v2/ui/block-descriptions.ts +6 -33
- package/src/v2/ui/inserter.tsx +2 -2
- package/src/v2/ui/inspector.tsx +7 -5
- package/src/v2/ui/layout-panel.tsx +3 -14
- package/src/v2/ui/motion-panel.tsx +99 -0
- package/src/v2/ui/options.tsx +6 -13
- package/src/v2/ui/style-controls.tsx +7 -6
- package/src/v2/ui/style-tab.tsx +9 -4
- package/src/v2/ui/unit-controls.tsx +6 -5
package/README.md
CHANGED
|
@@ -82,6 +82,21 @@ registerDynamicBlocks("vi"); // một lần; node của khối đ
|
|
|
82
82
|
|
|
83
83
|
Mỗi khối hiện thành khung có tên + dòng tóm tắt (vị trí menu, phần dùng chung, nguồn danh sách bài); cài đặt sinh từ thuộc tính. `query` chèn vào có sẵn `postTemplate` (tiêu đề + sapo) và `pagination`. `registerBlock` có thêm `initialContent` cho khối chứa khối khác.
|
|
84
84
|
|
|
85
|
+
## Ngôn ngữ giao diện
|
|
86
|
+
|
|
87
|
+
Có sẵn `vi` và `en`. Chữ không nằm trong mã mà trong `src/locales/<mã>/` — mỗi nhóm một file (`v2`, `legacy`, `controls`, `blocks`, `hints`, `patterns`…). Thêm ngôn ngữ **không cần sửa trình soạn**:
|
|
88
|
+
|
|
89
|
+
```ts
|
|
90
|
+
import { registerLocale } from "@ecomcx/ecomweb-editor/v2"; // hoặc từ "@ecomcx/ecomweb-editor"
|
|
91
|
+
registerLocale("ja", { v2: { editor: "コンテンツエディター", addBlock: "ブロックを追加" }, motion: { title: "モーション" } });
|
|
92
|
+
// <EditorProvider lang="ja" …> / <Editor …> dùng nhãn: labelsLegacy("ja")
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
- Chỉ cần dịch phần muốn dịch: khoá thiếu rơi về ngôn ngữ gốc (`pt-BR` → `pt`) rồi tiếng Anh. Gọi `registerLocale` nhiều lần để bổ sung.
|
|
96
|
+
- Muốn có sẵn trong gói: sao chép thư mục `src/locales/vi/` thành `src/locales/xx/`, dịch, rồi đăng ký ở `src/i18n/index.ts`. `en/` bị kiểm đủ khoá lúc biên dịch; `test/i18n.test.ts` kiểm `vi` khớp `en` (cùng khoá, cùng chỗ thay `{n}`).
|
|
97
|
+
- Nhóm `blockTitles`, `blockDesc`, `hints`, `attrs` dùng khoá theo tên khối / thuộc tính; `patterns`, `patternLib` là chữ giữ chỗ của mẫu có sẵn.
|
|
98
|
+
- `viLabels`, `enLabels`, `viV2`, `enV2` vẫn dùng được; thêm `labelsLegacy(lang)`, `labelsV2(lang)` cho ngôn ngữ bất kỳ.
|
|
99
|
+
|
|
85
100
|
## Đổi màu
|
|
86
101
|
|
|
87
102
|
```css
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ecomcx/ecomweb-editor",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.22.0",
|
|
4
4
|
"description": "Trình soạn nội dung dạng khối của CMS — dùng độc lập trong mọi dự án React (1.x: TipTap; ./v2: cây khối, khung soạn iframe, sửa header/footer tại chỗ).",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"*.css"
|
|
30
30
|
],
|
|
31
31
|
"peerDependencies": {
|
|
32
|
-
"@ecomcx/ecomweb-content": "^1.
|
|
32
|
+
"@ecomcx/ecomweb-content": "^1.17.0",
|
|
33
33
|
"react": ">=18",
|
|
34
34
|
"react-dom": ">=18"
|
|
35
35
|
},
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"prosemirror-view": "1.42.7"
|
|
61
61
|
},
|
|
62
62
|
"devDependencies": {
|
|
63
|
-
"@ecomcx/ecomweb-content": "^1.
|
|
63
|
+
"@ecomcx/ecomweb-content": "^1.17.0",
|
|
64
64
|
"@playwright/test": "1.53.0",
|
|
65
65
|
"@types/react": "19.2.2",
|
|
66
66
|
"@types/react-dom": "19.2.2",
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Đa ngôn ngữ của trình soạn. Chữ nằm trong các "bó" theo ngôn ngữ (src/locales/<mã>/), mỗi bó chia thành nhóm (namespace).
|
|
3
|
+
* Ứng dụng / plugin thêm ngôn ngữ bằng `registerLocale("ja", { v2: {...}, legacy: {...} })` — chỉ cần dịch các nhóm muốn dịch;
|
|
4
|
+
* khoá thiếu rơi về ngôn ngữ gốc ("ja-JP" → "ja") rồi tiếng Anh. Không cần sửa mã của trình soạn.
|
|
5
|
+
*/
|
|
6
|
+
import { en } from "../locales/en";
|
|
7
|
+
import { vi } from "../locales/vi";
|
|
8
|
+
|
|
9
|
+
/** Một chữ, hoặc một nhóm chữ con (vd `dropHint.image`) — nhóm con cũng được gộp dự phòng theo từng khoá. */
|
|
10
|
+
export type Message = string | Record<string, string>;
|
|
11
|
+
export type Messages = Record<string, Message>;
|
|
12
|
+
export type Bundle = Record<string, Messages>;
|
|
13
|
+
|
|
14
|
+
const locales = new Map<string, Bundle>();
|
|
15
|
+
const listeners = new Set<() => void>();
|
|
16
|
+
let version = 0;
|
|
17
|
+
const FALLBACK = "en";
|
|
18
|
+
|
|
19
|
+
/** "vi-VN" / "VI" → "vi". Rỗng → "vi". */
|
|
20
|
+
export const normalizeLang = (lang?: string | null): string => (lang ?? "vi").trim().toLowerCase().replace(/_/g, "-") || "vi";
|
|
21
|
+
|
|
22
|
+
/** Thêm / bổ sung chữ cho một ngôn ngữ (gộp theo từng khoá; gọi nhiều lần được). */
|
|
23
|
+
export function registerLocale(lang: string, bundle: Record<string, Messages>) {
|
|
24
|
+
const code = normalizeLang(lang);
|
|
25
|
+
const cur = locales.get(code) ?? {};
|
|
26
|
+
for (const [ns, msgs] of Object.entries(bundle)) cur[ns] = mergeMessages(cur[ns] ?? {}, msgs);
|
|
27
|
+
locales.set(code, cur);
|
|
28
|
+
version++;
|
|
29
|
+
listeners.forEach((l) => l());
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/** Mã các ngôn ngữ đã đăng ký. */
|
|
33
|
+
export const availableLocales = (): string[] => [...locales.keys()];
|
|
34
|
+
export const onLocalesChange = (l: () => void) => { listeners.add(l); return () => { listeners.delete(l); }; };
|
|
35
|
+
export const localesVersion = () => version;
|
|
36
|
+
|
|
37
|
+
/** Gộp `over` lên `base`: khoá con là object thì gộp theo từng khoá con (dịch dở một nhóm con vẫn giữ phần còn lại). */
|
|
38
|
+
function mergeMessages(base: Messages, over: Messages): Messages {
|
|
39
|
+
const out: Messages = { ...base };
|
|
40
|
+
for (const [k, v] of Object.entries(over)) {
|
|
41
|
+
const prev = out[k];
|
|
42
|
+
out[k] = typeof v === "object" && v && typeof prev === "object" && prev ? { ...prev, ...v } : v;
|
|
43
|
+
}
|
|
44
|
+
return out;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
const cache = new Map<string, { v: number; m: Messages }>();
|
|
48
|
+
/**
|
|
49
|
+
* Chữ của một nhóm theo ngôn ngữ, đã gộp dự phòng: tiếng Anh < ngôn ngữ gốc ("pt" cho "pt-br") < đúng ngôn ngữ.
|
|
50
|
+
* Kết quả được nhớ theo phiên bản đăng ký → dùng trong render không tạo object mới.
|
|
51
|
+
*/
|
|
52
|
+
export function messages(ns: string, lang?: string | null): Messages {
|
|
53
|
+
const code = normalizeLang(lang);
|
|
54
|
+
const key = `${ns}\0${code}`;
|
|
55
|
+
const hit = cache.get(key);
|
|
56
|
+
if (hit && hit.v === version) return hit.m;
|
|
57
|
+
const chain = [FALLBACK, code.includes("-") ? code.split("-")[0] : null, code].filter((c): c is string => !!c);
|
|
58
|
+
const m = chain.reduce<Messages>((acc, c) => mergeMessages(acc, locales.get(c)?.[ns] ?? {}), {});
|
|
59
|
+
cache.set(key, { v: version, m });
|
|
60
|
+
return m;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/** Thay `{tên}` trong chữ: `format("Bộ sưu tập · {n} ảnh", { n: 3 })`. */
|
|
64
|
+
export const format = (text: string, vars?: Record<string, string | number>): string =>
|
|
65
|
+
vars ? text.replace(/\{(\w+)\}/g, (m, k) => (k in vars ? String(vars[k]) : m)) : text;
|
|
66
|
+
|
|
67
|
+
/** Chữ của một nhóm đã biết, có kiểu theo khoá của vi.ts: `msgs("motion", "vi").title`. */
|
|
68
|
+
export const msgs = <K extends keyof typeof import("../locales/vi").vi>(ns: K, lang?: string | null): (typeof import("../locales/vi").vi)[K] =>
|
|
69
|
+
messages(ns as string, lang) as unknown as (typeof import("../locales/vi").vi)[K];
|
|
70
|
+
|
|
71
|
+
// Ngôn ngữ có sẵn trong gói. Đăng ký ngay trong module này (không qua import chỉ để lấy hiệu ứng phụ) vì package.json khai
|
|
72
|
+
// "sideEffects" chỉ cho *.css — bundler sẽ bỏ import như vậy. Ngôn ngữ khác: registerLocale() ở ứng dụng.
|
|
73
|
+
registerLocale("en", en);
|
|
74
|
+
registerLocale("vi", vi);
|
package/src/index.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export { Editor, type EditorProps } from "./legacy/editor";
|
|
2
2
|
export { contentToEditor, editorToContent } from "./legacy/content";
|
|
3
|
-
export { viLabels, enLabels, type EditorLabels } from "./shared/labels";
|
|
3
|
+
export { viLabels, enLabels, labelsLegacy, type EditorLabels } from "./shared/labels";
|
|
4
|
+
export { registerLocale, availableLocales, type Messages } from "./i18n";
|
|
4
5
|
export { imageAttrs, galleryImage } from "./legacy/media";
|
|
5
6
|
export { CmsImage, Gallery, VideoNode, AudioNode, FileNode } from "./legacy/nodes";
|
|
6
7
|
export { registerEditorExtension, unregisterEditorExtension, registeredExtensions } from "./legacy/registry";
|
|
@@ -27,4 +28,5 @@ export { registerPattern, unregisterPattern, registeredPatterns, registerCorePat
|
|
|
27
28
|
export { insertPattern } from "./legacy/insert-pattern";
|
|
28
29
|
export { SyncedPattern, refreshSyncedPatterns, type PatternHost } from "./legacy/synced";
|
|
29
30
|
export { registerBlockPanel, unregisterBlockPanel, type BlockPanel, type BlockPanelProps } from "./legacy/panels";
|
|
31
|
+
export { storeAnimation as registerAnimation, dropAnimation as unregisterAnimation, type MotionEffect } from "./shared/animation-store";
|
|
30
32
|
export type { Editor as TiptapEditor } from "@tiptap/core";
|
package/src/legacy/basic.tsx
CHANGED
|
@@ -5,34 +5,12 @@ import {
|
|
|
5
5
|
} from "lucide-react";
|
|
6
6
|
import type { ComponentType } from "react";
|
|
7
7
|
import type { BlockEditProps } from "./blocks";
|
|
8
|
+
import { messages } from "../i18n";
|
|
8
9
|
import { registerBlock } from "./blocks";
|
|
9
10
|
import { registerEditorExtension } from "./registry";
|
|
10
11
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
spacer: "Khoảng trống", buttons: "Nhóm nút", cover: "Ảnh bìa", mediaText: "Ảnh + chữ", pullquote: "Trích dẫn nổi bật", details: "Chi tiết (thu gọn)",
|
|
14
|
-
customHtml: "HTML tuỳ chỉnh", socialLinks: "Mạng xã hội", tableOfContents: "Mục lục", preformatted: "Văn bản định dạng sẵn",
|
|
15
|
-
height: "Chiều cao (preset hoặc 48px)", align: "Căn", left: "Trái", center: "Giữa", right: "Phải", "space-between": "Dàn đều", image: "Ảnh",
|
|
16
|
-
alt: "Mô tả ảnh (alt)", overlay: "Màu phủ", opacity: "Độ đậm lớp phủ (%)", minHeight: "Cao tối thiểu", contentAlign: "Vị trí nội dung",
|
|
17
|
-
top: "Trên", bottom: "Dưới", fixed: "Ảnh nền đứng yên khi cuộn", position: "Vị trí ảnh", width: "Độ rộng ảnh (%)", verticalAlign: "Căn dọc",
|
|
18
|
-
stack: "Xếp dọc trên điện thoại", citation: "Nguồn trích dẫn", summary: "Tiêu đề (bấm để mở)", open: "Mở sẵn", html: "Mã HTML",
|
|
19
|
-
size: "Cỡ", showLabels: "Hiện tên mạng cạnh biểu tượng", small: "Nhỏ", medium: "Vừa", large: "Lớn", title: "Tiêu đề", maxLevel: "Đến cấp tiêu đề",
|
|
20
|
-
pickImage: "Chọn ảnh", replaceImage: "Thay ảnh", removeImage: "Bỏ ảnh", addLink: "Thêm liên kết", service: "Mạng", url: "Đường dẫn",
|
|
21
|
-
htmlHint: "HTML chỉ chạy trên website; người không có quyền HTML không lọc sẽ bị lọc khi lưu.",
|
|
22
|
-
tocHint: "Tự tạo từ các tiêu đề trong bài", summaryPlaceholder: "Bấm để xem thêm",
|
|
23
|
-
};
|
|
24
|
-
const en: Dict = {
|
|
25
|
-
spacer: "Spacer", buttons: "Buttons", cover: "Cover", mediaText: "Media & text", pullquote: "Pullquote", details: "Details",
|
|
26
|
-
customHtml: "Custom HTML", socialLinks: "Social links", tableOfContents: "Table of contents", preformatted: "Preformatted",
|
|
27
|
-
height: "Height (preset or 48px)", align: "Alignment", left: "Left", center: "Center", right: "Right", "space-between": "Space between", image: "Image",
|
|
28
|
-
alt: "Alt text", overlay: "Overlay color", opacity: "Overlay opacity (%)", minHeight: "Min height", contentAlign: "Content position",
|
|
29
|
-
top: "Top", bottom: "Bottom", fixed: "Fixed background", position: "Media position", width: "Media width (%)", verticalAlign: "Vertical align",
|
|
30
|
-
stack: "Stack on mobile", citation: "Citation", summary: "Summary (click to open)", open: "Open by default", html: "HTML",
|
|
31
|
-
size: "Size", showLabels: "Show names next to icons", small: "Small", medium: "Medium", large: "Large", title: "Title", maxLevel: "Up to heading level",
|
|
32
|
-
pickImage: "Choose image", replaceImage: "Replace image", removeImage: "Remove image", addLink: "Add link", service: "Service", url: "URL",
|
|
33
|
-
htmlHint: "HTML runs only on the website; it is filtered on save for people without the unfiltered HTML permission.",
|
|
34
|
-
tocHint: "Built from the headings in the post", summaryPlaceholder: "Click to read more",
|
|
35
|
-
};
|
|
12
|
+
|
|
13
|
+
|
|
36
14
|
|
|
37
15
|
export const SOCIAL_SERVICES = ["facebook", "x", "instagram", "youtube", "tiktok", "linkedin", "zalo", "github", "threads", "pinterest", "telegram", "messenger", "email", "website"];
|
|
38
16
|
|
|
@@ -115,16 +93,16 @@ export const Preformatted = Node.create({
|
|
|
115
93
|
let registered: string | null = null;
|
|
116
94
|
|
|
117
95
|
/** Bộ khối cơ bản (@ecomcx/ecomweb-content 1.9) cho mọi trình soạn — gọi lại với ngôn ngữ khác để đổi nhãn. */
|
|
118
|
-
export function registerBasicBlocks(locale
|
|
96
|
+
export function registerBasicBlocks(locale = "vi") {
|
|
119
97
|
if (registered === locale) return;
|
|
120
98
|
registered = locale;
|
|
121
|
-
const dict =
|
|
122
|
-
const t = (k: string) => dict[k]
|
|
99
|
+
const dict = messages("legacyBasic", locale);
|
|
100
|
+
const t = (k: string) => { const v = dict[k]; return typeof v === "string" ? v : k; };
|
|
123
101
|
type Spec = [string, LucideIcon, "none" | "blocks" | "inline", Record<string, BlockAttrSpec>, ComponentType<BlockEditProps> | undefined, (() => Array<Record<string, unknown>>) | undefined];
|
|
124
102
|
const specs: Spec[] = [
|
|
125
103
|
["spacer", MoveVertical, "none", { height: s("height", { default: "lg" }) }, SpacerEdit, undefined],
|
|
126
104
|
["buttons", RectangleHorizontal, "blocks", { align: enumOf("align", ["left", "center", "right", "space-between"]) }, undefined,
|
|
127
|
-
() => [{ type: "button", attrs: { text:
|
|
105
|
+
() => [{ type: "button", attrs: { text: t("initialButton"), variant: "primary" } }, { type: "button", attrs: { text: t("initialButton2"), variant: "outline" } }]],
|
|
128
106
|
["cover", ImageIcon, "blocks", { ...image, overlay: s("overlay", { control: "color" }), opacity: i("opacity", { min: 0, max: 100, default: 50 }),
|
|
129
107
|
minHeight: s("minHeight", { default: "400px" }), contentAlign: enumOf("contentAlign", ["top", "center", "bottom"], "center"), fixed: b("fixed", { default: false }) }, CoverEdit,
|
|
130
108
|
() => [{ type: "heading", attrs: { level: 2, textAlign: "center" } }]],
|
|
@@ -137,7 +115,7 @@ export function registerBasicBlocks(locale: "vi" | "en" = "vi") {
|
|
|
137
115
|
["tableOfContents", ListTree, "none", { title: s("title"), maxLevel: i("maxLevel", { min: 2, max: 4, default: 3 }) }, tocEdit(t), undefined],
|
|
138
116
|
];
|
|
139
117
|
for (const [name, icon, content, attributes, edit, initialContent] of specs) {
|
|
140
|
-
const def = defineBlock({ name, title: name, keywords:
|
|
118
|
+
const def = defineBlock({ name, title: name, keywords: [...new Set(["vi", "en", locale].map((l) => String(messages("legacyBasic", l)[name] ?? "")))].join(" "), content, attributes });
|
|
141
119
|
registerBlock(def, { icon, translate: t, edit, initialContent });
|
|
142
120
|
}
|
|
143
121
|
registerEditorExtension({
|
package/src/legacy/dynamic.tsx
CHANGED
|
@@ -5,42 +5,14 @@ import {
|
|
|
5
5
|
} from "lucide-react";
|
|
6
6
|
import { useSyncExternalStore, type ReactNode } from "react";
|
|
7
7
|
import type { BlockEditProps } from "./blocks";
|
|
8
|
+
import { messages } from "../i18n";
|
|
8
9
|
import { registerBlock } from "./blocks";
|
|
9
10
|
|
|
10
11
|
/** Khối động (lấy dữ liệu lúc hiển thị) — dùng trong Trình dựng và trang dựng bằng khối. */
|
|
11
12
|
export const DYNAMIC_BLOCKS = new Set<string>(DYNAMIC_NODES);
|
|
12
13
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
siteTitle: "Tên website", siteLogo: "Logo", siteTagline: "Khẩu hiệu", navigation: "Menu", search: "Tìm kiếm", languageSwitcher: "Chọn ngôn ngữ",
|
|
16
|
-
copyright: "Bản quyền", postTitle: "Tiêu đề bài/trang", postContent: "Nội dung bài/trang", postExcerpt: "Sapo", featuredImage: "Ảnh đại diện",
|
|
17
|
-
postDate: "Ngày đăng", postAuthor: "Tác giả", postTerms: "Chuyên mục / thẻ", comments: "Bình luận", queryTitle: "Tiêu đề trang lưu trữ", termDescription: "Mô tả chuyên mục", breadcrumbs: "Breadcrumb", postNavigation: "Bài trước / bài sau", query: "Danh sách bài",
|
|
18
|
-
postTemplate: "Khuôn mỗi bài", pagination: "Phân trang", queryEmpty: "Khi không có bài", templatePart: "Phần dùng chung",
|
|
19
|
-
level: "Cấp tiêu đề (0 = chữ thường)", link: "Có liên kết", textAlign: "Căn chữ", width: "Rộng (px)", location: "Vị trí menu",
|
|
20
|
-
orientation: "Hướng", horizontal: "Ngang", vertical: "Dọc", mobile: "Nút menu trên điện thoại", placeholder: "Chữ gợi ý", buttonText: "Chữ trên nút",
|
|
21
|
-
text: "Tên chủ sở hữu (trống = tên website)", moreText: "Chữ “đọc tiếp”", size: "Cỡ ảnh", aspect: "Tỉ lệ khung", avatar: "Hiện ảnh đại diện",
|
|
22
|
-
taxonomy: "Phân loại (category, post_tag…)", separator: "Dấu ngăn cách", inherit: "Dùng danh sách của trang đang xem", postType: "Loại bài",
|
|
23
|
-
perPage: "Số bài", category: "Chuyên mục (slug)", tag: "Thẻ (slug)", orderBy: "Sắp xếp theo", date: "Ngày", title: "Tiêu đề", menu_order: "Thứ tự",
|
|
24
|
-
order: "Thứ tự", desc: "Mới trước", asc: "Cũ trước", layout: "Bố cục", list: "Danh sách", grid: "Lưới", columns: "Số cột",
|
|
25
|
-
slug: "Phần (slug, vd header)", tagName: "Thẻ HTML", left: "Trái", center: "Giữa", right: "Phải", justify: "Đều",
|
|
26
|
-
inheritSummary: "danh sách của trang", partSummary: "phần “{v}”", menuSummary: "vị trí “{v}”",
|
|
27
|
-
searchPlaceholder: "Tìm kiếm…", commentsCount: "Bình luận ({v})", noMenu: "(chưa gán menu cho vị trí này)",
|
|
28
|
-
};
|
|
29
|
-
const en: Dict = {
|
|
30
|
-
siteTitle: "Site title", siteLogo: "Logo", siteTagline: "Tagline", navigation: "Navigation", search: "Search", languageSwitcher: "Language switcher",
|
|
31
|
-
copyright: "Copyright", postTitle: "Post/page title", postContent: "Post/page content", postExcerpt: "Excerpt", featuredImage: "Featured image",
|
|
32
|
-
postDate: "Date", postAuthor: "Author", postTerms: "Categories / tags", comments: "Comments", queryTitle: "Archive title", termDescription: "Term description", breadcrumbs: "Breadcrumbs", postNavigation: "Previous / next post", query: "Post list",
|
|
33
|
-
postTemplate: "Post template", pagination: "Pagination", queryEmpty: "No results", templatePart: "Template part",
|
|
34
|
-
level: "Heading level (0 = text)", link: "Link", textAlign: "Text align", width: "Width (px)", location: "Menu location",
|
|
35
|
-
orientation: "Orientation", horizontal: "Horizontal", vertical: "Vertical", mobile: "Menu button on mobile", placeholder: "Placeholder", buttonText: "Button text",
|
|
36
|
-
text: "Owner (empty = site title)", moreText: "“Read more” text", size: "Image size", aspect: "Aspect ratio", avatar: "Show avatar",
|
|
37
|
-
taxonomy: "Taxonomy (category, post_tag…)", separator: "Separator", inherit: "Use the list of the current page", postType: "Post type",
|
|
38
|
-
perPage: "Posts", category: "Category (slug)", tag: "Tag (slug)", orderBy: "Order by", date: "Date", title: "Title", menu_order: "Menu order",
|
|
39
|
-
order: "Order", desc: "Newest first", asc: "Oldest first", layout: "Layout", list: "List", grid: "Grid", columns: "Columns",
|
|
40
|
-
slug: "Part (slug, e.g. header)", tagName: "HTML tag", left: "Left", center: "Center", right: "Right", justify: "Justify",
|
|
41
|
-
inheritSummary: "list of the page", partSummary: "part “{v}”", menuSummary: "location “{v}”",
|
|
42
|
-
searchPlaceholder: "Search…", commentsCount: "Comments ({v})", noMenu: "(no menu assigned to this location)",
|
|
43
|
-
};
|
|
14
|
+
|
|
15
|
+
|
|
44
16
|
|
|
45
17
|
const s = (label: string, extra: Partial<BlockAttrSpec> = {}): BlockAttrSpec => ({ type: "string", label, ...extra });
|
|
46
18
|
const i = (label: string, extra: Partial<BlockAttrSpec> = {}): BlockAttrSpec => ({ type: "integer", label, ...extra });
|
|
@@ -53,16 +25,20 @@ const SPECS: Array<[string, LucideIcon, "none" | "blocks", Record<string, BlockA
|
|
|
53
25
|
["siteTagline", Text, "none", { textAlign: align }],
|
|
54
26
|
["navigation", Menu, "none", { location: s("location", { default: "primary" }), orientation: s("orientation", { enum: ["horizontal", "vertical"], enumLabels: ["horizontal", "vertical"], default: "horizontal" }), mobile: b("mobile", { default: true }) }],
|
|
55
27
|
["search", Search, "none", { placeholder: s("placeholder"), buttonText: s("buttonText") }],
|
|
56
|
-
["languageSwitcher", Languages, "none", {}],
|
|
28
|
+
["languageSwitcher", Languages, "none", { display: s("display", { enum: ["inline", "dropdown"], enumLabels: ["inline", "dropdown"], default: "inline" }) }],
|
|
57
29
|
["copyright", Copyright, "none", { text: s("text"), textAlign: align }],
|
|
58
30
|
["postTitle", Heading1, "none", { level: i("level", { min: 1, max: 6, default: 1 }), link: b("link", { default: false }), textAlign: align }],
|
|
59
31
|
["postContent", FileText, "none", {}],
|
|
60
32
|
["postExcerpt", AlignLeft, "none", { moreText: s("moreText") }],
|
|
61
33
|
["featuredImage", Image, "none", { size: s("size", { enum: ["medium", "medium_large", "large", "full"], default: "large" }), aspect: s("aspect", { enum: ["auto", "16/9", "4/3", "1/1", "3/4"], default: "auto" }), link: b("link", { default: false }) }],
|
|
62
34
|
["postDate", Calendar, "none", { textAlign: align }],
|
|
63
|
-
["postAuthor", User, "none", { avatar: b("avatar", { default: false }) }],
|
|
35
|
+
["postAuthor", User, "none", { avatar: b("avatar", { default: false }), showName: b("showName", { default: true }), showBio: b("showBio", { default: false }), avatarSize: i("avatarSize", { min: 16, max: 128, default: 32 }), link: b("link", { default: true }) }],
|
|
64
36
|
["postTerms", Tags, "none", { taxonomy: s("taxonomy", { default: "category" }), separator: s("separator", { default: ", " }) }],
|
|
65
|
-
["comments", MessageSquare, "none", {}],
|
|
37
|
+
["comments", MessageSquare, "none", { title: s("title") }],
|
|
38
|
+
["readMore", ChevronsRight, "none", { text: s("text"), textAlign: align }],
|
|
39
|
+
["commentsCount", MessageSquare, "none", { textAlign: align }],
|
|
40
|
+
["avatar", User, "none", { size: i("size", { min: 16, max: 256, default: 48 }), link: b("link", { default: true }) }],
|
|
41
|
+
["queryTotal", List, "none", { textAlign: align }],
|
|
66
42
|
["queryTitle", Heading1, "none", { level: i("level", { min: 1, max: 6, default: 1 }), prefix: b("prefix", { default: false }), textAlign: align }],
|
|
67
43
|
["termDescription", AlignLeft, "none", { textAlign: align }],
|
|
68
44
|
["breadcrumbs", ChevronsRight, "none", { separator: s("separator", { default: "›" }), showHome: b("showHome", { default: true }), showCurrent: b("showCurrent", { default: true }) }],
|
|
@@ -74,7 +50,7 @@ const SPECS: Array<[string, LucideIcon, "none" | "blocks", Record<string, BlockA
|
|
|
74
50
|
order: s("order", { enum: ["desc", "asc"], enumLabels: ["desc", "asc"], default: "desc" }),
|
|
75
51
|
}],
|
|
76
52
|
["postTemplate", Repeat, "blocks", { layout: s("layout", { enum: ["list", "grid"], enumLabels: ["list", "grid"], default: "list" }), columns: i("columns", { min: 1, max: 6, default: 3 }) }],
|
|
77
|
-
["pagination", MoreHorizontal, "none", {}],
|
|
53
|
+
["pagination", MoreHorizontal, "none", { type: s("type", { enum: ["numbers", "prevNext", "both"], enumLabels: ["numbers", "prevNext", "both"], default: "both" }), midSize: i("midSize", { min: 0, max: 5, default: 2 }) }],
|
|
78
54
|
["queryEmpty", ListX, "blocks", {}],
|
|
79
55
|
["templatePart", PanelTop, "none", { slug: s("slug"), tagName: s("tagName", { enum: ["div", "header", "footer", "aside", "section"], default: "div" }) }],
|
|
80
56
|
];
|
|
@@ -147,13 +123,13 @@ function summary(name: string, t: (k: string) => string) {
|
|
|
147
123
|
let registered: string | null = null;
|
|
148
124
|
|
|
149
125
|
/** Đăng ký khối động cho mọi trình soạn (gọi một lần; đổi ngôn ngữ → gọi lại). Mục chèn chỉ hiện khi Editor có `dynamicBlocks`. */
|
|
150
|
-
export function registerDynamicBlocks(locale
|
|
126
|
+
export function registerDynamicBlocks(locale = "vi") {
|
|
151
127
|
if (registered === locale) return;
|
|
152
128
|
registered = locale;
|
|
153
|
-
const dict =
|
|
154
|
-
const t = (k: string) => dict[k]
|
|
129
|
+
const dict = messages("legacyDynamic", locale);
|
|
130
|
+
const t = (k: string) => { const v = dict[k]; return typeof v === "string" ? v : k; };
|
|
155
131
|
for (const [name, icon, content, attributes] of SPECS) {
|
|
156
|
-
const def: BlockDefinition = defineBlock({ name, title: name, keywords:
|
|
132
|
+
const def: BlockDefinition = defineBlock({ name, title: name, keywords: [...new Set(["vi", "en", locale].map((l) => String(messages("legacyDynamic", l)[name] ?? "")))].join(" "), content, attributes });
|
|
157
133
|
const initialContent = name === "query"
|
|
158
134
|
? () => [{ type: "postTemplate", attrs: { layout: "list", columns: 3 }, content: [{ type: "postTitle", attrs: { level: 2, link: true } }, { type: "postExcerpt" }] }, { type: "pagination" }]
|
|
159
135
|
: undefined;
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/** Block attribute names in the settings panel (key = attribute name), used when a block does not declare its own label. */
|
|
2
|
+
export const attrs = {
|
|
3
|
+
level: "Level",
|
|
4
|
+
textAlign: "Text align",
|
|
5
|
+
start: "Start at",
|
|
6
|
+
language: "Language",
|
|
7
|
+
src: "Media",
|
|
8
|
+
alt: "Alt text",
|
|
9
|
+
title: "Title",
|
|
10
|
+
caption: "Caption",
|
|
11
|
+
width: "Width",
|
|
12
|
+
height: "Height",
|
|
13
|
+
align: "Align",
|
|
14
|
+
size: "Size",
|
|
15
|
+
href: "Link",
|
|
16
|
+
target: "Open in",
|
|
17
|
+
rel: "rel",
|
|
18
|
+
variant: "Variant",
|
|
19
|
+
text: "Text",
|
|
20
|
+
background: "Background",
|
|
21
|
+
textColor: "Text color",
|
|
22
|
+
padding: "Padding",
|
|
23
|
+
verticalAlign: "Vertical align",
|
|
24
|
+
stack: "Stack on mobile",
|
|
25
|
+
tone: "Tone",
|
|
26
|
+
summary: "Summary",
|
|
27
|
+
open: "Open by default",
|
|
28
|
+
overlay: "Overlay",
|
|
29
|
+
opacity: "Overlay opacity",
|
|
30
|
+
minHeight: "Min height",
|
|
31
|
+
contentAlign: "Content position",
|
|
32
|
+
fixed: "Fixed background",
|
|
33
|
+
position: "Media position",
|
|
34
|
+
columns: "Columns",
|
|
35
|
+
footer: "Footer row",
|
|
36
|
+
html: "HTML",
|
|
37
|
+
url: "URL",
|
|
38
|
+
links: "Links",
|
|
39
|
+
showLabels: "Show labels",
|
|
40
|
+
maxLevel: "Max level",
|
|
41
|
+
location: "Menu location",
|
|
42
|
+
orientation: "Orientation",
|
|
43
|
+
mobile: "Mobile toggle",
|
|
44
|
+
placeholder: "Placeholder",
|
|
45
|
+
buttonText: "Button text",
|
|
46
|
+
link: "Link",
|
|
47
|
+
moreText: "Read more text",
|
|
48
|
+
aspect: "Aspect ratio",
|
|
49
|
+
avatar: "Avatar",
|
|
50
|
+
taxonomy: "Taxonomy",
|
|
51
|
+
separator: "Separator",
|
|
52
|
+
inherit: "Inherit query",
|
|
53
|
+
postType: "Post type",
|
|
54
|
+
perPage: "Per page",
|
|
55
|
+
category: "Category",
|
|
56
|
+
tag: "Tag",
|
|
57
|
+
orderBy: "Order by",
|
|
58
|
+
order: "Order",
|
|
59
|
+
layout: "Layout",
|
|
60
|
+
slug: "Part (slug)",
|
|
61
|
+
tagName: "HTML tag",
|
|
62
|
+
checked: "Done",
|
|
63
|
+
poster: "Poster",
|
|
64
|
+
download: "Download",
|
|
65
|
+
embed: "Embed",
|
|
66
|
+
prefix: "Show “Category:” / “Tag:” prefix",
|
|
67
|
+
showHome: "Show home",
|
|
68
|
+
showCurrent: "Show current page",
|
|
69
|
+
showTitle: "Show post titles",
|
|
70
|
+
anchor: "Anchor",
|
|
71
|
+
className: "CSS class",
|
|
72
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/** Data bindings: core sources and the settings panel. */
|
|
2
|
+
export const bindings = {
|
|
3
|
+
panelTitle: "Bind data",
|
|
4
|
+
panelHelp: "Show a value from site data at render time (post title, meta field, plugin data…) instead of typed text.",
|
|
5
|
+
notBound: "— Not bound —",
|
|
6
|
+
unbind: "Unbind",
|
|
7
|
+
source: "source",
|
|
8
|
+
field: "field",
|
|
9
|
+
attrContent: "Content",
|
|
10
|
+
attrSrc: "Image",
|
|
11
|
+
attrAlt: "Alt text",
|
|
12
|
+
attrCaption: "Caption",
|
|
13
|
+
attrText: "Button text",
|
|
14
|
+
attrHref: "Link",
|
|
15
|
+
srcPost: "Current post",
|
|
16
|
+
srcPostMeta: "Post meta field",
|
|
17
|
+
srcSite: "Site",
|
|
18
|
+
fTitle: "Title",
|
|
19
|
+
fExcerpt: "Excerpt",
|
|
20
|
+
fDate: "Date",
|
|
21
|
+
fAuthor: "Author",
|
|
22
|
+
fLink: "Link",
|
|
23
|
+
fFeaturedImage: "Featured image",
|
|
24
|
+
fSiteTitle: "Site title",
|
|
25
|
+
fTagline: "Tagline",
|
|
26
|
+
};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/** One-line description of each block type (block card in the settings panel, hover card in the inserter). Key = block type. */
|
|
2
|
+
export const blockDesc = {
|
|
3
|
+
paragraph: "Start with the basic building block of all narrative.",
|
|
4
|
+
heading: "Introduce sections and organise content for readers and search engines.",
|
|
5
|
+
bulletList: "A bulleted list.",
|
|
6
|
+
orderedList: "A numbered list.",
|
|
7
|
+
taskList: "A checklist.",
|
|
8
|
+
blockquote: "Give quoted text visual emphasis.",
|
|
9
|
+
codeBlock: "Display code snippets that respect spacing.",
|
|
10
|
+
preformatted: "Text that respects spacing and tabs.",
|
|
11
|
+
pullquote: "A large, eye-catching quote.",
|
|
12
|
+
details: "Hide content until the visitor opens it (FAQ…).",
|
|
13
|
+
table: "Rows and columns of data; cells can be merged.",
|
|
14
|
+
image: "An image with caption and alt text; drag to resize.",
|
|
15
|
+
gallery: "Several images in a grid.",
|
|
16
|
+
cover: "A large image or colour with text on top — a page hero.",
|
|
17
|
+
mediaText: "Media and text side by side for a richer layout.",
|
|
18
|
+
video: "An uploaded or linked video.",
|
|
19
|
+
audio: "An audio player.",
|
|
20
|
+
file: "A downloadable file (PDF…), optionally embedded.",
|
|
21
|
+
youtube: "Embed a YouTube video.",
|
|
22
|
+
embed: "Embed content from a URL.",
|
|
23
|
+
group: "Gather blocks in a container to style them together.",
|
|
24
|
+
columns: "Display content in columns; drag to resize.",
|
|
25
|
+
buttons: "Prompt visitors to take action with buttons.",
|
|
26
|
+
spacer: "Add white space between blocks.",
|
|
27
|
+
horizontalRule: "Separate sections with a line.",
|
|
28
|
+
callout: "Highlight a tip or warning.",
|
|
29
|
+
customHtml: "Add custom (sanitised) HTML.",
|
|
30
|
+
socialLinks: "Icons linking to social profiles.",
|
|
31
|
+
tableOfContents: "An automatic table of contents from headings.",
|
|
32
|
+
siteTitle: "The site title from Settings.",
|
|
33
|
+
siteLogo: "The site logo.",
|
|
34
|
+
siteTagline: "The site tagline.",
|
|
35
|
+
navigation: "A navigation menu for a theme location.",
|
|
36
|
+
search: "A search form.",
|
|
37
|
+
languageSwitcher: "Switch the site language.",
|
|
38
|
+
copyright: "A copyright line with the current year.",
|
|
39
|
+
postTitle: "The current post's title.",
|
|
40
|
+
postContent: "The current post's content.",
|
|
41
|
+
postExcerpt: "The post excerpt.",
|
|
42
|
+
featuredImage: "The post's featured image.",
|
|
43
|
+
postDate: "The publish date.",
|
|
44
|
+
postAuthor: "The post author.",
|
|
45
|
+
postTerms: "The post's categories or tags.",
|
|
46
|
+
comments: "The post comments.",
|
|
47
|
+
queryTitle: "The H1 of category, tag, author and search pages.",
|
|
48
|
+
termDescription: "The current category / tag description.",
|
|
49
|
+
breadcrumbs: "Home › Category › Post trail with structured data for Google.",
|
|
50
|
+
postNavigation: "Links to the previous and next posts.",
|
|
51
|
+
query: "A list of posts by criteria.",
|
|
52
|
+
templatePart: "A shared part (header, footer…) — edit once, update everywhere.",
|
|
53
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/** Block names shown in the inserter / list view (key = block type, or "block/variation"). Blocks that have a label in the v2 group (paragraph, heading, image…) take their name from v2. */
|
|
2
|
+
export const blockTitles = {
|
|
3
|
+
listItem: "List item",
|
|
4
|
+
taskList: "To-do list",
|
|
5
|
+
taskItem: "To-do",
|
|
6
|
+
"group/row": "Row",
|
|
7
|
+
"group/stack": "Stack",
|
|
8
|
+
"group/grid": "Grid",
|
|
9
|
+
mediaText: "Media & text",
|
|
10
|
+
tableRow: "Row",
|
|
11
|
+
tableCell: "Cell",
|
|
12
|
+
tableHeader: "Header cell",
|
|
13
|
+
gallery: "Gallery",
|
|
14
|
+
video: "Video",
|
|
15
|
+
audio: "Audio",
|
|
16
|
+
file: "File",
|
|
17
|
+
youtube: "YouTube",
|
|
18
|
+
socialLinks: "Social links",
|
|
19
|
+
tableOfContents: "Table of contents",
|
|
20
|
+
siteTitle: "Site title",
|
|
21
|
+
siteLogo: "Site logo",
|
|
22
|
+
siteTagline: "Tagline",
|
|
23
|
+
navigation: "Navigation",
|
|
24
|
+
search: "Search",
|
|
25
|
+
languageSwitcher: "Language switcher",
|
|
26
|
+
copyright: "Copyright",
|
|
27
|
+
postTitle: "Post title",
|
|
28
|
+
postContent: "Post content",
|
|
29
|
+
postExcerpt: "Excerpt",
|
|
30
|
+
featuredImage: "Featured image",
|
|
31
|
+
postDate: "Date",
|
|
32
|
+
postAuthor: "Author",
|
|
33
|
+
postTerms: "Terms",
|
|
34
|
+
comments: "Comments",
|
|
35
|
+
queryTitle: "Tiêu đề trang lưu trữ",
|
|
36
|
+
termDescription: "Mô tả chuyên mục",
|
|
37
|
+
breadcrumbs: "Breadcrumb",
|
|
38
|
+
postNavigation: "Bài trước / bài sau",
|
|
39
|
+
query: "Query loop",
|
|
40
|
+
postTemplate: "Post template",
|
|
41
|
+
pagination: "Pagination",
|
|
42
|
+
queryEmpty: "No results",
|
|
43
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/** Text shown inside block editors on the canvas (placeholders, button labels, hints). Keys derive from the English text. */
|
|
2
|
+
export const blocks = {
|
|
3
|
+
group: "Group",
|
|
4
|
+
row: "Row",
|
|
5
|
+
stack: "Stack",
|
|
6
|
+
grid: "Grid",
|
|
7
|
+
addColumn: "Add column",
|
|
8
|
+
cover: "Cover",
|
|
9
|
+
pickABackgroundImage: "Pick a background image (drop, upload, library) or a colour:",
|
|
10
|
+
background: "Background",
|
|
11
|
+
pasteAYoutubeLink: "Paste a YouTube link (youtube.com/watch?v=… or youtu.be/…).",
|
|
12
|
+
embed: "Embed",
|
|
13
|
+
socialLinks: "Social links",
|
|
14
|
+
addLinksInThe: "Add links in the settings panel.",
|
|
15
|
+
socialLinks2: "Social links",
|
|
16
|
+
links: "Links",
|
|
17
|
+
up: "Up",
|
|
18
|
+
down: "Down",
|
|
19
|
+
removeLink: "Remove link",
|
|
20
|
+
addLink: "Add link",
|
|
21
|
+
contents: "Contents",
|
|
22
|
+
menu: "Menu",
|
|
23
|
+
noMenuIsAssigned: "No menu is assigned to this location — assign one in Appearance › Menus, or pick another location.",
|
|
24
|
+
categoryName: "Category name",
|
|
25
|
+
category: "Category: ",
|
|
26
|
+
theDescriptionOfThe: "The description of the category / tag being viewed.",
|
|
27
|
+
home: "Home",
|
|
28
|
+
category2: "Category",
|
|
29
|
+
currentPage: "Current page",
|
|
30
|
+
previous: "Previous",
|
|
31
|
+
previousPostTitle: "Previous post title",
|
|
32
|
+
next: "Next",
|
|
33
|
+
nextPostTitle: "Next post title",
|
|
34
|
+
postContent: "Post content",
|
|
35
|
+
noPostsMatchThese: "No posts match these settings — the template is still editable:",
|
|
36
|
+
clickToEditThe: "Click to edit the template on this post",
|
|
37
|
+
network: "Network {n}",
|
|
38
|
+
urlN: "URL {n}",
|
|
39
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/** Text for controls in the Style / settings panels (collapse, reset, units, tabs). Keys derive from the English text. */
|
|
2
|
+
export const controls = {
|
|
3
|
+
tablet: "Tablet",
|
|
4
|
+
mobile: "Mobile",
|
|
5
|
+
modified: "modified",
|
|
6
|
+
reset: "Reset",
|
|
7
|
+
moreOptions: "+ More options",
|
|
8
|
+
unit: "unit",
|
|
9
|
+
slider: "slider",
|
|
10
|
+
usePresets: "Use presets",
|
|
11
|
+
customValue: "Custom value",
|
|
12
|
+
usePresets2: "use presets",
|
|
13
|
+
customValue2: "custom value",
|
|
14
|
+
vertical: "vertical",
|
|
15
|
+
horizontal: "horizontal",
|
|
16
|
+
styles: "Styles",
|
|
17
|
+
advanced: "Advanced",
|
|
18
|
+
};
|