react-native-tinyui 1.1.1 → 2.0.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.
- package/README.md +39 -7
- package/ios/Core/Tinyui.mm +18 -0
- package/ios/LiquidGlassText/TinyuiLiquidGlassTextProvider.swift +0 -1
- package/ios/SFSymbol/TinyuiSFSymbolEffects.swift +184 -0
- package/ios/SFSymbol/TinyuiSFSymbolImage.swift +103 -0
- package/ios/SFSymbol/TinyuiSFSymbolProvider.swift +135 -0
- package/ios/SFSymbol/TinyuiSFSymbolShadowNode.mm +4 -2
- package/ios/SFSymbol/TinyuiSFSymbolView.mm +14 -122
- package/ios/TipKit/TinyuiTipsRuntime.swift +14 -0
- package/lib/module/NativeTinyui.js.map +1 -1
- package/lib/module/SFSymbol/index.js +0 -4
- package/lib/module/SFSymbol/index.js.map +1 -1
- package/lib/module/SFSymbol/options.js +0 -2
- package/lib/module/SFSymbol/options.js.map +1 -1
- package/lib/module/TipKit/index.js +9 -0
- package/lib/module/TipKit/index.js.map +1 -1
- package/lib/module/index.js.map +1 -1
- package/lib/typescript/src/LiquidGlassText/types.d.ts +1 -1
- package/lib/typescript/src/LiquidGlassText/types.d.ts.map +1 -1
- package/lib/typescript/src/NativeTinyui.d.ts +1 -0
- package/lib/typescript/src/NativeTinyui.d.ts.map +1 -1
- package/lib/typescript/src/SFSymbol/index.d.ts +1 -1
- package/lib/typescript/src/SFSymbol/index.d.ts.map +1 -1
- package/lib/typescript/src/SFSymbol/options.d.ts +0 -2
- package/lib/typescript/src/SFSymbol/options.d.ts.map +1 -1
- package/lib/typescript/src/SFSymbol/types.d.ts +1 -5
- package/lib/typescript/src/SFSymbol/types.d.ts.map +1 -1
- package/lib/typescript/src/TipKit/index.d.ts +6 -0
- package/lib/typescript/src/TipKit/index.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +1 -1
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/LiquidGlassText/types.ts +1 -1
- package/src/NativeTinyui.ts +1 -0
- package/src/SFSymbol/index.tsx +0 -5
- package/src/SFSymbol/options.ts +0 -2
- package/src/SFSymbol/types.ts +1 -18
- package/src/TipKit/index.ts +10 -0
- package/src/index.tsx +0 -1
- package/ios/SFSymbol/TinyuiSFSymbolEffects.h +0 -9
- package/ios/SFSymbol/TinyuiSFSymbolEffects.mm +0 -180
- package/ios/SFSymbol/TinyuiSFSymbolImage.h +0 -8
- package/ios/SFSymbol/TinyuiSFSymbolImage.mm +0 -141
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
#if TINYUI_FEATURE_SF_SYMBOL
|
|
2
2
|
|
|
3
3
|
#import "TinyuiSFSymbolView.h"
|
|
4
|
-
#import "TinyuiSFSymbolEffects.h"
|
|
5
|
-
#import "TinyuiSFSymbolImage.h"
|
|
6
4
|
#import "TinyuiSFSymbolShadowNode.h"
|
|
7
|
-
#import
|
|
5
|
+
#import "Tinyui-Swift.h"
|
|
8
6
|
#import <react/utils/FollyConvert.h>
|
|
9
7
|
#import <react/renderer/components/TinyuiSpec/Props.h>
|
|
10
8
|
#import <react/renderer/components/TinyuiSpec/RCTComponentViewHelpers.h>
|
|
@@ -15,11 +13,7 @@ using namespace facebook::react;
|
|
|
15
13
|
@end
|
|
16
14
|
|
|
17
15
|
@implementation TinyuiSFSymbolView {
|
|
18
|
-
|
|
19
|
-
NSDictionary *_configuration;
|
|
20
|
-
NSArray<NSDictionary *> *_effects;
|
|
21
|
-
NSMutableDictionary<NSString *, NSDictionary *> *_appliedEffects;
|
|
22
|
-
BOOL _respectReduceMotion;
|
|
16
|
+
TinyuiSFSymbolProvider *_provider;
|
|
23
17
|
}
|
|
24
18
|
|
|
25
19
|
+ (ComponentDescriptorProvider)componentDescriptorProvider
|
|
@@ -31,141 +25,39 @@ using namespace facebook::react;
|
|
|
31
25
|
{
|
|
32
26
|
if (self = [super initWithFrame:frame]) {
|
|
33
27
|
_props = std::make_shared<const TinyuiSFSymbolViewProps>();
|
|
34
|
-
[self
|
|
35
|
-
[NSNotificationCenter.defaultCenter addObserver:self selector:@selector(reduceMotionChanged:)
|
|
36
|
-
name:UIAccessibilityReduceMotionStatusDidChangeNotification object:nil];
|
|
28
|
+
[self createProvider];
|
|
37
29
|
}
|
|
38
30
|
return self;
|
|
39
31
|
}
|
|
40
32
|
|
|
41
|
-
- (void)
|
|
33
|
+
- (void)createProvider
|
|
42
34
|
{
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
_imageView.isAccessibilityElement = NO;
|
|
46
|
-
self.contentView = _imageView;
|
|
47
|
-
_configuration = nil;
|
|
48
|
-
_effects = @[];
|
|
49
|
-
_appliedEffects = [NSMutableDictionary dictionary];
|
|
50
|
-
_respectReduceMotion = YES;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
- (BOOL)reduceMotion
|
|
54
|
-
{
|
|
55
|
-
return _respectReduceMotion && UIAccessibilityIsReduceMotionEnabled();
|
|
35
|
+
_provider = [[TinyuiSFSymbolProvider alloc] initWithFrame:CGRectZero];
|
|
36
|
+
self.contentView = _provider;
|
|
56
37
|
}
|
|
57
38
|
|
|
58
39
|
- (void)updateProps:(Props::Shared const &)props oldProps:(Props::Shared const &)oldProps
|
|
59
40
|
{
|
|
60
41
|
const auto &next = *std::static_pointer_cast<const TinyuiSFSymbolViewProps>(props);
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
if (![configuration isKindOfClass:NSDictionary.class]) configuration = @{};
|
|
67
|
-
if (![_configuration isEqual:configuration]) {
|
|
68
|
-
UIImage *image = TinyuiSFSymbolImage(configuration, YES);
|
|
69
|
-
_imageView.tintColor = [RCTConvert UIColor:configuration[@"color"]] ?: UIColor.labelColor;
|
|
70
|
-
NSDictionary *transitionConfig = convertFollyDynamicToId(next.contentTransition);
|
|
71
|
-
if (![transitionConfig isKindOfClass:NSDictionary.class]) transitionConfig = @{};
|
|
72
|
-
NSSymbolContentTransition *transition = TinyuiSFSymbolTransition(transitionConfig);
|
|
73
|
-
if (image != nil && _imageView.image != nil && self.window != nil && transition != nil && !self.reduceMotion) {
|
|
74
|
-
[_imageView setSymbolImage:image withContentTransition:transition
|
|
75
|
-
options:TinyuiSFSymbolOptions(transitionConfig)];
|
|
76
|
-
} else {
|
|
77
|
-
_imageView.image = image;
|
|
78
|
-
}
|
|
79
|
-
_configuration = configuration;
|
|
80
|
-
if (image == nil) [self clearEffects];
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
if (next.resizeMode == "contain") _imageView.contentMode = UIViewContentModeScaleAspectFit;
|
|
84
|
-
else if (next.resizeMode == "cover") _imageView.contentMode = UIViewContentModeScaleAspectFill;
|
|
85
|
-
else if (next.resizeMode == "stretch") _imageView.contentMode = UIViewContentModeScaleToFill;
|
|
86
|
-
else _imageView.contentMode = UIViewContentModeCenter;
|
|
87
|
-
|
|
88
|
-
id effects = convertFollyDynamicToId(next.effects);
|
|
89
|
-
_effects = [effects isKindOfClass:NSArray.class] ? effects : @[];
|
|
42
|
+
[_provider configure:convertFollyDynamicToId(next.configuration)
|
|
43
|
+
effects:convertFollyDynamicToId(next.effects)
|
|
44
|
+
contentTransition:convertFollyDynamicToId(next.contentTransition)
|
|
45
|
+
respectReduceMotion:next.respectReduceMotion
|
|
46
|
+
resizeMode:[NSString stringWithUTF8String:next.resizeMode.c_str()]];
|
|
90
47
|
[super updateProps:props oldProps:oldProps];
|
|
91
48
|
}
|
|
92
49
|
|
|
93
50
|
- (void)finalizeUpdates:(RNComponentViewUpdateMask)updateMask
|
|
94
51
|
{
|
|
95
52
|
[super finalizeUpdates:updateMask];
|
|
96
|
-
[
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
- (void)clearEffects
|
|
100
|
-
{
|
|
101
|
-
[_imageView removeAllSymbolEffectsWithOptions:NSSymbolEffectOptions.options animated:NO];
|
|
102
|
-
[_appliedEffects removeAllObjects];
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
- (void)applyEffects
|
|
106
|
-
{
|
|
107
|
-
if (self.window == nil || _imageView.image == nil) return;
|
|
108
|
-
NSMutableDictionary<NSString *, NSDictionary *> *requested = [NSMutableDictionary dictionary];
|
|
109
|
-
for (NSDictionary *configuration in _effects) {
|
|
110
|
-
if (![configuration isKindOfClass:NSDictionary.class]) continue;
|
|
111
|
-
NSString *type = configuration[@"type"];
|
|
112
|
-
if (![type isKindOfClass:NSString.class]) continue;
|
|
113
|
-
requested[type] = configuration;
|
|
114
|
-
}
|
|
115
|
-
for (NSString *type in _appliedEffects.allKeys) {
|
|
116
|
-
NSDictionary *old = _appliedEffects[type];
|
|
117
|
-
NSDictionary *next = requested[type];
|
|
118
|
-
if (![old isEqual:next] || [next[@"active"] isEqual:@NO]) {
|
|
119
|
-
NSSymbolEffect *effect = TinyuiSFSymbolEffect(old);
|
|
120
|
-
// Reset immediately when replaying/reconfiguring, so an animated removal
|
|
121
|
-
// cannot race the replacement effect. Animate only actual deactivation.
|
|
122
|
-
BOOL reapplying = next != nil && ![next[@"active"] isEqual:@NO];
|
|
123
|
-
BOOL animated = !reapplying && !self.reduceMotion && ![(next ?: old)[@"animated"] isEqual:@NO];
|
|
124
|
-
if (effect != nil) {
|
|
125
|
-
[_imageView removeSymbolEffectOfType:effect
|
|
126
|
-
options:TinyuiSFSymbolOptions((next ?: old)[@"options"]) animated:animated];
|
|
127
|
-
}
|
|
128
|
-
[_appliedEffects removeObjectForKey:type];
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
for (NSString *type in requested) {
|
|
132
|
-
NSDictionary *configuration = requested[type];
|
|
133
|
-
if ([configuration[@"active"] isEqual:@NO] || [_appliedEffects[type] isEqual:configuration]) continue;
|
|
134
|
-
BOOL stateful = [@[@"scale", @"appear", @"disappear", @"drawOn", @"drawOff"] containsObject:type];
|
|
135
|
-
// Keep visibility/scale state under Reduce Motion, without continuous or
|
|
136
|
-
// discrete animation. Clearing those effects must still restore the state.
|
|
137
|
-
if (self.reduceMotion && !stateful) continue;
|
|
138
|
-
NSSymbolEffect *effect = TinyuiSFSymbolEffect(configuration);
|
|
139
|
-
if (effect == nil) continue;
|
|
140
|
-
[_imageView addSymbolEffect:effect options:TinyuiSFSymbolOptions(configuration[@"options"])
|
|
141
|
-
animated:!self.reduceMotion && ![configuration[@"animated"] isEqual:@NO]];
|
|
142
|
-
_appliedEffects[type] = configuration;
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
- (void)didMoveToWindow
|
|
147
|
-
{
|
|
148
|
-
[super didMoveToWindow];
|
|
149
|
-
if (self.window == nil) [self clearEffects];
|
|
150
|
-
else [self applyEffects];
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
- (void)reduceMotionChanged:(NSNotification *)notification
|
|
154
|
-
{
|
|
155
|
-
[self clearEffects];
|
|
156
|
-
[self applyEffects];
|
|
53
|
+
[_provider applyEffects];
|
|
157
54
|
}
|
|
158
55
|
|
|
159
56
|
- (void)prepareForRecycle
|
|
160
57
|
{
|
|
161
|
-
[
|
|
58
|
+
[_provider clearEffects];
|
|
162
59
|
[super prepareForRecycle];
|
|
163
|
-
[self
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
- (void)dealloc
|
|
167
|
-
{
|
|
168
|
-
[NSNotificationCenter.defaultCenter removeObserver:self];
|
|
60
|
+
[self createProvider];
|
|
169
61
|
}
|
|
170
62
|
|
|
171
63
|
@end
|
|
@@ -30,6 +30,20 @@ import UIKit
|
|
|
30
30
|
|
|
31
31
|
var isConfigured: Bool { frequency != nil }
|
|
32
32
|
|
|
33
|
+
@objc public static func resetDatastore(_ completion: (NSError?) -> Void) {
|
|
34
|
+
guard !shared.isConfigured else {
|
|
35
|
+
completion(error("E_TIPS_ALREADY_CONFIGURED", "Call and await TipKit.resetDatastore() before TipKit.configure(). Restart the app process to reset after configuration; Fast Refresh is not sufficient."))
|
|
36
|
+
return
|
|
37
|
+
}
|
|
38
|
+
do {
|
|
39
|
+
try Tips.resetDatastore()
|
|
40
|
+
shared.knownTips.removeAll()
|
|
41
|
+
completion(nil)
|
|
42
|
+
} catch {
|
|
43
|
+
completion(error as NSError)
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
33
47
|
@objc public static func configure(_ frequency: String, completion: (NSError?) -> Void) {
|
|
34
48
|
do {
|
|
35
49
|
try shared.configure(frequency)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["TurboModuleRegistry","get"],"sourceRoot":"../../src","sources":["NativeTinyui.ts"],"mappings":";;AACA,SAASA,mBAAmB,QAAQ,cAAc;
|
|
1
|
+
{"version":3,"names":["TurboModuleRegistry","get"],"sourceRoot":"../../src","sources":["NativeTinyui.ts"],"mappings":";;AACA,SAASA,mBAAmB,QAAQ,cAAc;AAalD,eAAeA,mBAAmB,CAACC,GAAG,CAAO,QAAQ,CAAC","ignoreList":[]}
|
|
@@ -12,8 +12,6 @@ export const SFSymbol = /*#__PURE__*/forwardRef(function SFSymbolRoot({
|
|
|
12
12
|
size,
|
|
13
13
|
weight,
|
|
14
14
|
scale,
|
|
15
|
-
textStyle,
|
|
16
|
-
fontFamily,
|
|
17
15
|
allowFontScaling,
|
|
18
16
|
maxFontSizeMultiplier,
|
|
19
17
|
renderingMode,
|
|
@@ -41,8 +39,6 @@ export const SFSymbol = /*#__PURE__*/forwardRef(function SFSymbolRoot({
|
|
|
41
39
|
size,
|
|
42
40
|
weight,
|
|
43
41
|
scale,
|
|
44
|
-
textStyle,
|
|
45
|
-
fontFamily,
|
|
46
42
|
allowFontScaling,
|
|
47
43
|
maxFontSizeMultiplier,
|
|
48
44
|
renderingMode,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["forwardRef","StyleSheet","useWindowDimensions","assertComponentEnabled","NativeSFSymbolView","serializeSFSymbol","jsx","_jsx","SFSymbol","SFSymbolRoot","name","source","size","weight","scale","
|
|
1
|
+
{"version":3,"names":["forwardRef","StyleSheet","useWindowDimensions","assertComponentEnabled","NativeSFSymbolView","serializeSFSymbol","jsx","_jsx","SFSymbol","SFSymbolRoot","name","source","size","weight","scale","allowFontScaling","maxFontSizeMultiplier","renderingMode","color","paletteColors","variableValue","variableValueMode","colorRenderingMode","effect","contentTransition","respectReduceMotion","resizeMode","style","accessible","accessibilityRole","viewProps","ref","fontScale","serialized","styles","symbol","create","alignSelf"],"sourceRoot":"../../../src","sources":["SFSymbol/index.tsx"],"mappings":";;AAAA,SAASA,UAAU,QAA2B,OAAO;AACrD,SAASC,UAAU,EAAEC,mBAAmB,QAAmB,cAAc;AAEzE,SAASC,sBAAsB,QAAQ,mBAAU;AACjD,OAAOC,kBAAkB,MAAM,2BAA2B;AAC1D,SAASC,iBAAiB,QAAQ,cAAW;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAG9C,OAAO,MAAMC,QAAQ,gBAAGR,UAAU,CAChC,SAASS,YAAYA,CACnB;EACEC,IAAI;EACJC,MAAM;EACNC,IAAI;EACJC,MAAM;EACNC,KAAK;EACLC,gBAAgB;EAChBC,qBAAqB;EACrBC,aAAa;EACbC,KAAK;EACLC,aAAa;EACbC,aAAa;EACbC,iBAAiB;EACjBC,kBAAkB;EAClBC,MAAM;EACNC,iBAAiB;EACjBC,mBAAmB,GAAG,IAAI;EAC1BC,UAAU,GAAG,QAAQ;EACrBC,KAAK;EACLC,UAAU,GAAG,KAAK;EAClBC,iBAAiB,GAAG,OAAO;EAC3B,GAAGC;AACL,CAAC,EACDC,GAAG,EACH;EACA5B,sBAAsB,CAAC,UAAU,CAAC;EAClC,MAAM;IAAE6B;EAAU,CAAC,GAAG9B,mBAAmB,CAAC,CAAC;EAC3C,MAAM+B,UAAU,GAAG5B,iBAAiB,CAClC;IACEK,IAAI;IACJC,MAAM;IACNC,IAAI;IACJC,MAAM;IACNC,KAAK;IACLC,gBAAgB;IAChBC,qBAAqB;IACrBC,aAAa;IACbC,KAAK;IACLC,aAAa;IACbC,aAAa;IACbC,iBAAiB;IACjBC,kBAAkB;IAClBC,MAAM;IACNC;EACF,CAAC,EACDQ,SACF,CAAC;EAED,oBACEzB,IAAA,CAACH,kBAAkB;IAAA,GACb0B,SAAS;IAAA,GACTG,UAAU;IACdF,GAAG,EAAEA,GAAI;IACTH,UAAU,EAAEA,UAAW;IACvBC,iBAAiB,EAAEA,iBAAkB;IACrCJ,mBAAmB,EAAEA,mBAAoB;IACzCC,UAAU,EAAEA,UAAW;IACvBC,KAAK,EAAE,CAACO,MAAM,CAACC,MAAM,EAAER,KAAK;EAAE,CAC/B,CAAC;AAEN,CACF,CAAC;AAED,MAAMO,MAAM,GAAGjC,UAAU,CAACmC,MAAM,CAAC;EAAED,MAAM,EAAE;IAAEE,SAAS,EAAE;EAAa;AAAE,CAAC,CAAC","ignoreList":[]}
|
|
@@ -58,8 +58,6 @@ export function serializeSFSymbol(props, fontScale) {
|
|
|
58
58
|
size: props.size ?? 17,
|
|
59
59
|
weight: props.weight ?? 'unspecified',
|
|
60
60
|
scale: props.scale ?? 'default',
|
|
61
|
-
textStyle: props.textStyle,
|
|
62
|
-
fontFamily: props.fontFamily,
|
|
63
61
|
fontScale: props.allowFontScaling === false ? 1 : Math.min(fontScale, props.maxFontSizeMultiplier || Infinity),
|
|
64
62
|
renderingMode: props.renderingMode ?? 'automatic',
|
|
65
63
|
color: props.color === undefined ? undefined : processColor(props.color),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["processColor","finite","name","value","minimum","undefined","Number","isFinite","RangeError","positive","serializeSFSymbol","props","fontScale","size","variableValue","maxFontSizeMultiplier","paletteColors","length","some","color","effects","effect","Array","isArray","types","Set","has","type","Error","add","options","speed","repeatDelay","repeat","isSafeInteger","repeatBehavior","angle","trigger","contentTransition","configuration","source","weight","scale","
|
|
1
|
+
{"version":3,"names":["processColor","finite","name","value","minimum","undefined","Number","isFinite","RangeError","positive","serializeSFSymbol","props","fontScale","size","variableValue","maxFontSizeMultiplier","paletteColors","length","some","color","effects","effect","Array","isArray","types","Set","has","type","Error","add","options","speed","repeatDelay","repeat","isSafeInteger","repeatBehavior","angle","trigger","contentTransition","configuration","source","weight","scale","allowFontScaling","Math","min","Infinity","renderingMode","map","variableValueMode","colorRenderingMode","active","animated"],"sourceRoot":"../../../src","sources":["SFSymbol/options.ts"],"mappings":";;AAAA,SAASA,YAAY,QAAQ,cAAc;AAI3C,SAASC,MAAMA,CAACC,IAAY,EAAEC,KAAyB,EAAEC,OAAe,EAAE;EACxE,IAAID,KAAK,KAAKE,SAAS,KAAK,CAACC,MAAM,CAACC,QAAQ,CAACJ,KAAK,CAAC,IAAIA,KAAK,GAAGC,OAAO,CAAC,EAAE;IACvE,MAAM,IAAII,UAAU,CAClB,qBAAqBN,IAAI,0BAA0BE,OAAO,GAC5D,CAAC;EACH;AACF;AAEA,SAASK,QAAQA,CAACP,IAAY,EAAEC,KAAyB,EAAE;EACzDF,MAAM,CAACC,IAAI,EAAEC,KAAK,EAAE,CAAC,CAAC;EACtB,IAAIA,KAAK,KAAK,CAAC,EAAE;IACf,MAAM,IAAIK,UAAU,CAAC,qBAAqBN,IAAI,0BAA0B,CAAC;EAC3E;AACF;AAEA,OAAO,SAASQ,iBAAiBA,CAACC,KAAoB,EAAEC,SAAiB,EAAE;EACzEH,QAAQ,CAAC,MAAM,EAAEE,KAAK,CAACE,IAAI,CAAC;EAC5BZ,MAAM,CAAC,eAAe,EAAEU,KAAK,CAACG,aAAa,EAAE,CAAC,CAAC;EAC/C,IAAIH,KAAK,CAACG,aAAa,KAAKT,SAAS,IAAIM,KAAK,CAACG,aAAa,GAAG,CAAC,EAAE;IAChE,MAAM,IAAIN,UAAU,CAAC,+CAA+C,CAAC;EACvE;EACA,IAAIG,KAAK,CAACI,qBAAqB,KAAK,CAAC,EAAE;IACrCd,MAAM,CAAC,uBAAuB,EAAEU,KAAK,CAACI,qBAAqB,EAAE,CAAC,CAAC;EACjE;EACA,IACEJ,KAAK,CAACK,aAAa,KAClBL,KAAK,CAACK,aAAa,CAACC,M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,KAAK,IAAKnB,YAAY,CAACmB,KAAK,CAAC,CAAC;MACvEL,aAAa,EAAEH,KAAK,CAACG,aAAa;MAClCmC,iBAAiB,EAAEtC,KAAK,CAACsC,iBAAiB,IAAI,WAAW;MACzDC,kBAAkB,EAAEvC,KAAK,CAACuC,kBAAkB,IAAI;IAClD,CAAC;IACD9B,OAAO,EAAEA,OAAO,CAAC4B,GAAG,CAAE3B,MAAM,KAAM;MAChC,GAAGA,MAAM;MACT8B,MAAM,EAAE9B,MAAM,CAAC8B,MAAM,IAAI,IAAI;MAC7BC,QAAQ,EAAE/B,MAAM,CAAC+B,QAAQ,IAAI;IAC/B,CAAC,CAAC,CAAC;IACHd,iBAAiB,EAAE3B,KAAK,CAAC2B,iBAAiB,IAAI,CAAC;EACjD,CAAC;AACH","ignoreList":[]}
|
|
@@ -5,6 +5,15 @@ import { validateTipId } from "./validation.js";
|
|
|
5
5
|
import { Popover } from "./Popover.js";
|
|
6
6
|
export const TipKit = {
|
|
7
7
|
Popover,
|
|
8
|
+
/**
|
|
9
|
+
* Clear all persisted tip, event and parameter records for testing.
|
|
10
|
+
* Call and await this before configure(); rejects if already configured,
|
|
11
|
+
* including after Fast Refresh in the same app process.
|
|
12
|
+
*/
|
|
13
|
+
async resetDatastore() {
|
|
14
|
+
assertComponentEnabled('TipKit');
|
|
15
|
+
await getNativeTinyui().resetTipsDatastore();
|
|
16
|
+
},
|
|
8
17
|
/** Configure TipKit once before mounting tips. Repeating the same options is safe. */
|
|
9
18
|
async configure({
|
|
10
19
|
displayFrequency = 'daily'
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["assertComponentEnabled","getNativeTinyui","validateTipId","Popover","TipKit","configure","displayFrequency","includes","Error","configureTips","invalidate","tipId","reason","invalidateTip"],"sourceRoot":"../../../src","sources":["TipKit/index.ts"],"mappings":";;AAAA,SAASA,sBAAsB,EAAEC,eAAe,QAAQ,mBAAU;AAElE,SAASC,aAAa,QAAQ,iBAAc;AAC5C,SAASC,OAAO,QAAQ,cAAW;AAEnC,OAAO,MAAMC,MAAM,GAAG;EACpBD,OAAO;EACP;
|
|
1
|
+
{"version":3,"names":["assertComponentEnabled","getNativeTinyui","validateTipId","Popover","TipKit","resetDatastore","resetTipsDatastore","configure","displayFrequency","includes","Error","configureTips","invalidate","tipId","reason","invalidateTip"],"sourceRoot":"../../../src","sources":["TipKit/index.ts"],"mappings":";;AAAA,SAASA,sBAAsB,EAAEC,eAAe,QAAQ,mBAAU;AAElE,SAASC,aAAa,QAAQ,iBAAc;AAC5C,SAASC,OAAO,QAAQ,cAAW;AAEnC,OAAO,MAAMC,MAAM,GAAG;EACpBD,OAAO;EACP;AACF;AACA;AACA;AACA;EACE,MAAME,cAAcA,CAAA,EAAkB;IACpCL,sBAAsB,CAAC,QAAQ,CAAC;IAChC,MAAMC,eAAe,CAAC,CAAC,CAACK,kBAAkB,CAAC,CAAC;EAC9C,CAAC;EAED;EACA,MAAMC,SAASA,CAAC;IACdC,gBAAgB,GAAG;EACA,CAAC,GAAG,CAAC,CAAC,EAAiB;IAC1CR,sBAAsB,CAAC,QAAQ,CAAC;IAChC,IACE,CAAC,CAAC,WAAW,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,CAAC,CAACS,QAAQ,CAC7DD,gBACF,CAAC,EACD;MACA,MAAM,IAAIE,KAAK,CACb,iEACF,CAAC;IACH;IACA,MAAMT,eAAe,CAAC,CAAC,CAACU,aAAa,CAACH,gBAAgB,CAAC;EACzD,CAAC;EAED;EACA,MAAMI,UAAUA,CACdC,KAAa,EACbC,MAA6B,GAAG,iBAAiB,EAClC;IACfd,sBAAsB,CAAC,QAAQ,CAAC;IAChCE,aAAa,CAACW,KAAK,CAAC;IACpB,IAAIC,MAAM,KAAK,iBAAiB,IAAIA,MAAM,KAAK,WAAW,EAAE;MAC1D,MAAM,IAAIJ,KAAK,CAAC,wDAAwD,CAAC;IAC3E;IACA,MAAMT,eAAe,CAAC,CAAC,CAACc,aAAa,CAACF,KAAK,EAAEC,MAAM,CAAC;EACtD;AACF,CAAC","ignoreList":[]}
|
package/lib/module/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Menu","TipKit","Stepper","ConcentricView","SFSymbol","Popover","PopoverClose","getNativeTinyui","assertComponentEnabled","LiquidGlassText"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;AAAA,SAASA,IAAI,QAAQ,iBAAQ;AAC7B,SAASC,MAAM,QAAQ,mBAAU;AAuBjC,SAASC,OAAO,QAAQ,oBAAW;AAGnC,SAASC,cAAc,QAAQ,2BAAkB;AAGjD,SAASC,QAAQ,QAAQ,qBAAY;
|
|
1
|
+
{"version":3,"names":["Menu","TipKit","Stepper","ConcentricView","SFSymbol","Popover","PopoverClose","getNativeTinyui","assertComponentEnabled","LiquidGlassText"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;AAAA,SAASA,IAAI,QAAQ,iBAAQ;AAC7B,SAASC,MAAM,QAAQ,mBAAU;AAuBjC,SAASC,OAAO,QAAQ,oBAAW;AAGnC,SAASC,cAAc,QAAQ,2BAAkB;AAGjD,SAASC,QAAQ,QAAQ,qBAAY;AAWrC,SAASC,OAAO,EAAEC,YAAY,QAAQ,oBAAW;AAUjD,SAASC,eAAe,EAAEC,sBAAsB,QAAQ,kBAAS;AAGjE,SAASC,eAAe,QAAQ,4BAAmB","ignoreList":[]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ColorValue, StyleProp, TextStyle, ViewProps } from 'react-native';
|
|
2
2
|
export type LiquidGlassTextFontDesign = 'default' | 'serif' | 'monospaced' | 'rounded';
|
|
3
|
-
export type LiquidGlassTextEffect = 'clear' | 'regular'
|
|
3
|
+
export type LiquidGlassTextEffect = 'clear' | 'regular';
|
|
4
4
|
/** React Native text styles supported by the native glass renderer. */
|
|
5
5
|
export type LiquidGlassTextStyle = Readonly<Pick<TextStyle, 'color' | 'fontFamily' | 'fontSize' | 'fontStyle' | 'fontWeight' | 'letterSpacing' | 'textAlign'>>;
|
|
6
6
|
export interface LiquidGlassTextProps extends Omit<ViewProps, 'children'> {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/LiquidGlassText/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEhF,MAAM,MAAM,yBAAyB,GACnC,SAAS,GAAG,OAAO,GAAG,YAAY,GAAG,SAAS,CAAC;AAEjD,MAAM,MAAM,qBAAqB,GAAG,OAAO,GAAG,SAAS,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/LiquidGlassText/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEhF,MAAM,MAAM,yBAAyB,GACnC,SAAS,GAAG,OAAO,GAAG,YAAY,GAAG,SAAS,CAAC;AAEjD,MAAM,MAAM,qBAAqB,GAAG,OAAO,GAAG,SAAS,CAAC;AAExD,uEAAuE;AACvE,MAAM,MAAM,oBAAoB,GAAG,QAAQ,CACzC,IAAI,CACF,SAAS,EACP,OAAO,GACP,YAAY,GACZ,UAAU,GACV,WAAW,GACX,YAAY,GACZ,eAAe,GACf,WAAW,CACd,CACF,CAAC;AAEF,MAAM,WAAW,oBAAqB,SAAQ,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC;IACvE,0EAA0E;IAC1E,IAAI,EAAE,MAAM,CAAC;IACb,sEAAsE;IACtE,MAAM,CAAC,EAAE,qBAAqB,CAAC;IAC/B,0CAA0C;IAC1C,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,mEAAmE;IACnE,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,wCAAwC;IACxC,UAAU,CAAC,EAAE,yBAAyB,CAAC;IACvC,8EAA8E;IAC9E,SAAS,CAAC,EAAE,SAAS,CAAC,oBAAoB,CAAC,CAAC;IAC5C,oEAAoE;IACpE,sBAAsB,CAAC,EAAE,SAAS,GAAG,QAAQ,GAAG,UAAU,CAAC;CAC5D"}
|
|
@@ -5,6 +5,7 @@ export interface Spec extends TurboModule {
|
|
|
5
5
|
* based on the `react-native-tinyui.components` array in package.json.
|
|
6
6
|
*/
|
|
7
7
|
getEnabledComponents(): ReadonlyArray<string>;
|
|
8
|
+
resetTipsDatastore(): Promise<void>;
|
|
8
9
|
configureTips(displayFrequency: string): Promise<void>;
|
|
9
10
|
invalidateTip(tipId: string, reason: string): Promise<void>;
|
|
10
11
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NativeTinyui.d.ts","sourceRoot":"","sources":["../../../src/NativeTinyui.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAGhD,MAAM,WAAW,IAAK,SAAQ,WAAW;IACvC;;;OAGG;IACH,oBAAoB,IAAI,aAAa,CAAC,MAAM,CAAC,CAAC;IAC9C,aAAa,CAAC,gBAAgB,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACvD,aAAa,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAC7D;;AAED,wBAAuD"}
|
|
1
|
+
{"version":3,"file":"NativeTinyui.d.ts","sourceRoot":"","sources":["../../../src/NativeTinyui.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAGhD,MAAM,WAAW,IAAK,SAAQ,WAAW;IACvC;;;OAGG;IACH,oBAAoB,IAAI,aAAa,CAAC,MAAM,CAAC,CAAC;IAC9C,kBAAkB,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IACpC,aAAa,CAAC,gBAAgB,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACvD,aAAa,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAC7D;;AAED,wBAAuD"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { SFSymbolProps } from './types.js';
|
|
2
2
|
export declare const SFSymbol: import("react").ForwardRefExoticComponent<SFSymbolProps & import("react").RefAttributes<import("react-native/types_generated/src/private/webapis/dom/nodes/ReactNativeElement").default>>;
|
|
3
|
-
export type { SFSymbolContentTransition, SFSymbolEffect, SFSymbolEffectOptions, SFSymbolProps, SFSymbolRenderingMode, SFSymbolScale,
|
|
3
|
+
export type { SFSymbolContentTransition, SFSymbolEffect, SFSymbolEffectOptions, SFSymbolProps, SFSymbolRenderingMode, SFSymbolScale, SFSymbolWeight, } from './types.js';
|
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/SFSymbol/index.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAS,CAAC;AAE7C,eAAO,MAAM,QAAQ,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/SFSymbol/index.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAS,CAAC;AAE7C,eAAO,MAAM,QAAQ,2LA+DpB,CAAC;AAIF,YAAY,EACV,yBAAyB,EACzB,cAAc,EACd,qBAAqB,EACrB,aAAa,EACb,qBAAqB,EACrB,aAAa,EACb,cAAc,GACf,MAAM,YAAS,CAAC"}
|
|
@@ -6,8 +6,6 @@ export declare function serializeSFSymbol(props: SFSymbolProps, fontScale: numbe
|
|
|
6
6
|
size: number;
|
|
7
7
|
weight: import("./types.js").SFSymbolWeight;
|
|
8
8
|
scale: import("./types.js").SFSymbolScale;
|
|
9
|
-
textStyle: import("./types.js").SFSymbolTextStyle | undefined;
|
|
10
|
-
fontFamily: string | undefined;
|
|
11
9
|
fontScale: number;
|
|
12
10
|
renderingMode: import("./types.js").SFSymbolRenderingMode;
|
|
13
11
|
color: import("react-native").ProcessedColorValue | null | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../../../src/SFSymbol/options.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAkB,aAAa,EAAE,MAAM,YAAS,CAAC;AAiB7D,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM
|
|
1
|
+
{"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../../../src/SFSymbol/options.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAkB,aAAa,EAAE,MAAM,YAAS,CAAC;AAiB7D,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA8FxE"}
|
|
@@ -2,7 +2,6 @@ import type { ColorValue, ViewProps } from 'react-native';
|
|
|
2
2
|
export type SFSymbolWeight = 'unspecified' | 'ultraLight' | 'thin' | 'light' | 'regular' | 'medium' | 'semibold' | 'bold' | 'heavy' | 'black';
|
|
3
3
|
export type SFSymbolScale = 'default' | 'unspecified' | 'small' | 'medium' | 'large';
|
|
4
4
|
export type SFSymbolRenderingMode = 'automatic' | 'monochrome' | 'hierarchical' | 'palette' | 'multicolor';
|
|
5
|
-
export type SFSymbolTextStyle = 'extraLargeTitle' | 'extraLargeTitle2' | 'largeTitle' | 'title1' | 'title2' | 'title3' | 'headline' | 'subheadline' | 'body' | 'callout' | 'footnote' | 'caption1' | 'caption2';
|
|
6
5
|
export interface SFSymbolEffectOptions {
|
|
7
6
|
/** Positive speed multiplier. Defaults to the system speed (1). */
|
|
8
7
|
speed?: number;
|
|
@@ -78,13 +77,10 @@ export interface SFSymbolProps extends Omit<ViewProps, 'children'> {
|
|
|
78
77
|
name: string;
|
|
79
78
|
/** Load a system symbol (default) or a custom symbol in the app asset catalog. */
|
|
80
79
|
source?: 'system' | 'asset';
|
|
81
|
-
/** Point size before font scaling. Defaults to 17.
|
|
80
|
+
/** Point size before font scaling. Defaults to 17. */
|
|
82
81
|
size?: number;
|
|
83
82
|
weight?: SFSymbolWeight;
|
|
84
83
|
scale?: SFSymbolScale;
|
|
85
|
-
textStyle?: SFSymbolTextStyle;
|
|
86
|
-
/** Font/PostScript name used to derive the symbol's font metrics. */
|
|
87
|
-
fontFamily?: string;
|
|
88
84
|
/** Apply React Native's fontScale to the point size. Defaults to true. */
|
|
89
85
|
allowFontScaling?: boolean;
|
|
90
86
|
/** Maximum font scale, >= 1. Zero/undefined means no limit. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/SFSymbol/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE1D,MAAM,MAAM,cAAc,GACtB,aAAa,GACb,YAAY,GACZ,MAAM,GACN,OAAO,GACP,SAAS,GACT,QAAQ,GACR,UAAU,GACV,MAAM,GACN,OAAO,GACP,OAAO,CAAC;AAEZ,MAAM,MAAM,aAAa,GACvB,SAAS,GAAG,aAAa,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;AAC3D,MAAM,MAAM,qBAAqB,GAC/B,WAAW,GAAG,YAAY,GAAG,cAAc,GAAG,SAAS,GAAG,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/SFSymbol/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,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Q,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC;IAChE,oEAAoE;IACpE,IAAI,EAAE,MAAM,CAAC;IACb,kFAAkF;IAClF,MAAM,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAC;IAC5B,sDAAsD;IACtD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,cAAc,CAAC;IACxB,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB,0EAA0E;IAC1E,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,+DAA+D;IAC/D,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,aAAa,CAAC,EAAE,qBAAqB,CAAC;IACtC,+EAA+E;IAC/E,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,+EAA+E;IAC/E,aAAa,CAAC,EAAE,SAAS,CAAC,UAAU,EAAE,UAAU,CAAC,EAAE,UAAU,CAAC,CAAC,CAAC;IAChE,8EAA8E;IAC9E,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,6EAA6E;IAC7E,iBAAiB,CAAC,EAAE,WAAW,GAAG,OAAO,GAAG,MAAM,CAAC;IACnD,iDAAiD;IACjD,kBAAkB,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,UAAU,CAAC;IACvD,iFAAiF;IACjF,UAAU,CAAC,EAAE,QAAQ,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,CAAC;IACxD,mFAAmF;IACnF,MAAM,CAAC,EAAE,cAAc,GAAG,SAAS,cAAc,EAAE,CAAC;IACpD,oFAAoF;IACpF,iBAAiB,CAAC,EAAE,yBAAyB,CAAC;IAC9C,gEAAgE;IAChE,mBAAmB,CAAC,EAAE,OAAO,CAAC;CAC/B"}
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import type { TipInvalidationReason, TipKitConfiguration } from './types.js';
|
|
2
2
|
export declare const TipKit: {
|
|
3
3
|
Popover: import("react").ForwardRefExoticComponent<import("./types.js").TipPopoverProps & import("react").RefAttributes<import("react-native/types_generated/src/private/webapis/dom/nodes/ReactNativeElement").default>>;
|
|
4
|
+
/**
|
|
5
|
+
* Clear all persisted tip, event and parameter records for testing.
|
|
6
|
+
* Call and await this before configure(); rejects if already configured,
|
|
7
|
+
* including after Fast Refresh in the same app process.
|
|
8
|
+
*/
|
|
9
|
+
resetDatastore(): Promise<void>;
|
|
4
10
|
/** Configure TipKit once before mounting tips. Repeating the same options is safe. */
|
|
5
11
|
configure({ displayFrequency, }?: TipKitConfiguration): Promise<void>;
|
|
6
12
|
/** Persistently invalidate a tip, including when its view is not mounted. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/TipKit/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,MAAM,YAAS,CAAC;AAI1E,eAAO,MAAM,MAAM;;IAEjB,sFAAsF;sCAGnF,mBAAmB,GAAQ,OAAO,CAAC,IAAI,CAAC;IAc3C,6EAA6E;sBAEpE,MAAM,WACL,qBAAqB,GAC5B,OAAO,CAAC,IAAI,CAAC;CAQjB,CAAC;AAEF,YAAY,EACV,SAAS,EACT,mBAAmB,EACnB,QAAQ,EACR,qBAAqB,EACrB,mBAAmB,EACnB,eAAe,EACf,SAAS,GACV,MAAM,YAAS,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/TipKit/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,MAAM,YAAS,CAAC;AAI1E,eAAO,MAAM,MAAM;;IAEjB;;;;OAIG;sBACqB,OAAO,CAAC,IAAI,CAAC;IAKrC,sFAAsF;sCAGnF,mBAAmB,GAAQ,OAAO,CAAC,IAAI,CAAC;IAc3C,6EAA6E;sBAEpE,MAAM,WACL,qBAAqB,GAC5B,OAAO,CAAC,IAAI,CAAC;CAQjB,CAAC;AAEF,YAAY,EACV,SAAS,EACT,mBAAmB,EACnB,QAAQ,EACR,qBAAqB,EACrB,mBAAmB,EACnB,eAAe,EACf,SAAS,GACV,MAAM,YAAS,CAAC"}
|
|
@@ -7,7 +7,7 @@ export type { StepperProps } from './Stepper/index.js';
|
|
|
7
7
|
export { ConcentricView } from './ConcentricView/index.js';
|
|
8
8
|
export type { ConcentricViewProps } from './ConcentricView/index.js';
|
|
9
9
|
export { SFSymbol } from './SFSymbol/index.js';
|
|
10
|
-
export type { SFSymbolContentTransition, SFSymbolEffect, SFSymbolEffectOptions, SFSymbolProps, SFSymbolRenderingMode, SFSymbolScale,
|
|
10
|
+
export type { SFSymbolContentTransition, SFSymbolEffect, SFSymbolEffectOptions, SFSymbolProps, SFSymbolRenderingMode, SFSymbolScale, SFSymbolWeight, } from './SFSymbol/index.js';
|
|
11
11
|
export { Popover, PopoverClose } from './Popover/index.js';
|
|
12
12
|
export type { PopoverArrowEdge, PopoverAttachmentAnchor, PopoverCloseProps, PopoverContent, PopoverContentRenderArgs, PopoverProps, } from './Popover/index.js';
|
|
13
13
|
export { getNativeTinyui, assertComponentEnabled } from './utils/index.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAQ,CAAC;AAC9B,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAU,CAAC;AAClC,YAAY,EACV,SAAS,EACT,mBAAmB,EACnB,QAAQ,EACR,qBAAqB,EACrB,eAAe,EACf,mBAAmB,EACnB,SAAS,GACV,MAAM,mBAAU,CAAC;AAClB,YAAY,EACV,gBAAgB,EAChB,oBAAoB,EACpB,wBAAwB,EACxB,iBAAiB,EACjB,aAAa,EACb,UAAU,EACV,SAAS,EACT,OAAO,EACP,iBAAiB,EACjB,iBAAiB,GAClB,MAAM,iBAAQ,CAAC;AAEhB,OAAO,EAAE,OAAO,EAAE,MAAM,oBA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ACV,gBAAgB,EAChB,uBAAuB,EACvB,iBAAiB,EACjB,cAAc,EACd,wBAAwB,EACxB,YAAY,GACb,MAAM,oBAAW,CAAC;AAEnB,OAAO,EAAE,eAAe,EAAE,sBAAsB,EAAE,MAAM,kBAAS,CAAC;AAClE,YAAY,EAAE,eAAe,EAAE,MAAM,kBAAS,CAAC;AAE/C,OAAO,EAAE,eAAe,EAAE,MAAM,4BAAmB,CAAC;AACpD,YAAY,EACV,yBAAyB,EACzB,qBAAqB,EACrB,oBAAoB,EACpB,oBAAoB,GACrB,MAAM,4BAAmB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-tinyui",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "Dependency-free native iOS Menu, Popover, TipKit, Stepper, ConcentricView, SFSymbol and LiquidGlassText components for React Native",
|
|
5
5
|
"main": "./lib/module/index.js",
|
|
6
6
|
"types": "./lib/typescript/src/index.d.ts",
|
|
@@ -3,7 +3,7 @@ import type { ColorValue, StyleProp, TextStyle, ViewProps } from 'react-native';
|
|
|
3
3
|
export type LiquidGlassTextFontDesign =
|
|
4
4
|
'default' | 'serif' | 'monospaced' | 'rounded';
|
|
5
5
|
|
|
6
|
-
export type LiquidGlassTextEffect = 'clear' | 'regular'
|
|
6
|
+
export type LiquidGlassTextEffect = 'clear' | 'regular';
|
|
7
7
|
|
|
8
8
|
/** React Native text styles supported by the native glass renderer. */
|
|
9
9
|
export type LiquidGlassTextStyle = Readonly<
|
package/src/NativeTinyui.ts
CHANGED
|
@@ -7,6 +7,7 @@ export interface Spec extends TurboModule {
|
|
|
7
7
|
* based on the `react-native-tinyui.components` array in package.json.
|
|
8
8
|
*/
|
|
9
9
|
getEnabledComponents(): ReadonlyArray<string>;
|
|
10
|
+
resetTipsDatastore(): Promise<void>;
|
|
10
11
|
configureTips(displayFrequency: string): Promise<void>;
|
|
11
12
|
invalidateTip(tipId: string, reason: string): Promise<void>;
|
|
12
13
|
}
|
package/src/SFSymbol/index.tsx
CHANGED
|
@@ -14,8 +14,6 @@ export const SFSymbol = forwardRef<ComponentRef<typeof View>, SFSymbolProps>(
|
|
|
14
14
|
size,
|
|
15
15
|
weight,
|
|
16
16
|
scale,
|
|
17
|
-
textStyle,
|
|
18
|
-
fontFamily,
|
|
19
17
|
allowFontScaling,
|
|
20
18
|
maxFontSizeMultiplier,
|
|
21
19
|
renderingMode,
|
|
@@ -44,8 +42,6 @@ export const SFSymbol = forwardRef<ComponentRef<typeof View>, SFSymbolProps>(
|
|
|
44
42
|
size,
|
|
45
43
|
weight,
|
|
46
44
|
scale,
|
|
47
|
-
textStyle,
|
|
48
|
-
fontFamily,
|
|
49
45
|
allowFontScaling,
|
|
50
46
|
maxFontSizeMultiplier,
|
|
51
47
|
renderingMode,
|
|
@@ -84,6 +80,5 @@ export type {
|
|
|
84
80
|
SFSymbolProps,
|
|
85
81
|
SFSymbolRenderingMode,
|
|
86
82
|
SFSymbolScale,
|
|
87
|
-
SFSymbolTextStyle,
|
|
88
83
|
SFSymbolWeight,
|
|
89
84
|
} from './types';
|
package/src/SFSymbol/options.ts
CHANGED
|
@@ -93,8 +93,6 @@ export function serializeSFSymbol(props: SFSymbolProps, fontScale: number) {
|
|
|
93
93
|
size: props.size ?? 17,
|
|
94
94
|
weight: props.weight ?? 'unspecified',
|
|
95
95
|
scale: props.scale ?? 'default',
|
|
96
|
-
textStyle: props.textStyle,
|
|
97
|
-
fontFamily: props.fontFamily,
|
|
98
96
|
fontScale:
|
|
99
97
|
props.allowFontScaling === false
|
|
100
98
|
? 1
|
package/src/SFSymbol/types.ts
CHANGED
|
@@ -16,20 +16,6 @@ export type SFSymbolScale =
|
|
|
16
16
|
'default' | 'unspecified' | 'small' | 'medium' | 'large';
|
|
17
17
|
export type SFSymbolRenderingMode =
|
|
18
18
|
'automatic' | 'monochrome' | 'hierarchical' | 'palette' | 'multicolor';
|
|
19
|
-
export type SFSymbolTextStyle =
|
|
20
|
-
| 'extraLargeTitle'
|
|
21
|
-
| 'extraLargeTitle2'
|
|
22
|
-
| 'largeTitle'
|
|
23
|
-
| 'title1'
|
|
24
|
-
| 'title2'
|
|
25
|
-
| 'title3'
|
|
26
|
-
| 'headline'
|
|
27
|
-
| 'subheadline'
|
|
28
|
-
| 'body'
|
|
29
|
-
| 'callout'
|
|
30
|
-
| 'footnote'
|
|
31
|
-
| 'caption1'
|
|
32
|
-
| 'caption2';
|
|
33
19
|
|
|
34
20
|
export interface SFSymbolEffectOptions {
|
|
35
21
|
/** Positive speed multiplier. Defaults to the system speed (1). */
|
|
@@ -125,13 +111,10 @@ export interface SFSymbolProps extends Omit<ViewProps, 'children'> {
|
|
|
125
111
|
name: string;
|
|
126
112
|
/** Load a system symbol (default) or a custom symbol in the app asset catalog. */
|
|
127
113
|
source?: 'system' | 'asset';
|
|
128
|
-
/** Point size before font scaling. Defaults to 17.
|
|
114
|
+
/** Point size before font scaling. Defaults to 17. */
|
|
129
115
|
size?: number;
|
|
130
116
|
weight?: SFSymbolWeight;
|
|
131
117
|
scale?: SFSymbolScale;
|
|
132
|
-
textStyle?: SFSymbolTextStyle;
|
|
133
|
-
/** Font/PostScript name used to derive the symbol's font metrics. */
|
|
134
|
-
fontFamily?: string;
|
|
135
118
|
/** Apply React Native's fontScale to the point size. Defaults to true. */
|
|
136
119
|
allowFontScaling?: boolean;
|
|
137
120
|
/** Maximum font scale, >= 1. Zero/undefined means no limit. */
|
package/src/TipKit/index.ts
CHANGED
|
@@ -5,6 +5,16 @@ import { Popover } from './Popover';
|
|
|
5
5
|
|
|
6
6
|
export const TipKit = {
|
|
7
7
|
Popover,
|
|
8
|
+
/**
|
|
9
|
+
* Clear all persisted tip, event and parameter records for testing.
|
|
10
|
+
* Call and await this before configure(); rejects if already configured,
|
|
11
|
+
* including after Fast Refresh in the same app process.
|
|
12
|
+
*/
|
|
13
|
+
async resetDatastore(): Promise<void> {
|
|
14
|
+
assertComponentEnabled('TipKit');
|
|
15
|
+
await getNativeTinyui().resetTipsDatastore();
|
|
16
|
+
},
|
|
17
|
+
|
|
8
18
|
/** Configure TipKit once before mounting tips. Repeating the same options is safe. */
|
|
9
19
|
async configure({
|
|
10
20
|
displayFrequency = 'daily',
|
package/src/index.tsx
CHANGED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
#pragma once
|
|
2
|
-
|
|
3
|
-
#import <Symbols/Symbols.h>
|
|
4
|
-
|
|
5
|
-
NS_ASSUME_NONNULL_BEGIN
|
|
6
|
-
NSSymbolEffect * _Nullable TinyuiSFSymbolEffect(NSDictionary *configuration);
|
|
7
|
-
NSSymbolEffectOptions *TinyuiSFSymbolOptions(NSDictionary * _Nullable configuration);
|
|
8
|
-
NSSymbolContentTransition * _Nullable TinyuiSFSymbolTransition(NSDictionary *configuration);
|
|
9
|
-
NS_ASSUME_NONNULL_END
|