@blokkli/editor 2.0.0-alpha.1 → 2.0.0-alpha.11

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 (92) hide show
  1. package/dist/module.json +1 -1
  2. package/dist/module.mjs +25 -9
  3. package/dist/modules/drupal/graphql/base/fragment.blokkliProps.graphql +8 -0
  4. package/dist/modules/drupal/graphql/base/fragment.paragraphsFieldItem.graphql +6 -0
  5. package/dist/modules/drupal/index.mjs +33 -7
  6. package/dist/modules/drupal/runtime/adapter/index.d.ts +3 -0
  7. package/dist/modules/drupal/{adapter/index.mjs → runtime/adapter/index.js} +13 -10
  8. package/dist/runtime/blokkliPlugins/ContextMenu/index.vue.d.ts +2 -19
  9. package/dist/runtime/blokkliPlugins/DebugOverlay/index.vue.d.ts +2 -7
  10. package/dist/runtime/blokkliPlugins/DroppableEdit/index.vue +1 -1
  11. package/dist/runtime/blokkliPlugins/DroppableEdit/index.vue.d.ts +2 -19
  12. package/dist/runtime/blokkliPlugins/ItemAction/index.vue.d.ts +4 -3
  13. package/dist/runtime/blokkliPlugins/ItemDropdown/index.vue.d.ts +1 -1
  14. package/dist/runtime/blokkliPlugins/MenuButton/index.vue.d.ts +1 -1
  15. package/dist/runtime/blokkliPlugins/Sidebar/Detached/index.vue.d.ts +2 -51
  16. package/dist/runtime/blokkliPlugins/Sidebar/index.vue.d.ts +11 -5
  17. package/dist/runtime/blokkliPlugins/ToolbarButton/index.vue.d.ts +1 -1
  18. package/dist/runtime/blokkliPlugins/TourItem/index.vue.d.ts +2 -4
  19. package/dist/runtime/blokkliPlugins/ViewOption/index.vue.d.ts +4 -3
  20. package/dist/runtime/components/BlokkliEditable.vue +1 -0
  21. package/dist/runtime/components/BlokkliEditable.vue.d.ts +4 -18
  22. package/dist/runtime/components/BlokkliField.vue +4 -2
  23. package/dist/runtime/components/BlokkliField.vue.d.ts +8 -92
  24. package/dist/runtime/components/BlokkliItem.vue +1 -1
  25. package/dist/runtime/components/BlokkliProvider.vue +2 -1
  26. package/dist/runtime/components/BlokkliProvider.vue.d.ts +5 -22
  27. package/dist/runtime/components/Edit/Actions/index.vue +4 -1
  28. package/dist/runtime/components/Edit/BlockProxy/index.vue +3 -1
  29. package/dist/runtime/components/Edit/BlokkliErrorBoundary.vue +4 -4
  30. package/dist/runtime/components/Edit/BlokkliErrorBoundary.vue.d.ts +2 -13
  31. package/dist/runtime/components/Edit/Dialog/index.vue.d.ts +1 -1
  32. package/dist/runtime/components/Edit/DragInteractions/index.vue +1 -1
  33. package/dist/runtime/components/Edit/EditProvider.vue +7 -4
  34. package/dist/runtime/components/Edit/EditProvider.vue.d.ts +3 -3
  35. package/dist/runtime/components/Edit/Features/Artboard/index.vue +29 -1
  36. package/dist/runtime/components/Edit/Features/Assistant/Overlay/index.vue +4 -4
  37. package/dist/runtime/components/Edit/Features/Assistant/index.vue +2 -1
  38. package/dist/runtime/components/Edit/Features/Clipboard/index.vue +1 -1
  39. package/dist/runtime/components/Edit/Features/Comments/AddForm/index.vue +2 -2
  40. package/dist/runtime/components/Edit/Features/Comments/Comment/index.vue +1 -1
  41. package/dist/runtime/components/Edit/Features/Comments/Overlay/Item/index.vue +2 -2
  42. package/dist/runtime/components/Edit/Features/Diff/DiffView/index.vue +7 -7
  43. package/dist/runtime/components/Edit/Features/DraggingOverlay/DropTargets/index.vue.d.ts +3 -132
  44. package/dist/runtime/components/Edit/Features/EditableField/Overlay/index.vue +2 -2
  45. package/dist/runtime/components/Edit/Features/Fragments/Dialog/index.vue +4 -4
  46. package/dist/runtime/components/Edit/Features/Fragments/index.vue +2 -1
  47. package/dist/runtime/components/Edit/Features/Help/index.vue +2 -2
  48. package/dist/runtime/components/Edit/Features/History/List/index.vue +4 -4
  49. package/dist/runtime/components/Edit/Features/ImportExisting/Dialog/index.vue +5 -5
  50. package/dist/runtime/components/Edit/Features/Library/EditReusable/index.vue +2 -2
  51. package/dist/runtime/components/Edit/Features/Library/LibraryDialog/index.vue +5 -5
  52. package/dist/runtime/components/Edit/Features/Library/ReusableDialog/index.vue +2 -2
  53. package/dist/runtime/components/Edit/Features/Library/index.vue +2 -1
  54. package/dist/runtime/components/Edit/Features/MediaLibrary/Library/index.vue +1 -1
  55. package/dist/runtime/components/Edit/Features/Options/Form/Group.vue.d.ts +2 -11
  56. package/dist/runtime/components/Edit/Features/Options/Form/Radios/index.vue +1 -1
  57. package/dist/runtime/components/Edit/Features/Ownership/index.vue +1 -1
  58. package/dist/runtime/components/Edit/Features/PreviewGrant/QrCode/index.vue +1 -1
  59. package/dist/runtime/components/Edit/Features/Publish/index.vue +20 -2
  60. package/dist/runtime/components/Edit/Features/ResponsivePreview/Frame/index.vue.d.ts +2 -13
  61. package/dist/runtime/components/Edit/Features/Search/Overlay/Results/Content/index.vue +1 -1
  62. package/dist/runtime/components/Edit/Features/Search/index.vue +1 -1
  63. package/dist/runtime/components/Edit/Features/Tour/Overlay/index.vue +2 -2
  64. package/dist/runtime/components/Edit/Features/Tour/Popup/index.vue +4 -4
  65. package/dist/runtime/components/Edit/Features/Translations/Banner/index.vue +1 -1
  66. package/dist/runtime/components/Edit/Features/Validations/index.vue +1 -1
  67. package/dist/runtime/components/Edit/Form/Group/index.vue.d.ts +2 -4
  68. package/dist/runtime/components/Edit/Form/Item/index.vue.d.ts +2 -4
  69. package/dist/runtime/components/Edit/FormOverlay/index.vue.d.ts +3 -2
  70. package/dist/runtime/components/Edit/PreviewProvider.vue +1 -0
  71. package/dist/runtime/components/Edit/PreviewProvider.vue.d.ts +3 -3
  72. package/dist/runtime/components/Edit/RelativeTime/index.vue.d.ts +2 -2
  73. package/dist/runtime/components/Edit/Resizable/index.vue.d.ts +1 -1
  74. package/dist/runtime/components/Edit/ScaleToFit/index.vue.d.ts +1 -1
  75. package/dist/runtime/components/Edit/ScrollBoundary/index.vue.d.ts +2 -7
  76. package/dist/runtime/components/Edit/Sortli/index.vue.d.ts +1 -1
  77. package/dist/runtime/components/Edit/SystemRequirements/index.vue +2 -2
  78. package/dist/runtime/components/Edit/ViewportBlockingRect/index.vue.d.ts +2 -7
  79. package/dist/runtime/composables/defineBlokkli.js +8 -1
  80. package/dist/runtime/composables/defineBlokkliFragment.js +8 -1
  81. package/dist/runtime/composables/useBlokkliHelper.d.ts +19 -0
  82. package/dist/runtime/composables/useBlokkliHelper.js +95 -0
  83. package/dist/runtime/css/output.css +1 -1
  84. package/dist/runtime/helpers/animationProvider.js +1 -1
  85. package/dist/runtime/helpers/composables/useBlockRegistration.d.ts +5 -0
  86. package/dist/runtime/helpers/composables/useBlockRegistration.js +23 -0
  87. package/dist/runtime/helpers/domProvider.d.ts +2 -0
  88. package/dist/runtime/helpers/domProvider.js +50 -65
  89. package/dist/runtime/helpers/runtimeHelpers/index.js +1 -1
  90. package/dist/runtime/types/index.d.ts +38 -1
  91. package/package.json +8 -11
  92. package/dist/modules/drupal/adapter/index.d.mts +0 -6
package/dist/module.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "blokkli",
3
3
  "configKey": "blokkli",
4
- "version": "2.0.0-alpha.1",
4
+ "version": "2.0.0-alpha.11",
5
5
  "compatibility": {
6
6
  "nuxt": "^3.15.0"
7
7
  },
package/dist/module.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { resolveFiles, createResolver, addComponent, addImports, addTemplate, addTypeTemplate, resolveAlias, defineNuxtModule, addPlugin, addBuildPlugin } from '@nuxt/kit';
1
+ import { resolveAlias, resolveFiles, createResolver, addComponent, addImports, addTemplate, addTypeTemplate, defineNuxtModule, addPlugin, addBuildPlugin } from '@nuxt/kit';
2
2
  import { createUnplugin } from 'unplugin';
3
3
  import MagicString from 'magic-string';
4
4
  import { walk } from 'estree-walker-ts';
@@ -13,7 +13,7 @@ import { BK_VISIBLE_LANGUAGES, BK_HIDDEN_GLOBALLY } from '../dist/runtime/helper
13
13
  import fs from 'node:fs';
14
14
  import { defu, createDefu } from 'defu';
15
15
 
16
- const version = "2.0.0-alpha.1";
16
+ const version = "2.0.0-alpha.11";
17
17
 
18
18
  function sortObjectKeys(obj) {
19
19
  if (Array.isArray(obj)) {
@@ -275,8 +275,10 @@ class BlockCollector extends Collector {
275
275
  this.patterns = (helper.options.pattern || []).map((pattern) => {
276
276
  if (pattern.startsWith("/")) {
277
277
  return pattern;
278
+ } else if (pattern.startsWith(".")) {
279
+ return helper.resolvers.src.resolve(pattern);
278
280
  }
279
- return helper.resolvers.src.resolve(pattern);
281
+ return resolveAlias(pattern);
280
282
  });
281
283
  }
282
284
  async init() {
@@ -566,7 +568,7 @@ class ModuleHelper {
566
568
  this.paths = {
567
569
  blokkliBuildDir: this.resolvers.build.resolve("blokkli"),
568
570
  srcDir: nuxt.options.srcDir,
569
- editAdapter: this.findEditAdapterPath()
571
+ editAdapter: ""
570
572
  };
571
573
  this.relativePaths = {
572
574
  TYPES: relative(
@@ -615,6 +617,7 @@ class ModuleHelper {
615
617
  fieldListTypes: fieldListTypes.filter(onlyUnique),
616
618
  chunkNames: chunkNames.filter(onlyUnique)
617
619
  };
620
+ this.paths.editAdapter = this.findEditAdapterPath();
618
621
  }
619
622
  relativePaths;
620
623
  paths;
@@ -6342,6 +6345,9 @@ declare const adapter: BlokkliAdapterFactory<any>
6342
6345
 
6343
6346
  export default adapter
6344
6347
  `;
6348
+ },
6349
+ {
6350
+ write: true
6345
6351
  }
6346
6352
  );
6347
6353
 
@@ -6350,7 +6356,7 @@ const styles = defineFileTemplate("styles.css", (ctx) => {
6350
6356
  "./runtime/css/output.css"
6351
6357
  );
6352
6358
  return `
6353
- @import url("${relative(ctx.helper.paths.blokkliBuildDir, cssFilePath)}");
6359
+ @import url("${cssFilePath}");
6354
6360
 
6355
6361
  ${ctx.theme.css}
6356
6362
  `;
@@ -7387,6 +7393,7 @@ const runtimeOptions = defineCodeTemplate(
7387
7393
  }).filter(falsy);
7388
7394
  const declarations = [];
7389
7395
  const OPTIONS = /* @__PURE__ */ new Map();
7396
+ const FIELD_MAPPING = /* @__PURE__ */ new Map();
7390
7397
  for (const item of items) {
7391
7398
  const optionDefinitions = Object.entries(item.definition.options || {});
7392
7399
  const options = {};
@@ -7411,11 +7418,20 @@ const runtimeOptions = defineCodeTemplate(
7411
7418
  OPTIONS.set(variation, item.varName);
7412
7419
  }
7413
7420
  });
7421
+ if (isBlock(item.definition)) {
7422
+ if (item.definition.propsFieldMapping) {
7423
+ FIELD_MAPPING.set(
7424
+ item.definition.bundle,
7425
+ JSON.stringify(item.definition.propsFieldMapping, null, 2)
7426
+ );
7427
+ }
7428
+ }
7414
7429
  }
7415
7430
  return `
7416
7431
  ${declarations.join("\n")}
7417
7432
 
7418
7433
  ${toObject("OPTIONS", OPTIONS)}
7434
+ ${toObject("FIELD_MAPPING", FIELD_MAPPING)}
7419
7435
  `;
7420
7436
  },
7421
7437
  (ctx) => {
@@ -7477,6 +7493,7 @@ ${runtimeMappedOptionTypes}
7477
7493
  }
7478
7494
 
7479
7495
  export declare const OPTIONS: Record<string, Record<string, RuntimeBlockOptionArray>>
7496
+ export declare const FIELD_MAPPING: Record<string, Record<string, string>>
7480
7497
  `;
7481
7498
  },
7482
7499
  {
@@ -7617,7 +7634,7 @@ ${lines.join("\n ")}
7617
7634
  const imports = items.map((v) => {
7618
7635
  return `${v.typeName} as Bundle_${v.bundle}_Props`;
7619
7636
  }).join(", ");
7620
- const importPath = relative(ctx.helper.paths.blokkliBuildDir, from);
7637
+ const importPath = from.startsWith("/") ? relative(ctx.helper.paths.blokkliBuildDir, from) : from;
7621
7638
  return `import type { ${imports} } from '${importPath}'`;
7622
7639
  }).join("\n");
7623
7640
  const BundleProps = Object.entries(propTypes).map(([key, type]) => {
@@ -8056,7 +8073,6 @@ const module = defineNuxtModule({
8056
8073
  }
8057
8074
  },
8058
8075
  defaults: {
8059
- pattern: ["components/Blokkli/**/*.vue"],
8060
8076
  globalOptions: {
8061
8077
  [BK_VISIBLE_LANGUAGES]: {
8062
8078
  type: "checkboxes",
@@ -8070,8 +8086,7 @@ const module = defineNuxtModule({
8070
8086
  default: false
8071
8087
  }
8072
8088
  },
8073
- chunkNames: ["global"],
8074
- itemEntityType: "block"
8089
+ chunkNames: ["global"]
8075
8090
  },
8076
8091
  async setup(moduleOptions, nuxt) {
8077
8092
  const blokkliModules = moduleOptions.modules || [];
@@ -8134,6 +8149,7 @@ const module = defineNuxtModule({
8134
8149
  helper.addComposable("defineBlokkliFragment");
8135
8150
  helper.addComposable("defineBlokkliFeature");
8136
8151
  helper.addComposable("useBlokkli");
8152
+ helper.addComposable("useBlokkliHelper");
8137
8153
  helper.addAlias("#blokkli-build", helper.paths.blokkliBuildDir);
8138
8154
  helper.addAlias("#blokkli/types", resolver.resolve("runtime/types"));
8139
8155
  helper.addAlias("#blokkli/constants", resolver.resolve("runtime/constants"));
@@ -0,0 +1,8 @@
1
+ fragment blokkliProps on ParagraphsBlokkliProps {
2
+ entityUuid
3
+ entityType
4
+ entityBundle
5
+ canEdit
6
+ editLabel
7
+ language
8
+ }
@@ -0,0 +1,6 @@
1
+ fragment paragraphsFieldItem on Paragraph {
2
+ uuid
3
+ bundle: entityBundle
4
+ isNew
5
+ options: paragraphsBlokkliOptions
6
+ }
@@ -1,4 +1,5 @@
1
1
  import { useLogger, createResolver } from '@nuxt/kit';
2
+ import { fileURLToPath } from 'node:url';
2
3
  import { join } from 'pathe';
3
4
  import { isObjectType, isInterfaceType } from 'graphql';
4
5
  import { useGraphqlModuleContext } from 'nuxt-graphql-middleware/utils';
@@ -14,6 +15,12 @@ function defineBlokkliModule(init) {
14
15
 
15
16
  const logger = useLogger("@blokkli/editor");
16
17
 
18
+ function toPascalCase(text) {
19
+ return text.replace(/(^\w|_\w)/g, clearAndUpper);
20
+ }
21
+ function clearAndUpper(text) {
22
+ return text.replace(/_/, "").toUpperCase();
23
+ }
17
24
  const index = defineBlokkliModule({
18
25
  alterOptions(options) {
19
26
  if (!options.itemEntityType) {
@@ -23,10 +30,20 @@ const index = defineBlokkliModule({
23
30
  options.pattern = ["~/components/Paragraph/**/*.vue"];
24
31
  }
25
32
  if (!options.editAdapterPath) {
26
- const resolver = createResolver(join(import.meta.url));
27
- const filePath = resolver.resolve("./adapter/index.mjs");
33
+ const resolver = createResolver(
34
+ fileURLToPath(new URL("./", import.meta.url))
35
+ );
36
+ const filePath = resolver.resolve("./runtime/adapter/index.js");
28
37
  options.editAdapterPath = filePath;
29
38
  }
39
+ if (!options.getBundlePropsType) {
40
+ options.getBundlePropsType = function(bundle) {
41
+ return {
42
+ typeName: `Paragraph${toPascalCase(bundle)}Fragment`,
43
+ from: "#graphql-operations"
44
+ };
45
+ };
46
+ }
30
47
  },
31
48
  setup({ context }) {
32
49
  if (!useGraphqlModuleContext({ nullOnMissing: true })) {
@@ -36,6 +53,11 @@ const index = defineBlokkliModule({
36
53
  throw new Error("Failed to initialise bl\xF6kkli Drupal module.");
37
54
  }
38
55
  const graphql = useGraphqlModuleContext();
56
+ const blokkliModuleResolver = createResolver(
57
+ fileURLToPath(new URL("./", import.meta.url))
58
+ );
59
+ const filePath = blokkliModuleResolver.resolve("./runtime");
60
+ context.helper.addAlias("#blokkli/drupal", filePath);
39
61
  function getTypeFields(typeName) {
40
62
  const type = graphql.schemaGetType(typeName);
41
63
  if (isObjectType(type) || isInterfaceType(type)) {
@@ -47,10 +69,12 @@ const index = defineBlokkliModule({
47
69
  const queryFields = getTypeFields("Query");
48
70
  const editStateFields = getTypeFields("ParagraphsBlokkliEditState");
49
71
  const editMutationStateFields = getTypeFields("ParagraphsEditMutationState");
50
- const resolver = createResolver(join(import.meta.url, "graphql"));
72
+ const resolver = createResolver(
73
+ join(fileURLToPath(new URL("./", import.meta.url)), "graphql")
74
+ );
51
75
  function addGraphqlDocument(fileName) {
52
- const filePath = resolver.resolve(fileName);
53
- graphql.addImportFile(filePath);
76
+ const filePath2 = resolver.resolve(fileName);
77
+ graphql.addImportFile(filePath2);
54
78
  }
55
79
  function addMutation(mutationName, feature) {
56
80
  if (editMutationStateFields.has(mutationName)) {
@@ -65,6 +89,8 @@ const index = defineBlokkliModule({
65
89
  "fragment.paragraphsBlokkliMutationItem.graphql",
66
90
  "fragment.paragraphsBlokkliMutationResult.graphql",
67
91
  "fragment.paragraphsBlokkliViolation.graphql",
92
+ "fragment.blokkliProps.graphql",
93
+ "fragment.paragraphsFieldItem.graphql",
68
94
  "query.pbConfig.graphql",
69
95
  "query.pbEditState.graphql"
70
96
  ];
@@ -141,9 +167,9 @@ const index = defineBlokkliModule({
141
167
  context.features.disableFeature("preview-grant");
142
168
  }
143
169
  if (editStateFields.has("publishOptions") && queryFields.has("pbSearchEditStates")) {
144
- addGraphqlDocument("publishNew.graphql");
170
+ addGraphqlDocument("features/publishNew.graphql");
145
171
  } else {
146
- addGraphqlDocument("publish.graphql");
172
+ addGraphqlDocument("features/publish.graphql");
147
173
  }
148
174
  }
149
175
  });
@@ -0,0 +1,3 @@
1
+ import type { ParagraphsBlokkliEditStateFragment } from '#graphql-operations';
2
+ declare const _default: import("#blokkli/adapter").BlokkliAdapterFactory<ParagraphsBlokkliEditStateFragment>;
3
+ export default _default;
@@ -1,11 +1,16 @@
1
- import { defineBlokkliEditAdapter } from '#blokkli/adapter';
2
- import { falsy } from '#blokkli/helpers';
3
- import { availableFeaturesAtBuild } from '#blokkli-build/features';
4
- import { operationSources } from '#nuxt-graphql-middleware/sources';
5
- import { computed, useGraphqlQuery, useRoute, useRouter, useGraphqlMutation } from '#imports';
6
- import { ParagraphsBlokkliRemoteVideoProvider } from '#graphql-operations';
7
-
8
- const index = defineBlokkliEditAdapter(
1
+ import { defineBlokkliEditAdapter } from "#blokkli/adapter";
2
+ import { falsy } from "#blokkli/helpers";
3
+ import { availableFeaturesAtBuild } from "#blokkli-build/features";
4
+ import { operationSources } from "#nuxt-graphql-middleware/sources";
5
+ import {
6
+ useGraphqlQuery,
7
+ useGraphqlMutation,
8
+ computed,
9
+ useRoute,
10
+ useRouter
11
+ } from "#imports";
12
+ import { ParagraphsBlokkliRemoteVideoProvider } from "#graphql-operations";
13
+ export default defineBlokkliEditAdapter(
9
14
  async (providedContext) => {
10
15
  const availableFeatureIds = new Set(availableFeaturesAtBuild);
11
16
  const availableGraphqlOperations = new Set(Object.keys(operationSources));
@@ -758,5 +763,3 @@ const index = defineBlokkliEditAdapter(
758
763
  return adapter;
759
764
  }
760
765
  );
761
-
762
- export { index as default };
@@ -1,30 +1,13 @@
1
1
  import type { ContextMenu } from '#blokkli/types';
2
- import ContextMenuMenu from './Menu/index.vue.js';
3
2
  type __VLS_Props = {
4
3
  id: string;
5
4
  menu: ContextMenu[];
6
5
  tag?: string;
7
6
  };
8
- declare const ui: import("../../helpers/uiProvider.js").UiProvider;
9
- declare const isVisible: import("vue").ComputedRef<boolean>;
10
- declare const x: import("vue").Ref<number, number>;
11
- declare const y: import("vue").Ref<number, number>;
12
- declare const onContextMenu: (e: MouseEvent) => void;
13
- declare const __VLS_ctx: InstanceType<__VLS_PickNotAny<typeof __VLS_self, new () => {}>>;
14
7
  declare var __VLS_10: {};
15
- type __VLS_Slots = __VLS_PrettifyGlobal<__VLS_OmitStringIndex<typeof __VLS_ctx.$slots> & {
8
+ type __VLS_Slots = {} & {
16
9
  default?: (props: typeof __VLS_10) => any;
17
- }>;
18
- declare const __VLS_self: import("vue").DefineComponent<__VLS_Props, {
19
- ContextMenuMenu: typeof ContextMenuMenu;
20
- ui: typeof ui;
21
- isVisible: typeof isVisible;
22
- x: typeof x;
23
- y: typeof y;
24
- onContextMenu: typeof onContextMenu;
25
- }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
26
- tag: string;
27
- }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
10
+ };
28
11
  declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
29
12
  tag: string;
30
13
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
@@ -2,15 +2,10 @@ type __VLS_Props = {
2
2
  id: string;
3
3
  title: string;
4
4
  };
5
- declare const isVisible: import("vue").ComputedRef<boolean | undefined>;
6
- declare const __VLS_ctx: InstanceType<__VLS_PickNotAny<typeof __VLS_self, new () => {}>>;
7
5
  declare var __VLS_5: {};
8
- type __VLS_Slots = __VLS_PrettifyGlobal<__VLS_OmitStringIndex<typeof __VLS_ctx.$slots> & {
6
+ type __VLS_Slots = {} & {
9
7
  default?: (props: typeof __VLS_5) => any;
10
- }>;
11
- declare const __VLS_self: import("vue").DefineComponent<__VLS_Props, {
12
- isVisible: typeof isVisible;
13
- }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
8
+ };
14
9
  declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
15
10
  declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
16
11
  export default _default;
@@ -11,7 +11,7 @@
11
11
  <slot />
12
12
  <template #footer>
13
13
  <button class="bk-button bk-is-primary" @click="onSubmit">
14
- {{ $t('droppableEditFormSave', 'Save') }}
14
+ {{ $t("droppableEditFormSave", "Save") }}
15
15
  </button>
16
16
  </template>
17
17
  </FormOverlay>
@@ -1,4 +1,3 @@
1
- import { FormOverlay } from '#blokkli/components';
2
1
  import type { BlokkliIcon } from '#blokkli-build/icons';
3
2
  import type { DroppableEntityField } from '#blokkli/types';
4
3
  type __VLS_Props = {
@@ -7,26 +6,10 @@ type __VLS_Props = {
7
6
  icon: BlokkliIcon;
8
7
  entityType: string;
9
8
  };
10
- declare const $t: import("../../helpers/textProvider.js").TextProvider;
11
- declare const isVisible: import("vue").Ref<boolean, boolean>;
12
- declare const onClose: () => void;
13
- declare const onSubmit: () => void;
14
- declare const __VLS_ctx: InstanceType<__VLS_PickNotAny<typeof __VLS_self, new () => {}>>;
15
9
  declare var __VLS_18: {};
16
- type __VLS_Slots = __VLS_PrettifyGlobal<__VLS_OmitStringIndex<typeof __VLS_ctx.$slots> & {
10
+ type __VLS_Slots = {} & {
17
11
  default?: (props: typeof __VLS_18) => any;
18
- }>;
19
- declare const __VLS_self: import("vue").DefineComponent<__VLS_Props, {
20
- FormOverlay: typeof FormOverlay;
21
- $t: typeof $t;
22
- isVisible: typeof isVisible;
23
- onClose: typeof onClose;
24
- onSubmit: typeof onSubmit;
25
- }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
26
- save: (data: DroppableEntityField) => any;
27
- }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
28
- onSave?: ((data: DroppableEntityField) => any) | undefined;
29
- }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
12
+ };
30
13
  declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
31
14
  save: (data: DroppableEntityField) => any;
32
15
  }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
@@ -69,11 +69,12 @@ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<{
69
69
  }> & Readonly<{
70
70
  onClick?: ((items: DraggableExistingBlock[]) => any) | undefined;
71
71
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
72
- icon?: ((props: {}) => any) | undefined;
73
- default?: ((props: {
72
+ icon?: (props: {}) => any;
73
+ } & {
74
+ default?: (props: {
74
75
  items: DraggableExistingBlock[];
75
76
  uuids: string[];
76
- }) => any) | undefined;
77
+ }) => any;
77
78
  }>;
78
79
  export default _default;
79
80
  type __VLS_WithSlots<T, S> = T & {
@@ -7,7 +7,7 @@ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<{
7
7
  title: string;
8
8
  enabled: boolean;
9
9
  }> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
10
- default?: ((props: {}) => any) | undefined;
10
+ default?: (props: {}) => any;
11
11
  }>;
12
12
  export default _default;
13
13
  type __VLS_WithSlots<T, S> = T & {
@@ -22,7 +22,7 @@ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<{
22
22
  }> & Readonly<{
23
23
  onClick?: ((...args: any[]) => any) | undefined;
24
24
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
25
- default?: ((props: {}) => any) | undefined;
25
+ default?: (props: {}) => any;
26
26
  }>;
27
27
  export default _default;
28
28
  type __VLS_WithSlots<T, S> = T & {
@@ -1,4 +1,3 @@
1
- import { Icon, ViewportBlockingRect, ScrollBoundary } from '#blokkli/components';
2
1
  import type { BlokkliIcon } from '#blokkli-build/icons';
3
2
  type __VLS_Props = {
4
3
  id: string;
@@ -12,64 +11,16 @@ type __VLS_Props = {
12
11
  };
13
12
  isLeft?: boolean;
14
13
  };
15
- declare function onPointerMove(e: PointerEvent): void;
16
- declare const isMinimized: import("vue").WritableComputedRef<boolean, boolean>;
17
- declare const storageKey: import("vue").ComputedRef<string>;
18
- declare const focusedSidebar: import("vue").WritableComputedRef<string, string>;
19
- type MouseMode = 'move' | 'resize-right' | 'resize-bottom' | 'resize-bottom-right' | '';
20
- declare const isResizing: import("vue").ComputedRef<boolean>;
21
- declare const userWidth: import("vue").Ref<number, number>;
22
- declare const userHeight: import("vue").Ref<number, number>;
23
- declare const style: import("vue").ComputedRef<{
24
- transform: string;
25
- zIndex: number;
26
- }>;
27
- declare const innerStyle: import("vue").ComputedRef<{
28
- width: string;
29
- height: string | number;
30
- }>;
31
- declare const onFocus: () => void;
32
- declare const onMouseDown: (e: MouseEvent, mode: MouseMode) => void;
33
- declare const el: import("vue").Ref<HTMLDivElement | null, HTMLDivElement | null>;
34
- declare const __VLS_ctx: InstanceType<__VLS_PickNotAny<typeof __VLS_self, new () => {}>>;
35
14
  declare var __VLS_16: {}, __VLS_30: {
36
15
  width: number;
37
16
  height: number;
38
17
  isResizing: boolean;
39
18
  };
40
- type __VLS_Slots = __VLS_PrettifyGlobal<__VLS_OmitStringIndex<typeof __VLS_ctx.$slots> & {
19
+ type __VLS_Slots = {} & {
41
20
  icon?: (props: typeof __VLS_16) => any;
42
21
  } & {
43
22
  default?: (props: typeof __VLS_30) => any;
44
- }>;
45
- declare const __VLS_self: import("vue").DefineComponent<__VLS_Props, {
46
- Icon: typeof Icon;
47
- ViewportBlockingRect: typeof ViewportBlockingRect;
48
- ScrollBoundary: typeof ScrollBoundary;
49
- onPointerMove: typeof onPointerMove;
50
- isMinimized: typeof isMinimized;
51
- storageKey: typeof storageKey;
52
- focusedSidebar: typeof focusedSidebar;
53
- isResizing: typeof isResizing;
54
- userWidth: typeof userWidth;
55
- userHeight: typeof userHeight;
56
- style: typeof style;
57
- innerStyle: typeof innerStyle;
58
- onFocus: typeof onFocus;
59
- onMouseDown: typeof onMouseDown;
60
- el: typeof el;
61
- }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
62
- close: (...args: any[]) => void;
63
- }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
64
- onClose?: ((...args: any[]) => any) | undefined;
65
- }>, {
66
- size: {
67
- width: number;
68
- height: number;
69
- };
70
- minWidth: number;
71
- minHeight: number;
72
- }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
23
+ };
73
24
  declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
74
25
  close: (...args: any[]) => void;
75
26
  }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
@@ -57,9 +57,13 @@ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<{
57
57
  minHeight: number;
58
58
  region: "left" | "right";
59
59
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
60
- icon?: (((props: {}) => any) & ((props: {}) => any)) | undefined;
61
- badge?: ((props: {}) => any) | undefined;
62
- default?: (((props: {
60
+ icon?: (props: {}) => any;
61
+ } & {
62
+ badge?: (props: {}) => any;
63
+ } & {
64
+ icon?: (props: {}) => any;
65
+ } & {
66
+ default?: (props: {
63
67
  key: string;
64
68
  scrolledToEnd: boolean;
65
69
  isDetached: true;
@@ -67,7 +71,9 @@ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<{
67
71
  height: number;
68
72
  toggleSidebar: () => void;
69
73
  isResizing: boolean;
70
- }) => any) & ((props: {
74
+ }) => any;
75
+ } & {
76
+ default?: (props: {
71
77
  key: string;
72
78
  scrolledToEnd: boolean;
73
79
  isDetached: false;
@@ -75,7 +81,7 @@ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<{
75
81
  height: undefined;
76
82
  toggleSidebar: () => void;
77
83
  isResizing: boolean;
78
- }) => any)) | undefined;
84
+ }) => any;
79
85
  }>;
80
86
  export default _default;
81
87
  type __VLS_WithSlots<T, S> = T & {
@@ -38,7 +38,7 @@ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<{
38
38
  }> & Readonly<{
39
39
  onClick?: ((...args: any[]) => any) | undefined;
40
40
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
41
- default?: ((props: {}) => any) | undefined;
41
+ default?: (props: {}) => any;
42
42
  }>;
43
43
  export default _default;
44
44
  type __VLS_WithSlots<T, S> = T & {
@@ -4,12 +4,10 @@ type __VLS_Props = {
4
4
  text: string;
5
5
  selector?: string;
6
6
  };
7
- declare const __VLS_ctx: InstanceType<__VLS_PickNotAny<typeof __VLS_self, new () => {}>>;
8
7
  declare var __VLS_1: {};
9
- type __VLS_Slots = __VLS_PrettifyGlobal<__VLS_OmitStringIndex<typeof __VLS_ctx.$slots> & {
8
+ type __VLS_Slots = {} & {
10
9
  default?: (props: typeof __VLS_1) => any;
11
- }>;
12
- declare const __VLS_self: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
10
+ };
13
11
  declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
14
12
  declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
15
13
  export default _default;
@@ -26,10 +26,11 @@ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<{
26
26
  }> & Readonly<{
27
27
  "onUpdate:modelValue"?: ((data: boolean) => any) | undefined;
28
28
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
29
- icon?: ((props: {}) => any) | undefined;
30
- default?: ((props: {
29
+ icon?: (props: {}) => any;
30
+ } & {
31
+ default?: (props: {
31
32
  isActive: boolean;
32
- }) => any) | undefined;
33
+ }) => any;
33
34
  }>;
34
35
  export default _default;
35
36
  type __VLS_WithSlots<T, S> = T & {
@@ -16,6 +16,7 @@ const props = defineProps({
16
16
  value: { type: String, required: true },
17
17
  tag: { type: String, required: false, default: "div" }
18
18
  });
19
+ defineSlots();
19
20
  const valueOverride = ref("");
20
21
  const isEditing = inject(INJECT_IS_EDITING, false);
21
22
  const entity = inject(INJECT_ENTITY_CONTEXT);
@@ -3,25 +3,11 @@ type __VLS_Props = {
3
3
  value: string;
4
4
  tag?: string;
5
5
  };
6
- declare const renderedValue: import("vue").ComputedRef<string>;
7
- declare const attrs: import("vue").ComputedRef<{
8
- 'data-blokkli-editable-field': string;
9
- 'data-blokkli-editable-component': string;
10
- 'data-blokkli-editable-value': string;
11
- } | undefined>;
12
- declare const __VLS_ctx: InstanceType<__VLS_PickNotAny<typeof __VLS_self, new () => {}>>;
13
- declare var __VLS_6: {
14
- value: string;
6
+ type __VLS_Slots = {
7
+ default(props: {
8
+ value: string;
9
+ }): any;
15
10
  };
16
- type __VLS_Slots = __VLS_PrettifyGlobal<__VLS_OmitStringIndex<typeof __VLS_ctx.$slots> & {
17
- default?: (props: typeof __VLS_6) => any;
18
- }>;
19
- declare const __VLS_self: import("vue").DefineComponent<__VLS_Props, {
20
- renderedValue: typeof renderedValue;
21
- attrs: typeof attrs;
22
- }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
23
- tag: string;
24
- }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
25
11
  declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
26
12
  tag: string;
27
13
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
@@ -89,6 +89,7 @@ const attrs = useAttrs();
89
89
  defineOptions({
90
90
  inheritAttrs: false
91
91
  });
92
+ defineSlots();
92
93
  const isEditing = inject(INJECT_IS_EDITING, false);
93
94
  const isGlobalProxyMode = inject(
94
95
  INJECT_GLOBAL_PROXY_MODE,
@@ -151,11 +152,12 @@ function filterVisible(item) {
151
152
  const filteredList = computed(() => {
152
153
  if (mutatedFields && !isInReusable && editContext && fieldKey.value && (isPreview?.value || isEditing)) {
153
154
  return ((mutatedFields[fieldKey.value] || {}).list || []).map((v) => {
155
+ const mutatedOptions = editContext.mutatedOptions[v.uuid] || {};
154
156
  return {
155
157
  ...v,
156
158
  options: {
157
- ...v.options
158
- // ...mutatedOptions,
159
+ ...v.options,
160
+ ...mutatedOptions
159
161
  }
160
162
  };
161
163
  });