@sveltia/cms 0.19.5 → 0.19.7

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 (3) hide show
  1. package/README.md +62 -31
  2. package/dist/sveltia-cms.js +162 -162
  3. package/package.json +11 -11
package/README.md CHANGED
@@ -22,7 +22,7 @@ Our goal is to make it a viable successor to Netlify CMS, expand the Git-based h
22
22
 
23
23
  ## Features
24
24
 
25
- We are working hard to create a **much better alternative to Netlify CMS** and Decap CMS. Here’s what makes Sveltia CMS different. Look how serious we are!
25
+ We are working hard to create a **much better alternative to Netlify CMS** and Decap CMS by improving everything. Here’s what makes Sveltia CMS different. Look how serious we are!
26
26
 
27
27
  ### Compatible with Netlify/Decap CMS
28
28
 
@@ -32,7 +32,7 @@ We are working hard to create a **much better alternative to Netlify CMS** and D
32
32
 
33
33
  ### Better UX
34
34
 
35
- - Created and maintained by an [experienced UX engineer](https://github.com/kyoshino) who loves code and design. You can expect constant UX improvements across the platform.
35
+ - Created and maintained by an [experienced UX engineer](https://github.com/kyoshino) who loves code, design and marketing. You can expect constant UX improvements across the platform.
36
36
  - Offers a modern, intuitive user interface, including an immersive dark mode[^2], inspired in part by the Netlify CMS v3 prototype[^1].
37
37
  - Comes with touch device support. While the UI is not yet optimized for small screens, large tablets like iPad Pro or Pixel Tablet should work well.
38
38
  - Made with Svelte, not React, means we can spend more time on UX rather than tedious state management.
@@ -44,29 +44,30 @@ We are working hard to create a **much better alternative to Netlify CMS** and D
44
44
  - Built completely from scratch with Svelte instead of forking React-based Netlify/Decap CMS. The app starts fast and stays fast. The compiled code is vanilla JavaScript — you can use it with almost any framework.
45
45
  - Small footprint: The bundle size is less than 350 KB when minified and gzipped, compared to 1.5 MB of Netlify/Decap CMS. And [no virtual DOM overhead](https://svelte.dev/blog/virtual-dom-is-pure-overhead).
46
46
  - Uses the GraphQL API for GitHub and GitLab to quickly fetch content at once, so that entries and assets can be listed and searched instantly[^32]. It also avoids the slowness and potential API rate limit violations caused by hundreds of requests with Relation widgets[^14].
47
- - Saving entries and assets is also much faster thanks to the [GraphQL mutation](https://github.blog/changelog/2021-09-13-a-simpler-api-for-authoring-commits/).
47
+ - Saving entries and assets to GitHub is also much faster thanks to the [GraphQL mutation](https://github.blog/changelog/2021-09-13-a-simpler-api-for-authoring-commits/).
48
48
  - A list of repository files is cached locally for faster startup and bandwidth savings.
49
49
  - Thumbnails of assets, including PDF files, are generated and cached for faster rendering of the Asset Library and other parts of the CMS[^39].
50
50
  - Using caching and lazy loading techniques to improve performance.
51
- - You can [disable automatic deployments](#disable-automatic-deployments) by default or on demand to save costs and resources associated with CI/CD and to publish multiple changes at once[^24].
52
51
 
53
52
  ### Better productivity
54
53
 
55
- - You can [work with a local Git repository](#work-with-a-local-git-repository) without running a proxy server on your machine, bypassing the 30 MB file size limit[^26].
56
- - The Git branch name is automatically set to the repository’s default branch (`main`, `master` or whatever) if not specified in the configuration file, preventing data loading errors due to a hardcoded fallback to `master`[^27].
57
- - Never miss out on the latest features and bug fixes by being notified when an update to the CMS is available[^31].
54
+ - You can [work with a local Git repository](#work-with-a-local-git-repository) without any configuration or proxy server[^26].
55
+ - This allows you to bypass the 30 MB file size limit[^51].
56
+ - The `logo_url` defined in the configuration will be used[^49].
57
+ - Click once (the Save button) instead of twice (Publish > Publish now) to save an entry.
58
58
  - The Entry Editor closes automatically when an entry is saved.
59
+ - You can upload multiple assets at once. (See below)
59
60
  - You can delete multiple entries and assets at once.
60
61
  - Some keyboard shortcuts are available for faster editing. More to come!
61
62
  - Create a new entry: `Ctrl+E` (Windows/Linux) / `Command+E` (macOS)
62
63
  - Save an entry: `Ctrl+S` (Windows/Linux) / `Command+S` (macOS)
63
64
  - Search for entries and assets: `Ctrl+F` (Windows/Linux) / `Command+F` (macOS)
64
- - Solves various outstanding Netlify/Decap CMS bugs[^11].
65
+ - Never miss out on the latest features and bug fixes by being notified when an update to the CMS is available[^31].
65
66
 
66
67
  ### Better accessibility
67
68
 
68
69
  - Improved keyboard handling lets you efficiently navigate through UI elements using the Tab, Space, Enter and arrow keys[^17].
69
- - Comprehensive [WAI-ARIA](https://w3c.github.io/aria/) support empowers users who rely on screen readers such as NVDA or VoiceOver.
70
+ - Comprehensive [WAI-ARIA](https://w3c.github.io/aria/) support enables users who rely on screen readers such as NVDA and VoiceOver.
70
71
  - Ensures sufficient contrast between the foreground text and background colours.
71
72
  - Honours your operating system’s [reduced motion](https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-reduced-motion) and [reduced transparency](https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-reduced-transparency) settings.
72
73
  - We’ll continue to test and improve the application to meet [WCAG 2.2](https://w3c.github.io/wcag/guidelines/22/).
@@ -76,10 +77,17 @@ We are working hard to create a **much better alternative to Netlify CMS** and D
76
77
  - Avoids high/critical severity vulnerabilities through constant dependency updates and frequent releases[^34].
77
78
  - We have documented how to [set up a Content Security Policy](#set-up-content-security-policy) for the CMS.
78
79
  - The `unsafe-eval` or `unsafe-inline` keywords are not needed in the `script-src` CSP directive[^33].
80
+ - The `same-origin` referrer policy is automatically set with a `<meta>` tag.
81
+
82
+ ### Better backend support
83
+
84
+ - Uses the GraphQL API where possible for better performance, as mentioned above. You don’t need to set the `use_graphql` option to enable it for GitHub and GitLab.
85
+ - The Git branch name is automatically set to the repository’s default branch (`main`, `master` or whatever) if not specified in the configuration file, preventing data loading errors due to a hardcoded fallback to `master`[^27].
86
+ - You can [disable automatic deployments](#disable-automatic-deployments) by default or on demand to save costs and resources associated with CI/CD and to publish multiple changes at once[^24].
79
87
 
80
88
  ### Better i18n support
81
89
 
82
- - It’s now easier to switch between locales while editing with just a click on a button instead of a dropdown list.
90
+ - You can easily switch between locales while editing with just a click on a button instead of a dropdown list.
83
91
  - Fields in non-default locales are validated as expected[^13].
84
92
  - [Integrates DeepL](#use-deepl-to-translate-entry-fields) to allow translation of text fields from another locale with one click.
85
93
  - You can [disable non-default locale content](#disable-non-default-locale-content)[^15].
@@ -91,27 +99,38 @@ We are working hard to create a **much better alternative to Netlify CMS** and D
91
99
  ### Better collections
92
100
 
93
101
  - You can choose a [custom icon for each collection](#use-a-custom-icon-for-a-collection)[^3].
94
- - A [per-collection media folder](#use-a-custom-media-folder-for-a-collection) will appear next to the entries.
95
- - String values in YAML files can be quoted with the new `yaml_quote: true` option for a collection, mainly for framework compatibility[^9].
102
+ - Assets stored in a [per-collection media folder](#use-a-custom-media-folder-for-a-collection) can be displayed next to the entries.
96
103
  - Entry slug template tags support [filter transformations](https://decapcms.org/docs/summary-strings/) just like summary string template tags[^29].
97
104
  - You can set the maximum number of characters for an entry slug with the new `slug_length` collection option[^25].
98
105
 
99
106
  ### Better content editing
100
107
 
101
108
  - Required fields, not optional fields, are clearly marked for efficient data entry.
102
- - Leading and trailing spaces in text-type field values are automatically removed when you save the entry[^37].
103
109
  - You can revert changes to all fields or a specific field.
104
110
  - You can hide the preview of a specific field with `preview: false`.
105
111
  - Fields with validation errors are automatically expanded if they are part of nested, collapsed objects[^40].
106
112
  - When you click on a field in the Preview pane, the corresponding field in the Editor pane is highlighted. It will be automatically expanded if collapsed[^41].
107
113
 
114
+ ### Better data output
115
+
116
+ - For data consistency, Boolean, List (see below) and other fields are always saved as a proper value, such as an empty string or an empty array, rather than nothing, even if it’s optional or empty.
117
+ - Leading and trailing spaces in text-type field values are automatically removed when you save an entry[^37].
118
+ - JSON/TOML/YAML data is saved with a new line at the end of the file to prevent unnecessary changes being made to the file[^11].
119
+ - String values in YAML files can be quoted with the new `yaml_quote: true` option for a collection, mainly for framework compatibility[^9].
120
+
108
121
  ### Better widgets
109
122
 
123
+ - Boolean
124
+ - A required Boolean field with no default value is saved as `false` by default, without raising a confusing validation error[^45].
125
+ - An optional Boolean field with no default value is also saved as `false` by default, rather than nothing[^46].
110
126
  - List
111
- - Supports previewing variable types without having to register a preview template[^42].
127
+ - A required List field with no subfield or value is marked as invalid[^43].
128
+ - An optional List field with no subfield or value is saved as an empty array, rather than nothing[^44].
129
+ - You can enter spaces in a simple text-based List field[^50].
130
+ - You can preview variable types without having to register a preview template[^42].
112
131
  - Object
113
132
  - Supports [variable types](https://decapcms.org/docs/variable-type-widgets/) just like the List widget. This allows you to have dependent fields in a collection[^30].
114
- - Optional Object fields (`required: false`) can be manually added or removed. If unadded or removed, the required subfields won’t trigger validation errors[^16].
133
+ - An optional Object field can be manually added or removed. If unadded or removed, the required subfields won’t trigger validation errors[^16].
115
134
  - Relation
116
135
  - Field options are displayed with no additional API requests[^14]. The `options_length` property is therefore ignored.
117
136
  - String
@@ -123,10 +142,12 @@ We are working hard to create a **much better alternative to Netlify CMS** and D
123
142
  - The `summary` is displayed correctly when it refers to a Relation field[^36].
124
143
  - File and Image
125
144
  - Provides a reimagined all-in-one asset selection dialog for File and Image fields.
126
- - [Collection-specific assets](#use-a-custom-media-folder-for-a-collection) will be listed first for easy selection, while all assets can also be displayed in a separate tab[^19].
127
- - New assets can be uploaded by dragging & dropping them into the dialog[^20].
145
+ - [Collection-specific assets](#use-a-custom-media-folder-for-a-collection) are listed for easy selection, while all assets are displayed in a separate tab[^19].
146
+ - A new asset can be uploaded by dragging & dropping it into the dialog[^20].
128
147
  - A URL can also be entered in the dialog.
129
- - Integration with Pexels, Pixabay and Unsplash makes it easy to select and insert free stock photos[^8].
148
+ - Integration with Pexels, Pixabay and Unsplash makes it easy to select and insert a free stock photo[^8].
149
+ - String, Text and Markdown
150
+ - A required field containing only spaces or line breaks will result in a validation error, as if no characters were entered.
130
151
  - New widgets
131
152
  - In addition to [generating UUIDs for entry slugs](#use-a-random-id-for-an-entry-slug), Sveltia CMS also supports the proposed `uuid` widget with the following properties[^12]:
132
153
  - `prefix`: A string to be prepended to the value. Default: an empty string.
@@ -138,17 +159,20 @@ We are working hard to create a **much better alternative to Netlify CMS** and D
138
159
 
139
160
  - A completely new Asset Library, built separately from the image selection dialog, makes it easy to manage all of your files, including images, videos and documents.
140
161
  - Navigate between the global media folder and per-collection media folders[^6].
141
- - Preview image, audio, video, text and PDF files. Check your site’s [CSP](#set-up-content-security-policy) if the preview doesn’t work.
162
+ - Preview image, audio, video, text and PDF files.
163
+ - Check your site’s [CSP](#set-up-content-security-policy) if the preview doesn’t work.
142
164
  - Copy the public URL, file path, text data or image data of a selected asset to clipboard.
165
+ - The file path starts with `/` as expected[^48].
143
166
  - Edit plaintext assets, including SVG images.
144
167
  - Replace existing assets.
145
168
  - Download one or more selected assets at once.
146
169
  - Delete one or more selected assets at once.
147
170
  - Upload multiple assets at once, including files in nested folders, by browsing or dragging and dropping them into the library[^5].
148
171
  - Sort or filter assets by name or file type.
149
- - View asset details, including size, dimensions, and a list of entries that use the selected asset.
172
+ - View asset details, including size, dimensions, commit author/date and a list of entries that use the selected asset.
150
173
  - PDF documents are displayed with a thumbnail image in both the Asset Library and the Select File dialog, making it easier to find the file you’re looking for[^38].
151
174
  - Assets stored in an entry-relative media folder are automatically deleted when the associated entry is deleted because these assets are not available for other entries[^22].
175
+ - Hidden files (dot files) don’t appear in the Asset Library[^47].
152
176
 
153
177
  ## Compatibility
154
178
 
@@ -157,12 +181,10 @@ While it’s not our goal to recreate all the features found in Netlify/Decap CM
157
181
  | Feature | Status in Sveltia CMS |
158
182
  | --- | --- |
159
183
  | Installation | Installing with `npm` is not supported yet. |
160
- | Backends | Only the GitHub and GitLab backends are available, with GraphQL enabled by default. We’ll add the Test backend for our demo site, but Azure, Bitbucket and Gitea are unlikely to be supported due to performance limitations. Git Gateway will not be supported for the same reason; we may implement a performant alternative sometime later. |
161
- | Local Git Repository | Supported using a different approach. [See below](#work-with-a-local-git-repository) for details. |
162
- | UI Locales | Only English and Japanese are available at this time. No registration is required. The locale is selected automatically and can be changed in the Settings. |
163
- | Media Libraries | External media storage services are not supported yet. We will add support for Cloudinary and Uploadcare using the APIs instead of pre-built widgets. No support for deprecated Netlify Large Media. |
164
- | Editorial Workflow | Not supported yet. |
165
- | Open Authoring | Not supported yet. |
184
+ | Backends | Only the GitHub and GitLab backends are available. We’ll add the Test backend for our demo site, but Azure, Bitbucket and Gitea are unlikely to be supported due to performance limitations. Git Gateway will not be supported for the same reason; we may implement a performant alternative sometime later. |
185
+ | UI Locales | Only English and Japanese are available at this time. |
186
+ | Media Libraries | External media storage services are not supported yet. We will add support for Cloudinary and Uploadcare soon. We will not support deprecated Netlify Large Media. |
187
+ | Workflow | Editorial Workflow and Open Authoring are not supported yet. |
166
188
  | Collections | Nested collections are not supported yet. |
167
189
  | Widgets | Custom widgets are not supported yet. [See below](#widget-limitations) for other limitations. |
168
190
  | Customizations | Custom previews, custom formatters, manual initialization and event subscriptions are not supported yet. |
@@ -172,7 +194,7 @@ While it’s not our goal to recreate all the features found in Netlify/Decap CM
172
194
  | Widget | Status in Sveltia CMS |
173
195
  | --- | --- |
174
196
  | Code | Not supported yet. |
175
- | Date | Sveltia CMS has dropped the support for it following Decap CMS 3.0. Use the DateTime widget instead. |
197
+ | Date | Sveltia CMS has dropped the support for the deprecated widget following Decap CMS 3.0. Use the DateTime widget instead. |
176
198
  | DateTime | The `date_format` and `time_format` options with Moment.js tokens are not supported yet. Note: Decap CMS 3.1 has replaced Moment.js with [Day.js](https://day.js.org/); we’ll follow the change soon. |
177
199
  | File/Image | Field-specific media folders and media library options are not supported yet other than `media_library.config.max_file_size` for the default media library. |
178
200
  | Map | Not supported yet. |
@@ -394,14 +416,14 @@ img-src 'self' blob: data:;
394
416
  media-src blob:;
395
417
  frame-src blob:;
396
418
  script-src 'self' https://unpkg.com;
397
- connect-src 'self' blob: data:;
419
+ connect-src 'self' blob: data: https://unpkg.com;
398
420
  ```
399
421
 
400
422
  And combine the following policies depending on your Git backend and enabled integrations.
401
423
 
402
424
  - GitHub: (If you’re running GitHub Enterprise Server, you’ll also need to add the origin to these directives.)
403
425
  ```csp
404
- img-src https://*.githubusercontent.com
426
+ img-src https://*.githubusercontent.com;
405
427
  connect-src https://api.github.com https://www.githubstatus.com;
406
428
  ```
407
429
  - GitLab: (If you’re running a self-hosted instance, you’ll also need to add the origin to these directives.)
@@ -493,7 +515,7 @@ This software is provided “as is” without any express or implied warranty. W
493
515
  [^8]: Netlify/Decap CMS [#2579](https://github.com/decaporg/decap-cms/issues/2579)
494
516
  [^9]: Netlify/Decap CMS [#3505](https://github.com/decaporg/decap-cms/issues/3505)
495
517
  [^10]: Netlify/Decap CMS [#341](https://github.com/decaporg/decap-cms/issues/341), [#1167](https://github.com/decaporg/decap-cms/issues/1167)
496
- [^11]: Netlify/Decap CMS [#1382](https://github.com/decaporg/decap-cms/issues/1382), [#1424](https://github.com/decaporg/decap-cms/issues/1424), [#2370](https://github.com/decaporg/decap-cms/issues/2370), [#5569](https://github.com/decaporg/decap-cms/issues/5569), [#5596](https://github.com/decaporg/decap-cms/issues/5596), [#5752](https://github.com/decaporg/decap-cms/issues/5752), [#6994](https://github.com/decaporg/decap-cms/issues/6994) and more. We’ll be updating this list after reviewing their issue list.
518
+ [^11]: Netlify/Decap CMS [#1382](https://github.com/decaporg/decap-cms/issues/1382), [#6994](https://github.com/decaporg/decap-cms/issues/6994)
497
519
  [^12]: Netlify/Decap CMS [#1975](https://github.com/decaporg/decap-cms/issues/1975)
498
520
  [^13]: Netlify/Decap CMS [#5112](https://github.com/decaporg/decap-cms/issues/5112), [#5653](https://github.com/decaporg/decap-cms/issues/5653)
499
521
  [^14]: Netlify/Decap CMS [#4635](https://github.com/decaporg/decap-cms/issues/4635), [#4738](https://github.com/decaporg/decap-cms/issues/4738), [#5920](https://github.com/decaporg/decap-cms/issues/5920), [#6410](https://github.com/decaporg/decap-cms/issues/6410)
@@ -508,7 +530,7 @@ This software is provided “as is” without any express or implied warranty. W
508
530
  [^23]: Netlify/Decap CMS [#2](https://github.com/decaporg/decap-cms/issues/2)
509
531
  [^24]: Netlify/Decap CMS [#6831](https://github.com/decaporg/decap-cms/issues/6831)
510
532
  [^25]: Netlify/Decap CMS [#526](https://github.com/decaporg/decap-cms/issues/526), [#6987](https://github.com/decaporg/decap-cms/issues/6987)
511
- [^26]: Netlify/Decap CMS [#3285](https://github.com/decaporg/decap-cms/issues/3285), [#6731](https://github.com/decaporg/decap-cms/issues/6731)
533
+ [^26]: Netlify/Decap CMS [#3285](https://github.com/decaporg/decap-cms/issues/3285)
512
534
  [^27]: Netlify/Decap CMS [#3285](https://github.com/decaporg/decap-cms/issues/5617)
513
535
  [^28]: Netlify/Decap CMS [#6836](https://github.com/decaporg/decap-cms/pull/6836)
514
536
  [^29]: Netlify/Decap CMS [#4783](https://github.com/decaporg/decap-cms/issues/4783)
@@ -525,3 +547,12 @@ This software is provided “as is” without any express or implied warranty. W
525
547
  [^40]: Netlify/Decap CMS [#5630](https://github.com/decaporg/decap-cms/issues/5630)
526
548
  [^41]: Netlify/Decap CMS [#7011](https://github.com/decaporg/decap-cms/issues/7011)
527
549
  [^42]: Netlify/Decap CMS [#2307](https://github.com/decaporg/decap-cms/issues/2307)
550
+ [^43]: Netlify/Decap CMS [#5381](https://github.com/decaporg/decap-cms/issues/5381)
551
+ [^44]: Netlify/Decap CMS [#2613](https://github.com/decaporg/decap-cms/issues/2613)
552
+ [^45]: Netlify/Decap CMS [#1424](https://github.com/decaporg/decap-cms/issues/1424)
553
+ [^46]: Netlify/Decap CMS [#4726](https://github.com/decaporg/decap-cms/issues/4726)
554
+ [^47]: Netlify/Decap CMS [#2370](https://github.com/decaporg/decap-cms/issues/2370), [#5596](https://github.com/decaporg/decap-cms/issues/5596)
555
+ [^48]: Netlify/Decap CMS [#5569](https://github.com/decaporg/decap-cms/issues/5569)
556
+ [^49]: Netlify/Decap CMS [#5752](https://github.com/decaporg/decap-cms/issues/5752)
557
+ [^50]: Netlify/Decap CMS [#4646](https://github.com/decaporg/decap-cms/issues/4646)
558
+ [^51]: Netlify/Decap CMS [#6731](https://github.com/decaporg/decap-cms/issues/6731)