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

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 (194) hide show
  1. package/dist/module.json +1 -1
  2. package/dist/module.mjs +640 -137
  3. package/dist/modules/drupal/graphql/base/fragment.blokkliProps.graphql +1 -1
  4. package/dist/modules/drupal/graphql/base/fragment.paragraphsFieldItem.graphql +3 -1
  5. package/dist/modules/drupal/graphql/base/query.pbConfig.graphql +1 -10
  6. package/dist/modules/drupal/graphql/features/comments.graphql +11 -8
  7. package/dist/modules/drupal/graphql/mutations/set_paragraph_schedule.graphql +15 -0
  8. package/dist/modules/drupal/index.mjs +33 -0
  9. package/dist/modules/drupal/runtime/adapter/index.js +12 -4
  10. package/dist/runtime/adapter/index.d.ts +21 -0
  11. package/dist/runtime/blokkliPlugins/ContextMenu/Menu/index.vue +3 -0
  12. package/dist/runtime/blokkliPlugins/ItemAction/index.vue +23 -15
  13. package/dist/runtime/blokkliPlugins/ItemAction/index.vue.d.ts +20 -44
  14. package/dist/runtime/blokkliPlugins/TourItem/index.vue +10 -5
  15. package/dist/runtime/components/Blocks/FromLibrary/index.vue +4 -2
  16. package/dist/runtime/components/BlokkliEditable.vue +32 -14
  17. package/dist/runtime/components/BlokkliField.vue +3 -0
  18. package/dist/runtime/components/BlokkliField.vue.d.ts +3 -3
  19. package/dist/runtime/components/BlokkliItem.vue +1 -1
  20. package/dist/runtime/components/BlokkliItem.vue.d.ts +4 -2
  21. package/dist/runtime/components/BlokkliProvider.vue +41 -28
  22. package/dist/runtime/components/BlokkliProvider.vue.d.ts +2 -1
  23. package/dist/runtime/components/Edit/Actions/index.vue +36 -20
  24. package/dist/runtime/components/Edit/AnimationCanvas/index.vue +436 -25
  25. package/dist/runtime/components/Edit/ArtboardTooltip/index.vue +83 -0
  26. package/dist/runtime/components/Edit/ArtboardTooltip/index.vue.d.ts +32 -0
  27. package/dist/runtime/components/Edit/Banner/index.vue +51 -0
  28. package/dist/runtime/components/Edit/Banner/index.vue.d.ts +18 -0
  29. package/dist/runtime/components/Edit/Dialog/index.vue +6 -4
  30. package/dist/runtime/components/Edit/DraggableList.vue +15 -7
  31. package/dist/runtime/components/Edit/DraggableList.vue.d.ts +5 -5
  32. package/dist/runtime/components/Edit/EditIndicator.vue +118 -44
  33. package/dist/runtime/components/Edit/EditIndicator.vue.d.ts +3 -0
  34. package/dist/runtime/components/Edit/EditProvider.vue +101 -31
  35. package/dist/runtime/components/Edit/EditProvider.vue.d.ts +3 -0
  36. package/dist/runtime/components/Edit/Features/AddList/index.vue +9 -11
  37. package/dist/runtime/components/Edit/Features/Analyze/Overlay/index.vue +28 -26
  38. package/dist/runtime/components/Edit/Features/Analyze/Renderer.vue +1 -1
  39. package/dist/runtime/components/Edit/Features/Analyze/Results/ResultsItemNodesTarget.vue +15 -11
  40. package/dist/runtime/components/Edit/Features/Anchors/Renderer.vue +19 -102
  41. package/dist/runtime/components/Edit/Features/Artboard/Renderer.vue +3 -0
  42. package/dist/runtime/components/Edit/Features/BlockAddList/index.vue +29 -53
  43. package/dist/runtime/components/Edit/Features/BlockScheduler/Dialog/ScheduleSection.vue +154 -0
  44. package/dist/runtime/components/Edit/Features/BlockScheduler/Dialog/ScheduleSection.vue.d.ts +27 -0
  45. package/dist/runtime/components/Edit/Features/BlockScheduler/Dialog/index.vue +222 -0
  46. package/dist/runtime/components/Edit/Features/{Selection/AddButtons/AddButtonsField.vue.d.ts → BlockScheduler/Dialog/index.vue.d.ts} +6 -9
  47. package/dist/runtime/components/Edit/Features/BlockScheduler/index.vue +96 -0
  48. package/dist/runtime/components/Edit/Features/Clipboard/index.vue +15 -16
  49. package/dist/runtime/components/Edit/Features/CommandPalette/Palette/Item/index.vue +51 -0
  50. package/dist/runtime/components/Edit/Features/CommandPalette/Palette/{Group → Item}/index.vue.d.ts +9 -13
  51. package/dist/runtime/components/Edit/Features/CommandPalette/Palette/index.vue +46 -66
  52. package/dist/runtime/components/Edit/Features/CommandPalette/index.vue +2 -0
  53. package/dist/runtime/components/Edit/Features/Comments/AddForm/index.vue +35 -20
  54. package/dist/runtime/components/Edit/Features/Comments/AddForm/index.vue.d.ts +5 -3
  55. package/dist/runtime/components/Edit/Features/Comments/CommentInput/index.vue +29 -0
  56. package/dist/runtime/components/Edit/Features/{Publish/Dialog/ScheduleDate.vue.d.ts → Comments/CommentInput/index.vue.d.ts} +2 -2
  57. package/dist/runtime/components/Edit/Features/Comments/Overlay/Item/index.vue +22 -16
  58. package/dist/runtime/components/Edit/Features/Comments/Overlay/Item/index.vue.d.ts +1 -0
  59. package/dist/runtime/components/Edit/Features/Comments/Overlay/index.vue +15 -6
  60. package/dist/runtime/components/Edit/Features/Comments/index.vue +21 -9
  61. package/dist/runtime/components/Edit/Features/Conversions/index.vue +4 -7
  62. package/dist/runtime/components/Edit/Features/Debug/Rects/index.vue +26 -35
  63. package/dist/runtime/components/Edit/Features/Debug/Renderer.vue +240 -0
  64. package/dist/runtime/components/Edit/Features/Debug/Renderer.vue.d.ts +6 -0
  65. package/dist/runtime/components/Edit/Features/Debug/index.vue +7 -165
  66. package/dist/runtime/components/Edit/Features/Delete/index.vue +1 -1
  67. package/dist/runtime/components/Edit/Features/DraggingOverlay/DragItems/index.vue +14 -6
  68. package/dist/runtime/components/Edit/Features/DraggingOverlay/DropTargets/index.vue +55 -48
  69. package/dist/runtime/components/Edit/Features/DraggingOverlay/index.vue +30 -18
  70. package/dist/runtime/components/Edit/Features/Duplicate/index.vue +6 -8
  71. package/dist/runtime/components/Edit/Features/Edit/index.vue +16 -22
  72. package/dist/runtime/components/Edit/Features/EditForm/index.vue +7 -6
  73. package/dist/runtime/components/Edit/Features/EditableField/Overlay/Frame/index.vue +69 -4
  74. package/dist/runtime/components/Edit/Features/EditableField/Overlay/Frame/index.vue.d.ts +2 -2
  75. package/dist/runtime/components/Edit/Features/EditableField/Overlay/Plaintext/index.vue +13 -9
  76. package/dist/runtime/components/Edit/Features/EditableField/Overlay/index.vue +45 -87
  77. package/dist/runtime/components/Edit/Features/EditableField/Overlay/index.vue.d.ts +2 -2
  78. package/dist/runtime/components/Edit/Features/EditableField/index.vue +41 -43
  79. package/dist/runtime/components/Edit/Features/Fragments/Dialog/index.vue +11 -9
  80. package/dist/runtime/components/Edit/Features/Fragments/index.vue +3 -3
  81. package/dist/runtime/components/Edit/Features/History/index.vue +5 -2
  82. package/dist/runtime/components/Edit/Features/Hover/Overlay/fragment.glsl +139 -0
  83. package/dist/runtime/components/Edit/Features/Hover/Overlay/index.vue +261 -0
  84. package/dist/runtime/components/Edit/Features/Hover/Overlay/index.vue.d.ts +6 -0
  85. package/dist/runtime/components/Edit/Features/Hover/Overlay/vertex.glsl +117 -0
  86. package/dist/runtime/components/Edit/Features/Hover/index.vue +25 -0
  87. package/dist/runtime/components/Edit/Features/Hover/index.vue.d.ts +2 -0
  88. package/dist/runtime/components/Edit/Features/Library/EditReusable/index.vue +5 -7
  89. package/dist/runtime/components/Edit/Features/Library/LibraryDialog/index.vue +19 -27
  90. package/dist/runtime/components/Edit/Features/Library/ReusableDialog/index.vue +32 -28
  91. package/dist/runtime/components/Edit/Features/Library/index.vue +28 -23
  92. package/dist/runtime/components/Edit/Features/MediaLibrary/Library/index.vue +6 -3
  93. package/dist/runtime/components/Edit/Features/MediaLibrary/index.vue +15 -12
  94. package/dist/runtime/components/Edit/Features/MultiSelect/Overlay/index.vue +36 -29
  95. package/dist/runtime/components/Edit/Features/MultiSelect/index.vue +2 -4
  96. package/dist/runtime/components/Edit/Features/Options/Form/Item.vue +6 -1
  97. package/dist/runtime/components/Edit/Features/Options/Form/index.vue +8 -6
  98. package/dist/runtime/components/Edit/Features/Options/index.vue +6 -6
  99. package/dist/runtime/components/Edit/Features/Ownership/Renderer.vue +35 -0
  100. package/dist/runtime/components/Edit/Features/Ownership/Renderer.vue.d.ts +6 -0
  101. package/dist/runtime/components/Edit/Features/Ownership/index.vue +7 -25
  102. package/dist/runtime/components/Edit/Features/ProxyView/index.vue +5 -1
  103. package/dist/runtime/components/Edit/Features/Publish/Dialog/index.vue +68 -15
  104. package/dist/runtime/components/Edit/Features/Search/Overlay/Results/Page/index.vue +15 -15
  105. package/dist/runtime/components/Edit/Features/Search/index.vue +4 -1
  106. package/dist/runtime/components/Edit/Features/Selection/AddButtons/Overlay/index.vue +39 -74
  107. package/dist/runtime/components/Edit/Features/Selection/AddButtons/Overlay/index.vue.d.ts +7 -5
  108. package/dist/runtime/components/Edit/Features/Selection/AddButtons/Renderer/fragment.glsl +106 -0
  109. package/dist/runtime/components/Edit/Features/Selection/AddButtons/Renderer/index.vue +440 -0
  110. package/dist/runtime/components/Edit/Features/Selection/AddButtons/Renderer/index.vue.d.ts +32 -0
  111. package/dist/runtime/components/Edit/Features/Selection/AddButtons/Renderer/vertex.glsl +102 -0
  112. package/dist/runtime/components/Edit/Features/Selection/AddButtons/index.vue +53 -125
  113. package/dist/runtime/components/Edit/Features/Selection/AddButtons/index.vue.d.ts +2 -2
  114. package/dist/runtime/components/Edit/Features/Selection/Overlay/index.vue +88 -29
  115. package/dist/runtime/components/Edit/Features/Selection/Overlay/index.vue.d.ts +5 -3
  116. package/dist/runtime/components/Edit/Features/Selection/Overlay/vertex.glsl +11 -2
  117. package/dist/runtime/components/Edit/Features/Selection/OverlayFallback/index.vue +2 -2
  118. package/dist/runtime/components/Edit/Features/Selection/index.vue +66 -39
  119. package/dist/runtime/components/Edit/Features/Structure/List/Field/index.vue +2 -2
  120. package/dist/runtime/components/Edit/Features/Structure/List/Item/index.vue +13 -6
  121. package/dist/runtime/components/Edit/Features/Tour/Overlay/index.vue +3 -0
  122. package/dist/runtime/components/Edit/Features/Transform/index.vue +2 -27
  123. package/dist/runtime/components/Edit/Features/Translations/Banner/index.vue +17 -11
  124. package/dist/runtime/components/Edit/Features/Translations/index.vue +20 -23
  125. package/dist/runtime/components/Edit/Features/Validations/SidebarItem/index.vue +5 -5
  126. package/dist/runtime/components/Edit/Features/index.vue +17 -7
  127. package/dist/runtime/components/Edit/Form/Text/index.vue +2 -1
  128. package/dist/runtime/components/Edit/Form/Text/index.vue.d.ts +1 -0
  129. package/dist/runtime/components/Edit/Form/Toggle/index.vue +4 -3
  130. package/dist/runtime/components/Edit/Form/Toggle/index.vue.d.ts +12 -2
  131. package/dist/runtime/components/Edit/Indicators/index.vue +1 -1
  132. package/dist/runtime/components/Edit/InfoBox/index.vue +6 -2
  133. package/dist/runtime/components/Edit/InfoBox/index.vue.d.ts +12 -2
  134. package/dist/runtime/components/Edit/Konami/Game/index.vue +5 -5
  135. package/dist/runtime/components/Edit/{Features/Publish/Dialog/ScheduleDate.vue → ScheduleDate/index.vue} +6 -58
  136. package/dist/runtime/components/Edit/ScheduleDate/index.vue.d.ts +23 -0
  137. package/dist/runtime/components/Edit/ShortcutIndicator/index.vue +3 -0
  138. package/dist/runtime/components/Edit/Transition/Height.vue +95 -0
  139. package/dist/runtime/components/Edit/Transition/Height.vue.d.ts +36 -0
  140. package/dist/runtime/components/Edit/index.d.ts +7 -3
  141. package/dist/runtime/components/Edit/index.js +12 -4
  142. package/dist/runtime/composables/defineBlokkli.js +4 -2
  143. package/dist/runtime/css/output.css +1 -1
  144. package/dist/runtime/helpers/animationProvider.d.ts +35 -1
  145. package/dist/runtime/helpers/animationProvider.js +179 -48
  146. package/dist/runtime/helpers/composables/defineRenderer.d.ts +8 -0
  147. package/dist/runtime/helpers/composables/defineRenderer.js +8 -0
  148. package/dist/runtime/helpers/composables/useStateBasedCache.d.ts +4 -0
  149. package/dist/runtime/helpers/composables/useStateBasedCache.js +13 -0
  150. package/dist/runtime/helpers/composables/useStickyToolbar.d.ts +4 -1
  151. package/dist/runtime/helpers/composables/useStickyToolbar.js +53 -35
  152. package/dist/runtime/helpers/definitionProvider.d.ts +1 -1
  153. package/dist/runtime/helpers/dom/index.d.ts +1 -0
  154. package/dist/runtime/helpers/domProvider.d.ts +54 -14
  155. package/dist/runtime/helpers/domProvider.js +168 -134
  156. package/dist/runtime/helpers/index.d.ts +1 -8
  157. package/dist/runtime/helpers/index.js +1 -84
  158. package/dist/runtime/helpers/providers/blocks.d.ts +10 -0
  159. package/dist/runtime/helpers/providers/blocks.js +91 -0
  160. package/dist/runtime/helpers/providers/directive.d.ts +24 -0
  161. package/dist/runtime/helpers/providers/directive.js +205 -0
  162. package/dist/runtime/helpers/providers/element.d.ts +6 -0
  163. package/dist/runtime/helpers/providers/element.js +35 -0
  164. package/dist/runtime/helpers/providers/fields.d.ts +8 -0
  165. package/dist/runtime/helpers/providers/fields.js +47 -0
  166. package/dist/runtime/helpers/selectionProvider.d.ts +11 -11
  167. package/dist/runtime/helpers/selectionProvider.js +38 -45
  168. package/dist/runtime/helpers/stateProvider.d.ts +7 -2
  169. package/dist/runtime/helpers/stateProvider.js +83 -14
  170. package/dist/runtime/helpers/storageProvider.d.ts +3 -2
  171. package/dist/runtime/helpers/storageProvider.js +6 -2
  172. package/dist/runtime/helpers/symbols.d.ts +1 -0
  173. package/dist/runtime/helpers/symbols.js +1 -0
  174. package/dist/runtime/helpers/themeProvider.d.ts +2 -1
  175. package/dist/runtime/helpers/themeProvider.js +24 -14
  176. package/dist/runtime/helpers/typesProvider.js +10 -26
  177. package/dist/runtime/helpers/uiProvider.d.ts +11 -3
  178. package/dist/runtime/helpers/uiProvider.js +45 -17
  179. package/dist/runtime/icons/calendar.svg +1 -0
  180. package/dist/runtime/icons/clock.svg +1 -0
  181. package/dist/runtime/icons/comment_add.svg +1 -5
  182. package/dist/runtime/icons/delete.svg +1 -8
  183. package/dist/runtime/icons/duplicate.svg +1 -12
  184. package/dist/runtime/icons/edit.svg +1 -8
  185. package/dist/runtime/icons/reusable.svg +1 -5
  186. package/dist/runtime/plugins/blokkliDirectives.js +96 -0
  187. package/dist/runtime/types/index.d.ts +66 -35
  188. package/package.json +1 -1
  189. package/dist/runtime/components/Edit/DragInteractions/index.vue +0 -401
  190. package/dist/runtime/components/Edit/Features/CommandPalette/Palette/Group/index.vue +0 -63
  191. package/dist/runtime/components/Edit/Features/Selection/AddButtons/AddButtonsField.vue +0 -54
  192. package/dist/runtime/plugins/blokkliEditable.js +0 -31
  193. /package/dist/runtime/components/Edit/{DragInteractions → Features/BlockScheduler}/index.vue.d.ts +0 -0
  194. /package/dist/runtime/plugins/{blokkliEditable.d.ts → blokkliDirectives.d.ts} +0 -0
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <Teleport to="body">
2
+ <Teleport to="#bk-canvas-overlay">
3
3
  <div id="bk-indicators" class="bk bk-indicators" :style>
4
4
  <div id="bk-indicators-left" />
5
5
  <div id="bk-indicators-right" />
@@ -1,13 +1,17 @@
1
1
  <template>
2
2
  <div class="bk-info-box">
3
3
  <Icon name="info" />
4
- <p v-html="text" />
4
+ <div>
5
+ <slot>
6
+ <p v-html="text" />
7
+ </slot>
8
+ </div>
5
9
  </div>
6
10
  </template>
7
11
 
8
12
  <script setup>
9
13
  import { Icon } from "#blokkli/components";
10
14
  defineProps({
11
- text: { type: String, required: true }
15
+ text: { type: String, required: false }
12
16
  });
13
17
  </script>
@@ -1,5 +1,15 @@
1
1
  type __VLS_Props = {
2
- text: string;
2
+ text?: string;
3
3
  };
4
- declare const _default: 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>;
4
+ declare var __VLS_5: {};
5
+ type __VLS_Slots = {} & {
6
+ default?: (props: typeof __VLS_5) => any;
7
+ };
8
+ 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>;
9
+ declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
5
10
  export default _default;
11
+ type __VLS_WithSlots<T, S> = T & {
12
+ new (): {
13
+ $slots: S;
14
+ };
15
+ };
@@ -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();
@@ -41,41 +41,7 @@
41
41
  </button>
42
42
  </div>
43
43
 
44
- <div class="bk-schedule-date-presets">
45
- <button
46
- type="button"
47
- class="bk-button bk-is-small"
48
- :disabled="disabled"
49
- @click="setTomorrow"
50
- >
51
- {{ $t("publishScheduleTomorrow", "Tomorrow") }}
52
- </button>
53
- <button
54
- type="button"
55
- class="bk-button bk-is-small"
56
- :disabled="disabled"
57
- @click="setInSevenDays"
58
- >
59
- {{ $t("publishScheduleInSevenDays", "In 7 days") }}
60
- </button>
61
- <button
62
- type="button"
63
- class="bk-button bk-is-small"
64
- :disabled="disabled"
65
- @click="setNextMonday"
66
- >
67
- {{ $t("publishScheduleNextMonday", "Next Monday") }}
68
- </button>
69
- </div>
70
- <div
71
- class="bk-schedule-date-info"
72
- v-text="
73
- $t(
74
- 'publishScheduledInfo',
75
- 'You can still make changes until the scheduled publication date.'
76
- )
77
- "
78
- />
44
+ <slot />
79
45
  <div v-if="error" class="bk-schedule-date-error">
80
46
  {{ error }}
81
47
  </div>
@@ -86,7 +52,7 @@
86
52
  <script setup>
87
53
  import { ref, computed, watch, useBlokkli } from "#imports";
88
54
  import { FormDatepicker, Icon } from "#blokkli/components";
89
- const { $t, ui } = useBlokkli();
55
+ const { ui } = useBlokkli();
90
56
  defineProps({
91
57
  disabled: { type: Boolean, required: false },
92
58
  error: { type: String, required: false }
@@ -152,32 +118,14 @@ watch(modelValue, (newValue) => {
152
118
  selectedTime.value = newTime;
153
119
  }
154
120
  });
155
- function setTomorrow() {
156
- const tomorrow = /* @__PURE__ */ new Date();
157
- tomorrow.setDate(tomorrow.getDate() + 1);
158
- selectedDate.value = formatDate(tomorrow);
159
- }
160
- function setInSevenDays() {
161
- const date = /* @__PURE__ */ new Date();
162
- date.setDate(date.getDate() + 7);
163
- selectedDate.value = formatDate(date);
164
- }
165
- function setNextMonday() {
166
- const today = /* @__PURE__ */ new Date();
167
- const dayOfWeek = today.getDay();
168
- const daysUntilMonday = dayOfWeek === 0 ? 1 : 8 - dayOfWeek;
169
- const nextMonday = /* @__PURE__ */ new Date();
170
- nextMonday.setDate(today.getDate() + daysUntilMonday);
171
- selectedDate.value = formatDate(nextMonday);
172
- }
173
121
  function incrementHour() {
174
122
  const [hours = 0, minutes = 0] = selectedTime.value.split(":").map(Number);
175
- const newHours = (hours + 1) % 24;
176
- selectedTime.value = `${String(newHours).padStart(2, "0")}:${String(minutes).padStart(2, "0")}`;
123
+ const newHours = minutes > 0 ? (hours + 1) % 24 : (hours + 1) % 24;
124
+ selectedTime.value = `${String(newHours).padStart(2, "0")}:00`;
177
125
  }
178
126
  function decrementHour() {
179
127
  const [hours = 0, minutes = 0] = selectedTime.value.split(":").map(Number);
180
- const newHours = hours === 0 ? 23 : hours - 1;
181
- selectedTime.value = `${String(newHours).padStart(2, "0")}:${String(minutes).padStart(2, "0")}`;
128
+ const newHours = minutes > 0 ? hours : hours === 0 ? 23 : hours - 1;
129
+ selectedTime.value = `${String(newHours).padStart(2, "0")}:00`;
182
130
  }
183
131
  </script>
@@ -0,0 +1,23 @@
1
+ type __VLS_Props = {
2
+ disabled?: boolean;
3
+ error?: string;
4
+ };
5
+ type __VLS_PublicProps = __VLS_Props & {
6
+ modelValue?: string;
7
+ };
8
+ declare var __VLS_13: {};
9
+ type __VLS_Slots = {} & {
10
+ default?: (props: typeof __VLS_13) => any;
11
+ };
12
+ declare const __VLS_component: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
13
+ "update:modelValue": (value: string | undefined) => any;
14
+ }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
15
+ "onUpdate:modelValue"?: ((value: string | undefined) => any) | undefined;
16
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
17
+ declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
18
+ export default _default;
19
+ type __VLS_WithSlots<T, S> = T & {
20
+ new (): {
21
+ $slots: S;
22
+ };
23
+ };
@@ -54,6 +54,9 @@ if (!props.viewOnly) {
54
54
  });
55
55
  }
56
56
  onBlokkliEvent("keyPressed", (e) => {
57
+ if (ui.hasDialogOpen.value) {
58
+ return;
59
+ }
57
60
  const checkKey = [e.meta, e.shift, e.code.toLowerCase()].join("-");
58
61
  if (key.value !== checkKey) {
59
62
  return;
@@ -0,0 +1,95 @@
1
+ <template>
2
+ <Transition :css="false" @enter="enterTransition" @leave="leaveTransition">
3
+ <slot />
4
+ </Transition>
5
+ </template>
6
+
7
+ <script setup>
8
+ const props = defineProps({
9
+ duration: { type: Number, required: false, default: 200 },
10
+ opacity: { type: Boolean, required: false, default: false },
11
+ easingEnter: { type: String, required: false, default: "ease-in-out" },
12
+ easingLeave: { type: String, required: false, default: "ease-in-out" }
13
+ });
14
+ const getElementStyle = (element) => {
15
+ return {
16
+ height: element.style.height,
17
+ width: element.style.width,
18
+ position: element.style.position,
19
+ visibility: element.style.visibility,
20
+ overflow: element.style.overflow,
21
+ paddingTop: element.style.paddingTop,
22
+ paddingBottom: element.style.paddingBottom,
23
+ borderTopWidth: element.style.borderTopWidth,
24
+ borderBottomWidth: element.style.borderBottomWidth,
25
+ marginTop: element.style.marginTop,
26
+ marginBottom: element.style.marginBottom
27
+ };
28
+ };
29
+ const prepareElement = (element, initialStyle) => {
30
+ const { width } = getComputedStyle(element);
31
+ element.style.width = width;
32
+ element.style.position = "absolute";
33
+ element.style.visibility = "hidden";
34
+ element.style.height = "";
35
+ const { height } = getComputedStyle(element);
36
+ element.style.width = initialStyle.width;
37
+ element.style.position = initialStyle.position;
38
+ element.style.visibility = initialStyle.visibility;
39
+ element.style.height = "0px";
40
+ element.style.overflow = "hidden";
41
+ return initialStyle.height && initialStyle.height !== "0px" ? initialStyle.height : height;
42
+ };
43
+ const animateTransition = (element, initialStyle, done, keyframes, options) => {
44
+ const animation = element.animate(keyframes, options);
45
+ element.style.height = initialStyle.height;
46
+ animation.onfinish = () => {
47
+ element.style.overflow = initialStyle.overflow;
48
+ done();
49
+ };
50
+ };
51
+ const getEnterKeyframes = (height, initialStyle) => [
52
+ {
53
+ height: "0px",
54
+ opacity: props.opacity ? 0 : 1,
55
+ paddingTop: "0px",
56
+ paddingBottom: "0px",
57
+ borderTopWidth: "0px",
58
+ borderBottomWidth: "0px",
59
+ marginTop: "0px",
60
+ marginBottom: "0px"
61
+ },
62
+ {
63
+ height,
64
+ opacity: props.opacity ? 1 : 1,
65
+ paddingTop: initialStyle.paddingTop,
66
+ paddingBottom: initialStyle.paddingBottom,
67
+ borderTopWidth: initialStyle.borderTopWidth,
68
+ borderBottomWidth: initialStyle.borderBottomWidth,
69
+ marginTop: initialStyle.marginTop,
70
+ marginBottom: initialStyle.marginBottom
71
+ }
72
+ ];
73
+ const enterTransition = (element, done) => {
74
+ if (!(element instanceof HTMLElement)) {
75
+ return done();
76
+ }
77
+ const initialStyle = getElementStyle(element);
78
+ const height = prepareElement(element, initialStyle);
79
+ const keyframes = getEnterKeyframes(height, initialStyle);
80
+ const options = { duration: props.duration, easing: props.easingEnter };
81
+ animateTransition(element, initialStyle, done, keyframes, options);
82
+ };
83
+ const leaveTransition = (element, done) => {
84
+ if (!(element instanceof HTMLElement)) {
85
+ return done();
86
+ }
87
+ const initialStyle = getElementStyle(element);
88
+ const { height } = getComputedStyle(element);
89
+ element.style.height = height;
90
+ element.style.overflow = "hidden";
91
+ const keyframes = getEnterKeyframes(height, initialStyle).reverse();
92
+ const options = { duration: props.duration, easing: props.easingLeave };
93
+ animateTransition(element, initialStyle, done, keyframes, options);
94
+ };
95
+ </script>
@@ -0,0 +1,36 @@
1
+ type __VLS_Props = {
2
+ /**
3
+ * The duration of the transition.
4
+ */
5
+ duration?: number;
6
+ /**
7
+ * Whether to also transition the opacity.
8
+ * If set, the element is transitioned from 0 to 1 and vice versa.
9
+ */
10
+ opacity?: boolean;
11
+ /**
12
+ * The easing function when entering.
13
+ */
14
+ easingEnter?: string;
15
+ /**
16
+ * The easing function when leaving.
17
+ */
18
+ easingLeave?: string;
19
+ };
20
+ declare var __VLS_10: {};
21
+ type __VLS_Slots = {} & {
22
+ default?: (props: typeof __VLS_10) => any;
23
+ };
24
+ declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
25
+ opacity: boolean;
26
+ duration: number;
27
+ easingEnter: string;
28
+ easingLeave: string;
29
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
30
+ declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
31
+ export default _default;
32
+ type __VLS_WithSlots<T, S> = T & {
33
+ new (): {
34
+ $slots: S;
35
+ };
36
+ };
@@ -1,4 +1,8 @@
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';
5
+ import TransitionHeight from './Transition/Height.vue.js';
2
6
  import ConfigForm from './PluginConfigForm/index.vue.js';
3
7
  import DialogModal from './Dialog/index.vue.js';
4
8
  import DiffViewerState from './DiffViewer/State.vue.js';
@@ -23,8 +27,8 @@ import Resizable from './Resizable/index.vue.js';
23
27
  import ScaleToFit from './ScaleToFit/index.vue.js';
24
28
  import ScrollBoundary from './ScrollBoundary/index.vue.js';
25
29
  import ShortcutIndicator from './ShortcutIndicator/index.vue.js';
26
- import BlokkliTransition from './Transition/index.vue.js';
27
30
  import Sortli from './Sortli/index.vue.js';
31
+ import Banner from './Banner/index.vue.js';
32
+ import ScheduleDate from './ScheduleDate/index.vue.js';
28
33
  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, };
34
+ 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, ScheduleDate, TransitionHeight, };
@@ -1,4 +1,8 @@
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";
5
+ import TransitionHeight from "./Transition/Height.vue";
2
6
  import ConfigForm from "./PluginConfigForm/index.vue";
3
7
  import DialogModal from "./Dialog/index.vue";
4
8
  import DiffViewerState from "./DiffViewer/State.vue";
@@ -23,13 +27,15 @@ import Resizable from "./Resizable/index.vue";
23
27
  import ScaleToFit from "./ScaleToFit/index.vue";
24
28
  import ScrollBoundary from "./ScrollBoundary/index.vue";
25
29
  import ShortcutIndicator from "./ShortcutIndicator/index.vue";
26
- import BlokkliTransition from "./Transition/index.vue";
27
30
  import Sortli from "./Sortli/index.vue";
31
+ import Banner from "./Banner/index.vue";
32
+ import ScheduleDate from "./ScheduleDate/index.vue";
28
33
  import ViewportBlockingRect from "./ViewportBlockingRect/index.vue";
29
- import AddListItemIcon from "./AddListItemIcon/index.vue";
30
34
  export {
31
35
  AddListItem,
32
36
  AddListItemIcon,
37
+ ArtboardTooltip,
38
+ BlokkliTransition,
33
39
  ConfigForm,
34
40
  DialogModal,
35
41
  DiffViewerState,
@@ -38,11 +44,11 @@ export {
38
44
  FormItem,
39
45
  FormOverlay,
40
46
  FormRadio,
47
+ FormRadioTabs,
41
48
  FormSelect,
42
49
  FormText,
43
50
  FormTextarea,
44
51
  FormToggle,
45
- FormRadioTabs,
46
52
  Highlight,
47
53
  Icon,
48
54
  InfoBox,
@@ -56,5 +62,7 @@ export {
56
62
  ShortcutIndicator,
57
63
  Sortli,
58
64
  ViewportBlockingRect,
59
- BlokkliTransition
65
+ Banner,
66
+ ScheduleDate,
67
+ TransitionHeight
60
68
  };
@@ -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 {