@tensorix/metahub 0.1.6 → 0.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.
@@ -1 +1 @@
1
- {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../../src/core/sync/server.ts"],"names":[],"mappings":"AAsBA,MAAM,WAAW,aAAa;IAC5B,MAAM,EAAE,UAAU,CAAC,OAAO,GAAG,CAAC,KAAK,CAAC,CAAC;IACrC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,kEAAkE;IAClE,IAAI,EAAE,MAAM,CAAC;IACb,iEAAiE;IACjE,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,qFAAqF;IACrF,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;IACnB,wFAAwF;IACxF,QAAQ,EAAE,SAAS,GAAG,QAAQ,GAAG,UAAU,CAAC;IAC5C,8CAA8C;IAC9C,QAAQ,EAAE,OAAO,CAAC;IAClB,qEAAqE;IACrE,cAAc,EAAE,MAAM,CAAC;IACvB,+CAA+C;IAC/C,IAAI,EAAE,MAAM,IAAI,CAAC;CAClB;AAED,6EAA6E;AAC7E,qBAAa,cAAe,SAAQ,KAAK;IAErC,QAAQ,CAAC,IAAI,EAAE,MAAM;IACrB,QAAQ,CAAC,IAAI,EAAE,MAAM;gBADZ,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM;CAQxB;AAED,MAAM,WAAW,aAAa;IAC5B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,qEAAqE;IACrE,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,6BAA6B;IAC7B,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,oEAAoE;IACpE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,oFAAoF;IACpF,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,0EAA0E;IAC1E,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAYD,gF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GAAG,aAAa,CAkJnE"}
@@ -1 +1 @@
1
- {"version":3,"file":"webui.d.ts","sourceRoot":"","sources":["../../../src/core/sync/webui.ts"],"names":[],"mappings":"AAgvBA;;;8EAG8E;AAC9E,wBAAgB,cAAc,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,CAE/C;AAoBD;;;;2EAI2E;AAC3E,wBAAsB,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC,CAM/C;AAED;0CAC0C;AAC1C,wBAAsB,UAAU,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAC,CAiBvE"}
1
+ {"version":3,"file":"webui.d.ts","sourceRoot":"","sources":["../../../src/core/sync/webui.ts"],"names":[],"mappings":"AA4vBA;;;8EAG8E;AAC9E,wBAAgB,cAAc,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,CAE/C;AAoBD;;;;2EAI2E;AAC3E,wBAAsB,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC,CAM/C;AAED;0CAC0C;AAC1C,wBAAsB,UAAU,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAC,CAsBvE"}
package/dist/index.js CHANGED
@@ -1,12 +1,16 @@
1
1
  // @bun
2
2
  var __defProp = Object.defineProperty;
3
+ var __returnValue = (v) => v;
4
+ function __exportSetter(name, newValue) {
5
+ this[name] = __returnValue.bind(null, newValue);
6
+ }
3
7
  var __export = (target, all) => {
4
8
  for (var name in all)
5
9
  __defProp(target, name, {
6
10
  get: all[name],
7
11
  enumerable: true,
8
12
  configurable: true,
9
- set: (newValue) => all[name] = () => newValue
13
+ set: __exportSetter.bind(all, name)
10
14
  });
11
15
  };
12
16
  var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
@@ -578,6 +582,7 @@ async function serveWebui(req) {
578
582
  headers: { "content-type": "text/javascript; charset=utf-8" }
579
583
  });
580
584
  } catch (e) {
585
+ console.error("[webui] failed to serve /webui.js \u2014", e);
581
586
  return new Response(`webui build failed: ${e}`, { status: 500 });
582
587
  }
583
588
  }
@@ -779,6 +784,18 @@ var HTML = `<!doctype html>
779
784
  .btn-primary:hover { filter:brightness(1.07); }
780
785
  .btn-danger { background:var(--danger); color:#fff; } .btn-danger:hover { filter:brightness(1.05); }
781
786
 
787
+ /* desktop app (frameless): drop the sidebar logo; on macOS reserve a draggable
788
+ strip for the inset traffic lights so they never overlap our controls */
789
+ body.desktop .brand { display:none; }
790
+ /* logo gone \u2192 keep the collapse button on the right (where .brand's flex used to push it) */
791
+ body.desktop .sb-head .iconbtn { margin-left:auto; }
792
+ body.desktop-mac .sb-head { -webkit-app-region:drag; }
793
+ body.desktop-mac .sb-head .iconbtn { -webkit-app-region:no-drag; }
794
+ body.desktop-mac .topbar { -webkit-app-region:drag; }
795
+ body.desktop-mac .topbar .iconbtn, body.desktop-mac .topbar .btn { -webkit-app-region:no-drag; }
796
+ /* sidebar collapsed \u2192 traffic lights sit over the main header; clear the hamburger */
797
+ body.desktop-mac .sidebar.collapsed ~ .main .topbar { padding-left:80px; }
798
+
782
799
  /* document editor */
783
800
  .doc { max-width:740px; margin:0 auto; padding:60px 60px 36vh; }
784
801
  .doc-title { font-size:38px; font-weight:700; letter-spacing:-.02em; outline:none; line-height:1.15; margin-bottom:4px; }
@@ -14028,7 +14045,7 @@ function finalize(ctx, schema) {
14028
14045
  result.$schema = "http://json-schema.org/draft-07/schema#";
14029
14046
  } else if (ctx.target === "draft-04") {
14030
14047
  result.$schema = "http://json-schema.org/draft-04/schema#";
14031
- } else if (ctx.target === "openapi-3.0") {} else {}
14048
+ } else if (ctx.target === "openapi-3.0") {}
14032
14049
  if (ctx.external?.uri) {
14033
14050
  const id = ctx.external.registry.get(schema)?.id;
14034
14051
  if (!id)
@@ -14272,7 +14289,7 @@ var literalProcessor = (schema, ctx, json, _params) => {
14272
14289
  if (val === undefined) {
14273
14290
  if (ctx.unrepresentable === "throw") {
14274
14291
  throw new Error("Literal `undefined` cannot be represented in JSON Schema");
14275
- } else {}
14292
+ }
14276
14293
  } else if (typeof val === "bigint") {
14277
14294
  if (ctx.unrepresentable === "throw") {
14278
14295
  throw new Error("BigInt literals cannot be represented in JSON Schema");
@@ -17011,7 +17028,7 @@ function getServerConfig(db) {
17011
17028
  // package.json
17012
17029
  var package_default = {
17013
17030
  name: "@tensorix/metahub",
17014
- version: "0.1.6",
17031
+ version: "0.1.8",
17015
17032
  description: "Metahub core library and CLI",
17016
17033
  license: "AGPL-3.0-only",
17017
17034
  type: "module",
@@ -17048,10 +17065,13 @@ var package_default = {
17048
17065
  citty: "^0.1.6",
17049
17066
  "highlight.js": "^11.11.1",
17050
17067
  preact: "^10.29.2",
17068
+ turndown: "^7.2.4",
17069
+ "turndown-plugin-gfm": "^1.0.2",
17051
17070
  zod: "^4.4.3"
17052
17071
  },
17053
17072
  devDependencies: {
17054
17073
  "@types/bun": "latest",
17074
+ "@types/turndown": "^5.0.6",
17055
17075
  typescript: "^5"
17056
17076
  }
17057
17077
  };
@@ -17977,7 +17997,7 @@ function startServer(opts = {}) {
17977
17997
  let timer = null;
17978
17998
  if (autoSync && syncIntervalMs > 0) {
17979
17999
  timer = setInterval(() => {
17980
- syncAllPeers(db).catch(() => {});
18000
+ syncAllPeers(db).catch((e) => console.error("[sync] auto-sync tick failed \u2014", e));
17981
18001
  }, syncIntervalMs);
17982
18002
  timer.unref?.();
17983
18003
  }
@@ -18100,4 +18120,4 @@ export {
18100
18120
  ChangeSchema
18101
18121
  };
18102
18122
 
18103
- //# debugId=F7BD99C8461B833164756E2164756E21
18123
+ //# debugId=D4C8ECDF76A598A964756E2164756E21