@dooc-dev/dooc 0.0.13 → 0.0.14
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/dist/edit.global.js +181 -181
- package/dist/engine/compiler/compile.js +6 -8
- package/dist/engine/core/html.js +3 -2
- package/dist/engine/core/subformats.d.ts +23 -1
- package/dist/engine/core/subformats.js +111 -3
- package/dist/frontend/document-application.js +41 -7
- package/dist/frontend/locales/eng.json +21 -1
- package/dist/frontend/locales/jpn.json +21 -1
- package/dist/frontend/locales/zho.json +21 -1
- package/dist/plugins.global.js +18 -18
- package/dist/subformats.global.js +64 -64
- package/dist/ui.global.js +67 -67
- package/dist/workspace-mcp-worker.global.js +48 -14
- package/dist/workspace-reader-mcp-worker.global.js +48 -14
- package/dist/workspace-reader-worker.global.js +48 -14
- package/dist/workspace-worker.global.js +48 -14
- package/package.json +1 -1
|
@@ -8,6 +8,7 @@ import { contentLinks, parseMdast } from "../core/markdown.js";
|
|
|
8
8
|
import { defaultPreviewSettings, parsePreviewSettings, } from "../core/previewers.js";
|
|
9
9
|
import { docPath, parseDocLink } from "../core/routing.js";
|
|
10
10
|
import { subformatReferences } from "../core/subformat-references.js";
|
|
11
|
+
import { matchesSubformatRecord, sortSubformatRecords, validateSubformatOptions, } from "../core/subformats.js";
|
|
11
12
|
import { isTermFile } from "../core/term-reference.js";
|
|
12
13
|
import { isRemoteTextfile } from "../core/textfile.js";
|
|
13
14
|
import { parseContentSource } from "./code-blocks.js";
|
|
@@ -128,9 +129,7 @@ const resolveFiles = (f, root, textfiles, previews, themes) => {
|
|
|
128
129
|
if (config) {
|
|
129
130
|
const loaded = loadSubformat(root, config, previews?.domains);
|
|
130
131
|
referencedFiles.add(config.schema);
|
|
131
|
-
|
|
132
|
-
if (!loaded.fields.some((item) => item.name === field))
|
|
133
|
-
throw new Error(`Unknown subformat filter field: ${field}`);
|
|
132
|
+
validateSubformatOptions(b.embed ?? {}, loaded.fields);
|
|
134
133
|
const files = schema
|
|
135
134
|
? projectFiles(root)
|
|
136
135
|
.filter((item) => item.extension === config.ext && item.path !== config.schema)
|
|
@@ -145,10 +144,9 @@ const resolveFiles = (f, root, textfiles, previews, themes) => {
|
|
|
145
144
|
: (textfiles?.get(path) ?? readTextfile(root, path));
|
|
146
145
|
const data = parseSubformatRecord(content, config.format);
|
|
147
146
|
validateSubformatRecord(loaded, data);
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
records.push({ file: path, content, data });
|
|
147
|
+
const record = { file: path, content, data };
|
|
148
|
+
if (matchesSubformatRecord(record, b.embed ?? {}, loaded.fields))
|
|
149
|
+
records.push(record);
|
|
152
150
|
}
|
|
153
151
|
catch (error) {
|
|
154
152
|
if (!schema)
|
|
@@ -167,7 +165,7 @@ const resolveFiles = (f, root, textfiles, previews, themes) => {
|
|
|
167
165
|
subformat: {
|
|
168
166
|
...config,
|
|
169
167
|
fields: loaded.fields,
|
|
170
|
-
records,
|
|
168
|
+
records: sortSubformatRecords(records, loaded.fields.find((field) => field.name === (b.embed?.sort_by ?? config.layouts?.sort_by)), (b.embed?.sort_order ?? config.layouts?.sort_order) === "desc"),
|
|
171
169
|
},
|
|
172
170
|
};
|
|
173
171
|
}
|
package/dist/engine/core/html.js
CHANGED
|
@@ -7,7 +7,7 @@ import { figureFrameHtml } from "./figure-frame.js";
|
|
|
7
7
|
import { parseFigureLink } from "./file-embed.js";
|
|
8
8
|
import { localFile } from "./files.js";
|
|
9
9
|
import { GRAPH_LAYOUT_MARGIN, GRAPH_LEGEND, graphUid, layoutGraph, } from "./graph.js";
|
|
10
|
-
import { CHECK_ICON } from "./icons.js";
|
|
10
|
+
import { CHECK_ICON, SEARCH_ICON_PATH } from "./icons.js";
|
|
11
11
|
import { inlineSegmenter, termMap } from "./inline.js";
|
|
12
12
|
import { termComparator } from "./language.js";
|
|
13
13
|
import { isReferenceUrl, parseDocLink } from "./routing.js";
|
|
@@ -401,7 +401,8 @@ const blockContentHtml = (b, ctx, seg) => {
|
|
|
401
401
|
case "code": {
|
|
402
402
|
if (b.subformat) {
|
|
403
403
|
const label = b.embed?.title ?? b.alt ?? b.subformat.ext;
|
|
404
|
-
|
|
404
|
+
const fields = b.embed?.fields?.flatMap((name) => b.subformat?.fields.filter((field) => field.name === name) ?? []) ?? b.subformat.fields;
|
|
405
|
+
return `<section class="subformat-embed" data-subformat-embed="${escapeHtml(b.subformat.ext)}" data-subformat-embed-view="${escapeHtml(b.embed?.view ?? "card")}" data-subformat-embed-options="${escapeHtml(JSON.stringify(b.embed ?? {}))}" aria-label="${escapeHtml(label)}">${b.embed?.title ? `<h2 class="subformat-embed-title">${escapeHtml(b.embed.title)}</h2>` : ""}<div class="subformat-embed-toolbar"><button type="button" class="pbtn subformat-search-toggle" data-subformat-search aria-expanded="false" aria-label="Search records" title="Search records" data-i18n-aria-label="Search records" data-i18n-title="Search records"><svg width="16" height="16" viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.5" aria-hidden="true"><path d="${SEARCH_ICON_PATH}"/></svg></button><label class="resource-search" hidden><input type="search" data-resource-search placeholder="Search records" aria-label="Search records" data-i18n-placeholder="Search records" data-i18n-aria-label="Search records"></label><span class="resource-count" data-resource-count role="status" aria-live="polite">${b.subformat.records.length}</span></div><template data-subformats>${escapeHtml(JSON.stringify([b.subformat]))}</template><div data-subformat-board tabindex="0" role="region" aria-label="${escapeHtml(label)}">${subformatTableHtml({ ...b.subformat, fields }, label)}</div></section>`;
|
|
405
406
|
}
|
|
406
407
|
if (b.lang === "mermaid" && !b.unavailable)
|
|
407
408
|
return `<pre data-mermaid="pending" aria-label="${escapeHtml(b.alt || "Mermaid diagram")}" style="overflow:auto;background:var(--doc-bg);color:var(--doc-fg);padding:1rem">${escapeHtml(b.lines.join("\n"))}</pre>`;
|
|
@@ -17,8 +17,27 @@ export interface Subformat {
|
|
|
17
17
|
export interface SubformatEmbedOptions {
|
|
18
18
|
view?: "card" | "list" | "table";
|
|
19
19
|
title?: string;
|
|
20
|
-
|
|
20
|
+
card_title?: string;
|
|
21
|
+
group_by?: string;
|
|
22
|
+
sort_by?: string;
|
|
23
|
+
sort_order?: "asc" | "desc";
|
|
24
|
+
fields?: string[];
|
|
25
|
+
q?: string;
|
|
26
|
+
filters?: SubformatFilter[];
|
|
21
27
|
}
|
|
28
|
+
export declare const SUBFORMAT_FILTER_OPERATORS: {
|
|
29
|
+
readonly eq: "Equals";
|
|
30
|
+
readonly ne: "Does not equal";
|
|
31
|
+
readonly contains: "Contains";
|
|
32
|
+
readonly in: "Is one of";
|
|
33
|
+
readonly gt: "Greater than";
|
|
34
|
+
readonly gte: "At least";
|
|
35
|
+
readonly lt: "Less than";
|
|
36
|
+
readonly lte: "At most";
|
|
37
|
+
readonly empty: "Is empty";
|
|
38
|
+
};
|
|
39
|
+
export type SubformatFilterOperator = keyof typeof SUBFORMAT_FILTER_OPERATORS;
|
|
40
|
+
export type SubformatFilter = [field: string, value: string, operator?: SubformatFilterOperator];
|
|
22
41
|
export declare const parseSubformatQuery: (query: string) => SubformatEmbedOptions;
|
|
23
42
|
export interface SubformatField {
|
|
24
43
|
name: string;
|
|
@@ -30,6 +49,9 @@ export interface SubformatField {
|
|
|
30
49
|
/** Record files a reference field may point to (its pattern ends with `\\.<ext>$`). */
|
|
31
50
|
options?: string[];
|
|
32
51
|
}
|
|
52
|
+
export declare const subformatFilterOperators: (field: SubformatField) => SubformatFilterOperator[];
|
|
53
|
+
export declare const validateSubformatOptions: (options: SubformatEmbedOptions, fields: SubformatField[]) => void;
|
|
54
|
+
export declare const matchesSubformatRecord: (record: SubformatRecord, options: SubformatEmbedOptions, fields: SubformatField[]) => boolean;
|
|
33
55
|
export interface SubformatRecord {
|
|
34
56
|
file: string;
|
|
35
57
|
content: string;
|
|
@@ -6,6 +6,17 @@ export const SUBFORMAT_SCHEMA_TEMPLATE = `${JSON.stringify({
|
|
|
6
6
|
properties: {},
|
|
7
7
|
additionalProperties: false,
|
|
8
8
|
}, null, 2)}\n`;
|
|
9
|
+
export const SUBFORMAT_FILTER_OPERATORS = {
|
|
10
|
+
eq: "Equals",
|
|
11
|
+
ne: "Does not equal",
|
|
12
|
+
contains: "Contains",
|
|
13
|
+
in: "Is one of",
|
|
14
|
+
gt: "Greater than",
|
|
15
|
+
gte: "At least",
|
|
16
|
+
lt: "Less than",
|
|
17
|
+
lte: "At most",
|
|
18
|
+
empty: "Is empty",
|
|
19
|
+
};
|
|
9
20
|
export const parseSubformatQuery = (query) => {
|
|
10
21
|
const options = {};
|
|
11
22
|
const seen = new Set();
|
|
@@ -15,17 +26,114 @@ export const parseSubformatQuery = (query) => {
|
|
|
15
26
|
seen.add(key);
|
|
16
27
|
if (key === "view" && ["card", "list", "table"].includes(value))
|
|
17
28
|
options.view = value;
|
|
18
|
-
else if (key === "title")
|
|
19
|
-
options
|
|
29
|
+
else if (key === "title" || key === "q")
|
|
30
|
+
options[key] = value;
|
|
31
|
+
else if (key === "card_title" || key === "group_by" || key === "sort_by")
|
|
32
|
+
options[key] = value;
|
|
33
|
+
else if (key === "sort_order" && (value === "asc" || value === "desc"))
|
|
34
|
+
options.sort_order = value;
|
|
35
|
+
else if (key === "fields") {
|
|
36
|
+
options.fields = value === "" ? [] : value.split(",").map((field) => field.trim());
|
|
37
|
+
if (options.fields.some((field) => !field) ||
|
|
38
|
+
new Set(options.fields).size !== options.fields.length)
|
|
39
|
+
throw new Error("Embed fields must be distinct, non-empty field names");
|
|
40
|
+
}
|
|
20
41
|
else if (key.startsWith("filter.") && key.length > 7) {
|
|
42
|
+
const match = /^(.+?)(?:\[([a-z]+)\])?$/.exec(key.slice(7));
|
|
43
|
+
const operator = match?.[2];
|
|
44
|
+
if (!match || (operator && !Object.hasOwn(SUBFORMAT_FILTER_OPERATORS, operator)))
|
|
45
|
+
throw new Error(`Unknown subformat filter operator: ${key}`);
|
|
21
46
|
options.filters ??= [];
|
|
22
|
-
options.filters.push(
|
|
47
|
+
options.filters.push(operator
|
|
48
|
+
? [match[1], value, operator]
|
|
49
|
+
: [match[1], value]);
|
|
23
50
|
}
|
|
24
51
|
else
|
|
25
52
|
throw new Error(`Unknown embed parameter or value: ${key}=${value}`);
|
|
26
53
|
}
|
|
27
54
|
return options;
|
|
28
55
|
};
|
|
56
|
+
export const subformatFilterOperators = (field) => Object.keys(SUBFORMAT_FILTER_OPERATORS).filter((operator) => !["gt", "gte", "lt", "lte"].includes(operator) ||
|
|
57
|
+
field.type === "number" ||
|
|
58
|
+
field.type === "integer" ||
|
|
59
|
+
!!field.format);
|
|
60
|
+
export const validateSubformatOptions = (options, fields) => {
|
|
61
|
+
for (const name of options.fields ?? [])
|
|
62
|
+
if (!fields.some((field) => field.name === name))
|
|
63
|
+
throw new Error(`Unknown subformat display field: ${name}`);
|
|
64
|
+
for (const key of ["card_title", "group_by", "sort_by"]) {
|
|
65
|
+
if (!options[key])
|
|
66
|
+
continue;
|
|
67
|
+
const field = fields.find((field) => field.name === options[key]);
|
|
68
|
+
if (!field ||
|
|
69
|
+
(key === "group_by" && !field.enum?.length) ||
|
|
70
|
+
(key === "sort_by" && !field.enum && !field.format && !field.type))
|
|
71
|
+
throw new Error(`Invalid subformat ${key} field: ${options[key]}`);
|
|
72
|
+
}
|
|
73
|
+
for (const [name, value, operator = "eq"] of options.filters ?? []) {
|
|
74
|
+
const field = fields.find((field) => field.name === name);
|
|
75
|
+
if (!field)
|
|
76
|
+
throw new Error(`Unknown subformat filter field: ${name}`);
|
|
77
|
+
if (!subformatFilterOperators(field).includes(operator))
|
|
78
|
+
throw new Error(`Unsupported subformat filter operator for ${name}: ${operator}`);
|
|
79
|
+
if (operator === "empty" && value !== "true" && value !== "false")
|
|
80
|
+
throw new Error(`Subformat empty filter requires true or false: ${name}`);
|
|
81
|
+
if (operator === "in" && value.split(",").some((item) => !item.trim()))
|
|
82
|
+
throw new Error(`Subformat in filter requires comma-separated values: ${name}`);
|
|
83
|
+
if (["gt", "gte", "lt", "lte"].includes(operator) &&
|
|
84
|
+
(!value.trim() || !Number.isFinite(field.format ? Date.parse(value) : Number(value))))
|
|
85
|
+
throw new Error(`Invalid subformat comparison value for ${name}: ${value}`);
|
|
86
|
+
}
|
|
87
|
+
};
|
|
88
|
+
export const matchesSubformatRecord = (record, options, fields) => {
|
|
89
|
+
if (options.q) {
|
|
90
|
+
const text = `${record.file} ${record.content}`.normalize("NFKC").toLowerCase();
|
|
91
|
+
if (!options.q
|
|
92
|
+
.normalize("NFKC")
|
|
93
|
+
.toLowerCase()
|
|
94
|
+
.trim()
|
|
95
|
+
.split(/\s+/)
|
|
96
|
+
.every((word) => text.includes(word)))
|
|
97
|
+
return false;
|
|
98
|
+
}
|
|
99
|
+
return (options.filters ?? []).every(([name, expected, operator = "eq"]) => {
|
|
100
|
+
const present = Object.hasOwn(record.data, name);
|
|
101
|
+
const value = present ? record.data[name] : undefined;
|
|
102
|
+
if (operator === "empty")
|
|
103
|
+
return ((!present ||
|
|
104
|
+
value == null ||
|
|
105
|
+
value === "" ||
|
|
106
|
+
(Array.isArray(value) && !value.length)) ===
|
|
107
|
+
(expected === "true"));
|
|
108
|
+
if (!present)
|
|
109
|
+
return false;
|
|
110
|
+
const scalar = (item) => item === null || ["string", "number", "boolean"].includes(typeof item);
|
|
111
|
+
if (operator === "contains")
|
|
112
|
+
return typeof value === "string"
|
|
113
|
+
? value
|
|
114
|
+
.normalize("NFKC")
|
|
115
|
+
.toLowerCase()
|
|
116
|
+
.includes(expected.normalize("NFKC").toLowerCase())
|
|
117
|
+
: Array.isArray(value) &&
|
|
118
|
+
value.some((item) => scalar(item) && String(item) === expected);
|
|
119
|
+
if (operator === "in")
|
|
120
|
+
return (scalar(value) && expected.split(",").some((item) => String(value) === item.trim()));
|
|
121
|
+
if (operator === "eq" || operator === "ne")
|
|
122
|
+
return scalar(value) && (String(value) === expected) === (operator === "eq");
|
|
123
|
+
const field = fields.find((field) => field.name === name);
|
|
124
|
+
const left = field?.format && typeof value === "string" ? Date.parse(value) : value;
|
|
125
|
+
const right = field?.format ? Date.parse(expected) : Number(expected);
|
|
126
|
+
if (typeof left !== "number" || !Number.isFinite(left) || !Number.isFinite(right))
|
|
127
|
+
return false;
|
|
128
|
+
return operator === "gt"
|
|
129
|
+
? left > right
|
|
130
|
+
: operator === "gte"
|
|
131
|
+
? left >= right
|
|
132
|
+
: operator === "lt"
|
|
133
|
+
? left < right
|
|
134
|
+
: operator === "lte" && left <= right;
|
|
135
|
+
});
|
|
136
|
+
};
|
|
29
137
|
export const subformatSourcePath = (file, base = "") => base + (/^https?:\/\//i.test(base) ? file.split("/").map(encodeURIComponent).join("/") : file);
|
|
30
138
|
export const subformatChange = (collection) => collection.change ??
|
|
31
139
|
(collection.records.some((record) => record.change === "modified")
|
|
@@ -1257,14 +1257,14 @@ body.extensions-over #nav-extensions, body.extensions-over .extensions-dropzone
|
|
|
1257
1257
|
.subformat-control > button > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
1258
1258
|
.subformat-control > button > svg { flex: none; }
|
|
1259
1259
|
.subformat-setting-menu { font-size: 13px; }
|
|
1260
|
-
.subformat-parameter-option { display: flex; align-items: center; gap: 4px; padding: 2px 4px; }
|
|
1261
|
-
.subformat-parameter-option > span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
|
|
1262
|
-
.subformat-parameter-option > button { display: grid; place-items: center; flex: none; width: 30px; padding: 4px; }
|
|
1263
1260
|
.subformat-parameter-option > button:disabled { opacity: .4; cursor: default; }
|
|
1261
|
+
.subformat-parameter-option > .subformat-field-toggle { display: flex; justify-content: space-between; flex: 1; width: auto; min-width: 0; }
|
|
1262
|
+
.subformat-field-toggle svg { flex: none; width: 14px; height: 14px; margin-left: 8px; }
|
|
1263
|
+
.subformat-field-toggle[aria-checked="false"] svg { visibility: hidden; }
|
|
1264
1264
|
.subformat-setting-option { display: flex; align-items: stretch; }
|
|
1265
1265
|
.subformat-setting-option > button:first-child { flex: 1; min-width: 0; max-width: none; border: 0; border-radius: 0; text-align: left; background: transparent; }
|
|
1266
1266
|
.subformat-setting-option > button[aria-checked="true"] { background: var(--c-raised); }
|
|
1267
|
-
.subformat-setting-option > .subformat-default { display: grid; flex: none; place-items: center; width: 32px; padding: 0; border: 0; border-radius: 0; background: transparent; color: var(--c-fg-muted); }
|
|
1267
|
+
.subformat-setting-option > .subformat-default, .subformat-parameter-option > [data-move] { display: grid; flex: none; place-items: center; width: 32px; padding: 0; border: 0; border-radius: 0; background: transparent; color: var(--c-fg-muted); }
|
|
1268
1268
|
.subformat-default[data-is-default="false"] svg { opacity: .25; }
|
|
1269
1269
|
.subformat-default[data-is-default="true"], .subformat-default:is(:hover, :focus-visible) { color: var(--c-fg); }
|
|
1270
1270
|
.subformat-setting-option > .subformat-default[data-layout-changed="true"] { color: var(--c-ok); }
|
|
@@ -1278,6 +1278,17 @@ body.extensions-over #nav-extensions, body.extensions-over .extensions-dropzone
|
|
|
1278
1278
|
.subformat-controls :is(select, button) { cursor: pointer; }
|
|
1279
1279
|
.subformat-controls :is(select, button):hover, .subformat-card select:enabled:hover { background: var(--c-raised); }
|
|
1280
1280
|
.subformat-controls :is(select, button):focus-visible, .subformat-card select:focus-visible { outline-color: var(--c-fg-muted); }
|
|
1281
|
+
.subformat-filters { margin: 12px 0 20px; font: 12px/1.6 var(--font-sans); }
|
|
1282
|
+
.subformat-filters p { margin: 8px 0; }
|
|
1283
|
+
.subformat-filter-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) auto; align-items: end; gap: 8px; margin: 10px 0; }
|
|
1284
|
+
.subformat-filter-row label { display: flex; flex-direction: column; gap: 4px; min-width: 0; color: var(--c-fg-muted); }
|
|
1285
|
+
.subformat-filters :is(select, input, button) { box-sizing: border-box; min-width: 0; max-width: 100%; min-height: 32px; padding: 4px 8px; border: 1px solid var(--c-line); border-radius: 4px; color: var(--c-fg); background: var(--c-bg1); font: inherit; }
|
|
1286
|
+
.subformat-filters :is(select, input) { width: 100%; }
|
|
1287
|
+
.subformat-filters button { cursor: pointer; }
|
|
1288
|
+
.subformat-filters button:hover { background: var(--c-raised); }
|
|
1289
|
+
.subformat-filters :focus-visible { outline: 2px solid var(--c-accent); outline-offset: 2px; }
|
|
1290
|
+
.subformat-filter-actions { display: flex; flex-wrap: wrap; gap: 8px; }
|
|
1291
|
+
.subformat-filters .err:empty { display: none; }
|
|
1281
1292
|
.subformat-card select:disabled { opacity: .55; cursor: default; }
|
|
1282
1293
|
.subformat-toast { position: fixed; z-index: 1000; right: 20px; bottom: 20px; box-sizing: border-box;
|
|
1283
1294
|
max-width: min(420px, calc(100vw - 40px)); max-height: 40vh; overflow: auto; padding: 12px 16px;
|
|
@@ -1341,9 +1352,17 @@ body.extensions-over #nav-extensions, body.extensions-over .extensions-dropzone
|
|
|
1341
1352
|
.subformat-card-details dd, .subformat-detail dd { white-space: pre-wrap; overflow-wrap: anywhere; }
|
|
1342
1353
|
.subformat-card-details label { margin-top: 12px; }
|
|
1343
1354
|
.subformat-card [hidden] { display: none; }
|
|
1344
|
-
.subformat-embed { margin: 24px 0; min-width: 0; }
|
|
1355
|
+
.subformat-embed { margin: 24px 0; min-width: 0; container-type: inline-size; }
|
|
1345
1356
|
.subformat-embed .subformat-embed-title { margin: 0 0 20px; }
|
|
1346
|
-
.subformat-embed
|
|
1357
|
+
.subformat-embed-toolbar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; margin-bottom: 12px; font: 12px/1.6 var(--font-sans); }
|
|
1358
|
+
.subformat-embed-toolbar > .subformat-controls { display: contents; }
|
|
1359
|
+
.subformat-embed-toolbar .subformat-search-toggle { flex: none; width: 34px; height: 34px; }
|
|
1360
|
+
.subformat-embed-toolbar .resource-search { flex: 1 1 160px; max-width: 260px; height: 32px; padding-inline: 8px; border: 1px solid var(--c-line); border-radius: 4px; }
|
|
1361
|
+
.subformat-embed-toolbar .resource-search[hidden] { display: none; }
|
|
1362
|
+
.subformat-embed-toolbar .resource-search:focus-within { border-color: var(--c-accent); }
|
|
1363
|
+
.subformat-embed > [data-subformat-board] { box-sizing: border-box; max-height: min(640px, 65dvh); padding: 12px 2px 4px; overflow: auto; scrollbar-width: thin; scrollbar-color: var(--c-line) transparent; }
|
|
1364
|
+
.subformat-embed > [data-subformat-board]:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 2px; }
|
|
1365
|
+
.subformat-embed .subformat-table { overflow: visible; }
|
|
1347
1366
|
.subformat-embed .subformat-control-label { background: var(--doc-bg); }
|
|
1348
1367
|
.subformat-embed .subformat-columns { display: block; padding: 0; overflow: visible; }
|
|
1349
1368
|
.subformat-embed .subformat-column + .subformat-column { margin-top: 24px; }
|
|
@@ -1355,6 +1374,7 @@ body.extensions-over #nav-extensions, body.extensions-over .extensions-dropzone
|
|
|
1355
1374
|
.subformat-table table { width: 100%; margin: 0; border-collapse: collapse; font: 13px/1.6 var(--font-sans); }
|
|
1356
1375
|
.subformat-table :is(th, td) { min-width: 100px; padding: 10px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--c-line); white-space: pre-wrap; overflow-wrap: anywhere; }
|
|
1357
1376
|
.subformat-table th { font-weight: 500; }
|
|
1377
|
+
.subformat-embed .subformat-table thead th { position: sticky; top: -12px; z-index: 1; background: var(--doc-bg); }
|
|
1358
1378
|
.subformat-table td > span { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; max-width: 32ch; overflow: hidden; }
|
|
1359
1379
|
.subformat-table button { padding: 0; border: 0; background: none; color: var(--doc-fg); font: inherit; text-align: left; text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; cursor: pointer; }
|
|
1360
1380
|
.subformat-table button:is(:hover, :focus-visible) { text-decoration: underline; text-underline-offset: 3px; }
|
|
@@ -1380,6 +1400,18 @@ body.extensions-over #nav-extensions, body.extensions-over .extensions-dropzone
|
|
|
1380
1400
|
@container (max-width: 420px) {
|
|
1381
1401
|
.subformat-list-record .subformat-card-file { display: none; }
|
|
1382
1402
|
}
|
|
1403
|
+
@container (max-width: 600px) {
|
|
1404
|
+
.subformat-filter-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
|
|
1405
|
+
.subformat-filter-row > label:nth-child(3) { grid-column: 1; }
|
|
1406
|
+
.subformat-embed-toolbar .subformat-control { flex: 1 1 120px; max-width: none; }
|
|
1407
|
+
}
|
|
1408
|
+
@media (max-width: 600px) {
|
|
1409
|
+
.subformat-embed > [data-subformat-board] { max-height: min(480px, 55dvh); }
|
|
1410
|
+
.subformat-filter-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
|
|
1411
|
+
.subformat-filters :is(select, input, button), .subformat-embed .subformat-controls button { min-height: 44px; }
|
|
1412
|
+
.subformat-embed-toolbar .subformat-search-toggle { width: 44px; height: 44px; }
|
|
1413
|
+
.subformat-embed-toolbar .resource-search { height: 42px; }
|
|
1414
|
+
}
|
|
1383
1415
|
.subformat-icon-form { flex: 1 0 100%; min-width: 0; padding-block: 8px; }
|
|
1384
1416
|
.subformat-icon-form fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
|
|
1385
1417
|
.subformat-icon-form label { display: flex; flex-direction: column; gap: 6px; text-align: left; }
|
|
@@ -1618,10 +1650,12 @@ body.textfile-open #phead :is(.fm-language, #status, #validate, #save, #split-pr
|
|
|
1618
1650
|
.schema-builder input[aria-invalid="true"], .schema-builder input[aria-invalid="true"]:focus-visible, .subformat-register-fields input:user-invalid { outline: 1px solid var(--c-danger); outline-offset: 1px; }
|
|
1619
1651
|
.schema-json-note { margin: 8px 0 0; color: var(--c-fg-muted); font-size: 11px; }
|
|
1620
1652
|
.schema-builder .schema-extra-fields { margin: 6px 0; }
|
|
1621
|
-
.subformat-value-form fieldset { min-width: 0; margin: 12px 0; padding: 0 12px; border:
|
|
1653
|
+
.subformat-value-form fieldset { min-width: 0; margin: 12px 0; padding: 0 12px; border: 0; }
|
|
1622
1654
|
.subformat-value-form legend { max-width: 100%; padding-inline: 4px; overflow-wrap: anywhere; color: var(--c-fg-muted); font-size: 11px; }
|
|
1623
1655
|
.subformat-value-form .subformat-value-field { padding: 0 6px 6px; border-radius: 4px; }
|
|
1624
1656
|
.subformat-value-form small { overflow-wrap: anywhere; }
|
|
1657
|
+
.schema-builder.subformat-value-form :is(input:not([type="checkbox"]), select, textarea, .language-select-input):is(:enabled, :disabled, :hover, :focus-visible) { border: 0; background: transparent; }
|
|
1658
|
+
.schema-builder.subformat-value-form :is(input, select, textarea):focus-visible:not([aria-invalid="true"]) { outline: 1px solid var(--c-fg-muted); outline-offset: 1px; }
|
|
1625
1659
|
.date-control { position: relative; }
|
|
1626
1660
|
.schema-builder .date-control > input { padding-right: 34px; font-variant-numeric: tabular-nums; }
|
|
1627
1661
|
.schema-builder .date-trigger { position: absolute; top: 0; right: 0; display: grid; place-items: center; width: 30px; height: 100%; padding: 0; border: 0; background: transparent; color: var(--c-fg-muted); }
|
|
@@ -426,5 +426,25 @@
|
|
|
426
426
|
"SVG icon": "SVG icon",
|
|
427
427
|
"SVG icon path": "SVG icon path",
|
|
428
428
|
"SVG icon path (optional)": "SVG icon path (optional)",
|
|
429
|
-
"Leave empty to remove. New Pages entries copy this path; existing pages keep their own icon.": "Leave empty to remove. New Pages entries copy this path; existing pages keep their own icon."
|
|
429
|
+
"Leave empty to remove. New Pages entries copy this path; existing pages keep their own icon.": "Leave empty to remove. New Pages entries copy this path; existing pages keep their own icon.",
|
|
430
|
+
"Search records": "Search records",
|
|
431
|
+
"Fields": "Fields",
|
|
432
|
+
"Filters": "Filters",
|
|
433
|
+
"Field": "Field",
|
|
434
|
+
"Operator": "Operator",
|
|
435
|
+
"Value": "Value",
|
|
436
|
+
"Match all conditions": "Match all conditions",
|
|
437
|
+
"Add filter": "Add filter",
|
|
438
|
+
"Apply filters": "Apply filters",
|
|
439
|
+
"Remove filter": "Remove filter",
|
|
440
|
+
"Comma-separated values": "Comma-separated values",
|
|
441
|
+
"Equals": "Equals",
|
|
442
|
+
"Does not equal": "Does not equal",
|
|
443
|
+
"Contains": "Contains",
|
|
444
|
+
"Is one of": "Is one of",
|
|
445
|
+
"Greater than": "Greater than",
|
|
446
|
+
"At least": "At least",
|
|
447
|
+
"Less than": "Less than",
|
|
448
|
+
"At most": "At most",
|
|
449
|
+
"Is empty": "Is empty"
|
|
430
450
|
}
|
|
@@ -426,5 +426,25 @@
|
|
|
426
426
|
"SVG icon": "SVGアイコン",
|
|
427
427
|
"SVG icon path": "SVGアイコンのパス",
|
|
428
428
|
"SVG icon path (optional)": "SVGアイコンのパス(任意)",
|
|
429
|
-
"Leave empty to remove. New Pages entries copy this path; existing pages keep their own icon.": "空欄で解除できます。Pagesへの新規追加時にパスをコピーし、既存ページのアイコンは保持します。"
|
|
429
|
+
"Leave empty to remove. New Pages entries copy this path; existing pages keep their own icon.": "空欄で解除できます。Pagesへの新規追加時にパスをコピーし、既存ページのアイコンは保持します。",
|
|
430
|
+
"Search records": "レコードを検索",
|
|
431
|
+
"Fields": "表示項目",
|
|
432
|
+
"Filters": "フィルター",
|
|
433
|
+
"Field": "項目",
|
|
434
|
+
"Operator": "条件",
|
|
435
|
+
"Value": "値",
|
|
436
|
+
"Match all conditions": "すべての条件に一致",
|
|
437
|
+
"Add filter": "条件を追加",
|
|
438
|
+
"Apply filters": "フィルターを適用",
|
|
439
|
+
"Remove filter": "条件を削除",
|
|
440
|
+
"Comma-separated values": "カンマ区切りの値",
|
|
441
|
+
"Equals": "一致する",
|
|
442
|
+
"Does not equal": "一致しない",
|
|
443
|
+
"Contains": "含む",
|
|
444
|
+
"Is one of": "いずれかに一致",
|
|
445
|
+
"Greater than": "より大きい",
|
|
446
|
+
"At least": "以上",
|
|
447
|
+
"Less than": "より小さい",
|
|
448
|
+
"At most": "以下",
|
|
449
|
+
"Is empty": "空である"
|
|
430
450
|
}
|
|
@@ -426,5 +426,25 @@
|
|
|
426
426
|
"SVG icon": "SVG 图标",
|
|
427
427
|
"SVG icon path": "SVG 图标路径",
|
|
428
428
|
"SVG icon path (optional)": "SVG 图标路径(可选)",
|
|
429
|
-
"Leave empty to remove. New Pages entries copy this path; existing pages keep their own icon.": "留空可移除。新添加的 Pages 页面会复制此路径,现有页面保留各自的图标。"
|
|
429
|
+
"Leave empty to remove. New Pages entries copy this path; existing pages keep their own icon.": "留空可移除。新添加的 Pages 页面会复制此路径,现有页面保留各自的图标。",
|
|
430
|
+
"Search records": "搜索记录",
|
|
431
|
+
"Fields": "显示字段",
|
|
432
|
+
"Filters": "筛选",
|
|
433
|
+
"Field": "字段",
|
|
434
|
+
"Operator": "条件",
|
|
435
|
+
"Value": "值",
|
|
436
|
+
"Match all conditions": "匹配所有条件",
|
|
437
|
+
"Add filter": "添加条件",
|
|
438
|
+
"Apply filters": "应用筛选",
|
|
439
|
+
"Remove filter": "删除条件",
|
|
440
|
+
"Comma-separated values": "用逗号分隔的值",
|
|
441
|
+
"Equals": "等于",
|
|
442
|
+
"Does not equal": "不等于",
|
|
443
|
+
"Contains": "包含",
|
|
444
|
+
"Is one of": "匹配任意值",
|
|
445
|
+
"Greater than": "大于",
|
|
446
|
+
"At least": "大于或等于",
|
|
447
|
+
"Less than": "小于",
|
|
448
|
+
"At most": "小于或等于",
|
|
449
|
+
"Is empty": "为空"
|
|
430
450
|
}
|