@webx-ui/module-blog 0.4.6 → 0.5.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/dist/api.d.ts +5 -14
- package/dist/index.d.ts +2 -5
- package/dist/index.js +1116 -1659
- package/dist/index.js.map +1 -1
- package/dist/module.d.ts +10 -1
- package/dist/style.css +1 -1
- package/dist/types.d.ts +8 -31
- package/package.json +5 -5
- package/dist/ArticleRubrics.d.ts +0 -14
- package/dist/RubricDialog.d.ts +0 -34
- package/dist/RubricsPage.d.ts +0 -19
package/dist/module.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AdminModule } from '@webx-ui/module-admin';
|
|
1
|
+
import { AdminModule, CategoriesOptions } from '@webx-ui/module-admin';
|
|
2
2
|
export interface BlogOptions {
|
|
3
3
|
/** Where the blog lives inside the panel. The three sections sit under it. */
|
|
4
4
|
path?: string;
|
|
@@ -14,4 +14,13 @@ export interface BlogOptions {
|
|
|
14
14
|
* manifest — and so does one whose front end is missing. That is what makes it safe to return
|
|
15
15
|
* all three from one call: a panel that installed only part of the blog gets only that part.
|
|
16
16
|
*/
|
|
17
|
+
/**
|
|
18
|
+
* The rubrics as the panel's shared categories see them: where they answer, what they are edited
|
|
19
|
+
* on and what the blog calls them. Exported so that a panel mounting the screens somewhere of its
|
|
20
|
+
* own does not have to repeat the words.
|
|
21
|
+
*
|
|
22
|
+
* Every word that names the thing is the blog's — "rubric", "articles" — and the rest ("Edit",
|
|
23
|
+
* "Cancel", "Leave without saving?") is the panel's, said the same way in every module.
|
|
24
|
+
*/
|
|
25
|
+
export declare function rubricsOptions(path?: string): CategoriesOptions;
|
|
17
26
|
export declare function blog(options?: BlogOptions): AdminModule[];
|
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.wx-article-editor[data-v-d3973be7]{display:flex;flex-direction:column;gap:var(--wx-gap, var(--wx-space-16));height:100%;min-height:0;container-type:inline-size}.wx-article-editor__ghost[data-v-d3973be7]{max-width:420px}.wx-article-editor__screen[data-v-d3973be7]{display:flex;flex-direction:column;flex:1;min-height:0}.wx-article-editor__screen[data-v-d3973be7] .wx-screen-host,.wx-article-editor__screen[data-v-d3973be7] .wx-screen,.wx-article-editor__screen[data-v-d3973be7] .wx-tabs,.wx-article-editor__screen[data-v-d3973be7] .wx-tabs__layout,.wx-article-editor__screen[data-v-d3973be7] .wx-tabs__panels,.wx-article-editor__screen[data-v-d3973be7] .wx-tab:not([hidden]){display:flex;flex-direction:column;flex:1;min-height:0}.wx-article-history[data-v-0a997938]{display:flex;flex-direction:column;border:1px solid var(--wx-border-default);border-radius:var(--wx-radius-md);background:var(--wx-bg-surface);overflow:hidden}.wx-article-history__ghost[data-v-0a997938]{padding:var(--wx-space-10) var(--wx-space-12)}.wx-article-history__row[data-v-0a997938]{display:flex;align-items:center;gap:var(--wx-space-12);padding:var(--wx-space-10) var(--wx-space-12);border-block-end:1px solid var(--wx-border-default);flex-wrap:wrap}.wx-article-history__row[data-v-0a997938]:last-child{border-block-end:0}.wx-article-history__number[data-v-0a997938]{width:40px;font-family:var(--wx-font-family-mono);font-size:var(--wx-font-size-sm);color:var(--wx-text-muted)}.wx-article-history__who[data-v-0a997938]{display:flex;flex-direction:column;flex:1;min-width:160px}.wx-article-related[data-v-164e86fe]{display:flex;flex-direction:column;gap:var(--wx-space-8)}.wx-article-related__name[data-v-164e86fe]{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.wx-article-
|
|
1
|
+
.wx-article-editor[data-v-d3973be7]{display:flex;flex-direction:column;gap:var(--wx-gap, var(--wx-space-16));height:100%;min-height:0;container-type:inline-size}.wx-article-editor__ghost[data-v-d3973be7]{max-width:420px}.wx-article-editor__screen[data-v-d3973be7]{display:flex;flex-direction:column;flex:1;min-height:0}.wx-article-editor__screen[data-v-d3973be7] .wx-screen-host,.wx-article-editor__screen[data-v-d3973be7] .wx-screen,.wx-article-editor__screen[data-v-d3973be7] .wx-tabs,.wx-article-editor__screen[data-v-d3973be7] .wx-tabs__layout,.wx-article-editor__screen[data-v-d3973be7] .wx-tabs__panels,.wx-article-editor__screen[data-v-d3973be7] .wx-tab:not([hidden]){display:flex;flex-direction:column;flex:1;min-height:0}.wx-article-history[data-v-0a997938]{display:flex;flex-direction:column;border:1px solid var(--wx-border-default);border-radius:var(--wx-radius-md);background:var(--wx-bg-surface);overflow:hidden}.wx-article-history__ghost[data-v-0a997938]{padding:var(--wx-space-10) var(--wx-space-12)}.wx-article-history__row[data-v-0a997938]{display:flex;align-items:center;gap:var(--wx-space-12);padding:var(--wx-space-10) var(--wx-space-12);border-block-end:1px solid var(--wx-border-default);flex-wrap:wrap}.wx-article-history__row[data-v-0a997938]:last-child{border-block-end:0}.wx-article-history__number[data-v-0a997938]{width:40px;font-family:var(--wx-font-family-mono);font-size:var(--wx-font-size-sm);color:var(--wx-text-muted)}.wx-article-history__who[data-v-0a997938]{display:flex;flex-direction:column;flex:1;min-width:160px}.wx-article-related[data-v-164e86fe]{display:flex;flex-direction:column;gap:var(--wx-space-8)}.wx-article-related__name[data-v-164e86fe]{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.wx-article-slug[data-v-5da20e5e]{display:flex;flex-direction:column;gap:var(--wx-space-8)}.wx-article-slug__prefix[data-v-5da20e5e],.wx-article-slug[data-v-5da20e5e] .wx-input__inner{font-family:var(--wx-font-family-mono)}.wx-article-slug__prefix[data-v-5da20e5e]{color:var(--wx-text-muted)}.wx-article-tags[data-v-faf5adec]{display:flex;flex-direction:column;gap:var(--wx-space-8)}.wx-article-tags__chips[data-v-faf5adec]{display:flex;flex-wrap:wrap;gap:var(--wx-space-6)}.wx-article-tags__pick[data-v-faf5adec]{display:flex;align-items:center;gap:var(--wx-space-8);flex-wrap:wrap}.wx-article-tags__pick[data-v-faf5adec]>.wx-select{flex:1 1 220px;min-width:0}.wx-article-unpublish[data-v-c311cff2] .wx-button{align-self:flex-start}.wx-articles[data-v-2d93df26]{min-width:0}.wx-articles__cover[data-v-2d93df26]{display:flex;align-items:center;justify-content:center;width:44px;height:32px;overflow:hidden;border-radius:var(--wx-radius-xs);background:var(--wx-bg-subtle);color:var(--wx-text-muted)}.wx-articles__cover.is-empty[data-v-2d93df26]{border:1px dashed var(--wx-border-color);background:var(--wx-bg-base)}.wx-articles__cover img[data-v-2d93df26]{width:100%;height:100%;min-width:0;object-fit:cover}.wx-articles__name[data-v-2d93df26]{display:flex;align-items:center;gap:var(--wx-space-8);min-width:0}.wx-articles__name-text[data-v-2d93df26]{display:flex;flex-direction:column;min-width:0}.wx-articles__pin[data-v-2d93df26]{flex:none;color:var(--wx-color-primary)}.wx-articles__title[data-v-2d93df26]{overflow:hidden;font-weight:var(--wx-font-weight-medium);white-space:nowrap;text-overflow:ellipsis}.wx-articles__address[data-v-2d93df26]{overflow:hidden;color:var(--wx-text-muted);font-family:var(--wx-font-family-mono);font-size:var(--wx-font-size-xs);white-space:nowrap;text-overflow:ellipsis}.wx-articles__chips[data-v-2d93df26],.wx-articles__state[data-v-2d93df26]{display:flex;align-items:center;gap:var(--wx-space-4);min-width:0;overflow:hidden}.wx-articles[data-v-2d93df26] .wx-articles__when{white-space:nowrap}.wx-tag-merge[data-v-aa68b3a8]{display:flex;flex-direction:column;gap:var(--wx-space-12)}.wx-tag-merge__chips[data-v-aa68b3a8]{display:flex;flex-wrap:wrap;align-items:center;gap:var(--wx-space-6);min-width:0}.wx-tag-merge__redirect[data-v-aa68b3a8]{display:flex;flex-direction:column;gap:var(--wx-space-2)}.wx-tags[data-v-beb86d88]{display:flex;flex-direction:column;gap:var(--wx-space-12);min-width:0}.wx-tags__rename[data-v-beb86d88]{display:block;min-width:0}.wx-tags__sort[data-v-beb86d88]{display:flex;gap:var(--wx-space-4);min-width:0}.wx-tags__name[data-v-beb86d88]{max-width:100%;overflow:hidden;padding:0;border:0;background:none;color:inherit;font:inherit;text-align:start;text-overflow:ellipsis;white-space:nowrap;cursor:text}.wx-tags__name[data-v-beb86d88]:hover{text-decoration:underline;text-decoration-style:dotted}.wx-tags__bar[data-v-beb86d88] .wx-action-bar__state{flex:0 1 auto}
|
package/dist/types.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { LocalizedValue, Paginated } from '@webx-ui/core';
|
|
2
2
|
import { ScreenModel } from '@webx-ui/schema';
|
|
3
|
+
import { CategoryRow } from '@webx-ui/module-admin';
|
|
3
4
|
/**
|
|
4
5
|
* Never published · waiting for its day · on the site · on the site with edits waiting · taken
|
|
5
6
|
* off it (§10).
|
|
@@ -172,35 +173,15 @@ export interface ArticleConflict {
|
|
|
172
173
|
* name is worked out beside them. A rubric named in one language and not in another is still a
|
|
173
174
|
* row somebody has to be able to click.
|
|
174
175
|
*/
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
lead: LocalizedValue;
|
|
182
|
-
/** `null` — this rubric names no address in the language the panel is open in (§9). */
|
|
183
|
-
path: string | null;
|
|
184
|
-
url: string | null;
|
|
185
|
-
cover: ArticleCover | null;
|
|
186
|
-
is_visible: boolean;
|
|
187
|
-
position: number;
|
|
176
|
+
/**
|
|
177
|
+
* One rubric as its list draws it: the panel's shared category row, with the number of articles
|
|
178
|
+
* under the blog's own word. Everything else about a rubric — the introduction, the picture, SEO,
|
|
179
|
+
* the fields of the project — is the values of `blog.category-form`.
|
|
180
|
+
*/
|
|
181
|
+
export type RubricRow = CategoryRow & {
|
|
188
182
|
/** Why the delete button is out of reach, and what its explanation says (§6). */
|
|
189
183
|
articles_count: number;
|
|
190
|
-
|
|
191
|
-
seo: Record<string, unknown>;
|
|
192
|
-
}
|
|
193
|
-
/** What a rubric's form sends. Only the fields that travelled are touched. */
|
|
194
|
-
export interface RubricInput {
|
|
195
|
-
title?: LocalizedValue | string;
|
|
196
|
-
slug?: LocalizedValue | string;
|
|
197
|
-
lead?: LocalizedValue | string;
|
|
198
|
-
cover?: {
|
|
199
|
-
path: string;
|
|
200
|
-
} | null;
|
|
201
|
-
is_visible?: boolean;
|
|
202
|
-
seo?: Record<string, unknown> | null;
|
|
203
|
-
}
|
|
184
|
+
};
|
|
204
185
|
/**
|
|
205
186
|
* Whether a tag page is in the index, and why (§12).
|
|
206
187
|
*
|
|
@@ -267,7 +248,3 @@ export interface TagMerged {
|
|
|
267
248
|
* whole address as it is typed, and `remont` on its own says nothing about whether the blog
|
|
268
249
|
* lives at the root of the site or under `/blog/`.
|
|
269
250
|
*/
|
|
270
|
-
export interface RubricsPayload {
|
|
271
|
-
data: RubricRow[];
|
|
272
|
-
prefix: string;
|
|
273
|
-
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webx-ui/module-blog",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"description": "Blog for the WebX UI admin panel: articles made of blocks, rubrics and tags, scheduled publication.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -43,10 +43,10 @@
|
|
|
43
43
|
"vue-router": "^4.5.0"
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@webx-ui/core": "^0.
|
|
47
|
-
"@webx-ui/module-admin": "^0.
|
|
48
|
-
"@webx-ui/module-blocks": "^0.8.
|
|
49
|
-
"@webx-ui/schema": "^0.
|
|
46
|
+
"@webx-ui/core": "^0.33.0",
|
|
47
|
+
"@webx-ui/module-admin": "^0.15.0",
|
|
48
|
+
"@webx-ui/module-blocks": "^0.8.4",
|
|
49
|
+
"@webx-ui/schema": "^0.6.0"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
52
|
"@types/node": "^24.10.1",
|
package/dist/ArticleRubrics.d.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
type __VLS_Props = {
|
|
2
|
-
disabled?: boolean;
|
|
3
|
-
};
|
|
4
|
-
type __VLS_PublicProps = {
|
|
5
|
-
modelValue?: number[];
|
|
6
|
-
} & __VLS_Props;
|
|
7
|
-
declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
8
|
-
"update:modelValue": (value: number[]) => any;
|
|
9
|
-
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
10
|
-
"onUpdate:modelValue"?: ((value: number[]) => any) | undefined;
|
|
11
|
-
}>, {
|
|
12
|
-
disabled: boolean;
|
|
13
|
-
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
14
|
-
export default _default;
|
package/dist/RubricDialog.d.ts
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { RubricRow } from './types';
|
|
2
|
-
/**
|
|
3
|
-
* One rubric, in a panel over the list (§10).
|
|
4
|
-
*
|
|
5
|
-
* A dialog and not a pane beside the list, because the two are not the same job. The list is
|
|
6
|
-
* dragged — its order *is* the order of the menu on the site — and dragging is a thing done to
|
|
7
|
-
* the whole list at once, with all of it in view. Editing one rubric is the opposite: four
|
|
8
|
-
* tabs' worth of a single record, and the list behind it is context rather than something to
|
|
9
|
-
* keep half a screen for.
|
|
10
|
-
*
|
|
11
|
-
* Three tabs. The words — the name, the address, whether it is on the site, the introduction
|
|
12
|
-
* above its list — are one thing somebody sits down to write, so they are one tab. The picture
|
|
13
|
-
* is not a field but a frame, and beside a column of inputs it either dwarfs them or leaves
|
|
14
|
-
* half a line empty, so it takes a tab. The SEO card is written once and then left to the
|
|
15
|
-
* rules for a year, so it takes the last one.
|
|
16
|
-
*
|
|
17
|
-
* Nothing here is described (§12): nothing patches a rubric, so there is no screen to extend
|
|
18
|
-
* and no registry to go through. What it does borrow are the two fields it has no business
|
|
19
|
-
* drawing itself — the library picker and the SEO card, both looked up in the panel's own type
|
|
20
|
-
* registry. A panel without `module-media` has one tab fewer and edits everything else.
|
|
21
|
-
*/
|
|
22
|
-
type __VLS_Props = {
|
|
23
|
-
/** `null` while a new one is being made: the form of a row that is not in the list yet. */
|
|
24
|
-
rubric?: RubricRow | null;
|
|
25
|
-
/** The first segment of every blog address, for the line under the slug (§4). */
|
|
26
|
-
prefix?: string;
|
|
27
|
-
disabled?: boolean;
|
|
28
|
-
};
|
|
29
|
-
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
30
|
-
rubric: RubricRow | null;
|
|
31
|
-
disabled: boolean;
|
|
32
|
-
prefix: string;
|
|
33
|
-
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
34
|
-
export default _default;
|
package/dist/RubricsPage.d.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The sections of the blog: the whole menu of the site, in the order it has on it (§6, §10).
|
|
3
|
-
*
|
|
4
|
-
* One list and nothing beside it. The order here *is* the order on the site, so the screen the
|
|
5
|
-
* section needs most is the one where every rubric is visible at once and can be dragged past
|
|
6
|
-
* the others — and a form taking two thirds of the width is two thirds of that view gone. What
|
|
7
|
-
* a rubric is edited in is a dialog over this list ({@link RubricDialog}), which is also what
|
|
8
|
-
* makes reordering safe: nothing here is half-typed, so a row that moves loses nothing.
|
|
9
|
-
*
|
|
10
|
-
* There is no paginator and no search: a rubric is a section, a site has eight of them, and a
|
|
11
|
-
* menu you have to search is a menu that is already wrong.
|
|
12
|
-
*/
|
|
13
|
-
type __VLS_Props = {
|
|
14
|
-
base?: string;
|
|
15
|
-
};
|
|
16
|
-
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
17
|
-
base: string;
|
|
18
|
-
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
19
|
-
export default _default;
|