@echoform/echo-ui 0.1.1 → 0.2.1
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 +57 -10
- package/dist/components/EchoChangeProfileNameModal.d.ts +59 -0
- package/dist/components/EchoChangeProfileNameModal.d.ts.map +1 -0
- package/dist/components/EchoChangeProfileNameModal.js +317 -0
- package/dist/components/EchoChangeProfileNameModal.js.map +1 -0
- package/dist/components/EchoColorPicker.d.ts +34 -0
- package/dist/components/EchoColorPicker.d.ts.map +1 -0
- package/dist/components/EchoColorPicker.js +206 -0
- package/dist/components/EchoColorPicker.js.map +1 -0
- package/dist/components/EchoConnectedAppsModal.d.ts +40 -0
- package/dist/components/EchoConnectedAppsModal.d.ts.map +1 -0
- package/dist/components/EchoConnectedAppsModal.js +220 -0
- package/dist/components/EchoConnectedAppsModal.js.map +1 -0
- package/dist/components/EchoDeleteProfilePanel.d.ts +63 -0
- package/dist/components/EchoDeleteProfilePanel.d.ts.map +1 -0
- package/dist/components/EchoDeleteProfilePanel.js +286 -0
- package/dist/components/EchoDeleteProfilePanel.js.map +1 -0
- package/dist/components/EchoDeletionIntercept.d.ts +39 -0
- package/dist/components/EchoDeletionIntercept.d.ts.map +1 -0
- package/dist/components/EchoDeletionIntercept.js +212 -0
- package/dist/components/EchoDeletionIntercept.js.map +1 -0
- package/dist/components/EchoDeletionStatusCard.d.ts +35 -0
- package/dist/components/EchoDeletionStatusCard.d.ts.map +1 -0
- package/dist/components/EchoDeletionStatusCard.js +156 -0
- package/dist/components/EchoDeletionStatusCard.js.map +1 -0
- package/dist/components/EchoEmblem.d.ts +1 -1
- package/dist/components/EchoEmblemPicker.d.ts +71 -0
- package/dist/components/EchoEmblemPicker.d.ts.map +1 -0
- package/dist/components/EchoEmblemPicker.js +490 -0
- package/dist/components/EchoEmblemPicker.js.map +1 -0
- package/dist/components/EchoErrorBanner.d.ts +17 -0
- package/dist/components/EchoErrorBanner.d.ts.map +1 -0
- package/dist/components/EchoErrorBanner.js +48 -0
- package/dist/components/EchoErrorBanner.js.map +1 -0
- package/dist/components/EchoFormField.d.ts +27 -0
- package/dist/components/EchoFormField.d.ts.map +1 -0
- package/dist/components/EchoFormField.js +49 -0
- package/dist/components/EchoFormField.js.map +1 -0
- package/dist/components/EchoLinkButton.d.ts +16 -0
- package/dist/components/EchoLinkButton.d.ts.map +1 -0
- package/dist/components/EchoLinkButton.js +37 -0
- package/dist/components/EchoLinkButton.js.map +1 -0
- package/dist/components/EchoMoreScreen.d.ts +47 -0
- package/dist/components/EchoMoreScreen.d.ts.map +1 -0
- package/dist/components/EchoMoreScreen.js +121 -0
- package/dist/components/EchoMoreScreen.js.map +1 -0
- package/dist/components/EchoPasswordField.d.ts +28 -0
- package/dist/components/EchoPasswordField.d.ts.map +1 -0
- package/dist/components/EchoPasswordField.js +67 -0
- package/dist/components/EchoPasswordField.js.map +1 -0
- package/dist/components/EchoPrimaryButton.d.ts +23 -0
- package/dist/components/EchoPrimaryButton.d.ts.map +1 -0
- package/dist/components/EchoPrimaryButton.js +54 -0
- package/dist/components/EchoPrimaryButton.js.map +1 -0
- package/dist/components/EchoProfileCard.d.ts +7 -3
- package/dist/components/EchoProfileCard.d.ts.map +1 -1
- package/dist/components/EchoProfileCard.js +5 -10
- package/dist/components/EchoProfileCard.js.map +1 -1
- package/dist/components/EchoProfileDivider.d.ts +14 -0
- package/dist/components/EchoProfileDivider.d.ts.map +1 -0
- package/dist/components/EchoProfileDivider.js +31 -0
- package/dist/components/EchoProfileDivider.js.map +1 -0
- package/dist/components/EchoProfileHero.d.ts +48 -0
- package/dist/components/EchoProfileHero.d.ts.map +1 -0
- package/dist/components/EchoProfileHero.js +215 -0
- package/dist/components/EchoProfileHero.js.map +1 -0
- package/dist/components/EchoProfileOverview.d.ts +18 -0
- package/dist/components/EchoProfileOverview.d.ts.map +1 -0
- package/dist/components/EchoProfileOverview.js +36 -0
- package/dist/components/EchoProfileOverview.js.map +1 -0
- package/dist/components/EchoProfileRow.d.ts +60 -0
- package/dist/components/EchoProfileRow.d.ts.map +1 -0
- package/dist/components/EchoProfileRow.js +113 -0
- package/dist/components/EchoProfileRow.js.map +1 -0
- package/dist/components/EchoProfileSection.d.ts +29 -0
- package/dist/components/EchoProfileSection.d.ts.map +1 -0
- package/dist/components/EchoProfileSection.js +58 -0
- package/dist/components/EchoProfileSection.js.map +1 -0
- package/dist/components/EchoRewardNotificationBanner.d.ts +61 -0
- package/dist/components/EchoRewardNotificationBanner.d.ts.map +1 -0
- package/dist/components/EchoRewardNotificationBanner.js +272 -0
- package/dist/components/EchoRewardNotificationBanner.js.map +1 -0
- package/dist/components/EchoSettingsRow.d.ts +24 -0
- package/dist/components/EchoSettingsRow.d.ts.map +1 -0
- package/dist/components/EchoSettingsRow.js +84 -0
- package/dist/components/EchoSettingsRow.js.map +1 -0
- package/dist/components/EchoSettingsSection.d.ts +16 -0
- package/dist/components/EchoSettingsSection.d.ts.map +1 -0
- package/dist/components/EchoSettingsSection.js +48 -0
- package/dist/components/EchoSettingsSection.js.map +1 -0
- package/dist/components/EchoSignOutButton.d.ts +28 -0
- package/dist/components/EchoSignOutButton.d.ts.map +1 -0
- package/dist/components/EchoSignOutButton.js +67 -0
- package/dist/components/EchoSignOutButton.js.map +1 -0
- package/dist/components/EchoSuccessBanner.d.ts +17 -0
- package/dist/components/EchoSuccessBanner.d.ts.map +1 -0
- package/dist/components/EchoSuccessBanner.js +48 -0
- package/dist/components/EchoSuccessBanner.js.map +1 -0
- package/dist/components/EchoSyncPanel.d.ts +165 -0
- package/dist/components/EchoSyncPanel.d.ts.map +1 -0
- package/dist/components/EchoSyncPanel.js +913 -0
- package/dist/components/EchoSyncPanel.js.map +1 -0
- package/dist/components/EchoSyncPromptModal.d.ts +87 -0
- package/dist/components/EchoSyncPromptModal.d.ts.map +1 -0
- package/dist/components/EchoSyncPromptModal.js +351 -0
- package/dist/components/EchoSyncPromptModal.js.map +1 -0
- package/dist/components/EchoTitlePicker.d.ts +72 -0
- package/dist/components/EchoTitlePicker.d.ts.map +1 -0
- package/dist/components/EchoTitlePicker.js +487 -0
- package/dist/components/EchoTitlePicker.js.map +1 -0
- package/dist/components/EchoVerificationCodeInput.d.ts +40 -0
- package/dist/components/EchoVerificationCodeInput.d.ts.map +1 -0
- package/dist/components/EchoVerificationCodeInput.js +140 -0
- package/dist/components/EchoVerificationCodeInput.js.map +1 -0
- package/dist/components/EchoWelcome.d.ts +44 -0
- package/dist/components/EchoWelcome.d.ts.map +1 -0
- package/dist/components/EchoWelcome.js +289 -0
- package/dist/components/EchoWelcome.js.map +1 -0
- package/dist/components/EchoWhyBecomeAnEchoModal.d.ts +34 -0
- package/dist/components/EchoWhyBecomeAnEchoModal.d.ts.map +1 -0
- package/dist/components/EchoWhyBecomeAnEchoModal.js +321 -0
- package/dist/components/EchoWhyBecomeAnEchoModal.js.map +1 -0
- package/dist/components/EchoformInfoButton.d.ts +27 -0
- package/dist/components/EchoformInfoButton.d.ts.map +1 -0
- package/dist/components/EchoformInfoButton.js +60 -0
- package/dist/components/EchoformInfoButton.js.map +1 -0
- package/dist/components/EchoformInfoModal.d.ts +63 -0
- package/dist/components/EchoformInfoModal.d.ts.map +1 -0
- package/dist/components/EchoformInfoModal.js +347 -0
- package/dist/components/EchoformInfoModal.js.map +1 -0
- package/dist/echoColors.d.ts +58 -0
- package/dist/echoColors.d.ts.map +1 -0
- package/dist/echoColors.js +94 -0
- package/dist/echoColors.js.map +1 -0
- package/dist/index.d.ts +64 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +71 -4
- package/dist/index.js.map +1 -1
- package/dist/titleRarity.d.ts +5 -0
- package/dist/titleRarity.d.ts.map +1 -1
- package/dist/titleRarity.js +13 -0
- package/dist/titleRarity.js.map +1 -1
- package/package.json +2 -3
- package/dist/components/EchoUITest.d.ts +0 -14
- package/dist/components/EchoUITest.d.ts.map +0 -1
- package/dist/components/EchoUITest.js +0 -53
- package/dist/components/EchoUITest.js.map +0 -1
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* EchoSignOutButton
|
|
4
|
+
*
|
|
5
|
+
* Presentation-only Sign Out button extracted from the Echo UI Reference.
|
|
6
|
+
*
|
|
7
|
+
* Renders a red translucent row button with a logout icon, 52pt minimum
|
|
8
|
+
* height, pressed opacity, and a loading spinner while the sign-out operation
|
|
9
|
+
* is in progress.
|
|
10
|
+
*
|
|
11
|
+
* ACCESSIBILITY
|
|
12
|
+
* ─────────────
|
|
13
|
+
* • accessibilityLabel: "Sign out of Echo Profile"
|
|
14
|
+
* • accessibilityRole: "button"
|
|
15
|
+
* • accessibilityState: { busy: loading }
|
|
16
|
+
* • Default hint: "Signs you out. Your local data will remain on this device."
|
|
17
|
+
*
|
|
18
|
+
* No Expo Router, no auth, no contexts, no services, no app-specific code.
|
|
19
|
+
* Canonical shared component for @echoform/echo-ui.
|
|
20
|
+
*/
|
|
21
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
22
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
23
|
+
};
|
|
24
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
+
exports.EchoSignOutButton = EchoSignOutButton;
|
|
26
|
+
const react_1 = __importDefault(require("react"));
|
|
27
|
+
const react_native_1 = require("react-native");
|
|
28
|
+
const vector_icons_1 = require("@expo/vector-icons");
|
|
29
|
+
const theme_1 = require("../theme");
|
|
30
|
+
// ─────────────────────────────────────────────────────────────────────────────
|
|
31
|
+
// Component
|
|
32
|
+
// ─────────────────────────────────────────────────────────────────────────────
|
|
33
|
+
function EchoSignOutButton({ onPress, loading = false, accessibilityHint = 'Signs you out. Your local data will remain on this device.', }) {
|
|
34
|
+
return (<react_native_1.Pressable onPress={onPress} disabled={loading} style={({ pressed }) => [
|
|
35
|
+
styles.btn,
|
|
36
|
+
pressed ? styles.btnPressed : null,
|
|
37
|
+
]} accessibilityLabel="Sign out of Echo Profile" accessibilityRole="button" accessibilityHint={accessibilityHint} accessibilityState={{ busy: loading }}>
|
|
38
|
+
{loading ? (<react_native_1.ActivityIndicator size="small" color={theme_1.COLORS.error}/>) : (<vector_icons_1.MaterialIcons name="logout" size={20} color={theme_1.COLORS.error} importantForAccessibility="no" accessibilityElementsHidden/>)}
|
|
39
|
+
<react_native_1.Text style={styles.label}>Sign Out</react_native_1.Text>
|
|
40
|
+
</react_native_1.Pressable>);
|
|
41
|
+
}
|
|
42
|
+
// ─────────────────────────────────────────────────────────────────────────────
|
|
43
|
+
// Styles
|
|
44
|
+
// ─────────────────────────────────────────────────────────────────────────────
|
|
45
|
+
const styles = react_native_1.StyleSheet.create({
|
|
46
|
+
btn: {
|
|
47
|
+
flexDirection: 'row',
|
|
48
|
+
alignItems: 'center',
|
|
49
|
+
justifyContent: 'center',
|
|
50
|
+
gap: theme_1.SPACING.sm,
|
|
51
|
+
backgroundColor: theme_1.COLORS.error + '10',
|
|
52
|
+
borderRadius: theme_1.RADIUS.lg,
|
|
53
|
+
borderWidth: 1,
|
|
54
|
+
borderColor: theme_1.COLORS.error + '44',
|
|
55
|
+
paddingVertical: theme_1.SPACING.md,
|
|
56
|
+
minHeight: 52,
|
|
57
|
+
},
|
|
58
|
+
btnPressed: {
|
|
59
|
+
opacity: 0.75,
|
|
60
|
+
},
|
|
61
|
+
label: {
|
|
62
|
+
fontSize: theme_1.FONTS.md,
|
|
63
|
+
fontWeight: '700',
|
|
64
|
+
color: theme_1.COLORS.error,
|
|
65
|
+
},
|
|
66
|
+
});
|
|
67
|
+
//# sourceMappingURL=EchoSignOutButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EchoSignOutButton.js","sourceRoot":"","sources":["../../src/components/EchoSignOutButton.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;GAkBG;;;;;AA2BH,8CAgCC;AAzDD,kDAA0B;AAC1B,+CAKsB;AACtB,qDAAmD;AACnD,oCAA0D;AAa1D,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Ac,EAAG,QAAQ;QACzB,GAAG,EAAc,eAAO,CAAC,EAAE;QAC3B,eAAe,EAAE,cAAM,CAAC,KAAK,GAAG,IAAI;QACpC,YAAY,EAAK,cAAM,CAAC,EAAE;QAC1B,WAAW,EAAM,CAAC;QAClB,WAAW,EAAM,cAAM,CAAC,KAAK,GAAG,IAAI;QACpC,eAAe,EAAE,eAAO,CAAC,EAAE;QAC3B,SAAS,EAAQ,EAAE;KACpB;IACD,UAAU,EAAE;QACV,OAAO,EAAE,IAAI;KACd;IACD,KAAK,EAAE;QACL,QAAQ,EAAI,aAAK,CAAC,EAAE;QACpB,UAAU,EAAE,KAAK;QACjB,KAAK,EAAO,cAAM,CAAC,KAAK;KACzB;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* EchoSuccessBanner
|
|
3
|
+
*
|
|
4
|
+
* Presentation-only success status banner extracted from the Echo UI Reference.
|
|
5
|
+
* Renders null when message is null.
|
|
6
|
+
*
|
|
7
|
+
* Accessibility: role="text", polite live region, message as accessibility label.
|
|
8
|
+
*
|
|
9
|
+
* No Expo Router, no auth, no contexts, no services, no app-specific code.
|
|
10
|
+
* Canonical shared component for @echoform/echo-ui.
|
|
11
|
+
*/
|
|
12
|
+
import React from 'react';
|
|
13
|
+
export type EchoSuccessBannerProps = {
|
|
14
|
+
message: string | null;
|
|
15
|
+
};
|
|
16
|
+
export declare function EchoSuccessBanner({ message }: EchoSuccessBannerProps): React.JSX.Element | null;
|
|
17
|
+
//# sourceMappingURL=EchoSuccessBanner.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EchoSuccessBanner.d.ts","sourceRoot":"","sources":["../../src/components/EchoSuccessBanner.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,MAAM,MAAM,sBAAsB,GAAG;IACnC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;CACxB,CAAC;AAEF,wBAAgB,iBAAiB,CAAC,EAAE,OAAO,EAAE,EAAE,sBAAsB,4BAcpE"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* EchoSuccessBanner
|
|
4
|
+
*
|
|
5
|
+
* Presentation-only success status banner extracted from the Echo UI Reference.
|
|
6
|
+
* Renders null when message is null.
|
|
7
|
+
*
|
|
8
|
+
* Accessibility: role="text", polite live region, message as accessibility label.
|
|
9
|
+
*
|
|
10
|
+
* No Expo Router, no auth, no contexts, no services, no app-specific code.
|
|
11
|
+
* Canonical shared component for @echoform/echo-ui.
|
|
12
|
+
*/
|
|
13
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.EchoSuccessBanner = EchoSuccessBanner;
|
|
18
|
+
const react_1 = __importDefault(require("react"));
|
|
19
|
+
const react_native_1 = require("react-native");
|
|
20
|
+
const vector_icons_1 = require("@expo/vector-icons");
|
|
21
|
+
const theme_1 = require("../theme");
|
|
22
|
+
function EchoSuccessBanner({ message }) {
|
|
23
|
+
if (!message)
|
|
24
|
+
return null;
|
|
25
|
+
return (<react_native_1.View style={styles.banner} accessible accessibilityRole="text" accessibilityLiveRegion="polite" accessibilityLabel={message}>
|
|
26
|
+
<vector_icons_1.MaterialIcons name="check-circle-outline" size={16} color={theme_1.COLORS.neonGreen}/>
|
|
27
|
+
<react_native_1.Text style={styles.text}>{message}</react_native_1.Text>
|
|
28
|
+
</react_native_1.View>);
|
|
29
|
+
}
|
|
30
|
+
const styles = react_native_1.StyleSheet.create({
|
|
31
|
+
banner: {
|
|
32
|
+
flexDirection: 'row',
|
|
33
|
+
alignItems: 'flex-start',
|
|
34
|
+
gap: theme_1.SPACING.sm,
|
|
35
|
+
backgroundColor: theme_1.COLORS.neonGreen + '15',
|
|
36
|
+
borderRadius: theme_1.RADIUS.md,
|
|
37
|
+
borderWidth: 1,
|
|
38
|
+
borderColor: theme_1.COLORS.neonGreen + '55',
|
|
39
|
+
padding: theme_1.SPACING.md,
|
|
40
|
+
},
|
|
41
|
+
text: {
|
|
42
|
+
flex: 1,
|
|
43
|
+
color: theme_1.COLORS.neonGreen,
|
|
44
|
+
fontSize: theme_1.FONTS.sm,
|
|
45
|
+
lineHeight: 20,
|
|
46
|
+
},
|
|
47
|
+
});
|
|
48
|
+
//# sourceMappingURL=EchoSuccessBanner.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EchoSuccessBanner.js","sourceRoot":"","sources":["../../src/components/EchoSuccessBanner.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;;;;AAWH,8CAcC;AAvBD,kDAA0B;AAC1B,+CAAsD;AACtD,qDAAmD;AACnD,oCAA0D;AAM1D,SAAgB,iBAAiB,CAAC,EAAE,OAAO,EAA0B;IACnE,IAAI,CAAC,OAAO;QAAE,OAAO,IAAI,CAAC;IAC1B,OAAO,CACL,CAAC,mBAAI,CACH,KAAK,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CACrB,UAAU,CACV,iBAAiB,CAAC,MAAM,CACxB,uBAAuB,CAAC,QAAQ,CAChC,kBAAkB,CAAC,CAAC,OAAO,CAAC,CAE5B;MAAA,CAAC,4BAAa,CAAC,IAAI,CAAC,sBAAsB,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,cAAM,CAAC,SAAS,CAAC,EAC7E;MAAA,CAAC,mBAAI,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,EAAE,mBAAI,CAC3C;IAAA,EAAE,mBAAI,CAAC,CACR,CAAC;AACJ,CAAC;AAED,MAAM,MAAM,GAAG,yBAAU,CAAC,MAAM,CAAC;IAC/B,MAAM,EAAE;QACN,aAAa,EAAI,KAAK;QACtB,UAAU,EAAO,YAAY;QAC7B,GAAG,EAAc,eAAO,CAAC,EAAE;QAC3B,eAAe,EAAE,cAAM,CAAC,SAAS,GAAG,IAAI;QACxC,YAAY,EAAK,cAAM,CAAC,EAAE;QAC1B,WAAW,EAAM,CAAC;QAClB,WAAW,EAAM,cAAM,CAAC,SAAS,GAAG,IAAI;QACxC,OAAO,EAAU,eAAO,CAAC,EAAE;KAC5B;IACD,IAAI,EAAE;QACJ,IAAI,EAAQ,CAAC;QACb,KAAK,EAAO,cAAM,CAAC,SAAS;QAC5B,QAAQ,EAAI,aAAK,CAAC,EAAE;QACpB,UAAU,EAAE,EAAE;KACf;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* EchoSyncPanel
|
|
3
|
+
*
|
|
4
|
+
* Presentation-only Echo Profile Sync panel.
|
|
5
|
+
* Extracted from components/feature/SyncPanel.tsx in the Echo UI Reference.
|
|
6
|
+
*
|
|
7
|
+
* ARCHITECTURE
|
|
8
|
+
* ────────────
|
|
9
|
+
* This component is PURE PRESENTATION. It owns:
|
|
10
|
+
* • Rendering all sync states (signed-out, loading, active, result)
|
|
11
|
+
* • Deriving button/badge display state from supplied props
|
|
12
|
+
* • Accessibility labels, roles, live regions
|
|
13
|
+
*
|
|
14
|
+
* It does NOT own:
|
|
15
|
+
* • Authentication
|
|
16
|
+
* • useFocusEffect
|
|
17
|
+
* • Server/status fetching
|
|
18
|
+
* • Upload / download operations
|
|
19
|
+
* • Reconciliation planning
|
|
20
|
+
* • Guest-partition detection or cleanup
|
|
21
|
+
* • Sync queue operations
|
|
22
|
+
* • Storage operations
|
|
23
|
+
* • Supabase / EchoBrain RPC calls
|
|
24
|
+
*
|
|
25
|
+
* All host-owned operations are supplied via callback props.
|
|
26
|
+
*
|
|
27
|
+
* DATA LABEL
|
|
28
|
+
* ──────────
|
|
29
|
+
* The `dataLabel` prop names the records being synchronized in ALL visible
|
|
30
|
+
* and accessibility wording. Examples: "Demo App Data", "Rig Vault Data".
|
|
31
|
+
* There is no hard-coded "Demo App", "Rig Vault", or "Guest Vault" in this
|
|
32
|
+
* package component.
|
|
33
|
+
*
|
|
34
|
+
* GUEST ADOPTION
|
|
35
|
+
* ──────────────
|
|
36
|
+
* All wording for the guest-adoption card is supplied through the optional
|
|
37
|
+
* `guestAdoption` prop. When neither `guestAdoption` nor `onAdoptGuest` is
|
|
38
|
+
* supplied the section is simply not rendered.
|
|
39
|
+
*
|
|
40
|
+
* DEVELOPMENT CONTROLS
|
|
41
|
+
* ────────────────────
|
|
42
|
+
* `showDevelopmentControls` replaces `__DEV__` so the host decides when
|
|
43
|
+
* dev-only UI (Force Sync, raw conflict JSON) is visible.
|
|
44
|
+
*
|
|
45
|
+
* SIGNED-OUT STATE
|
|
46
|
+
* ────────────────
|
|
47
|
+
* Deliberately names EchoBrain in the signed-out message:
|
|
48
|
+
* "Echo Profile Sync requires an Echo Profile.
|
|
49
|
+
* Sign in to enable upload to EchoBrain."
|
|
50
|
+
* This is an intentional product-level decision; EchoBrain is the public
|
|
51
|
+
* cloud sync service name.
|
|
52
|
+
*
|
|
53
|
+
* No Expo Router, no auth context, no services, no AsyncStorage, no Supabase,
|
|
54
|
+
* no @/ aliases.
|
|
55
|
+
* Canonical shared component for @echoform/echo-ui.
|
|
56
|
+
*/
|
|
57
|
+
import React from 'react';
|
|
58
|
+
export type EchoSyncStatus = {
|
|
59
|
+
synced: number;
|
|
60
|
+
unsynced: number;
|
|
61
|
+
serverReachable: boolean;
|
|
62
|
+
};
|
|
63
|
+
export type EchoSyncConflictDetail = {
|
|
64
|
+
id: string;
|
|
65
|
+
reason: string;
|
|
66
|
+
presetId?: string;
|
|
67
|
+
controlId?: string;
|
|
68
|
+
serverRevision?: number;
|
|
69
|
+
submittedBaseRevision?: number;
|
|
70
|
+
raw?: string;
|
|
71
|
+
};
|
|
72
|
+
export type EchoSyncEntityResult = {
|
|
73
|
+
entity: string;
|
|
74
|
+
uploaded: number;
|
|
75
|
+
skipped: number;
|
|
76
|
+
conflicts: number;
|
|
77
|
+
failed: number;
|
|
78
|
+
errors: Record<string, string>;
|
|
79
|
+
conflictDetails: EchoSyncConflictDetail[];
|
|
80
|
+
firstError?: string;
|
|
81
|
+
};
|
|
82
|
+
export type EchoSyncImageResult = {
|
|
83
|
+
attempted: number;
|
|
84
|
+
succeeded: number;
|
|
85
|
+
failed: number;
|
|
86
|
+
firstError?: string;
|
|
87
|
+
timeoutFailures?: number;
|
|
88
|
+
missingSourceFiles?: number;
|
|
89
|
+
storageFailures?: number;
|
|
90
|
+
metaFailures?: number;
|
|
91
|
+
};
|
|
92
|
+
export type EchoSyncResultOutcome = 'complete' | 'empty' | 'partial' | 'failed' | 'fatal' | 'unable_to_verify' | 'adoption_complete';
|
|
93
|
+
export type EchoSyncResult = {
|
|
94
|
+
outcome: EchoSyncResultOutcome;
|
|
95
|
+
totalUploaded: number;
|
|
96
|
+
totalSkipped: number;
|
|
97
|
+
totalConflicts: number;
|
|
98
|
+
totalFailed: number;
|
|
99
|
+
firstError?: string | null;
|
|
100
|
+
fatalError?: string | null;
|
|
101
|
+
entities: EchoSyncEntityResult[];
|
|
102
|
+
imageSummary?: EchoSyncImageResult | null;
|
|
103
|
+
completedAt: string;
|
|
104
|
+
sourcePartition?: string;
|
|
105
|
+
remainingUnsynced?: number;
|
|
106
|
+
};
|
|
107
|
+
export type EchoSyncGuestAdoption = {
|
|
108
|
+
/** Heading shown in the adoption card. */
|
|
109
|
+
title: string;
|
|
110
|
+
/** Body description shown below the heading. */
|
|
111
|
+
description: string;
|
|
112
|
+
/** Label for the adoption button in its idle state. */
|
|
113
|
+
buttonLabel: string;
|
|
114
|
+
/** Label for the adoption button while loading. Defaults to buttonLabel + '…'. */
|
|
115
|
+
loadingLabel?: string;
|
|
116
|
+
/** Full accessibility label for the adoption button in its idle state. */
|
|
117
|
+
accessibilityLabel: string;
|
|
118
|
+
/** Accessibility hint for the adoption button. */
|
|
119
|
+
accessibilityHint: string;
|
|
120
|
+
/** Small informational note rendered at the bottom of the adoption card. */
|
|
121
|
+
note: string;
|
|
122
|
+
};
|
|
123
|
+
export type EchoSyncPanelProps = {
|
|
124
|
+
/** True when the user has an active Echo Profile session. */
|
|
125
|
+
hasEchoProfile: boolean;
|
|
126
|
+
/**
|
|
127
|
+
* Host-facing label for the records being synchronized.
|
|
128
|
+
* Used in all button text and accessibility wording.
|
|
129
|
+
* Examples: "Demo App Data", "Rig Vault Data"
|
|
130
|
+
*/
|
|
131
|
+
dataLabel: string;
|
|
132
|
+
/** Current server-aware sync status. Null before the first status fetch. */
|
|
133
|
+
status: EchoSyncStatus | null;
|
|
134
|
+
/** True while a status fetch is in flight. */
|
|
135
|
+
statusLoading?: boolean;
|
|
136
|
+
/** True while a sync operation is in flight. */
|
|
137
|
+
syncing?: boolean;
|
|
138
|
+
/**
|
|
139
|
+
* Guest-adoption wording supplied by the host.
|
|
140
|
+
* When null/undefined the adoption card is not rendered.
|
|
141
|
+
* Also requires onAdoptGuest to be supplied.
|
|
142
|
+
*/
|
|
143
|
+
guestAdoption?: EchoSyncGuestAdoption | null;
|
|
144
|
+
/** The most recent sync result. Null means no result to display. */
|
|
145
|
+
result?: EchoSyncResult | null;
|
|
146
|
+
/**
|
|
147
|
+
* When true, development-only controls are rendered:
|
|
148
|
+
* • Force Sync button (requires onForceSync)
|
|
149
|
+
* • Raw conflict JSON expansion
|
|
150
|
+
* The host decides when this is enabled; the package never reads __DEV__.
|
|
151
|
+
*/
|
|
152
|
+
showDevelopmentControls?: boolean;
|
|
153
|
+
/** Called when the user taps the refresh status button. */
|
|
154
|
+
onRefresh: () => void | Promise<void>;
|
|
155
|
+
/** Called when the user taps the main Sync button. */
|
|
156
|
+
onSync: () => void | Promise<void>;
|
|
157
|
+
/** Called when the user taps Force Sync (dev only, requires showDevelopmentControls). */
|
|
158
|
+
onForceSync?: () => void | Promise<void>;
|
|
159
|
+
/** Called when the user taps the adoption button. Requires guestAdoption to be set. */
|
|
160
|
+
onAdoptGuest?: () => void | Promise<void>;
|
|
161
|
+
/** Called when the user taps Dismiss on the result card. */
|
|
162
|
+
onDismissResult: () => void;
|
|
163
|
+
};
|
|
164
|
+
export declare function EchoSyncPanel({ hasEchoProfile, dataLabel, status, statusLoading, syncing, guestAdoption, result, showDevelopmentControls, onRefresh, onSync, onForceSync, onAdoptGuest, onDismissResult, }: EchoSyncPanelProps): React.JSX.Element;
|
|
165
|
+
//# sourceMappingURL=EchoSyncPanel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EchoSyncPanel.d.ts","sourceRoot":"","sources":["../../src/components/EchoSyncPanel.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuDG;AAEH,OAAO,KAAmB,MAAM,OAAO,CAAC;AAgBxC,MAAM,MAAM,cAAc,GAAG;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,eAAe,EAAE,OAAO,CAAC;CAC1B,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG;IACnC,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,GAAG,CAAC,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG;IACjC,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,M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