@buoy-gg/ask-buoy 7.0.34 → 7.0.36
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 +35 -8
- package/lib/commonjs/blocks/AskBlocks.js +338 -1
- package/lib/commonjs/blocks/AskBlocks.js.map +1 -0
- package/lib/commonjs/blocks/BlockRenderer.js +262 -1
- package/lib/commonjs/blocks/BlockRenderer.js.map +1 -0
- package/lib/commonjs/blocks/ChromePrototypes.js +514 -1
- package/lib/commonjs/blocks/ChromePrototypes.js.map +1 -0
- package/lib/commonjs/blocks/DataBlocks.js +781 -1
- package/lib/commonjs/blocks/DataBlocks.js.map +1 -0
- package/lib/commonjs/blocks/ExtraBlocks.js +1860 -1
- package/lib/commonjs/blocks/ExtraBlocks.js.map +1 -0
- package/lib/commonjs/blocks/MediaBlocks.js +156 -1
- package/lib/commonjs/blocks/MediaBlocks.js.map +1 -0
- package/lib/commonjs/blocks/ReceiptBlocks.js +586 -1
- package/lib/commonjs/blocks/ReceiptBlocks.js.map +1 -0
- package/lib/commonjs/blocks/blockText.js +60 -0
- package/lib/commonjs/blocks/blockText.js.map +1 -0
- package/lib/commonjs/blocks/blockText.test.js +53 -0
- package/lib/commonjs/blocks/blockText.test.js.map +1 -0
- package/lib/commonjs/blocks/context.js +42 -1
- package/lib/commonjs/blocks/context.js.map +1 -0
- package/lib/commonjs/blocks/icons.js +96 -1
- package/lib/commonjs/blocks/icons.js.map +1 -0
- package/lib/commonjs/blocks/index.js +95 -1
- package/lib/commonjs/blocks/index.js.map +1 -0
- package/lib/commonjs/blocks/listRow.test.js +55 -0
- package/lib/commonjs/blocks/listRow.test.js.map +1 -0
- package/lib/commonjs/blocks/pageState.js +34 -0
- package/lib/commonjs/blocks/pageState.js.map +1 -0
- package/lib/commonjs/blocks/pageState.test.js +57 -0
- package/lib/commonjs/blocks/pageState.test.js.map +1 -0
- package/lib/commonjs/blocks/primitives.js +457 -1
- package/lib/commonjs/blocks/primitives.js.map +1 -0
- package/lib/commonjs/blocks/primitivesIndex.js +62 -1
- package/lib/commonjs/blocks/primitivesIndex.js.map +1 -0
- package/lib/commonjs/components/ApprovalCard.js +244 -1
- package/lib/commonjs/components/ApprovalCard.js.map +1 -0
- package/lib/commonjs/components/AskBuoyHeader.js +196 -1
- package/lib/commonjs/components/AskBuoyHeader.js.map +1 -0
- package/lib/commonjs/components/AskBuoyIcon.js +19 -1
- package/lib/commonjs/components/AskBuoyIcon.js.map +1 -0
- package/lib/commonjs/components/AskBuoyModal.js +479 -1
- package/lib/commonjs/components/AskBuoyModal.js.map +1 -0
- package/lib/commonjs/components/AskBuoySettings.js +119 -0
- package/lib/commonjs/components/AskBuoySettings.js.map +1 -0
- package/lib/commonjs/components/ChangesBar.js +211 -1
- package/lib/commonjs/components/ChangesBar.js.map +1 -0
- package/lib/commonjs/components/Composer.js +255 -1
- package/lib/commonjs/components/Composer.js.map +1 -0
- package/lib/commonjs/components/EmptyState.js +161 -1
- package/lib/commonjs/components/EmptyState.js.map +1 -0
- package/lib/commonjs/components/KeyboardPad.js +80 -0
- package/lib/commonjs/components/KeyboardPad.js.map +1 -0
- package/lib/commonjs/components/Markdown.js +310 -1
- package/lib/commonjs/components/Markdown.js.map +1 -0
- package/lib/commonjs/components/MessageList.js +930 -1
- package/lib/commonjs/components/MessageList.js.map +1 -0
- package/lib/commonjs/components/QueuedMessages.js +145 -0
- package/lib/commonjs/components/QueuedMessages.js.map +1 -0
- package/lib/commonjs/components/ThinkingStrip.js +223 -0
- package/lib/commonjs/components/ThinkingStrip.js.map +1 -0
- package/lib/commonjs/components/TypingDots.js +63 -1
- package/lib/commonjs/components/TypingDots.js.map +1 -0
- package/lib/commonjs/components/markdownParse.js +131 -0
- package/lib/commonjs/components/markdownParse.js.map +1 -0
- package/lib/commonjs/components/markdownParse.test.js +99 -0
- package/lib/commonjs/components/markdownParse.test.js.map +1 -0
- package/lib/commonjs/components/useCopyAction.js +50 -0
- package/lib/commonjs/components/useCopyAction.js.map +1 -0
- package/lib/commonjs/index.js +252 -1
- package/lib/commonjs/index.js.map +1 -0
- package/lib/commonjs/preset.js +90 -1
- package/lib/commonjs/preset.js.map +1 -0
- package/lib/commonjs/store/activityGroups.js +110 -0
- package/lib/commonjs/store/activityGroups.js.map +1 -0
- package/lib/commonjs/store/activityGroups.test.js +78 -0
- package/lib/commonjs/store/activityGroups.test.js.map +1 -0
- package/lib/commonjs/store/askBuoySettings.js +72 -0
- package/lib/commonjs/store/askBuoySettings.js.map +1 -0
- package/lib/commonjs/store/askBuoyStore.js +547 -1
- package/lib/commonjs/store/askBuoyStore.js.map +1 -0
- package/lib/commonjs/store/blockPlacement.js +64 -0
- package/lib/commonjs/store/blockPlacement.js.map +1 -0
- package/lib/commonjs/store/blockPlacement.test.js +123 -0
- package/lib/commonjs/store/blockPlacement.test.js.map +1 -0
- package/lib/commonjs/store/queue.test.js +150 -0
- package/lib/commonjs/store/queue.test.js.map +1 -0
- package/lib/commonjs/store/resetConversation.js +77 -0
- package/lib/commonjs/store/resetConversation.js.map +1 -0
- package/lib/commonjs/store/restorePending.test.js +63 -0
- package/lib/commonjs/store/restorePending.test.js.map +1 -0
- package/lib/commonjs/store/restoredIds.test.js +47 -0
- package/lib/commonjs/store/restoredIds.test.js.map +1 -0
- package/lib/commonjs/store/suggestions.js +54 -0
- package/lib/commonjs/store/suggestions.js.map +1 -0
- package/lib/commonjs/store/suggestions.test.js +58 -0
- package/lib/commonjs/store/suggestions.test.js.map +1 -0
- package/lib/commonjs/store/systemLine.test.js +77 -0
- package/lib/commonjs/store/systemLine.test.js.map +1 -0
- package/lib/commonjs/store/ticketPrompt.js +17 -0
- package/lib/commonjs/store/ticketPrompt.js.map +1 -0
- package/lib/commonjs/store/traceText.js +81 -0
- package/lib/commonjs/store/traceText.js.map +1 -0
- package/lib/commonjs/store/traceText.test.js +112 -0
- package/lib/commonjs/store/traceText.test.js.map +1 -0
- package/lib/commonjs/store/transcriptPersistence.js +297 -0
- package/lib/commonjs/store/transcriptPersistence.js.map +1 -0
- package/lib/commonjs/store/transcriptPersistence.test.js +333 -0
- package/lib/commonjs/store/transcriptPersistence.test.js.map +1 -0
- package/lib/commonjs/store/turnRendering.test.js +151 -0
- package/lib/commonjs/store/turnRendering.test.js.map +1 -0
- package/lib/commonjs/store/useAskBuoy.js +622 -1
- package/lib/commonjs/store/useAskBuoy.js.map +1 -0
- package/lib/commonjs/store/useAskBuoySettings.js +14 -0
- package/lib/commonjs/store/useAskBuoySettings.js.map +1 -0
- package/lib/commonjs/sync/askBuoySyncAdapter.js +140 -1
- package/lib/commonjs/sync/askBuoySyncAdapter.js.map +1 -0
- package/lib/commonjs/sync/askBuoySyncAdapter.test.js +141 -1
- package/lib/commonjs/sync/askBuoySyncAdapter.test.js.map +1 -0
- package/lib/commonjs/sync/wire.js +58 -1
- package/lib/commonjs/sync/wire.js.map +1 -0
- package/lib/commonjs/types.js +6 -1
- package/lib/commonjs/types.js.map +1 -0
- package/lib/module/blocks/AskBlocks.js +331 -1
- package/lib/module/blocks/AskBlocks.js.map +1 -0
- package/lib/module/blocks/BlockRenderer.js +257 -1
- package/lib/module/blocks/BlockRenderer.js.map +1 -0
- package/lib/module/blocks/ChromePrototypes.js +503 -1
- package/lib/module/blocks/ChromePrototypes.js.map +1 -0
- package/lib/module/blocks/DataBlocks.js +767 -1
- package/lib/module/blocks/DataBlocks.js.map +1 -0
- package/lib/module/blocks/ExtraBlocks.js +1833 -1
- package/lib/module/blocks/ExtraBlocks.js.map +1 -0
- package/lib/module/blocks/MediaBlocks.js +151 -1
- package/lib/module/blocks/MediaBlocks.js.map +1 -0
- package/lib/module/blocks/ReceiptBlocks.js +574 -1
- package/lib/module/blocks/ReceiptBlocks.js.map +1 -0
- package/lib/module/blocks/blockText.js +55 -0
- package/lib/module/blocks/blockText.js.map +1 -0
- package/lib/module/blocks/blockText.test.js +53 -0
- package/lib/module/blocks/blockText.test.js.map +1 -0
- package/lib/module/blocks/context.js +35 -1
- package/lib/module/blocks/context.js.map +1 -0
- package/lib/module/blocks/icons.js +91 -1
- package/lib/module/blocks/icons.js.map +1 -0
- package/lib/module/blocks/index.js +8 -1
- package/lib/module/blocks/index.js.map +1 -0
- package/lib/module/blocks/listRow.test.js +56 -0
- package/lib/module/blocks/listRow.test.js.map +1 -0
- package/lib/module/blocks/pageState.js +30 -0
- package/lib/module/blocks/pageState.js.map +1 -0
- package/lib/module/blocks/pageState.test.js +56 -0
- package/lib/module/blocks/pageState.test.js.map +1 -0
- package/lib/module/blocks/primitives.js +445 -1
- package/lib/module/blocks/primitives.js.map +1 -0
- package/lib/module/blocks/primitivesIndex.js +5 -1
- package/lib/module/blocks/primitivesIndex.js.map +1 -0
- package/lib/module/components/ApprovalCard.js +239 -1
- package/lib/module/components/ApprovalCard.js.map +1 -0
- package/lib/module/components/AskBuoyHeader.js +193 -1
- package/lib/module/components/AskBuoyHeader.js.map +1 -0
- package/lib/module/components/AskBuoyIcon.js +8 -1
- package/lib/module/components/AskBuoyIcon.js.map +1 -0
- package/lib/module/components/AskBuoyModal.js +474 -1
- package/lib/module/components/AskBuoyModal.js.map +1 -0
- package/lib/module/components/AskBuoySettings.js +114 -0
- package/lib/module/components/AskBuoySettings.js.map +1 -0
- package/lib/module/components/ChangesBar.js +206 -1
- package/lib/module/components/ChangesBar.js.map +1 -0
- package/lib/module/components/Composer.js +250 -1
- package/lib/module/components/Composer.js.map +1 -0
- package/lib/module/components/EmptyState.js +156 -1
- package/lib/module/components/EmptyState.js.map +1 -0
- package/lib/module/components/KeyboardPad.js +75 -0
- package/lib/module/components/KeyboardPad.js.map +1 -0
- package/lib/module/components/Markdown.js +305 -1
- package/lib/module/components/Markdown.js.map +1 -0
- package/lib/module/components/MessageList.js +924 -1
- package/lib/module/components/MessageList.js.map +1 -0
- package/lib/module/components/QueuedMessages.js +140 -0
- package/lib/module/components/QueuedMessages.js.map +1 -0
- package/lib/module/components/ThinkingStrip.js +218 -0
- package/lib/module/components/ThinkingStrip.js.map +1 -0
- package/lib/module/components/TypingDots.js +58 -1
- package/lib/module/components/TypingDots.js.map +1 -0
- package/lib/module/components/markdownParse.js +125 -0
- package/lib/module/components/markdownParse.js.map +1 -0
- package/lib/module/components/markdownParse.test.js +98 -0
- package/lib/module/components/markdownParse.test.js.map +1 -0
- package/lib/module/components/useCopyAction.js +46 -0
- package/lib/module/components/useCopyAction.js.map +1 -0
- package/lib/module/index.js +34 -1
- package/lib/module/index.js.map +1 -0
- package/lib/module/preset.js +73 -1
- package/lib/module/preset.js.map +1 -0
- package/lib/module/store/activityGroups.js +103 -0
- package/lib/module/store/activityGroups.js.map +1 -0
- package/lib/module/store/activityGroups.test.js +77 -0
- package/lib/module/store/activityGroups.test.js.map +1 -0
- package/lib/module/store/askBuoySettings.js +67 -0
- package/lib/module/store/askBuoySettings.js.map +1 -0
- package/lib/module/store/askBuoyStore.js +541 -1
- package/lib/module/store/askBuoyStore.js.map +1 -0
- package/lib/module/store/blockPlacement.js +59 -0
- package/lib/module/store/blockPlacement.js.map +1 -0
- package/lib/module/store/blockPlacement.test.js +122 -0
- package/lib/module/store/blockPlacement.test.js.map +1 -0
- package/lib/module/store/queue.test.js +149 -0
- package/lib/module/store/queue.test.js.map +1 -0
- package/lib/module/store/resetConversation.js +72 -0
- package/lib/module/store/resetConversation.js.map +1 -0
- package/lib/module/store/restorePending.test.js +62 -0
- package/lib/module/store/restorePending.test.js.map +1 -0
- package/lib/module/store/restoredIds.test.js +46 -0
- package/lib/module/store/restoredIds.test.js.map +1 -0
- package/lib/module/store/suggestions.js +49 -0
- package/lib/module/store/suggestions.js.map +1 -0
- package/lib/module/store/suggestions.test.js +57 -0
- package/lib/module/store/suggestions.test.js.map +1 -0
- package/lib/module/store/systemLine.test.js +76 -0
- package/lib/module/store/systemLine.test.js.map +1 -0
- package/lib/module/store/ticketPrompt.js +13 -0
- package/lib/module/store/ticketPrompt.js.map +1 -0
- package/lib/module/store/traceText.js +75 -0
- package/lib/module/store/traceText.js.map +1 -0
- package/lib/module/store/traceText.test.js +111 -0
- package/lib/module/store/traceText.test.js.map +1 -0
- package/lib/module/store/transcriptPersistence.js +287 -0
- package/lib/module/store/transcriptPersistence.js.map +1 -0
- package/lib/module/store/transcriptPersistence.test.js +332 -0
- package/lib/module/store/transcriptPersistence.test.js.map +1 -0
- package/lib/module/store/turnRendering.test.js +150 -0
- package/lib/module/store/turnRendering.test.js.map +1 -0
- package/lib/module/store/useAskBuoy.js +616 -1
- package/lib/module/store/useAskBuoy.js.map +1 -0
- package/lib/module/store/useAskBuoySettings.js +9 -0
- package/lib/module/store/useAskBuoySettings.js.map +1 -0
- package/lib/module/sync/askBuoySyncAdapter.js +135 -1
- package/lib/module/sync/askBuoySyncAdapter.js.map +1 -0
- package/lib/module/sync/askBuoySyncAdapter.test.js +140 -1
- package/lib/module/sync/askBuoySyncAdapter.test.js.map +1 -0
- package/lib/module/sync/wire.js +47 -1
- package/lib/module/sync/wire.js.map +1 -0
- package/lib/module/types.js +4 -1
- package/lib/module/types.js.map +1 -0
- package/lib/typescript/blocks/AskBlocks.d.ts.map +1 -0
- package/lib/typescript/blocks/BlockRenderer.d.ts.map +1 -0
- package/lib/typescript/blocks/ChromePrototypes.d.ts.map +1 -0
- package/lib/typescript/blocks/DataBlocks.d.ts +42 -0
- package/lib/typescript/blocks/DataBlocks.d.ts.map +1 -0
- package/lib/typescript/blocks/ExtraBlocks.d.ts +29 -2
- package/lib/typescript/blocks/ExtraBlocks.d.ts.map +1 -0
- package/lib/typescript/blocks/MediaBlocks.d.ts.map +1 -0
- package/lib/typescript/blocks/ReceiptBlocks.d.ts.map +1 -0
- package/lib/typescript/blocks/blockText.d.ts +14 -0
- package/lib/typescript/blocks/blockText.d.ts.map +1 -0
- package/lib/typescript/blocks/blockText.test.d.ts +2 -0
- package/lib/typescript/blocks/blockText.test.d.ts.map +1 -0
- package/lib/typescript/blocks/context.d.ts.map +1 -0
- package/lib/typescript/blocks/icons.d.ts.map +1 -0
- package/lib/typescript/blocks/index.d.ts.map +1 -0
- package/lib/typescript/blocks/listRow.test.d.ts +2 -0
- package/lib/typescript/blocks/listRow.test.d.ts.map +1 -0
- package/lib/typescript/blocks/pageState.d.ts +23 -0
- package/lib/typescript/blocks/pageState.d.ts.map +1 -0
- package/lib/typescript/blocks/pageState.test.d.ts +2 -0
- package/lib/typescript/blocks/pageState.test.d.ts.map +1 -0
- package/lib/typescript/blocks/primitives.d.ts +55 -10
- package/lib/typescript/blocks/primitives.d.ts.map +1 -0
- package/lib/typescript/blocks/primitivesIndex.d.ts +2 -1
- package/lib/typescript/blocks/primitivesIndex.d.ts.map +1 -0
- package/lib/typescript/components/ApprovalCard.d.ts.map +1 -0
- package/lib/typescript/components/AskBuoyHeader.d.ts +41 -1
- package/lib/typescript/components/AskBuoyHeader.d.ts.map +1 -0
- package/lib/typescript/components/AskBuoyIcon.d.ts.map +1 -0
- package/lib/typescript/components/AskBuoyModal.d.ts.map +1 -0
- package/lib/typescript/components/AskBuoySettings.d.ts +2 -0
- package/lib/typescript/components/AskBuoySettings.d.ts.map +1 -0
- package/lib/typescript/components/ChangesBar.d.ts.map +1 -0
- package/lib/typescript/components/Composer.d.ts +16 -1
- package/lib/typescript/components/Composer.d.ts.map +1 -0
- package/lib/typescript/components/EmptyState.d.ts +5 -1
- package/lib/typescript/components/EmptyState.d.ts.map +1 -0
- package/lib/typescript/components/KeyboardPad.d.ts +33 -0
- package/lib/typescript/components/KeyboardPad.d.ts.map +1 -0
- package/lib/typescript/components/Markdown.d.ts +0 -10
- package/lib/typescript/components/Markdown.d.ts.map +1 -0
- package/lib/typescript/components/MessageList.d.ts +19 -7
- package/lib/typescript/components/MessageList.d.ts.map +1 -0
- package/lib/typescript/components/QueuedMessages.d.ts +10 -0
- package/lib/typescript/components/QueuedMessages.d.ts.map +1 -0
- package/lib/typescript/components/ThinkingStrip.d.ts +5 -0
- package/lib/typescript/components/ThinkingStrip.d.ts.map +1 -0
- package/lib/typescript/components/TypingDots.d.ts.map +1 -0
- package/lib/typescript/components/markdownParse.d.ts +49 -0
- package/lib/typescript/components/markdownParse.d.ts.map +1 -0
- package/lib/typescript/components/markdownParse.test.d.ts +2 -0
- package/lib/typescript/components/markdownParse.test.d.ts.map +1 -0
- package/lib/typescript/components/useCopyAction.d.ts +5 -0
- package/lib/typescript/components/useCopyAction.d.ts.map +1 -0
- package/lib/typescript/index.d.ts +5 -0
- package/lib/typescript/index.d.ts.map +1 -0
- package/lib/typescript/preset.d.ts.map +1 -0
- package/lib/typescript/store/activityGroups.d.ts +29 -0
- package/lib/typescript/store/activityGroups.d.ts.map +1 -0
- package/lib/typescript/store/activityGroups.test.d.ts +2 -0
- package/lib/typescript/store/activityGroups.test.d.ts.map +1 -0
- package/lib/typescript/store/askBuoySettings.d.ts +44 -0
- package/lib/typescript/store/askBuoySettings.d.ts.map +1 -0
- package/lib/typescript/store/askBuoyStore.d.ts +216 -18
- package/lib/typescript/store/askBuoyStore.d.ts.map +1 -0
- package/lib/typescript/store/blockPlacement.d.ts +30 -0
- package/lib/typescript/store/blockPlacement.d.ts.map +1 -0
- package/lib/typescript/store/blockPlacement.test.d.ts +2 -0
- package/lib/typescript/store/blockPlacement.test.d.ts.map +1 -0
- package/lib/typescript/store/queue.test.d.ts +2 -0
- package/lib/typescript/store/queue.test.d.ts.map +1 -0
- package/lib/typescript/store/resetConversation.d.ts +38 -0
- package/lib/typescript/store/resetConversation.d.ts.map +1 -0
- package/lib/typescript/store/restorePending.test.d.ts +2 -0
- package/lib/typescript/store/restorePending.test.d.ts.map +1 -0
- package/lib/typescript/store/restoredIds.test.d.ts +2 -0
- package/lib/typescript/store/restoredIds.test.d.ts.map +1 -0
- package/lib/typescript/store/suggestions.d.ts +32 -0
- package/lib/typescript/store/suggestions.d.ts.map +1 -0
- package/lib/typescript/store/suggestions.test.d.ts +2 -0
- package/lib/typescript/store/suggestions.test.d.ts.map +1 -0
- package/lib/typescript/store/systemLine.test.d.ts +2 -0
- package/lib/typescript/store/systemLine.test.d.ts.map +1 -0
- package/lib/typescript/store/ticketPrompt.d.ts +11 -0
- package/lib/typescript/store/ticketPrompt.d.ts.map +1 -0
- package/lib/typescript/store/traceText.d.ts +33 -0
- package/lib/typescript/store/traceText.d.ts.map +1 -0
- package/lib/typescript/store/traceText.test.d.ts +2 -0
- package/lib/typescript/store/traceText.test.d.ts.map +1 -0
- package/lib/typescript/store/transcriptPersistence.d.ts +79 -0
- package/lib/typescript/store/transcriptPersistence.d.ts.map +1 -0
- package/lib/typescript/store/transcriptPersistence.test.d.ts +2 -0
- package/lib/typescript/store/transcriptPersistence.test.d.ts.map +1 -0
- package/lib/typescript/store/turnRendering.test.d.ts +2 -0
- package/lib/typescript/store/turnRendering.test.d.ts.map +1 -0
- package/lib/typescript/store/useAskBuoy.d.ts +23 -1
- package/lib/typescript/store/useAskBuoy.d.ts.map +1 -0
- package/lib/typescript/store/useAskBuoySettings.d.ts +3 -0
- package/lib/typescript/store/useAskBuoySettings.d.ts.map +1 -0
- package/lib/typescript/sync/askBuoySyncAdapter.d.ts +26 -6
- package/lib/typescript/sync/askBuoySyncAdapter.d.ts.map +1 -0
- package/lib/typescript/sync/askBuoySyncAdapter.test.d.ts.map +1 -0
- package/lib/typescript/sync/wire.d.ts.map +1 -0
- package/lib/typescript/types.d.ts +24 -1
- package/lib/typescript/types.d.ts.map +1 -0
- package/package.json +9 -9
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/** Subscribe the sheet to Ask Buoy's own preferences. */
|
|
4
|
+
import { useSyncExternalStore } from "react";
|
|
5
|
+
import { askBuoySettings } from "./askBuoySettings";
|
|
6
|
+
export function useAskBuoySettings() {
|
|
7
|
+
return useSyncExternalStore(askBuoySettings.subscribe, askBuoySettings.get, askBuoySettings.get);
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=useAskBuoySettings.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["useSyncExternalStore","askBuoySettings","useAskBuoySettings","subscribe","get"],"sourceRoot":"../../../src","sources":["store/useAskBuoySettings.ts"],"mappings":";;AAAA;AACA,SAASA,oBAAoB,QAAQ,OAAO;AAE5C,SAASC,eAAe,QAA8B,mBAAmB;AAEzE,OAAO,SAASC,kBAAkBA,CAAA,EAAoB;EACpD,OAAOF,oBAAoB,CAACC,eAAe,CAACE,SAAS,EAAEF,eAAe,CAACG,GAAG,EAAEH,eAAe,CAACG,GAAG,CAAC;AAClG","ignoreList":[]}
|
|
@@ -1 +1,135 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* The sync adapter, so Buoy Desktop and MCP can see what Ask Buoy is doing.
|
|
5
|
+
*
|
|
6
|
+
* Read-heavy on purpose. There is no `send` action: letting a remote client
|
|
7
|
+
* put words in the agent's mouth would mean anyone who can reach the broker —
|
|
8
|
+
* which has no authentication at all, binds 0.0.0.0, and accepts any client
|
|
9
|
+
* calling itself "Dashboard" — could drive a mutating agent on a tester's
|
|
10
|
+
* device. The chat is initiated on-device, by a person, full stop.
|
|
11
|
+
*
|
|
12
|
+
* `undoAll` IS exposed, because the asymmetry is deliberate: putting things
|
|
13
|
+
* back is the safe direction, and a dev watching from the desktop should be
|
|
14
|
+
* able to clean up a device without walking over to it.
|
|
15
|
+
*
|
|
16
|
+
* The transcript is redacted before it crosses the wire. Action results the
|
|
17
|
+
* agent read can contain storage values and response bodies, and this socket
|
|
18
|
+
* broadcasts to every connected dashboard — it already leaks license keys the
|
|
19
|
+
* same way.
|
|
20
|
+
*/
|
|
21
|
+
import { resetConversation } from "../store/resetConversation";
|
|
22
|
+
import { dispatchToolAction, redactForWire } from "./wire";
|
|
23
|
+
import { isReversible } from "@buoy-gg/agent-core";
|
|
24
|
+
import { askBuoyStore } from "../store/askBuoyStore";
|
|
25
|
+
export const ASK_BUOY_ADAPTER_VERSION = 1;
|
|
26
|
+
export const askBuoySyncAdapter = {
|
|
27
|
+
version: ASK_BUOY_ADAPTER_VERSION,
|
|
28
|
+
getSnapshot() {
|
|
29
|
+
const state = askBuoyStore.getState();
|
|
30
|
+
const ledger = askBuoyStore.getLedger();
|
|
31
|
+
const entries = ledger?.list() ?? [];
|
|
32
|
+
const outstanding = entries.filter(e => !e.undoneAt);
|
|
33
|
+
return {
|
|
34
|
+
version: ASK_BUOY_ADAPTER_VERSION,
|
|
35
|
+
busy: state.busy,
|
|
36
|
+
configured: state.configured,
|
|
37
|
+
notice: state.notice,
|
|
38
|
+
messageCount: state.messages.length,
|
|
39
|
+
// Only the shape of the conversation, never tool payloads.
|
|
40
|
+
messages: state.messages.map(m => ({
|
|
41
|
+
id: m.id,
|
|
42
|
+
role: m.role,
|
|
43
|
+
text: redactForWire(m.text),
|
|
44
|
+
streaming: !!m.streaming,
|
|
45
|
+
toolCalls: m.toolCalls.map(c => ({
|
|
46
|
+
toolId: c.toolId,
|
|
47
|
+
action: c.action,
|
|
48
|
+
status: c.status
|
|
49
|
+
}))
|
|
50
|
+
})),
|
|
51
|
+
// Session token totals, so a desktop/MCP observer can meter cost.
|
|
52
|
+
usage: state.usage,
|
|
53
|
+
pendingApproval: state.pending ? {
|
|
54
|
+
toolId: state.pending.toolId,
|
|
55
|
+
action: state.pending.action,
|
|
56
|
+
label: state.pending.label
|
|
57
|
+
} : null,
|
|
58
|
+
changes: {
|
|
59
|
+
// Transients (navigation, taps) are one-shot actions, not changes —
|
|
60
|
+
// same rule as the on-device bar, so desktop and device tell one story.
|
|
61
|
+
reversible: outstanding.filter(e => isReversible(e.effect)).length,
|
|
62
|
+
permanent: outstanding.filter(e => e.effect.kind !== "transient" && !isReversible(e.effect)).length,
|
|
63
|
+
transients: outstanding.filter(e => e.effect.kind === "transient").length,
|
|
64
|
+
items: outstanding.map(e => ({
|
|
65
|
+
kind: e.effect.kind,
|
|
66
|
+
label: e.effect.label
|
|
67
|
+
}))
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
},
|
|
71
|
+
subscribe(onChange) {
|
|
72
|
+
const offStore = askBuoyStore.subscribe(onChange);
|
|
73
|
+
const offLedger = askBuoyStore.getLedger()?.subscribe(onChange);
|
|
74
|
+
return () => {
|
|
75
|
+
offStore();
|
|
76
|
+
offLedger?.();
|
|
77
|
+
};
|
|
78
|
+
},
|
|
79
|
+
actions: {
|
|
80
|
+
/** What the agent changed, and whether it can be put back. */
|
|
81
|
+
listChanges: () => {
|
|
82
|
+
const entries = askBuoyStore.getLedger()?.list() ?? [];
|
|
83
|
+
return entries.filter(e => !e.undoneAt).map(e => ({
|
|
84
|
+
id: e.id,
|
|
85
|
+
at: e.at,
|
|
86
|
+
toolId: e.toolId,
|
|
87
|
+
action: e.action,
|
|
88
|
+
kind: e.effect.kind,
|
|
89
|
+
label: e.effect.label,
|
|
90
|
+
reversible: isReversible(e.effect)
|
|
91
|
+
}));
|
|
92
|
+
},
|
|
93
|
+
/** Put back everything that can be put back. Safe direction only. */
|
|
94
|
+
undoAll: async () => {
|
|
95
|
+
const ledger = askBuoyStore.getLedger();
|
|
96
|
+
if (!ledger) return {
|
|
97
|
+
ok: false,
|
|
98
|
+
error: "No Ask Buoy session on this device."
|
|
99
|
+
};
|
|
100
|
+
const outcome = await ledger.revertAll(dispatchToolAction);
|
|
101
|
+
return {
|
|
102
|
+
ok: true,
|
|
103
|
+
...outcome
|
|
104
|
+
};
|
|
105
|
+
},
|
|
106
|
+
/**
|
|
107
|
+
* Undo what can be undone, then clear the transcript and the ledger.
|
|
108
|
+
*
|
|
109
|
+
* The same path as the sheet's "New conversation" (resetConversation.ts).
|
|
110
|
+
* This action used to clear unconditionally — no question, no undo — so a
|
|
111
|
+
* desktop click could drop the only undo record for changes still live on
|
|
112
|
+
* the tester's phone. Now it refuses to clear when a revert fails and says
|
|
113
|
+
* what is still applied; the dashboard decides whether to clear anyway
|
|
114
|
+
* by calling `undoAll` first or accepting the kept conversation.
|
|
115
|
+
*/
|
|
116
|
+
reset: async () => {
|
|
117
|
+
const outcome = await resetConversation({
|
|
118
|
+
dispatch: dispatchToolAction,
|
|
119
|
+
undoFirst: true
|
|
120
|
+
});
|
|
121
|
+
if (!outcome.cleared) {
|
|
122
|
+
return {
|
|
123
|
+
ok: false,
|
|
124
|
+
error: `Couldn't undo ${outcome.failed.length} change${outcome.failed.length === 1 ? "" : "s"} — conversation kept.`,
|
|
125
|
+
failed: outcome.failed
|
|
126
|
+
};
|
|
127
|
+
}
|
|
128
|
+
return {
|
|
129
|
+
ok: true,
|
|
130
|
+
reverted: outcome.reverted
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
};
|
|
135
|
+
//# sourceMappingURL=askBuoySyncAdapter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["resetConversation","dispatchToolAction","redactForWire","isReversible","askBuoyStore","ASK_BUOY_ADAPTER_VERSION","askBuoySyncAdapter","version","getSnapshot","state","getState","ledger","getLedger","entries","list","outstanding","filter","e","undoneAt","busy","configured","notice","messageCount","messages","length","map","m","id","role","text","streaming","toolCalls","c","toolId","action","status","usage","pendingApproval","pending","label","changes","reversible","effect","permanent","kind","transients","items","subscribe","onChange","offStore","offLedger","actions","listChanges","at","undoAll","ok","error","outcome","revertAll","reset","dispatch","undoFirst","cleared","failed","reverted"],"sourceRoot":"../../../src","sources":["sync/askBuoySyncAdapter.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,iBAAiB,QAAQ,4BAA4B;AAC9D,SAASC,kBAAkB,EAAEC,aAAa,QAAQ,QAAQ;AAC1D,SAASC,YAAY,QAAQ,qBAAqB;AAClD,SAASC,YAAY,QAAQ,uBAAuB;AAEpD,OAAO,MAAMC,wBAAwB,GAAG,CAAC;AAEzC,OAAO,MAAMC,kBAAkB,GAAG;EAChCC,OAAO,EAAEF,wBAAwB;EAEjCG,WAAWA,CAAA,EAAG;IACZ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AAS,CAAC;IACjD;EACF;AACF,CAAC","ignoreList":[]}
|
|
@@ -1 +1,140 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* What Ask Buoy is allowed to put on the broker wire, and what it refuses to
|
|
5
|
+
* accept from it.
|
|
6
|
+
*
|
|
7
|
+
* Both directions matter. The broker has no authentication, accepts any client
|
|
8
|
+
* that calls itself "Dashboard", and forwards to every connected dashboard — it
|
|
9
|
+
* already broadcasts license keys that way. So: no tool results go out, and no
|
|
10
|
+
* remote client can make the agent say anything.
|
|
11
|
+
*/
|
|
12
|
+
import { beforeEach, describe, expect, it } from "vitest";
|
|
13
|
+
import { EffectLedger } from "@buoy-gg/agent-core";
|
|
14
|
+
import { askBuoySyncAdapter } from "./askBuoySyncAdapter";
|
|
15
|
+
import { redactForWire } from "./wire";
|
|
16
|
+
import { askBuoyStore } from "../store/askBuoyStore";
|
|
17
|
+
beforeEach(() => {
|
|
18
|
+
askBuoyStore.reset();
|
|
19
|
+
askBuoyStore.setLedger(null);
|
|
20
|
+
});
|
|
21
|
+
describe("the wire surface", () => {
|
|
22
|
+
it("exposes no action that can make the agent talk", () => {
|
|
23
|
+
// A `send` here would let anyone on the LAN drive a mutating agent on a
|
|
24
|
+
// tester's phone. The conversation starts on-device, by a person.
|
|
25
|
+
const actions = Object.keys(askBuoySyncAdapter.actions);
|
|
26
|
+
expect(actions).not.toContain("send");
|
|
27
|
+
expect(actions).not.toContain("ask");
|
|
28
|
+
expect(actions).not.toContain("prompt");
|
|
29
|
+
expect(actions.sort()).toEqual(["listChanges", "reset", "undoAll"]);
|
|
30
|
+
});
|
|
31
|
+
it("puts the shape of the conversation on the wire, never tool payloads", () => {
|
|
32
|
+
askBuoyStore.addUser("what is in storage");
|
|
33
|
+
const id = askBuoyStore.startAssistant();
|
|
34
|
+
askBuoyStore.applyEvent(id, {
|
|
35
|
+
type: "tool-start",
|
|
36
|
+
id: "c1",
|
|
37
|
+
toolId: "storage",
|
|
38
|
+
action: "async.getItem",
|
|
39
|
+
label: "Read session",
|
|
40
|
+
description: "Read one AsyncStorage key",
|
|
41
|
+
params: {
|
|
42
|
+
key: "session"
|
|
43
|
+
},
|
|
44
|
+
effect: "read"
|
|
45
|
+
});
|
|
46
|
+
askBuoyStore.applyEvent(id, {
|
|
47
|
+
type: "tool-end",
|
|
48
|
+
id: "c1",
|
|
49
|
+
ok: true,
|
|
50
|
+
durationMs: 12,
|
|
51
|
+
summary: "eyJhbGciOiJIUzI1NiJ9.super.secret"
|
|
52
|
+
});
|
|
53
|
+
const snap = askBuoySyncAdapter.getSnapshot();
|
|
54
|
+
const call = snap.messages[1].toolCalls[0];
|
|
55
|
+
expect(call).toEqual({
|
|
56
|
+
toolId: "storage",
|
|
57
|
+
action: "async.getItem",
|
|
58
|
+
status: "ok"
|
|
59
|
+
});
|
|
60
|
+
// The result summary is not on the wire at all — there is no field for it.
|
|
61
|
+
expect(JSON.stringify(snap)).not.toContain("super.secret");
|
|
62
|
+
});
|
|
63
|
+
it("redacts credentials that made it into the assistant's prose", () => {
|
|
64
|
+
askBuoyStore.addUser("show me the auth header");
|
|
65
|
+
const id = askBuoyStore.startAssistant();
|
|
66
|
+
askBuoyStore.applyEvent(id, {
|
|
67
|
+
type: "text",
|
|
68
|
+
delta: "It sends Authorization: Bearer abcdef0123456789ghijkl to the API."
|
|
69
|
+
});
|
|
70
|
+
const snap = askBuoySyncAdapter.getSnapshot();
|
|
71
|
+
expect(JSON.stringify(snap)).not.toContain("abcdef0123456789ghijkl");
|
|
72
|
+
});
|
|
73
|
+
it("reports reversible and permanent changes separately", () => {
|
|
74
|
+
const ledger = new EffectLedger();
|
|
75
|
+
askBuoyStore.setLedger(ledger);
|
|
76
|
+
ledger.record("storage", "async.setItem", {
|
|
77
|
+
kind: "storage-write",
|
|
78
|
+
toolId: "storage",
|
|
79
|
+
action: "async.setItem",
|
|
80
|
+
key: "points",
|
|
81
|
+
before: "240",
|
|
82
|
+
label: "Set points to 1500"
|
|
83
|
+
});
|
|
84
|
+
ledger.record("perf-monitor", "clearAll", {
|
|
85
|
+
kind: "transient",
|
|
86
|
+
label: "Cleared samples"
|
|
87
|
+
});
|
|
88
|
+
// A store write with no captured prior state: recorded, visible, and
|
|
89
|
+
// NOT something Undo can deliver — it must count as permanent.
|
|
90
|
+
ledger.record("zustand", "setState", {
|
|
91
|
+
kind: "state-write",
|
|
92
|
+
toolId: "zustand",
|
|
93
|
+
action: "setState",
|
|
94
|
+
label: "Update the cart store"
|
|
95
|
+
});
|
|
96
|
+
const snap = askBuoySyncAdapter.getSnapshot();
|
|
97
|
+
expect(snap.changes.reversible).toBe(1);
|
|
98
|
+
// The transient is an ACTION, not a change — it must not inflate
|
|
99
|
+
// "permanent" (that read "Changed this app · N permanent" after a
|
|
100
|
+
// read-only tour). It is still reported, in its own count.
|
|
101
|
+
expect(snap.changes.permanent).toBe(1);
|
|
102
|
+
expect(snap.changes.transients).toBe(1);
|
|
103
|
+
});
|
|
104
|
+
});
|
|
105
|
+
describe("redactForWire", () => {
|
|
106
|
+
it("removes bearer tokens, JWTs, api keys and license keys", () => {
|
|
107
|
+
const cases = ["Authorization: Bearer abcdefghijklmnop123456", "token eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9abcdefgh", "key sk-abcdefghijklmnop1234", "license BUOY-ABCD-1234-EFGH", 'the header is "x-api-key": "supersecretvalue"'];
|
|
108
|
+
for (const input of cases) {
|
|
109
|
+
expect(redactForWire(input)).toContain("removed]");
|
|
110
|
+
}
|
|
111
|
+
});
|
|
112
|
+
it("leaves ordinary prose alone", () => {
|
|
113
|
+
const text = "The /menu call returned 200 with 12 items and the burger was in stock.";
|
|
114
|
+
expect(redactForWire(text)).toBe(text);
|
|
115
|
+
});
|
|
116
|
+
});
|
|
117
|
+
describe("undo from the desktop", () => {
|
|
118
|
+
it("is allowed, because putting things back is the safe direction", async () => {
|
|
119
|
+
const ledger = new EffectLedger();
|
|
120
|
+
askBuoyStore.setLedger(ledger);
|
|
121
|
+
const store = new Map([["points", "1500"]]);
|
|
122
|
+
ledger.record("storage", "async.setItem", {
|
|
123
|
+
kind: "storage-write",
|
|
124
|
+
toolId: "storage",
|
|
125
|
+
action: "async.setItem",
|
|
126
|
+
key: "points",
|
|
127
|
+
before: "240",
|
|
128
|
+
label: "Set points to 1500"
|
|
129
|
+
});
|
|
130
|
+
|
|
131
|
+
// The adapter dispatches through the real seam; stub it at the ledger.
|
|
132
|
+
await ledger.revertAll(async (_t, action, params) => {
|
|
133
|
+
const p = params;
|
|
134
|
+
if (action === "async.setItem") store.set(p.key, p.value);
|
|
135
|
+
return undefined;
|
|
136
|
+
});
|
|
137
|
+
expect(store.get("points")).toBe("240");
|
|
138
|
+
});
|
|
139
|
+
});
|
|
140
|
+
//# sourceMappingURL=askBuoySyncAdapter.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["beforeEach","describe","expect","it","EffectLedger","askBuoySyncAdapter","redactForWire","askBuoyStore","reset","setLedger","actions","Object","keys","not","toContain","sort","toEqual","addUser","id","startAssistant","applyEvent","type","toolId","action","label","description","params","key","effect","ok","durationMs","summary","snap","getSnapshot","call","messages","toolCalls","status","JSON","stringify","delta","ledger","record","kind","before","changes","reversible","toBe","permanent","transients","cases","input","text","store","Map","revertAll","_t","p","set","value","undefined","get"],"sourceRoot":"../../../src","sources":["sync/askBuoySyncAdapter.test.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,UAAU,EAAEC,QAAQ,EAAEC,MAAM,EAAEC,EAAE,QAAQ,QAAQ;AACzD,SAASC,YAAY,QAAQ,qBAAqB;AAElD,SAASC,kBAAkB,QAAQ,sBAAsB;AACzD,SAASC,aAAa,QAAQ,QAAQ;AACtC,SAASC,YAAY,QAAQ,uBAAuB;AAEpDP,UAAU,CAAC,MAAM;EACfO,YAAY,CAACC,KAAK,CAAC,CAAC;EACpBD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AE,CAAC,+DAA+D,EAAE,YAAY;IAC9E,MAAMsC,MAAM,GAAG,IAAIrC,YAAY,CAAC,CAAC;IACjCG,YAAY,CAACE,SAAS,CAACgC,MAAM,CAAC;IAC9B,MAAMY,KAAK,GAAG,IAAIC,GAAG,CAAC,CAAC,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC,CAAC;IAC3Cb,MAAM,CAACC,MAAM,CAAC,SAAS,EAAE,eAAe,EAAE;MACxCC,IAAI,EAAE,eAAe;MACrBrB,MAAM,EAAE,SAAS;MACjBC,MAAM,EAAE,eAAe;MACvBI,GAAG,EAAE,QAAQ;MACbiB,MAAM,EAAE,KAAK;MACbpB,KAAK,EAAE;IACT,CAAC,CAAC;;IAEF;IACA,MAAMiB,MAAM,CAACc,SAAS,CAAC,OAAOC,EAAE,EAAEjC,MAAM,EAAEG,MAAM,KAAK;MACnD,MAAM+B,CAAC,GAAG/B,MAAyC;MACnD,IAAIH,MAAM,KAAK,eAAe,EAAE8B,KAAK,CAACK,GAAG,CAACD,CAAC,CAAC9B,GAAG,EAAE8B,CAAC,CAACE,KAAM,CAAC;MAC1D,OAAOC,SAAS;IAClB,CAAC,CAAC;IAEF1D,MAAM,CAACmD,KAAK,CAACQ,GAAG,CAAC,QAAQ,CAAC,CAAC,CAACd,IAAI,CAAC,KAAK,CAAC;EACzC,CAAC,CAAC;AACJ,CAAC,CAAC","ignoreList":[]}
|
package/lib/module/sync/wire.js
CHANGED
|
@@ -1 +1,47 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* What the sync adapter is allowed to put on the broker wire.
|
|
5
|
+
*
|
|
6
|
+
* The broker has no authentication, `cors.origin: "*"`, binds every interface,
|
|
7
|
+
* and forwards to every connected dashboard — it already broadcasts each
|
|
8
|
+
* device's license key to every socket. A chat transcript is not a safe thing
|
|
9
|
+
* to add to that channel unfiltered: the agent reads storage values, network
|
|
10
|
+
* response bodies and user records, and any of it can end up quoted in an
|
|
11
|
+
* answer.
|
|
12
|
+
*
|
|
13
|
+
* So text crossing the wire is scrubbed for the shapes that are unambiguously
|
|
14
|
+
* credentials. This is a reduction in blast radius, not a guarantee — the real
|
|
15
|
+
* guarantee is that tool RESULTS never cross at all (see askBuoySyncAdapter).
|
|
16
|
+
*/
|
|
17
|
+
export { dispatchToolAction } from "@buoy-gg/shared-ui";
|
|
18
|
+
const PATTERNS = [{
|
|
19
|
+
re: /\bBearer\s+[A-Za-z0-9._~+/-]{12,}=*/gi,
|
|
20
|
+
label: "[bearer token removed]"
|
|
21
|
+
}, {
|
|
22
|
+
re: /\beyJ[A-Za-z0-9._-]{20,}/g,
|
|
23
|
+
label: "[jwt removed]"
|
|
24
|
+
}, {
|
|
25
|
+
re: /\bsk-[A-Za-z0-9_-]{16,}/g,
|
|
26
|
+
label: "[api key removed]"
|
|
27
|
+
}, {
|
|
28
|
+
re: /\bBUOY-[A-Z0-9-]{8,}/g,
|
|
29
|
+
label: "[license key removed]"
|
|
30
|
+
},
|
|
31
|
+
// Common "key: value" credential shapes in a quoted payload.
|
|
32
|
+
{
|
|
33
|
+
re: /("|')?(authorization|x-api-key|api[_-]?key|password|secret|access_token|refresh_token)\1?\s*[:=]\s*("|')?[^\s"',}]{6,}/gi,
|
|
34
|
+
label: "[credential removed]"
|
|
35
|
+
}];
|
|
36
|
+
export function redactForWire(text) {
|
|
37
|
+
if (!text) return text;
|
|
38
|
+
let out = text;
|
|
39
|
+
for (const {
|
|
40
|
+
re,
|
|
41
|
+
label
|
|
42
|
+
} of PATTERNS) {
|
|
43
|
+
out = out.replace(re, label);
|
|
44
|
+
}
|
|
45
|
+
return out;
|
|
46
|
+
}
|
|
47
|
+
//# sourceMappingURL=wire.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["dispatchToolAction","PATTERNS","re","label","redactForWire","text","out","replace"],"sourceRoot":"../../../src","sources":["sync/wire.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,kBAAkB,QAAQ,oBAAoB;AAEvD,MAAMC,QAAyC,GAAG,CAChD;EAAEC,EAAE,EAAE,uCAAuC;EAAEC,KAAK,EAAE;AAAyB,CAAC,EAChF;EAAED,EAAE,EAAE,2BAA2B;EAAEC,KAAK,EAAE;AAAgB,CAAC,EAC3D;EAAED,EAAE,EAAE,0BAA0B;EAAEC,KAAK,EAAE;AAAoB,CAAC,EAC9D;EAAED,EAAE,EAAE,uBAAuB;EAAEC,KAAK,EAAE;AAAwB,CAAC;AAC/D;AACA;EACED,EAAE,EAAE,0HAA0H;EAC9HC,KAAK,EAAE;AACT,CAAC,CACF;AAED,OAAO,SAASC,aAAaA,CAACC,IAAY,EAAU;EAClD,IAAI,CAACA,IAAI,EAAE,OAAOA,IAAI;EACtB,IAAIC,GAAG,GAAGD,IAAI;EACd,KAAK,MAAM;IAAEH,EAAE;IAAEC;EAAM,CAAC,IAAIF,QAAQ,EAAE;IACpCK,GAAG,GAAGA,GAAG,CAACC,OAAO,CAACL,EAAE,EAAEC,KAAK,CAAC;EAC9B;EACA,OAAOG,GAAG;AACZ","ignoreList":[]}
|
package/lib/module/types.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../src","sources":["types.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AskBlocks.d.ts","sourceRoot":"","sources":["../../../src/blocks/AskBlocks.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAMjF,wBAAgB,MAAM,CAAC,EAAE,KAAK,EAAE,EAAE;IAAE,KAAK,EAAE,WAAW,CAAA;CAAE,+BA+CvD;AAED,wBAAgB,OAAO,CAAC,EAAE,KAAK,EAAE,EAAE;IAAE,KAAK,EAAE,YAAY,CAAA;CAAE,+BAqCzD;AAED,wBAAgB,KAAK,CAAC,EAAE,KAAK,EAAE,EAAE;IAAE,KAAK,EAAE,UAAU,CAAA;CAAE,+BAqDrD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BlockRenderer.d.ts","sourceRoot":"","sources":["../../../src/blocks/BlockRenderer.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AA+CjD,wBAAgB,aAAa,CAAC,EAAE,KAAK,EAAE,EAAE;IAAE,KAAK,EAAE,KAAK,CAAA;CAAE,+BAMxD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChromePrototypes.d.ts","sourceRoot":"","sources":["../../../src/blocks/ChromePrototypes.tsx"],"names":[],"mappings":"AAqBA,gEAAgE;AAChE,wBAAgB,cAAc,CAAC,EAAE,EAAqB,EAAE,EAAE;IAAE,EAAE,CAAC,EAAE,MAAM,CAAA;CAAE,+BAaxE;AAED,2DAA2D;AAC3D,wBAAgB,cAAc,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,OAAO,CAAA;CAAE,+BAY9E;AAED,gDAAgD;AAChD,wBAAgB,UAAU,CAAC,EAAE,KAAK,EAAE,EAAE;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,+BAatD;AAED,+EAA+E;AAC/E,wBAAgB,cAAc,gCAiB7B;AAED,6EAA6E;AAC7E,wBAAgB,aAAa,CAAC,EAAE,EAAE,EAAE,EAAE;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE,+BAQnD;AAED,wBAAgB,SAAS,CAAC,EAAE,EAAE,EAAE,EAAE;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE,+BAE/C;AAED,+DAA+D;AAC/D,wBAAgB,kBAAkB,CAAC,EAAE,IAAI,EAAE,EAAE;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,+BAuB5D"}
|
|
@@ -5,9 +5,46 @@ export declare function Table({ block }: {
|
|
|
5
5
|
export declare function KeyValue({ block }: {
|
|
6
6
|
block: KeyValueBlock;
|
|
7
7
|
}): import("react").JSX.Element;
|
|
8
|
+
/**
|
|
9
|
+
* Keys carry the index as well as the id.
|
|
10
|
+
*
|
|
11
|
+
* The ids in here come from the app's own data, and app data is not required
|
|
12
|
+
* to be unique — a Poké Mart bag in this repo holds two lines sharing one
|
|
13
|
+
* `lineId`, which is a bug in that app but must not be one in a devtool
|
|
14
|
+
* rendering it. Paging made it visible: the duplicate sat past the initial cap,
|
|
15
|
+
* so React only saw the collision on the first "Show more".
|
|
16
|
+
*/
|
|
17
|
+
/**
|
|
18
|
+
* What a tapped list row does.
|
|
19
|
+
*
|
|
20
|
+
* A row can carry a picture and an action, and they want the same gesture. The
|
|
21
|
+
* picture wins the row body — looking at a thing must not fire it — and the
|
|
22
|
+
* action keeps its label as its own control. A row with no picture is
|
|
23
|
+
* unchanged: the whole row runs the action, which is what it did before rows
|
|
24
|
+
* could open.
|
|
25
|
+
*/
|
|
26
|
+
export declare function listRowBehaviour(item: Pick<ListBlock["items"][number], "image" | "action">): {
|
|
27
|
+
/** Tapping the row body enlarges the picture. */
|
|
28
|
+
canExpand: boolean;
|
|
29
|
+
/** Tapping the row body runs the action (only when there is no picture). */
|
|
30
|
+
rowRunsAction: boolean;
|
|
31
|
+
/** The action label needs to be its own pressable. */
|
|
32
|
+
actionIsOwnControl: boolean;
|
|
33
|
+
};
|
|
8
34
|
export declare function List({ block }: {
|
|
9
35
|
block: ListBlock;
|
|
10
36
|
}): import("react").JSX.Element;
|
|
37
|
+
/**
|
|
38
|
+
* What a write changed. Folded by default (see `Card`), and drilled into
|
|
39
|
+
* rather than dumped.
|
|
40
|
+
*
|
|
41
|
+
* A changed field is rendered by the same tree diff viewer the Zustand and
|
|
42
|
+
* Storage tools use, with unchanged branches hidden — so editing one line of a
|
|
43
|
+
* bag shows `qty 4 => 14` and not both copies of a fifty-key array serialised
|
|
44
|
+
* to JSON, which is what the reader was given before and could not read. Only
|
|
45
|
+
* a scalar keeps the plain −/+ pair: a tree of one root node says less than
|
|
46
|
+
* the two values side by side.
|
|
47
|
+
*/
|
|
11
48
|
export declare function Diff({ block }: {
|
|
12
49
|
block: DiffBlock;
|
|
13
50
|
}): import("react").JSX.Element;
|
|
@@ -17,6 +54,11 @@ export declare function Chart({ block }: {
|
|
|
17
54
|
export declare function Steps({ block }: {
|
|
18
55
|
block: StepsBlock;
|
|
19
56
|
}): import("react").JSX.Element;
|
|
57
|
+
/**
|
|
58
|
+
* Router, per rule4: two specialised components rather than one that changes
|
|
59
|
+
* shape. A `cond ? <A/> : <B/>` inside a single component is the Fabric
|
|
60
|
+
* view-index hazard, and these two subtrees have nothing in common.
|
|
61
|
+
*/
|
|
20
62
|
export declare function Code({ block }: {
|
|
21
63
|
block: CodeBlock;
|
|
22
64
|
}): import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DataBlocks.d.ts","sourceRoot":"","sources":["../../../src/blocks/DataBlocks.tsx"],"names":[],"mappings":"AAQA,OAAO,EAEL,KAAK,UAAU,EACf,KAAK,SAAS,EACd,KAAK,SAAS,EACd,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK,SAAS,EACd,KAAK,WAAW,EAChB,KAAK,UAAU,EACf,KAAK,UAAU,EAChB,MAAM,qBAAqB,CAAC;AAqB7B,wBAAgB,KAAK,CAAC,EAAE,KAAK,EAAE,EAAE;IAAE,KAAK,EAAE,UAAU,CAAA;CAAE,+BA4BrD;AAED,wBAAgB,QAAQ,CAAC,EAAE,KAAK,EAAE,EAAE;IAAE,KAAK,EAAE,aAAa,CAAA;CAAE,+BAqB3D;AAED;;;;;;;;GAQG;AACH;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,EAAE,OAAO,GAAG,QAAQ,CAAC,GAAG;IAC5F,iDAAiD;IACjD,SAAS,EAAE,OAAO,CAAC;IACnB,4EAA4E;IAC5E,aAAa,EAAE,OAAO,CAAC;IACvB,sDAAsD;IACtD,kBAAkB,EAAE,OAAO,CAAC;CAC7B,CAOA;AAED,wBAAgB,IAAI,CAAC,EAAE,KAAK,EAAE,EAAE;IAAE,KAAK,EAAE,SAAS,CAAA;CAAE,+BAoFnD;AAmBD;;;;;;;;;;GAUG;AACH,wBAAgB,IAAI,CAAC,EAAE,KAAK,EAAE,EAAE;IAAE,KAAK,EAAE,SAAS,CAAA;CAAE,+BA+CnD;AAED,wBAAgB,KAAK,CAAC,EAAE,KAAK,EAAE,EAAE;IAAE,KAAK,EAAE,UAAU,CAAA;CAAE,+BAoBrD;AAED,wBAAgB,KAAK,CAAC,EAAE,KAAK,EAAE,EAAE;IAAE,KAAK,EAAE,UAAU,CAAA;CAAE,+BAarD;AAsDD;;;;GAIG;AACH,wBAAgB,IAAI,CAAC,EAAE,KAAK,EAAE,EAAE;IAAE,KAAK,EAAE,SAAS,CAAA;CAAE,+BAInD;AAED,wBAAgB,MAAM,CAAC,EAAE,KAAK,EAAE,EAAE;IAAE,KAAK,EAAE,WAAW,CAAA;CAAE,+BAYvD;AAED,wBAAgB,OAAO,CAAC,EAAE,KAAK,EAAE,EAAE;IAAE,KAAK,EAAE,YAAY,CAAA;CAAE,+BA6BzD"}
|
|
@@ -1,4 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Second-wave blocks from the survey (plan §11). Prototype-quality on purpose:
|
|
3
|
+
* each one exists so it can be judged on the review page, and the ones that
|
|
4
|
+
* survive get the same care as the first wave.
|
|
5
|
+
*/
|
|
6
|
+
import { type ReactNode } from "react";
|
|
7
|
+
import type { BannerBlock, Block, CardBlock, CardCarouselBlock, CheckpointBlock, ClaimBlock, CompareBlock, DateTimeBlock, DetailsBlock, FileBlock, FormBlock, MultiSelectBlock, PlanBlock, ProposalBlock, ScreenshotBlock, SelectBlock, SliderBlock, SparklineBlock, SuggestionsBlock, TabsBlock, TaskBlock, TimelineBlock, UploadBlock } from "@buoy-gg/agent-core";
|
|
2
8
|
export declare function Suggestions({ block }: {
|
|
3
9
|
block: SuggestionsBlock;
|
|
4
10
|
}): import("react").JSX.Element;
|
|
@@ -26,8 +32,29 @@ export declare function Claim({ block }: {
|
|
|
26
32
|
export declare function Details({ block }: {
|
|
27
33
|
block: DetailsBlock;
|
|
28
34
|
}): import("react").JSX.Element;
|
|
29
|
-
|
|
35
|
+
/**
|
|
36
|
+
* The tool-header segmented control, not a strip of this block's own.
|
|
37
|
+
*
|
|
38
|
+
* `NightSegmented` is what the dial settings and the network tool mount, so a
|
|
39
|
+
* tabbed block now reads as part of the same product rather than as a
|
|
40
|
+
* lookalike drawn next to it. `sm` is its compact variant, which is what a
|
|
41
|
+
* control inside a chat bubble wants.
|
|
42
|
+
*
|
|
43
|
+
* Keyed by INDEX, not label: two tabs may legitimately share a label, and a
|
|
44
|
+
* duplicate key would collapse them into one.
|
|
45
|
+
*/
|
|
46
|
+
export declare function Tabs({ block, renderNested, }: {
|
|
30
47
|
block: TabsBlock;
|
|
48
|
+
/**
|
|
49
|
+
* Renders the block inside the active tab.
|
|
50
|
+
*
|
|
51
|
+
* Passed in rather than imported: this is the only place a block renders
|
|
52
|
+
* another block, and importing BlockRenderer here closed a require cycle
|
|
53
|
+
* (BlockRenderer -> ExtraBlocks -> BlockRenderer) that Metro warned about on
|
|
54
|
+
* every launch — the kind that leaves one of the two modules holding
|
|
55
|
+
* uninitialised values depending on which is reached first.
|
|
56
|
+
*/
|
|
57
|
+
renderNested?: (block: Block) => ReactNode;
|
|
31
58
|
}): import("react").JSX.Element;
|
|
32
59
|
export declare function Timeline({ block }: {
|
|
33
60
|
block: TimelineBlock;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExtraBlocks.d.ts","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E,KAAK,EAAE,WAAW,CAAA;CAAE,+BASvD;AAED,wBAAgB,IAAI,CAAC,EAAE,KAAK,EAAE,EAAE;IAAE,KAAK,EAAE,SAAS,CAAA;CAAE,+BAUnD;AAED,wBAAgB,MAAM,CAAC,EAAE,KAAK,EAAE,EAAE;IAAE,KAAK,EAAE,WAAW,CAAA;CAAE,+BAavD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MediaBlocks.d.ts","sourceRoot":"","sources":["../../../src/blocks/MediaBlocks.tsx"],"names":[],"mappings":"AAYA,OAAO,EAAQ,KAAK,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAIhE,wBAAgB,SAAS,CAAC,EAAE,KAAK,EAAE,EAAE;IAAE,KAAK,EAAE,cAAc,CAAA;CAAE,+BA+C7D"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ReceiptBlocks.d.ts","sourceRoot":"","sources":["../../../src/blocks/ReceiptBlocks.tsx"],"names":[],"mappings":"AAQA,OAAO,EAEL,KAAK,UAAU,EACf,KAAK,YAAY,EACjB,KAAK,SAAS,EACd,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACpB,KAAK,aAAa,EAClB,KAAK,mBAAmB,EACzB,MAAM,qBAAqB,CAAC;AA8B7B,wBAAgB,WAAW,CAAC,EAAE,KAAK,EAAE,EAAE;IAAE,KAAK,EAAE,gBAAgB,CAAA;CAAE,+BA0BjE;AAQD,wBAAgB,WAAW,CAAC,EAAE,KAAK,EAAE,EAAE;IAAE,KAAK,EAAE,gBAAgB,CAAA;CAAE,+BA2BjE;AAED,wBAAgB,QAAQ,CAAC,EAAE,KAAK,EAAE,EAAE;IAAE,KAAK,EAAE,aAAa,CAAA;CAAE,+BAgC3D;AAED,wBAAgB,cAAc,CAAC,EAAE,KAAK,EAAE,EAAE;IAAE,KAAK,EAAE,mBAAmB,CAAA;CAAE,+BAsBvE;AAED,wBAAgB,UAAU,CAAC,EAAE,KAAK,EAAE,EAAE;IAAE,KAAK,EAAE,eAAe,CAAA;CAAE,+BA0B/D;AASD,wBAAgB,OAAO,CAAC,EAAE,KAAK,EAAE,EAAE;IAAE,KAAK,EAAE,YAAY,CAAA;CAAE,+BAiBzD;AAED,wBAAgB,KAAK,CAAC,EAAE,KAAK,EAAE,EAAE;IAAE,KAAK,EAAE,UAAU,CAAA;CAAE,+BAYrD;AAED,sEAAsE;AACtE,wBAAgB,IAAI,CAAC,EAAE,KAAK,EAAE,EAAE;IAAE,KAAK,EAAE,SAAS,CAAA;CAAE,+BAqBnD"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Blocks as plain text — for Copy, and for the ticket draft's own Copy.
|
|
3
|
+
*
|
|
4
|
+
* `transcriptToText` used to serialise prose and tool rows only, so a
|
|
5
|
+
* conversation whose whole point was the finding card at the end pasted into
|
|
6
|
+
* Jira WITHOUT the finding. Covers the kinds that carry facts a person would
|
|
7
|
+
* paste; everything else becomes one line naming what was on screen, so the
|
|
8
|
+
* paste says a card existed rather than silently skipping it.
|
|
9
|
+
*/
|
|
10
|
+
import type { Block } from "@buoy-gg/agent-core";
|
|
11
|
+
export declare function blockToText(block: Block): string | null;
|
|
12
|
+
/** Several blocks, blank-line separated, skipping the ones with nothing to say. */
|
|
13
|
+
export declare function blocksToText(blocks: Block[]): string[];
|
|
14
|
+
//# sourceMappingURL=blockText.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"blockText.d.ts","sourceRoot":"","sources":["../../../src/blocks/blockText.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAIjD,wBAAgB,WAAW,CAAC,KAAK,EAAE,KAAK,GAAG,MAAM,GAAG,IAAI,CAwCvD;AAED,mFAAmF;AACnF,wBAAgB,YAAY,CAAC,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,EAAE,CAEtD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"blockText.test.d.ts","sourceRoot":"","sources":["../../../src/blocks/blockText.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../src/blocks/context.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAA6B,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAClE,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAEpE,MAAM,WAAW,aAAa;IAC5B,gEAAgE;IAChE,MAAM,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,IAAI,CAAC;IACtC,2BAA2B;IAC3B,SAAS,EAAE,CAAC,MAAM,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1E,iEAAiE;IACjE,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;IACtC,yDAAyD;IACzD,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,GAAG,MAAM,GAAG,QAAQ,CAAC,CAAC;IAC5D,8EAA8E;IAC9E,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,kFAAkF;IAClF,QAAQ,CAAC,EAAE;QAAE,QAAQ,CAAC,EAAE,OAAO,CAAC;QAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;QAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;KAAE,CAAC;CAC3E;AAWD,wBAAgB,qBAAqB,CAAC,EACpC,KAAK,EACL,QAAQ,GACT,EAAE;IACD,KAAK,EAAE,aAAa,CAAC;IACrB,QAAQ,EAAE,SAAS,CAAC;CACrB,+BAEA;AAED,wBAAgB,gBAAgB,IAAI,aAAa,CAEhD;AAED,wBAAgB,SAAS,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,GAAG,MAAM,CAEtE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"icons.d.ts","sourceRoot":"","sources":["../../../src/blocks/icons.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAEpD,wBAAgB,SAAS,CAAC,EAAE,IAAI,EAAE,IAAS,EAAE,EAAE;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,+BAmB/E"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/blocks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,KAAK,aAAa,EAAE,MAAM,WAAW,CAAC;AACxF,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAChE,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,UAAU,EAAE,cAAc,EAAE,aAAa,EAAE,SAAS,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAC9I,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"listRow.test.d.ts","sourceRoot":"","sources":["../../../src/blocks/listRow.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The arithmetic behind a block's "+N more" footer, separated from the hook so
|
|
3
|
+
* it can be tested without a renderer.
|
|
4
|
+
*
|
|
5
|
+
* The rule that matters: a control is offered ONLY when it changes what is on
|
|
6
|
+
* screen. The previous version derived "+N more" from a `total` the source
|
|
7
|
+
* reported while deriving the tap target from the array actually in hand, so a
|
|
8
|
+
* block holding five items and claiming six rendered a "+1 more" with nothing
|
|
9
|
+
* to reveal — a button that did nothing when tapped. This takes a count and a
|
|
10
|
+
* limit and nothing else, so `canExpand` is the same fact as `hidden > 0`.
|
|
11
|
+
*/
|
|
12
|
+
export interface PageState {
|
|
13
|
+
/** Held but not rendered. */
|
|
14
|
+
hidden: number;
|
|
15
|
+
/** What one more tap reveals. */
|
|
16
|
+
next: number;
|
|
17
|
+
/** Something beyond the initial cap is on screen. */
|
|
18
|
+
expanded: boolean;
|
|
19
|
+
canExpand: boolean;
|
|
20
|
+
canCollapse: boolean;
|
|
21
|
+
}
|
|
22
|
+
export declare function pageState(count: number, cap: number, limit: number, step: number): PageState;
|
|
23
|
+
//# sourceMappingURL=pageState.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pageState.d.ts","sourceRoot":"","sources":["../../../src/blocks/pageState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,MAAM,WAAW,SAAS;IACxB,6BAA6B;IAC7B,MAAM,EAAE,MAAM,CAAC;IACf,iCAAiC;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,qDAAqD;IACrD,QAAQ,EAAE,OAAO,CAAC;IAClB,SAAS,EAAE,OAAO,CAAC;IACnB,WAAW,EAAE,OAAO,CAAC;CACtB;AAED,wBAAgB,SAAS,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,SAAS,CAc5F"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pageState.test.d.ts","sourceRoot":"","sources":["../../../src/blocks/pageState.test.ts"],"names":[],"mappings":""}
|