ryugi-artifacts 1.42.2 → 1.43.0

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/server.cjs CHANGED
@@ -89050,6 +89050,15 @@ function installTweaks(win, makeTools) {
89050
89050
  });
89051
89051
  }
89052
89052
 
89053
+ // src/server/strip-runtime.ts
89054
+ var HEAD = /<head(\s[^>]*)?>/i;
89055
+ var PROLOGUE = /^\s*(<!doctype[^>]*>)?\s*(<html(\s[^>]*)?>)?/i;
89056
+ var EMBEDDED_STYLE = "<style>:root{color-scheme:light dark;background:transparent}body{margin:0;font-family:var(--lobe-font-family,system-ui,-apple-system,sans-serif)}</style>";
89057
+ function injectionPoint(html) {
89058
+ const head = HEAD.exec(html);
89059
+ return head ? head.index + head[0].length : PROLOGUE.exec(html)?.[0].length ?? 0;
89060
+ }
89061
+
89053
89062
  // src/server/inject.ts
89054
89063
  var RUNTIME = `(() => {
89055
89064
  const post = (message) => parent.postMessage(message, '*');
@@ -89152,10 +89161,7 @@ var RUNTIME = `(() => {
89152
89161
  }
89153
89162
  });
89154
89163
  })();`;
89155
- var HEAD = /<head(\s[^>]*)?>/i;
89156
- var PROLOGUE = /^\s*(<!doctype[^>]*>)?\s*(<html(\s[^>]*)?>)?/i;
89157
89164
  var RUNTIME_LINE = RUNTIME.split("\n").map((line) => line.trim()).join(" ");
89158
- var EMBEDDED_STYLE = "<style>:root{color-scheme:light dark;background:transparent}body{margin:0;font-family:var(--lobe-font-family,system-ui,-apple-system,sans-serif)}</style>";
89159
89165
  var UI_MARKER = /<ryugi-(?!icon(?:\s|>))[a-z0-9-]+(?:\s|>)/i;
89160
89166
  var UI_META = /<meta[^>]+name=["']ryugi-ui["'][^>]*>/i;
89161
89167
  function injectRuntime(html, options = {}) {
@@ -89163,8 +89169,7 @@ function injectRuntime(html, options = {}) {
89163
89169
  const tag = `${options.embedded ? EMBEDDED_STYLE : ""}<script>${inspect || RUNTIME_LINE}</script>`;
89164
89170
  const ui2 = options.uiRuntimeUrl && !options.inspector && (UI_MARKER.test(html) || UI_META.test(html)) ? `<script defer src="${options.uiRuntimeUrl.replace(/"/g, "&quot;")}"></script>` : "";
89165
89171
  const icons = options.uiRuntimeUrl && (ui2 || /<ryugi-icon(?:\s|>)|<meta[^>]+name=["']ryugi-icons["']/i.test(html)) ? `<script defer src="${options.uiRuntimeUrl.replace(/ryugi-ui\.js$/, "ryugi-icons.js").replace(/"/g, "&quot;")}"></script>` : "";
89166
- const head = HEAD.exec(html);
89167
- const at7 = head ? head.index + head[0].length : PROLOGUE.exec(html)?.[0].length ?? 0;
89172
+ const at7 = injectionPoint(html);
89168
89173
  return html.slice(0, at7) + tag + icons + ui2 + html.slice(at7);
89169
89174
  }
89170
89175
 
@@ -92375,7 +92380,7 @@ function touchEntry(dir, entry) {
92375
92380
  }
92376
92381
 
92377
92382
  // package.json
92378
- var version = "1.42.2";
92383
+ var version = "1.43.0";
92379
92384
 
92380
92385
  // src/server/main.ts
92381
92386
  async function main() {
@@ -5177,7 +5177,7 @@ function Ea(e, t) {
5177
5177
  }
5178
5178
  //#endregion
5179
5179
  //#region src/viewer/lib/version.ts
5180
- var Da = "1.42.2", Oa = 100, ka = 2e3, Aa = 50, ja = (e, t = Oa) => typeof e == "string" && e.length > 0 && e.length <= t, Ma = (e) => typeof e == "number" && Number.isFinite(e), Na = (e) => Ma(e) && e >= 0 && e <= 1;
5180
+ var Da = "1.43.0", Oa = 100, ka = 2e3, Aa = 50, ja = (e, t = Oa) => typeof e == "string" && e.length > 0 && e.length <= t, Ma = (e) => typeof e == "number" && Number.isFinite(e), Na = (e) => Ma(e) && e >= 0 && e <= 1;
5181
5181
  function Pa(e) {
5182
5182
  if (!Array.isArray(e) || e.length === 0 || e.length > Aa) return null;
5183
5183
  let t = [];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ryugi-artifacts",
3
- "version": "1.42.2",
3
+ "version": "1.43.0",
4
4
  "type": "module",
5
5
  "description": "Server and viewer for the Ryugi artifacts app",
6
6
  "license": "AGPL-3.0-only",