@blokkli/editor 2.0.0-alpha.26 → 2.0.0-alpha.28

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.26",
4
+ "version": "2.0.0-alpha.28",
5
5
  "compatibility": {
6
6
  "nuxt": ">=3.15.0"
7
7
  },
package/dist/module.mjs CHANGED
@@ -15,7 +15,7 @@ import fs from 'node:fs';
15
15
  import { defu, createDefu } from 'defu';
16
16
 
17
17
  const name = "@blokkli/editor";
18
- const version = "2.0.0-alpha.26";
18
+ const version = "2.0.0-alpha.28";
19
19
 
20
20
  function sortObjectKeys(obj) {
21
21
  if (Array.isArray(obj)) {
@@ -203,10 +203,10 @@ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<{
203
203
  key: string;
204
204
  scrolledToEnd: boolean;
205
205
  isDetached: true;
206
- width: any;
207
- height: any;
206
+ width: number;
207
+ height: number;
208
208
  toggleSidebar: () => void;
209
- isResizing: any;
209
+ isResizing: boolean;
210
210
  }) => any;
211
211
  } & {
212
212
  default?: (props: {
@@ -2,6 +2,7 @@
2
2
  <div class="bk bk-analyze">
3
3
  <div class="bk-analyze-button">
4
4
  <button
5
+ v-if="hasManualAnalyzers"
5
6
  class="bk-button bk-is-primary"
6
7
  :disabled="buttonDisabled"
7
8
  @click.prevent="onClick"
@@ -39,7 +40,7 @@
39
40
  </div>
40
41
 
41
42
  <div v-if="results.length" class="bk-analyze-wrapper">
42
- <div class="bk-analyze-form">
43
+ <div v-if="categoryOptions.length > 2" class="bk-analyze-form">
43
44
  <FormSelect
44
45
  id="category"
45
46
  v-model="selectedCategory"
@@ -160,17 +160,34 @@ async function onClickPreview() {
160
160
  isLocked.value = true;
161
161
  isPreviewing.value = true;
162
162
  ui.setTransform(title.value);
163
- if (supportsPreview.value && adapter.previewTransformPlugin && "bundles" in props.plugin && props.uuids) {
164
- const config2 = mapValues(value.value);
165
- try {
166
- const result = await adapter.previewTransformPlugin({
167
- pluginId: props.plugin.id,
168
- uuids: props.uuids,
169
- config: config2
170
- });
171
- stateAfter.value = clone(adapter.mapState(result.state));
172
- state.setOverrideState(stateAfter.value);
173
- } catch {
163
+ if (supportsPreview.value) {
164
+ if ("bundles" in props.plugin) {
165
+ if (adapter.previewTransformPlugin && props.uuids) {
166
+ const config2 = mapValues(value.value);
167
+ try {
168
+ const result = await adapter.previewTransformPlugin({
169
+ pluginId: props.plugin.id,
170
+ uuids: props.uuids,
171
+ config: config2
172
+ });
173
+ stateAfter.value = clone(adapter.mapState(result.state));
174
+ state.setOverrideState(stateAfter.value);
175
+ } catch {
176
+ }
177
+ }
178
+ } else {
179
+ if (adapter.previewHostTransformPlugin) {
180
+ const config2 = mapValues(value.value);
181
+ try {
182
+ const result = await adapter.previewHostTransformPlugin({
183
+ pluginId: props.plugin.id,
184
+ config: config2
185
+ });
186
+ stateAfter.value = clone(adapter.mapState(result.state));
187
+ state.setOverrideState(stateAfter.value);
188
+ } catch {
189
+ }
190
+ }
174
191
  }
175
192
  }
176
193
  isLocked.value = false;
@@ -1,7 +1,7 @@
1
1
  import { INJECT_APP } from "../helpers/symbols.js";
2
2
  import { inject } from "#imports";
3
3
  export function useBlokkli(optional) {
4
- const app = inject(INJECT_APP);
4
+ const app = inject(INJECT_APP, void 0);
5
5
  if (!app) {
6
6
  if (optional) {
7
7
  return void 0;