@deepseek-harness-tui/dsh-tui 0.5.0
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/LICENSE +21 -0
- package/README.md +235 -0
- package/bin/dsh-tui.js +95 -0
- package/cordis.patch.yml +218 -0
- package/cordis.yml +185 -0
- package/lib/invariant.js +28 -0
- package/lib/types/activityPrefs.d.ts +29 -0
- package/lib/types/activityPrefs.d.ts.map +1 -0
- package/lib/types/activityPrefs.js +60 -0
- package/lib/types/bootstrap/state.d.ts +13 -0
- package/lib/types/bootstrap/state.d.ts.map +1 -0
- package/lib/types/bootstrap/state.js +12 -0
- package/lib/types/cc/cliHighlight.d.ts +20 -0
- package/lib/types/cc/cliHighlight.d.ts.map +1 -0
- package/lib/types/cc/cliHighlight.js +53 -0
- package/lib/types/cc/figures.d.ts +59 -0
- package/lib/types/cc/figures.d.ts.map +1 -0
- package/lib/types/cc/figures.js +69 -0
- package/lib/types/cc/format.d.ts +26 -0
- package/lib/types/cc/format.d.ts.map +1 -0
- package/lib/types/cc/format.js +55 -0
- package/lib/types/cc/hash.d.ts +25 -0
- package/lib/types/cc/hash.d.ts.map +1 -0
- package/lib/types/cc/hash.js +41 -0
- package/lib/types/cc/hyperlink.d.ts +21 -0
- package/lib/types/cc/hyperlink.d.ts.map +1 -0
- package/lib/types/cc/hyperlink.js +31 -0
- package/lib/types/cc/markdown.d.ts +43 -0
- package/lib/types/cc/markdown.d.ts.map +1 -0
- package/lib/types/cc/markdown.js +345 -0
- package/lib/types/cc/spinnerVerbs.d.ts +3 -0
- package/lib/types/cc/spinnerVerbs.d.ts.map +1 -0
- package/lib/types/cc/spinnerVerbs.js +190 -0
- package/lib/types/cc/terminal.d.ts +15 -0
- package/lib/types/cc/terminal.d.ts.map +1 -0
- package/lib/types/cc/terminal.js +84 -0
- package/lib/types/channel.d.ts +672 -0
- package/lib/types/channel.d.ts.map +1 -0
- package/lib/types/channel.js +2427 -0
- package/lib/types/childStderr.d.ts +63 -0
- package/lib/types/childStderr.d.ts.map +1 -0
- package/lib/types/childStderr.js +161 -0
- package/lib/types/commands.d.ts +55 -0
- package/lib/types/commands.d.ts.map +1 -0
- package/lib/types/commands.js +101 -0
- package/lib/types/components/ActivityLine.d.ts +29 -0
- package/lib/types/components/ActivityLine.d.ts.map +1 -0
- package/lib/types/components/ActivityLine.js +47 -0
- package/lib/types/components/ActivityPicker.d.ts +13 -0
- package/lib/types/components/ActivityPicker.d.ts.map +1 -0
- package/lib/types/components/ActivityPicker.js +24 -0
- package/lib/types/components/CommandSuggestions.d.ts +14 -0
- package/lib/types/components/CommandSuggestions.d.ts.map +1 -0
- package/lib/types/components/CommandSuggestions.js +33 -0
- package/lib/types/components/FileSuggestions.d.ts +12 -0
- package/lib/types/components/FileSuggestions.d.ts.map +1 -0
- package/lib/types/components/FileSuggestions.js +26 -0
- package/lib/types/components/GoalTodoPanel.d.ts +13 -0
- package/lib/types/components/GoalTodoPanel.d.ts.map +1 -0
- package/lib/types/components/GoalTodoPanel.js +57 -0
- package/lib/types/components/HelpMenu.d.ts +12 -0
- package/lib/types/components/HelpMenu.d.ts.map +1 -0
- package/lib/types/components/HelpMenu.js +12 -0
- package/lib/types/components/HistorySearchDialog.d.ts +16 -0
- package/lib/types/components/HistorySearchDialog.d.ts.map +1 -0
- package/lib/types/components/HistorySearchDialog.js +31 -0
- package/lib/types/components/InterruptedByUser.d.ts +7 -0
- package/lib/types/components/InterruptedByUser.d.ts.map +1 -0
- package/lib/types/components/InterruptedByUser.js +9 -0
- package/lib/types/components/LoadedContextPanel.d.ts +20 -0
- package/lib/types/components/LoadedContextPanel.d.ts.map +1 -0
- package/lib/types/components/LoadedContextPanel.js +30 -0
- package/lib/types/components/LogoV2.d.ts +23 -0
- package/lib/types/components/LogoV2.d.ts.map +1 -0
- package/lib/types/components/LogoV2.js +95 -0
- package/lib/types/components/Markdown.d.ts +24 -0
- package/lib/types/components/Markdown.d.ts.map +1 -0
- package/lib/types/components/Markdown.js +106 -0
- package/lib/types/components/MarkdownTable.d.ts +17 -0
- package/lib/types/components/MarkdownTable.d.ts.map +1 -0
- package/lib/types/components/MarkdownTable.js +272 -0
- package/lib/types/components/MessageList.d.ts +41 -0
- package/lib/types/components/MessageList.d.ts.map +1 -0
- package/lib/types/components/MessageList.js +303 -0
- package/lib/types/components/ModelPicker.d.ts +14 -0
- package/lib/types/components/ModelPicker.d.ts.map +1 -0
- package/lib/types/components/ModelPicker.js +15 -0
- package/lib/types/components/PresetPicker.d.ts +17 -0
- package/lib/types/components/PresetPicker.d.ts.map +1 -0
- package/lib/types/components/PresetPicker.js +25 -0
- package/lib/types/components/PromptInput.d.ts +67 -0
- package/lib/types/components/PromptInput.d.ts.map +1 -0
- package/lib/types/components/PromptInput.js +778 -0
- package/lib/types/components/ResumePicker.d.ts +15 -0
- package/lib/types/components/ResumePicker.d.ts.map +1 -0
- package/lib/types/components/ResumePicker.js +34 -0
- package/lib/types/components/RewindPicker.d.ts +14 -0
- package/lib/types/components/RewindPicker.d.ts.map +1 -0
- package/lib/types/components/RewindPicker.js +23 -0
- package/lib/types/components/SearchBox.d.ts +20 -0
- package/lib/types/components/SearchBox.d.ts.map +1 -0
- package/lib/types/components/SearchBox.js +33 -0
- package/lib/types/components/Select.d.ts +22 -0
- package/lib/types/components/Select.d.ts.map +1 -0
- package/lib/types/components/Select.js +19 -0
- package/lib/types/components/Spinner/GlimmerMessage.d.ts +19 -0
- package/lib/types/components/Spinner/GlimmerMessage.d.ts.map +1 -0
- package/lib/types/components/Spinner/GlimmerMessage.js +78 -0
- package/lib/types/components/Spinner/SpinnerAnimationRow.d.ts +31 -0
- package/lib/types/components/Spinner/SpinnerAnimationRow.d.ts.map +1 -0
- package/lib/types/components/Spinner/SpinnerAnimationRow.js +162 -0
- package/lib/types/components/Spinner/SpinnerGlyph.d.ts +16 -0
- package/lib/types/components/Spinner/SpinnerGlyph.d.ts.map +1 -0
- package/lib/types/components/Spinner/SpinnerGlyph.js +36 -0
- package/lib/types/components/Spinner/spinnerMode.d.ts +6 -0
- package/lib/types/components/Spinner/spinnerMode.d.ts.map +1 -0
- package/lib/types/components/Spinner/spinnerMode.js +1 -0
- package/lib/types/components/Spinner/spinnerUtils.d.ts +41 -0
- package/lib/types/components/Spinner/spinnerUtils.d.ts.map +1 -0
- package/lib/types/components/Spinner/spinnerUtils.js +104 -0
- package/lib/types/components/Spinner/useStalledAnimation.d.ts +16 -0
- package/lib/types/components/Spinner/useStalledAnimation.d.ts.map +1 -0
- package/lib/types/components/Spinner/useStalledAnimation.js +71 -0
- package/lib/types/components/StreamingMarkdown.d.ts +12 -0
- package/lib/types/components/StreamingMarkdown.d.ts.map +1 -0
- package/lib/types/components/StreamingMarkdown.js +39 -0
- package/lib/types/components/ThemePicker.d.ts +22 -0
- package/lib/types/components/ThemePicker.d.ts.map +1 -0
- package/lib/types/components/ThemePicker.js +51 -0
- package/lib/types/components/ThinkingToggle.d.ts +17 -0
- package/lib/types/components/ThinkingToggle.d.ts.map +1 -0
- package/lib/types/components/ThinkingToggle.js +30 -0
- package/lib/types/components/ToolUseLoader.d.ts +13 -0
- package/lib/types/components/ToolUseLoader.d.ts.map +1 -0
- package/lib/types/components/ToolUseLoader.js +17 -0
- package/lib/types/components/Whale.d.ts +22 -0
- package/lib/types/components/Whale.d.ts.map +1 -0
- package/lib/types/components/Whale.js +78 -0
- package/lib/types/components/WorkingSpinner.d.ts +26 -0
- package/lib/types/components/WorkingSpinner.d.ts.map +1 -0
- package/lib/types/components/WorkingSpinner.js +68 -0
- package/lib/types/components/activityFrames.d.ts +31 -0
- package/lib/types/components/activityFrames.d.ts.map +1 -0
- package/lib/types/components/activityFrames.js +83 -0
- package/lib/types/components/bigfont.d.ts +28 -0
- package/lib/types/components/bigfont.d.ts.map +1 -0
- package/lib/types/components/bigfont.js +91 -0
- package/lib/types/components/design-system/Byline.d.ts +14 -0
- package/lib/types/components/design-system/Byline.d.ts.map +1 -0
- package/lib/types/components/design-system/Byline.js +17 -0
- package/lib/types/components/design-system/Divider.d.ts +40 -0
- package/lib/types/components/design-system/Divider.d.ts.map +1 -0
- package/lib/types/components/design-system/Divider.js +24 -0
- package/lib/types/components/design-system/KeyboardShortcutHint.d.ts +19 -0
- package/lib/types/components/design-system/KeyboardShortcutHint.d.ts.map +1 -0
- package/lib/types/components/design-system/KeyboardShortcutHint.js +14 -0
- package/lib/types/components/design-system/ListItem.d.ts +36 -0
- package/lib/types/components/design-system/ListItem.d.ts.map +1 -0
- package/lib/types/components/design-system/ListItem.js +48 -0
- package/lib/types/components/design-system/LoadingState.d.ts +19 -0
- package/lib/types/components/design-system/LoadingState.d.ts.map +1 -0
- package/lib/types/components/design-system/LoadingState.js +22 -0
- package/lib/types/components/design-system/Pane.d.ts +17 -0
- package/lib/types/components/design-system/Pane.d.ts.map +1 -0
- package/lib/types/components/design-system/Pane.js +15 -0
- package/lib/types/components/design-system/ProgressBar.d.ts +22 -0
- package/lib/types/components/design-system/ProgressBar.d.ts.map +1 -0
- package/lib/types/components/design-system/ProgressBar.js +27 -0
- package/lib/types/components/design-system/StatusIcon.d.ts +15 -0
- package/lib/types/components/design-system/StatusIcon.d.ts.map +1 -0
- package/lib/types/components/design-system/StatusIcon.js +20 -0
- package/lib/types/components/design-system/ThemeProvider.d.ts +11 -0
- package/lib/types/components/design-system/ThemeProvider.d.ts.map +1 -0
- package/lib/types/components/design-system/ThemeProvider.js +135 -0
- package/lib/types/components/design-system/ThemedBox.d.ts +37 -0
- package/lib/types/components/design-system/ThemedBox.d.ts.map +1 -0
- package/lib/types/components/design-system/ThemedBox.js +26 -0
- package/lib/types/components/design-system/ThemedText.d.ts +56 -0
- package/lib/types/components/design-system/ThemedText.d.ts.map +1 -0
- package/lib/types/components/design-system/ThemedText.js +45 -0
- package/lib/types/components/messages/AssistantTextMessage.d.ts +18 -0
- package/lib/types/components/messages/AssistantTextMessage.d.ts.map +1 -0
- package/lib/types/components/messages/AssistantTextMessage.js +15 -0
- package/lib/types/components/messages/AssistantThinkingMessage.d.ts +23 -0
- package/lib/types/components/messages/AssistantThinkingMessage.d.ts.map +1 -0
- package/lib/types/components/messages/AssistantThinkingMessage.js +23 -0
- package/lib/types/components/messages/AssistantToolUseMessage.d.ts +23 -0
- package/lib/types/components/messages/AssistantToolUseMessage.d.ts.map +1 -0
- package/lib/types/components/messages/AssistantToolUseMessage.js +220 -0
- package/lib/types/components/messages/MessageMetadata.d.ts +15 -0
- package/lib/types/components/messages/MessageMetadata.d.ts.map +1 -0
- package/lib/types/components/messages/MessageMetadata.js +20 -0
- package/lib/types/components/messages/UserPromptMessage.d.ts +19 -0
- package/lib/types/components/messages/UserPromptMessage.d.ts.map +1 -0
- package/lib/types/components/messages/UserPromptMessage.js +15 -0
- package/lib/types/components/questions/AskUserQuestionPanel.d.ts +39 -0
- package/lib/types/components/questions/AskUserQuestionPanel.d.ts.map +1 -0
- package/lib/types/components/questions/AskUserQuestionPanel.js +228 -0
- package/lib/types/components/shimmer.d.ts +35 -0
- package/lib/types/components/shimmer.d.ts.map +1 -0
- package/lib/types/components/shimmer.js +43 -0
- package/lib/types/components/whaleFrames.d.ts +25 -0
- package/lib/types/components/whaleFrames.d.ts.map +1 -0
- package/lib/types/components/whaleFrames.js +419 -0
- package/lib/types/customTheme.d.ts +104 -0
- package/lib/types/customTheme.d.ts.map +1 -0
- package/lib/types/customTheme.js +268 -0
- package/lib/types/effortPrefs.d.ts +22 -0
- package/lib/types/effortPrefs.d.ts.map +1 -0
- package/lib/types/effortPrefs.js +45 -0
- package/lib/types/history.d.ts +24 -0
- package/lib/types/history.d.ts.map +1 -0
- package/lib/types/history.js +75 -0
- package/lib/types/hooks/useBlink.d.ts +11 -0
- package/lib/types/hooks/useBlink.d.ts.map +1 -0
- package/lib/types/hooks/useBlink.js +20 -0
- package/lib/types/i18n.d.ts +926 -0
- package/lib/types/i18n.d.ts.map +1 -0
- package/lib/types/i18n.js +356 -0
- package/lib/types/index.d.ts +70 -0
- package/lib/types/index.d.ts.map +1 -0
- package/lib/types/index.js +31 -0
- package/lib/types/ink/Ansi.d.ts +11 -0
- package/lib/types/ink/Ansi.d.ts.map +1 -0
- package/lib/types/ink/Ansi.js +269 -0
- package/lib/types/ink/bidi.d.ts +18 -0
- package/lib/types/ink/bidi.d.ts.map +1 -0
- package/lib/types/ink/bidi.js +119 -0
- package/lib/types/ink/clearTerminal.d.ts +22 -0
- package/lib/types/ink/clearTerminal.d.ts.map +1 -0
- package/lib/types/ink/clearTerminal.js +72 -0
- package/lib/types/ink/colorize.d.ts +33 -0
- package/lib/types/ink/colorize.d.ts.map +1 -0
- package/lib/types/ink/colorize.js +213 -0
- package/lib/types/ink/components/AlternateScreen.d.ts +22 -0
- package/lib/types/ink/components/AlternateScreen.d.ts.map +1 -0
- package/lib/types/ink/components/AlternateScreen.js +74 -0
- package/lib/types/ink/components/App.d.ts +73 -0
- package/lib/types/ink/components/App.d.ts.map +1 -0
- package/lib/types/ink/components/App.js +597 -0
- package/lib/types/ink/components/AppContext.d.ts +15 -0
- package/lib/types/ink/components/AppContext.d.ts.map +1 -0
- package/lib/types/ink/components/AppContext.js +11 -0
- package/lib/types/ink/components/Box.d.ts +49 -0
- package/lib/types/ink/components/Box.d.ts.map +1 -0
- package/lib/types/ink/components/Box.js +153 -0
- package/lib/types/ink/components/Button.d.ts +37 -0
- package/lib/types/ink/components/Button.d.ts.map +1 -0
- package/lib/types/ink/components/Button.js +166 -0
- package/lib/types/ink/components/ClockContext.d.ts +10 -0
- package/lib/types/ink/components/ClockContext.d.ts.map +1 -0
- package/lib/types/ink/components/ClockContext.js +108 -0
- package/lib/types/ink/components/CursorDeclarationContext.d.ts +30 -0
- package/lib/types/ink/components/CursorDeclarationContext.d.ts.map +1 -0
- package/lib/types/ink/components/CursorDeclarationContext.js +6 -0
- package/lib/types/ink/components/ErrorOverview.d.ts +7 -0
- package/lib/types/ink/components/ErrorOverview.d.ts.map +1 -0
- package/lib/types/ink/components/ErrorOverview.js +49 -0
- package/lib/types/ink/components/Link.d.ts +8 -0
- package/lib/types/ink/components/Link.d.ts.map +1 -0
- package/lib/types/ink/components/Link.js +33 -0
- package/lib/types/ink/components/Newline.d.ts +13 -0
- package/lib/types/ink/components/Newline.d.ts.map +1 -0
- package/lib/types/ink/components/Newline.js +29 -0
- package/lib/types/ink/components/NoSelect.d.ts +20 -0
- package/lib/types/ink/components/NoSelect.d.ts.map +1 -0
- package/lib/types/ink/components/NoSelect.js +56 -0
- package/lib/types/ink/components/RawAnsi.d.ts +17 -0
- package/lib/types/ink/components/RawAnsi.d.ts.map +1 -0
- package/lib/types/ink/components/RawAnsi.js +45 -0
- package/lib/types/ink/components/ScrollBox.d.ts +78 -0
- package/lib/types/ink/components/ScrollBox.d.ts.map +1 -0
- package/lib/types/ink/components/ScrollBox.js +174 -0
- package/lib/types/ink/components/Spacer.d.ts +6 -0
- package/lib/types/ink/components/Spacer.d.ts.map +1 -0
- package/lib/types/ink/components/Spacer.js +19 -0
- package/lib/types/ink/components/StdinContext.d.ts +32 -0
- package/lib/types/ink/components/StdinContext.d.ts.map +1 -0
- package/lib/types/ink/components/StdinContext.js +16 -0
- package/lib/types/ink/components/TerminalFocusContext.d.ts +11 -0
- package/lib/types/ink/components/TerminalFocusContext.d.ts.map +1 -0
- package/lib/types/ink/components/TerminalFocusContext.js +45 -0
- package/lib/types/ink/components/TerminalSizeContext.d.ts +6 -0
- package/lib/types/ink/components/TerminalSizeContext.d.ts.map +1 -0
- package/lib/types/ink/components/TerminalSizeContext.js +3 -0
- package/lib/types/ink/components/Text.d.ts +56 -0
- package/lib/types/ink/components/Text.d.ts.map +1 -0
- package/lib/types/ink/components/Text.js +194 -0
- package/lib/types/ink/constants.d.ts +3 -0
- package/lib/types/ink/constants.d.ts.map +1 -0
- package/lib/types/ink/constants.js +2 -0
- package/lib/types/ink/cursor.d.ts +11 -0
- package/lib/types/ink/cursor.d.ts.map +1 -0
- package/lib/types/ink/cursor.js +1 -0
- package/lib/types/ink/devtools.d.ts +7 -0
- package/lib/types/ink/devtools.d.ts.map +1 -0
- package/lib/types/ink/devtools.js +1 -0
- package/lib/types/ink/dom.d.ts +178 -0
- package/lib/types/ink/dom.d.ts.map +1 -0
- package/lib/types/ink/dom.js +424 -0
- package/lib/types/ink/events/click-event.d.ts +32 -0
- package/lib/types/ink/events/click-event.d.ts.map +1 -0
- package/lib/types/ink/events/click-event.js +36 -0
- package/lib/types/ink/events/dispatcher.d.ts +63 -0
- package/lib/types/ink/events/dispatcher.d.ts.map +1 -0
- package/lib/types/ink/events/dispatcher.js +194 -0
- package/lib/types/ink/events/emitter.d.ts +20 -0
- package/lib/types/ink/events/emitter.d.ts.map +1 -0
- package/lib/types/ink/events/emitter.js +43 -0
- package/lib/types/ink/events/event-handlers.d.ts +47 -0
- package/lib/types/ink/events/event-handlers.d.ts.map +1 -0
- package/lib/types/ink/events/event-handlers.js +30 -0
- package/lib/types/ink/events/event.d.ts +19 -0
- package/lib/types/ink/events/event.d.ts.map +1 -0
- package/lib/types/ink/events/event.js +22 -0
- package/lib/types/ink/events/focus-event.d.ts +19 -0
- package/lib/types/ink/events/focus-event.d.ts.map +1 -0
- package/lib/types/ink/events/focus-event.js +21 -0
- package/lib/types/ink/events/input-event.d.ts +53 -0
- package/lib/types/ink/events/input-event.d.ts.map +1 -0
- package/lib/types/ink/events/input-event.js +180 -0
- package/lib/types/ink/events/keyboard-event.d.ts +40 -0
- package/lib/types/ink/events/keyboard-event.d.ts.map +1 -0
- package/lib/types/ink/events/keyboard-event.js +65 -0
- package/lib/types/ink/events/paste-event.d.ts +11 -0
- package/lib/types/ink/events/paste-event.d.ts.map +1 -0
- package/lib/types/ink/events/paste-event.js +13 -0
- package/lib/types/ink/events/resize-event.d.ts +13 -0
- package/lib/types/ink/events/resize-event.d.ts.map +1 -0
- package/lib/types/ink/events/resize-event.js +16 -0
- package/lib/types/ink/events/terminal-event.d.ts +112 -0
- package/lib/types/ink/events/terminal-event.d.ts.map +1 -0
- package/lib/types/ink/events/terminal-event.js +131 -0
- package/lib/types/ink/events/terminal-focus-event.d.ts +21 -0
- package/lib/types/ink/events/terminal-focus-event.d.ts.map +1 -0
- package/lib/types/ink/events/terminal-focus-event.js +18 -0
- package/lib/types/ink/focus.d.ts +74 -0
- package/lib/types/ink/focus.d.ts.map +1 -0
- package/lib/types/ink/focus.js +188 -0
- package/lib/types/ink/frame.d.ts +119 -0
- package/lib/types/ink/frame.d.ts.map +1 -0
- package/lib/types/ink/frame.js +43 -0
- package/lib/types/ink/get-max-width.d.ts +20 -0
- package/lib/types/ink/get-max-width.d.ts.map +1 -0
- package/lib/types/ink/get-max-width.js +25 -0
- package/lib/types/ink/hit-test.d.ts +47 -0
- package/lib/types/ink/hit-test.d.ts.map +1 -0
- package/lib/types/ink/hit-test.js +126 -0
- package/lib/types/ink/hooks/use-animation-frame.d.ts +27 -0
- package/lib/types/ink/hooks/use-animation-frame.d.ts.map +1 -0
- package/lib/types/ink/hooks/use-animation-frame.js +48 -0
- package/lib/types/ink/hooks/use-app.d.ts +8 -0
- package/lib/types/ink/hooks/use-app.d.ts.map +1 -0
- package/lib/types/ink/hooks/use-app.js +8 -0
- package/lib/types/ink/hooks/use-copy-on-select.d.ts +22 -0
- package/lib/types/ink/hooks/use-copy-on-select.d.ts.map +1 -0
- package/lib/types/ink/hooks/use-copy-on-select.js +40 -0
- package/lib/types/ink/hooks/use-declared-cursor.d.ts +31 -0
- package/lib/types/ink/hooks/use-declared-cursor.d.ts.map +1 -0
- package/lib/types/ink/hooks/use-declared-cursor.js +65 -0
- package/lib/types/ink/hooks/use-input.d.ts +41 -0
- package/lib/types/ink/hooks/use-input.d.ts.map +1 -0
- package/lib/types/ink/hooks/use-input.js +73 -0
- package/lib/types/ink/hooks/use-interval.d.ts +23 -0
- package/lib/types/ink/hooks/use-interval.d.ts.map +1 -0
- package/lib/types/ink/hooks/use-interval.js +58 -0
- package/lib/types/ink/hooks/use-search-highlight.d.ts +34 -0
- package/lib/types/ink/hooks/use-search-highlight.d.ts.map +1 -0
- package/lib/types/ink/hooks/use-search-highlight.js +35 -0
- package/lib/types/ink/hooks/use-selection.d.ts +44 -0
- package/lib/types/ink/hooks/use-selection.d.ts.map +1 -0
- package/lib/types/ink/hooks/use-selection.js +64 -0
- package/lib/types/ink/hooks/use-stdin.d.ts +8 -0
- package/lib/types/ink/hooks/use-stdin.d.ts.map +1 -0
- package/lib/types/ink/hooks/use-stdin.js +8 -0
- package/lib/types/ink/hooks/use-tab-status.d.ts +18 -0
- package/lib/types/ink/hooks/use-tab-status.d.ts.map +1 -0
- package/lib/types/ink/hooks/use-tab-status.js +58 -0
- package/lib/types/ink/hooks/use-terminal-focus.d.ts +11 -0
- package/lib/types/ink/hooks/use-terminal-focus.d.ts.map +1 -0
- package/lib/types/ink/hooks/use-terminal-focus.js +15 -0
- package/lib/types/ink/hooks/use-terminal-size.d.ts +6 -0
- package/lib/types/ink/hooks/use-terminal-size.d.ts.map +1 -0
- package/lib/types/ink/hooks/use-terminal-size.js +12 -0
- package/lib/types/ink/hooks/use-terminal-title.d.ts +14 -0
- package/lib/types/ink/hooks/use-terminal-title.d.ts.map +1 -0
- package/lib/types/ink/hooks/use-terminal-title.js +30 -0
- package/lib/types/ink/hooks/use-terminal-viewport.d.ts +32 -0
- package/lib/types/ink/hooks/use-terminal-viewport.d.ts.map +1 -0
- package/lib/types/ink/hooks/use-terminal-viewport.js +79 -0
- package/lib/types/ink/ink.d.ts +370 -0
- package/lib/types/ink/ink.d.ts.map +1 -0
- package/lib/types/ink/ink.js +1665 -0
- package/lib/types/ink/instances.d.ts +10 -0
- package/lib/types/ink/instances.d.ts.map +1 -0
- package/lib/types/ink/instances.js +13 -0
- package/lib/types/ink/layout/engine.d.ts +7 -0
- package/lib/types/ink/layout/engine.d.ts.map +1 -0
- package/lib/types/ink/layout/engine.js +8 -0
- package/lib/types/ink/layout/geometry.d.ts +86 -0
- package/lib/types/ink/layout/geometry.d.ts.map +1 -0
- package/lib/types/ink/layout/geometry.js +95 -0
- package/lib/types/ink/layout/node.d.ts +151 -0
- package/lib/types/ink/layout/node.d.ts.map +1 -0
- package/lib/types/ink/layout/node.js +72 -0
- package/lib/types/ink/layout/yoga.d.ts +69 -0
- package/lib/types/ink/layout/yoga.d.ts.map +1 -0
- package/lib/types/ink/layout/yoga.js +249 -0
- package/lib/types/ink/line-width-cache.d.ts +9 -0
- package/lib/types/ink/line-width-cache.d.ts.map +1 -0
- package/lib/types/ink/line-width-cache.js +45 -0
- package/lib/types/ink/log-update.d.ts +57 -0
- package/lib/types/ink/log-update.d.ts.map +1 -0
- package/lib/types/ink/log-update.js +710 -0
- package/lib/types/ink/measure-element.d.ts +19 -0
- package/lib/types/ink/measure-element.d.ts.map +1 -0
- package/lib/types/ink/measure-element.js +10 -0
- package/lib/types/ink/measure-text.d.ts +13 -0
- package/lib/types/ink/measure-text.d.ts.map +1 -0
- package/lib/types/ink/measure-text.js +38 -0
- package/lib/types/ink/node-cache.d.ts +33 -0
- package/lib/types/ink/node-cache.d.ts.map +1 -0
- package/lib/types/ink/node-cache.js +42 -0
- package/lib/types/ink/optimizer.d.ts +18 -0
- package/lib/types/ink/optimizer.d.ts.map +1 -0
- package/lib/types/ink/optimizer.js +83 -0
- package/lib/types/ink/output.d.ts +200 -0
- package/lib/types/ink/output.d.ts.map +1 -0
- package/lib/types/ink/output.js +663 -0
- package/lib/types/ink/parse-keypress.d.ts +132 -0
- package/lib/types/ink/parse-keypress.d.ts.map +1 -0
- package/lib/types/ink/parse-keypress.js +707 -0
- package/lib/types/ink/reconciler.d.ts +43 -0
- package/lib/types/ink/reconciler.d.ts.map +1 -0
- package/lib/types/ink/reconciler.js +413 -0
- package/lib/types/ink/render-border.d.ts +36 -0
- package/lib/types/ink/render-border.d.ts.map +1 -0
- package/lib/types/ink/render-border.js +143 -0
- package/lib/types/ink/render-node-to-output.d.ts +93 -0
- package/lib/types/ink/render-node-to-output.d.ts.map +1 -0
- package/lib/types/ink/render-node-to-output.js +1290 -0
- package/lib/types/ink/render-to-screen.d.ts +65 -0
- package/lib/types/ink/render-to-screen.d.ts.map +1 -0
- package/lib/types/ink/render-to-screen.js +189 -0
- package/lib/types/ink/renderer.d.ts +24 -0
- package/lib/types/ink/renderer.d.ts.map +1 -0
- package/lib/types/ink/renderer.js +136 -0
- package/lib/types/ink/root.d.ts +91 -0
- package/lib/types/ink/root.d.ts.map +1 -0
- package/lib/types/ink/root.js +93 -0
- package/lib/types/ink/screen.d.ts +443 -0
- package/lib/types/ink/screen.d.ts.map +1 -0
- package/lib/types/ink/screen.js +1295 -0
- package/lib/types/ink/searchHighlight.d.ts +25 -0
- package/lib/types/ink/searchHighlight.d.ts.map +1 -0
- package/lib/types/ink/searchHighlight.js +82 -0
- package/lib/types/ink/selection.d.ts +323 -0
- package/lib/types/ink/selection.d.ts.map +1 -0
- package/lib/types/ink/selection.js +881 -0
- package/lib/types/ink/squash-text-nodes.d.ts +30 -0
- package/lib/types/ink/squash-text-nodes.d.ts.map +1 -0
- package/lib/types/ink/squash-text-nodes.js +63 -0
- package/lib/types/ink/stringWidth.d.ts +11 -0
- package/lib/types/ink/stringWidth.d.ts.map +1 -0
- package/lib/types/ink/stringWidth.js +209 -0
- package/lib/types/ink/styles.d.ts +324 -0
- package/lib/types/ink/styles.d.ts.map +1 -0
- package/lib/types/ink/styles.js +307 -0
- package/lib/types/ink/supports-hyperlinks.d.ts +20 -0
- package/lib/types/ink/supports-hyperlinks.d.ts.map +1 -0
- package/lib/types/ink/supports-hyperlinks.js +44 -0
- package/lib/types/ink/tabstops.d.ts +9 -0
- package/lib/types/ink/tabstops.d.ts.map +1 -0
- package/lib/types/ink/tabstops.js +46 -0
- package/lib/types/ink/terminal-focus-state.d.ts +35 -0
- package/lib/types/ink/terminal-focus-state.d.ts.map +1 -0
- package/lib/types/ink/terminal-focus-state.js +57 -0
- package/lib/types/ink/terminal-querier.d.ts +161 -0
- package/lib/types/ink/terminal-querier.d.ts.map +1 -0
- package/lib/types/ink/terminal-querier.js +204 -0
- package/lib/types/ink/terminal.d.ts +80 -0
- package/lib/types/ink/terminal.d.ts.map +1 -0
- package/lib/types/ink/terminal.js +268 -0
- package/lib/types/ink/termio/ansi.d.ts +75 -0
- package/lib/types/ink/termio/ansi.d.ts.map +1 -0
- package/lib/types/ink/termio/ansi.js +79 -0
- package/lib/types/ink/termio/csi.d.ts +253 -0
- package/lib/types/ink/termio/csi.d.ts.map +1 -0
- package/lib/types/ink/termio/csi.js +347 -0
- package/lib/types/ink/termio/dec.d.ts +61 -0
- package/lib/types/ink/termio/dec.d.ts.map +1 -0
- package/lib/types/ink/termio/dec.js +76 -0
- package/lib/types/ink/termio/esc.d.ts +15 -0
- package/lib/types/ink/termio/esc.d.ts.map +1 -0
- package/lib/types/ink/termio/esc.js +57 -0
- package/lib/types/ink/termio/osc.d.ts +208 -0
- package/lib/types/ink/termio/osc.d.ts.map +1 -0
- package/lib/types/ink/termio/osc.js +466 -0
- package/lib/types/ink/termio/parser.d.ts +46 -0
- package/lib/types/ink/termio/parser.d.ts.map +1 -0
- package/lib/types/ink/termio/parser.js +366 -0
- package/lib/types/ink/termio/sgr.d.ts +17 -0
- package/lib/types/ink/termio/sgr.d.ts.map +1 -0
- package/lib/types/ink/termio/sgr.js +300 -0
- package/lib/types/ink/termio/tokenize.d.ts +50 -0
- package/lib/types/ink/termio/tokenize.d.ts.map +1 -0
- package/lib/types/ink/termio/tokenize.js +266 -0
- package/lib/types/ink/termio/types.d.ts +211 -0
- package/lib/types/ink/termio/types.d.ts.map +1 -0
- package/lib/types/ink/termio/types.js +68 -0
- package/lib/types/ink/termio.d.ts +25 -0
- package/lib/types/ink/termio.d.ts.map +1 -0
- package/lib/types/ink/termio.js +24 -0
- package/lib/types/ink/truncateToWidth.d.ts +7 -0
- package/lib/types/ink/truncateToWidth.d.ts.map +1 -0
- package/lib/types/ink/truncateToWidth.js +18 -0
- package/lib/types/ink/useTerminalNotification.d.ts +45 -0
- package/lib/types/ink/useTerminalNotification.d.ts.map +1 -0
- package/lib/types/ink/useTerminalNotification.js +70 -0
- package/lib/types/ink/warn.d.ts +7 -0
- package/lib/types/ink/warn.d.ts.map +1 -0
- package/lib/types/ink/warn.js +15 -0
- package/lib/types/ink/widest-line.d.ts +7 -0
- package/lib/types/ink/widest-line.d.ts.map +1 -0
- package/lib/types/ink/widest-line.js +19 -0
- package/lib/types/ink/wrap-text.d.ts +10 -0
- package/lib/types/ink/wrap-text.d.ts.map +1 -0
- package/lib/types/ink/wrap-text.js +61 -0
- package/lib/types/ink/wrapAnsi.d.ts +18 -0
- package/lib/types/ink/wrapAnsi.d.ts.map +1 -0
- package/lib/types/ink/wrapAnsi.js +16 -0
- package/lib/types/invariant.d.ts +20 -0
- package/lib/types/invariant.d.ts.map +1 -0
- package/lib/types/invariant.js +26 -0
- package/lib/types/modelPrefs.d.ts +37 -0
- package/lib/types/modelPrefs.d.ts.map +1 -0
- package/lib/types/modelPrefs.js +66 -0
- package/lib/types/modelRoute.d.ts +79 -0
- package/lib/types/modelRoute.d.ts.map +1 -0
- package/lib/types/modelRoute.js +96 -0
- package/lib/types/native-ts/yoga-layout/enums.d.ts +183 -0
- package/lib/types/native-ts/yoga-layout/enums.d.ts.map +1 -0
- package/lib/types/native-ts/yoga-layout/enums.js +150 -0
- package/lib/types/native-ts/yoga-layout/index.d.ts +788 -0
- package/lib/types/native-ts/yoga-layout/index.d.ts.map +1 -0
- package/lib/types/native-ts/yoga-layout/index.js +2571 -0
- package/lib/types/packaged-skills.d.ts +10 -0
- package/lib/types/packaged-skills.d.ts.map +1 -0
- package/lib/types/packaged-skills.js +63 -0
- package/lib/types/plugin.d.ts +33 -0
- package/lib/types/plugin.d.ts.map +1 -0
- package/lib/types/plugin.js +454 -0
- package/lib/types/presetPrefs.d.ts +29 -0
- package/lib/types/presetPrefs.d.ts.map +1 -0
- package/lib/types/presetPrefs.js +61 -0
- package/lib/types/presets.d.ts +110 -0
- package/lib/types/presets.d.ts.map +1 -0
- package/lib/types/presets.js +114 -0
- package/lib/types/questions.d.ts +97 -0
- package/lib/types/questions.d.ts.map +1 -0
- package/lib/types/questions.js +201 -0
- package/lib/types/screens/Chat.d.ts +23 -0
- package/lib/types/screens/Chat.d.ts.map +1 -0
- package/lib/types/screens/Chat.js +1263 -0
- package/lib/types/screens/StatusLine.d.ts +16 -0
- package/lib/types/screens/StatusLine.d.ts.map +1 -0
- package/lib/types/screens/StatusLine.js +105 -0
- package/lib/types/screens/StatusMetrics.d.ts +87 -0
- package/lib/types/screens/StatusMetrics.d.ts.map +1 -0
- package/lib/types/screens/StatusMetrics.js +252 -0
- package/lib/types/sessionHistory.d.ts +32 -0
- package/lib/types/sessionHistory.d.ts.map +1 -0
- package/lib/types/sessionHistory.js +87 -0
- package/lib/types/theme.d.ts +115 -0
- package/lib/types/theme.d.ts.map +1 -0
- package/lib/types/theme.js +300 -0
- package/lib/types/themePrefs.d.ts +28 -0
- package/lib/types/themePrefs.d.ts.map +1 -0
- package/lib/types/themePrefs.js +59 -0
- package/lib/types/ui.d.ts +28 -0
- package/lib/types/ui.d.ts.map +1 -0
- package/lib/types/ui.js +25 -0
- package/lib/types/update.d.ts +76 -0
- package/lib/types/update.d.ts.map +1 -0
- package/lib/types/update.js +203 -0
- package/lib/types/utils/clipboard.d.ts +43 -0
- package/lib/types/utils/clipboard.d.ts.map +1 -0
- package/lib/types/utils/clipboard.js +82 -0
- package/lib/types/utils/debug.d.ts +8 -0
- package/lib/types/utils/debug.d.ts.map +1 -0
- package/lib/types/utils/debug.js +12 -0
- package/lib/types/utils/earlyInput.d.ts +7 -0
- package/lib/types/utils/earlyInput.d.ts.map +1 -0
- package/lib/types/utils/earlyInput.js +6 -0
- package/lib/types/utils/env.d.ts +10 -0
- package/lib/types/utils/env.d.ts.map +1 -0
- package/lib/types/utils/env.js +9 -0
- package/lib/types/utils/envUtils.d.ts +8 -0
- package/lib/types/utils/envUtils.d.ts.map +1 -0
- package/lib/types/utils/envUtils.js +13 -0
- package/lib/types/utils/execFileNoThrow.d.ts +34 -0
- package/lib/types/utils/execFileNoThrow.d.ts.map +1 -0
- package/lib/types/utils/execFileNoThrow.js +31 -0
- package/lib/types/utils/fullscreen.d.ts +8 -0
- package/lib/types/utils/fullscreen.d.ts.map +1 -0
- package/lib/types/utils/fullscreen.js +10 -0
- package/lib/types/utils/intl.d.ts +7 -0
- package/lib/types/utils/intl.d.ts.map +1 -0
- package/lib/types/utils/intl.js +9 -0
- package/lib/types/utils/loaded-context.d.ts +20 -0
- package/lib/types/utils/loaded-context.d.ts.map +1 -0
- package/lib/types/utils/loaded-context.js +36 -0
- package/lib/types/utils/log.d.ts +7 -0
- package/lib/types/utils/log.d.ts.map +1 -0
- package/lib/types/utils/log.js +9 -0
- package/lib/types/utils/mentions.d.ts +30 -0
- package/lib/types/utils/mentions.d.ts.map +1 -0
- package/lib/types/utils/mentions.js +72 -0
- package/lib/types/utils/narration.d.ts +11 -0
- package/lib/types/utils/narration.d.ts.map +1 -0
- package/lib/types/utils/narration.js +16 -0
- package/lib/types/utils/semver.d.ts +9 -0
- package/lib/types/utils/semver.d.ts.map +1 -0
- package/lib/types/utils/semver.js +24 -0
- package/lib/types/utils/sliceAnsi.d.ts +12 -0
- package/lib/types/utils/sliceAnsi.d.ts.map +1 -0
- package/lib/types/utils/sliceAnsi.js +79 -0
- package/lib/types/working-activity.d.ts +19 -0
- package/lib/types/working-activity.d.ts.map +1 -0
- package/lib/types/working-activity.js +18 -0
- package/package.json +141 -0
- package/skills/audit/SKILL.md +24 -0
- package/skills/bug/SKILL.md +27 -0
- package/skills/pr-comments/SKILL.md +20 -0
- package/skills/practice/SKILL.md +22 -0
- package/skills/release-notes/SKILL.md +25 -0
- package/skills/review/SKILL.md +25 -0
- package/skills/vuln-check/SKILL.md +25 -0
|
@@ -0,0 +1,788 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pure-TypeScript port of yoga-layout (Meta's flexbox engine).
|
|
3
|
+
*
|
|
4
|
+
* This matches the `yoga-layout/load` API surface used by src/ink/layout/yoga.ts.
|
|
5
|
+
* The upstream C++ source is ~2500 lines in CalculateLayout.cpp alone; this port
|
|
6
|
+
* is a simplified single-pass flexbox implementation that covers the subset of
|
|
7
|
+
* features Ink actually uses:
|
|
8
|
+
* - flex-direction (row/column + reverse)
|
|
9
|
+
* - flex-grow / flex-shrink / flex-basis
|
|
10
|
+
* - align-items / align-self (stretch, flex-start, center, flex-end)
|
|
11
|
+
* - justify-content (all six values)
|
|
12
|
+
* - margin / padding / border / gap
|
|
13
|
+
* - width / height / min / max (point, percent, auto)
|
|
14
|
+
* - position: relative / absolute
|
|
15
|
+
* - display: flex / none
|
|
16
|
+
* - measure functions (for text nodes)
|
|
17
|
+
*
|
|
18
|
+
* Also implemented for spec parity (not used by Ink):
|
|
19
|
+
* - margin: auto (main + cross axis, overrides justify/align)
|
|
20
|
+
* - multi-pass flex clamping when children hit min/max constraints
|
|
21
|
+
* - flex-grow/shrink against container min/max when size is indefinite
|
|
22
|
+
*
|
|
23
|
+
* Also implemented for spec parity (not used by Ink):
|
|
24
|
+
* - flex-wrap: wrap / wrap-reverse (multi-line flex)
|
|
25
|
+
* - align-content (positions wrapped lines on cross axis)
|
|
26
|
+
*
|
|
27
|
+
* Also implemented for spec parity (not used by Ink):
|
|
28
|
+
* - display: contents (children lifted to grandparent, box removed)
|
|
29
|
+
*
|
|
30
|
+
* Also implemented for spec parity (not used by Ink):
|
|
31
|
+
* - baseline alignment (align-items/align-self: baseline)
|
|
32
|
+
*
|
|
33
|
+
* Not implemented (not used by Ink):
|
|
34
|
+
* - aspect-ratio
|
|
35
|
+
* - box-sizing: content-box
|
|
36
|
+
* - RTL direction (Ink always passes Direction.LTR)
|
|
37
|
+
*
|
|
38
|
+
* Upstream: https://github.com/facebook/yoga
|
|
39
|
+
*/
|
|
40
|
+
import { Align, BoxSizing, Dimension, Direction, Display, Edge, Errata, ExperimentalFeature, FlexDirection, Gutter, Justify, MeasureMode, Overflow, PositionType, Unit, Wrap } from './enums.js';
|
|
41
|
+
export { Align, BoxSizing, Dimension, Direction, Display, Edge, Errata, ExperimentalFeature, FlexDirection, Gutter, Justify, MeasureMode, Overflow, PositionType, Unit, Wrap, };
|
|
42
|
+
/**
|
|
43
|
+
* A dimension value: a unit kind plus a numeric value. The numeric value is
|
|
44
|
+
* NaN when the unit is undefined or auto.
|
|
45
|
+
*/
|
|
46
|
+
export type Value = {
|
|
47
|
+
unit: Unit;
|
|
48
|
+
value: number;
|
|
49
|
+
};
|
|
50
|
+
type Layout = {
|
|
51
|
+
left: number;
|
|
52
|
+
top: number;
|
|
53
|
+
width: number;
|
|
54
|
+
height: number;
|
|
55
|
+
border: [number, number, number, number];
|
|
56
|
+
padding: [number, number, number, number];
|
|
57
|
+
margin: [number, number, number, number];
|
|
58
|
+
};
|
|
59
|
+
type Style = {
|
|
60
|
+
direction: Direction;
|
|
61
|
+
flexDirection: FlexDirection;
|
|
62
|
+
justifyContent: Justify;
|
|
63
|
+
alignItems: Align;
|
|
64
|
+
alignSelf: Align;
|
|
65
|
+
alignContent: Align;
|
|
66
|
+
flexWrap: Wrap;
|
|
67
|
+
overflow: Overflow;
|
|
68
|
+
display: Display;
|
|
69
|
+
positionType: PositionType;
|
|
70
|
+
flexGrow: number;
|
|
71
|
+
flexShrink: number;
|
|
72
|
+
flexBasis: Value;
|
|
73
|
+
margin: Value[];
|
|
74
|
+
padding: Value[];
|
|
75
|
+
border: Value[];
|
|
76
|
+
position: Value[];
|
|
77
|
+
gap: Value[];
|
|
78
|
+
width: Value;
|
|
79
|
+
height: Value;
|
|
80
|
+
minWidth: Value;
|
|
81
|
+
minHeight: Value;
|
|
82
|
+
maxWidth: Value;
|
|
83
|
+
maxHeight: Value;
|
|
84
|
+
};
|
|
85
|
+
/**
|
|
86
|
+
* Measure function for text-like leaf nodes. Receives the available width
|
|
87
|
+
* and height with their measure modes and returns the measured content size.
|
|
88
|
+
*/
|
|
89
|
+
export type MeasureFunction = (width: number, widthMode: MeasureMode, height: number, heightMode: MeasureMode) => {
|
|
90
|
+
width: number;
|
|
91
|
+
height: number;
|
|
92
|
+
};
|
|
93
|
+
/** A two-dimensional size in pixels. */
|
|
94
|
+
export type Size = {
|
|
95
|
+
width: number;
|
|
96
|
+
height: number;
|
|
97
|
+
};
|
|
98
|
+
/**
|
|
99
|
+
* Yoga configuration: point scale factor, errata flags, and web-default
|
|
100
|
+
* behavior. Mirrors the yoga-layout/load Config API.
|
|
101
|
+
*/
|
|
102
|
+
export type Config = {
|
|
103
|
+
pointScaleFactor: number;
|
|
104
|
+
errata: Errata;
|
|
105
|
+
useWebDefaults: boolean;
|
|
106
|
+
free(): void;
|
|
107
|
+
isExperimentalFeatureEnabled(_: ExperimentalFeature): boolean;
|
|
108
|
+
setExperimentalFeatureEnabled(_: ExperimentalFeature, __: boolean): void;
|
|
109
|
+
setPointScaleFactor(factor: number): void;
|
|
110
|
+
getErrata(): Errata;
|
|
111
|
+
setErrata(errata: Errata): void;
|
|
112
|
+
setUseWebDefaults(v: boolean): void;
|
|
113
|
+
};
|
|
114
|
+
/**
|
|
115
|
+
* A node in the flexbox layout tree. Holds style inputs, computed layout
|
|
116
|
+
* results, the parent/children tree, and layout caches. Mirrors the
|
|
117
|
+
* yoga-layout/load Node API.
|
|
118
|
+
*/
|
|
119
|
+
export declare class Node {
|
|
120
|
+
/** The node's input style values. */
|
|
121
|
+
style: Style;
|
|
122
|
+
/** The node's computed layout result: position, size, and resolved border, padding, and margin. */
|
|
123
|
+
layout: Layout;
|
|
124
|
+
/** The parent node, or null for a root node. */
|
|
125
|
+
parent: Node | null;
|
|
126
|
+
/** Child nodes in insertion order. */
|
|
127
|
+
children: Node[];
|
|
128
|
+
/** Measure function for text-like leaf nodes, or null when unset. */
|
|
129
|
+
measureFunc: MeasureFunction | null;
|
|
130
|
+
/** The config this node was created with. */
|
|
131
|
+
config: Config;
|
|
132
|
+
/** Whether this node or its subtree changed since the last layout. */
|
|
133
|
+
isDirty_: boolean;
|
|
134
|
+
/** Whether this node is its parent's baseline reference. */
|
|
135
|
+
isReferenceBaseline_: boolean;
|
|
136
|
+
/**
|
|
137
|
+
* Per-layout scratch (not public API)
|
|
138
|
+
* Flex-basis of this node for the current layout pass.
|
|
139
|
+
*/
|
|
140
|
+
_flexBasis: number;
|
|
141
|
+
/** Main size of this node for the current layout pass. */
|
|
142
|
+
_mainSize: number;
|
|
143
|
+
/** Cross size of this node for the current layout pass. */
|
|
144
|
+
_crossSize: number;
|
|
145
|
+
/** Index of the flex line this node was placed on. */
|
|
146
|
+
_lineIndex: number;
|
|
147
|
+
/**
|
|
148
|
+
* Whether any margin edge is auto. Fast-path flag maintained by style
|
|
149
|
+
* setters. Per CPU profile, the positioning loop calls isMarginAuto 6× and
|
|
150
|
+
* resolveEdgeRaw(position) 4× per child per layout pass — ~11k calls for
|
|
151
|
+
* the 1000-node bench, nearly all of which return false/undefined since
|
|
152
|
+
* most nodes have no auto margins and no position insets. These flags let
|
|
153
|
+
* us skip straight to the common case with a single branch.
|
|
154
|
+
*/
|
|
155
|
+
_hasAutoMargin: boolean;
|
|
156
|
+
/** Whether any position inset is set. */
|
|
157
|
+
_hasPosition: boolean;
|
|
158
|
+
/**
|
|
159
|
+
* Whether any padding edge is set. Same pattern for the 3× resolveEdges4Into
|
|
160
|
+
* calls at the top of every layoutNode(). In the 1000-node bench ~67% of
|
|
161
|
+
* those calls operate on all-undefined edge arrays (most nodes have no
|
|
162
|
+
* border; only cols have padding; only leaf cells have margin) — a
|
|
163
|
+
* single-branch skip beats ~20 property reads + ~15 compares + 4 writes of
|
|
164
|
+
* zeros.
|
|
165
|
+
*/
|
|
166
|
+
_hasPadding: boolean;
|
|
167
|
+
/** Whether any border edge is set. */
|
|
168
|
+
_hasBorder: boolean;
|
|
169
|
+
/** Whether any margin edge is set. */
|
|
170
|
+
_hasMargin: boolean;
|
|
171
|
+
/**
|
|
172
|
+
* Cached available width of the last layout call. Dirty-flag layout cache:
|
|
173
|
+
* mirrors upstream CalculateLayout.cpp's layoutNodeInternal, skipping a
|
|
174
|
+
* subtree entirely when it's clean and we're asking the same question we
|
|
175
|
+
* cached the answer to. Two slots since each node typically sees a measure
|
|
176
|
+
* call (performLayout=false, from computeFlexBasis) followed by a layout
|
|
177
|
+
* call (performLayout=true) with different inputs per parent pass — a
|
|
178
|
+
* single slot thrashes. Re-layout bench (dirty one leaf, recompute root)
|
|
179
|
+
* went 2.7x→1.1x with this: clean siblings skip straight through, only the
|
|
180
|
+
* dirty chain recomputes.
|
|
181
|
+
*/
|
|
182
|
+
_lW: number;
|
|
183
|
+
/** Cached available height of the last layout call. */
|
|
184
|
+
_lH: number;
|
|
185
|
+
/** Cached width measure mode of the last layout call. */
|
|
186
|
+
_lWM: MeasureMode;
|
|
187
|
+
/** Cached height measure mode of the last layout call. */
|
|
188
|
+
_lHM: MeasureMode;
|
|
189
|
+
/** Cached owner width of the last layout call. */
|
|
190
|
+
_lOW: number;
|
|
191
|
+
/** Cached owner height of the last layout call. */
|
|
192
|
+
_lOH: number;
|
|
193
|
+
/** Whether width was forced on the last layout call. */
|
|
194
|
+
_lFW: boolean;
|
|
195
|
+
/** Whether height was forced on the last layout call. */
|
|
196
|
+
_lFH: boolean;
|
|
197
|
+
/**
|
|
198
|
+
* Cached layout-pass output width restored on a cache hit. _hasL stores
|
|
199
|
+
* INPUTS early (before compute) but layout.width/height are mutated by the
|
|
200
|
+
* multi-entry cache and by subsequent compute calls with different inputs.
|
|
201
|
+
* Without storing OUTPUTS, a _hasL hit returns whatever
|
|
202
|
+
* layout.width/height happened to be left by the last call — the scrollbox
|
|
203
|
+
* vpH=33→2624 bug. Store + restore outputs like the multi-entry cache does.
|
|
204
|
+
*/
|
|
205
|
+
_lOutW: number;
|
|
206
|
+
/** Cached layout-pass output height restored on a cache hit. */
|
|
207
|
+
_lOutH: number;
|
|
208
|
+
/** Whether the single-slot layout cache holds a valid entry. */
|
|
209
|
+
_hasL: boolean;
|
|
210
|
+
/** Cached available width of the last measure call. */
|
|
211
|
+
_mW: number;
|
|
212
|
+
/** Cached available height of the last measure call. */
|
|
213
|
+
_mH: number;
|
|
214
|
+
/** Cached width measure mode of the last measure call. */
|
|
215
|
+
_mWM: MeasureMode;
|
|
216
|
+
/** Cached height measure mode of the last measure call. */
|
|
217
|
+
_mHM: MeasureMode;
|
|
218
|
+
/** Cached owner width of the last measure call. */
|
|
219
|
+
_mOW: number;
|
|
220
|
+
/** Cached owner height of the last measure call. */
|
|
221
|
+
_mOH: number;
|
|
222
|
+
/** Cached measure-pass output width restored on a cache hit. */
|
|
223
|
+
_mOutW: number;
|
|
224
|
+
/** Cached measure-pass output height restored on a cache hit. */
|
|
225
|
+
_mOutH: number;
|
|
226
|
+
/** Whether the single-slot measure cache holds a valid entry. */
|
|
227
|
+
_hasM: boolean;
|
|
228
|
+
/**
|
|
229
|
+
* Flex-basis of this node for the current layout pass, cached from
|
|
230
|
+
* computeFlexBasis. For clean children, basis only depends on the
|
|
231
|
+
* container's inner dimensions — if those haven't changed, skip the
|
|
232
|
+
* layoutNode(performLayout=false) recursion entirely. This is the hot path
|
|
233
|
+
* for scroll: 500-message content container is dirty, its 499 clean
|
|
234
|
+
* children each get measured ~20× as the dirty chain's measure/layout
|
|
235
|
+
* passes cascade. Basis cache short-circuits at the child boundary.
|
|
236
|
+
*/
|
|
237
|
+
_fbBasis: number;
|
|
238
|
+
/** Cached owner width the basis was computed against. */
|
|
239
|
+
_fbOwnerW: number;
|
|
240
|
+
/** Cached owner height the basis was computed against. */
|
|
241
|
+
_fbOwnerH: number;
|
|
242
|
+
/** Cached available main size the basis was computed against. */
|
|
243
|
+
_fbAvailMain: number;
|
|
244
|
+
/** Cached available cross size the basis was computed against. */
|
|
245
|
+
_fbAvailCross: number;
|
|
246
|
+
/** Cached cross measure mode the basis was computed against. */
|
|
247
|
+
_fbCrossMode: MeasureMode;
|
|
248
|
+
/**
|
|
249
|
+
* Generation at which _fbBasis was written. Dirty nodes from a PREVIOUS
|
|
250
|
+
* generation have stale cache (subtree changed), but within the SAME
|
|
251
|
+
* generation the cache is fresh — the dirty chain's measure→layout
|
|
252
|
+
* cascade invokes computeFlexBasis ≥2^depth times per calculateLayout on
|
|
253
|
+
* fresh-mounted items, and the subtree doesn't change between calls.
|
|
254
|
+
* Gating on generation instead of isDirty_ lets fresh mounts (virtual
|
|
255
|
+
* scroll) cache-hit after first compute: 105k visits → ~10k.
|
|
256
|
+
*/
|
|
257
|
+
_fbGen: number;
|
|
258
|
+
/**
|
|
259
|
+
* Input matrix of the multi-entry layout cache — stores (inputs → computed
|
|
260
|
+
* w,h) so hits with different inputs than _hasL can restore the right
|
|
261
|
+
* dimensions. Upstream yoga uses 16; 4 covers Ink's dirty-chain depth.
|
|
262
|
+
* Packed as flat arrays to avoid per-entry object allocs. Slot i uses
|
|
263
|
+
* indices [i*8, i*8+8) in _cIn (aW,aH,wM,hM,oW,oH,fW,fH) and [i*2, i*2+2)
|
|
264
|
+
* in _cOut (w,h).
|
|
265
|
+
*/
|
|
266
|
+
_cIn: Float64Array | null;
|
|
267
|
+
/** Cached output width/height pairs, two slots per entry. */
|
|
268
|
+
_cOut: Float64Array | null;
|
|
269
|
+
/** Generation at which the multi-entry cache was last written. */
|
|
270
|
+
_cGen: number;
|
|
271
|
+
/** Number of populated cache slots. */
|
|
272
|
+
_cN: number;
|
|
273
|
+
/** LRU write index into the cache arrays. */
|
|
274
|
+
_cWr: number;
|
|
275
|
+
constructor(config?: Config);
|
|
276
|
+
/**
|
|
277
|
+
* Insert a child at the given index and mark this node dirty.
|
|
278
|
+
* @param child - the child node to insert.
|
|
279
|
+
* @param index - the position in the children array.
|
|
280
|
+
*/
|
|
281
|
+
insertChild(child: Node, index: number): void;
|
|
282
|
+
/**
|
|
283
|
+
* Remove a child from this node and mark this node dirty. No-op when the
|
|
284
|
+
* child is not a direct child.
|
|
285
|
+
* @param child - the child node to remove.
|
|
286
|
+
*/
|
|
287
|
+
removeChild(child: Node): void;
|
|
288
|
+
/**
|
|
289
|
+
* Get the child at the given index.
|
|
290
|
+
* @param index - the child position.
|
|
291
|
+
* @returns the child node.
|
|
292
|
+
*/
|
|
293
|
+
getChild(index: number): Node;
|
|
294
|
+
/**
|
|
295
|
+
* Get the number of children.
|
|
296
|
+
* @returns the child count.
|
|
297
|
+
*/
|
|
298
|
+
getChildCount(): number;
|
|
299
|
+
/**
|
|
300
|
+
* Get the parent node.
|
|
301
|
+
* @returns the parent, or null for a root node.
|
|
302
|
+
*/
|
|
303
|
+
getParent(): Node | null;
|
|
304
|
+
/**
|
|
305
|
+
* Release this node's references and decrement the live-node counter.
|
|
306
|
+
*/
|
|
307
|
+
free(): void;
|
|
308
|
+
/**
|
|
309
|
+
* Recursively free this node and all descendants.
|
|
310
|
+
*/
|
|
311
|
+
freeRecursive(): void;
|
|
312
|
+
/**
|
|
313
|
+
* Reset this node to its default style, empty child list, and initial
|
|
314
|
+
* layout-cache state.
|
|
315
|
+
*/
|
|
316
|
+
reset(): void;
|
|
317
|
+
/**
|
|
318
|
+
* Mark this node and its ancestors dirty so the next layout recomputes them.
|
|
319
|
+
*/
|
|
320
|
+
markDirty(): void;
|
|
321
|
+
/**
|
|
322
|
+
* Whether this node or its subtree needs re-layout.
|
|
323
|
+
* @returns the dirty flag.
|
|
324
|
+
*/
|
|
325
|
+
isDirty(): boolean;
|
|
326
|
+
/**
|
|
327
|
+
* Whether a new layout result is available. Always true in this port.
|
|
328
|
+
* @returns true.
|
|
329
|
+
*/
|
|
330
|
+
hasNewLayout(): boolean;
|
|
331
|
+
/**
|
|
332
|
+
* Mark the current layout as seen. No-op in this port.
|
|
333
|
+
*/
|
|
334
|
+
markLayoutSeen(): void;
|
|
335
|
+
/**
|
|
336
|
+
* Set the measure function used to size this leaf node, and mark dirty.
|
|
337
|
+
* @param fn - the measure function, or null to clear it.
|
|
338
|
+
*/
|
|
339
|
+
setMeasureFunc(fn: MeasureFunction | null): void;
|
|
340
|
+
/**
|
|
341
|
+
* Clear the measure function and mark this node dirty.
|
|
342
|
+
*/
|
|
343
|
+
unsetMeasureFunc(): void;
|
|
344
|
+
/**
|
|
345
|
+
* Get the computed left position.
|
|
346
|
+
* @returns the left offset in pixels.
|
|
347
|
+
*/
|
|
348
|
+
getComputedLeft(): number;
|
|
349
|
+
/**
|
|
350
|
+
* Get the computed top position.
|
|
351
|
+
* @returns the top offset in pixels.
|
|
352
|
+
*/
|
|
353
|
+
getComputedTop(): number;
|
|
354
|
+
/**
|
|
355
|
+
* Get the computed width.
|
|
356
|
+
* @returns the width in pixels.
|
|
357
|
+
*/
|
|
358
|
+
getComputedWidth(): number;
|
|
359
|
+
/**
|
|
360
|
+
* Get the computed height.
|
|
361
|
+
* @returns the height in pixels.
|
|
362
|
+
*/
|
|
363
|
+
getComputedHeight(): number;
|
|
364
|
+
/**
|
|
365
|
+
* Get the computed right inset: the parent's width minus this node's right
|
|
366
|
+
* edge. Zero for a root node.
|
|
367
|
+
* @returns the right inset in pixels.
|
|
368
|
+
*/
|
|
369
|
+
getComputedRight(): number;
|
|
370
|
+
/**
|
|
371
|
+
* Get the computed bottom inset: the parent's height minus this node's
|
|
372
|
+
* bottom edge. Zero for a root node.
|
|
373
|
+
* @returns the bottom inset in pixels.
|
|
374
|
+
*/
|
|
375
|
+
getComputedBottom(): number;
|
|
376
|
+
/**
|
|
377
|
+
* Get the full computed layout box.
|
|
378
|
+
* @returns left, top, right, bottom, width, and height in pixels.
|
|
379
|
+
*/
|
|
380
|
+
getComputedLayout(): {
|
|
381
|
+
left: number;
|
|
382
|
+
top: number;
|
|
383
|
+
right: number;
|
|
384
|
+
bottom: number;
|
|
385
|
+
width: number;
|
|
386
|
+
height: number;
|
|
387
|
+
};
|
|
388
|
+
/**
|
|
389
|
+
* Get the computed border width for an edge.
|
|
390
|
+
* @param edge - the edge to read.
|
|
391
|
+
* @returns the border width in pixels.
|
|
392
|
+
*/
|
|
393
|
+
getComputedBorder(edge: Edge): number;
|
|
394
|
+
/**
|
|
395
|
+
* Get the computed padding for an edge.
|
|
396
|
+
* @param edge - the edge to read.
|
|
397
|
+
* @returns the padding in pixels.
|
|
398
|
+
*/
|
|
399
|
+
getComputedPadding(edge: Edge): number;
|
|
400
|
+
/**
|
|
401
|
+
* Get the computed margin for an edge.
|
|
402
|
+
* @param edge - the edge to read.
|
|
403
|
+
* @returns the margin in pixels.
|
|
404
|
+
*/
|
|
405
|
+
getComputedMargin(edge: Edge): number;
|
|
406
|
+
/**
|
|
407
|
+
* Set the width from a number, an 'auto' or percent string, or undefined.
|
|
408
|
+
* @param v - the width value.
|
|
409
|
+
*/
|
|
410
|
+
setWidth(v: number | 'auto' | string | undefined): void;
|
|
411
|
+
/**
|
|
412
|
+
* Set the width as a percentage of the owner's width.
|
|
413
|
+
* @param v - the percentage value.
|
|
414
|
+
*/
|
|
415
|
+
setWidthPercent(v: number): void;
|
|
416
|
+
/**
|
|
417
|
+
* Set the width to auto.
|
|
418
|
+
*/
|
|
419
|
+
setWidthAuto(): void;
|
|
420
|
+
/**
|
|
421
|
+
* Set the height from a number, an 'auto' or percent string, or undefined.
|
|
422
|
+
* @param v - the height value.
|
|
423
|
+
*/
|
|
424
|
+
setHeight(v: number | 'auto' | string | undefined): void;
|
|
425
|
+
/**
|
|
426
|
+
* Set the height as a percentage of the owner's height.
|
|
427
|
+
* @param v - the percentage value.
|
|
428
|
+
*/
|
|
429
|
+
setHeightPercent(v: number): void;
|
|
430
|
+
/**
|
|
431
|
+
* Set the height to auto.
|
|
432
|
+
*/
|
|
433
|
+
setHeightAuto(): void;
|
|
434
|
+
/**
|
|
435
|
+
* Set the min width from a number, a percent string, or undefined.
|
|
436
|
+
* @param v - the min width value.
|
|
437
|
+
*/
|
|
438
|
+
setMinWidth(v: number | string | undefined): void;
|
|
439
|
+
/**
|
|
440
|
+
* Set the min width as a percentage of the owner's width.
|
|
441
|
+
* @param v - the percentage value.
|
|
442
|
+
*/
|
|
443
|
+
setMinWidthPercent(v: number): void;
|
|
444
|
+
/**
|
|
445
|
+
* Set the min height from a number, a percent string, or undefined.
|
|
446
|
+
* @param v - the min height value.
|
|
447
|
+
*/
|
|
448
|
+
setMinHeight(v: number | string | undefined): void;
|
|
449
|
+
/**
|
|
450
|
+
* Set the min height as a percentage of the owner's height.
|
|
451
|
+
* @param v - the percentage value.
|
|
452
|
+
*/
|
|
453
|
+
setMinHeightPercent(v: number): void;
|
|
454
|
+
/**
|
|
455
|
+
* Set the max width from a number, a percent string, or undefined.
|
|
456
|
+
* @param v - the max width value.
|
|
457
|
+
*/
|
|
458
|
+
setMaxWidth(v: number | string | undefined): void;
|
|
459
|
+
/**
|
|
460
|
+
* Set the max width as a percentage of the owner's width.
|
|
461
|
+
* @param v - the percentage value.
|
|
462
|
+
*/
|
|
463
|
+
setMaxWidthPercent(v: number): void;
|
|
464
|
+
/**
|
|
465
|
+
* Set the max height from a number, a percent string, or undefined.
|
|
466
|
+
* @param v - the max height value.
|
|
467
|
+
*/
|
|
468
|
+
setMaxHeight(v: number | string | undefined): void;
|
|
469
|
+
/**
|
|
470
|
+
* Set the max height as a percentage of the owner's height.
|
|
471
|
+
* @param v - the percentage value.
|
|
472
|
+
*/
|
|
473
|
+
setMaxHeightPercent(v: number): void;
|
|
474
|
+
/**
|
|
475
|
+
* Set the flex direction (main axis).
|
|
476
|
+
* @param dir - the flex direction value.
|
|
477
|
+
*/
|
|
478
|
+
setFlexDirection(dir: FlexDirection): void;
|
|
479
|
+
/**
|
|
480
|
+
* Set the flex grow factor.
|
|
481
|
+
* @param v - the grow factor; undefined resets to 0.
|
|
482
|
+
*/
|
|
483
|
+
setFlexGrow(v: number | undefined): void;
|
|
484
|
+
/**
|
|
485
|
+
* Set the flex shrink factor.
|
|
486
|
+
* @param v - the shrink factor; undefined resets to 0.
|
|
487
|
+
*/
|
|
488
|
+
setFlexShrink(v: number | undefined): void;
|
|
489
|
+
/**
|
|
490
|
+
* Set the flex shorthand. Positive values set grow to v and shrink to 1
|
|
491
|
+
* with basis 0; negative values set shrink to -v; zero or undefined resets
|
|
492
|
+
* both factors.
|
|
493
|
+
* @param v - the flex value.
|
|
494
|
+
*/
|
|
495
|
+
setFlex(v: number | undefined): void;
|
|
496
|
+
/**
|
|
497
|
+
* Set the flex basis from a number, an 'auto' or percent string, or
|
|
498
|
+
* undefined.
|
|
499
|
+
* @param v - the basis value.
|
|
500
|
+
*/
|
|
501
|
+
setFlexBasis(v: number | 'auto' | string | undefined): void;
|
|
502
|
+
/**
|
|
503
|
+
* Set the flex basis as a percentage of the owner's main size.
|
|
504
|
+
* @param v - the percentage value.
|
|
505
|
+
*/
|
|
506
|
+
setFlexBasisPercent(v: number): void;
|
|
507
|
+
/**
|
|
508
|
+
* Set the flex basis to auto.
|
|
509
|
+
*/
|
|
510
|
+
setFlexBasisAuto(): void;
|
|
511
|
+
/**
|
|
512
|
+
* Set the flex wrap mode.
|
|
513
|
+
* @param wrap - the wrap value.
|
|
514
|
+
*/
|
|
515
|
+
setFlexWrap(wrap: Wrap): void;
|
|
516
|
+
/**
|
|
517
|
+
* Set the align-items value for this container's children.
|
|
518
|
+
* @param a - the alignment value.
|
|
519
|
+
*/
|
|
520
|
+
setAlignItems(a: Align): void;
|
|
521
|
+
/**
|
|
522
|
+
* Set this node's align-self value.
|
|
523
|
+
* @param a - the alignment value.
|
|
524
|
+
*/
|
|
525
|
+
setAlignSelf(a: Align): void;
|
|
526
|
+
/**
|
|
527
|
+
* Set the align-content value for wrapped lines.
|
|
528
|
+
* @param a - the alignment value.
|
|
529
|
+
*/
|
|
530
|
+
setAlignContent(a: Align): void;
|
|
531
|
+
/**
|
|
532
|
+
* Set the justify-content value for the main axis.
|
|
533
|
+
* @param j - the justification value.
|
|
534
|
+
*/
|
|
535
|
+
setJustifyContent(j: Justify): void;
|
|
536
|
+
/**
|
|
537
|
+
* Set the display mode.
|
|
538
|
+
* @param d - the display value.
|
|
539
|
+
*/
|
|
540
|
+
setDisplay(d: Display): void;
|
|
541
|
+
/**
|
|
542
|
+
* Get the display mode.
|
|
543
|
+
* @returns the display value.
|
|
544
|
+
*/
|
|
545
|
+
getDisplay(): Display;
|
|
546
|
+
/**
|
|
547
|
+
* Set the position type.
|
|
548
|
+
* @param t - the position type value.
|
|
549
|
+
*/
|
|
550
|
+
setPositionType(t: PositionType): void;
|
|
551
|
+
/**
|
|
552
|
+
* Set a position inset from a number, a percent string, or undefined.
|
|
553
|
+
* @param edge - the edge to set.
|
|
554
|
+
* @param v - the inset value.
|
|
555
|
+
*/
|
|
556
|
+
setPosition(edge: Edge, v: number | string | undefined): void;
|
|
557
|
+
/**
|
|
558
|
+
* Set a position inset as a percentage of the owner's size.
|
|
559
|
+
* @param edge - the edge to set.
|
|
560
|
+
* @param v - the percentage value.
|
|
561
|
+
*/
|
|
562
|
+
setPositionPercent(edge: Edge, v: number): void;
|
|
563
|
+
/**
|
|
564
|
+
* Set a position inset to auto.
|
|
565
|
+
* @param edge - the edge to set.
|
|
566
|
+
*/
|
|
567
|
+
setPositionAuto(edge: Edge): void;
|
|
568
|
+
/**
|
|
569
|
+
* Set the overflow behavior.
|
|
570
|
+
* @param o - the overflow value.
|
|
571
|
+
*/
|
|
572
|
+
setOverflow(o: Overflow): void;
|
|
573
|
+
/**
|
|
574
|
+
* Set the text direction.
|
|
575
|
+
* @param d - the direction value.
|
|
576
|
+
*/
|
|
577
|
+
setDirection(d: Direction): void;
|
|
578
|
+
/**
|
|
579
|
+
* Set the box-sizing mode. Accepted for API parity; content-box is not
|
|
580
|
+
* implemented in this port.
|
|
581
|
+
* @param _ - the box-sizing value.
|
|
582
|
+
*/
|
|
583
|
+
setBoxSizing(_: BoxSizing): void;
|
|
584
|
+
/**
|
|
585
|
+
* Set a margin from a number, an 'auto' or percent string, or undefined.
|
|
586
|
+
* @param edge - the edge to set.
|
|
587
|
+
* @param v - the margin value.
|
|
588
|
+
*/
|
|
589
|
+
setMargin(edge: Edge, v: number | 'auto' | string | undefined): void;
|
|
590
|
+
/**
|
|
591
|
+
* Set a margin as a percentage of the owner's width.
|
|
592
|
+
* @param edge - the edge to set.
|
|
593
|
+
* @param v - the percentage value.
|
|
594
|
+
*/
|
|
595
|
+
setMarginPercent(edge: Edge, v: number): void;
|
|
596
|
+
/**
|
|
597
|
+
* Set a margin to auto.
|
|
598
|
+
* @param edge - the edge to set.
|
|
599
|
+
*/
|
|
600
|
+
setMarginAuto(edge: Edge): void;
|
|
601
|
+
/**
|
|
602
|
+
* Set padding from a number, a percent string, or undefined.
|
|
603
|
+
* @param edge - the edge to set.
|
|
604
|
+
* @param v - the padding value.
|
|
605
|
+
*/
|
|
606
|
+
setPadding(edge: Edge, v: number | string | undefined): void;
|
|
607
|
+
/**
|
|
608
|
+
* Set padding as a percentage of the owner's width.
|
|
609
|
+
* @param edge - the edge to set.
|
|
610
|
+
* @param v - the percentage value.
|
|
611
|
+
*/
|
|
612
|
+
setPaddingPercent(edge: Edge, v: number): void;
|
|
613
|
+
/**
|
|
614
|
+
* Set a border width in points; undefined clears the edge.
|
|
615
|
+
* @param edge - the edge to set.
|
|
616
|
+
* @param v - the border width.
|
|
617
|
+
*/
|
|
618
|
+
setBorder(edge: Edge, v: number | undefined): void;
|
|
619
|
+
/**
|
|
620
|
+
* Set a gap from a number, a percent string, or undefined.
|
|
621
|
+
* @param gutter - the gutter axis to set.
|
|
622
|
+
* @param v - the gap value.
|
|
623
|
+
*/
|
|
624
|
+
setGap(gutter: Gutter, v: number | string | undefined): void;
|
|
625
|
+
/**
|
|
626
|
+
* Set a gap as a percentage of the owner's size.
|
|
627
|
+
* @param gutter - the gutter axis to set.
|
|
628
|
+
* @param v - the percentage value.
|
|
629
|
+
*/
|
|
630
|
+
setGapPercent(gutter: Gutter, v: number): void;
|
|
631
|
+
/**
|
|
632
|
+
* Get the flex direction.
|
|
633
|
+
* @returns the flex direction value.
|
|
634
|
+
*/
|
|
635
|
+
getFlexDirection(): FlexDirection;
|
|
636
|
+
/**
|
|
637
|
+
* Get the justify-content value.
|
|
638
|
+
* @returns the justification value.
|
|
639
|
+
*/
|
|
640
|
+
getJustifyContent(): Justify;
|
|
641
|
+
/**
|
|
642
|
+
* Get the align-items value.
|
|
643
|
+
* @returns the alignment value.
|
|
644
|
+
*/
|
|
645
|
+
getAlignItems(): Align;
|
|
646
|
+
/**
|
|
647
|
+
* Get the align-self value.
|
|
648
|
+
* @returns the alignment value.
|
|
649
|
+
*/
|
|
650
|
+
getAlignSelf(): Align;
|
|
651
|
+
/**
|
|
652
|
+
* Get the align-content value.
|
|
653
|
+
* @returns the alignment value.
|
|
654
|
+
*/
|
|
655
|
+
getAlignContent(): Align;
|
|
656
|
+
/**
|
|
657
|
+
* Get the flex grow factor.
|
|
658
|
+
* @returns the grow factor.
|
|
659
|
+
*/
|
|
660
|
+
getFlexGrow(): number;
|
|
661
|
+
/**
|
|
662
|
+
* Get the flex shrink factor.
|
|
663
|
+
* @returns the shrink factor.
|
|
664
|
+
*/
|
|
665
|
+
getFlexShrink(): number;
|
|
666
|
+
/**
|
|
667
|
+
* Get the flex basis value.
|
|
668
|
+
* @returns the flex basis.
|
|
669
|
+
*/
|
|
670
|
+
getFlexBasis(): Value;
|
|
671
|
+
/**
|
|
672
|
+
* Get the flex wrap mode.
|
|
673
|
+
* @returns the wrap value.
|
|
674
|
+
*/
|
|
675
|
+
getFlexWrap(): Wrap;
|
|
676
|
+
/**
|
|
677
|
+
* Get the width value.
|
|
678
|
+
* @returns the width style value.
|
|
679
|
+
*/
|
|
680
|
+
getWidth(): Value;
|
|
681
|
+
/**
|
|
682
|
+
* Get the height value.
|
|
683
|
+
* @returns the height style value.
|
|
684
|
+
*/
|
|
685
|
+
getHeight(): Value;
|
|
686
|
+
/**
|
|
687
|
+
* Get the overflow behavior.
|
|
688
|
+
* @returns the overflow value.
|
|
689
|
+
*/
|
|
690
|
+
getOverflow(): Overflow;
|
|
691
|
+
/**
|
|
692
|
+
* Get the position type.
|
|
693
|
+
* @returns the position type value.
|
|
694
|
+
*/
|
|
695
|
+
getPositionType(): PositionType;
|
|
696
|
+
/**
|
|
697
|
+
* Get the text direction.
|
|
698
|
+
* @returns the direction value.
|
|
699
|
+
*/
|
|
700
|
+
getDirection(): Direction;
|
|
701
|
+
/**
|
|
702
|
+
* Copy another node's style into this node. Accepted for API parity; no-op
|
|
703
|
+
* in this port.
|
|
704
|
+
* @param _ - the source node.
|
|
705
|
+
*/
|
|
706
|
+
copyStyle(_: Node): void;
|
|
707
|
+
/**
|
|
708
|
+
* Set a callback invoked when the node becomes dirty. Accepted for API
|
|
709
|
+
* parity; no-op in this port.
|
|
710
|
+
* @param _ - the callback.
|
|
711
|
+
*/
|
|
712
|
+
setDirtiedFunc(_: unknown): void;
|
|
713
|
+
/**
|
|
714
|
+
* Clear the dirtied callback. Accepted for API parity; no-op in this port.
|
|
715
|
+
*/
|
|
716
|
+
unsetDirtiedFunc(): void;
|
|
717
|
+
/**
|
|
718
|
+
* Set whether this node is its parent's baseline reference.
|
|
719
|
+
* @param v - the reference-baseline flag.
|
|
720
|
+
*/
|
|
721
|
+
setIsReferenceBaseline(v: boolean): void;
|
|
722
|
+
/**
|
|
723
|
+
* Whether this node is its parent's baseline reference.
|
|
724
|
+
* @returns the reference-baseline flag.
|
|
725
|
+
*/
|
|
726
|
+
isReferenceBaseline(): boolean;
|
|
727
|
+
/**
|
|
728
|
+
* Set the aspect ratio. Accepted for API parity; aspect-ratio is not
|
|
729
|
+
* implemented in this port.
|
|
730
|
+
* @param _ - the aspect ratio.
|
|
731
|
+
*/
|
|
732
|
+
setAspectRatio(_: number | undefined): void;
|
|
733
|
+
/**
|
|
734
|
+
* Get the aspect ratio. Always NaN in this port.
|
|
735
|
+
* @returns the aspect ratio.
|
|
736
|
+
*/
|
|
737
|
+
getAspectRatio(): number;
|
|
738
|
+
/**
|
|
739
|
+
* Set whether this node always forms a containing block. Accepted for API
|
|
740
|
+
* parity; no-op in this port.
|
|
741
|
+
* @param _ - the flag.
|
|
742
|
+
*/
|
|
743
|
+
setAlwaysFormsContainingBlock(_: boolean): void;
|
|
744
|
+
/**
|
|
745
|
+
* Run layout on this node's subtree. Resets the profiling counters, then
|
|
746
|
+
* computes and writes layout results into this node and all descendants.
|
|
747
|
+
* @param ownerWidth - the containing block's width; undefined when unbounded.
|
|
748
|
+
* @param ownerHeight - the containing block's height; undefined when unbounded.
|
|
749
|
+
* @param _direction - accepted for API parity; this port is always LTR.
|
|
750
|
+
*/
|
|
751
|
+
calculateLayout(ownerWidth: number | undefined, ownerHeight: number | undefined, _direction?: Direction): void;
|
|
752
|
+
}
|
|
753
|
+
/**
|
|
754
|
+
* Get the profiling counters accumulated since the last calculateLayout.
|
|
755
|
+
* @returns the visited, measured, cacheHits, and live counts.
|
|
756
|
+
*/
|
|
757
|
+
export declare function getYogaCounters(): {
|
|
758
|
+
visited: number;
|
|
759
|
+
measured: number;
|
|
760
|
+
cacheHits: number;
|
|
761
|
+
live: number;
|
|
762
|
+
};
|
|
763
|
+
/**
|
|
764
|
+
* The yoga-layout/load module API: factory functions for Config and Node.
|
|
765
|
+
*/
|
|
766
|
+
export type Yoga = {
|
|
767
|
+
Config: {
|
|
768
|
+
create(): Config;
|
|
769
|
+
destroy(config: Config): void;
|
|
770
|
+
};
|
|
771
|
+
Node: {
|
|
772
|
+
create(config?: Config): Node;
|
|
773
|
+
createDefault(): Node;
|
|
774
|
+
createWithConfig(config: Config): Node;
|
|
775
|
+
destroy(node: Node): void;
|
|
776
|
+
};
|
|
777
|
+
};
|
|
778
|
+
/**
|
|
779
|
+
* The shared module instance returned by loadYoga and the default export.
|
|
780
|
+
*/
|
|
781
|
+
declare const YOGA_INSTANCE: Yoga;
|
|
782
|
+
/**
|
|
783
|
+
* Resolve the yoga module instance, matching the yoga-layout/load API.
|
|
784
|
+
* @returns a promise of the module API.
|
|
785
|
+
*/
|
|
786
|
+
export declare function loadYoga(): Promise<Yoga>;
|
|
787
|
+
export default YOGA_INSTANCE;
|
|
788
|
+
//# sourceMappingURL=index.d.ts.map
|