@webx-ui/module-admin 0.23.2 → 0.23.3
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/admin.d.ts +5 -0
- package/dist/index.js +1818 -1761
- package/dist/index.js.map +1 -1
- package/dist/richTextAddresses.d.ts +13 -0
- package/dist/types.d.ts +11 -0
- package/package.json +1 -1
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/** A rich text value as a screen holds it: one document, or one per language. */
|
|
2
|
+
type Value = unknown;
|
|
3
|
+
/**
|
|
4
|
+
* Every library key in the value, once each. Read off the markup without parsing it: the
|
|
5
|
+
* attribute is written by the editor in one shape, and most documents have no pictures at all.
|
|
6
|
+
*/
|
|
7
|
+
export declare function richTextKeys(value: Value): string[];
|
|
8
|
+
/**
|
|
9
|
+
* The value with every library picture pointed at where it lives now. A language map stays a
|
|
10
|
+
* map; anything that is not a document comes back as it was.
|
|
11
|
+
*/
|
|
12
|
+
export declare function rewriteRichText(value: Value, addresses: Record<string, string | null>): Value;
|
|
13
|
+
export {};
|
package/dist/types.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { RouteRecordRaw } from 'vue-router';
|
|
|
2
2
|
import { ButtonVariant, IconName } from '@webx-ui/core';
|
|
3
3
|
import { TypeRegistry } from '@webx-ui/schema';
|
|
4
4
|
import { ThemePreference } from '@webx-ui/tokens';
|
|
5
|
+
import { AdminContext } from './admin';
|
|
5
6
|
import { LocaleDescriptor } from './i18n';
|
|
6
7
|
/**
|
|
7
8
|
* What `GET /api/cms/manifest` answers with — the panel's own description of itself, and the
|
|
@@ -151,6 +152,16 @@ export interface AdminModule {
|
|
|
151
152
|
* simply does not offer the button.
|
|
152
153
|
*/
|
|
153
154
|
pickImage?: () => Promise<PickedImage | null>;
|
|
155
|
+
/**
|
|
156
|
+
* Where library keys live now, by key; `null` for a key the library no longer has.
|
|
157
|
+
*
|
|
158
|
+
* The other half of {@link pickImage}. A document keeps the key of every picture beside an
|
|
159
|
+
* address, and the address is only true on the day it was written: the site's domain, the
|
|
160
|
+
* disk and the version stamp all move under it. The site works the address out again on
|
|
161
|
+
* every read; the panel asks this before handing a document to an editor, so a paragraph
|
|
162
|
+
* written on another host does not open with pictures pointing there.
|
|
163
|
+
*/
|
|
164
|
+
assetUrls?: (paths: string[], admin: AdminContext) => Promise<Record<string, string | null>>;
|
|
154
165
|
}
|
|
155
166
|
/**
|
|
156
167
|
* A picture out of a library: where it is right now, and the key it is filed under.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webx-ui/module-admin",
|
|
3
|
-
"version": "0.23.
|
|
3
|
+
"version": "0.23.3",
|
|
4
4
|
"description": "The frame a WebX UI admin panel runs in: bootstrap, the shell, the HTTP client and the module registry that pairs with webx-ui/module-admin on the server.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|