@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
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* } from 'micromark-util-types'
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
import {
|
|
10
|
+
import { factorySpaceMinMax } from 'micromark-factory-space';
|
|
11
11
|
import { markdownLineEnding, markdownSpace } from 'micromark-util-character';
|
|
12
12
|
/** @type {Construct} */
|
|
13
13
|
export const codeIndented = {
|
|
@@ -27,7 +27,6 @@ const furtherStart = {
|
|
|
27
27
|
* @type {Tokenizer}
|
|
28
28
|
*/
|
|
29
29
|
function tokenizeCodeIndented(effects, ok, nok) {
|
|
30
|
-
const self = this;
|
|
31
30
|
return start;
|
|
32
31
|
|
|
33
32
|
/**
|
|
@@ -48,24 +47,7 @@ function tokenizeCodeIndented(effects, ok, nok) {
|
|
|
48
47
|
// To do: manually check if interrupting like `markdown-rs`.
|
|
49
48
|
|
|
50
49
|
effects.enter("codeIndented");
|
|
51
|
-
|
|
52
|
-
// so that we can drop the next state.
|
|
53
|
-
return factorySpace(effects, afterPrefix, "linePrefix", 4 + 1)(code);
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
/**
|
|
57
|
-
* At start, after 1 or 4 spaces.
|
|
58
|
-
*
|
|
59
|
-
* ```markdown
|
|
60
|
-
* > | aaa
|
|
61
|
-
* ^
|
|
62
|
-
* ```
|
|
63
|
-
*
|
|
64
|
-
* @type {State}
|
|
65
|
-
*/
|
|
66
|
-
function afterPrefix(code) {
|
|
67
|
-
const tail = self.events[self.events.length - 1];
|
|
68
|
-
return tail && tail[1].type === "linePrefix" && tail[2].sliceSerialize(tail[1], true).length >= 4 ? atBreak(code) : nok(code);
|
|
50
|
+
return factorySpaceMinMax(effects, atBreak, nok, "linePrefix", 4, 4)(code);
|
|
69
51
|
}
|
|
70
52
|
|
|
71
53
|
/**
|
|
@@ -154,24 +136,24 @@ function tokenizeFurtherStart(effects, ok, nok) {
|
|
|
154
136
|
// To do: the code here in `micromark-js` is a bit different from
|
|
155
137
|
// `markdown-rs` because there it can attempt spaces.
|
|
156
138
|
// We can’t yet.
|
|
157
|
-
|
|
158
|
-
// To do: use an improved `space_or_tab` function like `markdown-rs`,
|
|
159
|
-
// so that we can drop the next state.
|
|
160
|
-
return factorySpace(effects, afterPrefix, "linePrefix", 4 + 1)(code);
|
|
139
|
+
return factorySpaceMinMax(effects, ok, onNotEnoughPrefix, "linePrefix", 4, 4)(code);
|
|
161
140
|
}
|
|
162
141
|
|
|
163
142
|
/**
|
|
164
|
-
*
|
|
143
|
+
* After not enough of a prefix.
|
|
144
|
+
*
|
|
145
|
+
* A following line ending is another (potentially blank) line to try,
|
|
146
|
+
* anything else means this isn’t a continuation.
|
|
165
147
|
*
|
|
166
148
|
* ```markdown
|
|
167
149
|
* > | aaa
|
|
168
|
-
*
|
|
150
|
+
*
|
|
151
|
+
* | bbb
|
|
169
152
|
* ```
|
|
170
153
|
*
|
|
171
154
|
* @type {State}
|
|
172
155
|
*/
|
|
173
|
-
function
|
|
174
|
-
|
|
175
|
-
return tail && tail[1].type === "linePrefix" && tail[2].sliceSerialize(tail[1], true).length >= 4 ? ok(code) : markdownLineEnding(code) ? furtherStart(code) : nok(code);
|
|
156
|
+
function onNotEnoughPrefix(code) {
|
|
157
|
+
return markdownLineEnding(code) ? furtherStart(code) : nok(code);
|
|
176
158
|
}
|
|
177
159
|
}
|
|
@@ -23,10 +23,6 @@ export const headingAtx = {
|
|
|
23
23
|
function resolveHeadingAtx(events, context) {
|
|
24
24
|
let contentEnd = events.length - 2;
|
|
25
25
|
let contentStart = 3;
|
|
26
|
-
/** @type {Token} */
|
|
27
|
-
let content;
|
|
28
|
-
/** @type {Token} */
|
|
29
|
-
let text;
|
|
30
26
|
|
|
31
27
|
// Prefix whitespace, part of the opening.
|
|
32
28
|
if (events[contentStart][1].type === "whitespace") {
|
|
@@ -41,12 +37,12 @@ function resolveHeadingAtx(events, context) {
|
|
|
41
37
|
contentEnd -= contentStart + 1 === contentEnd ? 2 : 4;
|
|
42
38
|
}
|
|
43
39
|
if (contentEnd > contentStart) {
|
|
44
|
-
content = {
|
|
40
|
+
const content = {
|
|
45
41
|
type: "atxHeadingText",
|
|
46
42
|
start: events[contentStart][1].start,
|
|
47
43
|
end: events[contentEnd][1].end
|
|
48
44
|
};
|
|
49
|
-
text = {
|
|
45
|
+
const text = {
|
|
50
46
|
type: "chunkText",
|
|
51
47
|
start: events[contentStart][1].start,
|
|
52
48
|
end: events[contentEnd][1].end,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"html-flow.d.ts","sourceRoot":"","sources":["html-flow.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"html-flow.d.ts","sourceRoot":"","sources":["html-flow.js"],"names":[],"mappings":"AAwBA,wBAAwB;AACxB,uBADW,SAAS,CAMnB;+BAtBS,sBAAsB"}
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
import { asciiAlphanumeric, asciiAlpha, markdownLineEndingOrSpace, markdownLineEnding, markdownSpace } from 'micromark-util-character';
|
|
13
13
|
import { htmlBlockNames, htmlRawNames } from 'micromark-util-html-tag-name';
|
|
14
14
|
import { blankLine } from './blank-line.js';
|
|
15
|
+
import { nonLazyContinuation } from './partial-non-lazy-continuation.js';
|
|
15
16
|
|
|
16
17
|
/** @type {Construct} */
|
|
17
18
|
export const htmlFlow = {
|
|
@@ -26,10 +27,6 @@ const blankLineBefore = {
|
|
|
26
27
|
partial: true,
|
|
27
28
|
tokenize: tokenizeBlankLineBefore
|
|
28
29
|
};
|
|
29
|
-
const nonLazyContinuationStart = {
|
|
30
|
-
partial: true,
|
|
31
|
-
tokenize: tokenizeNonLazyContinuationStart
|
|
32
|
-
};
|
|
33
30
|
|
|
34
31
|
/** @type {Resolver} */
|
|
35
32
|
function resolveToHtmlFlow(events) {
|
|
@@ -608,7 +605,7 @@ function tokenizeHtmlFlow(effects, ok, nok) {
|
|
|
608
605
|
* @type {State}
|
|
609
606
|
*/
|
|
610
607
|
function continuationStart(code) {
|
|
611
|
-
return effects.check(
|
|
608
|
+
return effects.check(nonLazyContinuation, continuationStartNonLazy, continuationAfter)(code);
|
|
612
609
|
}
|
|
613
610
|
|
|
614
611
|
/**
|
|
@@ -802,52 +799,6 @@ function tokenizeHtmlFlow(effects, ok, nok) {
|
|
|
802
799
|
}
|
|
803
800
|
}
|
|
804
801
|
|
|
805
|
-
/**
|
|
806
|
-
* @this {TokenizeContext}
|
|
807
|
-
* Context.
|
|
808
|
-
* @type {Tokenizer}
|
|
809
|
-
*/
|
|
810
|
-
function tokenizeNonLazyContinuationStart(effects, ok, nok) {
|
|
811
|
-
const self = this;
|
|
812
|
-
return start;
|
|
813
|
-
|
|
814
|
-
/**
|
|
815
|
-
* At eol, before continuation.
|
|
816
|
-
*
|
|
817
|
-
* ```markdown
|
|
818
|
-
* > | * ```js
|
|
819
|
-
* ^
|
|
820
|
-
* | b
|
|
821
|
-
* ```
|
|
822
|
-
*
|
|
823
|
-
* @type {State}
|
|
824
|
-
*/
|
|
825
|
-
function start(code) {
|
|
826
|
-
if (markdownLineEnding(code)) {
|
|
827
|
-
effects.enter("lineEnding");
|
|
828
|
-
effects.consume(code);
|
|
829
|
-
effects.exit("lineEnding");
|
|
830
|
-
return after;
|
|
831
|
-
}
|
|
832
|
-
return nok(code);
|
|
833
|
-
}
|
|
834
|
-
|
|
835
|
-
/**
|
|
836
|
-
* A continuation.
|
|
837
|
-
*
|
|
838
|
-
* ```markdown
|
|
839
|
-
* | * ```js
|
|
840
|
-
* > | b
|
|
841
|
-
* ^
|
|
842
|
-
* ```
|
|
843
|
-
*
|
|
844
|
-
* @type {State}
|
|
845
|
-
*/
|
|
846
|
-
function after(code) {
|
|
847
|
-
return self.parser.lazy[self.now().line] ? nok(code) : ok(code);
|
|
848
|
-
}
|
|
849
|
-
}
|
|
850
|
-
|
|
851
802
|
/**
|
|
852
803
|
* @this {TokenizeContext}
|
|
853
804
|
* Context.
|
|
@@ -66,8 +66,6 @@ function resolveAllLabelEnd(events) {
|
|
|
66
66
|
function resolveToLabelEnd(events, context) {
|
|
67
67
|
let index = events.length;
|
|
68
68
|
let offset = 0;
|
|
69
|
-
/** @type {Token} */
|
|
70
|
-
let token;
|
|
71
69
|
/** @type {number | undefined} */
|
|
72
70
|
let open;
|
|
73
71
|
/** @type {number | undefined} */
|
|
@@ -77,7 +75,7 @@ function resolveToLabelEnd(events, context) {
|
|
|
77
75
|
|
|
78
76
|
// Find an opening.
|
|
79
77
|
while (index--) {
|
|
80
|
-
token = events[index][1];
|
|
78
|
+
const token = events[index][1];
|
|
81
79
|
if (open) {
|
|
82
80
|
// If we see another link, or inactive link label, we’ve been here before.
|
|
83
81
|
if (token.type === "link" || token.type === "labelLink" && token._inactive) {
|
|
@@ -160,18 +158,18 @@ function resolveToLabelEnd(events, context) {
|
|
|
160
158
|
*/
|
|
161
159
|
function tokenizeLabelEnd(effects, ok, nok) {
|
|
162
160
|
const self = this;
|
|
163
|
-
|
|
161
|
+
const labelStarts = self._labelStarts;
|
|
164
162
|
/** @type {Token} */
|
|
165
163
|
let labelStart;
|
|
166
164
|
/** @type {boolean} */
|
|
167
165
|
let defined;
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
break;
|
|
166
|
+
if (labelStarts) {
|
|
167
|
+
// Discard ones that failed to close,
|
|
168
|
+
// they’re not needed anymore.
|
|
169
|
+
while (labelStarts.length > 0 && labelStarts[labelStarts.length - 1]._balanced) {
|
|
170
|
+
labelStarts.pop();
|
|
174
171
|
}
|
|
172
|
+
labelStart = labelStarts[labelStarts.length - 1];
|
|
175
173
|
}
|
|
176
174
|
return start;
|
|
177
175
|
|
|
@@ -290,6 +288,9 @@ function tokenizeLabelEnd(effects, ok, nok) {
|
|
|
290
288
|
*/
|
|
291
289
|
function labelEndOk(code) {
|
|
292
290
|
// Note: `markdown-rs` does a bunch of stuff here.
|
|
291
|
+
// This label start is now used up: discard it so it’s never found again.
|
|
292
|
+
|
|
293
|
+
labelStarts.pop();
|
|
293
294
|
return ok(code);
|
|
294
295
|
}
|
|
295
296
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"label-start-image.d.ts","sourceRoot":"","sources":["label-start-image.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"label-start-image.d.ts","sourceRoot":"","sources":["label-start-image.js"],"names":[],"mappings":"AAcA,wBAAwB;AACxB,8BADW,SAAS,CAKnB;+BAZS,sBAAsB"}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* @import {
|
|
3
3
|
* Construct,
|
|
4
4
|
* State,
|
|
5
|
+
* Token,
|
|
5
6
|
* TokenizeContext,
|
|
6
7
|
* Tokenizer
|
|
7
8
|
* } from 'micromark-util-types'
|
|
@@ -23,6 +24,8 @@ export const labelStartImage = {
|
|
|
23
24
|
*/
|
|
24
25
|
function tokenizeLabelStartImage(effects, ok, nok) {
|
|
25
26
|
const self = this;
|
|
27
|
+
/** @type {Token} */
|
|
28
|
+
let labelImage;
|
|
26
29
|
return start;
|
|
27
30
|
|
|
28
31
|
/**
|
|
@@ -58,7 +61,7 @@ function tokenizeLabelStartImage(effects, ok, nok) {
|
|
|
58
61
|
effects.enter("labelMarker");
|
|
59
62
|
effects.consume(code);
|
|
60
63
|
effects.exit("labelMarker");
|
|
61
|
-
effects.exit("labelImage");
|
|
64
|
+
labelImage = effects.exit("labelImage");
|
|
62
65
|
return after;
|
|
63
66
|
}
|
|
64
67
|
return nok(code);
|
|
@@ -96,7 +99,12 @@ function tokenizeLabelStartImage(effects, ok, nok) {
|
|
|
96
99
|
// `micromark-extension-gfm-footnote`, but the `label-start-link`
|
|
97
100
|
// behavior isn’t.
|
|
98
101
|
// Hidden footnotes hook.
|
|
99
|
-
/* c8 ignore next
|
|
100
|
-
|
|
102
|
+
/* c8 ignore next 6 */
|
|
103
|
+
if (code === 94 && '_hiddenFootnoteSupport' in self.parser.constructs) {
|
|
104
|
+
return nok(code);
|
|
105
|
+
}
|
|
106
|
+
self._labelStarts = self._labelStarts || [];
|
|
107
|
+
self._labelStarts.push(labelImage);
|
|
108
|
+
return ok(code);
|
|
101
109
|
}
|
|
102
110
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"label-start-link.d.ts","sourceRoot":"","sources":["label-start-link.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"label-start-link.d.ts","sourceRoot":"","sources":["label-start-link.js"],"names":[],"mappings":"AAcA,wBAAwB;AACxB,6BADW,SAAS,CAKnB;+BAZS,sBAAsB"}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* @import {
|
|
3
3
|
* Construct,
|
|
4
4
|
* State,
|
|
5
|
+
* Token,
|
|
5
6
|
* TokenizeContext,
|
|
6
7
|
* Tokenizer
|
|
7
8
|
* } from 'micromark-util-types'
|
|
@@ -23,6 +24,8 @@ export const labelStartLink = {
|
|
|
23
24
|
*/
|
|
24
25
|
function tokenizeLabelStartLink(effects, ok, nok) {
|
|
25
26
|
const self = this;
|
|
27
|
+
/** @type {Token} */
|
|
28
|
+
let labelLink;
|
|
26
29
|
return start;
|
|
27
30
|
|
|
28
31
|
/**
|
|
@@ -40,7 +43,7 @@ function tokenizeLabelStartLink(effects, ok, nok) {
|
|
|
40
43
|
effects.enter("labelMarker");
|
|
41
44
|
effects.consume(code);
|
|
42
45
|
effects.exit("labelMarker");
|
|
43
|
-
effects.exit("labelLink");
|
|
46
|
+
labelLink = effects.exit("labelLink");
|
|
44
47
|
return after;
|
|
45
48
|
}
|
|
46
49
|
|
|
@@ -49,7 +52,12 @@ function tokenizeLabelStartLink(effects, ok, nok) {
|
|
|
49
52
|
// To do: this isn’t needed in `micromark-extension-gfm-footnote`,
|
|
50
53
|
// remove.
|
|
51
54
|
// Hidden footnotes hook.
|
|
52
|
-
/* c8 ignore next
|
|
53
|
-
|
|
55
|
+
/* c8 ignore next 6 */
|
|
56
|
+
if (code === 94 && '_hiddenFootnoteSupport' in self.parser.constructs) {
|
|
57
|
+
return nok(code);
|
|
58
|
+
}
|
|
59
|
+
self._labelStarts = self._labelStarts || [];
|
|
60
|
+
self._labelStarts.push(labelLink);
|
|
61
|
+
return ok(code);
|
|
54
62
|
}
|
|
55
63
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"partial-non-lazy-continuation.d.ts","sourceRoot":"","sources":["partial-non-lazy-continuation.js"],"names":[],"mappings":"AAaA,wBAAwB;AACxB,kCADW,SAAS,CAInB;+BAXS,sBAAsB"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @import {
|
|
3
|
+
* Construct,
|
|
4
|
+
* State,
|
|
5
|
+
* TokenizeContext,
|
|
6
|
+
* Tokenizer
|
|
7
|
+
* } from 'micromark-util-types'
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
import { markdownLineEnding } from 'micromark-util-character';
|
|
11
|
+
/** @type {Construct} */
|
|
12
|
+
export const nonLazyContinuation = {
|
|
13
|
+
partial: true,
|
|
14
|
+
tokenize: tokenizeNonLazyContinuation
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* @this {TokenizeContext}
|
|
19
|
+
* Context.
|
|
20
|
+
* @type {Tokenizer}
|
|
21
|
+
*/
|
|
22
|
+
function tokenizeNonLazyContinuation(effects, ok, nok) {
|
|
23
|
+
const self = this;
|
|
24
|
+
return start;
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* At eol, before continuation.
|
|
28
|
+
*
|
|
29
|
+
* ```markdown
|
|
30
|
+
* > | * ```js
|
|
31
|
+
* ^
|
|
32
|
+
* | b
|
|
33
|
+
* ```
|
|
34
|
+
*
|
|
35
|
+
* @type {State}
|
|
36
|
+
*/
|
|
37
|
+
function start(code) {
|
|
38
|
+
if (code === null) {
|
|
39
|
+
return nok(code);
|
|
40
|
+
}
|
|
41
|
+
effects.enter("lineEnding");
|
|
42
|
+
effects.consume(code);
|
|
43
|
+
effects.exit("lineEnding");
|
|
44
|
+
return after;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* A continuation.
|
|
49
|
+
*
|
|
50
|
+
* ```markdown
|
|
51
|
+
* | * ```js
|
|
52
|
+
* > | b
|
|
53
|
+
* ^
|
|
54
|
+
* ```
|
|
55
|
+
*
|
|
56
|
+
* @type {State}
|
|
57
|
+
*/
|
|
58
|
+
function after(code) {
|
|
59
|
+
return self.parser.lazy[self.now().line] ? nok(code) : ok(code);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setext-underline.d.ts","sourceRoot":"","sources":["setext-underline.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"setext-underline.d.ts","sourceRoot":"","sources":["setext-underline.js"],"names":[],"mappings":"AAiBA,wBAAwB;AACxB,8BADW,SAAS,CAKnB;+BAdS,sBAAsB"}
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
|
|
12
12
|
import { factorySpace } from 'micromark-factory-space';
|
|
13
13
|
import { markdownLineEnding, markdownSpace } from 'micromark-util-character';
|
|
14
|
+
import { EditMap } from 'micromark-util-edit-map';
|
|
14
15
|
/** @type {Construct} */
|
|
15
16
|
export const setextUnderline = {
|
|
16
17
|
name: 'setextUnderline',
|
|
@@ -20,7 +21,7 @@ export const setextUnderline = {
|
|
|
20
21
|
|
|
21
22
|
/** @type {Resolver} */
|
|
22
23
|
function resolveToSetextUnderline(events, context) {
|
|
23
|
-
|
|
24
|
+
const editMap = new EditMap();
|
|
24
25
|
let index = events.length;
|
|
25
26
|
/** @type {number | undefined} */
|
|
26
27
|
let content;
|
|
@@ -45,7 +46,7 @@ function resolveToSetextUnderline(events, context) {
|
|
|
45
46
|
else {
|
|
46
47
|
if (events[index][1].type === "content") {
|
|
47
48
|
// Remove the content end (if needed we’ll add it later)
|
|
48
|
-
|
|
49
|
+
editMap.add(index, 1, []);
|
|
49
50
|
}
|
|
50
51
|
if (!definition && events[index][1].type === "definition") {
|
|
51
52
|
definition = index;
|
|
@@ -68,8 +69,8 @@ function resolveToSetextUnderline(events, context) {
|
|
|
68
69
|
// If we have definitions in the content, we’ll keep on having content,
|
|
69
70
|
// but we need move it.
|
|
70
71
|
if (definition) {
|
|
71
|
-
|
|
72
|
-
|
|
72
|
+
editMap.add(text, 0, [['enter', heading, context]]);
|
|
73
|
+
editMap.add(definition + 1, 0, [['exit', events[content][1], context]]);
|
|
73
74
|
events[content][1].end = {
|
|
74
75
|
...events[definition][1].end
|
|
75
76
|
};
|
|
@@ -78,7 +79,8 @@ function resolveToSetextUnderline(events, context) {
|
|
|
78
79
|
}
|
|
79
80
|
|
|
80
81
|
// Add the heading exit at the end.
|
|
81
|
-
events.
|
|
82
|
+
editMap.add(events.length, 0, [['exit', heading, context]]);
|
|
83
|
+
editMap.consume(events);
|
|
82
84
|
return events;
|
|
83
85
|
}
|
|
84
86
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "micromark-core-commonmark",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.4",
|
|
4
4
|
"description": "The CommonMark markdown constructs",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"keywords": [
|
|
@@ -42,33 +42,21 @@
|
|
|
42
42
|
"devlop": "^1.0.0",
|
|
43
43
|
"micromark-factory-destination": "^2.0.0",
|
|
44
44
|
"micromark-factory-label": "^2.0.0",
|
|
45
|
-
"micromark-factory-space": "^2.
|
|
45
|
+
"micromark-factory-space": "^2.1.0",
|
|
46
46
|
"micromark-factory-title": "^2.0.0",
|
|
47
47
|
"micromark-factory-whitespace": "^2.0.0",
|
|
48
48
|
"micromark-util-character": "^2.0.0",
|
|
49
49
|
"micromark-util-chunked": "^2.0.0",
|
|
50
50
|
"micromark-util-classify-character": "^2.0.0",
|
|
51
|
+
"micromark-util-edit-map": "^1.0.0",
|
|
51
52
|
"micromark-util-html-tag-name": "^2.0.0",
|
|
52
53
|
"micromark-util-normalize-identifier": "^2.0.0",
|
|
53
54
|
"micromark-util-resolve-all": "^2.0.0",
|
|
54
55
|
"micromark-util-subtokenize": "^2.0.0",
|
|
55
56
|
"micromark-util-symbol": "^2.0.0",
|
|
56
|
-
"micromark-util-types": "^2.0.
|
|
57
|
+
"micromark-util-types": "^2.0.3"
|
|
57
58
|
},
|
|
58
59
|
"scripts": {
|
|
59
60
|
"build": "micromark-build"
|
|
60
|
-
},
|
|
61
|
-
"xo": {
|
|
62
|
-
"envs": [
|
|
63
|
-
"shared-node-browser"
|
|
64
|
-
],
|
|
65
|
-
"prettier": true,
|
|
66
|
-
"rules": {
|
|
67
|
-
"logical-assignment-operators": "off",
|
|
68
|
-
"max-depth": "off",
|
|
69
|
-
"unicorn/no-this-assignment": "off",
|
|
70
|
-
"unicorn/prefer-at": "off",
|
|
71
|
-
"unicorn/prefer-code-point": "off"
|
|
72
|
-
}
|
|
73
61
|
}
|
|
74
62
|
}
|
|
@@ -24,13 +24,36 @@
|
|
|
24
24
|
* @param {State} ok
|
|
25
25
|
* State switched to when successful.
|
|
26
26
|
* @param {TokenType} type
|
|
27
|
-
* Type
|
|
27
|
+
* Type of the whole whitespace.
|
|
28
28
|
* @param {number | undefined} [max=Infinity]
|
|
29
29
|
* Max (exclusive).
|
|
30
30
|
* @returns {State}
|
|
31
31
|
* Start state.
|
|
32
32
|
*/
|
|
33
33
|
export function factorySpace(effects: Effects, ok: State, type: TokenType, max?: number | undefined): State;
|
|
34
|
+
/**
|
|
35
|
+
* Parse spaces and tabs, with a required minimum and maximum, matching
|
|
36
|
+
* `markdown-rs`’s `space_or_tab_min_max`.
|
|
37
|
+
*
|
|
38
|
+
* Unlike `factorySpace`, this can fail: `nok` is used when fewer than
|
|
39
|
+
* `min` spaces or tabs are found.
|
|
40
|
+
*
|
|
41
|
+
* @param {Effects} effects
|
|
42
|
+
* Context.
|
|
43
|
+
* @param {State} ok
|
|
44
|
+
* State switched to when successful.
|
|
45
|
+
* @param {State} nok
|
|
46
|
+
* State switched to when unsuccessful.
|
|
47
|
+
* @param {TokenType} type
|
|
48
|
+
* Type of the whole whitespace.
|
|
49
|
+
* @param {number} min
|
|
50
|
+
* Minimum allowed characters (inclusive).
|
|
51
|
+
* @param {number} max
|
|
52
|
+
* Maximum allowed characters (inclusive).
|
|
53
|
+
* @returns {State}
|
|
54
|
+
* Start state.
|
|
55
|
+
*/
|
|
56
|
+
export function factorySpaceMinMax(effects: Effects, ok: State, nok: State, type: TokenType, min: number, max: number): State;
|
|
34
57
|
import type { Effects } from 'micromark-util-types';
|
|
35
58
|
import type { State } from 'micromark-util-types';
|
|
36
59
|
import type { TokenType } from 'micromark-util-types';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.js"],"names":[],"mappings":"AAQA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,sCAXW,OAAO,MAEP,KAAK,QAEL,SAAS,QAET,MAAM,GAAG,SAAS,GAEhB,KAAK,CA6BjB;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.js"],"names":[],"mappings":"AAQA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,sCAXW,OAAO,MAEP,KAAK,QAEL,SAAS,QAET,MAAM,GAAG,SAAS,GAEhB,KAAK,CA6BjB;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,4CAfW,OAAO,MAEP,KAAK,OAEL,KAAK,QAEL,SAAS,OAET,MAAM,OAEN,MAAM,GAEJ,KAAK,CAkCjB;6BAxH2C,sBAAsB;2BAAtB,sBAAsB;+BAAtB,sBAAsB"}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import {markdownSpace} from 'micromark-util-character'
|
|
6
6
|
|
|
7
|
-
// To do: implement `
|
|
7
|
+
// To do: implement `spaceOrTabWithOptions` (`connect`, `content`).
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* Parse spaces and tabs.
|
|
@@ -32,14 +32,14 @@ import {markdownSpace} from 'micromark-util-character'
|
|
|
32
32
|
* @param {State} ok
|
|
33
33
|
* State switched to when successful.
|
|
34
34
|
* @param {TokenType} type
|
|
35
|
-
* Type
|
|
35
|
+
* Type of the whole whitespace.
|
|
36
36
|
* @param {number | undefined} [max=Infinity]
|
|
37
37
|
* Max (exclusive).
|
|
38
38
|
* @returns {State}
|
|
39
39
|
* Start state.
|
|
40
40
|
*/
|
|
41
41
|
export function factorySpace(effects, ok, type, max) {
|
|
42
|
-
const limit = max ? max - 1 :
|
|
42
|
+
const limit = max ? max - 1 : Infinity
|
|
43
43
|
let size = 0
|
|
44
44
|
|
|
45
45
|
return start
|
|
@@ -65,3 +65,58 @@ export function factorySpace(effects, ok, type, max) {
|
|
|
65
65
|
return ok(code)
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Parse spaces and tabs, with a required minimum and maximum, matching
|
|
71
|
+
* `markdown-rs`’s `space_or_tab_min_max`.
|
|
72
|
+
*
|
|
73
|
+
* Unlike `factorySpace`, this can fail: `nok` is used when fewer than
|
|
74
|
+
* `min` spaces or tabs are found.
|
|
75
|
+
*
|
|
76
|
+
* @param {Effects} effects
|
|
77
|
+
* Context.
|
|
78
|
+
* @param {State} ok
|
|
79
|
+
* State switched to when successful.
|
|
80
|
+
* @param {State} nok
|
|
81
|
+
* State switched to when unsuccessful.
|
|
82
|
+
* @param {TokenType} type
|
|
83
|
+
* Type of the whole whitespace.
|
|
84
|
+
* @param {number} min
|
|
85
|
+
* Minimum allowed characters (inclusive).
|
|
86
|
+
* @param {number} max
|
|
87
|
+
* Maximum allowed characters (inclusive).
|
|
88
|
+
* @returns {State}
|
|
89
|
+
* Start state.
|
|
90
|
+
*/
|
|
91
|
+
export function factorySpaceMinMax(effects, ok, nok, type, min, max) {
|
|
92
|
+
let size = 0
|
|
93
|
+
|
|
94
|
+
return start
|
|
95
|
+
|
|
96
|
+
/** @type {State} */
|
|
97
|
+
function start(code) {
|
|
98
|
+
if (max > 0 && markdownSpace(code)) {
|
|
99
|
+
effects.enter(type)
|
|
100
|
+
return prefix(code)
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
return after(code)
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/** @type {State} */
|
|
107
|
+
function prefix(code) {
|
|
108
|
+
if (markdownSpace(code) && size < max) {
|
|
109
|
+
effects.consume(code)
|
|
110
|
+
size++
|
|
111
|
+
return prefix
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
effects.exit(type)
|
|
115
|
+
return after(code)
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/** @type {State} */
|
|
119
|
+
function after(code) {
|
|
120
|
+
return size >= min ? ok(code) : nok(code)
|
|
121
|
+
}
|
|
122
|
+
}
|
|
@@ -24,13 +24,36 @@
|
|
|
24
24
|
* @param {State} ok
|
|
25
25
|
* State switched to when successful.
|
|
26
26
|
* @param {TokenType} type
|
|
27
|
-
* Type
|
|
27
|
+
* Type of the whole whitespace.
|
|
28
28
|
* @param {number | undefined} [max=Infinity]
|
|
29
29
|
* Max (exclusive).
|
|
30
30
|
* @returns {State}
|
|
31
31
|
* Start state.
|
|
32
32
|
*/
|
|
33
33
|
export function factorySpace(effects: Effects, ok: State, type: TokenType, max?: number | undefined): State;
|
|
34
|
+
/**
|
|
35
|
+
* Parse spaces and tabs, with a required minimum and maximum, matching
|
|
36
|
+
* `markdown-rs`’s `space_or_tab_min_max`.
|
|
37
|
+
*
|
|
38
|
+
* Unlike `factorySpace`, this can fail: `nok` is used when fewer than
|
|
39
|
+
* `min` spaces or tabs are found.
|
|
40
|
+
*
|
|
41
|
+
* @param {Effects} effects
|
|
42
|
+
* Context.
|
|
43
|
+
* @param {State} ok
|
|
44
|
+
* State switched to when successful.
|
|
45
|
+
* @param {State} nok
|
|
46
|
+
* State switched to when unsuccessful.
|
|
47
|
+
* @param {TokenType} type
|
|
48
|
+
* Type of the whole whitespace.
|
|
49
|
+
* @param {number} min
|
|
50
|
+
* Minimum allowed characters (inclusive).
|
|
51
|
+
* @param {number} max
|
|
52
|
+
* Maximum allowed characters (inclusive).
|
|
53
|
+
* @returns {State}
|
|
54
|
+
* Start state.
|
|
55
|
+
*/
|
|
56
|
+
export function factorySpaceMinMax(effects: Effects, ok: State, nok: State, type: TokenType, min: number, max: number): State;
|
|
34
57
|
import type { Effects } from 'micromark-util-types';
|
|
35
58
|
import type { State } from 'micromark-util-types';
|
|
36
59
|
import type { TokenType } from 'micromark-util-types';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.js"],"names":[],"mappings":"AAQA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,sCAXW,OAAO,MAEP,KAAK,QAEL,SAAS,QAET,MAAM,GAAG,SAAS,GAEhB,KAAK,CA6BjB;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.js"],"names":[],"mappings":"AAQA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,sCAXW,OAAO,MAEP,KAAK,QAEL,SAAS,QAET,MAAM,GAAG,SAAS,GAEhB,KAAK,CA6BjB;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,4CAfW,OAAO,MAEP,KAAK,OAEL,KAAK,QAEL,SAAS,OAET,MAAM,OAEN,MAAM,GAEJ,KAAK,CAkCjB;6BAxH2C,sBAAsB;2BAAtB,sBAAsB;+BAAtB,sBAAsB"}
|