@blokkli/editor 2.0.0-alpha.41 → 2.0.0-alpha.42

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": "@blokkli/editor",
3
3
  "configKey": "blokkli",
4
- "version": "2.0.0-alpha.41",
4
+ "version": "2.0.0-alpha.42",
5
5
  "compatibility": {
6
6
  "nuxt": ">=3.15.0"
7
7
  },
package/dist/module.mjs CHANGED
@@ -18,7 +18,7 @@ import 'typescript';
18
18
  import 'oxc-walker';
19
19
 
20
20
  const name = "@blokkli/editor";
21
- const version = "2.0.0-alpha.41";
21
+ const version = "2.0.0-alpha.42";
22
22
 
23
23
  function validateOption(optionKey, option, icons) {
24
24
  const errors = [];
@@ -7,43 +7,45 @@
7
7
  :data-blokkli-provider-active="isInEditor ? 'true' : 'false'"
8
8
  >
9
9
  <BlokkliRootErrorBoundary v-if="isInEditor">
10
- <PreviewProvider
11
- v-if="isPreviewing"
12
- v-slot="{ mutatedEntity }"
13
- :entity
14
- :entity-type
15
- :entity-uuid
16
- :entity-bundle
17
- :language
18
- :provider-type
19
- >
20
- <slot
21
- :entity="mutatedEntity"
22
- :is-editing
23
- :can-edit
24
- :is-preview="isPreviewing"
25
- />
26
- </PreviewProvider>
27
- <EditProvider
28
- v-else-if="isEditing && shouldRender && providerEl"
29
- v-slot="{ mutatedEntity }"
30
- :provider-el
31
- :entity
32
- :entity-type
33
- :entity-uuid
34
- :entity-bundle
35
- :language
36
- :isolate
37
- :permissions
38
- :provider-type
39
- >
40
- <slot
41
- :is-editing
42
- :can-edit
43
- :is-preview="isPreviewing"
44
- :entity="mutatedEntity"
45
- />
46
- </EditProvider>
10
+ <ClientOnly>
11
+ <PreviewProvider
12
+ v-if="isPreviewing"
13
+ v-slot="{ mutatedEntity }"
14
+ :entity
15
+ :entity-type
16
+ :entity-uuid
17
+ :entity-bundle
18
+ :language
19
+ :provider-type
20
+ >
21
+ <slot
22
+ :entity="mutatedEntity"
23
+ :is-editing
24
+ :can-edit
25
+ :is-preview="isPreviewing"
26
+ />
27
+ </PreviewProvider>
28
+ <EditProvider
29
+ v-else-if="isEditing && shouldRender && providerEl"
30
+ v-slot="{ mutatedEntity }"
31
+ :provider-el
32
+ :entity
33
+ :entity-type
34
+ :entity-uuid
35
+ :entity-bundle
36
+ :language
37
+ :isolate
38
+ :permissions
39
+ :provider-type
40
+ >
41
+ <slot
42
+ :is-editing
43
+ :can-edit
44
+ :is-preview="isPreviewing"
45
+ :entity="mutatedEntity"
46
+ />
47
+ </EditProvider>
48
+ </ClientOnly>
47
49
  </BlokkliRootErrorBoundary>
48
50
 
49
51
  <slot
@@ -59,10 +59,20 @@ const { data, refresh, error } = await useAsyncData(
59
59
  () => adapter.loadState().then((v) => adapter.mapState(v))
60
60
  );
61
61
  function updateMutatedFields(fields) {
62
- fields.forEach((field) => {
62
+ const existingKeys = Object.keys(mutatedFieldsMap);
63
+ const newKeys = /* @__PURE__ */ new Set();
64
+ for (let i = 0; i < fields.length; i++) {
65
+ const field = fields[i];
63
66
  const key = getFieldKey(field.entityUuid, field.name);
64
67
  mutatedFieldsMap[key] = field;
65
- });
68
+ newKeys.add(key);
69
+ }
70
+ for (let i = 0; i < existingKeys.length; i++) {
71
+ const key = existingKeys[i];
72
+ if (!newKeys.has(key)) {
73
+ delete mutatedFieldsMap[key];
74
+ }
75
+ }
66
76
  }
67
77
  const updateState = () => {
68
78
  const fields = data.value?.mutatedState?.fields || [];
@@ -21,18 +21,18 @@ const SCORE_CONFIGS = {
21
21
  label: "WSTF",
22
22
  compute: (tr, text) => tr.wienerSachtextformel(text, 1),
23
23
  direction: "higher_harder",
24
- bands: { easy: 6, ok: 10 },
25
- impactThresholds: [8, 10, 12],
24
+ bands: { easy: 7, ok: 14 },
25
+ impactThresholds: [12, 16, 20],
26
26
  referenceTable: [
27
- { range: "4\u20136", label: "Very easy (primary school level)" },
28
- { range: "6\u20138", label: "Easy (simple articles)" },
29
- { range: "8\u201310", label: "Medium (newspapers)" },
30
- { range: "10\u201312", label: "Difficult (official documents)" },
27
+ { range: "Below 4", label: "Very easy (children's books)" },
28
+ { range: "4\u20137", label: "Easy (simple articles)" },
29
+ { range: "7\u201311", label: "Medium (standard website content)" },
30
+ { range: "11\u201314", label: "Moderately difficult (official documents)" },
31
31
  {
32
- range: "Above 12",
33
- label: "Very difficult \u2014 this is what gets flagged"
32
+ range: "Above 14",
33
+ label: "Difficult \u2014 this is what gets flagged"
34
34
  },
35
- { range: "Above 14", label: "Critical \u2014 must be simplified" }
35
+ { range: "Above 20", label: "Critical \u2014 must be simplified" }
36
36
  ]
37
37
  },
38
38
  fr: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blokkli/editor",
3
- "version": "2.0.0-alpha.41",
3
+ "version": "2.0.0-alpha.42",
4
4
  "description": "Interactive page building experience for Nuxt",
5
5
  "keywords": [
6
6
  "cms",