@vite-plugin-opencode-assistant/components 1.1.6 → 1.1.8

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/es/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import type { App } from 'vue';
2
- declare const version = "1.1.6";
2
+ declare const version = "1.1.8";
3
3
  declare function install(app: App<any>, options?: any): void;
4
4
  export { install, version, };
5
5
  export * from './open-code-widget';
package/es/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  import { OpenCodeWidget } from "./open-code-widget/index.mjs";
2
- const version = "1.1.6";
2
+ const version = "1.1.8";
3
3
  function install(app, options) {
4
4
  const components = [
5
5
  OpenCodeWidget
@@ -5,6 +5,9 @@ function useSplitMode(options) {
5
5
  const windowWidth = ref(typeof window !== "undefined" ? window.innerWidth : 0);
6
6
  const localSplitPosition = ref((_b = (_a = options.splitPosition) == null ? void 0 : _a.value) != null ? _b : "right");
7
7
  const isExtensionMode = computed(() => options.displayMode.value === "extension");
8
+ const shouldSkipBodyModification = computed(
9
+ () => isExtensionMode.value || options.displayMode.value === "extension-selector"
10
+ );
8
11
  const splitConfig = computed(() => {
9
12
  var _a2, _b2, _c, _d, _e, _f, _g;
10
13
  const config = options.splitMode.value || {};
@@ -55,7 +58,13 @@ function useSplitMode(options) {
55
58
  };
56
59
  const updateBodyClass = () => {
57
60
  if (typeof document === "undefined") return;
58
- if (isExtensionMode.value) return;
61
+ if (shouldSkipBodyModification.value) {
62
+ document.body.classList.remove("has-opencode-split");
63
+ document.body.classList.remove("has-opencode-split-left");
64
+ document.body.classList.remove("has-opencode-split-right");
65
+ document.body.style.removeProperty("--opencode-split-width");
66
+ return;
67
+ }
59
68
  const shouldShrink = isSplitMode.value && options.open.value && splitConfig.value.shrinkPage;
60
69
  if (shouldShrink) {
61
70
  document.body.classList.add("has-opencode-split");
@@ -74,7 +83,9 @@ function useSplitMode(options) {
74
83
  document.body.style.removeProperty("--opencode-split-width");
75
84
  }
76
85
  };
77
- watch([isSplitMode, options.open, panelWidth, splitPosition], updateBodyClass, { immediate: true });
86
+ watch([isSplitMode, options.open, panelWidth, splitPosition], updateBodyClass, {
87
+ immediate: true
88
+ });
78
89
  watch(splitConfig, (config) => {
79
90
  if (panelWidth.value < config.minWidth) {
80
91
  panelWidth.value = config.minWidth;
package/lib/index.cjs CHANGED
@@ -26,7 +26,7 @@ module.exports = __toCommonJS(lib_exports);
26
26
  var import_open_code_widget = require("./open-code-widget/index.cjs");
27
27
  __reExport(lib_exports, require("./open-code-widget/index.cjs"), module.exports);
28
28
  __reExport(lib_exports, require("./setup.cjs"), module.exports);
29
- const version = "1.1.6";
29
+ const version = "1.1.8";
30
30
  function install(app, options) {
31
31
  const components = [
32
32
  import_open_code_widget.OpenCodeWidget
package/lib/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import type { App } from 'vue';
2
- declare const version = "1.1.6";
2
+ declare const version = "1.1.8";
3
3
  declare function install(app: App<any>, options?: any): void;
4
4
  export { install, version, };
5
5
  export * from './open-code-widget';
@@ -27,6 +27,9 @@ function useSplitMode(options) {
27
27
  const windowWidth = (0, import_vue.ref)(typeof window !== "undefined" ? window.innerWidth : 0);
28
28
  const localSplitPosition = (0, import_vue.ref)((_b = (_a = options.splitPosition) == null ? void 0 : _a.value) != null ? _b : "right");
29
29
  const isExtensionMode = (0, import_vue.computed)(() => options.displayMode.value === "extension");
30
+ const shouldSkipBodyModification = (0, import_vue.computed)(
31
+ () => isExtensionMode.value || options.displayMode.value === "extension-selector"
32
+ );
30
33
  const splitConfig = (0, import_vue.computed)(() => {
31
34
  var _a2, _b2, _c, _d, _e, _f, _g;
32
35
  const config = options.splitMode.value || {};
@@ -77,7 +80,13 @@ function useSplitMode(options) {
77
80
  };
78
81
  const updateBodyClass = () => {
79
82
  if (typeof document === "undefined") return;
80
- if (isExtensionMode.value) return;
83
+ if (shouldSkipBodyModification.value) {
84
+ document.body.classList.remove("has-opencode-split");
85
+ document.body.classList.remove("has-opencode-split-left");
86
+ document.body.classList.remove("has-opencode-split-right");
87
+ document.body.style.removeProperty("--opencode-split-width");
88
+ return;
89
+ }
81
90
  const shouldShrink = isSplitMode.value && options.open.value && splitConfig.value.shrinkPage;
82
91
  if (shouldShrink) {
83
92
  document.body.classList.add("has-opencode-split");
@@ -96,7 +105,9 @@ function useSplitMode(options) {
96
105
  document.body.style.removeProperty("--opencode-split-width");
97
106
  }
98
107
  };
99
- (0, import_vue.watch)([isSplitMode, options.open, panelWidth, splitPosition], updateBodyClass, { immediate: true });
108
+ (0, import_vue.watch)([isSplitMode, options.open, panelWidth, splitPosition], updateBodyClass, {
109
+ immediate: true
110
+ });
100
111
  (0, import_vue.watch)(splitConfig, (config) => {
101
112
  if (panelWidth.value < config.minWidth) {
102
113
  panelWidth.value = config.minWidth;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vite-plugin-opencode-assistant/components",
3
- "version": "1.1.6",
3
+ "version": "1.1.8",
4
4
  "description": "Reusable OpenCode widget components built with Pagoda CLI",
5
5
  "type": "module",
6
6
  "main": "lib/index.cjs",
@@ -31,7 +31,7 @@
31
31
  },
32
32
  "dependencies": {
33
33
  "css-selector-generator": "^3.9.2",
34
- "@vite-plugin-opencode-assistant/shared": "1.1.6"
34
+ "@vite-plugin-opencode-assistant/shared": "1.1.8"
35
35
  },
36
36
  "scripts": {
37
37
  "build": "pagoda-cli build",