@openclaw/feishu 2026.10.2 → 2026.10.5-beta.2
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/.setup/{app-registration-BB6TubaW.mjs → app-registration-DQOq5urV.mjs} +13 -32
- package/dist/.setup/{channel-DZakdZ3r.mjs → channel-CjGGyrdx.mjs} +87 -174
- package/dist/.setup/{channel.runtime-rXFuQXLL.mjs → channel.runtime-SaC_uTPM.mjs} +57 -74
- package/dist/.setup/{chat-mTBvMMvx.mjs → chat-fC3dvxFs.mjs} +16 -28
- package/dist/.setup/{client-CcxmEkoy.mjs → client-wwr8PGPH.mjs} +24 -30
- package/dist/.setup/{conversation-id-C1ofUfU8.mjs → conversation-id-D00i9uy5.mjs} +5 -10
- package/dist/.setup/{doctor-contract-DyOo8NvC.mjs → doctor-contract-oIpUWtNO.mjs} +8 -15
- package/dist/.setup/{monitor-CXaFHMmi.mjs → monitor-Yt__BUki.mjs} +33 -54
- package/dist/.setup/{monitor.account-cJ8gavqv.mjs → monitor.account-CVz16781.mjs} +359 -658
- package/dist/.setup/{probe-BjSykXB8.mjs → probe-DXnFxq5j.mjs} +14 -17
- package/dist/.setup/{reply-delivery-result-laBNOmBu.mjs → reply-delivery-result-iCCrdxE1.mjs} +153 -181
- package/dist/.setup/{session-conversation-C53IEUWt.mjs → session-conversation-BSBNK5Mq.mjs} +1 -1
- package/dist/.setup/{setup-api-fZcYXGxe.mjs → setup-api-B_LFQQ-Q.mjs} +1 -1
- package/dist/.setup/{subagent-hooks-C8Z_x3KJ.mjs → subagent-hooks-9Pc1-k37.mjs} +7 -17
- package/dist/.setup/{thread-bindings-jW2x5VuN.mjs → thread-bindings-DdNLxoL3.mjs} +21 -44
- package/dist/api.js +218 -326
- package/dist/channel-plugin-api.js +1 -1
- package/dist/contract-api.js +1 -1
- package/dist/doctor-contract-api.js +1 -1
- package/dist/session-binding-contract-api.js +1 -1
- package/dist/session-key-api.js +1 -1
- package/dist/setup-api.js +1 -1
- package/dist/setup-entry.js +1 -1
- package/dist/subagent-hooks-api.js +1 -1
- package/node_modules/@openclaw/fs-safe/CHANGELOG.md +35 -0
- package/node_modules/@openclaw/fs-safe/README.md +1 -1
- package/node_modules/@openclaw/fs-safe/dist/advanced.d.ts +1 -1
- package/node_modules/@openclaw/fs-safe/dist/advanced.js +1 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-durability.js +1 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-merge.js +4 -4
- package/node_modules/@openclaw/fs-safe/dist/archive-parser.wasm +0 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-read.js +5 -4
- package/node_modules/@openclaw/fs-safe/dist/archive-staging.d.ts +1 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-staging.js +22 -38
- package/node_modules/@openclaw/fs-safe/dist/copy-path-admission.d.ts +17 -0
- package/node_modules/@openclaw/fs-safe/dist/copy-path-admission.js +117 -0
- package/node_modules/@openclaw/fs-safe/dist/copy-root-file-sync.d.ts +8 -5
- package/node_modules/@openclaw/fs-safe/dist/copy-root-file-sync.js +27 -50
- package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root-acquire.d.ts +3 -0
- package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root-acquire.js +57 -11
- package/node_modules/@openclaw/fs-safe/dist/guarded-mutation.js +5 -5
- package/node_modules/@openclaw/fs-safe/dist/guest-native-python.js +52 -5
- package/node_modules/@openclaw/fs-safe/dist/guest.js +1 -1
- package/node_modules/@openclaw/fs-safe/dist/native-binding.d.ts +1 -0
- package/node_modules/@openclaw/fs-safe/dist/native-operations.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/native-operations.js +22 -26
- package/node_modules/@openclaw/fs-safe/dist/native-pinned-write-windows.js +5 -1
- package/node_modules/@openclaw/fs-safe/dist/native-staged-file.js +4 -1
- package/node_modules/@openclaw/fs-safe/dist/permission-exec.js +2 -1
- package/node_modules/@openclaw/fs-safe/dist/pinned-write-types.d.ts +6 -1
- package/node_modules/@openclaw/fs-safe/dist/private-temp-workspace.js +2 -2
- package/node_modules/@openclaw/fs-safe/dist/publish-file.js +34 -7
- package/node_modules/@openclaw/fs-safe/dist/replace-file-copy-fallback.js +1 -4
- package/node_modules/@openclaw/fs-safe/dist/replace-file-descriptor.js +6 -0
- package/node_modules/@openclaw/fs-safe/dist/root-create-input.d.ts +15 -1
- package/node_modules/@openclaw/fs-safe/dist/root-create-input.js +4 -0
- package/node_modules/@openclaw/fs-safe/dist/root-directory-entry.js +1 -1
- package/node_modules/@openclaw/fs-safe/dist/root-directory-list.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/root-directory-list.js +6 -12
- package/node_modules/@openclaw/fs-safe/dist/root-impl.js +15 -15
- package/node_modules/@openclaw/fs-safe/dist/root-paths.js +1 -1
- package/node_modules/@openclaw/fs-safe/dist/root-walk.js +4 -4
- package/node_modules/@openclaw/fs-safe/dist/root-write-verification.d.ts +10 -1
- package/node_modules/@openclaw/fs-safe/dist/root-write-verification.js +20 -0
- package/node_modules/@openclaw/fs-safe/dist/secure-temp-dir.js +19 -7
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-acquire.js +25 -3
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-admission.d.ts +2 -0
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-retained.d.ts +14 -0
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-retained.js +187 -0
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock.js +15 -1
- package/node_modules/@openclaw/fs-safe/dist/temp-directory-diagnostics.d.ts +10 -0
- package/node_modules/@openclaw/fs-safe/dist/temp-directory-diagnostics.js +29 -0
- package/node_modules/@openclaw/fs-safe/dist/temp-target.js +1 -1
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-admission.js +6 -6
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-child-admission.d.ts +4 -4
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-child-admission.js +17 -16
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-descriptor.js +20 -28
- package/node_modules/@openclaw/fs-safe/dist/walk.js +2 -13
- package/node_modules/@openclaw/fs-safe/dist/watch-native.d.ts +2 -2
- package/node_modules/@openclaw/fs-safe/dist/watch-native.js +3 -1
- package/node_modules/@openclaw/fs-safe/dist/watch-rescan.js +3 -9
- package/node_modules/@openclaw/fs-safe/dist/watch.js +2 -3
- package/node_modules/@openclaw/fs-safe/docs/advanced.md +1 -1
- package/node_modules/@openclaw/fs-safe/docs/archive.md +3 -0
- package/node_modules/@openclaw/fs-safe/docs/atomic.md +11 -3
- package/node_modules/@openclaw/fs-safe/docs/contributing.md +1 -1
- package/node_modules/@openclaw/fs-safe/docs/copy.md +48 -0
- package/node_modules/@openclaw/fs-safe/docs/guest.md +21 -4
- package/node_modules/@openclaw/fs-safe/docs/path-scope.md +4 -0
- package/node_modules/@openclaw/fs-safe/docs/sidecar-lock.md +46 -8
- package/node_modules/@openclaw/fs-safe/docs/temp.md +12 -0
- package/node_modules/@openclaw/fs-safe/docs/watch.md +3 -2
- package/node_modules/@openclaw/fs-safe/package.json +15 -15
- package/node_modules/@openclaw/fs-safe-darwin-arm64/fs-safe-native.node +0 -0
- package/node_modules/@openclaw/fs-safe-darwin-arm64/package.json +1 -1
- package/node_modules/@openclaw/fs-safe-darwin-x64/fs-safe-native.node +0 -0
- package/node_modules/@openclaw/fs-safe-darwin-x64/package.json +1 -1
- package/node_modules/@openclaw/fs-safe-linux-arm64-gnu/fs-safe-native.node +0 -0
- package/node_modules/@openclaw/fs-safe-linux-arm64-gnu/package.json +1 -1
- package/node_modules/@openclaw/fs-safe-linux-arm64-musl/fs-safe-native.node +0 -0
- package/node_modules/@openclaw/fs-safe-linux-arm64-musl/package.json +1 -1
- package/node_modules/@openclaw/fs-safe-linux-x64-gnu/fs-safe-native.node +0 -0
- package/node_modules/@openclaw/fs-safe-linux-x64-gnu/package.json +1 -1
- package/node_modules/@openclaw/fs-safe-linux-x64-musl/fs-safe-native.node +0 -0
- package/node_modules/@openclaw/fs-safe-linux-x64-musl/package.json +1 -1
- package/node_modules/@openclaw/fs-safe-win32-x64-msvc/fs-safe-native.node +0 -0
- package/node_modules/@openclaw/fs-safe-win32-x64-msvc/package.json +1 -1
- package/node_modules/follow-redirects/index.js +10 -1
- package/node_modules/follow-redirects/package.json +1 -1
- package/node_modules/mdast-util-to-markdown/index.d.ts +2 -0
- package/node_modules/mdast-util-to-markdown/lib/configure.d.ts +5 -0
- package/node_modules/mdast-util-to-markdown/lib/configure.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/configure.js +19 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/blockquote.d.ts +7 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/blockquote.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/handle/blockquote.js +12 -1
- package/node_modules/mdast-util-to-markdown/lib/handle/break.d.ts +7 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/break.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/handle/break.js +16 -5
- package/node_modules/mdast-util-to-markdown/lib/handle/code.d.ts +7 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/code.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/handle/code.js +13 -2
- package/node_modules/mdast-util-to-markdown/lib/handle/definition.d.ts +7 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/definition.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/handle/definition.js +7 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/emphasis.d.ts +30 -2
- package/node_modules/mdast-util-to-markdown/lib/handle/emphasis.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/handle/emphasis.js +39 -41
- package/node_modules/mdast-util-to-markdown/lib/handle/heading.d.ts +7 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/heading.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/handle/heading.js +11 -2
- package/node_modules/mdast-util-to-markdown/lib/handle/html.d.ts +7 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/html.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/handle/html.js +7 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/image-reference.d.ts +10 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/image-reference.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/handle/image-reference.js +17 -2
- package/node_modules/mdast-util-to-markdown/lib/handle/image.d.ts +10 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/image.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/handle/image.js +10 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/inline-code.d.ts +9 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/inline-code.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/handle/inline-code.js +14 -4
- package/node_modules/mdast-util-to-markdown/lib/handle/link-reference.d.ts +10 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/link-reference.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/handle/link-reference.js +17 -2
- package/node_modules/mdast-util-to-markdown/lib/handle/link.d.ts +13 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/link.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/handle/link.js +24 -9
- package/node_modules/mdast-util-to-markdown/lib/handle/list-item.d.ts +7 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/list-item.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/handle/list-item.js +12 -1
- package/node_modules/mdast-util-to-markdown/lib/handle/list.d.ts +7 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/list.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/handle/list.js +7 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/paragraph.d.ts +7 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/paragraph.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/handle/paragraph.js +7 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/root.d.ts +7 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/root.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/handle/root.js +13 -2
- package/node_modules/mdast-util-to-markdown/lib/handle/strong.d.ts +30 -2
- package/node_modules/mdast-util-to-markdown/lib/handle/strong.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/handle/strong.js +39 -41
- package/node_modules/mdast-util-to-markdown/lib/handle/text.d.ts +7 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/text.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/handle/text.js +7 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/thematic-break.d.ts +6 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/thematic-break.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/handle/thematic-break.js +6 -0
- package/node_modules/mdast-util-to-markdown/lib/index.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/index.js +34 -8
- package/node_modules/mdast-util-to-markdown/lib/join.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/join.js +18 -1
- package/node_modules/mdast-util-to-markdown/lib/types.d.ts +50 -30
- package/node_modules/mdast-util-to-markdown/lib/unsafe.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/unsafe.js +15 -1
- package/node_modules/mdast-util-to-markdown/lib/util/character.d.ts +23 -0
- package/node_modules/mdast-util-to-markdown/lib/util/character.d.ts.map +1 -0
- package/node_modules/mdast-util-to-markdown/lib/util/character.js +32 -0
- package/node_modules/mdast-util-to-markdown/lib/util/check-bullet-ordered.d.ts +4 -0
- package/node_modules/mdast-util-to-markdown/lib/util/check-bullet-ordered.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/util/check-bullet-ordered.js +4 -0
- package/node_modules/mdast-util-to-markdown/lib/util/check-bullet-other.d.ts +4 -0
- package/node_modules/mdast-util-to-markdown/lib/util/check-bullet-other.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/util/check-bullet-other.js +4 -0
- package/node_modules/mdast-util-to-markdown/lib/util/check-bullet.d.ts +4 -0
- package/node_modules/mdast-util-to-markdown/lib/util/check-bullet.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/util/check-bullet.js +4 -0
- package/node_modules/mdast-util-to-markdown/lib/util/check-emphasis.d.ts +4 -0
- package/node_modules/mdast-util-to-markdown/lib/util/check-emphasis.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/util/check-emphasis.js +4 -0
- package/node_modules/mdast-util-to-markdown/lib/util/check-fence.d.ts +4 -0
- package/node_modules/mdast-util-to-markdown/lib/util/check-fence.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/util/check-fence.js +4 -0
- package/node_modules/mdast-util-to-markdown/lib/util/check-list-item-indent.d.ts +4 -0
- package/node_modules/mdast-util-to-markdown/lib/util/check-list-item-indent.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/util/check-list-item-indent.js +4 -0
- package/node_modules/mdast-util-to-markdown/lib/util/check-quote.d.ts +4 -0
- package/node_modules/mdast-util-to-markdown/lib/util/check-quote.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/util/check-quote.js +4 -0
- package/node_modules/mdast-util-to-markdown/lib/util/check-rule-repetition.d.ts +4 -0
- package/node_modules/mdast-util-to-markdown/lib/util/check-rule-repetition.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/util/check-rule-repetition.js +4 -0
- package/node_modules/mdast-util-to-markdown/lib/util/check-rule.d.ts +4 -0
- package/node_modules/mdast-util-to-markdown/lib/util/check-rule.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/util/check-rule.js +4 -0
- package/node_modules/mdast-util-to-markdown/lib/util/check-strong.d.ts +4 -0
- package/node_modules/mdast-util-to-markdown/lib/util/check-strong.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/util/check-strong.js +4 -0
- package/node_modules/mdast-util-to-markdown/lib/util/compile-pattern.js +3 -1
- package/node_modules/mdast-util-to-markdown/lib/util/container-flow.d.ts +2 -0
- package/node_modules/mdast-util-to-markdown/lib/util/container-flow.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/util/container-flow.js +9 -0
- package/node_modules/mdast-util-to-markdown/lib/util/container-phrasing.d.ts +95 -4
- package/node_modules/mdast-util-to-markdown/lib/util/container-phrasing.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/util/container-phrasing.js +636 -57
- package/node_modules/mdast-util-to-markdown/lib/util/encode-info.d.ts +2 -2
- package/node_modules/mdast-util-to-markdown/lib/util/encode-info.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/util/encode-info.js +1 -1
- package/node_modules/mdast-util-to-markdown/lib/util/format-code-as-indented.d.ts +5 -0
- package/node_modules/mdast-util-to-markdown/lib/util/format-code-as-indented.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/util/format-code-as-indented.js +12 -7
- package/node_modules/mdast-util-to-markdown/lib/util/format-heading-as-setext.d.ts +5 -0
- package/node_modules/mdast-util-to-markdown/lib/util/format-heading-as-setext.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/util/format-heading-as-setext.js +7 -2
- package/node_modules/mdast-util-to-markdown/lib/util/format-link-as-autolink.d.ts +5 -0
- package/node_modules/mdast-util-to-markdown/lib/util/format-link-as-autolink.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/util/format-link-as-autolink.js +20 -15
- package/node_modules/mdast-util-to-markdown/lib/util/html-kind.d.ts +31 -0
- package/node_modules/mdast-util-to-markdown/lib/util/html-kind.d.ts.map +1 -0
- package/node_modules/mdast-util-to-markdown/lib/util/html-kind.js +63 -0
- package/node_modules/mdast-util-to-markdown/lib/util/indent-lines.js +5 -0
- package/node_modules/mdast-util-to-markdown/lib/util/pattern-in-scope.d.ts +5 -0
- package/node_modules/mdast-util-to-markdown/lib/util/pattern-in-scope.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/util/pattern-in-scope.js +11 -0
- package/node_modules/mdast-util-to-markdown/lib/util/safe.d.ts +2 -2
- package/node_modules/mdast-util-to-markdown/lib/util/safe.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/util/safe.js +71 -7
- package/node_modules/mdast-util-to-markdown/package.json +13 -57
- package/node_modules/mdast-util-to-markdown/readme.md +139 -84
- package/node_modules/micromark/dev/lib/compile.d.ts.map +1 -1
- package/node_modules/micromark/dev/lib/compile.js +14 -4
- package/node_modules/micromark/dev/lib/create-tokenizer.d.ts.map +1 -1
- package/node_modules/micromark/dev/lib/create-tokenizer.js +7 -6
- package/node_modules/micromark/dev/lib/initialize/document.js +25 -21
- package/node_modules/micromark/dev/lib/initialize/text.d.ts.map +1 -1
- package/node_modules/micromark/dev/lib/initialize/text.js +10 -6
- package/node_modules/micromark/dev/lib/preprocess.d.ts.map +1 -1
- package/node_modules/micromark/dev/lib/preprocess.js +19 -21
- package/node_modules/micromark/lib/compile.d.ts.map +1 -1
- package/node_modules/micromark/lib/compile.js +37 -29
- package/node_modules/micromark/lib/create-tokenizer.d.ts.map +1 -1
- package/node_modules/micromark/lib/create-tokenizer.js +37 -35
- package/node_modules/micromark/lib/initialize/document.js +21 -13
- package/node_modules/micromark/lib/initialize/text.d.ts.map +1 -1
- package/node_modules/micromark/lib/initialize/text.js +7 -3
- package/node_modules/micromark/lib/preprocess.d.ts.map +1 -1
- package/node_modules/micromark/lib/preprocess.js +16 -19
- package/node_modules/micromark/package.json +2 -15
- package/node_modules/micromark-core-commonmark/dev/lib/attention.js +18 -24
- package/node_modules/micromark-core-commonmark/dev/lib/code-fenced.d.ts.map +1 -1
- package/node_modules/micromark-core-commonmark/dev/lib/code-fenced.js +1 -43
- package/node_modules/micromark-core-commonmark/dev/lib/code-indented.js +19 -43
- package/node_modules/micromark-core-commonmark/dev/lib/heading-atx.js +2 -6
- package/node_modules/micromark-core-commonmark/dev/lib/html-flow.d.ts.map +1 -1
- package/node_modules/micromark-core-commonmark/dev/lib/html-flow.js +2 -53
- package/node_modules/micromark-core-commonmark/dev/lib/label-end.js +14 -12
- package/node_modules/micromark-core-commonmark/dev/lib/label-start-image.d.ts.map +1 -1
- package/node_modules/micromark-core-commonmark/dev/lib/label-start-image.js +14 -5
- package/node_modules/micromark-core-commonmark/dev/lib/label-start-link.d.ts.map +1 -1
- package/node_modules/micromark-core-commonmark/dev/lib/label-start-link.js +14 -5
- package/node_modules/micromark-core-commonmark/dev/lib/partial-non-lazy-continuation.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/dev/lib/partial-non-lazy-continuation.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/dev/lib/partial-non-lazy-continuation.js +67 -0
- package/node_modules/micromark-core-commonmark/dev/lib/setext-underline.d.ts.map +1 -1
- package/node_modules/micromark-core-commonmark/dev/lib/setext-underline.js +8 -5
- package/node_modules/micromark-core-commonmark/lib/attention.js +14 -24
- package/node_modules/micromark-core-commonmark/lib/code-fenced.d.ts.map +1 -1
- package/node_modules/micromark-core-commonmark/lib/code-fenced.js +1 -39
- package/node_modules/micromark-core-commonmark/lib/code-indented.js +11 -29
- package/node_modules/micromark-core-commonmark/lib/heading-atx.js +2 -6
- package/node_modules/micromark-core-commonmark/lib/html-flow.d.ts.map +1 -1
- package/node_modules/micromark-core-commonmark/lib/html-flow.js +2 -51
- package/node_modules/micromark-core-commonmark/lib/label-end.js +11 -10
- package/node_modules/micromark-core-commonmark/lib/label-start-image.d.ts.map +1 -1
- package/node_modules/micromark-core-commonmark/lib/label-start-image.js +11 -3
- package/node_modules/micromark-core-commonmark/lib/label-start-link.d.ts.map +1 -1
- package/node_modules/micromark-core-commonmark/lib/label-start-link.js +11 -3
- package/node_modules/micromark-core-commonmark/lib/partial-non-lazy-continuation.d.ts +4 -0
- package/node_modules/micromark-core-commonmark/lib/partial-non-lazy-continuation.d.ts.map +1 -0
- package/node_modules/micromark-core-commonmark/lib/partial-non-lazy-continuation.js +61 -0
- package/node_modules/micromark-core-commonmark/lib/setext-underline.d.ts.map +1 -1
- package/node_modules/micromark-core-commonmark/lib/setext-underline.js +7 -5
- package/node_modules/micromark-core-commonmark/package.json +4 -16
- package/node_modules/micromark-factory-space/dev/index.d.ts +24 -1
- package/node_modules/micromark-factory-space/dev/index.d.ts.map +1 -1
- package/node_modules/micromark-factory-space/dev/index.js +58 -3
- package/node_modules/micromark-factory-space/index.d.ts +24 -1
- package/node_modules/micromark-factory-space/index.d.ts.map +1 -1
- package/node_modules/micromark-factory-space/index.js +55 -3
- package/node_modules/micromark-factory-space/package.json +1 -10
- package/node_modules/micromark-factory-space/readme.md +25 -25
- package/node_modules/micromark-util-edit-map/dev/index.d.ts +78 -0
- package/node_modules/micromark-util-edit-map/dev/index.d.ts.map +1 -0
- package/node_modules/micromark-util-edit-map/dev/index.js +237 -0
- package/node_modules/micromark-util-edit-map/index.d.ts +78 -0
- package/node_modules/micromark-util-edit-map/index.d.ts.map +1 -0
- package/node_modules/micromark-util-edit-map/index.js +225 -0
- package/node_modules/micromark-util-edit-map/license +22 -0
- package/node_modules/micromark-util-edit-map/package.json +48 -0
- package/node_modules/micromark-util-edit-map/readme.md +234 -0
- package/node_modules/micromark-util-types/index.d.ts +6 -3
- package/node_modules/micromark-util-types/package.json +2 -36
- package/node_modules/ws/lib/websocket.js +17 -3
- package/node_modules/ws/package.json +1 -1
- package/package.json +5 -5
- package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root-arbitration.d.ts +0 -17
- package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root-arbitration.js +0 -66
- package/node_modules/@openclaw/fs-safe/dist/publish-file-native.d.ts +0 -4
- package/node_modules/@openclaw/fs-safe/dist/publish-file-native.js +0 -35
- package/node_modules/@openclaw/fs-safe/dist/root-move-preflight.d.ts +0 -7
- package/node_modules/@openclaw/fs-safe/dist/root-move-preflight.js +0 -16
- package/node_modules/mdast-util-to-markdown/lib/util/emphasis-strong-marker.d.ts +0 -7
- package/node_modules/mdast-util-to-markdown/lib/util/emphasis-strong-marker.d.ts.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"preprocess.d.ts","sourceRoot":"","sources":["preprocess.js"],"names":[],"mappings":"AAqBA;;;GAGG;AACH,8BAHa,YAAY,
|
|
1
|
+
{"version":3,"file":"preprocess.d.ts","sourceRoot":"","sources":["preprocess.js"],"names":[],"mappings":"AAqBA;;;GAGG;AACH,8BAHa,YAAY,CAoHxB;;;;mCAnIU,KAAK,aAEL,QAAQ,GAAG,IAAI,GAAG,SAAS,QAE3B,OAAO,GAAG,IAAI,GAAG,SAAS,KAExB,KAAK,CAAC,KAAK,CAAC;2BAZsB,sBAAsB;8BAAtB,sBAAsB;2BAAtB,sBAAsB"}
|
|
@@ -36,26 +36,15 @@ export function preprocess() {
|
|
|
36
36
|
/** @type {Preprocessor} */
|
|
37
37
|
// eslint-disable-next-line complexity
|
|
38
38
|
function preprocessor(value, encoding, end) {
|
|
39
|
-
/** @type {Array<Chunk>} */
|
|
40
|
-
const chunks = []
|
|
41
|
-
/** @type {RegExpMatchArray | null} */
|
|
42
|
-
let match
|
|
43
|
-
/** @type {number} */
|
|
44
|
-
let next
|
|
45
|
-
/** @type {number} */
|
|
46
|
-
let startPosition
|
|
47
|
-
/** @type {number} */
|
|
48
|
-
let endPosition
|
|
49
|
-
/** @type {Code} */
|
|
50
|
-
let code
|
|
51
|
-
|
|
52
39
|
value =
|
|
53
40
|
buffer +
|
|
54
41
|
(typeof value === 'string'
|
|
55
42
|
? value.toString()
|
|
56
43
|
: new TextDecoder(encoding || undefined).decode(value))
|
|
57
44
|
|
|
58
|
-
|
|
45
|
+
/** @type {Array<Chunk>} */
|
|
46
|
+
const chunks = []
|
|
47
|
+
let startPosition = 0
|
|
59
48
|
buffer = ''
|
|
60
49
|
|
|
61
50
|
if (start) {
|
|
@@ -69,10 +58,10 @@ export function preprocess() {
|
|
|
69
58
|
|
|
70
59
|
while (startPosition < value.length) {
|
|
71
60
|
search.lastIndex = startPosition
|
|
72
|
-
match = search.exec(value)
|
|
73
|
-
endPosition =
|
|
61
|
+
const match = search.exec(value)
|
|
62
|
+
const endPosition =
|
|
74
63
|
match && match.index !== undefined ? match.index : value.length
|
|
75
|
-
code = value.charCodeAt(endPosition)
|
|
64
|
+
const code = value.charCodeAt(endPosition)
|
|
76
65
|
|
|
77
66
|
if (!match) {
|
|
78
67
|
buffer = value.slice(startPosition)
|
|
@@ -106,9 +95,12 @@ export function preprocess() {
|
|
|
106
95
|
}
|
|
107
96
|
|
|
108
97
|
case codes.ht: {
|
|
109
|
-
next =
|
|
98
|
+
const next =
|
|
99
|
+
Math.ceil(column / constants.tabSize) * constants.tabSize
|
|
110
100
|
chunks.push(codes.horizontalTab)
|
|
111
|
-
while (column++ < next)
|
|
101
|
+
while (column++ < next) {
|
|
102
|
+
chunks.push(codes.virtualSpace)
|
|
103
|
+
}
|
|
112
104
|
|
|
113
105
|
break
|
|
114
106
|
}
|
|
@@ -131,8 +123,14 @@ export function preprocess() {
|
|
|
131
123
|
}
|
|
132
124
|
|
|
133
125
|
if (end) {
|
|
134
|
-
if (atCarriageReturn)
|
|
135
|
-
|
|
126
|
+
if (atCarriageReturn) {
|
|
127
|
+
chunks.push(codes.carriageReturn)
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
if (buffer) {
|
|
131
|
+
chunks.push(buffer)
|
|
132
|
+
}
|
|
133
|
+
|
|
136
134
|
chunks.push(codes.eof)
|
|
137
135
|
}
|
|
138
136
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compile.d.ts","sourceRoot":"","sources":["compile.js"],"names":[],"mappings":"AA6DA;;;GAGG;AACH,kCAHW,cAAc,GAAG,IAAI,GAAG,SAAS,GAC/B,OAAO,
|
|
1
|
+
{"version":3,"file":"compile.d.ts","sourceRoot":"","sources":["compile.js"],"names":[],"mappings":"AA6DA;;;GAGG;AACH,kCAHW,cAAc,GAAG,IAAI,GAAG,SAAS,GAC/B,OAAO,CA0kCnB;;YAzmCa,OAAO,GAAG,SAAS;cACnB,MAAM,GAAG,SAAS;YAClB,MAAM,GAAG,SAAS;kBAClB,MAAM,GAAG,SAAS;kBAClB,MAAM,GAAG,SAAS;YAClB,MAAM,GAAG,SAAS;;oCAVtB,sBAAsB;6BAAtB,sBAAsB"}
|
|
@@ -345,35 +345,37 @@ export function compile(options) {
|
|
|
345
345
|
} else {
|
|
346
346
|
containerBalance--;
|
|
347
347
|
}
|
|
348
|
-
} else
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
348
|
+
} else {
|
|
349
|
+
switch (event[1].type) {
|
|
350
|
+
case "listItemPrefix":
|
|
351
|
+
{
|
|
352
|
+
if (event[0] === 'exit') {
|
|
353
|
+
atMarker = true;
|
|
354
|
+
}
|
|
355
|
+
break;
|
|
356
|
+
}
|
|
357
|
+
case "linePrefix":
|
|
358
|
+
{
|
|
359
|
+
// Ignore
|
|
360
|
+
|
|
361
|
+
break;
|
|
353
362
|
}
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
case "lineEndingBlank":
|
|
363
|
-
{
|
|
364
|
-
if (event[0] === 'enter' && !containerBalance) {
|
|
365
|
-
if (atMarker) {
|
|
366
|
-
atMarker = undefined;
|
|
367
|
-
} else {
|
|
368
|
-
loose = true;
|
|
363
|
+
case "lineEndingBlank":
|
|
364
|
+
{
|
|
365
|
+
if (event[0] === 'enter' && !containerBalance) {
|
|
366
|
+
if (atMarker) {
|
|
367
|
+
atMarker = undefined;
|
|
368
|
+
} else {
|
|
369
|
+
loose = true;
|
|
370
|
+
}
|
|
369
371
|
}
|
|
372
|
+
break;
|
|
370
373
|
}
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
}
|
|
374
|
+
default:
|
|
375
|
+
{
|
|
376
|
+
atMarker = undefined;
|
|
377
|
+
}
|
|
378
|
+
}
|
|
377
379
|
}
|
|
378
380
|
}
|
|
379
381
|
slice[0][1]._loose = loose;
|
|
@@ -408,7 +410,9 @@ export function compile(options) {
|
|
|
408
410
|
|
|
409
411
|
/** @type {CompileContext['tag']} */
|
|
410
412
|
function tag(value) {
|
|
411
|
-
if (!tags)
|
|
413
|
+
if (!tags) {
|
|
414
|
+
return;
|
|
415
|
+
}
|
|
412
416
|
setData('lastWasTag', true);
|
|
413
417
|
buffers[buffers.length - 1].push(value);
|
|
414
418
|
}
|
|
@@ -645,7 +649,9 @@ export function compile(options) {
|
|
|
645
649
|
lineEndingIfNeeded();
|
|
646
650
|
}
|
|
647
651
|
tag('</code></pre>');
|
|
648
|
-
if (count !== undefined && count < 2)
|
|
652
|
+
if (count !== undefined && count < 2) {
|
|
653
|
+
lineEndingIfNeeded();
|
|
654
|
+
}
|
|
649
655
|
setData('flowCodeSeenData');
|
|
650
656
|
setData('fencesCount');
|
|
651
657
|
setData('slurpOneLineEnding');
|
|
@@ -838,7 +844,9 @@ export function compile(options) {
|
|
|
838
844
|
*/
|
|
839
845
|
function onexitatxheadingsequence(token) {
|
|
840
846
|
// Exit for further sequences.
|
|
841
|
-
if (getData('headingRank'))
|
|
847
|
+
if (getData('headingRank')) {
|
|
848
|
+
return;
|
|
849
|
+
}
|
|
842
850
|
setData('headingRank', this.sliceSerialize(token).length);
|
|
843
851
|
lineEndingIfNeeded();
|
|
844
852
|
tag('<h' + getData('headingRank') + '>');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-tokenizer.d.ts","sourceRoot":"","sources":["create-tokenizer.js"],"names":[],"mappings":"AAgDA;;;;;;;;;;;;;;;;;GAiBG;AACH,wCATW,YAAY,cAEZ,gBAAgB,SAEhB,IAAI,CAAC,KAAK,EAAE,cAAc,GAAG,QAAQ,CAAC,GAAG,SAAS,GAEhD,eAAe,
|
|
1
|
+
{"version":3,"file":"create-tokenizer.d.ts","sourceRoot":"","sources":["create-tokenizer.js"],"names":[],"mappings":"AAgDA;;;;;;;;;;;;;;;;;GAiBG;AACH,wCATW,YAAY,cAEZ,gBAAgB,SAEhB,IAAI,CAAC,KAAK,EAAE,cAAc,GAAG,QAAQ,CAAC,GAAG,SAAS,GAEhD,eAAe,CAqhB3B;;;;4BAjkBY,SAAS;;;;;;;;aAKR,OAAO;;;;UAEP,MAAM;;;;;uCAKT,SAAS,QAET,IAAI,KAEF,SAAS;kCAtBZ,sBAAsB;sCAAtB,sBAAsB;2BAAtB,sBAAsB;qCAAtB,sBAAsB;+BAAtB,sBAAsB"}
|
|
@@ -201,14 +201,12 @@ export function createTokenizer(parser, initialize, from) {
|
|
|
201
201
|
* Nothing.
|
|
202
202
|
*/
|
|
203
203
|
function main() {
|
|
204
|
-
/** @type {number} */
|
|
205
|
-
let chunkIndex;
|
|
206
204
|
while (point._index < chunks.length) {
|
|
207
205
|
const chunk = chunks[point._index];
|
|
208
206
|
|
|
209
207
|
// If we’re in a buffer chunk, loop through it.
|
|
210
208
|
if (typeof chunk === 'string') {
|
|
211
|
-
chunkIndex = point._index;
|
|
209
|
+
const chunkIndex = point._index;
|
|
212
210
|
if (point._bufferIndex < 0) {
|
|
213
211
|
point._bufferIndex = 0;
|
|
214
212
|
}
|
|
@@ -571,38 +569,42 @@ function serializeChunks(chunks, expandTabs) {
|
|
|
571
569
|
let value;
|
|
572
570
|
if (typeof chunk === 'string') {
|
|
573
571
|
value = chunk;
|
|
574
|
-
} else
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
572
|
+
} else {
|
|
573
|
+
switch (chunk) {
|
|
574
|
+
case -5:
|
|
575
|
+
{
|
|
576
|
+
value = "\r";
|
|
577
|
+
break;
|
|
578
|
+
}
|
|
579
|
+
case -4:
|
|
580
|
+
{
|
|
581
|
+
value = "\n";
|
|
582
|
+
break;
|
|
583
|
+
}
|
|
584
|
+
case -3:
|
|
585
|
+
{
|
|
586
|
+
value = "\r" + "\n";
|
|
587
|
+
break;
|
|
588
|
+
}
|
|
589
|
+
case -2:
|
|
590
|
+
{
|
|
591
|
+
value = expandTabs ? " " : "\t";
|
|
592
|
+
break;
|
|
593
|
+
}
|
|
594
|
+
case -1:
|
|
595
|
+
{
|
|
596
|
+
if (!expandTabs && atTab) {
|
|
597
|
+
continue;
|
|
598
|
+
}
|
|
599
|
+
value = " ";
|
|
600
|
+
break;
|
|
601
|
+
}
|
|
602
|
+
default:
|
|
603
|
+
{
|
|
604
|
+
// Currently only replacement character.
|
|
605
|
+
value = String.fromCharCode(chunk);
|
|
606
|
+
}
|
|
607
|
+
}
|
|
606
608
|
}
|
|
607
609
|
atTab = chunk === -2;
|
|
608
610
|
result.push(value);
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
|
|
20
20
|
import { factorySpace } from 'micromark-factory-space';
|
|
21
21
|
import { markdownLineEnding } from 'micromark-util-character';
|
|
22
|
-
import {
|
|
22
|
+
import { EditMap } from 'micromark-util-edit-map';
|
|
23
23
|
/** @type {InitialConstruct} */
|
|
24
24
|
export const document = {
|
|
25
25
|
tokenize: initializeDocument
|
|
@@ -108,12 +108,12 @@ function initializeDocument(effects) {
|
|
|
108
108
|
};
|
|
109
109
|
index++;
|
|
110
110
|
}
|
|
111
|
-
|
|
111
|
+
const editMap = new EditMap();
|
|
112
112
|
// Inject the exits earlier (they’re still also at the end).
|
|
113
|
-
|
|
114
|
-
|
|
113
|
+
editMap.add(indexBeforeFlow + 1, 0, self.events.slice(indexBeforeExits));
|
|
115
114
|
// Discard the duplicate exits.
|
|
116
|
-
|
|
115
|
+
editMap.add(indexBeforeExits, index - indexBeforeExits, []);
|
|
116
|
+
editMap.consume(self.events);
|
|
117
117
|
return checkNewContainers(code);
|
|
118
118
|
}
|
|
119
119
|
return start(code);
|
|
@@ -156,7 +156,9 @@ function initializeDocument(effects) {
|
|
|
156
156
|
|
|
157
157
|
/** @type {State} */
|
|
158
158
|
function thereIsANewContainer(code) {
|
|
159
|
-
if (childFlow)
|
|
159
|
+
if (childFlow) {
|
|
160
|
+
closeFlow();
|
|
161
|
+
}
|
|
160
162
|
exitContainers(continued);
|
|
161
163
|
return documentContinued(code);
|
|
162
164
|
}
|
|
@@ -186,7 +188,9 @@ function initializeDocument(effects) {
|
|
|
186
188
|
/** @type {State} */
|
|
187
189
|
function flowStart(code) {
|
|
188
190
|
if (code === null) {
|
|
189
|
-
if (childFlow)
|
|
191
|
+
if (childFlow) {
|
|
192
|
+
closeFlow();
|
|
193
|
+
}
|
|
190
194
|
exitContainers(0);
|
|
191
195
|
effects.consume(code);
|
|
192
196
|
return;
|
|
@@ -230,9 +234,13 @@ function initializeDocument(effects) {
|
|
|
230
234
|
*/
|
|
231
235
|
function writeToChild(token, endOfFile) {
|
|
232
236
|
const stream = self.sliceStream(token);
|
|
233
|
-
if (endOfFile)
|
|
237
|
+
if (endOfFile) {
|
|
238
|
+
stream.push(null);
|
|
239
|
+
}
|
|
234
240
|
token.previous = childToken;
|
|
235
|
-
if (childToken)
|
|
241
|
+
if (childToken) {
|
|
242
|
+
childToken.next = token;
|
|
243
|
+
}
|
|
236
244
|
childToken = token;
|
|
237
245
|
childFlow.defineSkip(token.start);
|
|
238
246
|
childFlow.write(stream);
|
|
@@ -315,12 +323,12 @@ function initializeDocument(effects) {
|
|
|
315
323
|
};
|
|
316
324
|
index++;
|
|
317
325
|
}
|
|
318
|
-
|
|
326
|
+
const editMap = new EditMap();
|
|
319
327
|
// Inject the exits earlier (they’re still also at the end).
|
|
320
|
-
|
|
321
|
-
|
|
328
|
+
editMap.add(indexBeforeFlow + 1, 0, self.events.slice(indexBeforeExits));
|
|
322
329
|
// Discard the duplicate exits.
|
|
323
|
-
|
|
330
|
+
editMap.add(indexBeforeExits, index - indexBeforeExits, []);
|
|
331
|
+
editMap.consume(self.events);
|
|
324
332
|
}
|
|
325
333
|
}
|
|
326
334
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text.d.ts","sourceRoot":"","sources":["text.js"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"text.d.ts","sourceRoot":"","sources":["text.js"],"names":[],"mappings":";;;AAgBA,sCAAiD;AACjD,oCAA6C;8BATnC,sBAAsB;sCAAtB,sBAAsB"}
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
* } from 'micromark-util-types'
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
|
+
import { EditMap } from 'micromark-util-edit-map';
|
|
12
13
|
export const resolver = {
|
|
13
14
|
resolveAll: createResolver()
|
|
14
15
|
};
|
|
@@ -142,6 +143,7 @@ function createResolver(extraResolver) {
|
|
|
142
143
|
* @type {Resolver}
|
|
143
144
|
*/
|
|
144
145
|
function resolveAllLineSuffixes(events, context) {
|
|
146
|
+
const editMap = new EditMap();
|
|
145
147
|
let eventIndex = 0; // Skip first.
|
|
146
148
|
|
|
147
149
|
while (++eventIndex <= events.length) {
|
|
@@ -161,7 +163,9 @@ function resolveAllLineSuffixes(events, context) {
|
|
|
161
163
|
size++;
|
|
162
164
|
bufferIndex--;
|
|
163
165
|
}
|
|
164
|
-
if (bufferIndex)
|
|
166
|
+
if (bufferIndex) {
|
|
167
|
+
break;
|
|
168
|
+
}
|
|
165
169
|
bufferIndex = -1;
|
|
166
170
|
}
|
|
167
171
|
// Number
|
|
@@ -201,12 +205,12 @@ function resolveAllLineSuffixes(events, context) {
|
|
|
201
205
|
if (data.start.offset === data.end.offset) {
|
|
202
206
|
Object.assign(data, token);
|
|
203
207
|
} else {
|
|
204
|
-
|
|
205
|
-
eventIndex += 2;
|
|
208
|
+
editMap.add(eventIndex, 0, [['enter', token, context], ['exit', token, context]]);
|
|
206
209
|
}
|
|
207
210
|
}
|
|
208
211
|
eventIndex++;
|
|
209
212
|
}
|
|
210
213
|
}
|
|
214
|
+
editMap.consume(events);
|
|
211
215
|
return events;
|
|
212
216
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"preprocess.d.ts","sourceRoot":"","sources":["preprocess.js"],"names":[],"mappings":"AAqBA;;;GAGG;AACH,8BAHa,YAAY,
|
|
1
|
+
{"version":3,"file":"preprocess.d.ts","sourceRoot":"","sources":["preprocess.js"],"names":[],"mappings":"AAqBA;;;GAGG;AACH,8BAHa,YAAY,CAoHxB;;;;mCAnIU,KAAK,aAEL,QAAQ,GAAG,IAAI,GAAG,SAAS,QAE3B,OAAO,GAAG,IAAI,GAAG,SAAS,KAExB,KAAK,CAAC,KAAK,CAAC;2BAZsB,sBAAsB;8BAAtB,sBAAsB;2BAAtB,sBAAsB"}
|
|
@@ -33,20 +33,11 @@ export function preprocess() {
|
|
|
33
33
|
/** @type {Preprocessor} */
|
|
34
34
|
// eslint-disable-next-line complexity
|
|
35
35
|
function preprocessor(value, encoding, end) {
|
|
36
|
+
value = buffer + (typeof value === 'string' ? value.toString() : new TextDecoder(encoding || undefined).decode(value));
|
|
37
|
+
|
|
36
38
|
/** @type {Array<Chunk>} */
|
|
37
39
|
const chunks = [];
|
|
38
|
-
|
|
39
|
-
let match;
|
|
40
|
-
/** @type {number} */
|
|
41
|
-
let next;
|
|
42
|
-
/** @type {number} */
|
|
43
|
-
let startPosition;
|
|
44
|
-
/** @type {number} */
|
|
45
|
-
let endPosition;
|
|
46
|
-
/** @type {Code} */
|
|
47
|
-
let code;
|
|
48
|
-
value = buffer + (typeof value === 'string' ? value.toString() : new TextDecoder(encoding || undefined).decode(value));
|
|
49
|
-
startPosition = 0;
|
|
40
|
+
let startPosition = 0;
|
|
50
41
|
buffer = '';
|
|
51
42
|
if (start) {
|
|
52
43
|
// To do: `markdown-rs` actually parses BOMs (byte order mark).
|
|
@@ -57,9 +48,9 @@ export function preprocess() {
|
|
|
57
48
|
}
|
|
58
49
|
while (startPosition < value.length) {
|
|
59
50
|
search.lastIndex = startPosition;
|
|
60
|
-
match = search.exec(value);
|
|
61
|
-
endPosition = match && match.index !== undefined ? match.index : value.length;
|
|
62
|
-
code = value.charCodeAt(endPosition);
|
|
51
|
+
const match = search.exec(value);
|
|
52
|
+
const endPosition = match && match.index !== undefined ? match.index : value.length;
|
|
53
|
+
const code = value.charCodeAt(endPosition);
|
|
63
54
|
if (!match) {
|
|
64
55
|
buffer = value.slice(startPosition);
|
|
65
56
|
break;
|
|
@@ -85,9 +76,11 @@ export function preprocess() {
|
|
|
85
76
|
}
|
|
86
77
|
case 9:
|
|
87
78
|
{
|
|
88
|
-
next = Math.ceil(column / 4) * 4;
|
|
79
|
+
const next = Math.ceil(column / 4) * 4;
|
|
89
80
|
chunks.push(-2);
|
|
90
|
-
while (column++ < next)
|
|
81
|
+
while (column++ < next) {
|
|
82
|
+
chunks.push(-1);
|
|
83
|
+
}
|
|
91
84
|
break;
|
|
92
85
|
}
|
|
93
86
|
case 10:
|
|
@@ -106,8 +99,12 @@ export function preprocess() {
|
|
|
106
99
|
startPosition = endPosition + 1;
|
|
107
100
|
}
|
|
108
101
|
if (end) {
|
|
109
|
-
if (atCarriageReturn)
|
|
110
|
-
|
|
102
|
+
if (atCarriageReturn) {
|
|
103
|
+
chunks.push(-5);
|
|
104
|
+
}
|
|
105
|
+
if (buffer) {
|
|
106
|
+
chunks.push(buffer);
|
|
107
|
+
}
|
|
111
108
|
chunks.push(null);
|
|
112
109
|
}
|
|
113
110
|
return chunks;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "micromark",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.3",
|
|
4
4
|
"description": "small commonmark compliant markdown parser with positional info and concrete tokens",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"keywords": [
|
|
@@ -72,6 +72,7 @@
|
|
|
72
72
|
"micromark-util-chunked": "^2.0.0",
|
|
73
73
|
"micromark-util-combine-extensions": "^2.0.0",
|
|
74
74
|
"micromark-util-decode-numeric-character-reference": "^2.0.0",
|
|
75
|
+
"micromark-util-edit-map": "^1.0.0",
|
|
75
76
|
"micromark-util-encode": "^2.0.0",
|
|
76
77
|
"micromark-util-normalize-identifier": "^2.0.0",
|
|
77
78
|
"micromark-util-resolve-all": "^2.0.0",
|
|
@@ -82,19 +83,5 @@
|
|
|
82
83
|
},
|
|
83
84
|
"scripts": {
|
|
84
85
|
"build": "micromark-build"
|
|
85
|
-
},
|
|
86
|
-
"xo": {
|
|
87
|
-
"envs": [
|
|
88
|
-
"shared-node-browser"
|
|
89
|
-
],
|
|
90
|
-
"prettier": true,
|
|
91
|
-
"rules": {
|
|
92
|
-
"logical-assignment-operators": "off",
|
|
93
|
-
"max-depth": "off",
|
|
94
|
-
"unicorn/no-this-assignment": "off",
|
|
95
|
-
"unicorn/prefer-at": "off",
|
|
96
|
-
"unicorn/prefer-code-point": "off",
|
|
97
|
-
"unicorn/prefer-event-target": "off"
|
|
98
|
-
}
|
|
99
86
|
}
|
|
100
87
|
}
|
|
@@ -33,22 +33,8 @@ export const attention = {
|
|
|
33
33
|
// eslint-disable-next-line complexity
|
|
34
34
|
function resolveAllAttention(events, context) {
|
|
35
35
|
let index = -1
|
|
36
|
-
/** @type {number} */
|
|
37
|
-
let open
|
|
38
|
-
/** @type {Token} */
|
|
39
|
-
let group
|
|
40
|
-
/** @type {Token} */
|
|
41
|
-
let text
|
|
42
|
-
/** @type {Token} */
|
|
43
|
-
let openingSequence
|
|
44
|
-
/** @type {Token} */
|
|
45
|
-
let closingSequence
|
|
46
|
-
/** @type {number} */
|
|
47
|
-
let use
|
|
48
36
|
/** @type {Array<Event>} */
|
|
49
37
|
let nextEvents
|
|
50
|
-
/** @type {number} */
|
|
51
|
-
let offset
|
|
52
38
|
|
|
53
39
|
// Walk through all events.
|
|
54
40
|
//
|
|
@@ -61,7 +47,7 @@ function resolveAllAttention(events, context) {
|
|
|
61
47
|
events[index][1].type === 'attentionSequence' &&
|
|
62
48
|
events[index][1]._close
|
|
63
49
|
) {
|
|
64
|
-
open = index
|
|
50
|
+
let open = index
|
|
65
51
|
|
|
66
52
|
// Now walk back to find an opener.
|
|
67
53
|
while (open--) {
|
|
@@ -93,7 +79,7 @@ function resolveAllAttention(events, context) {
|
|
|
93
79
|
}
|
|
94
80
|
|
|
95
81
|
// Number of markers to use from the sequence.
|
|
96
|
-
use =
|
|
82
|
+
const use =
|
|
97
83
|
events[open][1].end.offset - events[open][1].start.offset > 1 &&
|
|
98
84
|
events[index][1].end.offset - events[index][1].start.offset > 1
|
|
99
85
|
? 2
|
|
@@ -104,22 +90,22 @@ function resolveAllAttention(events, context) {
|
|
|
104
90
|
movePoint(start, -use)
|
|
105
91
|
movePoint(end, use)
|
|
106
92
|
|
|
107
|
-
openingSequence = {
|
|
93
|
+
const openingSequence = {
|
|
108
94
|
type: use > 1 ? types.strongSequence : types.emphasisSequence,
|
|
109
95
|
start,
|
|
110
96
|
end: {...events[open][1].end}
|
|
111
97
|
}
|
|
112
|
-
closingSequence = {
|
|
98
|
+
const closingSequence = {
|
|
113
99
|
type: use > 1 ? types.strongSequence : types.emphasisSequence,
|
|
114
100
|
start: {...events[index][1].start},
|
|
115
101
|
end
|
|
116
102
|
}
|
|
117
|
-
text = {
|
|
103
|
+
const text = {
|
|
118
104
|
type: use > 1 ? types.strongText : types.emphasisText,
|
|
119
105
|
start: {...events[open][1].end},
|
|
120
106
|
end: {...events[index][1].start}
|
|
121
107
|
}
|
|
122
|
-
group = {
|
|
108
|
+
const group = {
|
|
123
109
|
type: use > 1 ? types.strong : types.emphasis,
|
|
124
110
|
start: {...openingSequence.start},
|
|
125
111
|
end: {...closingSequence.end}
|
|
@@ -170,6 +156,9 @@ function resolveAllAttention(events, context) {
|
|
|
170
156
|
['exit', group, context]
|
|
171
157
|
])
|
|
172
158
|
|
|
159
|
+
/** @type {number} */
|
|
160
|
+
let offset = 0
|
|
161
|
+
|
|
173
162
|
// If there are more markers in the closing, add them after.
|
|
174
163
|
if (events[index][1].end.offset - events[index][1].start.offset) {
|
|
175
164
|
offset = 2
|
|
@@ -177,8 +166,6 @@ function resolveAllAttention(events, context) {
|
|
|
177
166
|
['enter', events[index][1], context],
|
|
178
167
|
['exit', events[index][1], context]
|
|
179
168
|
])
|
|
180
|
-
} else {
|
|
181
|
-
offset = 0
|
|
182
169
|
}
|
|
183
170
|
|
|
184
171
|
splice(events, open - 1, index - open + 3, nextEvents)
|
|
@@ -261,14 +248,21 @@ function tokenizeAttention(effects, ok) {
|
|
|
261
248
|
// Always populated by defaults.
|
|
262
249
|
assert(attentionMarkers, 'expected `attentionMarkers` to be populated')
|
|
263
250
|
|
|
251
|
+
// Note: `*` and `_` are in `attentionMarkers` through core.
|
|
252
|
+
// They are excluded here as the loosening is meant for markers registered
|
|
253
|
+
// by *other* constructs (such as GFM strikethrough’s `~`).
|
|
264
254
|
const open =
|
|
265
255
|
!after ||
|
|
266
256
|
(after === constants.characterGroupPunctuation && before) ||
|
|
267
|
-
attentionMarkers.includes(code)
|
|
257
|
+
(attentionMarkers.includes(code) &&
|
|
258
|
+
code !== codes.asterisk &&
|
|
259
|
+
code !== codes.underscore)
|
|
268
260
|
const close =
|
|
269
261
|
!before ||
|
|
270
262
|
(before === constants.characterGroupPunctuation && after) ||
|
|
271
|
-
attentionMarkers.includes(previous)
|
|
263
|
+
(attentionMarkers.includes(previous) &&
|
|
264
|
+
previous !== codes.asterisk &&
|
|
265
|
+
previous !== codes.underscore)
|
|
272
266
|
|
|
273
267
|
token._open = Boolean(
|
|
274
268
|
marker === codes.asterisk ? open : open && (before || !close)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"code-fenced.d.ts","sourceRoot":"","sources":["code-fenced.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"code-fenced.d.ts","sourceRoot":"","sources":["code-fenced.js"],"names":[],"mappings":"AAgBA,wBAAwB;AACxB,yBADW,SAAS,CAKnB;+BAdS,sBAAsB"}
|
|
@@ -12,12 +12,7 @@ import {ok as assert} from 'devlop'
|
|
|
12
12
|
import {factorySpace} from 'micromark-factory-space'
|
|
13
13
|
import {markdownLineEnding, markdownSpace} from 'micromark-util-character'
|
|
14
14
|
import {codes, constants, types} from 'micromark-util-symbol'
|
|
15
|
-
|
|
16
|
-
/** @type {Construct} */
|
|
17
|
-
const nonLazyContinuation = {
|
|
18
|
-
partial: true,
|
|
19
|
-
tokenize: tokenizeNonLazyContinuation
|
|
20
|
-
}
|
|
15
|
+
import {nonLazyContinuation} from './partial-non-lazy-continuation.js'
|
|
21
16
|
|
|
22
17
|
/** @type {Construct} */
|
|
23
18
|
export const codeFenced = {
|
|
@@ -475,40 +470,3 @@ function tokenizeCodeFenced(effects, ok, nok) {
|
|
|
475
470
|
}
|
|
476
471
|
}
|
|
477
472
|
}
|
|
478
|
-
|
|
479
|
-
/**
|
|
480
|
-
* @this {TokenizeContext}
|
|
481
|
-
* Context.
|
|
482
|
-
* @type {Tokenizer}
|
|
483
|
-
*/
|
|
484
|
-
function tokenizeNonLazyContinuation(effects, ok, nok) {
|
|
485
|
-
const self = this
|
|
486
|
-
|
|
487
|
-
return start
|
|
488
|
-
|
|
489
|
-
/**
|
|
490
|
-
*
|
|
491
|
-
*
|
|
492
|
-
* @type {State}
|
|
493
|
-
*/
|
|
494
|
-
function start(code) {
|
|
495
|
-
if (code === codes.eof) {
|
|
496
|
-
return nok(code)
|
|
497
|
-
}
|
|
498
|
-
|
|
499
|
-
assert(markdownLineEnding(code), 'expected eol')
|
|
500
|
-
effects.enter(types.lineEnding)
|
|
501
|
-
effects.consume(code)
|
|
502
|
-
effects.exit(types.lineEnding)
|
|
503
|
-
return lineStart
|
|
504
|
-
}
|
|
505
|
-
|
|
506
|
-
/**
|
|
507
|
-
*
|
|
508
|
-
*
|
|
509
|
-
* @type {State}
|
|
510
|
-
*/
|
|
511
|
-
function lineStart(code) {
|
|
512
|
-
return self.parser.lazy[self.now().line] ? nok(code) : ok(code)
|
|
513
|
-
}
|
|
514
|
-
}
|