@octanejs/streamdown 0.1.37 → 0.1.39

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.
@@ -56,7 +56,7 @@ function useDeferredRender(options = {}) {
56
56
  const containerRef = useRef(null, _h$1);
57
57
  const renderTimeoutRef = useRef(null, _h$2);
58
58
  const idleCallbackRef = useRef(null, _h$3);
59
- const requestIdleCallbackPolyfill = (__hks = _$memoSlot(_h$4, "useMemo"), __hke = _$memoTake0(__hks), __hke === null ? _$memoPublish(__hks, (callback) => {
59
+ const requestIdleCallbackPolyfill = (__hks = _$memoSlot(_h$4), __hke = _$memoTake0(__hks), __hke === null ? _$memoPublish(__hks, (callback) => {
60
60
  const start = Date.now();
61
61
  return window.setTimeout(
62
62
  () => {
@@ -68,12 +68,12 @@ function useDeferredRender(options = {}) {
68
68
  1
69
69
  );
70
70
  }) : __hke.value);
71
- const requestIdleCallbackWrapper = (__hkd0 = requestIdleCallbackPolyfill, __hks$ = _$memoSlot(_h$5, "useMemo"), __hke$ = _$memoTake1(__hks$, __hkd0), __hke$ === null ? _$memoPublish(
71
+ const requestIdleCallbackWrapper = (__hkd0 = requestIdleCallbackPolyfill, __hks$ = _$memoSlot(_h$5), __hke$ = _$memoTake1(__hks$, __hkd0), __hke$ === null ? _$memoPublish(
72
72
  __hks$,
73
73
  typeof window !== "undefined" && window.requestIdleCallback ? (cb, opts) => window.requestIdleCallback(cb, opts) : requestIdleCallbackPolyfill,
74
74
  __hkd0
75
75
  ) : __hke$.value);
76
- const cancelIdleCallbackWrapper = (__hks$2 = _$memoSlot(_h$6, "useMemo"), __hke$2 = _$memoTake0(__hks$2), __hke$2 === null ? _$memoPublish(__hks$2, typeof window !== "undefined" && window.cancelIdleCallback ? (id) => window.cancelIdleCallback(id) : (id) => {
76
+ const cancelIdleCallbackWrapper = (__hks$2 = _$memoSlot(_h$6), __hke$2 = _$memoTake0(__hks$2), __hke$2 === null ? _$memoPublish(__hks$2, typeof window !== "undefined" && window.cancelIdleCallback ? (id) => window.cancelIdleCallback(id) : (id) => {
77
77
  clearTimeout(id);
78
78
  }) : __hke$2.value);
79
79
  useEffect(
@@ -485,12 +485,12 @@ var CodeBlockBody = /* @__PURE__ */ memo(
485
485
  }) => {
486
486
  let __hks, __hkd0, __hkd1, __hke, __hkr, __hks$, __hkd0$, __hkd1$, __hkd2, __hkv, __hke$;
487
487
  const cn2 = _$withSlot(_h$02, useCn);
488
- const lineClasses = (__hkd0 = cn2, __hkd1 = lineNumbers, __hks = _$memoSlot2(_h$12, "useMemo"), __hke = _$memoTake2(__hks, __hkd0, __hkd1), __hke === null ? _$memoPublish2(__hks, cn2("block", lineNumbers && LINE_NUMBER_CLASSES_BASE), __hkd0, __hkd1) : __hke.value);
488
+ const lineClasses = (__hkd0 = cn2, __hkd1 = lineNumbers, __hks = _$memoSlot2(_h$12), __hke = _$memoTake2(__hks, __hkd0, __hkd1), __hke === null ? _$memoPublish2(__hks, cn2("block", lineNumbers && LINE_NUMBER_CLASSES_BASE), __hkd0, __hkd1) : __hke.value);
489
489
  {
490
490
  __hkd0$ = result.bg;
491
491
  __hkd1$ = result.fg;
492
492
  __hkd2 = result.rootStyle;
493
- __hks$ = _$memoSlot2(_h$22, "useMemo");
493
+ __hks$ = _$memoSlot2(_h$22);
494
494
  __hke$ = _$memoTake3(__hks$, __hkd0$, __hkd1$, __hkd2);
495
495
  if (__hke$ === null) {
496
496
  __hkl: {
@@ -639,7 +639,7 @@ var trimTrailingNewlines = (str) => {
639
639
  }
640
640
  return str.slice(0, end);
641
641
  };
642
- var HighlightedCodeBlockBody = /* @__PURE__ */ lazy(() => import("./highlighted-body-E7RQMZWT.js").then((mod) => ({ default: mod.HighlightedCodeBlockBody })));
642
+ var HighlightedCodeBlockBody = /* @__PURE__ */ lazy(() => import("./highlighted-body-ERU3INRP.js").then((mod) => ({ default: mod.HighlightedCodeBlockBody })));
643
643
  var CodeBlock = ({
644
644
  code,
645
645
  language,
@@ -652,8 +652,8 @@ var CodeBlock = ({
652
652
  }) => {
653
653
  let __hks, __hkd0, __hke, __hks$, __hkd0$, __hke$;
654
654
  const cn2 = _$withSlot4(_h$05, useCn);
655
- const trimmedCode = (__hkd0 = code, __hks = _$memoSlot3(_h$13, "useMemo"), __hke = _$memoTake12(__hks, __hkd0), __hke === null ? _$memoPublish3(__hks, trimTrailingNewlines(code), __hkd0) : __hke.value);
656
- const raw = (__hkd0$ = trimmedCode, __hks$ = _$memoSlot3(_h$23, "useMemo"), __hke$ = _$memoTake12(__hks$, __hkd0$), __hke$ === null ? _$memoPublish3(
655
+ const trimmedCode = (__hkd0 = code, __hks = _$memoSlot3(_h$13), __hke = _$memoTake12(__hks, __hkd0), __hke === null ? _$memoPublish3(__hks, trimTrailingNewlines(code), __hkd0) : __hke.value);
656
+ const raw = (__hkd0$ = trimmedCode, __hks$ = _$memoSlot3(_h$23), __hke$ = _$memoTake12(__hks$, __hkd0$), __hke$ === null ? _$memoPublish3(
657
657
  __hks$,
658
658
  {
659
659
  bg: "transparent",
@@ -1567,7 +1567,7 @@ var ImageComponent = ({
1567
1567
  [src],
1568
1568
  _h$53
1569
1569
  );
1570
- const handleLoad = (__hkd0 = onLoadProp, __hkd1 = src, __hks = _$memoSlot4(_h$63, "useCallback"), __hke = _$memoTake22(__hks, __hkd0, __hkd1), __hke === null ? _$memoPublish4(
1570
+ const handleLoad = (__hkd0 = onLoadProp, __hkd1 = src, __hks = _$memoSlot4(_h$63), __hke = _$memoTake22(__hks, __hkd0, __hkd1), __hke === null ? _$memoPublish4(
1571
1571
  __hks,
1572
1572
  (event) => {
1573
1573
  setImageState({ error: false, loaded: true, source: src });
@@ -1576,7 +1576,7 @@ var ImageComponent = ({
1576
1576
  __hkd0,
1577
1577
  __hkd1
1578
1578
  ) : __hke.value);
1579
- const handleError = (__hkd0$ = onErrorProp, __hkd1$ = src, __hks$ = _$memoSlot4(_h$72, "useCallback"), __hke$ = _$memoTake22(__hks$, __hkd0$, __hkd1$), __hke$ === null ? _$memoPublish4(
1579
+ const handleError = (__hkd0$ = onErrorProp, __hkd1$ = src, __hks$ = _$memoSlot4(_h$72), __hke$ = _$memoTake22(__hks$, __hkd0$, __hkd1$), __hke$ === null ? _$memoPublish4(
1580
1580
  __hks$,
1581
1581
  (event) => {
1582
1582
  setImageState({ error: true, loaded: false, source: src });
@@ -1717,7 +1717,7 @@ var LinkSafetyModal = ({ url, isOpen, onClose, onConfirm }) => {
1717
1717
  const cn2 = _$withSlot9(_h$19, useCn);
1718
1718
  const [copied, setCopied] = useState4(false, _h$27);
1719
1719
  const t = _$withSlot9(_h$35, useTranslations);
1720
- const handleCopy = (__hkd0 = url, __hks = _$memoSlot5(_h$44, "useCallback"), __hke = _$memoTake13(__hks, __hkd0), __hke === null ? _$memoPublish5(
1720
+ const handleCopy = (__hkd0 = url, __hks = _$memoSlot5(_h$44), __hke = _$memoTake13(__hks, __hkd0), __hke === null ? _$memoPublish5(
1721
1721
  __hks,
1722
1722
  async () => {
1723
1723
  try {
@@ -1729,7 +1729,7 @@ var LinkSafetyModal = ({ url, isOpen, onClose, onConfirm }) => {
1729
1729
  },
1730
1730
  __hkd0
1731
1731
  ) : __hke.value);
1732
- const handleConfirm = (__hkd0$ = onConfirm, __hkd1 = onClose, __hks$ = _$memoSlot5(_h$54, "useCallback"), __hke$ = _$memoTake23(__hks$, __hkd0$, __hkd1), __hke$ === null ? _$memoPublish5(
1732
+ const handleConfirm = (__hkd0$ = onConfirm, __hkd1 = onClose, __hks$ = _$memoSlot5(_h$54), __hke$ = _$memoTake23(__hks$, __hkd0$, __hkd1), __hke$ === null ? _$memoPublish5(
1733
1733
  __hks$,
1734
1734
  () => {
1735
1735
  onConfirm();
@@ -2858,7 +2858,7 @@ var _h$262 = /* @__PURE__ */ Symbol(_hs$19 + 26);
2858
2858
  var _h$272 = /* @__PURE__ */ Symbol(_hs$19 + 27);
2859
2859
  var START_LINE_PATTERN = /startLine=(\d+)/;
2860
2860
  var NO_LINE_NUMBERS_PATTERN = /\bnoLineNumbers\b/;
2861
- var Mermaid2 = /* @__PURE__ */ lazy2(() => import("./mermaid-Y6WTTQI7.js").then((mod) => ({ default: mod.Mermaid })));
2861
+ var Mermaid2 = /* @__PURE__ */ lazy2(() => import("./mermaid-CFBTUSI4.js").then((mod) => ({ default: mod.Mermaid })));
2862
2862
  var LANGUAGE_REGEX = /language-([^\s]+)/;
2863
2863
  function sameNodePosition(prev, next) {
2864
2864
  if (!(prev?.position || next?.position)) {
@@ -3003,7 +3003,7 @@ var LinkComponent = ({ children, className, href, node, ...props }) => {
3003
3003
  const { linkSafety } = useContext14(StreamdownContext);
3004
3004
  const [isModalOpen, setIsModalOpen] = useState10(false, _h$68);
3005
3005
  const isIncomplete = href === "streamdown:incomplete-link";
3006
- const handleClick = (__hkd0 = linkSafety, __hkd1 = href, __hkd2 = isIncomplete, __hks = _$memoSlot6(_h$75, "useCallback"), __hke = _$memoTake32(__hks, __hkd0, __hkd1, __hkd2), __hke === null ? _$memoPublish6(
3006
+ const handleClick = (__hkd0 = linkSafety, __hkd1 = href, __hkd2 = isIncomplete, __hks = _$memoSlot6(_h$75), __hke = _$memoTake32(__hks, __hkd0, __hkd1, __hkd2), __hke === null ? _$memoPublish6(
3007
3007
  __hks,
3008
3008
  async (e) => {
3009
3009
  if (!(linkSafety?.enabled && href) || isIncomplete) {
@@ -3023,7 +3023,7 @@ var LinkComponent = ({ children, className, href, node, ...props }) => {
3023
3023
  __hkd1,
3024
3024
  __hkd2
3025
3025
  ) : __hke.value);
3026
- const handleConfirm = (__hkd0$ = href, __hks$ = _$memoSlot6(_h$82, "useCallback"), __hke$ = _$memoTake14(__hks$, __hkd0$), __hke$ === null ? _$memoPublish6(
3026
+ const handleConfirm = (__hkd0$ = href, __hks$ = _$memoSlot6(_h$82), __hke$ = _$memoTake14(__hks$, __hkd0$), __hke$ === null ? _$memoPublish6(
3027
3027
  __hks$,
3028
3028
  () => {
3029
3029
  if (href) {
@@ -3032,7 +3032,7 @@ var LinkComponent = ({ children, className, href, node, ...props }) => {
3032
3032
  },
3033
3033
  __hkd0$
3034
3034
  ) : __hke$.value);
3035
- const handleCloseModal = (__hks$2 = _$memoSlot6(_h$9, "useCallback"), __hke$2 = _$memoTake02(__hks$2), __hke$2 === null ? _$memoPublish6(__hks$2, () => {
3035
+ const handleCloseModal = (__hks$2 = _$memoSlot6(_h$9), __hke$2 = _$memoTake02(__hks$2), __hke$2 === null ? _$memoPublish6(__hks$2, () => {
3036
3036
  setIsModalOpen(false);
3037
3037
  }) : __hke$2.value);
3038
3038
  const modalProps = {
@@ -4192,7 +4192,7 @@ var Streamdown = /* @__PURE__ */ memo3(({
4192
4192
  let __hks, __hkd0, __hke, __hks$, __hkd0$, __hke$, __hks$2, __hkd0$2, __hkd1, __hke$2, __hks$3, __hkd0$3, __hkd1$, __hke$3, __hks$4, __hkd0$4, __hkd1$2, __hke$4, __hkr, __hks$5, __hkd0$5, __hkv, __hke$5, __hkr$, __hks$6, __hkd0$6, __hkv$, __hke$6, __hks$7, __hkd0$7, __hke$7, __hks$8, __hkd0$8, __hke$8, __hkr$2, __hks$9, __hkd0$9, __hkd1$3, __hkd2, __hkv$2, __hke$9, __hkr$3, __hks$10, __hkd0$10, __hkd1$4, __hkv$3, __hke$10, __hks$11, __hkd0$11, __hkd1$5, __hkd2$, __hke$11;
4193
4193
  const generatedId = useId(_h$020);
4194
4194
  const [_isPending, startTransition] = useTransition(_h$117);
4195
- const prefixedCn = (__hkd0 = prefix, __hks = _$memoSlot7(_h$215, "useMemo"), __hke = _$memoTake15(__hks, __hkd0), __hke === null ? _$memoPublish7(__hks, createCn(prefix), __hkd0) : __hke.value);
4195
+ const prefixedCn = (__hkd0 = prefix, __hks = _$memoSlot7(_h$215), __hke = _$memoTake15(__hks, __hkd0), __hke === null ? _$memoPublish7(__hks, createCn(prefix), __hkd0) : __hke.value);
4196
4196
  const prevIsAnimatingRef = useRef8(null, _h$313);
4197
4197
  const onAnimationStartRef = useRef8(onAnimationStart, _h$412);
4198
4198
  const onAnimationEndRef = useRef8(onAnimationEnd, _h$510);
@@ -4220,7 +4220,7 @@ var Streamdown = /* @__PURE__ */ memo3(({
4220
4220
  [isAnimating, mode],
4221
4221
  _h$69
4222
4222
  );
4223
- const allowedTagNames = (__hkd0$ = allowedTags, __hks$ = _$memoSlot7(_h$76, "useMemo"), __hke$ = _$memoTake15(__hks$, __hkd0$), __hke$ === null ? _$memoPublish7(__hks$, allowedTags ? Object.keys(allowedTags) : [], __hkd0$) : __hke$.value);
4223
+ const allowedTagNames = (__hkd0$ = allowedTags, __hks$ = _$memoSlot7(_h$76), __hke$ = _$memoTake15(__hks$, __hkd0$), __hke$ === null ? _$memoPublish7(__hks$, allowedTags ? Object.keys(allowedTags) : [], __hkd0$) : __hke$.value);
4224
4224
  const processedChildren = useMemo4(
4225
4225
  () => {
4226
4226
  if (typeof children !== "string") {
@@ -4245,7 +4245,7 @@ var Streamdown = /* @__PURE__ */ memo3(({
4245
4245
  ],
4246
4246
  _h$83
4247
4247
  );
4248
- const blocks = (__hkd0$2 = processedChildren, __hkd1 = parseMarkdownIntoBlocksFn, __hks$2 = _$memoSlot7(_h$92, "useMemo"), __hke$2 = _$memoTake24(__hks$2, __hkd0$2, __hkd1), __hke$2 === null ? _$memoPublish7(__hks$2, parseMarkdownIntoBlocksFn(processedChildren), __hkd0$2, __hkd1) : __hke$2.value);
4248
+ const blocks = (__hkd0$2 = processedChildren, __hkd1 = parseMarkdownIntoBlocksFn, __hks$2 = _$memoSlot7(_h$92), __hke$2 = _$memoTake24(__hks$2, __hkd0$2, __hkd1), __hke$2 === null ? _$memoPublish7(__hks$2, parseMarkdownIntoBlocksFn(processedChildren), __hkd0$2, __hkd1) : __hke$2.value);
4249
4249
  const [displayBlocks, setDisplayBlocks] = useState11(blocks, _h$102);
4250
4250
  useEffect10(
4251
4251
  () => {
@@ -4261,11 +4261,11 @@ var Streamdown = /* @__PURE__ */ memo3(({
4261
4261
  _h$118
4262
4262
  );
4263
4263
  const blocksToRender = mode === "streaming" ? displayBlocks : blocks;
4264
- const blockDirections = (__hkd0$3 = blocksToRender, __hkd1$ = dir, __hks$3 = _$memoSlot7(_h$123, "useMemo"), __hke$3 = _$memoTake24(__hks$3, __hkd0$3, __hkd1$), __hke$3 === null ? _$memoPublish7(__hks$3, dir === "auto" ? blocksToRender.map(detectTextDirection) : void 0, __hkd0$3, __hkd1$) : __hke$3.value);
4265
- const blockKeys = (__hkd0$4 = blocksToRender.length, __hkd1$2 = generatedId, __hks$4 = _$memoSlot7(_h$133, "useMemo"), __hke$4 = _$memoTake24(__hks$4, __hkd0$4, __hkd1$2), __hke$4 === null ? _$memoPublish7(__hks$4, blocksToRender.map((_block, idx) => `${generatedId}-${idx}`), __hkd0$4, __hkd1$2) : __hke$4.value);
4264
+ const blockDirections = (__hkd0$3 = blocksToRender, __hkd1$ = dir, __hks$3 = _$memoSlot7(_h$123), __hke$3 = _$memoTake24(__hks$3, __hkd0$3, __hkd1$), __hke$3 === null ? _$memoPublish7(__hks$3, dir === "auto" ? blocksToRender.map(detectTextDirection) : void 0, __hkd0$3, __hkd1$) : __hke$3.value);
4265
+ const blockKeys = (__hkd0$4 = blocksToRender.length, __hkd1$2 = generatedId, __hks$4 = _$memoSlot7(_h$133), __hke$4 = _$memoTake24(__hks$4, __hkd0$4, __hkd1$2), __hke$4 === null ? _$memoPublish7(__hks$4, blocksToRender.map((_block, idx) => `${generatedId}-${idx}`), __hkd0$4, __hkd1$2) : __hke$4.value);
4266
4266
  {
4267
4267
  __hkd0$5 = animated;
4268
- __hks$5 = _$memoSlot7(_h$143, "useMemo");
4268
+ __hks$5 = _$memoSlot7(_h$143);
4269
4269
  __hke$5 = _$memoTake15(__hks$5, __hkd0$5);
4270
4270
  if (__hke$5 === null) {
4271
4271
  __hkl: {
@@ -4293,7 +4293,7 @@ var Streamdown = /* @__PURE__ */ memo3(({
4293
4293
  const animatedKey = __hkr;
4294
4294
  {
4295
4295
  __hkd0$6 = animatedKey;
4296
- __hks$6 = _$memoSlot7(_h$153, "useMemo");
4296
+ __hks$6 = _$memoSlot7(_h$153);
4297
4297
  __hke$6 = _$memoTake15(__hks$6, __hkd0$6);
4298
4298
  if (__hke$6 === null) {
4299
4299
  __hkl$: {
@@ -4341,8 +4341,8 @@ var Streamdown = /* @__PURE__ */ memo3(({
4341
4341
  ],
4342
4342
  _h$163
4343
4343
  );
4344
- const translationsKey = (__hkd0$7 = translations, __hks$7 = _$memoSlot7(_h$173, "useMemo"), __hke$7 = _$memoTake15(__hks$7, __hkd0$7), __hke$7 === null ? _$memoPublish7(__hks$7, translations ? JSON.stringify(translations) : "", __hkd0$7) : __hke$7.value);
4345
- const translationsValue = (__hkd0$8 = translationsKey, __hks$8 = _$memoSlot7(_h$183, "useMemo"), __hke$8 = _$memoTake15(__hks$8, __hkd0$8), __hke$8 === null ? _$memoPublish7(__hks$8, { ...defaultTranslations, ...translations }, __hkd0$8) : __hke$8.value);
4344
+ const translationsKey = (__hkd0$7 = translations, __hks$7 = _$memoSlot7(_h$173), __hke$7 = _$memoTake15(__hks$7, __hkd0$7), __hke$7 === null ? _$memoPublish7(__hks$7, translations ? JSON.stringify(translations) : "", __hkd0$7) : __hke$7.value);
4345
+ const translationsValue = (__hkd0$8 = translationsKey, __hks$8 = _$memoSlot7(_h$183), __hke$8 = _$memoTake15(__hks$8, __hkd0$8), __hke$8 === null ? _$memoPublish7(__hks$8, { ...defaultTranslations, ...translations }, __hkd0$8) : __hke$8.value);
4346
4346
  const mergedComponents = useMemo4(
4347
4347
  () => {
4348
4348
  const { inlineCode, ...userComponents } = components2 ?? {};
@@ -4366,7 +4366,7 @@ var Streamdown = /* @__PURE__ */ memo3(({
4366
4366
  __hkd0$9 = remarkPlugins;
4367
4367
  __hkd1$3 = plugins?.math;
4368
4368
  __hkd2 = plugins?.cjk;
4369
- __hks$9 = _$memoSlot7(_h$202, "useMemo");
4369
+ __hks$9 = _$memoSlot7(_h$202);
4370
4370
  __hke$9 = _$memoTake33(__hks$9, __hkd0$9, __hkd1$3, __hkd2);
4371
4371
  if (__hke$9 === null) {
4372
4372
  __hkl$2: {
@@ -4433,7 +4433,7 @@ var Streamdown = /* @__PURE__ */ memo3(({
4433
4433
  {
4434
4434
  __hkd0$10 = isAnimating;
4435
4435
  __hkd1$4 = blocksToRender;
4436
- __hks$10 = _$memoSlot7(_h$223, "useMemo");
4436
+ __hks$10 = _$memoSlot7(_h$223);
4437
4437
  __hke$10 = _$memoTake24(__hks$10, __hkd0$10, __hkd1$4);
4438
4438
  if (__hke$10 === null) {
4439
4439
  __hkl$3: {
@@ -4454,7 +4454,7 @@ var Streamdown = /* @__PURE__ */ memo3(({
4454
4454
  } else __hkr$3 = __hke$10.value;
4455
4455
  }
4456
4456
  const shouldHideCaret = __hkr$3;
4457
- const style = (__hkd0$11 = caret, __hkd1$5 = isAnimating, __hkd2$ = shouldHideCaret, __hks$11 = _$memoSlot7(_h$233, "useMemo"), __hke$11 = _$memoTake33(__hks$11, __hkd0$11, __hkd1$5, __hkd2$), __hke$11 === null ? _$memoPublish7(
4457
+ const style = (__hkd0$11 = caret, __hkd1$5 = isAnimating, __hkd2$ = shouldHideCaret, __hks$11 = _$memoSlot7(_h$233), __hke$11 = _$memoTake33(__hks$11, __hkd0$11, __hkd1$5, __hkd2$), __hke$11 === null ? _$memoPublish7(
4458
4458
  __hks$11,
4459
4459
  caret && isAnimating && !shouldHideCaret ? { "--streamdown-caret": `"${carets[caret]}"` } : void 0,
4460
4460
  __hkd0$11,
@@ -4628,7 +4628,7 @@ var PanZoom = ({
4628
4628
  const [isPanning, setIsPanning] = useState12(false, _h$610);
4629
4629
  const [panStart, setPanStart] = useState12({ x: 0, y: 0 }, _h$77);
4630
4630
  const [panStartPosition, setPanStartPosition] = useState12({ x: 0, y: 0 }, _h$84);
4631
- const handleZoom = (__hkd0 = minZoom, __hkd1 = maxZoom, __hks = _$memoSlot8(_h$93, "useCallback"), __hke = _$memoTake25(__hks, __hkd0, __hkd1), __hke === null ? _$memoPublish8(
4631
+ const handleZoom = (__hkd0 = minZoom, __hkd1 = maxZoom, __hks = _$memoSlot8(_h$93), __hke = _$memoTake25(__hks, __hkd0, __hkd1), __hke === null ? _$memoPublish8(
4632
4632
  __hks,
4633
4633
  (delta) => {
4634
4634
  setZoom((prevZoom) => {
@@ -4639,7 +4639,7 @@ var PanZoom = ({
4639
4639
  __hkd0,
4640
4640
  __hkd1
4641
4641
  ) : __hke.value);
4642
- const handleZoomIn = (__hkd0$ = handleZoom, __hkd1$ = zoomStep, __hks$ = _$memoSlot8(_h$103, "useCallback"), __hke$ = _$memoTake25(__hks$, __hkd0$, __hkd1$), __hke$ === null ? _$memoPublish8(
4642
+ const handleZoomIn = (__hkd0$ = handleZoom, __hkd1$ = zoomStep, __hks$ = _$memoSlot8(_h$103), __hke$ = _$memoTake25(__hks$, __hkd0$, __hkd1$), __hke$ === null ? _$memoPublish8(
4643
4643
  __hks$,
4644
4644
  () => {
4645
4645
  handleZoom(zoomStep);
@@ -4647,7 +4647,7 @@ var PanZoom = ({
4647
4647
  __hkd0$,
4648
4648
  __hkd1$
4649
4649
  ) : __hke$.value);
4650
- const handleZoomOut = (__hkd0$2 = handleZoom, __hkd1$2 = zoomStep, __hks$2 = _$memoSlot8(_h$1110, "useCallback"), __hke$2 = _$memoTake25(__hks$2, __hkd0$2, __hkd1$2), __hke$2 === null ? _$memoPublish8(
4650
+ const handleZoomOut = (__hkd0$2 = handleZoom, __hkd1$2 = zoomStep, __hks$2 = _$memoSlot8(_h$1110), __hke$2 = _$memoTake25(__hks$2, __hkd0$2, __hkd1$2), __hke$2 === null ? _$memoPublish8(
4651
4651
  __hks$2,
4652
4652
  () => {
4653
4653
  handleZoom(-zoomStep);
@@ -4655,7 +4655,7 @@ var PanZoom = ({
4655
4655
  __hkd0$2,
4656
4656
  __hkd1$2
4657
4657
  ) : __hke$2.value);
4658
- const handleReset = (__hkd0$3 = initialZoom, __hks$3 = _$memoSlot8(_h$124, "useCallback"), __hke$3 = _$memoTake16(__hks$3, __hkd0$3), __hke$3 === null ? _$memoPublish8(
4658
+ const handleReset = (__hkd0$3 = initialZoom, __hks$3 = _$memoSlot8(_h$124), __hke$3 = _$memoTake16(__hks$3, __hkd0$3), __hke$3 === null ? _$memoPublish8(
4659
4659
  __hks$3,
4660
4660
  () => {
4661
4661
  setZoom(initialZoom);
@@ -4663,7 +4663,7 @@ var PanZoom = ({
4663
4663
  },
4664
4664
  __hkd0$3
4665
4665
  ) : __hke$3.value);
4666
- const handleWheel = (__hkd0$4 = handleZoom, __hkd1$3 = zoomStep, __hks$4 = _$memoSlot8(_h$134, "useCallback"), __hke$4 = _$memoTake25(__hks$4, __hkd0$4, __hkd1$3), __hke$4 === null ? _$memoPublish8(
4666
+ const handleWheel = (__hkd0$4 = handleZoom, __hkd1$3 = zoomStep, __hks$4 = _$memoSlot8(_h$134), __hke$4 = _$memoTake25(__hks$4, __hkd0$4, __hkd1$3), __hke$4 === null ? _$memoPublish8(
4667
4667
  __hks$4,
4668
4668
  (e) => {
4669
4669
  e.preventDefault();
@@ -4673,7 +4673,7 @@ var PanZoom = ({
4673
4673
  __hkd0$4,
4674
4674
  __hkd1$3
4675
4675
  ) : __hke$4.value);
4676
- const handlePointerDown = (__hkd0$5 = pan, __hks$5 = _$memoSlot8(_h$144, "useCallback"), __hke$5 = _$memoTake16(__hks$5, __hkd0$5), __hke$5 === null ? _$memoPublish8(
4676
+ const handlePointerDown = (__hkd0$5 = pan, __hks$5 = _$memoSlot8(_h$144), __hke$5 = _$memoTake16(__hks$5, __hkd0$5), __hke$5 === null ? _$memoPublish8(
4677
4677
  __hks$5,
4678
4678
  (e) => {
4679
4679
  if (e.button !== 0 || e.isPrimary === false) {
@@ -4689,7 +4689,7 @@ var PanZoom = ({
4689
4689
  },
4690
4690
  __hkd0$5
4691
4691
  ) : __hke$5.value);
4692
- const handlePointerMove = (__hkd0$6 = isPanning, __hkd1$4 = panStart, __hkd2 = panStartPosition, __hks$6 = _$memoSlot8(_h$154, "useCallback"), __hke$6 = _$memoTake34(__hks$6, __hkd0$6, __hkd1$4, __hkd2), __hke$6 === null ? _$memoPublish8(
4692
+ const handlePointerMove = (__hkd0$6 = isPanning, __hkd1$4 = panStart, __hkd2 = panStartPosition, __hks$6 = _$memoSlot8(_h$154), __hke$6 = _$memoTake34(__hks$6, __hkd0$6, __hkd1$4, __hkd2), __hke$6 === null ? _$memoPublish8(
4693
4693
  __hks$6,
4694
4694
  (e) => {
4695
4695
  if (!isPanning) {
@@ -4707,7 +4707,7 @@ var PanZoom = ({
4707
4707
  __hkd1$4,
4708
4708
  __hkd2
4709
4709
  ) : __hke$6.value);
4710
- const handlePointerUp = (__hks$7 = _$memoSlot8(_h$164, "useCallback"), __hke$7 = _$memoTake03(__hks$7), __hke$7 === null ? _$memoPublish8(__hks$7, (e) => {
4710
+ const handlePointerUp = (__hks$7 = _$memoSlot8(_h$164), __hke$7 = _$memoTake03(__hks$7), __hke$7 === null ? _$memoPublish8(__hks$7, (e) => {
4711
4711
  setIsPanning(false);
4712
4712
  const target = e.currentTarget;
4713
4713
  if (target instanceof HTMLElement) {
@@ -3,7 +3,7 @@ import {
3
3
  CodeBlockBody,
4
4
  StreamdownContext,
5
5
  useCodePlugin
6
- } from "./chunk-YINKC7GN.js";
6
+ } from "./chunk-3ZWXIWBP.js";
7
7
 
8
8
  // src/lib/code-block/highlighted-body.tsrx
9
9
  import {
@@ -40,7 +40,7 @@ var HighlightedCodeBlockBody = ({
40
40
  let __hks, __hkd0, __hkd1, __hkd2, __hkd3, __hke;
41
41
  const { shikiTheme } = useContext(StreamdownContext);
42
42
  const codePlugin = _$withSlot(_h$0, useCodePlugin);
43
- const request = (__hkd0 = code, __hkd1 = language, __hkd2 = codePlugin, __hkd3 = shikiTheme, __hks = _$memoSlot(_h$1, "useMemo"), __hke = _$memoTake4(__hks, __hkd0, __hkd1, __hkd2, __hkd3), __hke === null ? _$memoPublish(__hks, { code, language, plugin: codePlugin, themes: shikiTheme }, __hkd0, __hkd1, __hkd2, __hkd3) : __hke.value);
43
+ const request = (__hkd0 = code, __hkd1 = language, __hkd2 = codePlugin, __hkd3 = shikiTheme, __hks = _$memoSlot(_h$1), __hke = _$memoTake4(__hks, __hkd0, __hkd1, __hkd2, __hkd3), __hke === null ? _$memoPublish(__hks, { code, language, plugin: codePlugin, themes: shikiTheme }, __hkd0, __hkd1, __hkd2, __hkd3) : __hke.value);
44
44
  const [highlight, setHighlight] = useState({ request, result: raw }, _h$2);
45
45
  const requestRef = useRef(request, _h$3);
46
46
  requestRef.current = request;
@@ -1,7 +1,7 @@
1
1
  // octane-no-slot: this package already contains compiler-assigned hook slots.
2
2
  import {
3
3
  Mermaid
4
- } from "./chunk-YINKC7GN.js";
4
+ } from "./chunk-3ZWXIWBP.js";
5
5
  export {
6
6
  Mermaid
7
7
  };
@@ -26,7 +26,7 @@ import {
26
26
  tableDataToMarkdown,
27
27
  tableDataToTSV,
28
28
  useIsCodeFenceIncomplete
29
- } from "./chunks/chunk-YINKC7GN.js";
29
+ } from "./chunks/chunk-3ZWXIWBP.js";
30
30
  export {
31
31
  Block,
32
32
  CodeBlock,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@octanejs/streamdown",
3
- "version": "0.1.37",
3
+ "version": "0.1.39",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "sideEffects": [
@@ -92,7 +92,7 @@
92
92
  "unist-util-visit-parents": "^6.0.0"
93
93
  },
94
94
  "peerDependencies": {
95
- "octane": "^0.7.0"
95
+ "octane": "^0.9.0"
96
96
  },
97
97
  "devDependencies": {
98
98
  "@testing-library/jest-dom": "^6.9.1",
@@ -108,13 +108,13 @@
108
108
  "@streamdown/mermaid": "1.0.2",
109
109
  "@streamdown/cjk": "1.0.3",
110
110
  "vitest": "^4.1.10",
111
- "@octanejs/testing-library": "0.1.56",
112
- "octane": "0.7.0"
111
+ "@octanejs/testing-library": "0.1.58",
112
+ "octane": "0.9.0"
113
113
  },
114
114
  "scripts": {
115
115
  "build": "node scripts/build.mjs",
116
116
  "test": "vitest run --root ../.. --project streamdown --project streamdown-differential --project streamdown-ssr",
117
- "typecheck": "tsrx-tsc --noEmit -p tsconfig.json && tsgo --noEmit -p typetests/tsconfig.json",
117
+ "typecheck": "octane-tsc -p tsconfig.json -p typetests/tsconfig.json",
118
118
  "types:check": "node scripts/generate-tsrx-types.mjs --check && node scripts/check-public-types.mjs",
119
119
  "types:generate": "node scripts/generate-tsrx-types.mjs"
120
120
  }