sliccy 1.22.3 → 1.22.4

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.
Files changed (24) hide show
  1. package/dist/node-server/electron-controller.js +15 -6
  2. package/dist/node-server/electron-runtime.js +9 -10
  3. package/dist/node-server/index.js +6 -4
  4. package/dist/ui/assets/{___vite-browser-external_commonjs-proxy-HEKiI6EW.js → ___vite-browser-external_commonjs-proxy-CdTWn1k_.js} +1 -1
  5. package/dist/ui/assets/{bsh-watchdog-DDiweuEz.js → bsh-watchdog-D42k4Edm.js} +1 -1
  6. package/dist/ui/assets/{index-BSBZClnJ.js → index-B0xTpQYL.js} +1 -1
  7. package/dist/ui/assets/index-BfNzQpoL.js +131 -0
  8. package/dist/ui/assets/index-BlSQnyL2.css +1 -0
  9. package/dist/ui/assets/{index-DtM-71bP.js → index-C0eFsJDV.js} +1 -1
  10. package/dist/ui/assets/{index-B0F7PxWn.js → index-CCybN7e8.js} +1033 -718
  11. package/dist/ui/assets/{index-MTjFRzVr.js → index-CbC7FGzC.js} +1 -1
  12. package/dist/ui/assets/{index-CM2CRGkL.js → index-CsOERWYO.js} +1 -1
  13. package/dist/ui/assets/{index-DaQtug-G.js → index-D54P7vsh.js} +1 -1
  14. package/dist/ui/assets/{index-DT33yILt.js → index-DjKjcXeW.js} +1 -1
  15. package/dist/ui/assets/{index-B73vno6G.js → index-pQ08_oTm.js} +9 -9
  16. package/dist/ui/assets/{offscreen-client-PiUvXXMe.js → offscreen-client-DmhRES2I.js} +1 -1
  17. package/dist/ui/assets/{sql-wasm-r2NFfZ6X.js → sql-wasm-Vb3Bc41A.js} +1 -1
  18. package/dist/ui/index.html +2 -2
  19. package/dist/ui/logos/logo-editor.html +944 -839
  20. package/dist/ui/logos/macos-icon.icon/icon.json +19 -24
  21. package/dist/ui/packages/webapp/index.html +2 -2
  22. package/package.json +20 -25
  23. package/dist/ui/assets/index-B15Vjr8J.css +0 -1
  24. package/dist/ui/assets/index-CqKk1FTy.js +0 -131
@@ -242,7 +242,8 @@ export function decodePngPixels(base64Data) {
242
242
  case 3: // Average
243
243
  row[i] = (row[i] + ((a + b) >>> 1)) & 0xff;
244
244
  break;
245
- case 4: { // Paeth
245
+ case 4: {
246
+ // Paeth
246
247
  const p = a + b - c;
247
248
  const pa = Math.abs(p - a);
248
249
  const pb = Math.abs(p - b);
@@ -401,7 +402,7 @@ export class ElectronOverlayInjector {
401
402
  throw new Error(`CDP target listing failed with ${response.status} ${response.statusText}`);
402
403
  }
403
404
  const targets = (await response.json());
404
- const pageCount = targets.filter(t => t.type === 'page').length;
405
+ const pageCount = targets.filter((t) => t.type === 'page').length;
405
406
  const injectableTargets = selectBestOverlayTargets(targets);
406
407
  if (injectableTargets.length < pageCount) {
407
408
  console.log(`[electron-float] Selected ${injectableTargets.length}/${pageCount} page targets for overlay injection`);
@@ -469,7 +470,9 @@ export class ElectronOverlayInjector {
469
470
  resolve(value === 'ok');
470
471
  }
471
472
  }
472
- catch { /* ignore */ }
473
+ catch {
474
+ /* ignore */
475
+ }
473
476
  };
474
477
  const cleanup = () => {
475
478
  clearTimeout(timeout);
@@ -515,7 +518,10 @@ export class ElectronOverlayInjector {
515
518
  void detectAppThemeFromScreenshot(ws, send).then((theme) => {
516
519
  if (ws.readyState !== WebSocket.OPEN)
517
520
  return;
518
- send('Runtime.evaluate', { expression: buildThemedBootstrap(theme), awaitPromise: false });
521
+ send('Runtime.evaluate', {
522
+ expression: buildThemedBootstrap(theme),
523
+ awaitPromise: false,
524
+ });
519
525
  });
520
526
  return;
521
527
  }
@@ -566,7 +572,10 @@ export class ElectronOverlayInjector {
566
572
  void detectAppThemeFromScreenshot(ws, send).then((theme) => {
567
573
  if (ws.readyState !== WebSocket.OPEN)
568
574
  return;
569
- send('Runtime.evaluate', { expression: buildThemedBootstrap(theme), awaitPromise: false });
575
+ send('Runtime.evaluate', {
576
+ expression: buildThemedBootstrap(theme),
577
+ awaitPromise: false,
578
+ });
570
579
  });
571
580
  // If this was a simple reload (no proxy), check if the iframe loads now.
572
581
  // If it still doesn't, escalate to the Fetch proxy as a last resort.
@@ -650,7 +659,7 @@ export class ElectronOverlayInjector {
650
659
  continue;
651
660
  }
652
661
  if (Array.isArray(value)) {
653
- value.forEach(v => responseHeaders.push({ name, value: v }));
662
+ value.forEach((v) => responseHeaders.push({ name, value: v }));
654
663
  }
655
664
  else if (value) {
656
665
  responseHeaders.push({ name, value });
@@ -16,7 +16,7 @@ export function hashString(str, max) {
16
16
  let hash = 0;
17
17
  for (let i = 0; i < str.length; i++) {
18
18
  const char = str.charCodeAt(i);
19
- hash = ((hash << 5) - hash) + char;
19
+ hash = (hash << 5) - hash + char;
20
20
  hash = hash & hash; // Convert to 32-bit integer
21
21
  }
22
22
  return Math.abs(hash) % max;
@@ -119,14 +119,7 @@ export function resolveElectronAppExecutablePath(appPath, platform = process.pla
119
119
  // Scan MacOS directory for the main executable
120
120
  // Many Electron apps use "Electron" as the executable name
121
121
  // Prefer known main executable names, filter out helper processes
122
- const helperPatterns = [
123
- /helper/i,
124
- /crash/i,
125
- /gpu/i,
126
- /renderer/i,
127
- /plugin/i,
128
- /utility/i,
129
- ];
122
+ const helperPatterns = [/helper/i, /crash/i, /gpu/i, /renderer/i, /plugin/i, /utility/i];
130
123
  try {
131
124
  const entries = readdirSync(macOSDir);
132
125
  // Helper to check if a file is executable
@@ -235,7 +228,13 @@ export function buildElectronServerSpawnConfig(projectRoot, options) {
235
228
  if (options.dev) {
236
229
  return {
237
230
  command: (options.platform ?? process.platform) === 'win32' ? 'npx.cmd' : 'npx',
238
- args: ['tsx', 'packages/node-server/src/index.ts', '--dev', '--serve-only', `--cdp-port=${options.cdpPort}`],
231
+ args: [
232
+ 'tsx',
233
+ 'packages/node-server/src/index.ts',
234
+ '--dev',
235
+ '--serve-only',
236
+ `--cdp-port=${options.cdpPort}`,
237
+ ],
239
238
  };
240
239
  }
241
240
  return {
@@ -447,7 +447,7 @@ async function main() {
447
447
  await ensureQaProfileScaffold(PROJECT_ROOT);
448
448
  }
449
449
  if (chromeProfile.extensionPath && !existsSync(chromeProfile.extensionPath)) {
450
- console.error(`Extension profile requires ${chromeProfile.extensionPath}. Run \`npm run qa:setup\` or \`npm run build:extension\` first.`);
450
+ console.error(`Extension profile requires ${chromeProfile.extensionPath}. Run \`npm run build -w @slicc/chrome-extension\` first.`);
451
451
  process.exit(1);
452
452
  }
453
453
  if (chromeProfile.id) {
@@ -790,8 +790,7 @@ async function main() {
790
790
  if (Object.keys(headers).length > 0)
791
791
  fetchInit.headers = headers;
792
792
  if (rawBody.length > 0 && !['GET', 'HEAD'].includes(req.method)) {
793
- // Buffer extends Uint8Array (valid BodyInit at runtime) but TS can't
794
- // prove the backing ArrayBuffer is non-shared, so double-cast is needed.
793
+ // Buffer extends Uint8Array which is a valid fetch body at runtime.
795
794
  fetchInit.body = rawBody;
796
795
  }
797
796
  const upstream = await fetch(targetUrl, fetchInit);
@@ -828,6 +827,7 @@ async function main() {
828
827
  const { createServer: createViteServer } = await import('vite');
829
828
  const webappIndexHtml = resolve(process.cwd(), 'packages/webapp/index.html');
830
829
  const vite = await createViteServer({
830
+ configFile: resolve(process.cwd(), 'packages/webapp/vite.config.ts'),
831
831
  server: {
832
832
  middlewareMode: true,
833
833
  hmr: {
@@ -839,7 +839,9 @@ async function main() {
839
839
  });
840
840
  app.use(vite.middlewares);
841
841
  app.use(async (req, res, next) => {
842
- if (req.method !== 'GET' || !req.headers.accept?.includes('text/html') || req.path.includes('.')) {
842
+ if (req.method !== 'GET' ||
843
+ !req.headers.accept?.includes('text/html') ||
844
+ req.path.includes('.')) {
843
845
  next();
844
846
  return;
845
847
  }
@@ -1 +1 @@
1
- import{_ as e}from"./__vite-browser-external-D7Ct-6yo.js";import{g as r}from"./index-B0F7PxWn.js";const a=r(e);export{a as r};
1
+ import{_ as e}from"./__vite-browser-external-D7Ct-6yo.js";import{g as r}from"./index-CCybN7e8.js";const a=r(e);export{a as r};
@@ -1,2 +1,2 @@
1
- import{c as u}from"./index-B0F7PxWn.js";const l=["/workspace","/shared"];async function d(s){const t=[],e=new Set;for(const r of l)await s.exists(r)&&await p(s,r,t,e);return t}async function p(s,t,e,r){for await(const n of s.walk(t)){if(!n.endsWith(".bsh")||r.has(n))continue;r.add(n);const i=g(n);if(!i)continue;const a=await s.readFile(n,{encoding:"utf-8"}),c=typeof a=="string"?a:new TextDecoder().decode(a),f=m(c);e.push({path:n,hostnamePattern:i,matchPatterns:f})}}function g(s){const t=s.split("/").pop()??"";if(!t.endsWith(".bsh"))return null;const e=t.slice(0,-4);return e?e.startsWith("-.")?"*"+e.slice(1):e:null}function m(s){const t=s.split(`
1
+ import{c as u}from"./index-CCybN7e8.js";const l=["/workspace","/shared"];async function d(s){const t=[],e=new Set;for(const r of l)await s.exists(r)&&await p(s,r,t,e);return t}async function p(s,t,e,r){for await(const n of s.walk(t)){if(!n.endsWith(".bsh")||r.has(n))continue;r.add(n);const i=g(n);if(!i)continue;const a=await s.readFile(n,{encoding:"utf-8"}),c=typeof a=="string"?a:new TextDecoder().decode(a),f=m(c);e.push({path:n,hostnamePattern:i,matchPatterns:f})}}function g(s){const t=s.split("/").pop()??"";if(!t.endsWith(".bsh"))return null;const e=t.slice(0,-4);return e?e.startsWith("-.")?"*"+e.slice(1):e:null}function m(s){const t=s.split(`
2
2
  `).slice(0,10),e=[];for(const r of t){const n=r.match(/^\s*\/\/\s*@match\s+(.+)$/);n&&e.push(n[1].trim())}return e}function h(s,t){if(t.startsWith("*.")){const e=t.slice(1);return s.endsWith(e)&&s.length>e.length}return s===t}function v(s,t){try{const e=new URL(s),r=t.match(/^(\*|https?):\/\/([^/]+)(\/.*)?$/);if(!r)return!1;const[,n,i,a]=r;return n!=="*"&&e.protocol.slice(0,-1)!==n||!h(e.hostname,i)?!1:a?x(e.pathname+e.search,a):!0}catch{return!1}}function x(s,t){const e="^"+t.replace(/[.+^${}()|[\]\\]/g,"\\$&").replace(/\*/g,".*")+"$";return new RegExp(e).test(s)}function w(s,t){try{const e=new URL(t);return s.filter(r=>h(e.hostname,r.hostnamePattern)?r.matchPatterns.length>0?r.matchPatterns.some(n=>v(t,n)):!0:!1)}catch{return[]}}const o=u("bsh-watchdog");class S{transport;fs;execute;discoveryIntervalMs;entries=[];discoveryTimer=null;running=!1;executing=new Set;constructor(t){this.transport=t.transport,this.fs=t.fs,this.execute=t.execute,this.discoveryIntervalMs=t.discoveryIntervalMs??3e4}async start(){this.running||(this.running=!0,await this.discover(),this.discoveryTimer=setInterval(()=>{this.discover()},this.discoveryIntervalMs),this.transport.on("Page.frameNavigated",this.onFrameNavigated),o.info("BSH watchdog started",{scriptCount:this.entries.length}))}stop(){this.running&&(this.running=!1,this.transport.off("Page.frameNavigated",this.onFrameNavigated),this.discoveryTimer&&(clearInterval(this.discoveryTimer),this.discoveryTimer=null),this.entries=[],this.executing.clear(),o.info("BSH watchdog stopped"))}async discover(){try{this.entries=await d(this.fs),o.debug("BSH discovery complete",{count:this.entries.length})}catch(t){o.error("BSH discovery failed",{error:t instanceof Error?t.message:String(t)})}}getEntries(){return this.entries}onFrameNavigated=t=>{const e=t.frame;if(e?.parentId||!e?.url)return;const r=e.url;if(!r.startsWith("http://")&&!r.startsWith("https://")||this.entries.length===0)return;const n=w(this.entries,r);if(n.length!==0)for(const i of n){const a=`${i.path}::${r}`;this.executing.has(a)||(this.executing.add(a),o.info("BSH watchdog executing script",{script:i.path,url:r}),this.execute(i.path).then(c=>{c.exitCode!==0?o.warn("BSH script failed",{script:i.path,url:r,exitCode:c.exitCode,stderr:c.stderr.slice(0,200)}):o.info("BSH script completed",{script:i.path,url:r})}).catch(c=>{o.error("BSH script execution error",{script:i.path,url:r,error:c instanceof Error?c.message:String(c)})}).finally(()=>{this.executing.delete(a)}))}}}export{S as BshWatchdog};
@@ -1 +1 @@
1
- import{t as z,f as x}from"./index-B0F7PxWn.js";class T{marshaller;serializer;deserializer;serdeContext;defaultContentType;constructor({marshaller:i,serializer:n,deserializer:o,serdeContext:c,defaultContentType:y}){this.marshaller=i,this.serializer=n,this.deserializer=o,this.serdeContext=c,this.defaultContentType=y}async serializeEventStream({eventStream:i,requestSchema:n,initialRequest:o}){const c=this.marshaller,y=n.getEventStreamMember(),p=n.getMemberSchema(y),d=this.serializer,u=this.defaultContentType,h=Symbol("initialRequestMarker"),S={async*[Symbol.asyncIterator](){if(o){const r={":event-type":{type:"string",value:"initial-request"},":message-type":{type:"string",value:"event"},":content-type":{type:"string",value:u}};d.write(n,o);const t=d.flush();yield{[h]:!0,headers:r,body:t}}for await(const r of i)yield r}};return c.serialize(S,r=>{if(r[h])return{headers:r.headers,body:r.body};const t=Object.keys(r).find(s=>s!=="__type")??"",{additionalHeaders:e,body:a,eventType:l,explicitPayloadContentType:m}=this.writeEventBody(t,p,r);return{headers:{":event-type":{type:"string",value:l},":message-type":{type:"string",value:"event"},":content-type":{type:"string",value:m??u},...e},body:a}})}async deserializeEventStream({response:i,responseSchema:n,initialResponseContainer:o}){const c=this.marshaller,y=n.getEventStreamMember(),d=n.getMemberSchema(y).getMemberSchemas(),u=Symbol("initialResponseMarker"),h=c.deserialize(i.body,async t=>{const e=Object.keys(t).find(l=>l!=="__type")??"",a=t[e].body;if(e==="initial-response"){const l=await this.deserializer.read(n,a);return delete l[y],{[u]:!0,...l}}else if(e in d){const l=d[e];if(l.isStructSchema()){const m={};let f=!1;for(const[s,g]of l.structIterator()){const{eventHeader:v,eventPayload:w}=g.getMergedTraits();if(f=f||!!(v||w),w)g.isBlobSchema()?m[s]=a:g.isStringSchema()?m[s]=(this.serdeContext?.utf8Encoder??z)(a):g.isStructSchema()&&(m[s]=await this.deserializer.read(g,a));else if(v){const b=t[e].headers[s]?.value;b!=null&&(g.isNumericSchema()?b&&typeof b=="object"&&"bytes"in b?m[s]=BigInt(b.toString()):m[s]=Number(b):m[s]=b)}}if(f)return{[e]:m};if(a.byteLength===0)return{[e]:{}}}return{[e]:await this.deserializer.read(l,a)}}else return{$unknown:t}}),S=h[Symbol.asyncIterator](),r=await S.next();if(r.done)return h;if(r.value?.[u]){if(!n)throw new Error("@smithy::core/protocols - initial-response event encountered in event stream but no response schema given.");for(const[t,e]of Object.entries(r.value))o[t]=e}return{async*[Symbol.asyncIterator](){for(r?.value?.[u]||(yield r.value);;){const{done:t,value:e}=await S.next();if(t)break;yield e}}}}writeEventBody(i,n,o){const c=this.serializer;let y=i,p=null,d;const u=n.getSchema()[4].includes(i),h={};if(u){const t=n.getMemberSchema(i);if(t.isStructSchema()){for(const[e,a]of t.structIterator()){const{eventHeader:l,eventPayload:m}=a.getMergedTraits();if(m)p=e;else if(l){const f=o[i][e];let s="binary";a.isNumericSchema()?(-2)**31<=f&&f<=2**31-1?s="integer":s="long":a.isTimestampSchema()?s="timestamp":a.isStringSchema()?s="string":a.isBooleanSchema()&&(s="boolean"),f!=null&&(h[e]={type:s,value:f},delete o[i][e])}}if(p!==null){const e=t.getMemberSchema(p);e.isBlobSchema()?d="application/octet-stream":e.isStringSchema()&&(d="text/plain"),c.write(e,o[i][p])}else c.write(t,o[i])}else if(t.isUnitSchema())c.write(t,{});else throw new Error("@smithy/core/event-streams - non-struct member not supported in event stream union.")}else{const[t,e]=o[i];y=t,c.write(15,e)}const S=c.flush();return{body:typeof S=="string"?(this.serdeContext?.utf8Decoder??x)(S):S,eventType:y,explicitPayloadContentType:d,additionalHeaders:h}}}export{T as EventStreamSerde};
1
+ import{t as z,f as x}from"./index-CCybN7e8.js";class T{marshaller;serializer;deserializer;serdeContext;defaultContentType;constructor({marshaller:i,serializer:n,deserializer:o,serdeContext:c,defaultContentType:y}){this.marshaller=i,this.serializer=n,this.deserializer=o,this.serdeContext=c,this.defaultContentType=y}async serializeEventStream({eventStream:i,requestSchema:n,initialRequest:o}){const c=this.marshaller,y=n.getEventStreamMember(),p=n.getMemberSchema(y),d=this.serializer,u=this.defaultContentType,h=Symbol("initialRequestMarker"),S={async*[Symbol.asyncIterator](){if(o){const r={":event-type":{type:"string",value:"initial-request"},":message-type":{type:"string",value:"event"},":content-type":{type:"string",value:u}};d.write(n,o);const t=d.flush();yield{[h]:!0,headers:r,body:t}}for await(const r of i)yield r}};return c.serialize(S,r=>{if(r[h])return{headers:r.headers,body:r.body};const t=Object.keys(r).find(s=>s!=="__type")??"",{additionalHeaders:e,body:a,eventType:l,explicitPayloadContentType:m}=this.writeEventBody(t,p,r);return{headers:{":event-type":{type:"string",value:l},":message-type":{type:"string",value:"event"},":content-type":{type:"string",value:m??u},...e},body:a}})}async deserializeEventStream({response:i,responseSchema:n,initialResponseContainer:o}){const c=this.marshaller,y=n.getEventStreamMember(),d=n.getMemberSchema(y).getMemberSchemas(),u=Symbol("initialResponseMarker"),h=c.deserialize(i.body,async t=>{const e=Object.keys(t).find(l=>l!=="__type")??"",a=t[e].body;if(e==="initial-response"){const l=await this.deserializer.read(n,a);return delete l[y],{[u]:!0,...l}}else if(e in d){const l=d[e];if(l.isStructSchema()){const m={};let f=!1;for(const[s,g]of l.structIterator()){const{eventHeader:v,eventPayload:w}=g.getMergedTraits();if(f=f||!!(v||w),w)g.isBlobSchema()?m[s]=a:g.isStringSchema()?m[s]=(this.serdeContext?.utf8Encoder??z)(a):g.isStructSchema()&&(m[s]=await this.deserializer.read(g,a));else if(v){const b=t[e].headers[s]?.value;b!=null&&(g.isNumericSchema()?b&&typeof b=="object"&&"bytes"in b?m[s]=BigInt(b.toString()):m[s]=Number(b):m[s]=b)}}if(f)return{[e]:m};if(a.byteLength===0)return{[e]:{}}}return{[e]:await this.deserializer.read(l,a)}}else return{$unknown:t}}),S=h[Symbol.asyncIterator](),r=await S.next();if(r.done)return h;if(r.value?.[u]){if(!n)throw new Error("@smithy::core/protocols - initial-response event encountered in event stream but no response schema given.");for(const[t,e]of Object.entries(r.value))o[t]=e}return{async*[Symbol.asyncIterator](){for(r?.value?.[u]||(yield r.value);;){const{done:t,value:e}=await S.next();if(t)break;yield e}}}}writeEventBody(i,n,o){const c=this.serializer;let y=i,p=null,d;const u=n.getSchema()[4].includes(i),h={};if(u){const t=n.getMemberSchema(i);if(t.isStructSchema()){for(const[e,a]of t.structIterator()){const{eventHeader:l,eventPayload:m}=a.getMergedTraits();if(m)p=e;else if(l){const f=o[i][e];let s="binary";a.isNumericSchema()?(-2)**31<=f&&f<=2**31-1?s="integer":s="long":a.isTimestampSchema()?s="timestamp":a.isStringSchema()?s="string":a.isBooleanSchema()&&(s="boolean"),f!=null&&(h[e]={type:s,value:f},delete o[i][e])}}if(p!==null){const e=t.getMemberSchema(p);e.isBlobSchema()?d="application/octet-stream":e.isStringSchema()&&(d="text/plain"),c.write(e,o[i][p])}else c.write(t,o[i])}else if(t.isUnitSchema())c.write(t,{});else throw new Error("@smithy/core/event-streams - non-struct member not supported in event stream union.")}else{const[t,e]=o[i];y=t,c.write(15,e)}const S=c.flush();return{body:typeof S=="string"?(this.serdeContext?.utf8Decoder??x)(S):S,eventType:y,explicitPayloadContentType:d,additionalHeaders:h}}}export{T as EventStreamSerde};