@bubblebrain-ai/bubble 0.0.52 → 0.0.54
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/README.md +4 -12
- package/dist/agent/routing-catalog.js +3 -2
- package/dist/agent/subagent/router.js +5 -0
- package/dist/agent/subagent/runtime.d.ts +1 -0
- package/dist/agent/subagent/runtime.js +13 -1
- package/dist/agent/subagent-control.d.ts +4 -0
- package/dist/agent/subagent-control.js +1 -0
- package/dist/agent/subagent-store.js +2 -0
- package/dist/agent/workflow/control.d.ts +2 -0
- package/dist/agent/workflow/runs.d.ts +1 -0
- package/dist/agent/workflow/runs.js +3 -0
- package/dist/agent.d.ts +11 -1
- package/dist/agent.js +158 -57
- package/dist/bin.js +2 -44
- package/dist/config.d.ts +14 -1
- package/dist/config.js +45 -4
- package/dist/context/budget.d.ts +7 -1
- package/dist/context/budget.js +25 -2
- package/dist/context/compact-llm.d.ts +1 -1
- package/dist/context/compact-llm.js +5 -2
- package/dist/context/overflow.js +2 -0
- package/dist/context/projector.d.ts +8 -0
- package/dist/context/projector.js +55 -6
- package/dist/context/tool-output-truncate.d.ts +17 -1
- package/dist/context/tool-output-truncate.js +171 -49
- package/dist/feishu/agent-host/run-driver.js +3 -0
- package/dist/feishu/serve.js +2 -0
- package/dist/goal/command.d.ts +1 -1
- package/dist/goal/command.js +7 -2
- package/dist/main.d.ts +1 -1
- package/dist/main.js +38 -8
- package/dist/memory/db.js +0 -7
- package/dist/model-catalog.js +25 -6
- package/dist/model-config.js +3 -2
- package/dist/model-pricing.d.ts +24 -5
- package/dist/model-pricing.js +0 -0
- package/dist/model-selection.js +13 -4
- package/dist/network/chatgpt-transport.js +0 -34
- package/dist/network/errors.d.ts +19 -0
- package/dist/network/errors.js +24 -0
- package/dist/network/provider-transport.d.ts +0 -4
- package/dist/network/provider-transport.js +3 -35
- package/dist/network/retry.d.ts +6 -1
- package/dist/network/retry.js +9 -0
- package/dist/provider-model-policy.d.ts +16 -0
- package/dist/provider-model-policy.js +33 -0
- package/dist/provider-registry.d.ts +1 -1
- package/dist/provider-registry.js +73 -10
- package/dist/provider-transform.js +32 -4
- package/dist/provider.d.ts +6 -2
- package/dist/provider.js +95 -6
- package/dist/question/controller.js +5 -4
- package/dist/question/normalize.d.ts +6 -0
- package/dist/question/normalize.js +11 -0
- package/dist/rewind.d.ts +20 -0
- package/dist/rewind.js +29 -0
- package/dist/sdk/index.d.ts +1 -1
- package/dist/sdk/index.js +11 -3
- package/dist/session.d.ts +7 -0
- package/dist/session.js +20 -0
- package/dist/skills/discovery.js +18 -0
- package/dist/skills/registry.d.ts +12 -2
- package/dist/skills/registry.js +40 -5
- package/dist/skills/types.d.ts +2 -0
- package/dist/slash-commands/commands.js +120 -81
- package/dist/slash-commands/registry.d.ts +2 -1
- package/dist/slash-commands/registry.js +3 -0
- package/dist/slash-commands/types.d.ts +22 -4
- package/dist/stats/usage.d.ts +3 -1
- package/dist/stats/usage.js +22 -13
- package/dist/tasks/manager.d.ts +4 -2
- package/dist/tasks/manager.js +34 -9
- package/dist/tasks/promotion.d.ts +2 -2
- package/dist/tasks/promotion.js +2 -2
- package/dist/tools/agent-lifecycle.js +4 -0
- package/dist/tools/bash.d.ts +3 -1
- package/dist/tools/bash.js +13 -2
- package/dist/tools/grep.d.ts +5 -1
- package/dist/tools/grep.js +318 -69
- package/dist/tools/index.d.ts +3 -1
- package/dist/tools/index.js +1 -0
- package/dist/tools/question.js +5 -4
- package/dist/tools/read.js +40 -21
- package/dist/tui/animation-clock.d.ts +14 -0
- package/dist/tui/animation-clock.js +34 -0
- package/dist/tui/app.d.ts +176 -0
- package/dist/tui/app.js +1647 -0
- package/dist/tui/components/approval-dialog.d.ts +43 -0
- package/dist/tui/components/approval-dialog.js +247 -0
- package/dist/tui/components/bottom-sheet.d.ts +9 -0
- package/dist/tui/components/bottom-sheet.js +32 -0
- package/dist/tui/components/context-info.d.ts +54 -0
- package/dist/tui/components/context-info.js +388 -0
- package/dist/tui/components/feedback-dialog.d.ts +56 -0
- package/dist/tui/components/feedback-dialog.js +262 -0
- package/dist/tui/components/feishu-setup-dialog.d.ts +65 -0
- package/dist/tui/components/feishu-setup-dialog.js +332 -0
- package/dist/tui/components/image-preview.d.ts +32 -0
- package/dist/tui/components/image-preview.js +130 -0
- package/dist/tui/components/plan-dialog.d.ts +34 -0
- package/dist/tui/components/plan-dialog.js +196 -0
- package/dist/tui/components/provider-key-input.d.ts +18 -0
- package/dist/tui/components/provider-key-input.js +49 -0
- package/dist/tui/components/question-dialog.d.ts +25 -0
- package/dist/tui/components/question-dialog.js +263 -0
- package/dist/tui/components/responsive-transcript.d.ts +31 -0
- package/dist/tui/components/responsive-transcript.js +77 -0
- package/dist/tui/components/rewind-picker.d.ts +62 -0
- package/dist/tui/components/rewind-picker.js +317 -0
- package/dist/tui/components/session-picker.d.ts +49 -0
- package/dist/tui/components/session-picker.js +303 -0
- package/dist/tui/components/skills-panel.d.ts +59 -0
- package/dist/tui/components/skills-panel.js +568 -0
- package/dist/tui/components/stats-panel.d.ts +40 -0
- package/dist/tui/components/stats-panel.js +301 -0
- package/dist/tui/components/streaming-message.d.ts +69 -0
- package/dist/tui/components/streaming-message.js +393 -0
- package/dist/tui/components/subagent-inspector.d.ts +28 -0
- package/dist/tui/components/subagent-inspector.js +127 -0
- package/dist/tui/components/task-inspector.d.ts +26 -0
- package/dist/tui/components/task-inspector.js +70 -0
- package/dist/tui/components/tasks-pane.d.ts +88 -0
- package/dist/tui/components/tasks-pane.js +416 -0
- package/dist/tui/components/transcript.d.ts +96 -0
- package/dist/tui/components/transcript.js +771 -0
- package/dist/tui/components/welcome.d.ts +20 -0
- package/dist/tui/components/welcome.js +133 -0
- package/dist/tui/components/workflow-inspector.d.ts +30 -0
- package/dist/tui/components/workflow-inspector.js +136 -0
- package/dist/tui/composer-autocomplete.d.ts +61 -0
- package/dist/tui/composer-autocomplete.js +383 -0
- package/dist/tui/composer-style.d.ts +7 -0
- package/dist/tui/composer-style.js +29 -0
- package/dist/tui/controller/agent-event-reducer.d.ts +75 -0
- package/dist/tui/controller/agent-event-reducer.js +238 -0
- package/dist/tui/controller/composer-controller.d.ts +95 -0
- package/dist/tui/controller/composer-controller.js +502 -0
- package/dist/tui/controller/controller.d.ts +194 -0
- package/dist/tui/controller/controller.js +1035 -0
- package/dist/tui/controller/effects.d.ts +71 -0
- package/dist/tui/controller/effects.js +1 -0
- package/dist/tui/controller/goal-runtime-controller.d.ts +47 -0
- package/dist/tui/controller/goal-runtime-controller.js +202 -0
- package/dist/tui/controller/input-queue-machine.d.ts +71 -0
- package/dist/tui/controller/input-queue-machine.js +121 -0
- package/dist/tui/controller/intents.d.ts +56 -0
- package/dist/tui/controller/intents.js +6 -0
- package/dist/tui/controller/overlay-controller.d.ts +64 -0
- package/dist/tui/controller/overlay-controller.js +129 -0
- package/dist/tui/controller/ports.d.ts +57 -0
- package/dist/tui/controller/ports.js +9 -0
- package/dist/tui/controller/session-transition.d.ts +54 -0
- package/dist/tui/controller/session-transition.js +68 -0
- package/dist/tui/controller/state.d.ts +14 -0
- package/dist/tui/controller/state.js +36 -0
- package/dist/tui/controller/task-runtime-controller.d.ts +66 -0
- package/dist/tui/controller/task-runtime-controller.js +158 -0
- package/dist/tui/footer.d.ts +37 -0
- package/dist/tui/footer.js +80 -0
- package/dist/{tui-ink → tui/formatting}/edit-diff.d.ts +1 -1
- package/dist/{tui-ink → tui/formatting}/edit-diff.js +1 -1
- package/dist/{tui-ink/app-helpers.d.ts → tui/formatting/summary.d.ts} +4 -4
- package/dist/{tui-ink/app-helpers.js → tui/formatting/summary.js} +2 -2
- package/dist/tui/fullscreen.d.ts +48 -0
- package/dist/tui/fullscreen.js +255 -0
- package/dist/tui/image-display.d.ts +4 -0
- package/dist/tui/image-display.js +30 -12
- package/dist/tui/markdown-style.d.ts +5 -0
- package/dist/tui/markdown-style.js +23 -0
- package/dist/{tui-ink → tui/model}/composer-buffer.js +1 -1
- package/dist/tui/model/composer-types.d.ts +17 -0
- package/dist/tui/model/composer-types.js +1 -0
- package/dist/{tui-ink → tui/model}/display-history.d.ts +7 -1
- package/dist/{tui-ink → tui/model}/display-reconstruct.d.ts +1 -1
- package/dist/{tui-ink → tui/model}/display-reconstruct.js +54 -6
- package/dist/{tui-ink → tui/model}/file-mentions.d.ts +2 -0
- package/dist/{tui-ink → tui/model}/file-mentions.js +4 -0
- package/dist/tui/model/image-attachment.d.ts +15 -0
- package/dist/tui/model/image-attachment.js +1 -0
- package/dist/{tui-ink → tui/model}/image-paste.d.ts +7 -1
- package/dist/{tui-ink → tui/model}/image-paste.js +46 -0
- package/dist/tui/model/input-history.d.ts +1 -0
- package/dist/tui/model/input-history.js +1 -0
- package/dist/{tui-ink → tui/model}/input-queue.d.ts +1 -1
- package/dist/{tui-ink → tui/model}/recent-activity.js +1 -1
- package/dist/{tui-ink → tui/model}/subagent-view.d.ts +17 -2
- package/dist/{tui-ink → tui/model}/subagent-view.js +125 -4
- package/dist/{tui-ink → tui/model}/submit-dedupe.d.ts +1 -1
- package/dist/tui/model/theme-style.d.ts +10 -0
- package/dist/tui/model/theme-style.js +79 -0
- package/dist/{tui-ink → tui/model}/theme.d.ts +11 -23
- package/dist/{tui-ink → tui/model}/theme.js +23 -38
- package/dist/{tui-ink → tui/model}/trace-groups.d.ts +2 -0
- package/dist/{tui-ink → tui/model}/trace-groups.js +91 -30
- package/dist/tui/model/trace-interaction.d.ts +63 -0
- package/dist/tui/model/trace-interaction.js +87 -0
- package/dist/tui/model-picker-data.d.ts +1 -2
- package/dist/tui/model-picker-data.js +8 -1
- package/dist/tui/model-switch.js +2 -0
- package/dist/{tui-ink → tui}/run-session-picker.d.ts +2 -3
- package/dist/tui/run-session-picker.js +64 -0
- package/dist/tui/run.d.ts +72 -0
- package/dist/tui/run.js +139 -0
- package/dist/tui/terminal/multiplexer.d.ts +5 -0
- package/dist/tui/terminal/multiplexer.js +14 -0
- package/dist/tui/testing/fake-agent.d.ts +24 -0
- package/dist/tui/testing/fake-agent.js +22 -0
- package/dist/tui/testing/spy-host.d.ts +21 -0
- package/dist/tui/testing/spy-host.js +55 -0
- package/dist/tui/trace-groups.js +27 -6
- package/dist/types.d.ts +7 -0
- package/dist/update/index.d.ts +1 -0
- package/dist/update/index.js +22 -17
- package/node_modules/@bubblebrain-ai/pi-tui/LICENSE +21 -0
- package/node_modules/@bubblebrain-ai/pi-tui/README.md +854 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/alt-screen-search.d.ts +26 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/alt-screen-search.d.ts.map +1 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/alt-screen-search.js +121 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/alt-screen-search.js.map +1 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/autocomplete.d.ts +86 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/autocomplete.d.ts.map +1 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/autocomplete.js +649 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/autocomplete.js.map +1 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/components/alt-screen-flash.d.ts +13 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/components/alt-screen-flash.d.ts.map +1 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/components/alt-screen-flash.js +36 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/components/alt-screen-flash.js.map +1 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/components/box.d.ts +22 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/components/box.d.ts.map +1 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/components/box.js +99 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/components/box.js.map +1 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/components/cancellable-loader.d.ts +22 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/components/cancellable-loader.d.ts.map +1 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/components/cancellable-loader.js +36 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/components/cancellable-loader.js.map +1 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/components/editor.d.ts +330 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/components/editor.d.ts.map +1 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/components/editor.js +2344 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/components/editor.js.map +1 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/components/h-stack.d.ts +7 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/components/h-stack.d.ts.map +1 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/components/h-stack.js +43 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/components/h-stack.js.map +1 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/components/image.d.ts +28 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/components/image.d.ts.map +1 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/components/image.js +82 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/components/image.js.map +1 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/components/input.d.ts +48 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/components/input.d.ts.map +1 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/components/input.js +390 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/components/input.js.map +1 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/components/loader.d.ts +31 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/components/loader.d.ts.map +1 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/components/loader.js +67 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/components/loader.js.map +1 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/components/markdown.d.ts +103 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/components/markdown.d.ts.map +1 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/components/markdown.js +797 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/components/markdown.js.map +1 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/components/scroll-view.d.ts +56 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/components/scroll-view.d.ts.map +1 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/components/scroll-view.js +179 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/components/scroll-view.js.map +1 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/components/select-list.d.ts +53 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/components/select-list.d.ts.map +1 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/components/select-list.js +175 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/components/select-list.js.map +1 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/components/settings-list.d.ts +50 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/components/settings-list.d.ts.map +1 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/components/settings-list.js +174 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/components/settings-list.js.map +1 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/components/spacer.d.ts +12 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/components/spacer.d.ts.map +1 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/components/spacer.js +22 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/components/spacer.js.map +1 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/components/stack.d.ts +32 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/components/stack.d.ts.map +1 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/components/stack.js +109 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/components/stack.js.map +1 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/components/text.d.ts +19 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/components/text.d.ts.map +1 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/components/text.js +81 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/components/text.js.map +1 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/components/truncated-text.d.ts +13 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/components/truncated-text.d.ts.map +1 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/components/truncated-text.js +48 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/components/truncated-text.js.map +1 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/components/v-stack.d.ts +8 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/components/v-stack.d.ts.map +1 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/components/v-stack.js +26 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/components/v-stack.js.map +1 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/editor-component.d.ts +39 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/editor-component.d.ts.map +1 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/editor-component.js +2 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/editor-component.js.map +1 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/fuzzy.d.ts +16 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/fuzzy.d.ts.map +1 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/fuzzy.js +110 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/fuzzy.js.map +1 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/index.d.ts +31 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/index.d.ts.map +1 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/index.js +42 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/index.js.map +1 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/keybindings.d.ts +273 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/keybindings.d.ts.map +1 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/keybindings.js +231 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/keybindings.js.map +1 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/keys.d.ts +184 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/keys.d.ts.map +1 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/keys.js +1174 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/keys.js.map +1 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/kill-ring.d.ts +28 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/kill-ring.d.ts.map +1 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/kill-ring.js +46 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/kill-ring.js.map +1 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/latex.d.ts +10 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/latex.d.ts.map +1 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/latex.js +1268 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/latex.js.map +1 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/layout-node.d.ts +40 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/layout-node.d.ts.map +1 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/layout-node.js +6 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/layout-node.js.map +1 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/layout.d.ts +42 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/layout.d.ts.map +1 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/layout.js +335 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/layout.js.map +1 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/native-modifiers.d.ts +3 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/native-modifiers.d.ts.map +1 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/native-modifiers.js +60 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/native-modifiers.js.map +1 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/stdin-buffer.d.ts +56 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/stdin-buffer.d.ts.map +1 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/stdin-buffer.js +363 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/stdin-buffer.js.map +1 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/terminal-colors.d.ts +10 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/terminal-colors.d.ts.map +1 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/terminal-colors.js +59 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/terminal-colors.js.map +1 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/terminal-image.d.ts +116 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/terminal-image.d.ts.map +1 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/terminal-image.js +518 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/terminal-image.js.map +1 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/terminal.d.ts +142 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/terminal.d.ts.map +1 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/terminal.js +544 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/terminal.js.map +1 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/testing.d.ts +11 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/testing.d.ts.map +1 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/testing.js +11 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/testing.js.map +1 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/tui-alt-screen.d.ts +140 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/tui-alt-screen.d.ts.map +1 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/tui-alt-screen.js +1334 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/tui-alt-screen.js.map +1 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/tui-main-screen.d.ts +39 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/tui-main-screen.d.ts.map +1 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/tui-main-screen.js +536 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/tui-main-screen.js.map +1 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/tui.d.ts +338 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/tui.d.ts.map +1 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/tui.js +1016 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/tui.js.map +1 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/undo-stack.d.ts +17 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/undo-stack.d.ts.map +1 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/undo-stack.js +27 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/undo-stack.js.map +1 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/utils.d.ts +96 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/utils.d.ts.map +1 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/utils.js +1193 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/utils.js.map +1 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/word-navigation.d.ts +25 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/word-navigation.d.ts.map +1 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/word-navigation.js +96 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/src/word-navigation.js.map +1 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/test/virtual-terminal.d.ts +73 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/test/virtual-terminal.d.ts.map +1 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/test/virtual-terminal.js +188 -0
- package/node_modules/@bubblebrain-ai/pi-tui/dist/test/virtual-terminal.js.map +1 -0
- package/node_modules/@bubblebrain-ai/pi-tui/native/darwin/README.md +20 -0
- package/node_modules/@bubblebrain-ai/pi-tui/native/darwin/build.sh +62 -0
- package/node_modules/@bubblebrain-ai/pi-tui/native/darwin/prebuilds/darwin-arm64/darwin-modifiers.node +0 -0
- package/node_modules/@bubblebrain-ai/pi-tui/native/darwin/prebuilds/darwin-x64/darwin-modifiers.node +0 -0
- package/node_modules/@bubblebrain-ai/pi-tui/native/darwin/src/darwin-modifiers.c +70 -0
- package/node_modules/@bubblebrain-ai/pi-tui/native/win32/README.md +22 -0
- package/node_modules/@bubblebrain-ai/pi-tui/native/win32/build.mjs +229 -0
- package/node_modules/@bubblebrain-ai/pi-tui/native/win32/prebuilds/win32-arm64/win32-console-mode.node +0 -0
- package/node_modules/@bubblebrain-ai/pi-tui/native/win32/prebuilds/win32-x64/win32-console-mode.node +0 -0
- package/node_modules/@bubblebrain-ai/pi-tui/native/win32/src/win32-console-mode.c +119 -0
- package/node_modules/@bubblebrain-ai/pi-tui/package.json +66 -0
- package/node_modules/get-east-asian-width/index.d.ts +60 -0
- package/node_modules/get-east-asian-width/index.js +30 -0
- package/node_modules/get-east-asian-width/license +9 -0
- package/node_modules/get-east-asian-width/lookup-data.js +21 -0
- package/node_modules/get-east-asian-width/lookup.js +138 -0
- package/node_modules/get-east-asian-width/package.json +71 -0
- package/node_modules/get-east-asian-width/readme.md +65 -0
- package/node_modules/get-east-asian-width/utilities.js +24 -0
- package/node_modules/marked/LICENSE +44 -0
- package/node_modules/marked/README.md +115 -0
- package/node_modules/marked/bin/main.js +284 -0
- package/node_modules/marked/bin/marked.js +16 -0
- package/node_modules/marked/lib/marked.d.ts +760 -0
- package/node_modules/marked/lib/marked.esm.js +77 -0
- package/node_modules/marked/lib/marked.esm.js.map +7 -0
- package/node_modules/marked/lib/marked.umd.js +79 -0
- package/node_modules/marked/lib/marked.umd.js.map +7 -0
- package/node_modules/marked/man/marked.1 +113 -0
- package/node_modules/marked/man/marked.1.md +93 -0
- package/node_modules/marked/package.json +103 -0
- package/package.json +25 -10
- package/dist/tui-ink/app.d.ts +0 -76
- package/dist/tui-ink/app.js +0 -2377
- package/dist/tui-ink/approval/approval-dialog.d.ts +0 -13
- package/dist/tui-ink/approval/approval-dialog.js +0 -184
- package/dist/tui-ink/approval/diff-view.d.ts +0 -7
- package/dist/tui-ink/approval/diff-view.js +0 -44
- package/dist/tui-ink/approval/select.d.ts +0 -35
- package/dist/tui-ink/approval/select.js +0 -98
- package/dist/tui-ink/code-highlight.d.ts +0 -8
- package/dist/tui-ink/code-highlight.js +0 -121
- package/dist/tui-ink/command-palette.d.ts +0 -32
- package/dist/tui-ink/command-palette.js +0 -158
- package/dist/tui-ink/compaction-progress.d.ts +0 -19
- package/dist/tui-ink/compaction-progress.js +0 -74
- package/dist/tui-ink/detect-theme.d.ts +0 -1
- package/dist/tui-ink/detect-theme.js +0 -1
- package/dist/tui-ink/feedback-dialog.d.ts +0 -19
- package/dist/tui-ink/feedback-dialog.js +0 -133
- package/dist/tui-ink/feishu-setup-picker.d.ts +0 -5
- package/dist/tui-ink/feishu-setup-picker.js +0 -271
- package/dist/tui-ink/footer.d.ts +0 -26
- package/dist/tui-ink/footer.js +0 -51
- package/dist/tui-ink/input-box.d.ts +0 -189
- package/dist/tui-ink/input-box.js +0 -1279
- package/dist/tui-ink/input-history.d.ts +0 -1
- package/dist/tui-ink/input-history.js +0 -1
- package/dist/tui-ink/markdown.d.ts +0 -103
- package/dist/tui-ink/markdown.js +0 -747
- package/dist/tui-ink/message-list.d.ts +0 -49
- package/dist/tui-ink/message-list.js +0 -841
- package/dist/tui-ink/model-picker.d.ts +0 -143
- package/dist/tui-ink/model-picker.js +0 -966
- package/dist/tui-ink/plan-confirm.d.ts +0 -7
- package/dist/tui-ink/plan-confirm.js +0 -115
- package/dist/tui-ink/question-dialog.d.ts +0 -8
- package/dist/tui-ink/question-dialog.js +0 -135
- package/dist/tui-ink/rewind-picker.d.ts +0 -8
- package/dist/tui-ink/rewind-picker.js +0 -102
- package/dist/tui-ink/run-session-picker.js +0 -22
- package/dist/tui-ink/run.d.ts +0 -62
- package/dist/tui-ink/run.js +0 -103
- package/dist/tui-ink/session-picker.d.ts +0 -10
- package/dist/tui-ink/session-picker.js +0 -113
- package/dist/tui-ink/stats-panel.d.ts +0 -11
- package/dist/tui-ink/stats-panel.js +0 -65
- package/dist/tui-ink/subagent-inspector.d.ts +0 -21
- package/dist/tui-ink/subagent-inspector.js +0 -205
- package/dist/tui-ink/use-terminal-size.d.ts +0 -4
- package/dist/tui-ink/use-terminal-size.js +0 -48
- package/dist/tui-ink/waiting-indicator.d.ts +0 -12
- package/dist/tui-ink/waiting-indicator.js +0 -129
- package/dist/tui-ink/welcome.d.ts +0 -25
- package/dist/tui-ink/welcome.js +0 -88
- package/dist/tui-ink/wordmark.d.ts +0 -8
- package/dist/tui-ink/wordmark.js +0 -103
- /package/dist/{tui-ink → tui/model}/composer-buffer.d.ts +0 -0
- /package/dist/{tui-ink → tui/model}/display-history.js +0 -0
- /package/dist/{tui-ink → tui/model}/input-queue.js +0 -0
- /package/dist/{tui-ink → tui/model}/key-events.d.ts +0 -0
- /package/dist/{tui-ink → tui/model}/key-events.js +0 -0
- /package/dist/{tui-ink → tui/model}/paste-operation-tracker.d.ts +0 -0
- /package/dist/{tui-ink → tui/model}/paste-operation-tracker.js +0 -0
- /package/dist/{tui-ink → tui/model}/recent-activity.d.ts +0 -0
- /package/dist/{tui-ink → tui/model}/submit-dedupe.js +0 -0
- /package/dist/{tui-ink → tui/model}/sync-output.d.ts +0 -0
- /package/dist/{tui-ink → tui/model}/sync-output.js +0 -0
- /package/dist/{tui-ink → tui/model}/terminal-env.d.ts +0 -0
- /package/dist/{tui-ink → tui/model}/terminal-env.js +0 -0
- /package/dist/{tui-ink → tui/model}/terminal-mouse.d.ts +0 -0
- /package/dist/{tui-ink → tui/model}/terminal-mouse.js +0 -0
- /package/dist/{tui-ink → tui/model}/width.d.ts +0 -0
- /package/dist/{tui-ink → tui/model}/width.js +0 -0
|
@@ -0,0 +1,760 @@
|
|
|
1
|
+
// Generated by dts-bundle-generator v9.5.1
|
|
2
|
+
|
|
3
|
+
export type MarkedToken = (Tokens.Blockquote | Tokens.Br | Tokens.Checkbox | Tokens.Code | Tokens.Codespan | Tokens.Def | Tokens.Del | Tokens.Em | Tokens.Escape | Tokens.Heading | Tokens.Hr | Tokens.HTML | Tokens.Image | Tokens.Link | Tokens.List | Tokens.ListItem | Tokens.Paragraph | Tokens.Space | Tokens.Strong | Tokens.Table | Tokens.Tag | Tokens.Text);
|
|
4
|
+
export type Token = (MarkedToken | Tokens.Generic);
|
|
5
|
+
export declare namespace Tokens {
|
|
6
|
+
interface Blockquote {
|
|
7
|
+
type: "blockquote";
|
|
8
|
+
raw: string;
|
|
9
|
+
text: string;
|
|
10
|
+
tokens: Token[];
|
|
11
|
+
}
|
|
12
|
+
interface Br {
|
|
13
|
+
type: "br";
|
|
14
|
+
raw: string;
|
|
15
|
+
}
|
|
16
|
+
interface Checkbox {
|
|
17
|
+
type: "checkbox";
|
|
18
|
+
raw: string;
|
|
19
|
+
checked: boolean;
|
|
20
|
+
}
|
|
21
|
+
interface Code {
|
|
22
|
+
type: "code";
|
|
23
|
+
raw: string;
|
|
24
|
+
codeBlockStyle?: "indented";
|
|
25
|
+
lang?: string;
|
|
26
|
+
text: string;
|
|
27
|
+
escaped?: boolean;
|
|
28
|
+
}
|
|
29
|
+
interface Codespan {
|
|
30
|
+
type: "codespan";
|
|
31
|
+
raw: string;
|
|
32
|
+
text: string;
|
|
33
|
+
}
|
|
34
|
+
interface Def {
|
|
35
|
+
type: "def";
|
|
36
|
+
raw: string;
|
|
37
|
+
tag: string;
|
|
38
|
+
href: string;
|
|
39
|
+
title: string;
|
|
40
|
+
}
|
|
41
|
+
interface Del {
|
|
42
|
+
type: "del";
|
|
43
|
+
raw: string;
|
|
44
|
+
text: string;
|
|
45
|
+
tokens: Token[];
|
|
46
|
+
}
|
|
47
|
+
interface Em {
|
|
48
|
+
type: "em";
|
|
49
|
+
raw: string;
|
|
50
|
+
text: string;
|
|
51
|
+
tokens: Token[];
|
|
52
|
+
}
|
|
53
|
+
interface Escape {
|
|
54
|
+
type: "escape";
|
|
55
|
+
raw: string;
|
|
56
|
+
text: string;
|
|
57
|
+
}
|
|
58
|
+
interface Generic {
|
|
59
|
+
[index: string]: any;
|
|
60
|
+
type: string;
|
|
61
|
+
raw: string;
|
|
62
|
+
tokens?: Token[];
|
|
63
|
+
}
|
|
64
|
+
interface Heading {
|
|
65
|
+
type: "heading";
|
|
66
|
+
raw: string;
|
|
67
|
+
depth: number;
|
|
68
|
+
text: string;
|
|
69
|
+
tokens: Token[];
|
|
70
|
+
}
|
|
71
|
+
interface Hr {
|
|
72
|
+
type: "hr";
|
|
73
|
+
raw: string;
|
|
74
|
+
}
|
|
75
|
+
interface HTML {
|
|
76
|
+
type: "html";
|
|
77
|
+
raw: string;
|
|
78
|
+
pre: boolean;
|
|
79
|
+
text: string;
|
|
80
|
+
block: boolean;
|
|
81
|
+
}
|
|
82
|
+
interface Image {
|
|
83
|
+
type: "image";
|
|
84
|
+
raw: string;
|
|
85
|
+
href: string;
|
|
86
|
+
title: string | null;
|
|
87
|
+
text: string;
|
|
88
|
+
tokens: Token[];
|
|
89
|
+
}
|
|
90
|
+
interface Link {
|
|
91
|
+
type: "link";
|
|
92
|
+
raw: string;
|
|
93
|
+
href: string;
|
|
94
|
+
title?: string | null;
|
|
95
|
+
text: string;
|
|
96
|
+
tokens: Token[];
|
|
97
|
+
}
|
|
98
|
+
interface List {
|
|
99
|
+
type: "list";
|
|
100
|
+
raw: string;
|
|
101
|
+
ordered: boolean;
|
|
102
|
+
start: number | "";
|
|
103
|
+
loose: boolean;
|
|
104
|
+
items: ListItem[];
|
|
105
|
+
}
|
|
106
|
+
interface ListItem {
|
|
107
|
+
type: "list_item";
|
|
108
|
+
raw: string;
|
|
109
|
+
task: boolean;
|
|
110
|
+
checked?: boolean;
|
|
111
|
+
loose: boolean;
|
|
112
|
+
text: string;
|
|
113
|
+
tokens: Token[];
|
|
114
|
+
}
|
|
115
|
+
interface Paragraph {
|
|
116
|
+
type: "paragraph";
|
|
117
|
+
raw: string;
|
|
118
|
+
pre?: boolean;
|
|
119
|
+
text: string;
|
|
120
|
+
tokens: Token[];
|
|
121
|
+
}
|
|
122
|
+
interface Space {
|
|
123
|
+
type: "space";
|
|
124
|
+
raw: string;
|
|
125
|
+
}
|
|
126
|
+
interface Strong {
|
|
127
|
+
type: "strong";
|
|
128
|
+
raw: string;
|
|
129
|
+
text: string;
|
|
130
|
+
tokens: Token[];
|
|
131
|
+
}
|
|
132
|
+
interface Table {
|
|
133
|
+
type: "table";
|
|
134
|
+
raw: string;
|
|
135
|
+
align: Array<"center" | "left" | "right" | null>;
|
|
136
|
+
header: TableCell[];
|
|
137
|
+
rows: TableCell[][];
|
|
138
|
+
}
|
|
139
|
+
interface TableCell {
|
|
140
|
+
text: string;
|
|
141
|
+
tokens: Token[];
|
|
142
|
+
header: boolean;
|
|
143
|
+
align: "center" | "left" | "right" | null;
|
|
144
|
+
}
|
|
145
|
+
interface TableRow<P = string> {
|
|
146
|
+
text: P;
|
|
147
|
+
}
|
|
148
|
+
interface Tag {
|
|
149
|
+
type: "html";
|
|
150
|
+
raw: string;
|
|
151
|
+
inLink: boolean;
|
|
152
|
+
inRawBlock: boolean;
|
|
153
|
+
text: string;
|
|
154
|
+
block: boolean;
|
|
155
|
+
}
|
|
156
|
+
interface Text {
|
|
157
|
+
type: "text";
|
|
158
|
+
raw: string;
|
|
159
|
+
text: string;
|
|
160
|
+
tokens?: Token[];
|
|
161
|
+
escaped?: boolean;
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
export type Links = Record<string, Pick<Tokens.Link | Tokens.Image, "href" | "title">>;
|
|
165
|
+
export type TokensList = Token[] & {
|
|
166
|
+
links: Links;
|
|
167
|
+
};
|
|
168
|
+
/**
|
|
169
|
+
* Renderer
|
|
170
|
+
*/
|
|
171
|
+
declare class _Renderer<ParserOutput = string, RendererOutput = string> {
|
|
172
|
+
options: MarkedOptions<ParserOutput, RendererOutput>;
|
|
173
|
+
parser: _Parser<ParserOutput, RendererOutput>;
|
|
174
|
+
constructor(options?: MarkedOptions<ParserOutput, RendererOutput>);
|
|
175
|
+
space(token: Tokens.Space): RendererOutput;
|
|
176
|
+
code({ text, lang, escaped }: Tokens.Code): RendererOutput;
|
|
177
|
+
blockquote({ tokens }: Tokens.Blockquote): RendererOutput;
|
|
178
|
+
html({ text }: Tokens.HTML | Tokens.Tag): RendererOutput;
|
|
179
|
+
def(token: Tokens.Def): RendererOutput;
|
|
180
|
+
heading({ tokens, depth }: Tokens.Heading): RendererOutput;
|
|
181
|
+
hr(token: Tokens.Hr): RendererOutput;
|
|
182
|
+
list(token: Tokens.List): RendererOutput;
|
|
183
|
+
listitem(item: Tokens.ListItem): RendererOutput;
|
|
184
|
+
checkbox({ checked }: Tokens.Checkbox): RendererOutput;
|
|
185
|
+
paragraph({ tokens }: Tokens.Paragraph): RendererOutput;
|
|
186
|
+
table(token: Tokens.Table): RendererOutput;
|
|
187
|
+
tablerow({ text }: Tokens.TableRow<ParserOutput>): RendererOutput;
|
|
188
|
+
tablecell(token: Tokens.TableCell): RendererOutput;
|
|
189
|
+
/**
|
|
190
|
+
* span level renderer
|
|
191
|
+
*/
|
|
192
|
+
strong({ tokens }: Tokens.Strong): RendererOutput;
|
|
193
|
+
em({ tokens }: Tokens.Em): RendererOutput;
|
|
194
|
+
codespan({ text }: Tokens.Codespan): RendererOutput;
|
|
195
|
+
br(token: Tokens.Br): RendererOutput;
|
|
196
|
+
del({ tokens }: Tokens.Del): RendererOutput;
|
|
197
|
+
link({ href, title, tokens }: Tokens.Link): RendererOutput;
|
|
198
|
+
image({ href, title, text, tokens }: Tokens.Image): RendererOutput;
|
|
199
|
+
text(token: Tokens.Text | Tokens.Escape): RendererOutput;
|
|
200
|
+
}
|
|
201
|
+
/**
|
|
202
|
+
* TextRenderer
|
|
203
|
+
* returns only the textual part of the token
|
|
204
|
+
*/
|
|
205
|
+
declare class _TextRenderer<RendererOutput = string> {
|
|
206
|
+
strong({ text }: Tokens.Strong): RendererOutput;
|
|
207
|
+
em({ text }: Tokens.Em): RendererOutput;
|
|
208
|
+
codespan({ text }: Tokens.Codespan): RendererOutput;
|
|
209
|
+
del({ text }: Tokens.Del): RendererOutput;
|
|
210
|
+
html({ text }: Tokens.HTML | Tokens.Tag): RendererOutput;
|
|
211
|
+
text({ text }: Tokens.Text | Tokens.Escape | Tokens.Tag): RendererOutput;
|
|
212
|
+
link({ text }: Tokens.Link): RendererOutput;
|
|
213
|
+
image({ text }: Tokens.Image): RendererOutput;
|
|
214
|
+
br(): RendererOutput;
|
|
215
|
+
checkbox({ raw }: Tokens.Checkbox): RendererOutput;
|
|
216
|
+
}
|
|
217
|
+
/**
|
|
218
|
+
* Parsing & Compiling
|
|
219
|
+
*/
|
|
220
|
+
declare class _Parser<ParserOutput = string, RendererOutput = string> {
|
|
221
|
+
options: MarkedOptions<ParserOutput, RendererOutput>;
|
|
222
|
+
renderer: _Renderer<ParserOutput, RendererOutput>;
|
|
223
|
+
textRenderer: _TextRenderer<RendererOutput>;
|
|
224
|
+
constructor(options?: MarkedOptions<ParserOutput, RendererOutput>);
|
|
225
|
+
/**
|
|
226
|
+
* Static Parse Method
|
|
227
|
+
*/
|
|
228
|
+
static parse<ParserOutput = string, RendererOutput = string>(tokens: Token[], options?: MarkedOptions<ParserOutput, RendererOutput>): ParserOutput;
|
|
229
|
+
/**
|
|
230
|
+
* Static Parse Inline Method
|
|
231
|
+
*/
|
|
232
|
+
static parseInline<ParserOutput = string, RendererOutput = string>(tokens: Token[], options?: MarkedOptions<ParserOutput, RendererOutput>): ParserOutput;
|
|
233
|
+
/**
|
|
234
|
+
* Parse Loop
|
|
235
|
+
*/
|
|
236
|
+
parse(tokens: Token[]): ParserOutput;
|
|
237
|
+
/**
|
|
238
|
+
* Parse Inline Tokens
|
|
239
|
+
*/
|
|
240
|
+
parseInline(tokens: Token[], renderer?: _Renderer<ParserOutput, RendererOutput> | _TextRenderer<RendererOutput>): ParserOutput;
|
|
241
|
+
}
|
|
242
|
+
declare const other: {
|
|
243
|
+
codeRemoveIndent: RegExp;
|
|
244
|
+
outputLinkReplace: RegExp;
|
|
245
|
+
indentCodeCompensation: RegExp;
|
|
246
|
+
beginningSpace: RegExp;
|
|
247
|
+
endingHash: RegExp;
|
|
248
|
+
startingSpaceChar: RegExp;
|
|
249
|
+
endingSpaceChar: RegExp;
|
|
250
|
+
nonSpaceChar: RegExp;
|
|
251
|
+
newLineCharGlobal: RegExp;
|
|
252
|
+
tabCharGlobal: RegExp;
|
|
253
|
+
multipleSpaceGlobal: RegExp;
|
|
254
|
+
blankLine: RegExp;
|
|
255
|
+
doubleBlankLine: RegExp;
|
|
256
|
+
blockquoteStart: RegExp;
|
|
257
|
+
blockquoteSetextReplace: RegExp;
|
|
258
|
+
blockquoteSetextReplace2: RegExp;
|
|
259
|
+
listReplaceNesting: RegExp;
|
|
260
|
+
listIsTask: RegExp;
|
|
261
|
+
listReplaceTask: RegExp;
|
|
262
|
+
listTaskCheckbox: RegExp;
|
|
263
|
+
anyLine: RegExp;
|
|
264
|
+
hrefBrackets: RegExp;
|
|
265
|
+
tableDelimiter: RegExp;
|
|
266
|
+
tableAlignChars: RegExp;
|
|
267
|
+
tableRowBlankLine: RegExp;
|
|
268
|
+
tableAlignRight: RegExp;
|
|
269
|
+
tableAlignCenter: RegExp;
|
|
270
|
+
tableAlignLeft: RegExp;
|
|
271
|
+
startATag: RegExp;
|
|
272
|
+
endATag: RegExp;
|
|
273
|
+
startPreScriptTag: RegExp;
|
|
274
|
+
endPreScriptTag: RegExp;
|
|
275
|
+
startAngleBracket: RegExp;
|
|
276
|
+
endAngleBracket: RegExp;
|
|
277
|
+
pedanticHrefTitle: RegExp;
|
|
278
|
+
unicodeAlphaNumeric: RegExp;
|
|
279
|
+
escapeTest: RegExp;
|
|
280
|
+
escapeReplace: RegExp;
|
|
281
|
+
escapeTestNoEncode: RegExp;
|
|
282
|
+
escapeReplaceNoEncode: RegExp;
|
|
283
|
+
caret: RegExp;
|
|
284
|
+
percentDecode: RegExp;
|
|
285
|
+
findPipe: RegExp;
|
|
286
|
+
splitPipe: RegExp;
|
|
287
|
+
slashPipe: RegExp;
|
|
288
|
+
carriageReturn: RegExp;
|
|
289
|
+
spaceLine: RegExp;
|
|
290
|
+
notSpaceStart: RegExp;
|
|
291
|
+
endingNewline: RegExp;
|
|
292
|
+
listItemRegex: (bull: string) => RegExp;
|
|
293
|
+
nextBulletRegex: (indent: number) => RegExp;
|
|
294
|
+
hrRegex: (indent: number) => RegExp;
|
|
295
|
+
fencesBeginRegex: (indent: number) => RegExp;
|
|
296
|
+
headingBeginRegex: (indent: number) => RegExp;
|
|
297
|
+
htmlBeginRegex: (indent: number) => RegExp;
|
|
298
|
+
blockquoteBeginRegex: (indent: number) => RegExp;
|
|
299
|
+
};
|
|
300
|
+
declare const blockNormal: {
|
|
301
|
+
blockquote: RegExp;
|
|
302
|
+
code: RegExp;
|
|
303
|
+
def: RegExp;
|
|
304
|
+
fences: RegExp;
|
|
305
|
+
heading: RegExp;
|
|
306
|
+
hr: RegExp;
|
|
307
|
+
html: RegExp;
|
|
308
|
+
lheading: RegExp;
|
|
309
|
+
list: RegExp;
|
|
310
|
+
newline: RegExp;
|
|
311
|
+
paragraph: RegExp;
|
|
312
|
+
table: RegExp;
|
|
313
|
+
text: RegExp;
|
|
314
|
+
};
|
|
315
|
+
export type BlockKeys = keyof typeof blockNormal;
|
|
316
|
+
declare const inlineNormal: {
|
|
317
|
+
_backpedal: RegExp;
|
|
318
|
+
anyPunctuation: RegExp;
|
|
319
|
+
autolink: RegExp;
|
|
320
|
+
blockSkip: RegExp;
|
|
321
|
+
br: RegExp;
|
|
322
|
+
code: RegExp;
|
|
323
|
+
del: RegExp;
|
|
324
|
+
delLDelim: RegExp;
|
|
325
|
+
delRDelim: RegExp;
|
|
326
|
+
emStrongLDelim: RegExp;
|
|
327
|
+
emStrongRDelimAst: RegExp;
|
|
328
|
+
emStrongRDelimUnd: RegExp;
|
|
329
|
+
escape: RegExp;
|
|
330
|
+
link: RegExp;
|
|
331
|
+
nolink: RegExp;
|
|
332
|
+
punctuation: RegExp;
|
|
333
|
+
reflink: RegExp;
|
|
334
|
+
reflinkSearch: RegExp;
|
|
335
|
+
tag: RegExp;
|
|
336
|
+
text: RegExp;
|
|
337
|
+
url: RegExp;
|
|
338
|
+
};
|
|
339
|
+
export type InlineKeys = keyof typeof inlineNormal;
|
|
340
|
+
export interface Rules {
|
|
341
|
+
other: typeof other;
|
|
342
|
+
block: Record<BlockKeys, RegExp>;
|
|
343
|
+
inline: Record<InlineKeys, RegExp>;
|
|
344
|
+
}
|
|
345
|
+
/**
|
|
346
|
+
* Tokenizer
|
|
347
|
+
*/
|
|
348
|
+
declare class _Tokenizer<ParserOutput = string, RendererOutput = string> {
|
|
349
|
+
options: MarkedOptions<ParserOutput, RendererOutput>;
|
|
350
|
+
rules: Rules;
|
|
351
|
+
lexer: _Lexer<ParserOutput, RendererOutput>;
|
|
352
|
+
constructor(options?: MarkedOptions<ParserOutput, RendererOutput>);
|
|
353
|
+
space(src: string): Tokens.Space | undefined;
|
|
354
|
+
code(src: string): Tokens.Code | undefined;
|
|
355
|
+
fences(src: string): Tokens.Code | undefined;
|
|
356
|
+
heading(src: string): Tokens.Heading | undefined;
|
|
357
|
+
hr(src: string): Tokens.Hr | undefined;
|
|
358
|
+
blockquote(src: string): Tokens.Blockquote | undefined;
|
|
359
|
+
list(src: string): Tokens.List | undefined;
|
|
360
|
+
html(src: string): Tokens.HTML | undefined;
|
|
361
|
+
def(src: string): Tokens.Def | undefined;
|
|
362
|
+
table(src: string): Tokens.Table | undefined;
|
|
363
|
+
lheading(src: string): Tokens.Heading | undefined;
|
|
364
|
+
paragraph(src: string): Tokens.Paragraph | undefined;
|
|
365
|
+
text(src: string): Tokens.Text | undefined;
|
|
366
|
+
escape(src: string): Tokens.Escape | undefined;
|
|
367
|
+
tag(src: string): Tokens.Tag | undefined;
|
|
368
|
+
link(src: string): Tokens.Link | Tokens.Image | undefined;
|
|
369
|
+
reflink(src: string, links: Links): Tokens.Link | Tokens.Image | Tokens.Text | undefined;
|
|
370
|
+
emStrong(src: string, maskedSrc: string, prevChar?: string): Tokens.Em | Tokens.Strong | undefined;
|
|
371
|
+
codespan(src: string): Tokens.Codespan | undefined;
|
|
372
|
+
br(src: string): Tokens.Br | undefined;
|
|
373
|
+
del(src: string, maskedSrc: string, prevChar?: string): Tokens.Del | undefined;
|
|
374
|
+
autolink(src: string): Tokens.Link | undefined;
|
|
375
|
+
url(src: string): Tokens.Link | undefined;
|
|
376
|
+
inlineText(src: string): Tokens.Text | undefined;
|
|
377
|
+
}
|
|
378
|
+
declare class _Hooks<ParserOutput = string, RendererOutput = string> {
|
|
379
|
+
options: MarkedOptions<ParserOutput, RendererOutput>;
|
|
380
|
+
block?: boolean;
|
|
381
|
+
constructor(options?: MarkedOptions<ParserOutput, RendererOutput>);
|
|
382
|
+
static passThroughHooks: Set<string>;
|
|
383
|
+
static passThroughHooksRespectAsync: Set<string>;
|
|
384
|
+
/**
|
|
385
|
+
* Process markdown before marked
|
|
386
|
+
*/
|
|
387
|
+
preprocess(markdown: string): string;
|
|
388
|
+
/**
|
|
389
|
+
* Process HTML after marked is finished
|
|
390
|
+
*/
|
|
391
|
+
postprocess(html: ParserOutput): ParserOutput;
|
|
392
|
+
/**
|
|
393
|
+
* Process all tokens before walk tokens
|
|
394
|
+
*/
|
|
395
|
+
processAllTokens(tokens: Token[] | TokensList): Token[] | TokensList;
|
|
396
|
+
/**
|
|
397
|
+
* Mask contents that should not be interpreted as em/strong delimiters
|
|
398
|
+
*/
|
|
399
|
+
emStrongMask(src: string): string;
|
|
400
|
+
/**
|
|
401
|
+
* Provide function to tokenize markdown
|
|
402
|
+
*/
|
|
403
|
+
provideLexer(block?: boolean | undefined): typeof _Lexer.lexInline;
|
|
404
|
+
/**
|
|
405
|
+
* Provide function to parse tokens
|
|
406
|
+
*/
|
|
407
|
+
provideParser(block?: boolean | undefined): (tokens: Token[], options?: MarkedOptions<ParserOutput, RendererOutput> | undefined) => ParserOutput;
|
|
408
|
+
}
|
|
409
|
+
export interface TokenizerThis {
|
|
410
|
+
lexer: _Lexer;
|
|
411
|
+
}
|
|
412
|
+
export type TokenizerExtensionFunction = (this: TokenizerThis, src: string, tokens: Token[] | TokensList) => Tokens.Generic | undefined;
|
|
413
|
+
export type TokenizerStartFunction = (this: TokenizerThis, src: string) => number | void;
|
|
414
|
+
export interface TokenizerExtension {
|
|
415
|
+
name: string;
|
|
416
|
+
level: "block" | "inline";
|
|
417
|
+
start?: TokenizerStartFunction;
|
|
418
|
+
tokenizer: TokenizerExtensionFunction;
|
|
419
|
+
childTokens?: string[];
|
|
420
|
+
}
|
|
421
|
+
export interface RendererThis<ParserOutput = string, RendererOutput = string> {
|
|
422
|
+
parser: _Parser<ParserOutput, RendererOutput>;
|
|
423
|
+
}
|
|
424
|
+
export type RendererExtensionFunction<ParserOutput = string, RendererOutput = string> = (this: RendererThis<ParserOutput, RendererOutput>, token: Tokens.Generic) => RendererOutput | false | undefined;
|
|
425
|
+
export interface RendererExtension<ParserOutput = string, RendererOutput = string> {
|
|
426
|
+
name: string;
|
|
427
|
+
renderer: RendererExtensionFunction<ParserOutput, RendererOutput>;
|
|
428
|
+
}
|
|
429
|
+
export type TokenizerAndRendererExtension<ParserOutput = string, RendererOutput = string> = TokenizerExtension | RendererExtension<ParserOutput, RendererOutput> | (TokenizerExtension & RendererExtension<ParserOutput, RendererOutput>);
|
|
430
|
+
export type HooksApi<ParserOutput = string, RendererOutput = string> = Omit<_Hooks<ParserOutput, RendererOutput>, "constructor" | "options" | "block">;
|
|
431
|
+
export type HooksObject<ParserOutput = string, RendererOutput = string> = {
|
|
432
|
+
[K in keyof HooksApi<ParserOutput, RendererOutput>]?: (this: _Hooks<ParserOutput, RendererOutput>, ...args: Parameters<HooksApi<ParserOutput, RendererOutput>[K]>) => ReturnType<HooksApi<ParserOutput, RendererOutput>[K]> | Promise<ReturnType<HooksApi<ParserOutput, RendererOutput>[K]>>;
|
|
433
|
+
};
|
|
434
|
+
export type RendererApi<ParserOutput = string, RendererOutput = string> = Omit<_Renderer<ParserOutput, RendererOutput>, "constructor" | "options" | "parser">;
|
|
435
|
+
export type RendererObject<ParserOutput = string, RendererOutput = string> = {
|
|
436
|
+
[K in keyof RendererApi<ParserOutput, RendererOutput>]?: (this: _Renderer<ParserOutput, RendererOutput>, ...args: Parameters<RendererApi<ParserOutput, RendererOutput>[K]>) => ReturnType<RendererApi<ParserOutput, RendererOutput>[K]> | false;
|
|
437
|
+
};
|
|
438
|
+
export type TokenizerApi<ParserOutput = string, RendererOutput = string> = Omit<_Tokenizer<ParserOutput, RendererOutput>, "constructor" | "options" | "rules" | "lexer">;
|
|
439
|
+
export type TokenizerObject<ParserOutput = string, RendererOutput = string> = {
|
|
440
|
+
[K in keyof TokenizerApi<ParserOutput, RendererOutput>]?: (this: _Tokenizer<ParserOutput, RendererOutput>, ...args: Parameters<TokenizerApi<ParserOutput, RendererOutput>[K]>) => ReturnType<TokenizerApi<ParserOutput, RendererOutput>[K]> | false;
|
|
441
|
+
};
|
|
442
|
+
export interface MarkedExtension<ParserOutput = string, RendererOutput = string> {
|
|
443
|
+
/**
|
|
444
|
+
* True will tell marked to await any walkTokens functions before parsing the tokens and returning an HTML string.
|
|
445
|
+
*/
|
|
446
|
+
async?: boolean;
|
|
447
|
+
/**
|
|
448
|
+
* Enable GFM line breaks. This option requires the gfm option to be true.
|
|
449
|
+
*/
|
|
450
|
+
breaks?: boolean;
|
|
451
|
+
/**
|
|
452
|
+
* Add tokenizers and renderers to marked
|
|
453
|
+
*/
|
|
454
|
+
extensions?: TokenizerAndRendererExtension<ParserOutput, RendererOutput>[] | null;
|
|
455
|
+
/**
|
|
456
|
+
* Enable GitHub flavored markdown.
|
|
457
|
+
*/
|
|
458
|
+
gfm?: boolean;
|
|
459
|
+
/**
|
|
460
|
+
* Hooks are methods that hook into some part of marked.
|
|
461
|
+
* preprocess is called to process markdown before sending it to marked.
|
|
462
|
+
* processAllTokens is called with the TokensList before walkTokens.
|
|
463
|
+
* postprocess is called to process html after marked has finished parsing.
|
|
464
|
+
* emStrongMask is called to mask contents that should not be interpreted as em/strong delimiters.
|
|
465
|
+
* provideLexer is called to provide a function to tokenize markdown.
|
|
466
|
+
* provideParser is called to provide a function to parse tokens.
|
|
467
|
+
*/
|
|
468
|
+
hooks?: HooksObject<ParserOutput, RendererOutput> | null;
|
|
469
|
+
/**
|
|
470
|
+
* Conform to obscure parts of markdown.pl as much as possible. Don't fix any of the original markdown bugs or poor behavior.
|
|
471
|
+
*/
|
|
472
|
+
pedantic?: boolean;
|
|
473
|
+
/**
|
|
474
|
+
* Type: object Default: new Renderer()
|
|
475
|
+
*
|
|
476
|
+
* An object containing functions to render tokens to HTML.
|
|
477
|
+
*/
|
|
478
|
+
renderer?: RendererObject<ParserOutput, RendererOutput> | null;
|
|
479
|
+
/**
|
|
480
|
+
* Shows an HTML error message when rendering fails.
|
|
481
|
+
*/
|
|
482
|
+
silent?: boolean;
|
|
483
|
+
/**
|
|
484
|
+
* The tokenizer defines how to turn markdown text into tokens.
|
|
485
|
+
*/
|
|
486
|
+
tokenizer?: TokenizerObject | null;
|
|
487
|
+
/**
|
|
488
|
+
* The walkTokens function gets called with every token.
|
|
489
|
+
* Child tokens are called before moving on to sibling tokens.
|
|
490
|
+
* Each token is passed by reference so updates are persisted when passed to the parser.
|
|
491
|
+
* The return value of the function is ignored.
|
|
492
|
+
*/
|
|
493
|
+
walkTokens?: ((token: Token) => void | Promise<void>) | null;
|
|
494
|
+
}
|
|
495
|
+
export interface MarkedOptions<ParserOutput = string, RendererOutput = string> extends Omit<MarkedExtension<ParserOutput, RendererOutput>, "hooks" | "renderer" | "tokenizer" | "extensions" | "walkTokens"> {
|
|
496
|
+
/**
|
|
497
|
+
* Hooks are methods that hook into some part of marked.
|
|
498
|
+
*/
|
|
499
|
+
hooks?: _Hooks<ParserOutput, RendererOutput> | null;
|
|
500
|
+
/**
|
|
501
|
+
* Type: object Default: new Renderer()
|
|
502
|
+
*
|
|
503
|
+
* An object containing functions to render tokens to HTML.
|
|
504
|
+
*/
|
|
505
|
+
renderer?: _Renderer<ParserOutput, RendererOutput> | null;
|
|
506
|
+
/**
|
|
507
|
+
* The tokenizer defines how to turn markdown text into tokens.
|
|
508
|
+
*/
|
|
509
|
+
tokenizer?: _Tokenizer<ParserOutput, RendererOutput> | null;
|
|
510
|
+
/**
|
|
511
|
+
* Custom extensions
|
|
512
|
+
*/
|
|
513
|
+
extensions?: null | {
|
|
514
|
+
renderers: {
|
|
515
|
+
[name: string]: RendererExtensionFunction<ParserOutput, RendererOutput>;
|
|
516
|
+
};
|
|
517
|
+
childTokens: {
|
|
518
|
+
[name: string]: string[];
|
|
519
|
+
};
|
|
520
|
+
inline?: TokenizerExtensionFunction[];
|
|
521
|
+
block?: TokenizerExtensionFunction[];
|
|
522
|
+
startInline?: TokenizerStartFunction[];
|
|
523
|
+
startBlock?: TokenizerStartFunction[];
|
|
524
|
+
};
|
|
525
|
+
/**
|
|
526
|
+
* walkTokens function returns array of values for Promise.all
|
|
527
|
+
*/
|
|
528
|
+
walkTokens?: null | ((token: Token) => void | Promise<void> | (void | Promise<void>)[]);
|
|
529
|
+
}
|
|
530
|
+
/**
|
|
531
|
+
* Block Lexer
|
|
532
|
+
*/
|
|
533
|
+
declare class _Lexer<ParserOutput = string, RendererOutput = string> {
|
|
534
|
+
tokens: TokensList;
|
|
535
|
+
options: MarkedOptions<ParserOutput, RendererOutput>;
|
|
536
|
+
state: {
|
|
537
|
+
inLink: boolean;
|
|
538
|
+
inRawBlock: boolean;
|
|
539
|
+
top: boolean;
|
|
540
|
+
};
|
|
541
|
+
inlineQueue: {
|
|
542
|
+
src: string;
|
|
543
|
+
tokens: Token[];
|
|
544
|
+
}[];
|
|
545
|
+
private tokenizer;
|
|
546
|
+
constructor(options?: MarkedOptions<ParserOutput, RendererOutput>);
|
|
547
|
+
/**
|
|
548
|
+
* Expose Rules
|
|
549
|
+
*/
|
|
550
|
+
static get rules(): {
|
|
551
|
+
block: {
|
|
552
|
+
normal: {
|
|
553
|
+
blockquote: RegExp;
|
|
554
|
+
code: RegExp;
|
|
555
|
+
def: RegExp;
|
|
556
|
+
fences: RegExp;
|
|
557
|
+
heading: RegExp;
|
|
558
|
+
hr: RegExp;
|
|
559
|
+
html: RegExp;
|
|
560
|
+
lheading: RegExp;
|
|
561
|
+
list: RegExp;
|
|
562
|
+
newline: RegExp;
|
|
563
|
+
paragraph: RegExp;
|
|
564
|
+
table: RegExp;
|
|
565
|
+
text: RegExp;
|
|
566
|
+
};
|
|
567
|
+
gfm: Record<"code" | "blockquote" | "hr" | "html" | "table" | "text" | "def" | "heading" | "list" | "paragraph" | "fences" | "lheading" | "newline", RegExp>;
|
|
568
|
+
pedantic: Record<"code" | "blockquote" | "hr" | "html" | "table" | "text" | "def" | "heading" | "list" | "paragraph" | "fences" | "lheading" | "newline", RegExp>;
|
|
569
|
+
};
|
|
570
|
+
inline: {
|
|
571
|
+
normal: {
|
|
572
|
+
_backpedal: RegExp;
|
|
573
|
+
anyPunctuation: RegExp;
|
|
574
|
+
autolink: RegExp;
|
|
575
|
+
blockSkip: RegExp;
|
|
576
|
+
br: RegExp;
|
|
577
|
+
code: RegExp;
|
|
578
|
+
del: RegExp;
|
|
579
|
+
delLDelim: RegExp;
|
|
580
|
+
delRDelim: RegExp;
|
|
581
|
+
emStrongLDelim: RegExp;
|
|
582
|
+
emStrongRDelimAst: RegExp;
|
|
583
|
+
emStrongRDelimUnd: RegExp;
|
|
584
|
+
escape: RegExp;
|
|
585
|
+
link: RegExp;
|
|
586
|
+
nolink: RegExp;
|
|
587
|
+
punctuation: RegExp;
|
|
588
|
+
reflink: RegExp;
|
|
589
|
+
reflinkSearch: RegExp;
|
|
590
|
+
tag: RegExp;
|
|
591
|
+
text: RegExp;
|
|
592
|
+
url: RegExp;
|
|
593
|
+
};
|
|
594
|
+
gfm: Record<"link" | "code" | "url" | "br" | "del" | "text" | "tag" | "escape" | "reflink" | "nolink" | "_backpedal" | "anyPunctuation" | "autolink" | "blockSkip" | "delLDelim" | "delRDelim" | "emStrongLDelim" | "emStrongRDelimAst" | "emStrongRDelimUnd" | "punctuation" | "reflinkSearch", RegExp>;
|
|
595
|
+
breaks: Record<"link" | "code" | "url" | "br" | "del" | "text" | "tag" | "escape" | "reflink" | "nolink" | "_backpedal" | "anyPunctuation" | "autolink" | "blockSkip" | "delLDelim" | "delRDelim" | "emStrongLDelim" | "emStrongRDelimAst" | "emStrongRDelimUnd" | "punctuation" | "reflinkSearch", RegExp>;
|
|
596
|
+
pedantic: Record<"link" | "code" | "url" | "br" | "del" | "text" | "tag" | "escape" | "reflink" | "nolink" | "_backpedal" | "anyPunctuation" | "autolink" | "blockSkip" | "delLDelim" | "delRDelim" | "emStrongLDelim" | "emStrongRDelimAst" | "emStrongRDelimUnd" | "punctuation" | "reflinkSearch", RegExp>;
|
|
597
|
+
};
|
|
598
|
+
};
|
|
599
|
+
/**
|
|
600
|
+
* Static Lex Method
|
|
601
|
+
*/
|
|
602
|
+
static lex<ParserOutput = string, RendererOutput = string>(src: string, options?: MarkedOptions<ParserOutput, RendererOutput>): TokensList;
|
|
603
|
+
/**
|
|
604
|
+
* Static Lex Inline Method
|
|
605
|
+
*/
|
|
606
|
+
static lexInline<ParserOutput = string, RendererOutput = string>(src: string, options?: MarkedOptions<ParserOutput, RendererOutput>): Token[];
|
|
607
|
+
/**
|
|
608
|
+
* Preprocessing
|
|
609
|
+
*/
|
|
610
|
+
lex(src: string): TokensList;
|
|
611
|
+
/**
|
|
612
|
+
* Lexing
|
|
613
|
+
*/
|
|
614
|
+
blockTokens(src: string, tokens?: Token[], lastParagraphClipped?: boolean): Token[];
|
|
615
|
+
blockTokens(src: string, tokens?: TokensList, lastParagraphClipped?: boolean): TokensList;
|
|
616
|
+
inline(src: string, tokens?: Token[]): Token[];
|
|
617
|
+
/**
|
|
618
|
+
* Lexing/Compiling
|
|
619
|
+
*/
|
|
620
|
+
inlineTokens(src: string, tokens?: Token[]): Token[];
|
|
621
|
+
private infiniteLoopError;
|
|
622
|
+
}
|
|
623
|
+
/**
|
|
624
|
+
* Gets the original marked default options.
|
|
625
|
+
*/
|
|
626
|
+
declare function _getDefaults<ParserOutput = string, RendererOutput = string>(): MarkedOptions<ParserOutput, RendererOutput>;
|
|
627
|
+
declare let _defaults: MarkedOptions<any, any>;
|
|
628
|
+
export type MaybePromise = void | Promise<void>;
|
|
629
|
+
export declare class Marked<ParserOutput = string, RendererOutput = string> {
|
|
630
|
+
defaults: MarkedOptions<ParserOutput, RendererOutput>;
|
|
631
|
+
options: (opt: MarkedOptions<ParserOutput, RendererOutput>) => this;
|
|
632
|
+
parse: {
|
|
633
|
+
(src: string, options: MarkedOptions<ParserOutput, RendererOutput> & {
|
|
634
|
+
async: true;
|
|
635
|
+
}): Promise<ParserOutput>;
|
|
636
|
+
(src: string, options: MarkedOptions<ParserOutput, RendererOutput> & {
|
|
637
|
+
async: false;
|
|
638
|
+
}): ParserOutput;
|
|
639
|
+
(src: string, options?: MarkedOptions<ParserOutput, RendererOutput> | null): ParserOutput | Promise<ParserOutput>;
|
|
640
|
+
};
|
|
641
|
+
parseInline: {
|
|
642
|
+
(src: string, options: MarkedOptions<ParserOutput, RendererOutput> & {
|
|
643
|
+
async: true;
|
|
644
|
+
}): Promise<ParserOutput>;
|
|
645
|
+
(src: string, options: MarkedOptions<ParserOutput, RendererOutput> & {
|
|
646
|
+
async: false;
|
|
647
|
+
}): ParserOutput;
|
|
648
|
+
(src: string, options?: MarkedOptions<ParserOutput, RendererOutput> | null): ParserOutput | Promise<ParserOutput>;
|
|
649
|
+
};
|
|
650
|
+
Parser: {
|
|
651
|
+
new (options?: MarkedOptions<ParserOutput, RendererOutput> | undefined): _Parser<ParserOutput, RendererOutput>;
|
|
652
|
+
parse<ParserOutput_1 = string, RendererOutput_1 = string>(tokens: Token[], options?: MarkedOptions<ParserOutput_1, RendererOutput_1>): ParserOutput_1;
|
|
653
|
+
parseInline<ParserOutput_1 = string, RendererOutput_1 = string>(tokens: Token[], options?: MarkedOptions<ParserOutput_1, RendererOutput_1>): ParserOutput_1;
|
|
654
|
+
};
|
|
655
|
+
Renderer: {
|
|
656
|
+
new (options?: MarkedOptions<ParserOutput, RendererOutput> | undefined): _Renderer<ParserOutput, RendererOutput>;
|
|
657
|
+
};
|
|
658
|
+
TextRenderer: {
|
|
659
|
+
new (): _TextRenderer<RendererOutput>;
|
|
660
|
+
};
|
|
661
|
+
Lexer: typeof _Lexer;
|
|
662
|
+
Tokenizer: {
|
|
663
|
+
new (options?: MarkedOptions<ParserOutput, RendererOutput> | undefined): _Tokenizer<ParserOutput, RendererOutput>;
|
|
664
|
+
};
|
|
665
|
+
Hooks: {
|
|
666
|
+
new (options?: MarkedOptions<ParserOutput, RendererOutput> | undefined): _Hooks<ParserOutput, RendererOutput>;
|
|
667
|
+
passThroughHooks: Set<string>;
|
|
668
|
+
passThroughHooksRespectAsync: Set<string>;
|
|
669
|
+
};
|
|
670
|
+
constructor(...args: MarkedExtension<ParserOutput, RendererOutput>[]);
|
|
671
|
+
/**
|
|
672
|
+
* Run callback for every token
|
|
673
|
+
*/
|
|
674
|
+
walkTokens(tokens: Token[] | TokensList, callback: (token: Token) => MaybePromise | MaybePromise[]): MaybePromise[];
|
|
675
|
+
use(...args: MarkedExtension<ParserOutput, RendererOutput>[]): this;
|
|
676
|
+
setOptions(opt: MarkedOptions<ParserOutput, RendererOutput>): this;
|
|
677
|
+
lexer(src: string, options?: MarkedOptions<ParserOutput, RendererOutput>): TokensList;
|
|
678
|
+
parser(tokens: Token[], options?: MarkedOptions<ParserOutput, RendererOutput>): ParserOutput;
|
|
679
|
+
private parseMarkdown;
|
|
680
|
+
private onError;
|
|
681
|
+
}
|
|
682
|
+
/**
|
|
683
|
+
* Compiles markdown to HTML asynchronously.
|
|
684
|
+
*
|
|
685
|
+
* @param src String of markdown source to be compiled
|
|
686
|
+
* @param options Hash of options, having async: true
|
|
687
|
+
* @return Promise of string of compiled HTML
|
|
688
|
+
*/
|
|
689
|
+
export declare function marked(src: string, options: MarkedOptions & {
|
|
690
|
+
async: true;
|
|
691
|
+
}): Promise<string>;
|
|
692
|
+
/**
|
|
693
|
+
* Compiles markdown to HTML.
|
|
694
|
+
*
|
|
695
|
+
* @param src String of markdown source to be compiled
|
|
696
|
+
* @param options Optional hash of options
|
|
697
|
+
* @return String of compiled HTML. Will be a Promise of string if async is set to true by any extensions.
|
|
698
|
+
*/
|
|
699
|
+
export declare function marked(src: string, options: MarkedOptions & {
|
|
700
|
+
async: false;
|
|
701
|
+
}): string;
|
|
702
|
+
export declare function marked(src: string, options: MarkedOptions & {
|
|
703
|
+
async: true;
|
|
704
|
+
}): Promise<string>;
|
|
705
|
+
export declare function marked(src: string, options?: MarkedOptions | null): string | Promise<string>;
|
|
706
|
+
export declare namespace marked {
|
|
707
|
+
var options: (options: MarkedOptions) => typeof marked;
|
|
708
|
+
var setOptions: (options: MarkedOptions) => typeof marked;
|
|
709
|
+
var getDefaults: typeof _getDefaults;
|
|
710
|
+
var defaults: MarkedOptions<any, any>;
|
|
711
|
+
var use: (...args: MarkedExtension[]) => typeof marked;
|
|
712
|
+
var walkTokens: (tokens: Token[] | TokensList, callback: (token: Token) => MaybePromise | MaybePromise[]) => MaybePromise[];
|
|
713
|
+
var parseInline: {
|
|
714
|
+
(src: string, options: MarkedOptions<string, string> & {
|
|
715
|
+
async: true;
|
|
716
|
+
}): Promise<string>;
|
|
717
|
+
(src: string, options: MarkedOptions<string, string> & {
|
|
718
|
+
async: false;
|
|
719
|
+
}): string;
|
|
720
|
+
(src: string, options?: MarkedOptions<string, string> | null | undefined): string | Promise<string>;
|
|
721
|
+
};
|
|
722
|
+
var Parser: typeof _Parser;
|
|
723
|
+
var parser: typeof _Parser.parse;
|
|
724
|
+
var Renderer: typeof _Renderer;
|
|
725
|
+
var TextRenderer: typeof _TextRenderer;
|
|
726
|
+
var Lexer: typeof _Lexer;
|
|
727
|
+
var lexer: typeof _Lexer.lex;
|
|
728
|
+
var Tokenizer: typeof _Tokenizer;
|
|
729
|
+
var Hooks: typeof _Hooks;
|
|
730
|
+
var parse: typeof marked;
|
|
731
|
+
}
|
|
732
|
+
export declare const options: (options: MarkedOptions) => typeof marked;
|
|
733
|
+
export declare const setOptions: (options: MarkedOptions) => typeof marked;
|
|
734
|
+
export declare const use: (...args: MarkedExtension[]) => typeof marked;
|
|
735
|
+
export declare const walkTokens: (tokens: Token[] | TokensList, callback: (token: Token) => MaybePromise | MaybePromise[]) => MaybePromise[];
|
|
736
|
+
export declare const parseInline: {
|
|
737
|
+
(src: string, options: MarkedOptions<string, string> & {
|
|
738
|
+
async: true;
|
|
739
|
+
}): Promise<string>;
|
|
740
|
+
(src: string, options: MarkedOptions<string, string> & {
|
|
741
|
+
async: false;
|
|
742
|
+
}): string;
|
|
743
|
+
(src: string, options?: MarkedOptions<string, string> | null | undefined): string | Promise<string>;
|
|
744
|
+
};
|
|
745
|
+
export declare const parse: typeof marked;
|
|
746
|
+
export declare const parser: typeof _Parser.parse;
|
|
747
|
+
export declare const lexer: typeof _Lexer.lex;
|
|
748
|
+
|
|
749
|
+
export {
|
|
750
|
+
_Hooks as Hooks,
|
|
751
|
+
_Lexer as Lexer,
|
|
752
|
+
_Parser as Parser,
|
|
753
|
+
_Renderer as Renderer,
|
|
754
|
+
_TextRenderer as TextRenderer,
|
|
755
|
+
_Tokenizer as Tokenizer,
|
|
756
|
+
_defaults as defaults,
|
|
757
|
+
_getDefaults as getDefaults,
|
|
758
|
+
};
|
|
759
|
+
|
|
760
|
+
export {};
|