@sveltia/cms 0.127.0 → 0.128.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/LICENSE.txt +1 -1
- package/README.md +23 -2790
- package/dist/sveltia-cms.js +207 -207
- package/dist/sveltia-cms.js.map +1 -1
- package/dist/sveltia-cms.mjs +184 -184
- package/dist/sveltia-cms.mjs.map +1 -1
- package/main.d.ts +7 -0
- package/package.json +2 -2
- package/schema/sveltia-cms.json +1 -1
- package/types/public.d.ts +58 -61
package/main.d.ts
CHANGED
|
@@ -16,6 +16,7 @@ declare namespace CMS {
|
|
|
16
16
|
* `load_config_file: false` to prevent the configuration file from being loaded.
|
|
17
17
|
* @throws {TypeError} If `config` is not an object or undefined.
|
|
18
18
|
* @see https://decapcms.org/docs/manual-initialization/
|
|
19
|
+
* @see https://sveltiacms.app/en/docs/api/initialization
|
|
19
20
|
*/
|
|
20
21
|
export function init({ config }?: {
|
|
21
22
|
config?: CmsConfig;
|
|
@@ -30,6 +31,7 @@ export function init({ config }?: {
|
|
|
30
31
|
* @throws {TypeError} If `name` or `extension` is not a string, or if `methods` is not an object.
|
|
31
32
|
* @throws {Error} If at least one of `fromFile` or `toFile` is not provided.
|
|
32
33
|
* @see https://decapcms.org/docs/custom-formatters/
|
|
34
|
+
* @see https://sveltiacms.app/en/docs/api/file-formats
|
|
33
35
|
*/
|
|
34
36
|
declare function registerCustomFormat(name: string, extension: string, { fromFile, toFile }?: {
|
|
35
37
|
fromFile?: FileParser;
|
|
@@ -40,6 +42,7 @@ declare function registerCustomFormat(name: string, extension: string, { fromFil
|
|
|
40
42
|
* @param {EditorComponentDefinition} definition Component definition.
|
|
41
43
|
* @throws {TypeError} If `definition` is not an object, or if required properties are invalid.
|
|
42
44
|
* @see https://decapcms.org/docs/custom-widgets/#registereditorcomponent
|
|
45
|
+
* @see https://sveltiacms.app/en/docs/api/editor-components
|
|
43
46
|
*/
|
|
44
47
|
declare function registerEditorComponent(definition: EditorComponentDefinition): void;
|
|
45
48
|
/**
|
|
@@ -48,6 +51,7 @@ declare function registerEditorComponent(definition: EditorComponentDefinition):
|
|
|
48
51
|
* @throws {TypeError} If the event listener is not an object, or is missing required properties.
|
|
49
52
|
* @throws {RangeError} If the event listener name is not supported.
|
|
50
53
|
* @see https://decapcms.org/docs/registering-events/
|
|
54
|
+
* @see https://sveltiacms.app/en/docs/api/events
|
|
51
55
|
*/
|
|
52
56
|
declare function registerEventListener(eventListener: AppEventListener): void;
|
|
53
57
|
/**
|
|
@@ -57,6 +61,7 @@ declare function registerEventListener(eventListener: AppEventListener): void;
|
|
|
57
61
|
* @param {ComponentType<CustomFieldPreviewProps>} [preview] Component for the preview pane.
|
|
58
62
|
* @param {CustomFieldSchema} [schema] Field schema.
|
|
59
63
|
* @see https://decapcms.org/docs/custom-widgets/
|
|
64
|
+
* @see https://sveltiacms.app/en/docs/api/field-types
|
|
60
65
|
*/
|
|
61
66
|
declare function registerFieldType(name: string, control: ComponentType<CustomFieldControlProps> | string, preview?: ComponentType<CustomFieldPreviewProps>, schema?: CustomFieldSchema): void;
|
|
62
67
|
/**
|
|
@@ -66,6 +71,7 @@ declare function registerFieldType(name: string, control: ComponentType<CustomFi
|
|
|
66
71
|
* @param {boolean} [options.raw] Whether to use a CSS string.
|
|
67
72
|
* @throws {TypeError} If `style` is not a string, or `raw` is not a boolean.
|
|
68
73
|
* @see https://decapcms.org/docs/customization/#registerpreviewstyle
|
|
74
|
+
* @see https://sveltiacms.app/en/docs/api/preview-styles
|
|
69
75
|
*/
|
|
70
76
|
declare function registerPreviewStyle(style: string, { raw }?: {
|
|
71
77
|
raw?: boolean;
|
|
@@ -75,6 +81,7 @@ declare function registerPreviewStyle(style: string, { raw }?: {
|
|
|
75
81
|
* @param {string} name Template name.
|
|
76
82
|
* @param {ComponentType<CustomPreviewTemplateProps>} component React component.
|
|
77
83
|
* @see https://decapcms.org/docs/customization/#registerpreviewtemplate
|
|
84
|
+
* @see https://sveltiacms.app/en/docs/api/preview-templates
|
|
78
85
|
*/
|
|
79
86
|
declare function registerPreviewTemplate(name: string, component: ComponentType<CustomPreviewTemplateProps>): void;
|
|
80
87
|
import type { CmsConfig } from './types/public';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sveltia/cms",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.128.0",
|
|
4
4
|
"description": "Sveltia CMS is a modern, lightweight, Git-based headless content management system.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cms",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"license": "MIT",
|
|
14
14
|
"type": "module",
|
|
15
15
|
"devDependencies": {
|
|
16
|
-
"@types/react": "^19.2.
|
|
16
|
+
"@types/react": "^19.2.8",
|
|
17
17
|
"immutable": "^5.1.4"
|
|
18
18
|
},
|
|
19
19
|
"publishConfig": {
|