@xleddyl/nuxt-cms 0.10.0 → 0.10.1

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/module.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@xleddyl/nuxt-cms",
3
3
  "configKey": "cms",
4
- "version": "0.10.0",
4
+ "version": "0.10.1",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",
7
7
  "unbuild": "unknown"
@@ -221,8 +221,7 @@
221
221
  <KFormField
222
222
  :name="editorFieldName(blockKey)"
223
223
  :label="editorBlock.fields[blockKey].label"
224
- :description="editorBlock.fields[blockKey].description"
225
- :icon="cmsIcon(fieldIcon(editorBlock.fields[blockKey]))"
224
+ :help="editorBlock.fields[blockKey].description"
226
225
  :required="editorBlock.fields[blockKey].required"
227
226
  >
228
227
  <CmsFieldInput
@@ -357,7 +356,7 @@ import { useCmsRuntime } from "../../composables/cms-runtime";
357
356
  import { useCmsOverlayFlag } from "../../composables/cms-route";
358
357
  import { CMS_BLOCK_EDITOR, CmsBlockEditorProvider } from "../../utils/block-editor";
359
358
  import { clipboardTarget } from "../../utils/keyboard";
360
- import { cmsIcon, fieldIcon } from "../../utils/ui";
359
+ import { cmsIcon } from "../../utils/ui";
361
360
  const props = defineProps({
362
361
  field: { type: Object, required: true },
363
362
  locale: { type: String, required: false },
@@ -13,8 +13,7 @@
13
13
  <KFormField
14
14
  :name="key"
15
15
  :label="fields[key].label"
16
- :description="fields[key].description"
17
- :icon="cmsIcon(fieldIcon(fields[key]))"
16
+ :help="fields[key].description"
18
17
  :required="fields[key].required"
19
18
  :disabled="locked.includes(key) || void 0"
20
19
  :highlight="highlighted === key"
@@ -68,7 +67,7 @@ import { useCmsEntryForm } from "../../composables/cms-entry-form";
68
67
  import { useCmsPageQuery } from "../../composables/cms-route";
69
68
  import { useCmsRuntime } from "../../composables/cms-runtime";
70
69
  import { entryFormLayout, useCmsSettingsState } from "../../composables/cms-settings";
71
- import { cmsIcon, fieldIcon } from "../../utils/ui";
70
+ import { cmsIcon } from "../../utils/ui";
72
71
  const props = defineProps({
73
72
  fields: { type: Object, required: true },
74
73
  tabs: { type: Array, required: false },
@@ -20,11 +20,6 @@ const props = defineProps({
20
20
  });
21
21
  const model = defineModel({ type: String, ...{ required: true } });
22
22
  const { i18n } = useCmsRuntime();
23
- function stateOf(locale) {
24
- const progress = props.progress?.[locale];
25
- if (locale === i18n.defaultLocale || !progress?.total) return null;
26
- return progress.state;
27
- }
28
23
  function titleOf(locale) {
29
24
  const progress = props.progress?.[locale];
30
25
  if (!progress) return void 0;
@@ -34,23 +29,12 @@ function titleOf(locale) {
34
29
  if (!progress.total) return progress.values ? void 0 : `${locale}: empty`;
35
30
  return `${locale}: ${translationSummary(progress)}`;
36
31
  }
37
- const DOT_TONES = {
38
- complete: "success",
39
- partial: "warning",
40
- missing: "danger"
41
- };
42
32
  const options = computed(
43
- () => i18n.locales.map((locale) => {
44
- const state = stateOf(locale);
45
- return {
46
- value: locale,
47
- label: locale,
48
- title: titleOf(locale),
49
- muted: !!props.progress && !props.progress[locale]?.values,
50
- dot: !!state,
51
- dotTone: state ? DOT_TONES[state] : void 0,
52
- dotLabel: state ? titleOf(locale) : void 0
53
- };
54
- })
33
+ () => i18n.locales.map((locale) => ({
34
+ value: locale,
35
+ label: locale,
36
+ title: titleOf(locale),
37
+ muted: !!props.progress && !props.progress[locale]?.values
38
+ }))
55
39
  );
56
40
  </script>
@@ -3,9 +3,7 @@
3
3
  <KBadge
4
4
  :label="ENTRY_SETTINGS_STATUS_LABELS[status]"
5
5
  :tone="STATUS_TONES[status]"
6
- :pulse="status === 'saving'"
7
6
  variant="outline"
8
- dot
9
7
  aria-live="polite"
10
8
  />
11
9
  <KButton
@@ -22,7 +22,7 @@
22
22
  <KFormField
23
23
  label="Title template"
24
24
  name="titleTemplate"
25
- :description="`${TITLE_PLACEHOLDER} is the page title, ${SITE_NAME_PLACEHOLDER} the site name.`"
25
+ :help="`${TITLE_PLACEHOLDER} is the page title, ${SITE_NAME_PLACEHOLDER} the site name.`"
26
26
  >
27
27
  <KInput v-model="titleTemplate" :placeholder="DEFAULT_TITLE_TEMPLATE" />
28
28
  </KFormField>
@@ -4,7 +4,6 @@
4
4
  :label="scheduled ? 'Scheduled' : published ? 'Published' : 'Draft'"
5
5
  :tone="scheduled ? 'warning' : published ? 'success' : 'neutral'"
6
6
  :variant="scheduled || published ? 'soft' : 'outline'"
7
- dot
8
7
  />
9
8
  </KTooltip>
10
9
  </template>
@@ -6,7 +6,6 @@
6
6
  :tone="badge.tone"
7
7
  :variant="badge.variant"
8
8
  size="sm"
9
- dot
10
9
  class="cms-code"
11
10
  :aria-label="badge.title"
12
11
  />
@@ -229,8 +229,7 @@
229
229
  <KFormField
230
230
  :name="`${selectedName}.${blockKey}`"
231
231
  :label="selectedBlock.fields[blockKey].label"
232
- :description="selectedBlock.fields[blockKey].description"
233
- :icon="cmsIcon(fieldIcon(selectedBlock.fields[blockKey]))"
232
+ :help="selectedBlock.fields[blockKey].description"
234
233
  :required="selectedBlock.fields[blockKey].required"
235
234
  :highlight="highlighted === blockKey"
236
235
  >
@@ -278,8 +277,7 @@
278
277
  <KFormField
279
278
  :name="key"
280
279
  :label="fields[key].label"
281
- :description="fields[key].description"
282
- :icon="cmsIcon(fieldIcon(fields[key]))"
280
+ :help="fields[key].description"
283
281
  :required="fields[key].required"
284
282
  :disabled="locked?.includes(key) || void 0"
285
283
  :highlight="highlighted === key"
@@ -442,7 +440,7 @@ import {
442
440
  onApplePlatform,
443
441
  shortcutTarget
444
442
  } from "../../utils/keyboard";
445
- import { cmsIcon, fieldIcon } from "../../utils/ui";
443
+ import { cmsIcon } from "../../utils/ui";
446
444
  const SEO_KEYS = ["seoTitle", "seoDescription", "seoImage", "seoNoindex"];
447
445
  const deviceOptions = [
448
446
  { value: "desktop", label: "Desktop width", icon: cmsIcon("computer-desktop") },
@@ -27,7 +27,7 @@
27
27
 
28
28
  <template #status>
29
29
  <CmsStatusBadge :published="published" :scheduled="scheduled" :at="scheduledAt" />
30
- <KBadge v-if="dirty" label="Unsaved changes" tone="warning" dot />
30
+ <KBadge v-if="dirty" label="Unsaved changes" tone="warning" />
31
31
  <KTooltip v-if="lock" :text="lock">
32
32
  <KBadge size="sm" variant="outline" label="Read only" />
33
33
  </KTooltip>
@@ -84,7 +84,7 @@
84
84
  <KStack gap="md">
85
85
  <KFormField
86
86
  label="Publish at"
87
- description="The item stays hidden from the site until this moment."
87
+ help="The item stays hidden from the site until this moment."
88
88
  >
89
89
  <CmsFieldInput v-model="scheduleDraft" :field="publishedAtField" />
90
90
  </KFormField>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xleddyl/nuxt-cms",
3
- "version": "0.10.0",
3
+ "version": "0.10.1",
4
4
  "description": "Lightweight CMS that ships with your Nuxt app: runs on the Nitro server, content types defined in code, /cms admin panel, GraphQL API, SQLite or Postgres. No external CMS needed!",
5
5
  "license": "MIT",
6
6
  "author": "Edoardo Alberti (https://github.com/xleddyl)",