@buoy-gg/time-machine 7.0.41 → 7.0.43

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.
Files changed (172) hide show
  1. package/lib/commonjs/components/HeaderActions.js +1 -91
  2. package/lib/commonjs/components/HeaderReloadButton.js +1 -58
  3. package/lib/commonjs/components/TimeMachineBody.js +1 -282
  4. package/lib/commonjs/components/TimeMachineModal.js +1 -74
  5. package/lib/commonjs/components/confirm.js +2 -38
  6. package/lib/commonjs/components/floating/NamePromptModal.js +1 -193
  7. package/lib/commonjs/components/floating/TimeMachineFloatingTool.js +1 -715
  8. package/lib/commonjs/components/floating/armedPoint.js +1 -92
  9. package/lib/commonjs/components/floating/barSettings.js +1 -66
  10. package/lib/commonjs/components/format.js +1 -24
  11. package/lib/commonjs/components/list/CaptureBar.js +1 -97
  12. package/lib/commonjs/components/list/RestoreOutcomeCard.js +1 -175
  13. package/lib/commonjs/components/list/SnapshotRow.js +1 -170
  14. package/lib/commonjs/components/list/SourcesStrip.js +1 -172
  15. package/lib/commonjs/components/list/UndoDeleteBar.js +1 -85
  16. package/lib/commonjs/components/list/WipeAllRow.js +1 -46
  17. package/lib/commonjs/components/preview/ItemDiffPanel.js +1 -79
  18. package/lib/commonjs/components/preview/PreviewFlow.js +1 -51
  19. package/lib/commonjs/components/preview/RestorePointNameRow.js +1 -83
  20. package/lib/commonjs/components/preview/RestorePreviewScreen.js +1 -1010
  21. package/lib/commonjs/components/preview/verdictMeta.js +1 -58
  22. package/lib/commonjs/components/sources.js +1 -83
  23. package/lib/commonjs/hooks/useTimeMachine.js +1 -24
  24. package/lib/commonjs/index.js +1 -161
  25. package/lib/commonjs/preset.js +1 -56
  26. package/lib/commonjs/store/routeRestore.js +1 -188
  27. package/lib/commonjs/store/snapshotVault.js +1 -186
  28. package/lib/commonjs/store/sourceIds.js +1 -9
  29. package/lib/commonjs/store/sourceSettings.js +1 -79
  30. package/lib/commonjs/store/timeMachineStore.js +1 -848
  31. package/lib/commonjs/sync/timeMachineSyncAdapter.js +1 -258
  32. package/lib/commonjs/ui/SwipeActionsRow.js +1 -178
  33. package/lib/commonjs/ui/primitives.js +1 -172
  34. package/lib/commonjs/ui/tmTheme.js +1 -118
  35. package/lib/module/components/HeaderActions.js +1 -85
  36. package/lib/module/components/HeaderReloadButton.js +1 -53
  37. package/lib/module/components/TimeMachineBody.js +1 -277
  38. package/lib/module/components/TimeMachineModal.js +1 -68
  39. package/lib/module/components/confirm.js +2 -33
  40. package/lib/module/components/floating/NamePromptModal.js +1 -188
  41. package/lib/module/components/floating/TimeMachineFloatingTool.js +1 -708
  42. package/lib/module/components/floating/armedPoint.js +1 -82
  43. package/lib/module/components/floating/barSettings.js +1 -57
  44. package/lib/module/components/format.js +1 -19
  45. package/lib/module/components/list/CaptureBar.js +1 -92
  46. package/lib/module/components/list/RestoreOutcomeCard.js +1 -169
  47. package/lib/module/components/list/SnapshotRow.js +1 -167
  48. package/lib/module/components/list/SourcesStrip.js +1 -169
  49. package/lib/module/components/list/UndoDeleteBar.js +1 -82
  50. package/lib/module/components/list/WipeAllRow.js +1 -41
  51. package/lib/module/components/preview/ItemDiffPanel.js +1 -74
  52. package/lib/module/components/preview/PreviewFlow.js +1 -46
  53. package/lib/module/components/preview/RestorePointNameRow.js +1 -78
  54. package/lib/module/components/preview/RestorePreviewScreen.js +1 -1005
  55. package/lib/module/components/preview/verdictMeta.js +1 -54
  56. package/lib/module/components/sources.js +1 -73
  57. package/lib/module/hooks/useTimeMachine.js +1 -19
  58. package/lib/module/index.js +1 -46
  59. package/lib/module/preset.js +1 -51
  60. package/lib/module/store/routeRestore.js +1 -176
  61. package/lib/module/store/snapshotVault.js +1 -170
  62. package/lib/module/store/sourceIds.js +1 -5
  63. package/lib/module/store/sourceSettings.js +1 -69
  64. package/lib/module/store/timeMachineStore.js +1 -839
  65. package/lib/module/sync/timeMachineSyncAdapter.js +1 -253
  66. package/lib/module/ui/SwipeActionsRow.js +1 -173
  67. package/lib/module/ui/primitives.js +1 -164
  68. package/lib/module/ui/tmTheme.js +1 -114
  69. package/lib/web/index.mjs +2 -3
  70. package/package.json +7 -11
  71. package/lib/commonjs/components/HeaderActions.js.map +0 -1
  72. package/lib/commonjs/components/HeaderReloadButton.js.map +0 -1
  73. package/lib/commonjs/components/TimeMachineBody.js.map +0 -1
  74. package/lib/commonjs/components/TimeMachineModal.js.map +0 -1
  75. package/lib/commonjs/components/confirm.js.map +0 -1
  76. package/lib/commonjs/components/floating/NamePromptModal.js.map +0 -1
  77. package/lib/commonjs/components/floating/TimeMachineFloatingTool.js.map +0 -1
  78. package/lib/commonjs/components/floating/armedPoint.js.map +0 -1
  79. package/lib/commonjs/components/floating/barSettings.js.map +0 -1
  80. package/lib/commonjs/components/format.js.map +0 -1
  81. package/lib/commonjs/components/list/CaptureBar.js.map +0 -1
  82. package/lib/commonjs/components/list/RestoreOutcomeCard.js.map +0 -1
  83. package/lib/commonjs/components/list/SnapshotRow.js.map +0 -1
  84. package/lib/commonjs/components/list/SourcesStrip.js.map +0 -1
  85. package/lib/commonjs/components/list/UndoDeleteBar.js.map +0 -1
  86. package/lib/commonjs/components/list/WipeAllRow.js.map +0 -1
  87. package/lib/commonjs/components/preview/ItemDiffPanel.js.map +0 -1
  88. package/lib/commonjs/components/preview/PreviewFlow.js.map +0 -1
  89. package/lib/commonjs/components/preview/RestorePointNameRow.js.map +0 -1
  90. package/lib/commonjs/components/preview/RestorePreviewScreen.js.map +0 -1
  91. package/lib/commonjs/components/preview/verdictMeta.js.map +0 -1
  92. package/lib/commonjs/components/sources.js.map +0 -1
  93. package/lib/commonjs/hooks/useTimeMachine.js.map +0 -1
  94. package/lib/commonjs/index.js.map +0 -1
  95. package/lib/commonjs/preset.js.map +0 -1
  96. package/lib/commonjs/store/routeRestore.js.map +0 -1
  97. package/lib/commonjs/store/snapshotVault.js.map +0 -1
  98. package/lib/commonjs/store/sourceIds.js.map +0 -1
  99. package/lib/commonjs/store/sourceSettings.js.map +0 -1
  100. package/lib/commonjs/store/timeMachineStore.js.map +0 -1
  101. package/lib/commonjs/sync/timeMachineSyncAdapter.js.map +0 -1
  102. package/lib/commonjs/ui/SwipeActionsRow.js.map +0 -1
  103. package/lib/commonjs/ui/primitives.js.map +0 -1
  104. package/lib/commonjs/ui/tmTheme.js.map +0 -1
  105. package/lib/module/components/HeaderActions.js.map +0 -1
  106. package/lib/module/components/HeaderReloadButton.js.map +0 -1
  107. package/lib/module/components/TimeMachineBody.js.map +0 -1
  108. package/lib/module/components/TimeMachineModal.js.map +0 -1
  109. package/lib/module/components/confirm.js.map +0 -1
  110. package/lib/module/components/floating/NamePromptModal.js.map +0 -1
  111. package/lib/module/components/floating/TimeMachineFloatingTool.js.map +0 -1
  112. package/lib/module/components/floating/armedPoint.js.map +0 -1
  113. package/lib/module/components/floating/barSettings.js.map +0 -1
  114. package/lib/module/components/format.js.map +0 -1
  115. package/lib/module/components/list/CaptureBar.js.map +0 -1
  116. package/lib/module/components/list/RestoreOutcomeCard.js.map +0 -1
  117. package/lib/module/components/list/SnapshotRow.js.map +0 -1
  118. package/lib/module/components/list/SourcesStrip.js.map +0 -1
  119. package/lib/module/components/list/UndoDeleteBar.js.map +0 -1
  120. package/lib/module/components/list/WipeAllRow.js.map +0 -1
  121. package/lib/module/components/preview/ItemDiffPanel.js.map +0 -1
  122. package/lib/module/components/preview/PreviewFlow.js.map +0 -1
  123. package/lib/module/components/preview/RestorePointNameRow.js.map +0 -1
  124. package/lib/module/components/preview/RestorePreviewScreen.js.map +0 -1
  125. package/lib/module/components/preview/verdictMeta.js.map +0 -1
  126. package/lib/module/components/sources.js.map +0 -1
  127. package/lib/module/hooks/useTimeMachine.js.map +0 -1
  128. package/lib/module/index.js.map +0 -1
  129. package/lib/module/preset.js.map +0 -1
  130. package/lib/module/store/routeRestore.js.map +0 -1
  131. package/lib/module/store/snapshotVault.js.map +0 -1
  132. package/lib/module/store/sourceIds.js.map +0 -1
  133. package/lib/module/store/sourceSettings.js.map +0 -1
  134. package/lib/module/store/timeMachineStore.js.map +0 -1
  135. package/lib/module/sync/timeMachineSyncAdapter.js.map +0 -1
  136. package/lib/module/ui/SwipeActionsRow.js.map +0 -1
  137. package/lib/module/ui/primitives.js.map +0 -1
  138. package/lib/module/ui/tmTheme.js.map +0 -1
  139. package/lib/typescript/components/HeaderActions.d.ts.map +0 -1
  140. package/lib/typescript/components/HeaderReloadButton.d.ts.map +0 -1
  141. package/lib/typescript/components/TimeMachineBody.d.ts.map +0 -1
  142. package/lib/typescript/components/TimeMachineModal.d.ts.map +0 -1
  143. package/lib/typescript/components/confirm.d.ts.map +0 -1
  144. package/lib/typescript/components/floating/NamePromptModal.d.ts.map +0 -1
  145. package/lib/typescript/components/floating/TimeMachineFloatingTool.d.ts.map +0 -1
  146. package/lib/typescript/components/floating/armedPoint.d.ts.map +0 -1
  147. package/lib/typescript/components/floating/barSettings.d.ts.map +0 -1
  148. package/lib/typescript/components/format.d.ts.map +0 -1
  149. package/lib/typescript/components/list/CaptureBar.d.ts.map +0 -1
  150. package/lib/typescript/components/list/RestoreOutcomeCard.d.ts.map +0 -1
  151. package/lib/typescript/components/list/SnapshotRow.d.ts.map +0 -1
  152. package/lib/typescript/components/list/SourcesStrip.d.ts.map +0 -1
  153. package/lib/typescript/components/list/UndoDeleteBar.d.ts.map +0 -1
  154. package/lib/typescript/components/list/WipeAllRow.d.ts.map +0 -1
  155. package/lib/typescript/components/preview/ItemDiffPanel.d.ts.map +0 -1
  156. package/lib/typescript/components/preview/PreviewFlow.d.ts.map +0 -1
  157. package/lib/typescript/components/preview/RestorePointNameRow.d.ts.map +0 -1
  158. package/lib/typescript/components/preview/RestorePreviewScreen.d.ts.map +0 -1
  159. package/lib/typescript/components/preview/verdictMeta.d.ts.map +0 -1
  160. package/lib/typescript/components/sources.d.ts.map +0 -1
  161. package/lib/typescript/hooks/useTimeMachine.d.ts.map +0 -1
  162. package/lib/typescript/index.d.ts.map +0 -1
  163. package/lib/typescript/preset.d.ts.map +0 -1
  164. package/lib/typescript/store/routeRestore.d.ts.map +0 -1
  165. package/lib/typescript/store/snapshotVault.d.ts.map +0 -1
  166. package/lib/typescript/store/sourceIds.d.ts.map +0 -1
  167. package/lib/typescript/store/sourceSettings.d.ts.map +0 -1
  168. package/lib/typescript/store/timeMachineStore.d.ts.map +0 -1
  169. package/lib/typescript/sync/timeMachineSyncAdapter.d.ts.map +0 -1
  170. package/lib/typescript/ui/SwipeActionsRow.d.ts.map +0 -1
  171. package/lib/typescript/ui/primitives.d.ts.map +0 -1
  172. package/lib/typescript/ui/tmTheme.d.ts.map +0 -1
@@ -1,188 +1 @@
1
- "use strict";
2
-
3
- /**
4
- * "Name this restore point": the dialog `+` on the restore bar opens.
5
- *
6
- * A real Modal rather than a panel under the strip, so it sits centered over
7
- * the app, above the keyboard, wherever the strip happens to be. An empty
8
- * name is allowed: the store then names the point after the screen and the
9
- * time, the same default the tool's capture bar uses.
10
- */
11
- import { useEffect, useState } from "react";
12
- import { KeyboardAvoidingView, Modal, Platform, Pressable, StyleSheet, Text, TextInput, TouchableOpacity, View } from "react-native";
13
- import { night } from "@buoy-gg/shared-ui";
14
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
15
- export function NamePromptModal({
16
- visible,
17
- summary,
18
- onCapture,
19
- onCancel
20
- }) {
21
- const [name, setName] = useState("");
22
- // Every opening starts blank, so a cancelled name never comes back.
23
- useEffect(() => {
24
- if (visible) setName("");
25
- }, [visible]);
26
- const submit = () => onCapture(name.trim());
27
- return /*#__PURE__*/_jsx(Modal, {
28
- visible: visible,
29
- transparent: true,
30
- animationType: "fade",
31
- onRequestClose: onCancel,
32
- statusBarTranslucent: true,
33
- children: /*#__PURE__*/_jsx(KeyboardAvoidingView, {
34
- behavior: Platform.OS === "ios" ? "padding" : undefined,
35
- style: styles.fill,
36
- children: /*#__PURE__*/_jsx(Pressable, {
37
- style: styles.backdrop,
38
- onPress: onCancel,
39
- accessibilityLabel: "Cancel",
40
- testID: "time-machine-bar-name-backdrop",
41
- children: /*#__PURE__*/_jsxs(Pressable, {
42
- style: styles.card,
43
- onPress: event => event.stopPropagation(),
44
- testID: "time-machine-bar-name-panel"
45
- // A Pressable is one accessibility element by default, which
46
- // hid the field and both buttons from VoiceOver and from tests.
47
- ,
48
- accessible: false,
49
- children: [/*#__PURE__*/_jsx(Text, {
50
- style: styles.title,
51
- children: "Name this restore point"
52
- }), summary ? /*#__PURE__*/_jsx(Text, {
53
- style: styles.summary,
54
- testID: "time-machine-bar-name-summary",
55
- children: summary
56
- }) : null, /*#__PURE__*/_jsx(TextInput, {
57
- testID: "time-machine-bar-name-input",
58
- accessibilityLabel: "Restore point name",
59
- value: name,
60
- onChangeText: setName,
61
- onSubmitEditing: submit,
62
- placeholder: "Screen and time, if left empty",
63
- placeholderTextColor: night.color.placeholder,
64
- autoFocus: true,
65
- autoCorrect: false
66
- // Names are labels, not sentences: "bag" should stay "bag".
67
- ,
68
- autoCapitalize: "none",
69
- returnKeyType: "done",
70
- style: styles.input
71
- }), /*#__PURE__*/_jsx(Text, {
72
- style: styles.hint,
73
- children: "Captures the state the app is in right now and arms it on the bar."
74
- }), /*#__PURE__*/_jsxs(View, {
75
- style: styles.actions,
76
- children: [/*#__PURE__*/_jsx(TouchableOpacity, {
77
- testID: "time-machine-bar-name-cancel",
78
- accessibilityRole: "button",
79
- onPress: onCancel,
80
- style: styles.secondary,
81
- children: /*#__PURE__*/_jsx(Text, {
82
- style: styles.secondaryText,
83
- children: "Cancel"
84
- })
85
- }), /*#__PURE__*/_jsx(TouchableOpacity, {
86
- testID: "time-machine-bar-name-capture",
87
- accessibilityRole: "button",
88
- accessibilityLabel: "Capture and arm this restore point",
89
- onPress: submit,
90
- style: styles.primary,
91
- children: /*#__PURE__*/_jsx(Text, {
92
- style: styles.primaryText,
93
- children: "Capture"
94
- })
95
- })]
96
- })]
97
- })
98
- })
99
- })
100
- });
101
- }
102
- const styles = StyleSheet.create({
103
- fill: {
104
- flex: 1
105
- },
106
- backdrop: {
107
- flex: 1,
108
- backgroundColor: "rgba(0, 0, 0, 0.55)",
109
- alignItems: "center",
110
- justifyContent: "center",
111
- padding: 24
112
- },
113
- card: {
114
- width: "100%",
115
- maxWidth: 360,
116
- borderRadius: night.radius.sheet,
117
- borderWidth: 1,
118
- borderColor: night.color.separator,
119
- backgroundColor: night.color.surface,
120
- padding: 18,
121
- gap: 12,
122
- shadowColor: "#000",
123
- shadowOffset: {
124
- width: 0,
125
- height: 12
126
- },
127
- shadowOpacity: 0.4,
128
- shadowRadius: 24,
129
- elevation: 12
130
- },
131
- title: {
132
- color: night.color.text,
133
- fontSize: night.font.title,
134
- fontWeight: "600"
135
- },
136
- input: {
137
- minHeight: 44,
138
- borderRadius: night.radius.input,
139
- borderWidth: 1,
140
- borderColor: night.color.accentBorder,
141
- backgroundColor: night.color.surfaceElevated,
142
- color: night.color.text,
143
- fontSize: night.font.row,
144
- paddingHorizontal: 12
145
- },
146
- summary: {
147
- color: night.color.textTertiary,
148
- fontSize: night.font.caption,
149
- marginTop: -6
150
- },
151
- hint: {
152
- color: night.color.textSecondary,
153
- fontSize: night.font.caption,
154
- lineHeight: 18
155
- },
156
- actions: {
157
- flexDirection: "row",
158
- justifyContent: "flex-end",
159
- gap: 10,
160
- marginTop: 4
161
- },
162
- secondary: {
163
- minHeight: 40,
164
- paddingHorizontal: 14,
165
- borderRadius: night.radius.input,
166
- alignItems: "center",
167
- justifyContent: "center"
168
- },
169
- secondaryText: {
170
- color: night.color.textSecondary,
171
- fontSize: 14,
172
- fontWeight: "600"
173
- },
174
- primary: {
175
- minHeight: 40,
176
- paddingHorizontal: 18,
177
- borderRadius: night.radius.input,
178
- backgroundColor: night.color.accent,
179
- alignItems: "center",
180
- justifyContent: "center"
181
- },
182
- primaryText: {
183
- color: night.color.onAccent,
184
- fontSize: 14,
185
- fontWeight: "700"
186
- }
187
- });
188
- //# sourceMappingURL=NamePromptModal.js.map
1
+ "use strict";import{useEffect as y,useState as f}from"react";import{KeyboardAvoidingView as b,Modal as g,Platform as x,Pressable as d,StyleSheet as C,Text as r,TextInput as T,TouchableOpacity as m,View as S}from"react-native";import{night as e}from"@buoy-gg/shared-ui";import{jsx as o,jsxs as u}from"react/jsx-runtime";export function NamePromptModal({visible:i,summary:n,onCapture:p,onCancel:a}){const[s,l]=f("");y(()=>{if(i)l("")},[i]);const c=()=>p(s.trim());return o(g,{visible:i,transparent:true,animationType:"fade",onRequestClose:a,statusBarTranslucent:true,children:o(b,{behavior:x.OS==="ios"?"padding":void 0,style:t.fill,children:o(d,{style:t.backdrop,onPress:a,accessibilityLabel:"Cancel",testID:"time-machine-bar-name-backdrop",children:u(d,{style:t.card,onPress:h=>h.stopPropagation(),testID:"time-machine-bar-name-panel",accessible:false,children:[o(r,{style:t.title,children:"Name this restore point"}),n?o(r,{style:t.summary,testID:"time-machine-bar-name-summary",children:n}):null,o(T,{testID:"time-machine-bar-name-input",accessibilityLabel:"Restore point name",value:s,onChangeText:l,onSubmitEditing:c,placeholder:"Screen and time, if left empty",placeholderTextColor:e.color.placeholder,autoFocus:true,autoCorrect:false,autoCapitalize:"none",returnKeyType:"done",style:t.input}),o(r,{style:t.hint,children:"Captures the state the app is in right now and arms it on the bar."}),u(S,{style:t.actions,children:[o(m,{testID:"time-machine-bar-name-cancel",accessibilityRole:"button",onPress:a,style:t.secondary,children:o(r,{style:t.secondaryText,children:"Cancel"})}),o(m,{testID:"time-machine-bar-name-capture",accessibilityRole:"button",accessibilityLabel:"Capture and arm this restore point",onPress:c,style:t.primary,children:o(r,{style:t.primaryText,children:"Capture"})})]})]})})})})}const t=C.create({fill:{flex:1},backdrop:{flex:1,backgroundColor:"rgba(0, 0, 0, 0.55)",alignItems:"center",justifyContent:"center",padding:24},card:{width:"100%",maxWidth:360,borderRadius:e.radius.sheet,borderWidth:1,borderColor:e.color.separator,backgroundColor:e.color.surface,padding:18,gap:12,shadowColor:"#000",shadowOffset:{width:0,height:12},shadowOpacity:.4,shadowRadius:24,elevation:12},title:{color:e.color.text,fontSize:e.font.title,fontWeight:"600"},input:{minHeight:44,borderRadius:e.radius.input,borderWidth:1,borderColor:e.color.accentBorder,backgroundColor:e.color.surfaceElevated,color:e.color.text,fontSize:e.font.row,paddingHorizontal:12},summary:{color:e.color.textTertiary,fontSize:e.font.caption,marginTop:-6},hint:{color:e.color.textSecondary,fontSize:e.font.caption,lineHeight:18},actions:{flexDirection:"row",justifyContent:"flex-end",gap:10,marginTop:4},secondary:{minHeight:40,paddingHorizontal:14,borderRadius:e.radius.input,alignItems:"center",justifyContent:"center"},secondaryText:{color:e.color.textSecondary,fontSize:14,fontWeight:"600"},primary:{minHeight:40,paddingHorizontal:18,borderRadius:e.radius.input,backgroundColor:e.color.accent,alignItems:"center",justifyContent:"center"},primaryText:{color:e.color.onAccent,fontSize:14,fontWeight:"700"}});