@buoy-gg/ask-buoy 7.0.35 → 7.0.38
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 +73 -15
- package/lib/commonjs/blocks/AskBlocks.js +1 -338
- package/lib/commonjs/blocks/BlockRenderer.js +1 -250
- package/lib/commonjs/blocks/ChromePrototypes.js +1 -514
- package/lib/commonjs/blocks/DataBlocks.js +1 -688
- package/lib/commonjs/blocks/ExtraBlocks.js +1 -1854
- package/lib/commonjs/blocks/MediaBlocks.js +1 -140
- package/lib/commonjs/blocks/ReceiptBlocks.js +1 -586
- package/lib/commonjs/blocks/blockText.js +1 -0
- package/lib/commonjs/blocks/blockText.test.js +1 -0
- package/lib/commonjs/blocks/context.js +1 -42
- package/lib/commonjs/blocks/icons.js +1 -96
- package/lib/commonjs/blocks/index.js +1 -95
- package/lib/commonjs/blocks/listRow.test.js +1 -55
- package/lib/commonjs/blocks/pageState.js +1 -34
- package/lib/commonjs/blocks/pageState.test.js +1 -57
- package/lib/commonjs/blocks/primitives.js +1 -401
- package/lib/commonjs/blocks/primitivesIndex.js +1 -62
- package/lib/commonjs/components/ApprovalCard.js +1 -140
- package/lib/commonjs/components/AskBuoyHeader.js +1 -164
- package/lib/commonjs/components/AskBuoyIcon.js +1 -19
- package/lib/commonjs/components/AskBuoyModal.js +1 -353
- package/lib/commonjs/components/AskBuoySettings.js +1 -69
- package/lib/commonjs/components/ChangesBar.js +1 -211
- package/lib/commonjs/components/Composer.js +1 -175
- package/lib/commonjs/components/EmptyState.js +1 -154
- package/lib/commonjs/components/KeyboardPad.js +1 -0
- package/lib/commonjs/components/Markdown.js +1 -252
- package/lib/commonjs/components/MessageList.js +1 -683
- package/lib/commonjs/components/QueuedMessages.js +1 -0
- package/lib/commonjs/components/ThinkingStrip.js +1 -223
- package/lib/commonjs/components/TypingDots.js +1 -63
- package/lib/commonjs/components/markdownParse.js +1 -0
- package/lib/commonjs/components/markdownParse.test.js +1 -0
- package/lib/commonjs/components/useCopyAction.js +1 -50
- package/lib/commonjs/index.js +1 -252
- package/lib/commonjs/preset.js +1 -90
- package/lib/commonjs/store/activityGroups.js +1 -0
- package/lib/commonjs/store/activityGroups.test.js +1 -0
- package/lib/commonjs/store/askBuoySettings.js +1 -67
- package/lib/commonjs/store/askBuoyStore.js +1 -365
- package/lib/commonjs/store/blockPlacement.js +1 -0
- package/lib/commonjs/store/blockPlacement.test.js +1 -0
- package/lib/commonjs/store/queue.test.js +1 -0
- package/lib/commonjs/store/resetConversation.js +1 -0
- package/lib/commonjs/store/restorePending.test.js +1 -0
- package/lib/commonjs/store/restoredIds.test.js +1 -47
- package/lib/commonjs/store/suggestions.js +1 -0
- package/lib/commonjs/store/suggestions.test.js +1 -0
- package/lib/commonjs/store/systemLine.test.js +1 -0
- package/lib/commonjs/store/ticketPrompt.js +1 -0
- package/lib/commonjs/store/traceText.js +1 -81
- package/lib/commonjs/store/traceText.test.js +1 -112
- package/lib/commonjs/store/transcriptPersistence.js +1 -208
- package/lib/commonjs/store/transcriptPersistence.test.js +1 -185
- package/lib/commonjs/store/turnRendering.test.js +1 -0
- package/lib/commonjs/store/useAskBuoy.js +1 -400
- package/lib/commonjs/store/useAskBuoySettings.js +1 -14
- package/lib/commonjs/sync/askBuoySyncAdapter.js +1 -119
- package/lib/commonjs/sync/askBuoySyncAdapter.test.js +1 -141
- package/lib/commonjs/sync/wire.js +1 -58
- package/lib/commonjs/types.js +1 -6
- package/lib/module/blocks/AskBlocks.js +1 -331
- package/lib/module/blocks/BlockRenderer.js +1 -245
- package/lib/module/blocks/ChromePrototypes.js +1 -503
- package/lib/module/blocks/DataBlocks.js +1 -674
- package/lib/module/blocks/ExtraBlocks.js +1 -1827
- package/lib/module/blocks/MediaBlocks.js +1 -135
- package/lib/module/blocks/ReceiptBlocks.js +1 -574
- package/lib/module/blocks/blockText.js +1 -0
- package/lib/module/blocks/blockText.test.js +1 -0
- package/lib/module/blocks/context.js +1 -35
- package/lib/module/blocks/icons.js +1 -91
- package/lib/module/blocks/index.js +1 -8
- package/lib/module/blocks/listRow.test.js +1 -56
- package/lib/module/blocks/pageState.js +1 -30
- package/lib/module/blocks/pageState.test.js +1 -56
- package/lib/module/blocks/primitives.js +1 -389
- package/lib/module/blocks/primitivesIndex.js +1 -5
- package/lib/module/components/ApprovalCard.js +1 -135
- package/lib/module/components/AskBuoyHeader.js +1 -161
- package/lib/module/components/AskBuoyIcon.js +1 -8
- package/lib/module/components/AskBuoyModal.js +1 -348
- package/lib/module/components/AskBuoySettings.js +1 -64
- package/lib/module/components/ChangesBar.js +1 -206
- package/lib/module/components/Composer.js +1 -170
- package/lib/module/components/EmptyState.js +1 -149
- package/lib/module/components/KeyboardPad.js +1 -0
- package/lib/module/components/Markdown.js +1 -246
- package/lib/module/components/MessageList.js +1 -677
- package/lib/module/components/QueuedMessages.js +1 -0
- package/lib/module/components/ThinkingStrip.js +1 -218
- package/lib/module/components/TypingDots.js +1 -58
- package/lib/module/components/markdownParse.js +1 -0
- package/lib/module/components/markdownParse.test.js +1 -0
- package/lib/module/components/useCopyAction.js +1 -46
- package/lib/module/index.js +1 -34
- package/lib/module/preset.js +1 -73
- package/lib/module/store/activityGroups.js +1 -0
- package/lib/module/store/activityGroups.test.js +1 -0
- package/lib/module/store/askBuoySettings.js +1 -62
- package/lib/module/store/askBuoyStore.js +1 -361
- package/lib/module/store/blockPlacement.js +1 -0
- package/lib/module/store/blockPlacement.test.js +1 -0
- package/lib/module/store/queue.test.js +1 -0
- package/lib/module/store/resetConversation.js +1 -0
- package/lib/module/store/restorePending.test.js +1 -0
- package/lib/module/store/restoredIds.test.js +1 -46
- package/lib/module/store/suggestions.js +1 -0
- package/lib/module/store/suggestions.test.js +1 -0
- package/lib/module/store/systemLine.test.js +1 -0
- package/lib/module/store/ticketPrompt.js +1 -0
- package/lib/module/store/traceText.js +1 -75
- package/lib/module/store/traceText.test.js +1 -111
- package/lib/module/store/transcriptPersistence.js +1 -198
- package/lib/module/store/transcriptPersistence.test.js +1 -184
- package/lib/module/store/turnRendering.test.js +1 -0
- package/lib/module/store/useAskBuoy.js +1 -394
- package/lib/module/store/useAskBuoySettings.js +1 -9
- package/lib/module/sync/askBuoySyncAdapter.js +1 -114
- package/lib/module/sync/askBuoySyncAdapter.test.js +1 -140
- package/lib/module/sync/wire.js +1 -47
- package/lib/module/types.js +1 -4
- package/lib/typescript/blocks/DataBlocks.d.ts +11 -0
- package/lib/typescript/blocks/ExtraBlocks.d.ts +18 -2
- package/lib/typescript/blocks/blockText.d.ts +14 -0
- package/lib/typescript/blocks/blockText.test.d.ts +2 -0
- package/lib/typescript/blocks/primitives.d.ts +16 -1
- package/lib/typescript/components/ApprovalCard.d.ts +9 -1
- package/lib/typescript/components/AskBuoyHeader.d.ts +31 -1
- package/lib/typescript/components/Composer.d.ts +16 -1
- package/lib/typescript/components/EmptyState.d.ts +5 -1
- package/lib/typescript/components/KeyboardPad.d.ts +33 -0
- package/lib/typescript/components/Markdown.d.ts +0 -10
- package/lib/typescript/components/MessageList.d.ts +7 -2
- package/lib/typescript/components/QueuedMessages.d.ts +10 -0
- package/lib/typescript/components/markdownParse.d.ts +49 -0
- package/lib/typescript/components/markdownParse.test.d.ts +2 -0
- package/lib/typescript/preset.d.ts +4 -2
- package/lib/typescript/store/activityGroups.d.ts +29 -0
- package/lib/typescript/store/activityGroups.test.d.ts +2 -0
- package/lib/typescript/store/askBuoySettings.d.ts +22 -0
- package/lib/typescript/store/askBuoyStore.d.ts +174 -9
- package/lib/typescript/store/blockPlacement.d.ts +30 -0
- package/lib/typescript/store/blockPlacement.test.d.ts +2 -0
- package/lib/typescript/store/queue.test.d.ts +2 -0
- package/lib/typescript/store/resetConversation.d.ts +38 -0
- package/lib/typescript/store/restorePending.test.d.ts +2 -0
- package/lib/typescript/store/suggestions.d.ts +32 -0
- package/lib/typescript/store/suggestions.test.d.ts +2 -0
- package/lib/typescript/store/systemLine.test.d.ts +2 -0
- package/lib/typescript/store/ticketPrompt.d.ts +11 -0
- package/lib/typescript/store/transcriptPersistence.d.ts +41 -2
- package/lib/typescript/store/turnRendering.test.d.ts +2 -0
- package/lib/typescript/store/useAskBuoy.d.ts +26 -3
- package/lib/typescript/sync/askBuoySyncAdapter.d.ts +29 -6
- package/package.json +10 -10
- package/lib/commonjs/blocks/AskBlocks.js.map +0 -1
- package/lib/commonjs/blocks/BlockRenderer.js.map +0 -1
- package/lib/commonjs/blocks/ChromePrototypes.js.map +0 -1
- package/lib/commonjs/blocks/DataBlocks.js.map +0 -1
- package/lib/commonjs/blocks/ExtraBlocks.js.map +0 -1
- package/lib/commonjs/blocks/MediaBlocks.js.map +0 -1
- package/lib/commonjs/blocks/ReceiptBlocks.js.map +0 -1
- package/lib/commonjs/blocks/context.js.map +0 -1
- package/lib/commonjs/blocks/icons.js.map +0 -1
- package/lib/commonjs/blocks/index.js.map +0 -1
- package/lib/commonjs/blocks/listRow.test.js.map +0 -1
- package/lib/commonjs/blocks/pageState.js.map +0 -1
- package/lib/commonjs/blocks/pageState.test.js.map +0 -1
- package/lib/commonjs/blocks/primitives.js.map +0 -1
- package/lib/commonjs/blocks/primitivesIndex.js.map +0 -1
- package/lib/commonjs/components/ApprovalCard.js.map +0 -1
- package/lib/commonjs/components/AskBuoyHeader.js.map +0 -1
- package/lib/commonjs/components/AskBuoyIcon.js.map +0 -1
- package/lib/commonjs/components/AskBuoyModal.js.map +0 -1
- package/lib/commonjs/components/AskBuoySettings.js.map +0 -1
- package/lib/commonjs/components/ChangesBar.js.map +0 -1
- package/lib/commonjs/components/Composer.js.map +0 -1
- package/lib/commonjs/components/EmptyState.js.map +0 -1
- package/lib/commonjs/components/Markdown.js.map +0 -1
- package/lib/commonjs/components/MessageList.js.map +0 -1
- package/lib/commonjs/components/ThinkingStrip.js.map +0 -1
- package/lib/commonjs/components/TypingDots.js.map +0 -1
- package/lib/commonjs/components/useCopyAction.js.map +0 -1
- package/lib/commonjs/index.js.map +0 -1
- package/lib/commonjs/preset.js.map +0 -1
- package/lib/commonjs/store/askBuoySettings.js.map +0 -1
- package/lib/commonjs/store/askBuoyStore.js.map +0 -1
- package/lib/commonjs/store/restoredIds.test.js.map +0 -1
- package/lib/commonjs/store/traceText.js.map +0 -1
- package/lib/commonjs/store/traceText.test.js.map +0 -1
- package/lib/commonjs/store/transcriptPersistence.js.map +0 -1
- package/lib/commonjs/store/transcriptPersistence.test.js.map +0 -1
- package/lib/commonjs/store/useAskBuoy.js.map +0 -1
- package/lib/commonjs/store/useAskBuoySettings.js.map +0 -1
- package/lib/commonjs/sync/askBuoySyncAdapter.js.map +0 -1
- package/lib/commonjs/sync/askBuoySyncAdapter.test.js.map +0 -1
- package/lib/commonjs/sync/wire.js.map +0 -1
- package/lib/commonjs/types.js.map +0 -1
- package/lib/module/blocks/AskBlocks.js.map +0 -1
- package/lib/module/blocks/BlockRenderer.js.map +0 -1
- package/lib/module/blocks/ChromePrototypes.js.map +0 -1
- package/lib/module/blocks/DataBlocks.js.map +0 -1
- package/lib/module/blocks/ExtraBlocks.js.map +0 -1
- package/lib/module/blocks/MediaBlocks.js.map +0 -1
- package/lib/module/blocks/ReceiptBlocks.js.map +0 -1
- package/lib/module/blocks/context.js.map +0 -1
- package/lib/module/blocks/icons.js.map +0 -1
- package/lib/module/blocks/index.js.map +0 -1
- package/lib/module/blocks/listRow.test.js.map +0 -1
- package/lib/module/blocks/pageState.js.map +0 -1
- package/lib/module/blocks/pageState.test.js.map +0 -1
- package/lib/module/blocks/primitives.js.map +0 -1
- package/lib/module/blocks/primitivesIndex.js.map +0 -1
- package/lib/module/components/ApprovalCard.js.map +0 -1
- package/lib/module/components/AskBuoyHeader.js.map +0 -1
- package/lib/module/components/AskBuoyIcon.js.map +0 -1
- package/lib/module/components/AskBuoyModal.js.map +0 -1
- package/lib/module/components/AskBuoySettings.js.map +0 -1
- package/lib/module/components/ChangesBar.js.map +0 -1
- package/lib/module/components/Composer.js.map +0 -1
- package/lib/module/components/EmptyState.js.map +0 -1
- package/lib/module/components/Markdown.js.map +0 -1
- package/lib/module/components/MessageList.js.map +0 -1
- package/lib/module/components/ThinkingStrip.js.map +0 -1
- package/lib/module/components/TypingDots.js.map +0 -1
- package/lib/module/components/useCopyAction.js.map +0 -1
- package/lib/module/index.js.map +0 -1
- package/lib/module/preset.js.map +0 -1
- package/lib/module/store/askBuoySettings.js.map +0 -1
- package/lib/module/store/askBuoyStore.js.map +0 -1
- package/lib/module/store/restoredIds.test.js.map +0 -1
- package/lib/module/store/traceText.js.map +0 -1
- package/lib/module/store/traceText.test.js.map +0 -1
- package/lib/module/store/transcriptPersistence.js.map +0 -1
- package/lib/module/store/transcriptPersistence.test.js.map +0 -1
- package/lib/module/store/useAskBuoy.js.map +0 -1
- package/lib/module/store/useAskBuoySettings.js.map +0 -1
- package/lib/module/sync/askBuoySyncAdapter.js.map +0 -1
- package/lib/module/sync/askBuoySyncAdapter.test.js.map +0 -1
- package/lib/module/sync/wire.js.map +0 -1
- package/lib/module/types.js.map +0 -1
- package/lib/typescript/blocks/AskBlocks.d.ts.map +0 -1
- package/lib/typescript/blocks/BlockRenderer.d.ts.map +0 -1
- package/lib/typescript/blocks/ChromePrototypes.d.ts.map +0 -1
- package/lib/typescript/blocks/DataBlocks.d.ts.map +0 -1
- package/lib/typescript/blocks/ExtraBlocks.d.ts.map +0 -1
- package/lib/typescript/blocks/MediaBlocks.d.ts.map +0 -1
- package/lib/typescript/blocks/ReceiptBlocks.d.ts.map +0 -1
- package/lib/typescript/blocks/context.d.ts.map +0 -1
- package/lib/typescript/blocks/icons.d.ts.map +0 -1
- package/lib/typescript/blocks/index.d.ts.map +0 -1
- package/lib/typescript/blocks/listRow.test.d.ts.map +0 -1
- package/lib/typescript/blocks/pageState.d.ts.map +0 -1
- package/lib/typescript/blocks/pageState.test.d.ts.map +0 -1
- package/lib/typescript/blocks/primitives.d.ts.map +0 -1
- package/lib/typescript/blocks/primitivesIndex.d.ts.map +0 -1
- package/lib/typescript/components/ApprovalCard.d.ts.map +0 -1
- package/lib/typescript/components/AskBuoyHeader.d.ts.map +0 -1
- package/lib/typescript/components/AskBuoyIcon.d.ts.map +0 -1
- package/lib/typescript/components/AskBuoyModal.d.ts.map +0 -1
- package/lib/typescript/components/AskBuoySettings.d.ts.map +0 -1
- package/lib/typescript/components/ChangesBar.d.ts.map +0 -1
- package/lib/typescript/components/Composer.d.ts.map +0 -1
- package/lib/typescript/components/EmptyState.d.ts.map +0 -1
- package/lib/typescript/components/Markdown.d.ts.map +0 -1
- package/lib/typescript/components/MessageList.d.ts.map +0 -1
- package/lib/typescript/components/ThinkingStrip.d.ts.map +0 -1
- package/lib/typescript/components/TypingDots.d.ts.map +0 -1
- package/lib/typescript/components/useCopyAction.d.ts.map +0 -1
- package/lib/typescript/index.d.ts.map +0 -1
- package/lib/typescript/preset.d.ts.map +0 -1
- package/lib/typescript/store/askBuoySettings.d.ts.map +0 -1
- package/lib/typescript/store/askBuoyStore.d.ts.map +0 -1
- package/lib/typescript/store/restoredIds.test.d.ts.map +0 -1
- package/lib/typescript/store/traceText.d.ts.map +0 -1
- package/lib/typescript/store/traceText.test.d.ts.map +0 -1
- package/lib/typescript/store/transcriptPersistence.d.ts.map +0 -1
- package/lib/typescript/store/transcriptPersistence.test.d.ts.map +0 -1
- package/lib/typescript/store/useAskBuoy.d.ts.map +0 -1
- package/lib/typescript/store/useAskBuoySettings.d.ts.map +0 -1
- package/lib/typescript/sync/askBuoySyncAdapter.d.ts.map +0 -1
- package/lib/typescript/sync/askBuoySyncAdapter.test.d.ts.map +0 -1
- package/lib/typescript/sync/wire.d.ts.map +0 -1
- package/lib/typescript/types.d.ts.map +0 -1
|
@@ -1,96 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.BlockIcon = BlockIcon;
|
|
7
|
-
var _reactNative = require("react-native");
|
|
8
|
-
var _sharedUi = require("@buoy-gg/shared-ui");
|
|
9
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
10
|
-
/** The small named icons a block may ask for. One place, one size. */
|
|
11
|
-
|
|
12
|
-
function BlockIcon({
|
|
13
|
-
name,
|
|
14
|
-
size = 14
|
|
15
|
-
}) {
|
|
16
|
-
const c = _sharedUi.night.color.textSecondary;
|
|
17
|
-
const icon = (() => {
|
|
18
|
-
switch (name) {
|
|
19
|
-
case "network":
|
|
20
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.Globe, {
|
|
21
|
-
size: size,
|
|
22
|
-
color: c
|
|
23
|
-
});
|
|
24
|
-
case "storage":
|
|
25
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.Database, {
|
|
26
|
-
size: size,
|
|
27
|
-
color: c
|
|
28
|
-
});
|
|
29
|
-
case "route":
|
|
30
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.Navigation, {
|
|
31
|
-
size: size,
|
|
32
|
-
color: c
|
|
33
|
-
});
|
|
34
|
-
case "screen":
|
|
35
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.Eye, {
|
|
36
|
-
size: size,
|
|
37
|
-
color: c
|
|
38
|
-
});
|
|
39
|
-
case "user":
|
|
40
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.User, {
|
|
41
|
-
size: size,
|
|
42
|
-
color: c
|
|
43
|
-
});
|
|
44
|
-
case "image":
|
|
45
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.Image, {
|
|
46
|
-
size: size,
|
|
47
|
-
color: c
|
|
48
|
-
});
|
|
49
|
-
case "check":
|
|
50
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.Check, {
|
|
51
|
-
size: size,
|
|
52
|
-
color: _sharedUi.night.color.accent
|
|
53
|
-
});
|
|
54
|
-
case "warn":
|
|
55
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.AlertTriangle, {
|
|
56
|
-
size: size,
|
|
57
|
-
color: _sharedUi.night.color.warning
|
|
58
|
-
});
|
|
59
|
-
case "info":
|
|
60
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.Info, {
|
|
61
|
-
size: size,
|
|
62
|
-
color: _sharedUi.night.color.info
|
|
63
|
-
});
|
|
64
|
-
case "store":
|
|
65
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.Layers, {
|
|
66
|
-
size: size,
|
|
67
|
-
color: c
|
|
68
|
-
});
|
|
69
|
-
case "query":
|
|
70
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.Layers, {
|
|
71
|
-
size: size,
|
|
72
|
-
color: c
|
|
73
|
-
});
|
|
74
|
-
case "clock":
|
|
75
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.Clock, {
|
|
76
|
-
size: size,
|
|
77
|
-
color: c
|
|
78
|
-
});
|
|
79
|
-
}
|
|
80
|
-
})();
|
|
81
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
82
|
-
style: styles.wrap,
|
|
83
|
-
children: icon
|
|
84
|
-
});
|
|
85
|
-
}
|
|
86
|
-
const styles = _reactNative.StyleSheet.create({
|
|
87
|
-
wrap: {
|
|
88
|
-
width: 24,
|
|
89
|
-
height: 24,
|
|
90
|
-
borderRadius: 6,
|
|
91
|
-
backgroundColor: _sharedUi.night.color.fill,
|
|
92
|
-
alignItems: "center",
|
|
93
|
-
justifyContent: "center"
|
|
94
|
-
}
|
|
95
|
-
});
|
|
96
|
-
//# sourceMappingURL=icons.js.map
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.BlockIcon=BlockIcon;var _reactNative=require("react-native"),_sharedUi=require("@buoy-gg/shared-ui"),_jsxRuntime=require("react/jsx-runtime");function BlockIcon({name:e,size:r=14}){const s=_sharedUi.night.color.textSecondary,i=(()=>{switch(e){case"network":return(0,_jsxRuntime.jsx)(_sharedUi.Globe,{size:r,color:s});case"storage":return(0,_jsxRuntime.jsx)(_sharedUi.Database,{size:r,color:s});case"route":return(0,_jsxRuntime.jsx)(_sharedUi.Navigation,{size:r,color:s});case"screen":return(0,_jsxRuntime.jsx)(_sharedUi.Eye,{size:r,color:s});case"user":return(0,_jsxRuntime.jsx)(_sharedUi.User,{size:r,color:s});case"image":return(0,_jsxRuntime.jsx)(_sharedUi.Image,{size:r,color:s});case"check":return(0,_jsxRuntime.jsx)(_sharedUi.Check,{size:r,color:_sharedUi.night.color.accent});case"warn":return(0,_jsxRuntime.jsx)(_sharedUi.AlertTriangle,{size:r,color:_sharedUi.night.color.warning});case"info":return(0,_jsxRuntime.jsx)(_sharedUi.Info,{size:r,color:_sharedUi.night.color.info});case"store":case"query":return(0,_jsxRuntime.jsx)(_sharedUi.Layers,{size:r,color:s});case"clock":return(0,_jsxRuntime.jsx)(_sharedUi.Clock,{size:r,color:s})}})();return(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.wrap,children:i})}const styles=_reactNative.StyleSheet.create({wrap:{width:24,height:24,borderRadius:6,backgroundColor:_sharedUi.night.color.fill,alignItems:"center",justifyContent:"center"}});
|
|
@@ -1,95 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
Object.defineProperty(exports, "ActionRow", {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: function () {
|
|
9
|
-
return _primitives.ActionRow;
|
|
10
|
-
}
|
|
11
|
-
});
|
|
12
|
-
Object.defineProperty(exports, "BlockHandlersProvider", {
|
|
13
|
-
enumerable: true,
|
|
14
|
-
get: function () {
|
|
15
|
-
return _context.BlockHandlersProvider;
|
|
16
|
-
}
|
|
17
|
-
});
|
|
18
|
-
Object.defineProperty(exports, "BlockRenderer", {
|
|
19
|
-
enumerable: true,
|
|
20
|
-
get: function () {
|
|
21
|
-
return _BlockRenderer.BlockRenderer;
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
|
-
Object.defineProperty(exports, "Card", {
|
|
25
|
-
enumerable: true,
|
|
26
|
-
get: function () {
|
|
27
|
-
return _primitives.Card;
|
|
28
|
-
}
|
|
29
|
-
});
|
|
30
|
-
Object.defineProperty(exports, "EditableUserBubble", {
|
|
31
|
-
enumerable: true,
|
|
32
|
-
get: function () {
|
|
33
|
-
return _ChromePrototypes.EditableUserBubble;
|
|
34
|
-
}
|
|
35
|
-
});
|
|
36
|
-
Object.defineProperty(exports, "ElapsedRow", {
|
|
37
|
-
enumerable: true,
|
|
38
|
-
get: function () {
|
|
39
|
-
return _ChromePrototypes.ElapsedRow;
|
|
40
|
-
}
|
|
41
|
-
});
|
|
42
|
-
Object.defineProperty(exports, "LivePill", {
|
|
43
|
-
enumerable: true,
|
|
44
|
-
get: function () {
|
|
45
|
-
return _ExtraBlocks.LivePill;
|
|
46
|
-
}
|
|
47
|
-
});
|
|
48
|
-
Object.defineProperty(exports, "MessageActions", {
|
|
49
|
-
enumerable: true,
|
|
50
|
-
get: function () {
|
|
51
|
-
return _ChromePrototypes.MessageActions;
|
|
52
|
-
}
|
|
53
|
-
});
|
|
54
|
-
Object.defineProperty(exports, "ProvenanceBadge", {
|
|
55
|
-
enumerable: true,
|
|
56
|
-
get: function () {
|
|
57
|
-
return _primitives.ProvenanceBadge;
|
|
58
|
-
}
|
|
59
|
-
});
|
|
60
|
-
Object.defineProperty(exports, "QueuedComposer", {
|
|
61
|
-
enumerable: true,
|
|
62
|
-
get: function () {
|
|
63
|
-
return _ChromePrototypes.QueuedComposer;
|
|
64
|
-
}
|
|
65
|
-
});
|
|
66
|
-
Object.defineProperty(exports, "ReasoningStrip", {
|
|
67
|
-
enumerable: true,
|
|
68
|
-
get: function () {
|
|
69
|
-
return _ChromePrototypes.ReasoningStrip;
|
|
70
|
-
}
|
|
71
|
-
});
|
|
72
|
-
Object.defineProperty(exports, "ReloadDivider", {
|
|
73
|
-
enumerable: true,
|
|
74
|
-
get: function () {
|
|
75
|
-
return _ChromePrototypes.ReloadDivider;
|
|
76
|
-
}
|
|
77
|
-
});
|
|
78
|
-
Object.defineProperty(exports, "Timestamp", {
|
|
79
|
-
enumerable: true,
|
|
80
|
-
get: function () {
|
|
81
|
-
return _ChromePrototypes.Timestamp;
|
|
82
|
-
}
|
|
83
|
-
});
|
|
84
|
-
Object.defineProperty(exports, "useBlockHandlers", {
|
|
85
|
-
enumerable: true,
|
|
86
|
-
get: function () {
|
|
87
|
-
return _context.useBlockHandlers;
|
|
88
|
-
}
|
|
89
|
-
});
|
|
90
|
-
var _BlockRenderer = require("./BlockRenderer");
|
|
91
|
-
var _context = require("./context");
|
|
92
|
-
var _primitives = require("./primitives");
|
|
93
|
-
var _ChromePrototypes = require("./ChromePrototypes");
|
|
94
|
-
var _ExtraBlocks = require("./ExtraBlocks");
|
|
95
|
-
//# sourceMappingURL=index.js.map
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"ActionRow",{enumerable:!0,get:function(){return _primitives.ActionRow}}),Object.defineProperty(exports,"BlockHandlersProvider",{enumerable:!0,get:function(){return _context.BlockHandlersProvider}}),Object.defineProperty(exports,"BlockRenderer",{enumerable:!0,get:function(){return _BlockRenderer.BlockRenderer}}),Object.defineProperty(exports,"Card",{enumerable:!0,get:function(){return _primitives.Card}}),Object.defineProperty(exports,"EditableUserBubble",{enumerable:!0,get:function(){return _ChromePrototypes.EditableUserBubble}}),Object.defineProperty(exports,"ElapsedRow",{enumerable:!0,get:function(){return _ChromePrototypes.ElapsedRow}}),Object.defineProperty(exports,"LivePill",{enumerable:!0,get:function(){return _ExtraBlocks.LivePill}}),Object.defineProperty(exports,"MessageActions",{enumerable:!0,get:function(){return _ChromePrototypes.MessageActions}}),Object.defineProperty(exports,"ProvenanceBadge",{enumerable:!0,get:function(){return _primitives.ProvenanceBadge}}),Object.defineProperty(exports,"QueuedComposer",{enumerable:!0,get:function(){return _ChromePrototypes.QueuedComposer}}),Object.defineProperty(exports,"ReasoningStrip",{enumerable:!0,get:function(){return _ChromePrototypes.ReasoningStrip}}),Object.defineProperty(exports,"ReloadDivider",{enumerable:!0,get:function(){return _ChromePrototypes.ReloadDivider}}),Object.defineProperty(exports,"Timestamp",{enumerable:!0,get:function(){return _ChromePrototypes.Timestamp}}),Object.defineProperty(exports,"useBlockHandlers",{enumerable:!0,get:function(){return _context.useBlockHandlers}});var _BlockRenderer=require("./BlockRenderer"),_context=require("./context"),_primitives=require("./primitives"),_ChromePrototypes=require("./ChromePrototypes"),_ExtraBlocks=require("./ExtraBlocks");
|
|
@@ -1,55 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _vitest = require("vitest");
|
|
4
|
-
var _DataBlocks = require("./DataBlocks");
|
|
5
|
-
/**
|
|
6
|
-
* A list row can carry a picture AND an action, and both want the tap. These
|
|
7
|
-
* are the rules that keep them apart — see `listRowBehaviour`.
|
|
8
|
-
*/
|
|
9
|
-
(0, _vitest.describe)("listRowBehaviour", () => {
|
|
10
|
-
(0, _vitest.it)("a plain row does nothing on tap", () => {
|
|
11
|
-
(0, _vitest.expect)((0, _DataBlocks.listRowBehaviour)({})).toEqual({
|
|
12
|
-
canExpand: false,
|
|
13
|
-
rowRunsAction: false,
|
|
14
|
-
actionIsOwnControl: false
|
|
15
|
-
});
|
|
16
|
-
});
|
|
17
|
-
(0, _vitest.it)("a row with a picture opens it", () => {
|
|
18
|
-
(0, _vitest.expect)((0, _DataBlocks.listRowBehaviour)({
|
|
19
|
-
image: "https://x/1.png"
|
|
20
|
-
})).toEqual({
|
|
21
|
-
canExpand: true,
|
|
22
|
-
rowRunsAction: false,
|
|
23
|
-
actionIsOwnControl: false
|
|
24
|
-
});
|
|
25
|
-
});
|
|
26
|
-
(0, _vitest.it)("a row with only an action keeps running it from the whole row", () => {
|
|
27
|
-
(0, _vitest.expect)((0, _DataBlocks.listRowBehaviour)({
|
|
28
|
-
action: {
|
|
29
|
-
label: "Retry",
|
|
30
|
-
send: "retry"
|
|
31
|
-
}
|
|
32
|
-
})).toEqual({
|
|
33
|
-
canExpand: false,
|
|
34
|
-
rowRunsAction: true,
|
|
35
|
-
actionIsOwnControl: false
|
|
36
|
-
});
|
|
37
|
-
});
|
|
38
|
-
(0, _vitest.it)("with BOTH, the body opens the picture and the action gets its own control", () => {
|
|
39
|
-
const b = (0, _DataBlocks.listRowBehaviour)({
|
|
40
|
-
image: "https://x/1.png",
|
|
41
|
-
action: {
|
|
42
|
-
label: "Retry",
|
|
43
|
-
send: "retry"
|
|
44
|
-
}
|
|
45
|
-
});
|
|
46
|
-
(0, _vitest.expect)(b).toEqual({
|
|
47
|
-
canExpand: true,
|
|
48
|
-
rowRunsAction: false,
|
|
49
|
-
actionIsOwnControl: true
|
|
50
|
-
});
|
|
51
|
-
// The row body must never be the action's target — that is the whole point.
|
|
52
|
-
(0, _vitest.expect)(b.rowRunsAction).toBe(false);
|
|
53
|
-
});
|
|
54
|
-
});
|
|
55
|
-
//# sourceMappingURL=listRow.test.js.map
|
|
1
|
+
"use strict";var _vitest=require("vitest"),_DataBlocks=require("./DataBlocks");(0,_vitest.describe)("listRowBehaviour",()=>{(0,_vitest.it)("a plain row does nothing on tap",()=>{(0,_vitest.expect)((0,_DataBlocks.listRowBehaviour)({})).toEqual({canExpand:!1,rowRunsAction:!1,actionIsOwnControl:!1})}),(0,_vitest.it)("a row with a picture opens it",()=>{(0,_vitest.expect)((0,_DataBlocks.listRowBehaviour)({image:"https://x/1.png"})).toEqual({canExpand:!0,rowRunsAction:!1,actionIsOwnControl:!1})}),(0,_vitest.it)("a row with only an action keeps running it from the whole row",()=>{(0,_vitest.expect)((0,_DataBlocks.listRowBehaviour)({action:{label:"Retry",send:"retry"}})).toEqual({canExpand:!1,rowRunsAction:!0,actionIsOwnControl:!1})}),(0,_vitest.it)("with BOTH, the body opens the picture and the action gets its own control",()=>{const t=(0,_DataBlocks.listRowBehaviour)({image:"https://x/1.png",action:{label:"Retry",send:"retry"}});(0,_vitest.expect)(t).toEqual({canExpand:!0,rowRunsAction:!1,actionIsOwnControl:!0}),(0,_vitest.expect)(t.rowRunsAction).toBe(!1)})});
|
|
@@ -1,34 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.pageState = pageState;
|
|
7
|
-
/**
|
|
8
|
-
* The arithmetic behind a block's "+N more" footer, separated from the hook so
|
|
9
|
-
* it can be tested without a renderer.
|
|
10
|
-
*
|
|
11
|
-
* The rule that matters: a control is offered ONLY when it changes what is on
|
|
12
|
-
* screen. The previous version derived "+N more" from a `total` the source
|
|
13
|
-
* reported while deriving the tap target from the array actually in hand, so a
|
|
14
|
-
* block holding five items and claiming six rendered a "+1 more" with nothing
|
|
15
|
-
* to reveal — a button that did nothing when tapped. This takes a count and a
|
|
16
|
-
* limit and nothing else, so `canExpand` is the same fact as `hidden > 0`.
|
|
17
|
-
*/
|
|
18
|
-
|
|
19
|
-
function pageState(count, cap, limit, step) {
|
|
20
|
-
const shown = Math.min(limit, count);
|
|
21
|
-
const hidden = Math.max(0, count - shown);
|
|
22
|
-
// A block can be re-rendered in place with a shorter list than the one the
|
|
23
|
-
// limit was raised for; collapsing back to a cap nothing exceeds would move
|
|
24
|
-
// nothing, so it is not offered.
|
|
25
|
-
const expanded = limit > cap && count > cap;
|
|
26
|
-
return {
|
|
27
|
-
hidden,
|
|
28
|
-
next: Math.min(hidden, step),
|
|
29
|
-
expanded,
|
|
30
|
-
canExpand: hidden > 0,
|
|
31
|
-
canCollapse: expanded
|
|
32
|
-
};
|
|
33
|
-
}
|
|
34
|
-
//# sourceMappingURL=pageState.js.map
|
|
1
|
+
"use strict";function pageState(e,t,a,n){const p=Math.min(a,e),d=Math.max(0,e-p),o=a>t&&e>t;return{hidden:d,next:Math.min(d,n),expanded:o,canExpand:d>0,canCollapse:o}}Object.defineProperty(exports,"__esModule",{value:!0}),exports.pageState=pageState;
|
|
@@ -1,57 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _vitest = require("vitest");
|
|
4
|
-
var _pageState = require("./pageState");
|
|
5
|
-
/**
|
|
6
|
-
* The "+N more" footer's arithmetic.
|
|
7
|
-
*
|
|
8
|
-
* The bug this covers: a list block showed "+1 more" that did nothing when
|
|
9
|
-
* tapped. The count came from the `total` the model reported, the tap target
|
|
10
|
-
* came from the array actually in hand, and the two disagreed — so the footer
|
|
11
|
-
* advertised a row that was never sent. Every case below is about a control
|
|
12
|
-
* being offered if and only if it changes the screen.
|
|
13
|
-
*/
|
|
14
|
-
|
|
15
|
-
const CAP = 10;
|
|
16
|
-
const STEP = 5;
|
|
17
|
-
const at = (count, limit) => (0, _pageState.pageState)(count, CAP, limit, STEP);
|
|
18
|
-
(0, _vitest.describe)("what the footer offers", () => {
|
|
19
|
-
(0, _vitest.it)("offers nothing when everything already fits", () => {
|
|
20
|
-
const s = at(4, CAP);
|
|
21
|
-
(0, _vitest.expect)(s.hidden).toBe(0);
|
|
22
|
-
(0, _vitest.expect)(s.canExpand).toBe(false);
|
|
23
|
-
(0, _vitest.expect)(s.canCollapse).toBe(false);
|
|
24
|
-
});
|
|
25
|
-
(0, _vitest.it)("never offers an expand that reveals nothing", () => {
|
|
26
|
-
// The dead "+1 more" this replaced: the label was drawn from a `total` the
|
|
27
|
-
// source reported, the tap target from the array in hand. `pageState` is
|
|
28
|
-
// given only the array, so a control it offers always moves something.
|
|
29
|
-
(0, _vitest.expect)(at(5, CAP).canExpand).toBe(false);
|
|
30
|
-
});
|
|
31
|
-
(0, _vitest.it)("reveals a page at a time rather than the whole list", () => {
|
|
32
|
-
// 100 items, cap 10: 10 → 15 → 20 → 25, exactly one step per tap.
|
|
33
|
-
(0, _vitest.expect)(at(100, 10).next).toBe(5);
|
|
34
|
-
(0, _vitest.expect)(at(100, 15).next).toBe(5);
|
|
35
|
-
(0, _vitest.expect)(at(100, 20).hidden).toBe(80);
|
|
36
|
-
});
|
|
37
|
-
(0, _vitest.it)("offers only the remainder on the last page", () => {
|
|
38
|
-
// 12 items shown to 10: two left, so the label promises two, not five.
|
|
39
|
-
(0, _vitest.expect)(at(12, 10).next).toBe(2);
|
|
40
|
-
(0, _vitest.expect)(at(12, 12).canExpand).toBe(false);
|
|
41
|
-
});
|
|
42
|
-
(0, _vitest.it)("offers the way back only once something is expanded", () => {
|
|
43
|
-
(0, _vitest.expect)(at(100, 10).canCollapse).toBe(false);
|
|
44
|
-
(0, _vitest.expect)(at(100, 15).canCollapse).toBe(true);
|
|
45
|
-
(0, _vitest.expect)(at(100, 15).expanded).toBe(true);
|
|
46
|
-
});
|
|
47
|
-
(0, _vitest.it)("does not offer a collapse that moves nothing", () => {
|
|
48
|
-
// A block re-rendered in place with a shorter list than the limit was
|
|
49
|
-
// raised for: 3 items under a limit of 20. Folding back to 10 would look
|
|
50
|
-
// identical, so it is not offered.
|
|
51
|
-
const s = at(3, 20);
|
|
52
|
-
(0, _vitest.expect)(s.canCollapse).toBe(false);
|
|
53
|
-
(0, _vitest.expect)(s.expanded).toBe(false);
|
|
54
|
-
(0, _vitest.expect)(s.hidden).toBe(0);
|
|
55
|
-
});
|
|
56
|
-
});
|
|
57
|
-
//# sourceMappingURL=pageState.test.js.map
|
|
1
|
+
"use strict";var _vitest=require("vitest"),_pageState=require("./pageState");const CAP=10,STEP=5,at=(t,e)=>(0,_pageState.pageState)(t,10,e,5);(0,_vitest.describe)("what the footer offers",()=>{(0,_vitest.it)("offers nothing when everything already fits",()=>{const t=at(4,10);(0,_vitest.expect)(t.hidden).toBe(0),(0,_vitest.expect)(t.canExpand).toBe(!1),(0,_vitest.expect)(t.canCollapse).toBe(!1)}),(0,_vitest.it)("never offers an expand that reveals nothing",()=>{(0,_vitest.expect)(at(5,10).canExpand).toBe(!1)}),(0,_vitest.it)("reveals a page at a time rather than the whole list",()=>{(0,_vitest.expect)(at(100,10).next).toBe(5),(0,_vitest.expect)(at(100,15).next).toBe(5),(0,_vitest.expect)(at(100,20).hidden).toBe(80)}),(0,_vitest.it)("offers only the remainder on the last page",()=>{(0,_vitest.expect)(at(12,10).next).toBe(2),(0,_vitest.expect)(at(12,12).canExpand).toBe(!1)}),(0,_vitest.it)("offers the way back only once something is expanded",()=>{(0,_vitest.expect)(at(100,10).canCollapse).toBe(!1),(0,_vitest.expect)(at(100,15).canCollapse).toBe(!0),(0,_vitest.expect)(at(100,15).expanded).toBe(!0)}),(0,_vitest.it)("does not offer a collapse that moves nothing",()=>{const t=at(3,20);(0,_vitest.expect)(t.canCollapse).toBe(!1),(0,_vitest.expect)(t.expanded).toBe(!1),(0,_vitest.expect)(t.hidden).toBe(0)})});
|