@xyd-js/content 0.0.0-build-c7bdbdb-20251129215505 → 0.0.0-build-11974d8-20251130234931

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/vite.d.ts CHANGED
@@ -125,6 +125,7 @@ interface SourceDescription extends Partial<PartialNull<ModuleOptions>> {
125
125
  interface TransformModuleJSON {
126
126
  ast?: ProgramNode | undefined;
127
127
  code: string;
128
+ safeVariableNames: Record<string, string> | null;
128
129
  // note if plugins use new this.cache to opt-out auto transform cache
129
130
  customTransformCache: boolean;
130
131
  originalCode: string;
@@ -134,6 +135,7 @@ interface TransformModuleJSON {
134
135
  }
135
136
 
136
137
  interface ModuleJSON extends TransformModuleJSON, ModuleOptions {
138
+ safeVariableNames: Record<string, string> | null;
137
139
  ast: ProgramNode;
138
140
  dependencies: string[];
139
141
  id: string;
@@ -198,6 +200,7 @@ interface ModuleInfo extends ModuleOptions {
198
200
  dynamicallyImportedIds: readonly string[];
199
201
  exportedBindings: Record<string, string[]> | null;
200
202
  exports: string[] | null;
203
+ safeVariableNames: Record<string, string> | null;
201
204
  hasDefaultExport: boolean | null;
202
205
  id: string;
203
206
  implicitlyLoadedAfterOneOf: readonly string[];
package/dist/vite.js CHANGED
@@ -19438,7 +19438,7 @@ function disallowed(code) {
19438
19438
  // packages/md/plugins/output-variables/lib/util.ts
19439
19439
  var import_stringify_entities = __toESM(require_stringify_entities(), 1);
19440
19440
 
19441
- // ../../node_modules/.pnpm/unist-util-is@6.0.0/node_modules/unist-util-is/lib/index.js
19441
+ // ../../node_modules/.pnpm/unist-util-is@6.0.1/node_modules/unist-util-is/lib/index.js
19442
19442
  var convert = (
19443
19443
  // Note: overloads in JSDoc can’t yet use different `@template`s.
19444
19444
  /**
@@ -19462,7 +19462,14 @@ var convert = (
19462
19462
  return castFactory(test);
19463
19463
  }
19464
19464
  if (typeof test === "object") {
19465
- return Array.isArray(test) ? anyFactory(test) : propsFactory(test);
19465
+ return Array.isArray(test) ? anyFactory(test) : (
19466
+ // Cast because `ReadonlyArray` goes into the above but `isArray`
19467
+ // narrows to `Array`.
19468
+ propertiesFactory(
19469
+ /** @type {Props} */
19470
+ test
19471
+ )
19472
+ );
19466
19473
  }
19467
19474
  if (typeof test === "string") {
19468
19475
  return typeFactory(test);
@@ -19485,7 +19492,7 @@ function anyFactory(tests) {
19485
19492
  return false;
19486
19493
  }
19487
19494
  }
19488
- function propsFactory(check) {
19495
+ function propertiesFactory(check) {
19489
19496
  const checkAsRecord = (
19490
19497
  /** @type {Record<string, unknown>} */
19491
19498
  check
@@ -19530,12 +19537,12 @@ function looksLikeANode(value) {
19530
19537
  return value !== null && typeof value === "object" && "type" in value;
19531
19538
  }
19532
19539
 
19533
- // ../../node_modules/.pnpm/unist-util-visit-parents@6.0.1/node_modules/unist-util-visit-parents/lib/color.node.js
19540
+ // ../../node_modules/.pnpm/unist-util-visit-parents@6.0.2/node_modules/unist-util-visit-parents/lib/color.node.js
19534
19541
  function color2(d) {
19535
19542
  return "\x1B[33m" + d + "\x1B[39m";
19536
19543
  }
19537
19544
 
19538
- // ../../node_modules/.pnpm/unist-util-visit-parents@6.0.1/node_modules/unist-util-visit-parents/lib/index.js
19545
+ // ../../node_modules/.pnpm/unist-util-visit-parents@6.0.2/node_modules/unist-util-visit-parents/lib/index.js
19539
19546
  var empty3 = [];
19540
19547
  var CONTINUE2 = true;
19541
19548
  var EXIT2 = false;
@@ -20049,17 +20056,62 @@ async function getMermaidPlugin() {
20049
20056
  }
20050
20057
  return rehypeMermaid;
20051
20058
  }
20052
- async function thirdPartyRehypePlugins(settings) {
20059
+ var rehypeGraphviz;
20060
+ var graphviz;
20061
+ async function getGraphvizPlugin() {
20062
+ if (!rehypeGraphviz) {
20063
+ const graphizMod = (await import("@hpcc-js/wasm")).Graphviz;
20064
+ graphviz = await graphizMod.load();
20065
+ rehypeGraphviz = (await import("rehype-graphviz")).default;
20066
+ }
20067
+ return [
20068
+ rehypeGraphviz,
20069
+ {
20070
+ graphviz
20071
+ }
20072
+ ];
20073
+ }
20074
+ function isDiagramTypeEnabled(settings, diagramType) {
20075
+ var _a;
20076
+ const diagrams = (_a = settings == null ? void 0 : settings.integrations) == null ? void 0 : _a.diagrams;
20077
+ if (!diagrams) {
20078
+ return false;
20079
+ }
20080
+ if (diagrams === true) {
20081
+ return true;
20082
+ }
20083
+ if (Array.isArray(diagrams) && diagrams.includes(diagramType)) {
20084
+ return true;
20085
+ }
20086
+ if (typeof diagrams === "object" && !Array.isArray(diagrams)) {
20087
+ if (diagramType in diagrams) {
20088
+ return true;
20089
+ }
20090
+ }
20091
+ return false;
20092
+ }
20093
+ function getDiagramOptions(settings, diagramType) {
20053
20094
  var _a;
20095
+ const diagrams = (_a = settings == null ? void 0 : settings.integrations) == null ? void 0 : _a.diagrams;
20096
+ if (!diagrams || typeof diagrams !== "object" || Array.isArray(diagrams)) {
20097
+ return {};
20098
+ }
20099
+ return diagrams[diagramType] && typeof diagrams[diagramType] === "object" ? diagrams[diagramType] : {};
20100
+ }
20101
+ async function thirdPartyRehypePlugins(settings) {
20054
20102
  const plugins = [
20055
20103
  [rehypeRaw, {
20056
20104
  passThrough: ["mdxjsEsm", "mdxJsxFlowElement", "mdxJsxTextElement"]
20057
20105
  }],
20058
20106
  rehypeKatex
20059
20107
  ];
20060
- if ((_a = settings == null ? void 0 : settings.integrations) == null ? void 0 : _a.diagrams) {
20061
- const options = typeof settings.integrations.diagrams === "object" ? settings.integrations.diagrams : {};
20062
- plugins.push([await getMermaidPlugin(), options]);
20108
+ if (isDiagramTypeEnabled(settings, "mermaid")) {
20109
+ const mermaidOptions = getDiagramOptions(settings, "mermaid");
20110
+ plugins.push([await getMermaidPlugin(), mermaidOptions]);
20111
+ }
20112
+ if (isDiagramTypeEnabled(settings, "graphviz")) {
20113
+ const graphvizPlugin = await getGraphvizPlugin();
20114
+ plugins.push(graphvizPlugin);
20063
20115
  }
20064
20116
  return plugins;
20065
20117
  }