@the-seeker/changes-react-native 0.0.0-stage → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (70) hide show
  1. package/README.md +119 -2
  2. package/dist/core/cache.d.ts +14 -0
  3. package/dist/core/cache.js +34 -0
  4. package/dist/core/client.d.ts +161 -0
  5. package/dist/core/client.js +97 -0
  6. package/dist/core/decide.d.ts +16 -0
  7. package/dist/core/decide.js +57 -0
  8. package/dist/core/rating.d.ts +7 -0
  9. package/dist/core/rating.js +18 -0
  10. package/dist/core/storage.d.ts +20 -0
  11. package/dist/core/storage.js +73 -0
  12. package/dist/core/types.d.ts +332 -0
  13. package/dist/core/types.js +126 -0
  14. package/dist/core/versions.d.ts +2 -0
  15. package/dist/core/versions.js +20 -0
  16. package/dist/index.d.ts +22 -0
  17. package/dist/index.js +44 -0
  18. package/dist/native/Blocks.d.ts +7 -0
  19. package/dist/native/Blocks.js +45 -0
  20. package/dist/native/ChangelogButton.d.ts +6 -0
  21. package/dist/native/ChangelogButton.js +16 -0
  22. package/dist/native/ChangelogScreen.d.ts +6 -0
  23. package/dist/native/ChangelogScreen.js +52 -0
  24. package/dist/native/CommentComposer.d.ts +11 -0
  25. package/dist/native/CommentComposer.js +40 -0
  26. package/dist/native/CommentItem.d.ts +15 -0
  27. package/dist/native/CommentItem.js +35 -0
  28. package/dist/native/CommentsThread.d.ts +9 -0
  29. package/dist/native/CommentsThread.js +24 -0
  30. package/dist/native/Provider.d.ts +11 -0
  31. package/dist/native/Provider.js +68 -0
  32. package/dist/native/ReleaseView.d.ts +11 -0
  33. package/dist/native/ReleaseView.js +37 -0
  34. package/dist/native/WhatsNewSheet.d.ts +6 -0
  35. package/dist/native/WhatsNewSheet.js +52 -0
  36. package/dist/native/community.d.ts +18 -0
  37. package/dist/native/community.js +39 -0
  38. package/dist/native/context.d.ts +123 -0
  39. package/dist/native/context.js +26 -0
  40. package/dist/native/default-texts.d.ts +89 -0
  41. package/dist/native/default-texts.js +92 -0
  42. package/dist/native/format.d.ts +5 -0
  43. package/dist/native/format.js +34 -0
  44. package/dist/native/messages.d.ts +44 -0
  45. package/dist/native/messages.js +83 -0
  46. package/dist/native/primitives.d.ts +39 -0
  47. package/dist/native/primitives.js +78 -0
  48. package/dist/native/rating-plan.d.ts +31 -0
  49. package/dist/native/rating-plan.js +101 -0
  50. package/dist/native/resolve.d.ts +21 -0
  51. package/dist/native/resolve.js +73 -0
  52. package/dist/native/session.d.ts +48 -0
  53. package/dist/native/session.js +83 -0
  54. package/dist/native/styles-community.d.ts +1447 -0
  55. package/dist/native/styles-community.js +117 -0
  56. package/dist/native/styles-scale.d.ts +66 -0
  57. package/dist/native/styles-scale.js +22 -0
  58. package/dist/native/styles.d.ts +2584 -0
  59. package/dist/native/styles.js +161 -0
  60. package/dist/native/tokens.d.ts +51 -0
  61. package/dist/native/tokens.js +90 -0
  62. package/dist/native/use-actions.d.ts +55 -0
  63. package/dist/native/use-actions.js +59 -0
  64. package/dist/native/use-comments.d.ts +40 -0
  65. package/dist/native/use-comments.js +83 -0
  66. package/dist/native/use-controller.d.ts +101 -0
  67. package/dist/native/use-controller.js +144 -0
  68. package/dist/native/use-session.d.ts +268 -0
  69. package/dist/native/use-session.js +86 -0
  70. package/package.json +49 -3
@@ -0,0 +1,117 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createCommunityStyles = createCommunityStyles;
4
+ const react_native_1 = require("react-native");
5
+ const styles_scale_1 = require("./styles-scale");
6
+ /** Votes, comments, guidelines and the composer. */
7
+ function createCommunityStyles(t) {
8
+ const text = (style, color = t.text) => ({ ...style, color });
9
+ return react_native_1.StyleSheet.create({
10
+ capsule: {
11
+ flexDirection: "row",
12
+ alignItems: "stretch",
13
+ borderRadius: styles_scale_1.RADIUS.pill,
14
+ borderWidth: 1,
15
+ borderColor: t.input,
16
+ overflow: "hidden",
17
+ },
18
+ capsuleSegment: {
19
+ flexDirection: "row",
20
+ alignItems: "center",
21
+ gap: styles_scale_1.SPACE.tight,
22
+ minHeight: styles_scale_1.TOUCH,
23
+ minWidth: styles_scale_1.TOUCH,
24
+ justifyContent: "center",
25
+ paddingHorizontal: 14,
26
+ },
27
+ capsuleDivider: { width: 1, backgroundColor: t.input },
28
+ segmentUp: { backgroundColor: t.accentSoft },
29
+ segmentDown: { backgroundColor: t.pressed },
30
+ segmentPressed: { backgroundColor: t.surface },
31
+ count: { ...text(styles_scale_1.TYPE.label), fontWeight: "600", fontVariant: ["tabular-nums"] },
32
+ commentLink: { flexDirection: "row", alignItems: "center", minHeight: styles_scale_1.TOUCH, paddingHorizontal: styles_scale_1.SPACE.tight },
33
+ commentLinkLabel: text(styles_scale_1.TYPE.label, t.accentInk),
34
+ threadHeader: { flexDirection: "row", alignItems: "center", gap: styles_scale_1.SPACE.hair, marginBottom: styles_scale_1.SPACE.hair },
35
+ // Ghost padding would push the label off the content edge; pull it back so text aligns optically.
36
+ backSlot: { marginStart: -styles_scale_1.SPACE.block },
37
+ threadTitle: { ...text(styles_scale_1.TYPE.title), flex: 1 },
38
+ threadList: { gap: styles_scale_1.SPACE.panel, marginTop: styles_scale_1.SPACE.panel },
39
+ comment: { gap: styles_scale_1.SPACE.hair },
40
+ commentHead: { flexDirection: "row", flexWrap: "wrap", alignItems: "center", gap: styles_scale_1.SPACE.gap },
41
+ author: { ...text(styles_scale_1.TYPE.label), fontWeight: "600" },
42
+ badge: {
43
+ paddingHorizontal: styles_scale_1.SPACE.tight,
44
+ paddingVertical: 1,
45
+ borderRadius: styles_scale_1.RADIUS.chip,
46
+ borderWidth: react_native_1.StyleSheet.hairlineWidth,
47
+ borderColor: t.input,
48
+ backgroundColor: t.surface,
49
+ },
50
+ badgeLabel: text(styles_scale_1.TYPE.small),
51
+ commentBody: text(styles_scale_1.TYPE.body),
52
+ commentActions: { flexDirection: "row", flexWrap: "wrap", alignItems: "center", marginStart: -styles_scale_1.SPACE.block },
53
+ action: {
54
+ flexDirection: "row",
55
+ alignItems: "center",
56
+ gap: styles_scale_1.SPACE.hair,
57
+ minHeight: styles_scale_1.TOUCH,
58
+ minWidth: styles_scale_1.TOUCH,
59
+ justifyContent: "center",
60
+ paddingHorizontal: styles_scale_1.SPACE.block,
61
+ borderRadius: styles_scale_1.RADIUS.control,
62
+ },
63
+ actionPressed: { backgroundColor: t.pressed },
64
+ actionSelected: { backgroundColor: t.accentSoft },
65
+ actionLabel: { ...text(styles_scale_1.TYPE.meta, t.mutedText), fontVariant: ["tabular-nums"] },
66
+ replies: {
67
+ gap: styles_scale_1.SPACE.group,
68
+ marginTop: styles_scale_1.SPACE.gap,
69
+ marginStart: styles_scale_1.SPACE.hair,
70
+ paddingStart: styles_scale_1.SPACE.block,
71
+ borderStartWidth: 2,
72
+ borderColor: t.border,
73
+ },
74
+ reportMenu: {
75
+ gap: styles_scale_1.SPACE.hair,
76
+ padding: styles_scale_1.SPACE.gap,
77
+ marginTop: styles_scale_1.SPACE.hair,
78
+ borderRadius: styles_scale_1.RADIUS.card,
79
+ backgroundColor: t.surface,
80
+ },
81
+ reportOption: { minHeight: styles_scale_1.TOUCH, justifyContent: "center", paddingHorizontal: styles_scale_1.SPACE.block, borderRadius: 8 },
82
+ reportOptionPressed: { backgroundColor: t.pressed },
83
+ reportOptionLabel: text(styles_scale_1.TYPE.body),
84
+ guidelines: { gap: styles_scale_1.SPACE.gap, padding: styles_scale_1.SPACE.group, borderRadius: styles_scale_1.RADIUS.card, backgroundColor: t.surface },
85
+ guidelinesTitle: { ...text(styles_scale_1.TYPE.label), fontWeight: "600" },
86
+ guidelinesBody: text(styles_scale_1.TYPE.meta, t.mutedText),
87
+ checkboxRow: { flexDirection: "row", alignItems: "center", gap: styles_scale_1.SPACE.block, minHeight: styles_scale_1.TOUCH },
88
+ checkbox: {
89
+ width: 22,
90
+ height: 22,
91
+ alignItems: "center",
92
+ justifyContent: "center",
93
+ borderRadius: styles_scale_1.RADIUS.chip,
94
+ borderWidth: 1.5,
95
+ borderColor: t.mutedText,
96
+ backgroundColor: t.background,
97
+ },
98
+ checkboxChecked: { borderColor: t.accent, backgroundColor: t.accent },
99
+ checkboxLabel: { ...text(styles_scale_1.TYPE.label), flex: 1 },
100
+ composer: { gap: styles_scale_1.SPACE.gap, marginTop: styles_scale_1.SPACE.panel },
101
+ fieldLabel: { ...text(styles_scale_1.TYPE.label), fontWeight: "600" },
102
+ input: {
103
+ ...text(styles_scale_1.TYPE.input),
104
+ minHeight: 88,
105
+ paddingHorizontal: styles_scale_1.SPACE.block,
106
+ paddingVertical: 10,
107
+ borderRadius: styles_scale_1.RADIUS.control,
108
+ borderWidth: 1,
109
+ borderColor: t.input,
110
+ backgroundColor: t.background,
111
+ textAlignVertical: "top",
112
+ },
113
+ inputFocused: { borderColor: t.accent },
114
+ replyBar: { flexDirection: "row", alignItems: "center", justifyContent: "space-between", gap: styles_scale_1.SPACE.gap },
115
+ composerFoot: { flexDirection: "row", alignItems: "center", justifyContent: "flex-end", gap: styles_scale_1.SPACE.gap },
116
+ });
117
+ }
@@ -0,0 +1,66 @@
1
+ export declare const SPACE: {
2
+ readonly hair: 4;
3
+ readonly tight: 6;
4
+ readonly gap: 8;
5
+ readonly block: 12;
6
+ readonly group: 16;
7
+ readonly panel: 20;
8
+ readonly section: 24;
9
+ };
10
+ export declare const TOUCH = 44;
11
+ export declare const RADIUS: {
12
+ readonly chip: 6;
13
+ readonly control: 10;
14
+ readonly card: 12;
15
+ readonly sheet: 20;
16
+ readonly pill: 999;
17
+ };
18
+ export declare const KOREAN_WRAP: {
19
+ readonly lineBreakStrategyIOS: "hangul-word";
20
+ };
21
+ export declare const TYPE: {
22
+ readonly display: {
23
+ readonly fontSize: 22;
24
+ readonly lineHeight: 28;
25
+ readonly fontWeight: "700";
26
+ readonly letterSpacing: -0.3;
27
+ };
28
+ readonly title: {
29
+ readonly fontSize: 17;
30
+ readonly lineHeight: 22;
31
+ readonly fontWeight: "600";
32
+ readonly letterSpacing: -0.2;
33
+ };
34
+ readonly body: {
35
+ readonly fontSize: 15;
36
+ readonly lineHeight: 22;
37
+ };
38
+ readonly label: {
39
+ readonly fontSize: 14;
40
+ readonly lineHeight: 20;
41
+ readonly fontWeight: "500";
42
+ };
43
+ readonly input: {
44
+ readonly fontSize: 16;
45
+ readonly lineHeight: 22;
46
+ };
47
+ readonly action: {
48
+ readonly fontSize: 15;
49
+ readonly lineHeight: 20;
50
+ readonly fontWeight: "600";
51
+ };
52
+ readonly eyebrow: {
53
+ readonly fontSize: 13;
54
+ readonly lineHeight: 18;
55
+ readonly fontWeight: "600";
56
+ };
57
+ readonly meta: {
58
+ readonly fontSize: 13;
59
+ readonly lineHeight: 18;
60
+ };
61
+ readonly small: {
62
+ readonly fontSize: 12;
63
+ readonly lineHeight: 16;
64
+ readonly fontWeight: "600";
65
+ };
66
+ };
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TYPE = exports.KOREAN_WRAP = exports.RADIUS = exports.TOUCH = exports.SPACE = void 0;
4
+ // Grouping: 4–8 inside a group, 16+ between groups, 20 sheet inset, 24 between releases.
5
+ exports.SPACE = { hair: 4, tight: 6, gap: 8, block: 12, group: 16, panel: 20, section: 24 };
6
+ exports.TOUCH = 44;
7
+ // Concentric: controls (10) sit 20 inside the sheet (20 top radius); chips 6; capsules are pills.
8
+ exports.RADIUS = { chip: 6, control: 10, card: 12, sheet: 20, pill: 999 };
9
+ // iOS breaks Hangul per syllable by default; wrap reading text at word boundaries instead.
10
+ exports.KOREAN_WRAP = { lineBreakStrategyIOS: "hangul-word" };
11
+ // Native-mobile scale; headings descend display 22 → title 17 → label 14, body 15/22, meta 13.
12
+ exports.TYPE = {
13
+ display: { fontSize: 22, lineHeight: 28, fontWeight: "700", letterSpacing: -0.3 },
14
+ title: { fontSize: 17, lineHeight: 22, fontWeight: "600", letterSpacing: -0.2 },
15
+ body: { fontSize: 15, lineHeight: 22 },
16
+ label: { fontSize: 14, lineHeight: 20, fontWeight: "500" },
17
+ input: { fontSize: 16, lineHeight: 22 },
18
+ action: { fontSize: 15, lineHeight: 20, fontWeight: "600" },
19
+ eyebrow: { fontSize: 13, lineHeight: 18, fontWeight: "600" },
20
+ meta: { fontSize: 13, lineHeight: 18 },
21
+ small: { fontSize: 12, lineHeight: 16, fontWeight: "600" },
22
+ };