@blokkli/editor 2.0.0-alpha.53 → 2.0.0-alpha.54

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.53",
4
+ "version": "2.0.0-alpha.54",
5
5
  "compatibility": {
6
6
  "nuxt": ">=3.15.0"
7
7
  },
package/dist/module.mjs CHANGED
@@ -19,7 +19,7 @@ import 'typescript';
19
19
  import 'oxc-walker';
20
20
 
21
21
  const name = "@blokkli/editor";
22
- const version = "2.0.0-alpha.53";
22
+ const version = "2.0.0-alpha.54";
23
23
 
24
24
  function validateOption(optionKey, option, icons) {
25
25
  const errors = [];
@@ -36,7 +36,7 @@
36
36
  <div
37
37
  v-show="activeSidebarRightBottom"
38
38
  id="bk-sidebar-content-right-bottom"
39
- class="bk-sidebar bk-is-right-bottom"
39
+ class="bk-sidebar bk-is-right-bottom bk"
40
40
  :class="{ 'bk-is-hidden': !sidebarVisible }"
41
41
  />
42
42
  </div>
@@ -5,6 +5,7 @@ type __VLS_Props = {
5
5
  fieldName: string;
6
6
  host: EntityContext;
7
7
  initialHeight: number;
8
+ isFullscreen: boolean;
8
9
  };
9
10
  /**
10
11
  * Push a new value into the iframe's editor.
@@ -1,9 +1,15 @@
1
1
  <template>
2
- <div class="bk-editable-field-frame">
2
+ <div
3
+ class="bk-editable-field-frame"
4
+ :class="{
5
+ 'bk-is-fullscreen': isFullscreen
6
+ }"
7
+ >
3
8
  <iframe
4
9
  ref="iframe"
5
- :style="{ height: Math.max(height, 400) + 'px' }"
10
+ :style
6
11
  :src="url"
12
+ class="_bk_block _bk_w-full"
7
13
  @load="onIframeLoad"
8
14
  />
9
15
  </div>
@@ -26,10 +32,21 @@ const props = defineProps({
26
32
  type: { type: String, required: true },
27
33
  fieldName: { type: String, required: true },
28
34
  host: { type: Object, required: true },
29
- initialHeight: { type: Number, required: true }
35
+ initialHeight: { type: Number, required: true },
36
+ isFullscreen: { type: Boolean, required: true }
30
37
  });
31
38
  const modelValue = defineModel({ type: String, ...{ required: true } });
32
39
  const emit = defineEmits(["formatted"]);
40
+ const style = computed(() => {
41
+ if (props.isFullscreen) {
42
+ return {
43
+ height: "100%"
44
+ };
45
+ }
46
+ return {
47
+ height: Math.max(height.value, 400) + "px"
48
+ };
49
+ });
33
50
  const iframe = useTemplateRef("iframe");
34
51
  function onIframeLoad() {
35
52
  if (!iframe.value || !PROPAGATE_WHEEL) {
@@ -124,22 +141,18 @@ onBeforeUnmount(() => {
124
141
  </script>
125
142
 
126
143
  <style>
127
- .bk .bk-editable-field-frame iframe {
128
- display: block;
129
- width: 100%;
130
- max-height: calc(100vh - 500px)
131
- }
132
-
133
- @media (min-width: 1024px) {
134
- .bk .bk-editable-field-frame iframe {
135
- min-width: 700px;
136
- min-height: 400px
137
- }
138
- }
139
-
140
- @media (min-width: 1280px) {
141
- .bk .bk-editable-field-frame iframe {
142
- min-width: 700px
143
- }
144
- }
144
+ .bk .bk-editable-field-frame:not(.bk-is-fullscreen) iframe {
145
+ max-height: calc(100vh - 500px);
146
+ }
147
+ @media (min-width: 1024px) {
148
+ .bk .bk-editable-field-frame:not(.bk-is-fullscreen) iframe {
149
+ min-width: 700px;
150
+ min-height: 400px;
151
+ }
152
+ }
153
+ @media (min-width: 1280px) {
154
+ .bk .bk-editable-field-frame:not(.bk-is-fullscreen) iframe {
155
+ min-width: 700px;
156
+ }
157
+ }
145
158
  </style>
@@ -5,6 +5,7 @@ type __VLS_Props = {
5
5
  fieldName: string;
6
6
  host: EntityContext;
7
7
  initialHeight: number;
8
+ isFullscreen: boolean;
8
9
  };
9
10
  /**
10
11
  * Push a new value into the iframe's editor.
@@ -44,6 +44,7 @@
44
44
  :field-name="fieldName"
45
45
  :host="host"
46
46
  :initial-height="scrollHeight"
47
+ :is-fullscreen
47
48
  @formatted="onFormattedValue"
48
49
  />
49
50
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blokkli/editor",
3
- "version": "2.0.0-alpha.53",
3
+ "version": "2.0.0-alpha.54",
4
4
  "description": "Interactive page building experience for Nuxt",
5
5
  "keywords": [
6
6
  "cms",