@lvl99dotcom/edaha-editor 0.3.0 → 0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/README.md +8 -1
  2. package/dist/client/assets/index--k7n6Qb8.css +1 -0
  3. package/dist/client/assets/{index-BwcJ6yrI.js → index-owkKXGfS.js} +140 -126
  4. package/dist/client/index.html +2 -2
  5. package/dist/client-lib/index.js +4037 -0
  6. package/dist/client-lib/style.css +1569 -0
  7. package/dist/editor/index.d.ts +24 -1
  8. package/dist/editor/index.js +15 -1
  9. package/dist/server/store/index.d.ts +2 -1
  10. package/dist/server/store/index.js +4 -3
  11. package/dist/types/client/components/define/index.d.ts +7 -0
  12. package/dist/types/client/components/edaha-article/index.d.ts +380 -0
  13. package/dist/types/client/components/edaha-article-browser/index.d.ts +162 -0
  14. package/dist/types/client/components/edaha-article-data-field/index.d.ts +121 -0
  15. package/dist/types/client/components/edaha-article-data-group/index.d.ts +40 -0
  16. package/dist/types/client/components/edaha-editor/index.d.ts +289 -0
  17. package/dist/types/client/components/edaha-embed-dialog/index.d.ts +84 -0
  18. package/dist/types/client/components/edaha-file-browser/index.d.ts +203 -0
  19. package/dist/types/client/components/edaha-markdown/index.d.ts +70 -0
  20. package/dist/types/client/components/edaha-metadata-field/index.d.ts +100 -0
  21. package/dist/types/client/components/edaha-richtext/index.d.ts +88 -0
  22. package/dist/types/client/components/edaha-toasts/index.d.ts +47 -0
  23. package/dist/types/client/dates/index.d.ts +14 -0
  24. package/dist/types/client/editorApi/index.d.ts +129 -0
  25. package/dist/types/client/embeds/index.d.ts +74 -0
  26. package/dist/types/client/icons/index.d.ts +60 -0
  27. package/dist/types/client/index.d.ts +3 -0
  28. package/dist/types/client/markdown/index.d.ts +163 -0
  29. package/dist/types/client/metadataForm/index.d.ts +77 -0
  30. package/dist/types/client/narrow/index.d.ts +21 -0
  31. package/dist/types/client/richtext/editor/index.d.ts +34 -0
  32. package/dist/types/client/richtext/extensions/index.d.ts +90 -0
  33. package/dist/types/client/sortTable/index.d.ts +24 -0
  34. package/dist/types/client/theme/index.d.ts +48 -0
  35. package/dist/types/server/types/index.d.ts +251 -0
  36. package/package.json +15 -10
  37. package/dist/client/assets/index-D2Y17Fm-.css +0 -1
@@ -0,0 +1,251 @@
1
+ import type { ArticleStatus } from "@lvl99dotcom/edaha.md/generator/types";
2
+ import type { MetadataDefinitions, MetadataProblem } from "@lvl99dotcom/edaha.md/generator/metadata";
3
+ import type { MetadataGroup } from "@lvl99dotcom/edaha.md/generator/metadataGroups";
4
+ import type { EmbedOptionSchemas } from "@lvl99dotcom/edaha.md/embeds";
5
+ export type { ArticleStatus } from "@lvl99dotcom/edaha.md/generator/types";
6
+ export type { MetadataDefinitions, MetadataProblem, } from "@lvl99dotcom/edaha.md/generator/metadata";
7
+ export type { MetadataGroup } from "@lvl99dotcom/edaha.md/generator/metadataGroups";
8
+ /** Where an article is saved */
9
+ export interface ArticleLocation {
10
+ type: string;
11
+ slug: string;
12
+ }
13
+ /** An article in the editor's article list */
14
+ export interface ArticleSummary {
15
+ type: string;
16
+ slug: string;
17
+ /** The article title, or its folder name if it can't be read */
18
+ title: string;
19
+ status: ArticleStatus;
20
+ /** ISO 8601 date (empty if it can't be read) */
21
+ date: string;
22
+ /** Why the article can't be read, if it can't */
23
+ error?: string | undefined;
24
+ /** The author's name, if the article names one */
25
+ author?: string | undefined;
26
+ /** The article's tags */
27
+ tags: string[];
28
+ /** When its article.md file last changed (ISO 8601) */
29
+ updated: string;
30
+ /** Problems with its custom metadata, if it has any */
31
+ problems?: MetadataProblem[] | undefined;
32
+ }
33
+ /** What articles are sorted by: their title, type, status, date, or when their file last changed */
34
+ export type ArticleSort = "title" | "type" | "status" | "date" | "updated";
35
+ /**
36
+ * Which way articles are sorted: ascending (A to Z, oldest first) or descending (Z to A, newest first). Each sort has
37
+ * its own default (see `DEFAULT_ORDERS`).
38
+ */
39
+ export type ArticleOrder = "asc" | "desc";
40
+ /** Each sort's default order: titles, types and statuses A to Z, dates newest first */
41
+ export declare const DEFAULT_ORDERS: Readonly<Record<ArticleSort, ArticleOrder>>;
42
+ /** Which articles with metadata problems to find: those with errors, with warnings, or with either */
43
+ export type ProblemFilter = "errors" | "warnings" | "any";
44
+ /**
45
+ * The custom metadata fields, which each configured type uses (a list, `false` for none, or all when missing), and the
46
+ * groups the editor shows settings in, in order
47
+ */
48
+ export interface MetadataInfo {
49
+ definitions: MetadataDefinitions;
50
+ types: Record<string, string[] | false>;
51
+ groups: MetadataGroup[];
52
+ }
53
+ /** A search of the article index; every part is optional */
54
+ export interface ArticleQuery {
55
+ /** Text the title contains (ignoring case and accents) */
56
+ search?: string | undefined;
57
+ type?: string | undefined;
58
+ /** The author's name */
59
+ author?: string | undefined;
60
+ tag?: string | undefined;
61
+ status?: ArticleStatus | undefined;
62
+ /** Only articles with metadata errors, warnings, or either */
63
+ problems?: ProblemFilter | undefined;
64
+ /** Default: "date" */
65
+ sort?: ArticleSort | undefined;
66
+ /** Default: the sort's own default (see `DEFAULT_ORDERS`) */
67
+ order?: ArticleOrder | undefined;
68
+ /** The page to show, from 1 (default: 1) */
69
+ page?: number | undefined;
70
+ /** Articles per page, at most `MAX_PER_PAGE` (default: `MAX_PER_PAGE`) */
71
+ perPage?: number | undefined;
72
+ }
73
+ /** A page of articles found by an `ArticleQuery` */
74
+ export interface ArticlePage {
75
+ articles: ArticleSummary[];
76
+ /** How many articles were found in all */
77
+ total: number;
78
+ /** The page shown, from 1 */
79
+ page: number;
80
+ /** How many pages there are (at least 1) */
81
+ pages: number;
82
+ perPage: number;
83
+ }
84
+ /** The kind of a file, by its extension */
85
+ export type FileKind = "image" | "document" | "archive" | "video" | "audio" | "other";
86
+ /** A file in an article's folder, as the article index lists it */
87
+ export interface IndexedFile {
88
+ /** The article's type and slug */
89
+ type: string;
90
+ slug: string;
91
+ /** The file's name in the article's folder */
92
+ name: string;
93
+ kind: FileKind;
94
+ /** Its size in bytes */
95
+ size: number;
96
+ /** When it last changed (ISO 8601) */
97
+ updated: string;
98
+ }
99
+ /** A file, as the file browser shows it */
100
+ export interface FileSummary extends IndexedFile {
101
+ /** Its path on the website, e.g. "/news/welcome/photo.png" */
102
+ url: string;
103
+ }
104
+ /** What files are sorted by: their name, kind, size, or location (article type and slug) */
105
+ export type FileSort = "name" | "kind" | "size" | "location";
106
+ /** Each file sort's default order: sizes largest first, the others A to Z */
107
+ export declare const DEFAULT_FILE_ORDERS: Readonly<Record<FileSort, ArticleOrder>>;
108
+ /** A search of the article folders' files; every part is optional */
109
+ export interface FileQuery {
110
+ /** Text the name contains (ignoring case) */
111
+ search?: string | undefined;
112
+ kind?: FileKind | undefined;
113
+ /** The article type the files are in */
114
+ type?: string | undefined;
115
+ /** Default: "location" */
116
+ sort?: FileSort | undefined;
117
+ /** Default: the sort's own default (see `DEFAULT_FILE_ORDERS`) */
118
+ order?: ArticleOrder | undefined;
119
+ /** The page to show, from 1 (default: 1) */
120
+ page?: number | undefined;
121
+ /** Files per page, at most 50 (default: 50) */
122
+ perPage?: number | undefined;
123
+ }
124
+ /** A page of files found by a `FileQuery` */
125
+ export interface FilePage {
126
+ files: FileSummary[];
127
+ total: number;
128
+ page: number;
129
+ pages: number;
130
+ perPage: number;
131
+ }
132
+ /** What the file browser's filters can choose from: the kinds of files and the article types they are in */
133
+ export interface FileFilters {
134
+ kinds: FileKind[];
135
+ types: string[];
136
+ }
137
+ /** The result of replacing or deleting a file: the replacement's name, and the articles whose references changed */
138
+ export interface FileChange {
139
+ name?: string | undefined;
140
+ articles: ArticleLocation[];
141
+ }
142
+ /** A type's most recently changed articles, for the editor's nav */
143
+ export interface RecentArticles {
144
+ type: string;
145
+ articles: ArticleSummary[];
146
+ /** How many articles the type has in all */
147
+ total: number;
148
+ }
149
+ /** What the article browser's filters can choose from: the types, authors and tags articles use */
150
+ export interface ArticleFilters {
151
+ types: string[];
152
+ authors: string[];
153
+ tags: string[];
154
+ }
155
+ /**
156
+ * The website, as the editor needs it: its name, the author of articles that don't name one (undefined for none), and
157
+ * the types with their own default author (`false` for none)
158
+ */
159
+ export interface SiteInfo {
160
+ name: string;
161
+ author?: EditorAuthor | undefined;
162
+ types: Record<string, EditorAuthor | false>;
163
+ }
164
+ /** An author as edited */
165
+ export interface EditorAuthor {
166
+ name: string;
167
+ email?: string | undefined;
168
+ url?: string | undefined;
169
+ }
170
+ /** An attachment as edited (URLs relative to the article folder, or absolute) */
171
+ export interface EditorAttachment {
172
+ url: string;
173
+ thumbnail?: string | undefined;
174
+ mimeType?: string | undefined;
175
+ name?: string | undefined;
176
+ }
177
+ /** An article's editable data, as saved by the editor */
178
+ export interface EditorArticleData {
179
+ type: string;
180
+ slug: string;
181
+ status: ArticleStatus;
182
+ /** ISO 8601 date */
183
+ date: string;
184
+ title: string;
185
+ /** The template to render the article with (undefined for the default, "single") */
186
+ template?: string | undefined;
187
+ /** The article's author, `false` for none, or undefined for its type's or the website's default */
188
+ author?: EditorAuthor | false | undefined;
189
+ excerpt?: string | undefined;
190
+ thumbnail?: string | undefined;
191
+ tags: string[];
192
+ attachments: EditorAttachment[];
193
+ /** The article body as editor HTML (readmore as `<hr class="readmore">`, embeds as `<div class="embed">URL</div>`) */
194
+ bodyHtml: string;
195
+ /**
196
+ * Every other setting, by key: the custom metadata values, and settings the type doesn't use or nobody defined (kept
197
+ * as they are). Default: none
198
+ */
199
+ meta?: Record<string, unknown> | undefined;
200
+ }
201
+ /** An article as loaded into the editor */
202
+ export interface EditorArticle extends EditorArticleData {
203
+ /** Files in the article's folder (except article.md) */
204
+ files: string[];
205
+ /** Problems with its custom metadata as saved (none if left out) */
206
+ problems?: MetadataProblem[] | undefined;
207
+ }
208
+ /** The result of uploading a file into an article's folder */
209
+ export interface UploadResult {
210
+ /** The saved file name (relative to the article folder) */
211
+ name: string;
212
+ /** Where the editor can show the file */
213
+ url: string;
214
+ }
215
+ /** An embed plugin, for the editor's lists of embeds */
216
+ export interface EmbedInfo {
217
+ /** Its key, e.g. "youtube" for `<!-- embed:youtube -->` */
218
+ key: string;
219
+ /** Its name, e.g. "YouTube video" */
220
+ name: string;
221
+ /** What it embeds, if it says */
222
+ description?: string | undefined;
223
+ /** What its content is, shown under the content's label in the embed dialog, if it says */
224
+ info?: string | undefined;
225
+ /** Whether a block can have no content (see EmbedPlugin.contentOptional) */
226
+ contentOptional?: boolean | undefined;
227
+ /** Its SVG icon (markup), if it has one */
228
+ icon?: string | undefined;
229
+ /** Its options' fields (see EmbedPlugin.options), if it has options */
230
+ options?: EmbedOptionSchemas | undefined;
231
+ }
232
+ /** Why an embed block's content isn't valid for its plugin (none when it is) */
233
+ export interface EmbedValidation {
234
+ errors: string[];
235
+ }
236
+ /** An embed block's frame in the editor's body */
237
+ export interface EmbedFrame {
238
+ /** The frame page's URL, e.g. "/embed-frame/<id>/", or "" when the content isn't valid */
239
+ url: string;
240
+ /** Why the content isn't valid for its plugin, if it isn't (the website leaves the block out) */
241
+ errors: string[];
242
+ /** Why the block couldn't be embedded otherwise, e.g. its plugin is missing (it then shows as it is written) */
243
+ warnings: string[];
244
+ }
245
+ /** An article type's labels from the config file */
246
+ export interface ArticleTypeLabels {
247
+ /** e.g. "Article" */
248
+ labelSingle: string;
249
+ /** e.g. "Articles" */
250
+ labelPlural: string;
251
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvl99dotcom/edaha-editor",
3
- "version": "0.3.0",
3
+ "version": "0.4.1",
4
4
  "description": "Local WYSIWYG article editor for edaha.md sites.",
5
5
  "keywords": [
6
6
  "blog",
@@ -27,6 +27,11 @@
27
27
  "types": "./dist/index.d.ts",
28
28
  "default": "./dist/index.js"
29
29
  },
30
+ "./client": {
31
+ "types": "./dist/types/client/index.d.ts",
32
+ "default": "./dist/client-lib/index.js"
33
+ },
34
+ "./client/style.css": "./dist/client-lib/style.css",
30
35
  "./package.json": "./package.json"
31
36
  },
32
37
  "files": [
@@ -39,14 +44,7 @@
39
44
  },
40
45
  "dependencies": {
41
46
  "@hono/node-server": "^2.1.5",
42
- "@lvl99dotcom/edaha.md": "^0.3.0",
43
- "hono": "^4.13.13",
44
- "mime-types": "^3.0.2",
45
- "turndown": "^7.2.4",
46
- "yaml": "^2.9.1"
47
- },
48
- "devDependencies": {
49
- "@material-symbols/svg-400": "0.48.1",
47
+ "@lvl99dotcom/edaha.md": "^0.4.1",
50
48
  "@tiptap/core": "^3.32.0",
51
49
  "@tiptap/extension-bubble-menu": "^3.34.0",
52
50
  "@tiptap/extension-details": "3.32.0",
@@ -54,7 +52,14 @@
54
52
  "@tiptap/extension-table": "^3.32.0",
55
53
  "@tiptap/pm": "^3.32.0",
56
54
  "@tiptap/starter-kit": "^3.32.0",
57
- "lit": "^3.3.3"
55
+ "hono": "^4.13.13",
56
+ "lit": "^3.3.3",
57
+ "mime-types": "^3.0.2",
58
+ "turndown": "^7.2.4",
59
+ "yaml": "^2.9.1"
60
+ },
61
+ "devDependencies": {
62
+ "@material-symbols/svg-400": "0.48.1"
58
63
  },
59
64
  "scripts": {
60
65
  "build": "node scripts/build.ts"
@@ -1 +0,0 @@
1
- :root{--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light dark;--colour-text:#1d1d1f;--colour-muted:#5a5a60;--colour-background:#fff;--colour-surface:#f4f4f6;--colour-border:#d8d8de;--colour-table-outline:#c0c0c6;--colour-link:#3b9a04;--colour-link-hover:#2b6f04;--colour-focus:#3b9a04;--colour-error:#b3261e;--toast-scheme:dark;--toast-text:#ececf0;--toast-background:#1f1f23;--toast-border:#38383f;--toast-accent:#fda26d;--font-family-base:Arial, sans-serif;--font-size-base:16px;--font-size-xl:1.4rem;--font-size-l:1.2rem;--font-size-s:.9rem;--font-size-xs:.8rem;--font-size-title:48px;--font-size-h1:32px;--font-size-h2:28px;--font-size-h3:24px;--font-size-h4:20px;--font-size-h5:18px;--font-size-h6:16px;--border-radius:5px}@media (prefers-color-scheme:dark){:root{--lightningcss-light: ;--lightningcss-dark:initial}}:root[data-theme=light]{--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light}:root[data-theme=light] .leaf-device:after{content:"🍃"}:root[data-theme=light] .theme-switcher:after{content:"🌚"}:root[data-theme=dark]{--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark;--colour-text:#ececf0;--colour-muted:#a6a6ae;--colour-background:#141416;--colour-surface:#1f1f23;--colour-border:#38383f;--colour-table-outline:#8a8a92;--colour-link:#dc6d2c;--colour-link-hover:#fda26d;--colour-focus:#fda26d;--colour-error:#ffb4ab;--toast-scheme:light;--toast-text:#1d1d1f;--toast-background:#fff;--toast-border:#d8d8de;--toast-accent:#3b9a04}:root[data-theme=dark] .leaf-device:after{content:"🍂"}:root[data-theme=dark] .theme-switcher:after{content:"🌝"}@media (prefers-color-scheme:dark){:root:not([data-theme=light]){--colour-text:#ececf0;--colour-muted:#a6a6ae;--colour-background:#141416;--colour-surface:#1f1f23;--colour-border:#38383f;--colour-table-outline:#8a8a92;--colour-link:#dc6d2c;--colour-link-hover:#fda26d;--colour-focus:#fda26d;--colour-error:#ffb4ab;--toast-scheme:light;--toast-text:#1d1d1f;--toast-background:#fff;--toast-border:#d8d8de;--toast-accent:#3b9a04}:root:not([data-theme=light]) .leaf-device:after{content:"🍂"}:root:not([data-theme=light]) .theme-switcher:after{content:"🌝"}}*,:before,:after{box-sizing:border-box}body{background:var(--colour-background);color:var(--colour-text);font-family:Arial,sans-serif;font-size:var(--font-size-base);margin:0;line-height:1.6}a{color:var(--colour-link)}a:hover{color:var(--colour-link-hover)}a:focus-visible,button:focus-visible,.button:focus-visible{outline:3px solid var(--colour-focus);outline-offset:2px}h1{font-size:var(--font-size-h1)}h2{font-size:var(--font-size-h2)}h3{font-size:var(--font-size-h3)}h4{font-size:var(--font-size-h4)}h5{font-size:var(--font-size-h5)}h6{font-size:var(--font-size-h6)}img{max-width:100%;height:auto}pre{background:var(--colour-surface);padding:1rem;overflow-x:auto}code{background:var(--colour-surface);color:var(--colour-muted);font-size:var(--font-size-s);padding:.2em}.theme-switcher{appearance:unset;background:0 0;border:0;position:absolute;top:1rem;right:1rem}.visually-hidden{clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap;border:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}input[type=text],input[type=number],input[type=email],input[type=url],input[type=search],input[type=colorpicker],input[type=date],input[type=date-local],input[type=time],input[type=time-local],input[type=datetime],input[type=datetime-local],textarea,select{background:var(--colour-background);border:solid 1px var(--colour-border);border-radius:var(--border-radius);color:var(--colour-text);font-family:var(--font-family-base);font-size:var(--font-size-base);padding:.25rem .5rem;line-height:1}select{appearance:none;background-image:linear-gradient(45deg,#0000 50%,currentColor 50%),linear-gradient(135deg,currentColor 50%,#0000 50%);background-position:right .85rem center,right .55rem center;background-repeat:no-repeat;background-size:.3rem .3rem;padding-inline-end:2rem}.btn{background-color:var(--colour-surface);border:solid 1px var(--colour-border);border-radius:var(--border-radius);color:var(--colour-text);padding:.5rem 1rem;font-size:1rem}.btn:hover{background-color:var(--colour-background);color:var(--colour-text);border-color:var(--colour-muted)}.btn-xs{padding:.3rem .5rem;font-size:.8rem}.btn-s{padding:.5rem 1rem;font-size:.9rem}.btn-none{appearance:unset;border:0;margin:0;padding:0}.btn-save-dirty{background-color:var(--colour-link);border-color:var(--colour-link);color:var(--colour-background)}.btn-save-dirty:hover{background-color:var(--colour-link-hover);border-color:var(--colour-link);color:var(--colour-background)}.edaha-title{font-size:var(--font-size-h3);margin:0 0 .5rem;padding:0}edaha-editor{grid-template-rows:minmax(0,1fr);grid-template-columns:16rem minmax(0,1fr);height:100dvh;display:grid;overflow:hidden}.edaha-editor-nav{padding:1rem;position:relative;overflow-y:auto}.edaha-editor-new button{width:100%}.edaha-editor-filters{margin:.5rem 0 1rem}.edaha-editor-filters select{width:100%}.edaha-editor-article-group h2{color:var(--colour-muted);font-size:var(--font-size-xs);text-transform:uppercase;margin:1rem 0 .25rem;padding:0;font-weight:400}.edaha-editor-article-group ul,.edaha-editor-article-group ol,.edaha-editor-article-group li{margin:0;padding:0;list-style-type:none}.edaha-editor-article-group-item-title{padding:.25rem 0;display:block}.edaha-editor-article-group-item-title[aria-current=page]{background-color:var(--colour-link);color:var(--colour-background);border-radius:var(--border-radius);padding:.25rem .5rem;text-decoration:none}.edaha-editor-article-group-item-meta{font-size:var(--font-size-s);color:var(--colour-muted);display:none}.edaha-editor-composer{min-height:0;overflow:hidden}.welcome-prompt{justify-content:center;align-items:center;height:100%;padding:1rem;display:flex;overflow-y:auto}.welcome-prompt-box{width:min(28rem,100%);margin:auto}.welcome-prompt-message{font-size:var(--font-size-l);text-align:center;margin:0 0 1rem}.welcome-prompt-message .btn-link{font-size:inherit;padding:0}.welcome-prompt-list{border-top:1px solid var(--colour-border);margin:0;padding:0;list-style:none}.welcome-prompt-list li{border-bottom:1px solid var(--colour-border);flex-direction:column;padding:.5rem 0;display:flex}.welcome-prompt-meta{color:var(--colour-muted);font-size:var(--font-size-s)}.welcome-prompt-browse{margin:.75rem auto 0;display:block}edaha-article{height:100%;display:block}edaha-article form{grid-template-columns:minmax(0,1fr) 20rem;height:100%;display:grid}.edaha-article-main{flex-direction:column;min-height:0;padding:1rem;display:flex;overflow-y:auto}.edaha-article-main>*{flex:none}.body-tabs{border-bottom:1px solid var(--colour-border);gap:.25rem;margin-block:.5rem;display:flex}.body-tabs [role=tab]{border-radius:var(--border-radius) var(--border-radius) 0 0;color:var(--colour-muted);background:0 0;border:1px solid #0000;margin-bottom:-1px;padding:.5rem 1rem;font-size:1rem}.body-tabs [role=tab]:hover{color:var(--colour-text)}.body-tabs [role=tab][aria-selected=true]{background:var(--colour-background);border-color:var(--colour-border) var(--colour-border) var(--colour-background);color:var(--colour-text);font-weight:700}.edaha-article-main>.body-panel{flex-direction:column;flex:1 1 0;min-height:300px;display:flex}.edaha-article-title{align-items:flex-start;gap:.5rem;display:flex}.edaha-article-title>edaha-article-data-field{flex:auto;min-width:0}.unsaved-notice{color:var(--colour-muted);font-size:var(--font-size-s);margin:0}.body-panel>edaha-article-data-field{flex-direction:column;flex:1 1 0;min-height:0;margin-block:.5rem 0;display:flex}.body-panel edaha-richtext{flex-direction:column;flex:1 1 0;min-height:0;display:flex}.body-panel .richtext-content{border:1px solid var(--colour-border);border-radius:var(--border-radius);flex:1 1 0;min-height:0;position:relative;overflow-y:auto}.body-panel .richtext-content .ProseMirror{min-height:100%}.body-panel textarea{resize:none;flex:1 1 0;min-height:0;line-height:1.5}.edaha-article-metadata{min-height:0;padding:0 1rem 1rem;overflow-y:auto}.edaha-article-controls{z-index:1;background:var(--colour-background);border-bottom:1px solid var(--colour-border);flex-wrap:wrap;gap:.5rem;padding-block:1rem;display:flex;position:sticky;top:0}edaha-article-data-field{margin-block:.5rem;display:block}edaha-article-data-field input,edaha-article-data-field select,edaha-article-data-field textarea{box-sizing:border-box;width:100%}.toasts{z-index:40;flex-direction:column;align-items:center;gap:.5rem;width:max-content;max-width:min(32rem,100vw - 2rem);display:flex;position:fixed;top:1rem;left:50%;transform:translate(-50%)}.toast{color-scheme:var(--toast-scheme);background:var(--toast-background);border:1px solid var(--toast-border);border-radius:var(--border-radius);color:var(--toast-text);justify-content:space-between;align-items:center;gap:.75rem;padding:.5rem .5rem .5rem 1rem;display:flex;box-shadow:0 4px 16px #00000040}.toast.error{border:2px solid var(--toast-accent)}.toast button{border:1px solid var(--toast-border);border-radius:var(--border-radius);color:inherit;font:inherit;cursor:pointer;background:0 0;padding:.25rem .5rem}.toast button:hover{border-color:var(--toast-text)}.toast button:focus-visible{outline-color:var(--toast-accent)}.dialog-backdrop{z-index:30;background:#0006;place-items:center;display:grid;position:fixed;inset:0}.dialog{background:canvas;border:1px solid;padding:1rem}.preview-controls{align-items:center;gap:.5rem;margin-block:.5rem;display:flex}.preview-frame{flex:1 1 0;min-height:0;display:flex;overflow-x:auto}edaha-article .preview{border:1px solid var(--colour-border);flex:none;max-width:none;margin-inline:auto}.richtext-content .ProseMirror{min-height:20rem;padding:1rem}.richtext-content pre.raw{white-space:pre-wrap;border:1px dashed;padding:.5rem}.richtext-content pre.raw:before{content:"Raw";font-family:system-ui,sans-serif;font-weight:700;display:block}.richtext-content span.raw{white-space:pre-wrap;outline:1px dashed}.richtext-content img{max-width:100%}.richtext-content table{border-collapse:collapse;outline:1px dotted var(--colour-table-outline)}.richtext-content th,.richtext-content td{border:1px dotted var(--colour-table-outline);vertical-align:top;min-width:2rem;padding:.25rem .5rem}.richtext-content :is(th,td)>p{margin:0}.richtext-content .readmore-block,.richtext-content .embed-block{cursor:pointer;border:1px dashed;margin-block:.5rem;padding:.5rem}.richtext-content .block-header{align-items:center;gap:.5rem;display:flex}.richtext-content .block-header span{flex:1}.richtext-content [data-type=details]{cursor:pointer;border:1px dashed;margin-block:.5rem;padding:.5rem}.richtext-content [data-type=details] summary,.richtext-content [data-type=detailsContent]{cursor:text}.richtext-content [data-type=details]>button{display:none}.richtext-content [data-type=details] summary,.richtext-content [data-type=detailsContent]{border:1px dotted;margin-block-start:.5rem;padding:.25rem .5rem;display:block}.richtext-content [data-type=detailsContent][hidden]{display:block}.richtext-content [data-type=details]:before,.richtext-content [data-type=details] summary:before,.richtext-content [data-type=detailsContent]:before{opacity:.6;font-size:.75em;font-weight:400;display:block}.richtext-content [data-type=details]:before{content:"Details"}.richtext-content [data-type=details] summary:before{content:"Summary"}.richtext-content [data-type=detailsContent]:before{content:"Content"}.richtext-content .embed-frame{border:0;width:100%;height:10rem;margin-block-start:.5rem;display:block}.richtext-content .block-header .embed-icon{flex:none}.richtext-content .embed-icon svg,.embed-dialog .embed-icon svg{width:1.25rem;height:1.25rem}.richtext-content .embed-content{white-space:pre-wrap;overflow-wrap:anywhere;margin:.5rem 0 0}.richtext-content .embed-errors{color:var(--colour-error);margin-block-start:.5rem}.richtext-content .embed-errors p,.richtext-content .embed-errors ul{margin:0}.toolbar-embed .embed-icon svg{width:1.5rem;height:1.5rem}.richtext-content .embed-warning{color:var(--colour-error);margin:.5rem 0 0}.embed-dialog{width:min(40rem,100vw - 2rem)}.embed-dialog form{flex-direction:column;min-height:0;display:flex}.embed-dialog-body{flex-direction:column;gap:.5rem;padding:.5rem 1rem;display:flex;overflow-y:auto}.embed-dialog-about,.embed-dialog-hint{color:var(--colour-muted);font-size:var(--font-size-s)}.embed-dialog-hint{margin:0}.embed-dialog-errors ul{color:var(--colour-error);margin:0;padding-inline-start:1.25rem}.embed-dialog textarea[aria-invalid=true]{border-color:var(--colour-error)}.embed-dialog textarea{resize:vertical;min-height:2rem;font-family:ui-monospace,monospace}.embed-dialog-actions{gap:.5rem;padding:.5rem 1rem 1rem;display:flex}.richtext-content .heading-id{opacity:.6;-webkit-user-select:all;user-select:all;margin-inline-start:.5em;font-size:.75em;font-weight:400}.richtext-content .ProseMirror-selectednode{outline:3px solid highlight}.editor-toolbar{flex-wrap:wrap;gap:.25rem;padding-block:.25rem .5rem;display:flex}.toolbar-button{background:var(--colour-surface);border:1px solid var(--colour-border);border-radius:var(--border-radius);min-width:2.25rem;min-height:2.25rem;color:var(--colour-text);cursor:pointer;justify-content:center;align-items:center;padding:.25rem;display:inline-flex}.toolbar-button:hover{border-color:var(--colour-muted)}.toolbar-button[aria-pressed=true]{background:var(--colour-link);border-color:var(--colour-link);color:var(--colour-background)}.toolbar-button:disabled,.toolbar-button[data-disabled]{opacity:.4;cursor:not-allowed}.format-menu{z-index:10;background:var(--colour-background);border:1px solid var(--colour-border);border-radius:var(--border-radius);flex-wrap:nowrap;width:max-content;max-width:calc(100vw - 2rem);padding:.25rem;box-shadow:0 4px 16px #00000040}.toolbar-upload:focus-within{outline:3px solid var(--colour-focus);outline-offset:2px}.icon{display:inline-flex}.icon svg{fill:currentColor;width:1.5rem;height:1.5rem}[data-action=Remove\ column] .icon svg{transform:rotate(90deg)}.body-panel edaha-markdown{flex-direction:column;flex:1 1 0;min-height:0;display:flex}.btn-icon{border-radius:var(--border-radius);min-width:2.75rem;min-height:2.75rem;color:var(--colour-text);cursor:pointer;background:0 0;border:1px solid #0000;justify-content:center;align-items:center;padding:0;display:inline-flex}.btn-icon:hover{border-color:var(--colour-border)}.edaha-editor-bar,.nav-backdrop,.nav-close,.btn-metadata-toggle{display:none}edaha-editor[compact]{grid-template-rows:auto minmax(0,1fr);grid-template-columns:minmax(0,1fr)}edaha-editor[compact] .edaha-editor-bar{border-bottom:1px solid var(--colour-border);align-items:center;gap:.5rem;padding:.25rem .5rem;display:flex}edaha-editor[compact] .edaha-editor-bar-title{font-weight:700}edaha-editor[compact] .edaha-editor-nav{z-index:20;background:var(--colour-background);border-right:1px solid var(--colour-border);visibility:hidden;width:min(20rem,85vw);padding-top:3.5rem;transition:transform .2s,visibility .2s;position:fixed;inset:0 auto 0 0;transform:translate(-100%)}edaha-editor[compact] .edaha-editor-nav.open{visibility:visible;transition:transform .2s,visibility;transform:none}edaha-editor[compact] .nav-close{display:inline-flex;position:absolute;top:.5rem;right:.5rem}edaha-editor[compact] .edaha-editor-nav .theme-switcher{min-width:2.75rem;min-height:2.75rem;top:.5rem;right:3.75rem}edaha-editor[compact] .nav-backdrop.open{z-index:19;background:#0006;display:block;position:fixed;inset:0}edaha-editor[compact] edaha-article form{grid-template-columns:minmax(0,1fr)}edaha-editor[compact] .edaha-article-main{padding-bottom:5rem}edaha-editor[compact] .edaha-article-metadata{z-index:10;background:var(--colour-background);border-top:1px solid var(--colour-border);flex-direction:column;padding:0;display:flex;position:fixed;inset:auto 0 0;overflow:hidden;box-shadow:0 -2px 8px #00000026}edaha-editor[compact] .edaha-article-metadata.open{border-top:0;top:0}edaha-editor[compact] .edaha-article-metadata-fields{display:none}edaha-editor[compact] .edaha-article-metadata.open .edaha-article-metadata-fields{flex:1 1 0;min-height:0;padding:.5rem 1rem 1rem;display:block;overflow-y:auto}edaha-editor[compact] .edaha-article-controls{border-top:1px solid var(--colour-border);border-bottom:0;order:2;padding:.5rem 1rem;position:static}edaha-editor[compact] .btn-metadata-toggle{min-width:2.75rem;margin-inline-start:auto;display:inline-block}edaha-editor[focus-mode] .edaha-article-main{box-sizing:border-box;justify-self:center;width:100%;max-width:900px}@media (width<=899.98px){.btn-focus-mode{display:none}}@media (prefers-reduced-motion:reduce){edaha-editor[compact] .edaha-editor-nav,edaha-editor[compact] .edaha-editor-nav.open{transition:none}}.edaha-editor-search{align-items:center;gap:.25rem;margin:.5rem 0 1rem;display:flex}.edaha-editor-search input{flex:1;min-width:0;min-height:2.25rem}.btn-link{color:var(--colour-link);font:inherit;font-size:var(--font-size-s);cursor:pointer;background:0 0;border:0;padding:.25rem 0;text-decoration:underline}.btn-link:hover{color:var(--colour-link-hover)}.article-browser{background:var(--colour-background);border:1px solid var(--colour-border);border-radius:var(--border-radius);width:min(60rem,100vw - 2rem);max-height:calc(100dvh - 2rem);color:var(--colour-text);padding:0}.article-browser[open]{flex-direction:column;display:flex}.article-browser::backdrop{background:#0006}.article-browser-header{justify-content:space-between;align-items:center;padding:.5rem .5rem 0 1rem;display:flex}.article-browser-header h2{font-size:var(--font-size-h4);margin:0}.article-browser-controls{grid-template-columns:repeat(auto-fill,minmax(10rem,1fr));gap:.5rem 1rem;padding:.5rem 1rem;display:grid}.article-browser-field{flex-direction:column;gap:.25rem;display:flex}.article-browser-field label{font-size:var(--font-size-s)}.article-browser-field input,.article-browser-field select{width:100%;min-height:2.25rem}.article-browser-search{grid-column:1/-1}.article-browser-status{color:var(--colour-muted);font-size:var(--font-size-s);border-bottom:1px solid var(--colour-border);margin:0;padding:.25rem 1rem}.article-browser-results{flex:auto;min-height:0;padding:.5rem 1rem 1rem;overflow:auto}.article-browser-table{border-collapse:collapse;width:100%;min-width:36rem;font-size:var(--font-size-s)}.article-browser-table th,.article-browser-table td{border-bottom:1px solid var(--colour-border);text-align:left;vertical-align:top;padding:.5rem .75rem .5rem 0}.article-browser-table td:not(:first-child){color:var(--colour-muted);white-space:nowrap}.article-browser-table td:first-child{font-size:1rem}.article-browser-table td .error{display:block}.sort-heading{min-height:2rem;color:var(--colour-text);font:inherit;white-space:nowrap;cursor:pointer;background:0 0;border:0;align-items:center;gap:.25rem;padding:0;font-weight:700;display:inline-flex}.sort-heading:hover{color:var(--colour-link)}.sort-heading-arrow{font-size:.7em}.article-browser-pages{justify-content:center;align-items:center;gap:1rem;padding-top:1rem;display:flex}@media (width<=899.98px){.article-browser{border:0;border-radius:0;width:100vw;max-width:none;height:100dvh;max-height:none;margin:0}}.file-browser-operations{align-items:center;gap:.25rem;display:flex}.file-browser-operations .btn-icon{min-width:2.25rem;min-height:2.25rem;color:var(--colour-text)}edaha-metadata-field{margin-block:.5rem;display:block}.metadata-field label{display:block}.metadata-field input:not([type=checkbox],[type=radio],[type=color]),.metadata-field select,.metadata-field textarea{box-sizing:border-box;width:100%}.metadata-group,.metadata-radio{border:1px solid var(--colour-border);border-radius:var(--border-radius);margin:0;padding:.5rem}.metadata-item{align-items:flex-end;gap:.5rem;display:flex}.metadata-item edaha-metadata-field{flex:1}.metadata-check,.metadata-choice{grid-template-columns:1rem 1fr;align-items:center;column-gap:.5rem;margin-block:.25rem;display:grid}.metadata-check input,.metadata-choice input{width:1rem;height:1rem;margin:0}.metadata-choice small{color:var(--colour-muted);grid-column:2}.metadata-checkbox>:not(.metadata-check){margin-inline-start:1.5rem}.metadata-description,.metadata-info{color:var(--colour-muted);font-size:var(--font-size-s);margin:.25rem 0}.metadata-problems,.metadata-warnings{font-size:var(--font-size-s);margin:.25rem 0;padding:0;list-style:none}.metadata-problems .error{color:var(--colour-error);font-weight:700}.metadata-problems .error:before{content:"⚠️ "}.metadata-warnings li,.metadata-problems .warning{color:var(--colour-muted)}[aria-invalid=true]{border-color:var(--colour-error);outline:1px solid var(--colour-error)}.metadata-file{align-items:center;gap:.5rem;margin:.25rem 0;display:flex}.welcome-attention{margin-top:1.5rem}.welcome-attention h2{font-size:var(--font-size-h5);margin:0 0 .5rem}.article-browser-table td .problems{color:var(--colour-muted);display:block}.settings-group{border-bottom:1px solid var(--colour-border)}.settings-group>summary{cursor:pointer;align-items:center;gap:.25rem;min-height:2.75rem;padding:.5rem 0;font-weight:700;list-style:none;display:flex}.settings-group>summary::-webkit-details-marker{display:none}.settings-group>summary:before{content:"▸";width:1rem;transition:transform .15s;display:inline-block}.settings-group[open]>summary:before{transform:rotate(90deg)}@media (prefers-reduced-motion:reduce){.settings-group>summary:before{transition:none}}.settings-group>summary:focus-visible{outline:3px solid var(--colour-focus);outline-offset:2px}.settings-group[open]>summary{margin-bottom:.25rem}.settings-group[open]{padding-bottom:.75rem}.settings-group-errors{margin-inline-start:auto}.settings-group-description{color:var(--colour-muted);font-size:var(--font-size-s);margin:0 0 .5rem}.files-title{font-size:var(--font-size-s);margin:.75rem 0 .25rem}.no-author{align-items:center;gap:.5rem;margin-block:.25rem;display:flex}.metadata-warnings li{justify-content:space-between;align-items:flex-start;gap:.5rem;margin-block:.25rem;display:flex}.edaha-title-button{color:inherit;font:inherit;text-align:inherit;cursor:pointer;background:0 0;border:0;margin:0;padding:0}