@sveltia/cms 0.21.0 → 0.21.2

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/README.md CHANGED
@@ -24,17 +24,17 @@ Our goal is to make it a viable successor to Netlify CMS, expand the Git-based h
24
24
 
25
25
  **Sveltia CMS is still in beta**, so please be careful when trying it out.
26
26
 
27
- While we are fixing reported bugs as fast as we can, the overall progress may be slower than you think. The thing is, it’s not just a personal project of [@kyoshino](https://github.com/kyoshino), but also involves different kinds of activities:
27
+ While we are fixing reported bugs as fast as we can, usually within 48 hours, the overall progress may be slower than you think. The thing is, it’s not just a personal project of [@kyoshino](https://github.com/kyoshino), but also involves different kinds of activities:
28
28
 
29
29
  - Ensuring maximum compatibility with existing versions of Netlify/Decap CMS
30
30
  - Tackling as many [issues reported to Netlify/Decap CMS](https://github.com/decaporg/decap-cms/issues) as possible (so far 75+ of them have been effectively solved in Sveltia CMS, with the goal of reaching 100 by GA)
31
31
  - Implementing our own enhancement ideas
32
32
 
33
- At this point **we hope to ship version 1.0 in Q3 2024**. Check our [release notes](https://github.com/sveltia/sveltia-cms/releases) for updates!
33
+ At this point **we hope to ship version 1.0 in Q3 2024**. Check our [release notes](https://github.com/sveltia/sveltia-cms/releases) for updates.
34
34
 
35
35
  ## Features
36
36
 
37
- 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!
37
+ We are working hard to create a **significantly better alternative to Netlify CMS** and Decap CMS by improving everything. Here’s what makes Sveltia CMS different. Look how serious we are!
38
38
 
39
39
  ### Compatible with Netlify/Decap CMS
40
40
 
@@ -57,9 +57,9 @@ We are working hard to create a **much better alternative to Netlify CMS** and D
57
57
  - Small footprint: The bundle size is less than 500 KB when minified and gzipped, which is much lighter than bloated Netlify CMS (1.5 MB) and Decap CMS (1.8 MB)[^57]. Sveltia CMS is free of technical debt and [virtual DOM overhead](https://svelte.dev/blog/virtual-dom-is-pure-overhead).
58
58
  - 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].
59
59
  - 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/).
60
- - A list of repository files is cached locally for faster startup and bandwidth savings.
60
+ - Using caching and lazy loading techniques. A list of repository files is stored locally for faster startup and bandwidth savings.
61
61
  - Thumbnails of assets, including PDF files, are generated and cached for faster rendering of the Asset Library and other parts of the CMS[^39].
62
- - Using caching and lazy loading techniques to improve performance.
62
+ - The upcoming [Svelte 5](https://svelte.dev/blog/runes) upgrade is anticipated to deliver a further boost in performance, including accelerated speed and reduced code size.
63
63
 
64
64
  ### Better productivity
65
65
 
@@ -100,10 +100,11 @@ We are working hard to create a **much better alternative to Netlify CMS** and D
100
100
  - 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.
101
101
  - 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].
102
102
  - You can [disable automatic deployments](#disabling-automatic-deployments) by default or on demand to save costs and resources associated with CI/CD and to publish multiple changes at once[^24].
103
- - The GitLab backend comes with background service status checking, just like GitHub.
103
+ - The GitLab backend support comes with background service status checking, just like GitHub.
104
104
 
105
105
  ### Better i18n support
106
106
 
107
+ - Sveltia CMS has been built with a multilingual architecture from the very beginning. You can expect top-notch i18n support, as it’s required by clients of maintainer [@kyoshino](https://github.com/kyoshino), who himself was a long-time Japanese localizer for Mozilla.
107
108
  - You can easily switch between locales while editing with just a click on a button instead of a dropdown list.
108
109
  - Fields in non-default locales are validated as expected[^13].
109
110
  - Boolean, DateTime, List and Number fields in the entry preview are displayed in a localized format.
@@ -111,7 +112,7 @@ We are working hard to create a **much better alternative to Netlify CMS** and D
111
112
  - You can [disable non-default locale content](#disabling-non-default-locale-content)[^15].
112
113
  - You can [use a random UUID for an entry slug](#using-a-random-id-for-an-entry-slug), which is a good option for locales that write in non-Latin characters.
113
114
  - Removes the [limitations in the List and Object widgets](https://decapcms.org/docs/i18n/#limitations) so that changes made with these widgets will be duplicated between locales as expected when using the `i18n: duplicate` field configuration[^7].
114
- - Raises a validation error instead of an internal error if the `single_file` structure is used and a required field is not filled in any of the locales[^55].
115
+ - Raises a validation error instead of failing silently if the `single_file` structure is used and a required field is not filled in any of the locales[^55].
115
116
  - [Entry-relative media folders](https://decapcms.org/docs/collection-folder/#media-and-public-folder) can be used in conjunction with the `multiple_folders` i18n structure[^21].
116
117
  - Boolean fields are updated in real time between locales like other widgets to avoid confusion[^35].
117
118
  - Solves problems with Chinese, Japanese and Korean (CJK) [IME](https://en.wikipedia.org/wiki/Input_method) text input in the rich text editor for the Markdown widget[^54].
@@ -131,6 +132,7 @@ We are working hard to create a **much better alternative to Netlify CMS** and D
131
132
  - You can hide the preview of a specific field with `preview: false`.
132
133
  - Fields with validation errors are automatically expanded if they are part of nested, collapsed objects[^40].
133
134
  - 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].
135
+ - A long validation error message is displayed in full, without being hidden behind the field label[^59].
134
136
 
135
137
  ### Better data output
136
138
 
@@ -149,6 +151,9 @@ We are working hard to create a **much better alternative to Netlify CMS** and D
149
151
  - An optional List field with no subfield or value is saved as an empty array, rather than nothing[^44].
150
152
  - You can enter spaces in a simple text-based List field[^50].
151
153
  - You can preview variable types without having to register a preview template[^42].
154
+ - Markdown
155
+ - The rich text editor is built with [Lexical](https://github.com/facebook/lexical) instead of [Slate](https://github.com/ianstormtaylor/slate), which solves several problems found in Netlify/Decap CMS, including fatal application crashes[^53].
156
+ - You can set the default editor mode by changing the order of the `modes` option[^58]. If you want to use the plain text editor by default, add `modes: [raw, rich_text]` to the field configuration.
152
157
  - Object
153
158
  - 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].
154
159
  - An optional Object field can be manually added or removed. If unadded or removed, the required subfields won’t trigger validation errors[^16].
@@ -159,18 +164,16 @@ We are working hard to create a **much better alternative to Netlify CMS** and D
159
164
  - String
160
165
  - Supports the `type` property that accepts `url` or `email` as a value, which will validate the value as a URL or email.
161
166
  - Supports the `prefix` and `suffix` string properties, which automatically prepend and/or append the developer-defined value to the user-input value.
162
- - Markdown
163
- - The rich text editor is built with [Lexical](https://github.com/facebook/lexical) instead of [Slate](https://github.com/ianstormtaylor/slate), which solves several problems found in Netlify/Decap CMS, including fatal application crashes[^53].
164
167
  - Boolean, Number and String
165
168
  - Supports the `before_input` and `after_input` string properties, which allow developers to display custom labels before and/or after the input UI[^28]. Markdown is supported in the value.
166
- - List and Object
167
- - The `summary` is displayed correctly when it refers to a Relation field[^36].
168
169
  - File and Image
169
170
  - Provides a reimagined all-in-one asset selection dialog for File and Image fields.
170
171
  - [Collection-specific assets](#using-a-custom-media-folder-for-a-collection) are listed for easy selection, while all assets are displayed in a separate tab[^19].
171
172
  - A new asset can be uploaded by dragging & dropping it into the dialog[^20].
172
173
  - A URL can also be entered in the dialog.
173
174
  - Integration with Pexels, Pixabay and Unsplash makes it easy to select and insert a free stock photo[^8]. More services will be added later.
175
+ - List and Object
176
+ - The `summary` is displayed correctly when it refers to a Relation field[^36].
174
177
  - String, Text and Markdown
175
178
  - A required field containing only spaces or line breaks will result in a validation error, as if no characters were entered.
176
179
  - New widgets
@@ -201,37 +204,47 @@ We are working hard to create a **much better alternative to Netlify CMS** and D
201
204
 
202
205
  ## Compatibility
203
206
 
204
- We are trying to make Sveltia CMS as compatible as possible with Netlify/Decap CMS before the 1.0 release, so that more users can seamlessly switch to our modern, powerful alternative. However, some features will be omitted due to performance and other factors. The table below shows the current limitations of Sveltia CMS:
207
+ We are trying to make Sveltia CMS as compatible as possible with Netlify/Decap CMS, so that more users can seamlessly switch to our modern, powerful alternative. However, some features will be omitted due to deprecations and other factors.
208
+
209
+ ### Current limitations
210
+
211
+ The table below shows the current limitations of Sveltia CMS, that are expected to be resolved before GA:
205
212
 
206
213
  | Feature | Status in Sveltia CMS |
207
214
  | --- | --- |
208
- | 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. Netlify Git Gateway will not be supported for the same reason; we may implement a performant alternative sometime later. |
209
- | Configuration | UI Locales are currently only available in English and Japanese. Comprehensive config validation is not yet implemented. |
210
- | Media Libraries | We will add support for Cloudinary and Uploadcare soon. Deprecated Netlify Large Media will not be supported. |
215
+ | Backends | Only GitHub and GitLab are available. We’ll add the Test backend for our demo site and see if Azure can also be supported. |
216
+ | Configuration | UI Locales are only available in English and Japanese. Comprehensive config validation is not yet implemented. |
217
+ | Media Libraries | Cloudinary and Uploadcare are not yet supported. |
211
218
  | Workflow | Editorial Workflow and Open Authoring are not yet supported. |
212
219
  | Content Editor | Auto-saving a draft entry is not yet implemented. |
213
220
  | Collections | Nested collections are not yet supported. |
214
- | Widgets | Custom widgets are not yet supported. [See below](#widget-limitations) for other limitations. |
221
+ | Widgets | Custom widgets are not yet supported. See the table below for other limitations. |
215
222
  | Customizations | Custom previews, custom formatters and event subscriptions are not yet supported. |
216
223
 
217
- ### Widget limitations
218
-
219
224
  | Widget | Status in Sveltia CMS |
220
225
  | --- | --- |
221
226
  | Code | Not yet supported. |
222
- | Date | Sveltia CMS has dropped the support for the deprecated widget following Decap CMS 3.0. Use the DateTime widget instead. |
223
227
  | DateTime | The `date_format` and `time_format` options with Moment.js tokens are not yet supported. Note: Decap CMS 3.1 has replaced Moment.js with [Day.js](https://day.js.org/); we’ll follow the change soon. |
224
228
  | File/Image | Field-specific media folders and media library options are not yet supported other than `media_library.config.max_file_size` for the default media library. |
225
229
  | Map | Not yet supported. |
226
- | Markdown | Editor components are not yet supported. Remark plugins will not be supported as they are not compatible with our Lexical-based rich text editor. |
230
+ | Markdown | Editor components are not yet supported. |
231
+
232
+ ### Features not to be implemented
233
+
234
+ - The deprecated client-side implicit grant for the GitLab backend will not be supported, as it has already been [removed from GitLab 15.0](https://gitlab.com/gitlab-org/gitlab/-/issues/344609). Use the client-side PKCE authorization instead.
235
+ - The Bitbucket, Gitea/Forgejo and Git Gateway backends will not be supported due to performance limitations. We may implement a performant Git Gateway alternative in the future.
236
+ - The Netlify Identity Widget will not be supported as it’s not useful without Git Gateway.
237
+ - The deprecated Netlify Large Media service will not be supported. Consider other storage providers.
238
+ - Sveltia CMS has dropped the support for the deprecated Date widget following Decap CMS 3.0. Use the DateTime widget instead.
239
+ - Remark plugins will not be supported as they are not compatible with our Lexical-based rich text editor.
227
240
 
228
241
  ## Roadmap
229
242
 
230
243
  ### Before the 1.0 release
231
244
 
245
+ - Enhanced compatibility with Netlify/Decap CMS (see above for the status)
246
+ - Automation test coverage (Vitest + Playwright)
232
247
  - [Svelte 5](https://svelte.dev/blog/runes) migration
233
- - Automation test coverage
234
- - Further Netlify/Decap CMS compatibility, including Editorial Workflow
235
248
  - Localization
236
249
  - Documentation
237
250
  - Marketing site
@@ -283,11 +296,13 @@ That’s it! You can open `https://[hostname]/admin/` as before to start editing
283
296
 
284
297
  That said, we strongly recommend testing your new Sveltia CMS instance first on your local machine. [See below](#working-with-a-local-git-repository) for how.
285
298
 
286
- For advanced users, we have also made the bundle available as an [npm package](https://www.npmjs.com/package/@sveltia/cms). You can install it by running `npm i @sveltia/cms` or `pnpm add @sveltia/cms` on your project. The [manual initialization](https://decapcms.org/docs/manual-initialization/) flow with the `init` method is the same as for Netlify/Decap CMS. Make sure to keep the dependency up to date!
299
+ For advanced users, we have also made the bundle available as an [npm package](https://www.npmjs.com/package/@sveltia/cms). You can install it by running `npm i @sveltia/cms` or `pnpm add @sveltia/cms` on your project. The [manual initialization](https://decapcms.org/docs/manual-initialization/) flow with the `init` method is the same as for Netlify/Decap CMS.
287
300
 
288
301
  ### Updates
289
302
 
290
- Updating Sveltia CMS is transparent, unless you include a specific version in the `<script>` source URL. Whenever you (re)load the CMS, the latest version will be served via [UNPKG](https://unpkg.com/). The CMS also periodically checks for updates and notifies you when a new version is available. After the product reaches GA, you could use a semantic version range (`^1.0.0`) like Netlify/Decap CMS.
303
+ Updating Sveltia CMS is transparent, unless you include a specific version in the `<script>` source URL or use the npm package. Whenever you (re)load the CMS, the latest version will be served via [UNPKG](https://unpkg.com/). The CMS also periodically checks for updates and notifies you when a new version is available. After the product reaches GA, you could use a semantic version range (`^1.0.0`) like Netlify/Decap CMS.
304
+
305
+ If you’ve chosen to install with npm, updating the package is your responsibility. We recommend using [`ncu`](https://www.npmjs.com/package/npm-check-updates) to keep dependencies up to date, otherwise you’ll miss important bug fixes and new features.
291
306
 
292
307
  ## Tips & tricks
293
308
 
@@ -297,7 +312,7 @@ You can host your Sveltia CMS-managed site anywhere, such as [Cloudflare Pages](
297
312
 
298
313
  ### Working with a local Git repository
299
314
 
300
- You can use Sveltia CMS with a local Git repository like [Netlify/Decap CMS](https://decapcms.org/docs/working-with-a-local-git-repository/), but Sveltia CMS has simplified the workflow by removing the need for additional configuration (the `local_backend` property) and proxy server, thanks to the [File System Access API](https://developer.chrome.com/articles/file-system-access/) available in [some modern browsers](https://developer.mozilla.org/en-US/docs/web/api/window/showopenfilepicker#browser_compatibility).
315
+ You can use Sveltia CMS with a local Git repository like [Netlify/Decap CMS](https://decapcms.org/docs/working-with-a-local-git-repository/), but Sveltia CMS has simplified the workflow by removing the need for additional configuration (the `local_backend` property) and a proxy server, thanks to the [File System Access API](https://developer.chrome.com/articles/file-system-access/) available in [some modern browsers](https://developer.mozilla.org/en-US/docs/web/api/window/showopenfilepicker#browser_compatibility).
301
316
 
302
317
  1. Launch the local development server for your frontend framework, typically with `npm run dev` or `pnpm dev`.
303
318
  1. Visit `http://localhost:[port]/admin/index.html` with Chrome or Edge. The port number varies by framework.
@@ -507,6 +522,8 @@ Want to build a website with Sveltia CMS? Maintainer [@kyoshino](https://github.
507
522
 
508
523
  Since Sveltia CMS is still in beta, we expect various problems. Please [report any bugs to us](https://github.com/sveltia/sveltia-cms/issues/new) so we can make it better for everyone. Feel free to submit feature requests as well. Meanwhile, pull requests may not be accepted for the time being due to limited review resources and the upcoming Svelte 5 migration. As we get closer to the 1.0 release, we’ll be welcoming [localizers](https://github.com/sveltia/sveltia-cms/blob/main/src/lib/locales/README.md).
509
524
 
525
+ Tips are always welcome! The project hasn’t set up a sponsorship program, but maintainer [@kyoshino](https://github.com/kyoshino) has a [PayPal account](https://paypal.me/kohei).
526
+
510
527
  ## Related links
511
528
 
512
529
  - Introducing Sveltia CMS: a short technical presentation by [@kyoshino](https://github.com/kyoshino) during the _This Week in Svelte_ online meetup on March 31, 2023 — [recording](https://youtu.be/-YjLubiieYs?t=1660) & [slides](https://docs.google.com/presentation/d/1Wi4ty-1AwOp2-zy7LctmzCV4rrdYPfke9NGhO0DdRdM)
@@ -577,3 +594,5 @@ This software is provided “as is” without any express or implied warranty. W
577
594
  [^55]: Netlify/Decap CMS [#4480](https://github.com/decaporg/decap-cms/issues/4480), [#6353](https://github.com/decaporg/decap-cms/issues/6353)
578
595
  [^56]: Netlify/Decap CMS [#6515](https://github.com/decaporg/decap-cms/issues/6515)
579
596
  [^57]: Netlify/Decap CMS [#328](https://github.com/decaporg/decap-cms/issues/328), [#3853](https://github.com/decaporg/decap-cms/issues/3853)
597
+ [^58]: Netlify/Decap CMS [#5125](https://github.com/decaporg/decap-cms/issues/5125)
598
+ [^59]: Netlify/Decap CMS [#1654](https://github.com/decaporg/decap-cms/issues/1654)