@blokkli/editor 2.0.0-alpha.16 → 2.0.0-alpha.17

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 (106) hide show
  1. package/dist/module.json +1 -1
  2. package/dist/module.mjs +265 -83
  3. package/dist/modules/drupal/graphql/base/fragment.blokkliProps.graphql +1 -1
  4. package/dist/modules/drupal/graphql/features/comments.graphql +11 -8
  5. package/dist/modules/drupal/runtime/adapter/index.js +2 -2
  6. package/dist/runtime/blokkliPlugins/ItemAction/index.vue +1 -3
  7. package/dist/runtime/components/Blocks/FromLibrary/index.vue +4 -2
  8. package/dist/runtime/components/BlokkliEditable.vue +22 -4
  9. package/dist/runtime/components/BlokkliProvider.vue +29 -20
  10. package/dist/runtime/components/BlokkliProvider.vue.d.ts +2 -1
  11. package/dist/runtime/components/Edit/Actions/index.vue +9 -4
  12. package/dist/runtime/components/Edit/AnimationCanvas/index.vue +420 -25
  13. package/dist/runtime/components/Edit/ArtboardTooltip/index.vue +80 -0
  14. package/dist/runtime/components/Edit/ArtboardTooltip/index.vue.d.ts +32 -0
  15. package/dist/runtime/components/Edit/Banner/index.vue +51 -0
  16. package/dist/runtime/components/Edit/Banner/index.vue.d.ts +18 -0
  17. package/dist/runtime/components/Edit/EditIndicator.vue +118 -44
  18. package/dist/runtime/components/Edit/EditIndicator.vue.d.ts +3 -0
  19. package/dist/runtime/components/Edit/EditProvider.vue +79 -22
  20. package/dist/runtime/components/Edit/EditProvider.vue.d.ts +2 -0
  21. package/dist/runtime/components/Edit/Features/Analyze/Overlay/index.vue +19 -20
  22. package/dist/runtime/components/Edit/Features/BlockAddList/index.vue +1 -1
  23. package/dist/runtime/components/Edit/Features/CommandPalette/index.vue +2 -0
  24. package/dist/runtime/components/Edit/Features/Comments/AddForm/index.vue +35 -20
  25. package/dist/runtime/components/Edit/Features/Comments/AddForm/index.vue.d.ts +5 -3
  26. package/dist/runtime/components/Edit/Features/Comments/CommentInput/index.vue +29 -0
  27. package/dist/runtime/components/Edit/Features/Comments/CommentInput/index.vue.d.ts +13 -0
  28. package/dist/runtime/components/Edit/Features/Comments/Overlay/Item/index.vue +22 -16
  29. package/dist/runtime/components/Edit/Features/Comments/Overlay/Item/index.vue.d.ts +1 -0
  30. package/dist/runtime/components/Edit/Features/Comments/Overlay/index.vue +15 -6
  31. package/dist/runtime/components/Edit/Features/Comments/index.vue +20 -8
  32. package/dist/runtime/components/Edit/Features/Debug/Rects/index.vue +26 -35
  33. package/dist/runtime/components/Edit/Features/Debug/Renderer.vue +240 -0
  34. package/dist/runtime/components/Edit/Features/Debug/Renderer.vue.d.ts +6 -0
  35. package/dist/runtime/components/Edit/Features/Debug/index.vue +4 -165
  36. package/dist/runtime/components/Edit/Features/DraggingOverlay/DragItems/index.vue +1 -1
  37. package/dist/runtime/components/Edit/Features/DraggingOverlay/DropTargets/index.vue +41 -37
  38. package/dist/runtime/components/Edit/Features/Edit/index.vue +1 -1
  39. package/dist/runtime/components/Edit/Features/EditableField/Overlay/Frame/index.vue +63 -3
  40. package/dist/runtime/components/Edit/Features/EditableField/Overlay/Plaintext/index.vue +13 -9
  41. package/dist/runtime/components/Edit/Features/EditableField/Overlay/index.vue +17 -76
  42. package/dist/runtime/components/Edit/Features/EditableField/index.vue +1 -1
  43. package/dist/runtime/components/Edit/Features/History/index.vue +5 -2
  44. package/dist/runtime/components/Edit/Features/Hover/Overlay/fragment.glsl +139 -0
  45. package/dist/runtime/components/Edit/Features/Hover/Overlay/index.vue +270 -0
  46. package/dist/runtime/components/Edit/Features/Hover/Overlay/index.vue.d.ts +6 -0
  47. package/dist/runtime/components/Edit/Features/Hover/Overlay/vertex.glsl +117 -0
  48. package/dist/runtime/components/Edit/Features/Hover/index.vue +25 -0
  49. package/dist/runtime/components/Edit/Features/Library/LibraryDialog/index.vue +19 -27
  50. package/dist/runtime/components/Edit/Features/Library/ReusableDialog/index.vue +27 -23
  51. package/dist/runtime/components/Edit/Features/Library/index.vue +2 -1
  52. package/dist/runtime/components/Edit/Features/MultiSelect/Overlay/index.vue +34 -27
  53. package/dist/runtime/components/Edit/Features/MultiSelect/index.vue +2 -4
  54. package/dist/runtime/components/Edit/Features/Options/Form/Item.vue +6 -1
  55. package/dist/runtime/components/Edit/Features/Options/Form/index.vue +1 -0
  56. package/dist/runtime/components/Edit/Features/Ownership/Renderer.vue +35 -0
  57. package/dist/runtime/components/Edit/Features/Ownership/Renderer.vue.d.ts +6 -0
  58. package/dist/runtime/components/Edit/Features/Ownership/index.vue +7 -25
  59. package/dist/runtime/components/Edit/Features/ProxyView/index.vue +5 -1
  60. package/dist/runtime/components/Edit/Features/Selection/AddButtons/Overlay/index.vue +39 -74
  61. package/dist/runtime/components/Edit/Features/Selection/AddButtons/Overlay/index.vue.d.ts +4 -2
  62. package/dist/runtime/components/Edit/Features/Selection/AddButtons/Renderer/fragment.glsl +106 -0
  63. package/dist/runtime/components/Edit/Features/Selection/AddButtons/Renderer/index.vue +417 -0
  64. package/dist/runtime/components/Edit/Features/Selection/AddButtons/Renderer/index.vue.d.ts +32 -0
  65. package/dist/runtime/components/Edit/Features/Selection/AddButtons/Renderer/vertex.glsl +102 -0
  66. package/dist/runtime/components/Edit/Features/Selection/AddButtons/index.vue +33 -106
  67. package/dist/runtime/components/Edit/Features/Selection/Overlay/index.vue +88 -29
  68. package/dist/runtime/components/Edit/Features/Selection/Overlay/index.vue.d.ts +2 -0
  69. package/dist/runtime/components/Edit/Features/Selection/Overlay/vertex.glsl +11 -2
  70. package/dist/runtime/components/Edit/Features/Selection/index.vue +5 -12
  71. package/dist/runtime/components/Edit/Features/Translations/Banner/index.vue +17 -11
  72. package/dist/runtime/components/Edit/Features/Translations/index.vue +13 -16
  73. package/dist/runtime/components/Edit/Form/Text/index.vue +2 -1
  74. package/dist/runtime/components/Edit/Form/Text/index.vue.d.ts +1 -0
  75. package/dist/runtime/components/Edit/Indicators/index.vue +1 -1
  76. package/dist/runtime/components/Edit/Konami/Game/index.vue +5 -5
  77. package/dist/runtime/components/Edit/index.d.ts +5 -3
  78. package/dist/runtime/components/Edit/index.js +8 -4
  79. package/dist/runtime/composables/defineBlokkli.js +4 -2
  80. package/dist/runtime/css/output.css +1 -1
  81. package/dist/runtime/helpers/animationProvider.d.ts +34 -1
  82. package/dist/runtime/helpers/animationProvider.js +175 -48
  83. package/dist/runtime/helpers/composables/defineRenderer.d.ts +8 -0
  84. package/dist/runtime/helpers/composables/defineRenderer.js +8 -0
  85. package/dist/runtime/helpers/composables/useStickyToolbar.d.ts +4 -1
  86. package/dist/runtime/helpers/composables/useStickyToolbar.js +53 -35
  87. package/dist/runtime/helpers/dom/index.d.ts +1 -0
  88. package/dist/runtime/helpers/domProvider.d.ts +46 -0
  89. package/dist/runtime/helpers/domProvider.js +95 -6
  90. package/dist/runtime/helpers/editableProvider.d.ts +14 -0
  91. package/dist/runtime/helpers/editableProvider.js +144 -0
  92. package/dist/runtime/helpers/stateProvider.d.ts +6 -2
  93. package/dist/runtime/helpers/stateProvider.js +66 -3
  94. package/dist/runtime/helpers/storageProvider.d.ts +3 -2
  95. package/dist/runtime/helpers/storageProvider.js +6 -2
  96. package/dist/runtime/helpers/symbols.d.ts +1 -0
  97. package/dist/runtime/helpers/symbols.js +1 -0
  98. package/dist/runtime/helpers/uiProvider.d.ts +8 -1
  99. package/dist/runtime/helpers/uiProvider.js +34 -2
  100. package/dist/runtime/plugins/blokkliEditable.js +74 -3
  101. package/dist/runtime/types/index.d.ts +13 -1
  102. package/package.json +1 -1
  103. package/dist/runtime/components/Edit/DragInteractions/index.vue +0 -401
  104. package/dist/runtime/components/Edit/Features/Selection/AddButtons/AddButtonsField.vue +0 -54
  105. package/dist/runtime/components/Edit/Features/Selection/AddButtons/AddButtonsField.vue.d.ts +0 -14
  106. /package/dist/runtime/components/Edit/{DragInteractions → Features/Hover}/index.vue.d.ts +0 -0
@@ -125,7 +125,7 @@ let snakeCanvas = null;
125
125
  let logoCanvas = null;
126
126
  let lastScore = -1;
127
127
  let lastBlocksEaten = -1;
128
- const cellMoveDuration = 250;
128
+ const MOVE_DURATION = 200;
129
129
  function generateFood() {
130
130
  let newFood;
131
131
  do {
@@ -227,7 +227,7 @@ function update(currentTime) {
227
227
  return;
228
228
  }
229
229
  const timeSinceLastUpdate = currentTime - lastCellUpdate;
230
- if (timeSinceLastUpdate >= cellMoveDuration) {
230
+ if (timeSinceLastUpdate >= MOVE_DURATION) {
231
231
  if (DEBUG_GAME) {
232
232
  nextDirection.value = getAIDirection();
233
233
  }
@@ -250,14 +250,14 @@ function update(currentTime) {
250
250
  }
251
251
  if (newHead.x < 0 || newHead.x >= worldWidth || newHead.y < 0 || newHead.y >= worldHeight) {
252
252
  gameOver.value = true;
253
- gameOverTime = lastCellUpdate + cellMoveDuration;
253
+ gameOverTime = lastCellUpdate + MOVE_DURATION;
254
254
  return;
255
255
  }
256
256
  if (snake.value.some(
257
257
  (segment) => segment.x === newHead.x && segment.y === newHead.y
258
258
  )) {
259
259
  gameOver.value = true;
260
- gameOverTime = lastCellUpdate + cellMoveDuration;
260
+ gameOverTime = lastCellUpdate + MOVE_DURATION;
261
261
  return;
262
262
  }
263
263
  lastCellUpdate = currentTime;
@@ -421,7 +421,7 @@ function draw(currentTime) {
421
421
  if (lastCellUpdate > 0) {
422
422
  const timeToUse = gameOver.value && gameOverTime > 0 ? gameOverTime : currentTime;
423
423
  const timeSinceLastUpdate = timeToUse - lastCellUpdate;
424
- movementProgress = Math.min(timeSinceLastUpdate / cellMoveDuration, 1);
424
+ movementProgress = Math.min(timeSinceLastUpdate / MOVE_DURATION, 1);
425
425
  }
426
426
  if (score.value !== lastScore || blocksEaten.value !== lastBlocksEaten) {
427
427
  drawScoreArea();
@@ -1,4 +1,7 @@
1
1
  import AddListItem from './AddListItem/index.vue.js';
2
+ import AddListItemIcon from './AddListItemIcon/index.vue.js';
3
+ import ArtboardTooltip from './ArtboardTooltip/index.vue.js';
4
+ import BlokkliTransition from './Transition/index.vue.js';
2
5
  import ConfigForm from './PluginConfigForm/index.vue.js';
3
6
  import DialogModal from './Dialog/index.vue.js';
4
7
  import DiffViewerState from './DiffViewer/State.vue.js';
@@ -23,8 +26,7 @@ import Resizable from './Resizable/index.vue.js';
23
26
  import ScaleToFit from './ScaleToFit/index.vue.js';
24
27
  import ScrollBoundary from './ScrollBoundary/index.vue.js';
25
28
  import ShortcutIndicator from './ShortcutIndicator/index.vue.js';
26
- import BlokkliTransition from './Transition/index.vue.js';
27
29
  import Sortli from './Sortli/index.vue.js';
30
+ import Banner from './Banner/index.vue.js';
28
31
  import ViewportBlockingRect from './ViewportBlockingRect/index.vue.js';
29
- import AddListItemIcon from './AddListItemIcon/index.vue.js';
30
- export { AddListItem, AddListItemIcon, ConfigForm, DialogModal, DiffViewerState, FormDatepicker, FormGroup, FormItem, FormOverlay, FormRadio, FormSelect, FormText, FormTextarea, FormToggle, FormRadioTabs, Highlight, Icon, InfoBox, ItemIcon, Loading, Pagination, RelativeTime, Resizable, ScaleToFit, ScrollBoundary, ShortcutIndicator, Sortli, ViewportBlockingRect, BlokkliTransition, };
32
+ export { AddListItem, AddListItemIcon, ArtboardTooltip, BlokkliTransition, ConfigForm, DialogModal, DiffViewerState, FormDatepicker, FormGroup, FormItem, FormOverlay, FormRadio, FormRadioTabs, FormSelect, FormText, FormTextarea, FormToggle, Highlight, Icon, InfoBox, ItemIcon, Loading, Pagination, RelativeTime, Resizable, ScaleToFit, ScrollBoundary, ShortcutIndicator, Sortli, ViewportBlockingRect, Banner, };
@@ -1,4 +1,7 @@
1
1
  import AddListItem from "./AddListItem/index.vue";
2
+ import AddListItemIcon from "./AddListItemIcon/index.vue";
3
+ import ArtboardTooltip from "./ArtboardTooltip/index.vue";
4
+ import BlokkliTransition from "./Transition/index.vue";
2
5
  import ConfigForm from "./PluginConfigForm/index.vue";
3
6
  import DialogModal from "./Dialog/index.vue";
4
7
  import DiffViewerState from "./DiffViewer/State.vue";
@@ -23,13 +26,14 @@ import Resizable from "./Resizable/index.vue";
23
26
  import ScaleToFit from "./ScaleToFit/index.vue";
24
27
  import ScrollBoundary from "./ScrollBoundary/index.vue";
25
28
  import ShortcutIndicator from "./ShortcutIndicator/index.vue";
26
- import BlokkliTransition from "./Transition/index.vue";
27
29
  import Sortli from "./Sortli/index.vue";
30
+ import Banner from "./Banner/index.vue";
28
31
  import ViewportBlockingRect from "./ViewportBlockingRect/index.vue";
29
- import AddListItemIcon from "./AddListItemIcon/index.vue";
30
32
  export {
31
33
  AddListItem,
32
34
  AddListItemIcon,
35
+ ArtboardTooltip,
36
+ BlokkliTransition,
33
37
  ConfigForm,
34
38
  DialogModal,
35
39
  DiffViewerState,
@@ -38,11 +42,11 @@ export {
38
42
  FormItem,
39
43
  FormOverlay,
40
44
  FormRadio,
45
+ FormRadioTabs,
41
46
  FormSelect,
42
47
  FormText,
43
48
  FormTextarea,
44
49
  FormToggle,
45
- FormRadioTabs,
46
50
  Highlight,
47
51
  Icon,
48
52
  InfoBox,
@@ -56,5 +60,5 @@ export {
56
60
  ShortcutIndicator,
57
61
  Sortli,
58
62
  ViewportBlockingRect,
59
- BlokkliTransition
63
+ Banner
60
64
  };
@@ -6,7 +6,8 @@ import {
6
6
  INJECT_REUSABLE_OPTIONS,
7
7
  INJECT_PROVIDER_BLOCKS,
8
8
  INJECT_PROVIDER_CONTEXT,
9
- INJECT_FIELD_USES_PROXY
9
+ INJECT_FIELD_USES_PROXY,
10
+ INJECT_REUSABLE_UUID
10
11
  } from "../helpers/symbols.js";
11
12
  import { computed, inject } from "#imports";
12
13
  import { getRuntimeOptionValue } from "#blokkli/helpers/runtimeHelpers";
@@ -45,6 +46,7 @@ export function defineBlokkli(arg) {
45
46
  INJECT_REUSABLE_OPTIONS,
46
47
  null
47
48
  );
49
+ const reusableUuid = inject(INJECT_REUSABLE_UUID, null);
48
50
  const editContext = inject(INJECT_EDIT_CONTEXT, null);
49
51
  const provider = inject(
50
52
  INJECT_PROVIDER_CONTEXT,
@@ -95,7 +97,7 @@ export function defineBlokkli(arg) {
95
97
  if (editContext?.useBlockRegistration && editContext.dom && bundle !== BUNDLE_FROM_LIBRARY && bundle !== BUNDLE_BLOKKLI_FRAGMENT) {
96
98
  const isProxyMode = inject(INJECT_FIELD_USES_PROXY, false);
97
99
  if (!isProxyMode) {
98
- editContext.useBlockRegistration(editContext.dom, uuid);
100
+ editContext.useBlockRegistration(editContext.dom, reusableUuid ?? uuid);
99
101
  }
100
102
  }
101
103
  return {