beauticode-dsh 1.0.23 → 1.0.24

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/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2026 beautiCode contributors
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2026 beautiCode contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/atmosphere.js CHANGED
@@ -1,4 +1,5 @@
1
- (() => {
1
+ //hello,starstreaming
2
+ (() => {
2
3
  "use strict";
3
4
 
4
5
  const STYLE_ID = "beauticode-atmosphere-style";
package/console.js CHANGED
@@ -126,11 +126,30 @@ body:not([data-ds-dark-theme]) #beauticode-console-pop{background:#f3f0e9;color:
126
126
  pop.style.bottom = `${Math.round(window.innerHeight - rect.top + 8)}px`;
127
127
  }
128
128
 
129
+ function isContents(node) {
130
+ if (!node) return false;
131
+ if (node.style?.display === "contents") return true;
132
+ if (typeof getComputedStyle === "function") {
133
+ try {
134
+ return getComputedStyle(node).display === "contents";
135
+ } catch {
136
+ return false;
137
+ }
138
+ }
139
+ return false;
140
+ }
141
+
142
+ function layoutParent(node) {
143
+ let current = node?.parentElement ?? null;
144
+ while (current && isContents(current)) current = current.parentElement;
145
+ return current;
146
+ }
147
+
129
148
  function place() {
130
149
  const settings = findSettingsTrigger();
131
- const row = settings?.parentElement;
132
- const settingsArea = row?.parentElement;
133
- const footArea = settingsArea?.parentElement;
150
+ const row = layoutParent(settings);
151
+ const settingsArea = layoutParent(row);
152
+ const footArea = layoutParent(settingsArea);
134
153
  if (!settings || !settingsArea || !footArea) {
135
154
  if (host.parentElement) host.remove();
136
155
  return;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "beauticode-dsh",
3
- "version": "1.0.23",
3
+ "version": "1.0.24",
4
4
  "description": "Cordis plugin: image/video backgrounds for DeepSeek Harness web.",
5
5
  "type": "module",
6
6
  "main": "./index.mjs",
@@ -1,6 +1,6 @@
1
1
  import fs from "node:fs/promises";
2
2
  import path from "node:path";
3
- import { MAX_INLINE_DATA_URL_BYTES, MAX_VIDEO_POSTER_INLINE_BYTES, } from "./constants.js";
3
+ import { MAX_INLINE_DATA_URL_BYTES } from "./constants.js";
4
4
  import { isLocalBackgroundSource, resolveBackgroundImagePath, resolveBackgroundVideoPath, } from "./media-source.js";
5
5
  import { detectImageMime } from "./media-validation.js";
6
6
  // Cold-first-access symptoms reported by the renderer while the OS is still
@@ -286,13 +286,7 @@ export async function buildHostApplyPayload(store, manifest, staged, cssText, vi
286
286
  const imagePath = resolveBackgroundImagePath(store.paths.activeDir, manifest.background);
287
287
  if (!imagePath)
288
288
  throw new Error("Background has no image source.");
289
- const imageStat = await fs.stat(imagePath).catch(() => null);
290
- const skipInlinePoster = manifest.background.type === "video" &&
291
- imageStat != null &&
292
- imageStat.size > MAX_VIDEO_POSTER_INLINE_BYTES;
293
- const imageDataUrl = opts.includeImageDataUrl === false || skipInlinePoster
294
- ? null
295
- : await fileToDataUrl(imagePath);
289
+ const imageDataUrl = opts.includeImageDataUrl === false ? null : await fileToDataUrl(imagePath);
296
290
  const imageUrl = staged?.image?.srcUrl ?? null;
297
291
  if (manifest.background.type === "image") {
298
292
  return {
@@ -9,11 +9,6 @@ export const MAX_VIDEO_BYTES = 800 * 1024 * 1024;
9
9
  * Keep this equal to MAX_IMAGE_BYTES so every accepted image can publish.
10
10
  */
11
11
  export const MAX_INLINE_DATA_URL_BYTES = MAX_IMAGE_BYTES;
12
- /**
13
- * Keep a large video poster out of the Codex Runtime.evaluate payload.
14
- * The first decoded video frame replaces the poster after the blob attaches.
15
- */
16
- export const MAX_VIDEO_POSTER_INLINE_BYTES = 1024 * 1024;
17
12
  export const COMMIT_MARKER_NAME = ".beauticode-commit-in-progress";
18
13
  export const COMMIT_MARKER_STALE_MS = 120_000;
19
14
  export const MEDIA_TOKEN_HEADER = "x-beauticode-media-token";