@xyd-js/content 0.0.0-build-2acf05c-20251207022018 → 0.0.0-build-83b15db-20251213220910

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/md.js CHANGED
@@ -28,9 +28,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
28
28
  mod
29
29
  ));
30
30
 
31
- // ../../node_modules/.pnpm/react@19.2.1/node_modules/react/cjs/react.production.js
31
+ // ../../node_modules/.pnpm/react@19.2.3/node_modules/react/cjs/react.production.js
32
32
  var require_react_production = __commonJS({
33
- "../../node_modules/.pnpm/react@19.2.1/node_modules/react/cjs/react.production.js"(exports) {
33
+ "../../node_modules/.pnpm/react@19.2.3/node_modules/react/cjs/react.production.js"(exports) {
34
34
  "use strict";
35
35
  var REACT_ELEMENT_TYPE = /* @__PURE__ */ Symbol.for("react.transitional.element");
36
36
  var REACT_PORTAL_TYPE = /* @__PURE__ */ Symbol.for("react.portal");
@@ -465,13 +465,13 @@ var require_react_production = __commonJS({
465
465
  exports.useTransition = function() {
466
466
  return ReactSharedInternals.H.useTransition();
467
467
  };
468
- exports.version = "19.2.1";
468
+ exports.version = "19.2.3";
469
469
  }
470
470
  });
471
471
 
472
- // ../../node_modules/.pnpm/react@19.2.1/node_modules/react/cjs/react.development.js
472
+ // ../../node_modules/.pnpm/react@19.2.3/node_modules/react/cjs/react.development.js
473
473
  var require_react_development = __commonJS({
474
- "../../node_modules/.pnpm/react@19.2.1/node_modules/react/cjs/react.development.js"(exports, module) {
474
+ "../../node_modules/.pnpm/react@19.2.3/node_modules/react/cjs/react.development.js"(exports, module) {
475
475
  "use strict";
476
476
  "production" !== process.env.NODE_ENV && (function() {
477
477
  function defineDeprecationWarning(methodName, info) {
@@ -1435,15 +1435,15 @@ var require_react_development = __commonJS({
1435
1435
  exports.useTransition = function() {
1436
1436
  return resolveDispatcher().useTransition();
1437
1437
  };
1438
- exports.version = "19.2.1";
1438
+ exports.version = "19.2.3";
1439
1439
  "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
1440
1440
  })();
1441
1441
  }
1442
1442
  });
1443
1443
 
1444
- // ../../node_modules/.pnpm/react@19.2.1/node_modules/react/index.js
1444
+ // ../../node_modules/.pnpm/react@19.2.3/node_modules/react/index.js
1445
1445
  var require_react = __commonJS({
1446
- "../../node_modules/.pnpm/react@19.2.1/node_modules/react/index.js"(exports, module) {
1446
+ "../../node_modules/.pnpm/react@19.2.3/node_modules/react/index.js"(exports, module) {
1447
1447
  "use strict";
1448
1448
  if (process.env.NODE_ENV === "production") {
1449
1449
  module.exports = require_react_production();
@@ -2718,6 +2718,9 @@ function injectCodeMeta(node, metaString) {
2718
2718
  if ((attributes2 == null ? void 0 : attributes2.title) === "false") {
2719
2719
  props.title = "";
2720
2720
  }
2721
+ if (attributes2) {
2722
+ props.attributes = JSON.stringify(attributes2);
2723
+ }
2721
2724
  node.data.hProperties = {
2722
2725
  ...node.data.hProperties || {},
2723
2726
  ...props
@@ -10740,11 +10743,12 @@ import fs3, { writeFile } from "fs/promises";
10740
10743
  import { VFile as VFile2 } from "vfile";
10741
10744
  import { compile as mdxCompile } from "@mdx-js/mdx";
10742
10745
  var ContentFS = class {
10743
- constructor(settings, remarkPlugins2, rehypePlugins, recmaPlugins) {
10746
+ constructor(settings, remarkPlugins2, rehypePlugins, recmaPlugins, remarkRehypeHandlers) {
10744
10747
  this.settings = settings;
10745
10748
  this.remarkPlugins = remarkPlugins2;
10746
10749
  this.rehypePlugins = rehypePlugins;
10747
10750
  this.recmaPlugins = recmaPlugins;
10751
+ this.remarkRehypeHandlers = remarkRehypeHandlers;
10748
10752
  }
10749
10753
  async compile(filePath) {
10750
10754
  await fs3.access(filePath);
@@ -10763,7 +10767,12 @@ var ContentFS = class {
10763
10767
  recmaPlugins: this.recmaPlugins || [],
10764
10768
  development: false,
10765
10769
  outputFormat: "function-body",
10766
- jsx: false
10770
+ jsx: false,
10771
+ remarkRehypeOptions: {
10772
+ handlers: {
10773
+ ...this.remarkRehypeHandlers || {}
10774
+ }
10775
+ }
10767
10776
  // jsx: false,
10768
10777
  // outputFormat: "program", // needed for import/export
10769
10778
  });
@@ -10781,8 +10790,13 @@ var ContentFS = class {
10781
10790
  recmaPlugins: [],
10782
10791
  development: false,
10783
10792
  jsx: true,
10784
- outputFormat: "program"
10793
+ outputFormat: "program",
10785
10794
  // needed for import/export
10795
+ remarkRehypeOptions: {
10796
+ handlers: {
10797
+ ...this.remarkRehypeHandlers || {}
10798
+ }
10799
+ }
10786
10800
  });
10787
10801
  const tempPath = join3(tmpdir(), `mdx-${Date.now()}.mjs`);
10788
10802
  await writeFile(tempPath, String(compiled), "utf8");
@@ -10815,7 +10829,7 @@ function mdCodeRehype(settings) {
10815
10829
  console.time("plugin:mdServerHighlight");
10816
10830
  const promises = [];
10817
10831
  visit11(tree, "element", (node) => {
10818
- var _a2, _b2, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E, _F;
10832
+ var _a2, _b2, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E, _F, _G, _H, _I;
10819
10833
  if (node.tagName === "pre") {
10820
10834
  const code2 = node.children[0].children[0].value;
10821
10835
  const lang = (_e = (_d = (_c = (_b2 = (_a2 = node.children) == null ? void 0 : _a2[0]) == null ? void 0 : _b2.properties) == null ? void 0 : _c.className) == null ? void 0 : _d[0]) == null ? void 0 : _e.replace("language-", "");
@@ -10825,8 +10839,9 @@ function mdCodeRehype(settings) {
10825
10839
  const descriptionHead = (_t = (_s = (_r = node.children) == null ? void 0 : _r[0]) == null ? void 0 : _s.properties) == null ? void 0 : _t.descriptionHead;
10826
10840
  const descriptionContent = (_w = (_v = (_u = node.children) == null ? void 0 : _u[0]) == null ? void 0 : _v.properties) == null ? void 0 : _w.descriptionContent;
10827
10841
  const descriptionIcon = (_z = (_y = (_x = node.children) == null ? void 0 : _x[0]) == null ? void 0 : _y.properties) == null ? void 0 : _z.descriptionIcon;
10828
- const meta = (_C = (_B = (_A = node.children) == null ? void 0 : _A[0]) == null ? void 0 : _B.properties) == null ? void 0 : _C.meta;
10829
- const title = (_F = (_E = (_D = node.children) == null ? void 0 : _D[0]) == null ? void 0 : _E.properties) == null ? void 0 : _F.title;
10842
+ let attributes2 = (_C = (_B = (_A = node.children) == null ? void 0 : _A[0]) == null ? void 0 : _B.properties) == null ? void 0 : _C.attributes;
10843
+ const meta = (_F = (_E = (_D = node.children) == null ? void 0 : _D[0]) == null ? void 0 : _E.properties) == null ? void 0 : _F.meta;
10844
+ const title = (_I = (_H = (_G = node.children) == null ? void 0 : _G[0]) == null ? void 0 : _H.properties) == null ? void 0 : _I.title;
10830
10845
  const promise = (async () => {
10831
10846
  var _a3, _b3;
10832
10847
  let descriptionContentCode = "";
@@ -10854,7 +10869,8 @@ function mdCodeRehype(settings) {
10854
10869
  size,
10855
10870
  descriptionHead,
10856
10871
  descriptionContent: descriptionContentCode,
10857
- descriptionIcon
10872
+ descriptionIcon,
10873
+ attributes: attributes2
10858
10874
  };
10859
10875
  })();
10860
10876
  promises.push(promise);