dsh-data-domain-knowledge 0.1.1-alpha.10 → 0.1.1-alpha.11

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 (47) hide show
  1. package/lib/client.js +4 -2
  2. package/lib/doc-page.js +44 -0
  3. package/lib/pages.js +3514 -2592
  4. package/lib/types/axis-registry.d.ts.map +1 -1
  5. package/lib/types/axis-registry.js +8 -0
  6. package/lib/types/axis-registry.js.map +1 -1
  7. package/lib/types/index.d.ts.map +1 -1
  8. package/lib/types/index.js +39 -3
  9. package/lib/types/index.js.map +1 -1
  10. package/lib/types/pipeline/engine.d.ts +9 -0
  11. package/lib/types/pipeline/engine.d.ts.map +1 -1
  12. package/lib/types/pipeline/engine.js +55 -7
  13. package/lib/types/pipeline/engine.js.map +1 -1
  14. package/lib/types/pipeline/store.d.ts +52 -1
  15. package/lib/types/pipeline/store.d.ts.map +1 -1
  16. package/lib/types/pipeline/store.js +106 -6
  17. package/lib/types/pipeline/store.js.map +1 -1
  18. package/lib/types/pipeline/types.d.ts +11 -1
  19. package/lib/types/pipeline/types.d.ts.map +1 -1
  20. package/lib/types/pipeline/types.js.map +1 -1
  21. package/lib/types/pipeline/why.d.ts +40 -0
  22. package/lib/types/pipeline/why.d.ts.map +1 -0
  23. package/lib/types/pipeline/why.js +68 -0
  24. package/lib/types/pipeline/why.js.map +1 -0
  25. package/lib/types/runtime.d.ts +55 -1
  26. package/lib/types/runtime.d.ts.map +1 -1
  27. package/lib/types/runtime.js +143 -16
  28. package/lib/types/runtime.js.map +1 -1
  29. package/package.json +1 -1
  30. package/src/axis-registry.ts +8 -0
  31. package/src/client/DocumentExtractionView.tsx +39 -42
  32. package/src/client/DocumentNormalizeView.tsx +338 -0
  33. package/src/client/ExtractionTasksPage.tsx +165 -157
  34. package/src/client/NormalizeAxesPanel.tsx +110 -83
  35. package/src/client/PipelineNotice.tsx +1 -1
  36. package/src/client/ReadingView.tsx +33 -26
  37. package/src/client/doc-page.tsx +2 -0
  38. package/src/client/page-icon.ts +76 -0
  39. package/src/client/pages.tsx +2 -0
  40. package/src/client/request.ts +20 -1
  41. package/src/client/tasks-page.css +460 -425
  42. package/src/index.ts +40 -2
  43. package/src/pipeline/engine.ts +56 -10
  44. package/src/pipeline/store.ts +116 -7
  45. package/src/pipeline/types.ts +11 -1
  46. package/src/pipeline/why.ts +72 -0
  47. package/src/runtime.ts +144 -18
package/lib/client.js CHANGED
@@ -104824,7 +104824,9 @@ var import_react15 = require("react");
104824
104824
 
104825
104825
  // src/client/request.ts
104826
104826
  async function requestJson(url, init) {
104827
- const response = await fetch(url, init);
104827
+ return readEnvelope(await fetch(url, init));
104828
+ }
104829
+ async function readEnvelope(response) {
104828
104830
  const text = await response.text();
104829
104831
  if (!text.trim()) throw new Error(`\u670D\u52A1\u7AEF\u8FD4\u56DE\u7A7A\u54CD\u5E94\uFF08HTTP ${response.status}\uFF09`);
104830
104832
  let payload;
@@ -111462,7 +111464,7 @@ function PipelineNotice({ kb, revision, onOpen }) {
111462
111464
  if (!status) return null;
111463
111465
  const pending = status.pendingNew + status.pendingUpdated + status.pendingWithdrawn;
111464
111466
  const parts = [
111465
- status.sources.filter((source) => source.state === "pending" || source.state === "outdated").length,
111467
+ status.sources.filter((source) => source.state === "pending" || source.state === "outdated" || source.state === "stale").length,
111466
111468
  status.sources.filter((source) => source.state === "extracted").length
111467
111469
  ];
111468
111470
  if (!parts.some(Boolean) && !pending && !status.indexPending) return null;
package/lib/doc-page.js CHANGED
@@ -7284,6 +7284,49 @@
7284
7284
  var import_react2 = __toESM(require_react(), 1);
7285
7285
  var import_client = __toESM(require_client(), 1);
7286
7286
 
7287
+ // src/client/page-icon.ts
7288
+ var ICON_SVG = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width="32" height="32" role="img" aria-label="TitaAgent \u77E5\u8BC6\u5904\u7406">
7289
+ <style>
7290
+ .plate{fill:#f7f8fa;stroke:#101828}
7291
+ .pin{stroke:#101828}
7292
+ .core{fill:#4868b2}
7293
+ @media (prefers-color-scheme:dark){
7294
+ .plate{fill:#1b1c21;stroke:#e8eaef}
7295
+ .pin{stroke:#e8eaef}
7296
+ .core{fill:#7c96db}
7297
+ }
7298
+ </style>
7299
+ <rect class="plate" x="6.5" y="6.5" width="19" height="19" rx="2.5" fill="#f7f8fa" stroke="#101828" stroke-width="2"/>
7300
+ <rect class="core" x="12" y="12" width="8" height="8" rx="1.2" fill="#4868b2"/>
7301
+ <g class="pin" fill="none" stroke="#101828" stroke-width="2" stroke-linecap="round">
7302
+ <path d="M2 12.5h4M2 19.5h4"/>
7303
+ <path d="M26 12.5h4M26 19.5h4"/>
7304
+ <path d="M12.5 2v4M19.5 2v4"/>
7305
+ <path d="M12.5 26v4M19.5 26v4"/>
7306
+ </g>
7307
+ </svg>
7308
+ `;
7309
+ var ICON_PNG_BASE64 = "iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAElElEQVR42sWXz2tcVRTHP+fe9yaNyWQmis2E1jTdJCnamZaC0o2BEVFoQVxUcSMuXFhQS7WL/g3qQhfi1p1SXOiioIKFdKF2UTCtQqqL9JckcZOJk0mT9+67x8X8yJskM0nTgBfeMHO/7737nXPP93vOhYcdw8OP7QrrMMzObjtjAfJDE6cH5Yk/BocmTq3Pd8P2jMA/AqBGnzU2GPVGn1uf74Y9OgEDkwEQwGQgSqTqvSjR+nw3bDLYbo1gG3IepjzgAJSxGmAUrcGUa85vh62/a+cEDODzB54u7QvsC4rkRNQniX8eEWyYOV0YPTagqgZARHySuBRWHFAVI+jSqnvwU+Xvv6Y7kdhqnyyQ5Icm3kXk0+pyzSZJUr9Vff0SA7LhUdUUZgDFWku2vy9B9VxlYebz5ru7ETCAHzw4flSduQHK62deiQ8fekpcnYRRVSMiXqT936jSwkB9YC2zt+/p1998FwqCBHp08f7M7922g0bSUBgpXjD9I3r2/YuRPuJ4572Lkekf0cKh4ofpNTbmgIVJaWQuKpUB75yOjo6I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ent(ICON_SVG)}`;
7311
+ var PNG_URL = `data:image/png;base64,${ICON_PNG_BASE64}`;
7312
+ function installPageIcon() {
7313
+ if (typeof document === "undefined") return;
7314
+ if (document.head.querySelector("link[data-page-icon]") !== null) return;
7315
+ const icons = [
7316
+ { href: SVG_URL, type: "image/svg+xml" },
7317
+ { href: PNG_URL, type: "image/png", sizes: "32x32" }
7318
+ ];
7319
+ for (const icon of icons) {
7320
+ const link = document.createElement("link");
7321
+ link.rel = "icon";
7322
+ link.type = icon.type;
7323
+ if (icon.sizes !== void 0) link.sizes = icon.sizes;
7324
+ link.href = icon.href;
7325
+ link.dataset.pageIcon = "";
7326
+ document.head.append(link);
7327
+ }
7328
+ }
7329
+
7287
7330
  // ../../packages/ui/lib/markdown.js
7288
7331
  var import_react = __toESM(require_react(), 1);
7289
7332
  var IMAGE_PATTERN = /^!\[([^\]]*)\]\(\s*([^\s)]+)(?:\s+"([^"]*)")?\s*\)/;
@@ -7716,6 +7759,7 @@
7716
7759
  ] }) })
7717
7760
  ] });
7718
7761
  }
7762
+ installPageIcon();
7719
7763
  var container = document.getElementById("tita-document-root");
7720
7764
  if (container !== null) (0, import_client.createRoot)(container).render(/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react2.StrictMode, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(App, {}) }));
7721
7765
  })();