@rocapine/react-native-onboarding 1.16.0 → 1.17.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/dist/infra/fonts/FontRegistryContext.d.ts +16 -0
- package/dist/infra/fonts/FontRegistryContext.d.ts.map +1 -0
- package/dist/infra/fonts/FontRegistryContext.js +35 -0
- package/dist/infra/fonts/FontRegistryContext.js.map +1 -0
- package/dist/infra/fonts/index.d.ts +3 -0
- package/dist/infra/fonts/index.d.ts.map +1 -0
- package/dist/infra/fonts/index.js +13 -0
- package/dist/infra/fonts/index.js.map +1 -0
- package/dist/infra/fonts/registry.d.ts +6 -0
- package/dist/infra/fonts/registry.d.ts.map +1 -0
- package/dist/infra/fonts/registry.js +96 -0
- package/dist/infra/fonts/registry.js.map +1 -0
- package/dist/infra/index.d.ts +1 -0
- package/dist/infra/index.d.ts.map +1 -1
- package/dist/infra/index.js +1 -0
- package/dist/infra/index.js.map +1 -1
- package/dist/infra/provider/FontLoader.d.ts +9 -0
- package/dist/infra/provider/FontLoader.d.ts.map +1 -0
- package/dist/infra/provider/FontLoader.js +38 -0
- package/dist/infra/provider/FontLoader.js.map +1 -0
- package/dist/infra/provider/OnboardingProvider.d.ts +7 -1
- package/dist/infra/provider/OnboardingProvider.d.ts.map +1 -1
- package/dist/infra/provider/OnboardingProvider.js +11 -3
- package/dist/infra/provider/OnboardingProvider.js.map +1 -1
- package/dist/infra/provider/index.d.ts +1 -0
- package/dist/infra/provider/index.d.ts.map +1 -1
- package/dist/infra/provider/index.js +3 -1
- package/dist/infra/provider/index.js.map +1 -1
- package/dist/onboarding-example.d.ts +78 -0
- package/dist/onboarding-example.d.ts.map +1 -1
- package/dist/onboarding-example.js +23 -1
- package/dist/onboarding-example.js.map +1 -1
- package/dist/steps/ComposableScreen/elements/ButtonElement.d.ts +5 -0
- package/dist/steps/ComposableScreen/elements/ButtonElement.d.ts.map +1 -1
- package/dist/steps/ComposableScreen/elements/ButtonElement.js +1 -0
- package/dist/steps/ComposableScreen/elements/ButtonElement.js.map +1 -1
- package/dist/steps/ComposableScreen/elements/CarouselElement.d.ts +1 -1
- package/dist/steps/ComposableScreen/elements/CheckboxGroupElement.d.ts +5 -0
- package/dist/steps/ComposableScreen/elements/CheckboxGroupElement.d.ts.map +1 -1
- package/dist/steps/ComposableScreen/elements/CheckboxGroupElement.js +1 -0
- package/dist/steps/ComposableScreen/elements/CheckboxGroupElement.js.map +1 -1
- package/dist/steps/ComposableScreen/elements/InputElement.d.ts +5 -0
- package/dist/steps/ComposableScreen/elements/InputElement.d.ts.map +1 -1
- package/dist/steps/ComposableScreen/elements/InputElement.js +1 -0
- package/dist/steps/ComposableScreen/elements/InputElement.js.map +1 -1
- package/dist/steps/ComposableScreen/elements/RadioGroupElement.d.ts +5 -0
- package/dist/steps/ComposableScreen/elements/RadioGroupElement.d.ts.map +1 -1
- package/dist/steps/ComposableScreen/elements/RadioGroupElement.js +1 -0
- package/dist/steps/ComposableScreen/elements/RadioGroupElement.js.map +1 -1
- package/dist/steps/ComposableScreen/elements/TextElement.d.ts +5 -0
- package/dist/steps/ComposableScreen/elements/TextElement.d.ts.map +1 -1
- package/dist/steps/ComposableScreen/elements/TextElement.js +1 -0
- package/dist/steps/ComposableScreen/elements/TextElement.js.map +1 -1
- package/dist/types.d.ts +4 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +7 -1
- package/src/infra/fonts/FontRegistryContext.tsx +45 -0
- package/src/infra/fonts/index.ts +12 -0
- package/src/infra/fonts/registry.ts +104 -0
- package/src/infra/index.ts +1 -0
- package/src/infra/provider/FontLoader.tsx +40 -0
- package/src/infra/provider/OnboardingProvider.tsx +49 -5
- package/src/infra/provider/index.ts +1 -0
- package/src/onboarding-example.ts +23 -1
- package/src/steps/ComposableScreen/elements/ButtonElement.ts +2 -0
- package/src/steps/ComposableScreen/elements/CheckboxGroupElement.ts +2 -0
- package/src/steps/ComposableScreen/elements/InputElement.ts +2 -0
- package/src/steps/ComposableScreen/elements/RadioGroupElement.ts +2 -0
- package/src/steps/ComposableScreen/elements/TextElement.ts +2 -0
- package/src/types.ts +21 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { FontRegistry } from "./registry";
|
|
2
|
+
export declare const FontRegistryProvider: import("react").Provider<FontRegistry>;
|
|
3
|
+
export declare const useFontRegistry: () => FontRegistry;
|
|
4
|
+
export declare const useResolvedFontFamily: (family: string | null | undefined, weight: string | number | null | undefined) => string | undefined;
|
|
5
|
+
/**
|
|
6
|
+
* Resolves a `family + weight` request to a registered font name. Returns
|
|
7
|
+
* `resolvedToVariant: true` when the registry matched a concrete weighted
|
|
8
|
+
* variant — callers should then suppress `fontWeight` on the rendered Text to
|
|
9
|
+
* avoid synthetic emboldening on top of an already-weighted font file.
|
|
10
|
+
*/
|
|
11
|
+
export declare const useResolvedFontStyle: (family: string | null | undefined, weight: string | number | null | undefined) => {
|
|
12
|
+
fontFamily: string | undefined;
|
|
13
|
+
fontWeight: string | number | undefined;
|
|
14
|
+
resolvedToVariant: boolean;
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=FontRegistryContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FontRegistryContext.d.ts","sourceRoot":"","sources":["../../../src/infra/fonts/FontRegistryContext.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAK/C,eAAO,MAAM,oBAAoB,wCAA+B,CAAC;AAEjE,eAAO,MAAM,eAAe,QAAO,YAA+C,CAAC;AAEnF,eAAO,MAAM,qBAAqB,GAChC,QAAQ,MAAM,GAAG,IAAI,GAAG,SAAS,EACjC,QAAQ,MAAM,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,KACzC,MAAM,GAAG,SAGX,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB,GAC/B,QAAQ,MAAM,GAAG,IAAI,GAAG,SAAS,EACjC,QAAQ,MAAM,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,KACzC;IACD,UAAU,EAAE,MAAM,GAAG,SAAS,CAAC;IAC/B,UAAU,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;IACxC,iBAAiB,EAAE,OAAO,CAAC;CAc5B,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useResolvedFontStyle = exports.useResolvedFontFamily = exports.useFontRegistry = exports.FontRegistryProvider = void 0;
|
|
4
|
+
const react_1 = require("react");
|
|
5
|
+
const registry_1 = require("./registry");
|
|
6
|
+
const FontRegistryContext = (0, react_1.createContext)({});
|
|
7
|
+
exports.FontRegistryProvider = FontRegistryContext.Provider;
|
|
8
|
+
const useFontRegistry = () => (0, react_1.useContext)(FontRegistryContext);
|
|
9
|
+
exports.useFontRegistry = useFontRegistry;
|
|
10
|
+
const useResolvedFontFamily = (family, weight) => {
|
|
11
|
+
const registry = (0, exports.useFontRegistry)();
|
|
12
|
+
return (0, react_1.useMemo)(() => (0, registry_1.resolveFontFamily)(registry, family, weight), [registry, family, weight]);
|
|
13
|
+
};
|
|
14
|
+
exports.useResolvedFontFamily = useResolvedFontFamily;
|
|
15
|
+
/**
|
|
16
|
+
* Resolves a `family + weight` request to a registered font name. Returns
|
|
17
|
+
* `resolvedToVariant: true` when the registry matched a concrete weighted
|
|
18
|
+
* variant — callers should then suppress `fontWeight` on the rendered Text to
|
|
19
|
+
* avoid synthetic emboldening on top of an already-weighted font file.
|
|
20
|
+
*/
|
|
21
|
+
const useResolvedFontStyle = (family, weight) => {
|
|
22
|
+
const registry = (0, exports.useFontRegistry)();
|
|
23
|
+
return (0, react_1.useMemo)(() => {
|
|
24
|
+
const fontFamily = (0, registry_1.resolveFontFamily)(registry, family, weight);
|
|
25
|
+
const variants = family ? registry === null || registry === void 0 ? void 0 : registry[family] : undefined;
|
|
26
|
+
const resolvedToVariant = !!variants && fontFamily !== undefined && fontFamily !== family;
|
|
27
|
+
return {
|
|
28
|
+
fontFamily,
|
|
29
|
+
fontWeight: resolvedToVariant ? undefined : (weight !== null && weight !== void 0 ? weight : undefined),
|
|
30
|
+
resolvedToVariant,
|
|
31
|
+
};
|
|
32
|
+
}, [registry, family, weight]);
|
|
33
|
+
};
|
|
34
|
+
exports.useResolvedFontStyle = useResolvedFontStyle;
|
|
35
|
+
//# sourceMappingURL=FontRegistryContext.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FontRegistryContext.js","sourceRoot":"","sources":["../../../src/infra/fonts/FontRegistryContext.tsx"],"names":[],"mappings":";;;AAAA,iCAA2D;AAE3D,yCAA+C;AAE/C,MAAM,mBAAmB,GAAG,IAAA,qBAAa,EAAe,EAAE,CAAC,CAAC;AAE/C,QAAA,oBAAoB,GAAG,mBAAmB,CAAC,QAAQ,CAAC;AAE1D,MAAM,eAAe,GAAG,GAAiB,EAAE,CAAC,IAAA,kBAAU,EAAC,mBAAmB,CAAC,CAAC;AAAtE,QAAA,eAAe,mBAAuD;AAE5E,MAAM,qBAAqB,GAAG,CACnC,MAAiC,EACjC,MAA0C,EACtB,EAAE;IACtB,MAAM,QAAQ,GAAG,IAAA,uBAAe,GAAE,CAAC;IACnC,OAAO,IAAA,eAAO,EAAC,GAAG,EAAE,CAAC,IAAA,4BAAiB,EAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;AAChG,CAAC,CAAC;AANW,QAAA,qBAAqB,yBAMhC;AAEF;;;;;GAKG;AACI,MAAM,oBAAoB,GAAG,CAClC,MAAiC,EACjC,MAA0C,EAK1C,EAAE;IACF,MAAM,QAAQ,GAAG,IAAA,uBAAe,GAAE,CAAC;IACnC,OAAO,IAAA,eAAO,EAAC,GAAG,EAAE;QAClB,MAAM,UAAU,GAAG,IAAA,4BAAiB,EAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;QAC/D,MAAM,QAAQ,GAAG,MAAM,CAAC,CAAC,CAAC,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAG,MAAM,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;QACzD,MAAM,iBAAiB,GACrB,CAAC,CAAC,QAAQ,IAAI,UAAU,KAAK,SAAS,IAAI,UAAU,KAAK,MAAM,CAAC;QAClE,OAAO;YACL,UAAU;YACV,UAAU,EAAE,iBAAiB,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,MAAM,aAAN,MAAM,cAAN,MAAM,GAAI,SAAS,CAAC;YACjE,iBAAiB;SAClB,CAAC;IACJ,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;AACjC,CAAC,CAAC;AApBW,QAAA,oBAAoB,wBAoB/B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/infra/fonts/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,iBAAiB,EACjB,eAAe,EACf,KAAK,YAAY,GAClB,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,oBAAoB,EACpB,eAAe,EACf,qBAAqB,EACrB,oBAAoB,GACrB,MAAM,uBAAuB,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useResolvedFontStyle = exports.useResolvedFontFamily = exports.useFontRegistry = exports.FontRegistryProvider = exports.normalizeWeight = exports.resolveFontFamily = exports.registerFonts = void 0;
|
|
4
|
+
var registry_1 = require("./registry");
|
|
5
|
+
Object.defineProperty(exports, "registerFonts", { enumerable: true, get: function () { return registry_1.registerFonts; } });
|
|
6
|
+
Object.defineProperty(exports, "resolveFontFamily", { enumerable: true, get: function () { return registry_1.resolveFontFamily; } });
|
|
7
|
+
Object.defineProperty(exports, "normalizeWeight", { enumerable: true, get: function () { return registry_1.normalizeWeight; } });
|
|
8
|
+
var FontRegistryContext_1 = require("./FontRegistryContext");
|
|
9
|
+
Object.defineProperty(exports, "FontRegistryProvider", { enumerable: true, get: function () { return FontRegistryContext_1.FontRegistryProvider; } });
|
|
10
|
+
Object.defineProperty(exports, "useFontRegistry", { enumerable: true, get: function () { return FontRegistryContext_1.useFontRegistry; } });
|
|
11
|
+
Object.defineProperty(exports, "useResolvedFontFamily", { enumerable: true, get: function () { return FontRegistryContext_1.useResolvedFontFamily; } });
|
|
12
|
+
Object.defineProperty(exports, "useResolvedFontStyle", { enumerable: true, get: function () { return FontRegistryContext_1.useResolvedFontStyle; } });
|
|
13
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/infra/fonts/index.ts"],"names":[],"mappings":";;;AAAA,uCAKoB;AAJlB,yGAAA,aAAa,OAAA;AACb,6GAAA,iBAAiB,OAAA;AACjB,2GAAA,eAAe,OAAA;AAGjB,6DAK+B;AAJ7B,2HAAA,oBAAoB,OAAA;AACpB,sHAAA,eAAe,OAAA;AACf,4HAAA,qBAAqB,OAAA;AACrB,2HAAA,oBAAoB,OAAA"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { FontsManifest, FontWeightKey } from "../../types";
|
|
2
|
+
export type FontRegistry = Record<string, Record<number, string>>;
|
|
3
|
+
export declare const normalizeWeight: (key: FontWeightKey | string | number | undefined) => number;
|
|
4
|
+
export declare const registerFonts: (manifest: FontsManifest | undefined) => Promise<FontRegistry>;
|
|
5
|
+
export declare const resolveFontFamily: (registry: FontRegistry | null | undefined, family: string | null | undefined, weight: string | number | null | undefined) => string | undefined;
|
|
6
|
+
//# sourceMappingURL=registry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../../src/infra/fonts/registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAsB,aAAa,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAEpF,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;AAUlE,eAAO,MAAM,eAAe,GAAI,KAAK,aAAa,GAAG,MAAM,GAAG,MAAM,GAAG,SAAS,KAAG,MAOlF,CAAC;AAmBF,eAAO,MAAM,aAAa,GAAU,UAAU,aAAa,GAAG,SAAS,KAAG,OAAO,CAAC,YAAY,CAiC7F,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAC5B,UAAU,YAAY,GAAG,IAAI,GAAG,SAAS,EACzC,QAAQ,MAAM,GAAG,IAAI,GAAG,SAAS,EACjC,QAAQ,MAAM,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,KACzC,MAAM,GAAG,SA0BX,CAAC"}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.resolveFontFamily = exports.registerFonts = exports.normalizeWeight = void 0;
|
|
4
|
+
const WEIGHT_NAME_TO_NUM = {
|
|
5
|
+
regular: 400,
|
|
6
|
+
medium: 500,
|
|
7
|
+
semibold: 600,
|
|
8
|
+
bold: 700,
|
|
9
|
+
extrabold: 800,
|
|
10
|
+
};
|
|
11
|
+
const normalizeWeight = (key) => {
|
|
12
|
+
if (key === undefined || key === null)
|
|
13
|
+
return 400;
|
|
14
|
+
if (typeof key === "number")
|
|
15
|
+
return key;
|
|
16
|
+
const named = WEIGHT_NAME_TO_NUM[key];
|
|
17
|
+
if (named)
|
|
18
|
+
return named;
|
|
19
|
+
const parsed = parseInt(key, 10);
|
|
20
|
+
return Number.isFinite(parsed) ? parsed : 400;
|
|
21
|
+
};
|
|
22
|
+
exports.normalizeWeight = normalizeWeight;
|
|
23
|
+
const buildRegisteredName = (family, weight) => `${family}-${weight}`;
|
|
24
|
+
let expoFontWarned = false;
|
|
25
|
+
const loadExpoFont = () => {
|
|
26
|
+
try {
|
|
27
|
+
return require("expo-font");
|
|
28
|
+
}
|
|
29
|
+
catch (_a) {
|
|
30
|
+
if (!expoFontWarned) {
|
|
31
|
+
console.warn("[onboarding] `fonts` manifest provided but `expo-font` is not installed. Skipping runtime font registration.");
|
|
32
|
+
expoFontWarned = true;
|
|
33
|
+
}
|
|
34
|
+
return null;
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
const registerFonts = async (manifest) => {
|
|
38
|
+
var _a;
|
|
39
|
+
const registry = {};
|
|
40
|
+
if (!manifest || Object.keys(manifest).length === 0)
|
|
41
|
+
return registry;
|
|
42
|
+
const Font = loadExpoFont();
|
|
43
|
+
if (!Font)
|
|
44
|
+
return registry;
|
|
45
|
+
const loads = [];
|
|
46
|
+
for (const [family, variants] of Object.entries(manifest)) {
|
|
47
|
+
if (!variants)
|
|
48
|
+
continue;
|
|
49
|
+
registry[family] = (_a = registry[family]) !== null && _a !== void 0 ? _a : {};
|
|
50
|
+
for (const [weightKey, url] of Object.entries(variants)) {
|
|
51
|
+
if (!url)
|
|
52
|
+
continue;
|
|
53
|
+
const weight = (0, exports.normalizeWeight)(weightKey);
|
|
54
|
+
const registeredName = buildRegisteredName(family, weight);
|
|
55
|
+
registry[family][weight] = registeredName;
|
|
56
|
+
loads.push(Font.loadAsync({ [registeredName]: { uri: url } }).catch((error) => {
|
|
57
|
+
console.warn(`[onboarding] Failed to load font "${family}" weight ${weight} from ${url}:`, error);
|
|
58
|
+
delete registry[family][weight];
|
|
59
|
+
}));
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
await Promise.all(loads);
|
|
63
|
+
return registry;
|
|
64
|
+
};
|
|
65
|
+
exports.registerFonts = registerFonts;
|
|
66
|
+
const resolveFontFamily = (registry, family, weight) => {
|
|
67
|
+
if (!family)
|
|
68
|
+
return undefined;
|
|
69
|
+
if (!registry)
|
|
70
|
+
return family;
|
|
71
|
+
const variants = registry[family];
|
|
72
|
+
if (!variants)
|
|
73
|
+
return family;
|
|
74
|
+
const requested = (0, exports.normalizeWeight)(weight);
|
|
75
|
+
const exact = variants[requested];
|
|
76
|
+
if (exact)
|
|
77
|
+
return exact;
|
|
78
|
+
const available = Object.keys(variants)
|
|
79
|
+
.map(Number)
|
|
80
|
+
.filter((n) => Number.isFinite(n))
|
|
81
|
+
.sort((a, b) => a - b);
|
|
82
|
+
if (available.length === 0)
|
|
83
|
+
return family;
|
|
84
|
+
let best = available[0];
|
|
85
|
+
let bestDelta = Math.abs(best - requested);
|
|
86
|
+
for (const candidate of available) {
|
|
87
|
+
const delta = Math.abs(candidate - requested);
|
|
88
|
+
if (delta < bestDelta) {
|
|
89
|
+
best = candidate;
|
|
90
|
+
bestDelta = delta;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
return variants[best];
|
|
94
|
+
};
|
|
95
|
+
exports.resolveFontFamily = resolveFontFamily;
|
|
96
|
+
//# sourceMappingURL=registry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../../../src/infra/fonts/registry.ts"],"names":[],"mappings":";;;AAIA,MAAM,kBAAkB,GAA2B;IACjD,OAAO,EAAE,GAAG;IACZ,MAAM,EAAE,GAAG;IACX,QAAQ,EAAE,GAAG;IACb,IAAI,EAAE,GAAG;IACT,SAAS,EAAE,GAAG;CACf,CAAC;AAEK,MAAM,eAAe,GAAG,CAAC,GAAgD,EAAU,EAAE;IAC1F,IAAI,GAAG,KAAK,SAAS,IAAI,GAAG,KAAK,IAAI;QAAE,OAAO,GAAG,CAAC;IAClD,IAAI,OAAO,GAAG,KAAK,QAAQ;QAAE,OAAO,GAAG,CAAC;IACxC,MAAM,KAAK,GAAG,kBAAkB,CAAC,GAAG,CAAC,CAAC;IACtC,IAAI,KAAK;QAAE,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MAAM,KAAK,GAAG,QAAQ,CAAC,SAAS,CAAC,CAAC;IAClC,IAAI,KAAK;QAAE,OAAO,KAAK,CAAC;IAExB,MAAM,SAAS,GAAG,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC;SACpC,GAAG,CAAC,MAAM,CAAC;SACX,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;SACjC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;IACzB,IAAI,SAAS,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,MAAM,CAAC;IAE1C,IAAI,IAAI,GAAG,SAAS,CAAC,CAAC,CAAC,CAAC;IACxB,IAAI,SAAS,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,GAAG,SAAS,CAAC,CAAC;IAC3C,KAAK,MAAM,SAAS,IAAI,SAAS,EAAE,CAAC;QAClC,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,SAAS,GAAG,SAAS,CAAC,CAAC;QAC9C,IAAI,KAAK,GAAG,SAAS,EAAE,CAAC;YACtB,IAAI,GAAG,SAAS,CAAC;YACjB,SAAS,GAAG,KAAK,CAAC;QACpB,CAAC;IACH,CAAC;IACD,OAAO,QAAQ,CAAC,IAAI,CAAC,CAAC;AACxB,CAAC,CAAC;AA9BW,QAAA,iBAAiB,qBA8B5B"}
|
package/dist/infra/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/infra/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/infra/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC"}
|
package/dist/infra/index.js
CHANGED
|
@@ -16,4 +16,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./provider"), exports);
|
|
18
18
|
__exportStar(require("./hooks"), exports);
|
|
19
|
+
__exportStar(require("./fonts"), exports);
|
|
19
20
|
//# sourceMappingURL=index.js.map
|
package/dist/infra/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/infra/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,6CAA2B;AAC3B,0CAAwB"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/infra/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,6CAA2B;AAC3B,0CAAwB;AACxB,0CAAwB"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { FontsManifest } from "../../types";
|
|
2
|
+
interface FontLoaderGateProps {
|
|
3
|
+
fonts: FontsManifest | undefined;
|
|
4
|
+
fallback?: React.ReactNode;
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
}
|
|
7
|
+
export declare const FontLoaderGate: ({ fonts, fallback, children }: FontLoaderGateProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=FontLoader.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FontLoader.d.ts","sourceRoot":"","sources":["../../../src/infra/provider/FontLoader.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAIjD,UAAU,mBAAmB;IAC3B,KAAK,EAAE,aAAa,GAAG,SAAS,CAAC;IACjC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED,eAAO,MAAM,cAAc,GAAI,+BAAsC,mBAAmB,4CA4BvF,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FontLoaderGate = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_1 = require("react");
|
|
6
|
+
const FontRegistryContext_1 = require("../fonts/FontRegistryContext");
|
|
7
|
+
const registry_1 = require("../fonts/registry");
|
|
8
|
+
const FontLoaderGate = ({ fonts, fallback = null, children }) => {
|
|
9
|
+
const hasFonts = !!fonts && Object.keys(fonts).length > 0;
|
|
10
|
+
const [registry, setRegistry] = (0, react_1.useState)(hasFonts ? null : {});
|
|
11
|
+
(0, react_1.useEffect)(() => {
|
|
12
|
+
if (!hasFonts) {
|
|
13
|
+
setRegistry({});
|
|
14
|
+
return;
|
|
15
|
+
}
|
|
16
|
+
let cancelled = false;
|
|
17
|
+
setRegistry(null);
|
|
18
|
+
(0, registry_1.registerFonts)(fonts)
|
|
19
|
+
.then((result) => {
|
|
20
|
+
if (!cancelled)
|
|
21
|
+
setRegistry(result);
|
|
22
|
+
})
|
|
23
|
+
.catch((err) => {
|
|
24
|
+
if (!cancelled) {
|
|
25
|
+
console.error("[onboarding] Font registration failed:", err);
|
|
26
|
+
setRegistry({});
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
return () => {
|
|
30
|
+
cancelled = true;
|
|
31
|
+
};
|
|
32
|
+
}, [fonts, hasFonts]);
|
|
33
|
+
if (registry === null)
|
|
34
|
+
return (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: fallback });
|
|
35
|
+
return (0, jsx_runtime_1.jsx)(FontRegistryContext_1.FontRegistryProvider, { value: registry, children: children });
|
|
36
|
+
};
|
|
37
|
+
exports.FontLoaderGate = FontLoaderGate;
|
|
38
|
+
//# sourceMappingURL=FontLoader.js.map
|
|
@@ -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,KAAK,IAAI;QAAE,OAAO,2DAAG,QAAQ,GAAI,CAAC;IAC9C,OAAO,uBAAC,0CAAoB,IAAC,KAAK,EAAE,QAAQ,YAAG,QAAQ,GAAwB,CAAC;AAClF,CAAC,CAAC;AA5BW,QAAA,cAAc,kBA4BzB"}
|
|
@@ -18,8 +18,14 @@ interface OnboardingProviderProps {
|
|
|
18
18
|
* variable map and may return a Promise.
|
|
19
19
|
*/
|
|
20
20
|
customActions?: CustomActions;
|
|
21
|
+
/**
|
|
22
|
+
* Rendered while the onboarding payload is fetched and any remote fonts
|
|
23
|
+
* declared in the response (`onboarding.fonts`) are downloaded and registered.
|
|
24
|
+
* Defaults to `null`.
|
|
25
|
+
*/
|
|
26
|
+
fontsFallback?: React.ReactNode;
|
|
21
27
|
}
|
|
22
|
-
export declare const OnboardingProvider: ({ children, client, locale, customAudienceParams, customActions, }: OnboardingProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
28
|
+
export declare const OnboardingProvider: ({ children, client, locale, customAudienceParams, customActions, fontsFallback, }: OnboardingProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
23
29
|
export declare const OnboardingProgressContext: import("react").Context<{
|
|
24
30
|
activeStep: {
|
|
25
31
|
number: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OnboardingProvider.d.ts","sourceRoot":"","sources":["../../../src/infra/provider/OnboardingProvider.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AAEtE,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,EAAE,uBAAuB,EAAE,MAAM,oCAAoC,CAAC;
|
|
1
|
+
{"version":3,"file":"OnboardingProvider.d.ts","sourceRoot":"","sources":["../../../src/infra/provider/OnboardingProvider.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,sBAAsB,EAAE,MAA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AAU,CAAC,kBAAkB,CAAC,KAAK,IAAI;eACxD,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;iBACjB,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,KAAK,IAAI;mBAChC,aAAa;EAc5B,CAAC"}
|
|
@@ -6,6 +6,7 @@ const react_1 = require("react");
|
|
|
6
6
|
const react_query_1 = require("@tanstack/react-query");
|
|
7
7
|
const OnboardingStudioClient_1 = require("../../OnboardingStudioClient");
|
|
8
8
|
const getOnboarding_query_1 = require("../queries/getOnboarding.query");
|
|
9
|
+
const FontLoader_1 = require("./FontLoader");
|
|
9
10
|
const queryClient = new react_query_1.QueryClient({
|
|
10
11
|
defaultOptions: {
|
|
11
12
|
queries: {
|
|
@@ -13,7 +14,15 @@ const queryClient = new react_query_1.QueryClient({
|
|
|
13
14
|
},
|
|
14
15
|
},
|
|
15
16
|
});
|
|
16
|
-
const
|
|
17
|
+
const OnboardingDataGate = ({ client, locale, customAudienceParams, setOnboarding, fontsFallback, children, }) => {
|
|
18
|
+
const { data, error } = (0, react_query_1.useQuery)((0, getOnboarding_query_1.getOnboardingQuery)(client, locale, customAudienceParams, setOnboarding));
|
|
19
|
+
if (error)
|
|
20
|
+
throw error;
|
|
21
|
+
if (!data)
|
|
22
|
+
return (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: fontsFallback !== null && fontsFallback !== void 0 ? fontsFallback : null });
|
|
23
|
+
return ((0, jsx_runtime_1.jsx)(FontLoader_1.FontLoaderGate, { fonts: data.fonts, fallback: fontsFallback, children: children }));
|
|
24
|
+
};
|
|
25
|
+
const OnboardingProvider = ({ children, client, locale = "en", customAudienceParams = {}, customActions = {}, fontsFallback, }) => {
|
|
17
26
|
const [activeStep, setActiveStep] = (0, react_1.useState)({
|
|
18
27
|
number: 0,
|
|
19
28
|
displayProgressHeader: false,
|
|
@@ -24,7 +33,6 @@ const OnboardingProvider = ({ children, client, locale = "en", customAudiencePar
|
|
|
24
33
|
const setVariable = (0, react_1.useCallback)((name, value) => {
|
|
25
34
|
setVariables((prev) => (Object.assign(Object.assign({}, prev), { [name]: value })));
|
|
26
35
|
}, []);
|
|
27
|
-
queryClient.prefetchQuery((0, getOnboarding_query_1.getOnboardingQuery)(client, locale, customAudienceParams, setOnboarding));
|
|
28
36
|
return ((0, jsx_runtime_1.jsx)(react_query_1.QueryClientProvider, { client: queryClient, children: (0, jsx_runtime_1.jsx)(exports.OnboardingProgressContext.Provider, { value: {
|
|
29
37
|
activeStep,
|
|
30
38
|
setActiveStep,
|
|
@@ -38,7 +46,7 @@ const OnboardingProvider = ({ children, client, locale = "en", customAudiencePar
|
|
|
38
46
|
variables,
|
|
39
47
|
setVariable,
|
|
40
48
|
customActions,
|
|
41
|
-
}, children: children }) }));
|
|
49
|
+
}, children: (0, jsx_runtime_1.jsx)(OnboardingDataGate, { client: client, locale: locale, customAudienceParams: customAudienceParams, setOnboarding: setOnboarding, fontsFallback: fontsFallback, children: children }) }) }));
|
|
42
50
|
};
|
|
43
51
|
exports.OnboardingProvider = OnboardingProvider;
|
|
44
52
|
exports.OnboardingProgressContext = (0, react_1.createContext)({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OnboardingProvider.js","sourceRoot":"","sources":["../../../src/infra/provider/OnboardingProvider.tsx"],"names":[],"mappings":";;;;AAAA,iCAA6D;AAC7D,
|
|
1
|
+
{"version":3,"file":"OnboardingProvider.js","sourceRoot":"","sources":["../../../src/infra/provider/OnboardingProvider.tsx"],"names":[],"mappings":";;;;AAAA,iCAA6D;AAC7D,uDAAmF;AACnF,yEAAsE;AACtE,wEAAoE;AAIpE,6CAA8C;AAE9C,MAAM,WAAW,GAAG,IAAI,yBAAW,CAAC;IAClC,cAAc,EAAE;QACd,OAAO,EAAE;YACP,SAAS,EAAE,QAAQ;SACpB;KACF;CACF,CAAC,CAAA;AAqCF,MAAM,kBAAkB,GAAG,CAAC,EAC1B,MAAM,EACN,MAAM,EACN,oBAAoB,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AAC;AAC9B,YAAY,EACV,mBAAmB,EACnB,aAAa,GACd,MAAM,sBAAsB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/infra/provider/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAClB,yBAAyB,GAC1B,MAAM,sBAAsB,CAAC;AAC9B,YAAY,EACV,mBAAmB,EACnB,aAAa,GACd,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.OnboardingProgressContext = exports.OnboardingProvider = void 0;
|
|
3
|
+
exports.FontLoaderGate = exports.OnboardingProgressContext = exports.OnboardingProvider = void 0;
|
|
4
4
|
var OnboardingProvider_1 = require("./OnboardingProvider");
|
|
5
5
|
Object.defineProperty(exports, "OnboardingProvider", { enumerable: true, get: function () { return OnboardingProvider_1.OnboardingProvider; } });
|
|
6
6
|
Object.defineProperty(exports, "OnboardingProgressContext", { enumerable: true, get: function () { return OnboardingProvider_1.OnboardingProgressContext; } });
|
|
7
|
+
var FontLoader_1 = require("./FontLoader");
|
|
8
|
+
Object.defineProperty(exports, "FontLoaderGate", { enumerable: true, get: function () { return FontLoader_1.FontLoaderGate; } });
|
|
7
9
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/infra/provider/index.ts"],"names":[],"mappings":";;;AAAA,2DAG8B;AAF5B,wHAAA,kBAAkB,OAAA;AAClB,+HAAA,yBAAyB,OAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/infra/provider/index.ts"],"names":[],"mappings":";;;AAAA,2DAG8B;AAF5B,wHAAA,kBAAkB,OAAA;AAClB,+HAAA,yBAAyB,OAAA;AAM3B,2CAA8C;AAArC,4GAAA,cAAc,OAAA"}
|
|
@@ -7,6 +7,16 @@ export declare const onboardingExample: {
|
|
|
7
7
|
audienceOrder: undefined;
|
|
8
8
|
draft: true;
|
|
9
9
|
};
|
|
10
|
+
fonts: {
|
|
11
|
+
Inter: {
|
|
12
|
+
regular: string;
|
|
13
|
+
medium: string;
|
|
14
|
+
bold: string;
|
|
15
|
+
};
|
|
16
|
+
Lobster: {
|
|
17
|
+
regular: string;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
10
20
|
steps: ({
|
|
11
21
|
id: string;
|
|
12
22
|
name: string;
|
|
@@ -169,6 +179,7 @@ export declare const onboardingExample: {
|
|
|
169
179
|
fontWeight?: undefined;
|
|
170
180
|
textAlign?: undefined;
|
|
171
181
|
fontFamily?: undefined;
|
|
182
|
+
fontStyle?: undefined;
|
|
172
183
|
lineHeight?: undefined;
|
|
173
184
|
opacity?: undefined;
|
|
174
185
|
defaultValue?: undefined;
|
|
@@ -218,6 +229,7 @@ export declare const onboardingExample: {
|
|
|
218
229
|
fontWeight?: undefined;
|
|
219
230
|
textAlign?: undefined;
|
|
220
231
|
fontFamily?: undefined;
|
|
232
|
+
fontStyle?: undefined;
|
|
221
233
|
lineHeight?: undefined;
|
|
222
234
|
opacity?: undefined;
|
|
223
235
|
defaultValue?: undefined;
|
|
@@ -267,6 +279,7 @@ export declare const onboardingExample: {
|
|
|
267
279
|
fontWeight?: undefined;
|
|
268
280
|
textAlign?: undefined;
|
|
269
281
|
fontFamily?: undefined;
|
|
282
|
+
fontStyle?: undefined;
|
|
270
283
|
lineHeight?: undefined;
|
|
271
284
|
opacity?: undefined;
|
|
272
285
|
defaultValue?: undefined;
|
|
@@ -316,6 +329,7 @@ export declare const onboardingExample: {
|
|
|
316
329
|
fontWeight?: undefined;
|
|
317
330
|
textAlign?: undefined;
|
|
318
331
|
fontFamily?: undefined;
|
|
332
|
+
fontStyle?: undefined;
|
|
319
333
|
lineHeight?: undefined;
|
|
320
334
|
opacity?: undefined;
|
|
321
335
|
defaultValue?: undefined;
|
|
@@ -365,6 +379,7 @@ export declare const onboardingExample: {
|
|
|
365
379
|
fontWeight?: undefined;
|
|
366
380
|
textAlign?: undefined;
|
|
367
381
|
fontFamily?: undefined;
|
|
382
|
+
fontStyle?: undefined;
|
|
368
383
|
lineHeight?: undefined;
|
|
369
384
|
opacity?: undefined;
|
|
370
385
|
defaultValue?: undefined;
|
|
@@ -414,6 +429,7 @@ export declare const onboardingExample: {
|
|
|
414
429
|
fontWeight?: undefined;
|
|
415
430
|
textAlign?: undefined;
|
|
416
431
|
fontFamily?: undefined;
|
|
432
|
+
fontStyle?: undefined;
|
|
417
433
|
lineHeight?: undefined;
|
|
418
434
|
opacity?: undefined;
|
|
419
435
|
defaultValue?: undefined;
|
|
@@ -463,6 +479,7 @@ export declare const onboardingExample: {
|
|
|
463
479
|
returnKeyType?: undefined;
|
|
464
480
|
autoCapitalize?: undefined;
|
|
465
481
|
fontFamily?: undefined;
|
|
482
|
+
fontStyle?: undefined;
|
|
466
483
|
lineHeight?: undefined;
|
|
467
484
|
opacity?: undefined;
|
|
468
485
|
defaultValue?: undefined;
|
|
@@ -512,6 +529,57 @@ export declare const onboardingExample: {
|
|
|
512
529
|
returnKeyType?: undefined;
|
|
513
530
|
autoCapitalize?: undefined;
|
|
514
531
|
mode?: undefined;
|
|
532
|
+
fontStyle?: undefined;
|
|
533
|
+
lineHeight?: undefined;
|
|
534
|
+
opacity?: undefined;
|
|
535
|
+
defaultValue?: undefined;
|
|
536
|
+
gap?: undefined;
|
|
537
|
+
items?: undefined;
|
|
538
|
+
defaultValues?: undefined;
|
|
539
|
+
display?: undefined;
|
|
540
|
+
maximumDate?: undefined;
|
|
541
|
+
carouselType?: undefined;
|
|
542
|
+
autoPlayInterval?: undefined;
|
|
543
|
+
showDots?: undefined;
|
|
544
|
+
overflow?: undefined;
|
|
545
|
+
label?: undefined;
|
|
546
|
+
variant?: undefined;
|
|
547
|
+
actions?: undefined;
|
|
548
|
+
padding?: undefined;
|
|
549
|
+
backgroundGradient?: undefined;
|
|
550
|
+
};
|
|
551
|
+
children?: undefined;
|
|
552
|
+
} | {
|
|
553
|
+
id: string;
|
|
554
|
+
type: string;
|
|
555
|
+
props: {
|
|
556
|
+
content: string;
|
|
557
|
+
fontSize: number;
|
|
558
|
+
fontFamily: string;
|
|
559
|
+
fontStyle: string;
|
|
560
|
+
textAlign: string;
|
|
561
|
+
marginVertical: number;
|
|
562
|
+
source?: undefined;
|
|
563
|
+
height?: undefined;
|
|
564
|
+
autoPlay?: undefined;
|
|
565
|
+
loop?: undefined;
|
|
566
|
+
url?: undefined;
|
|
567
|
+
fit?: undefined;
|
|
568
|
+
resizeMode?: undefined;
|
|
569
|
+
borderRadius?: undefined;
|
|
570
|
+
name?: undefined;
|
|
571
|
+
size?: undefined;
|
|
572
|
+
color?: undefined;
|
|
573
|
+
controls?: undefined;
|
|
574
|
+
muted?: undefined;
|
|
575
|
+
contentFit?: undefined;
|
|
576
|
+
variableName?: undefined;
|
|
577
|
+
placeholder?: undefined;
|
|
578
|
+
keyboardType?: undefined;
|
|
579
|
+
returnKeyType?: undefined;
|
|
580
|
+
autoCapitalize?: undefined;
|
|
581
|
+
mode?: undefined;
|
|
582
|
+
fontWeight?: undefined;
|
|
515
583
|
lineHeight?: undefined;
|
|
516
584
|
opacity?: undefined;
|
|
517
585
|
defaultValue?: undefined;
|
|
@@ -563,6 +631,7 @@ export declare const onboardingExample: {
|
|
|
563
631
|
mode?: undefined;
|
|
564
632
|
fontWeight?: undefined;
|
|
565
633
|
fontFamily?: undefined;
|
|
634
|
+
fontStyle?: undefined;
|
|
566
635
|
defaultValue?: undefined;
|
|
567
636
|
gap?: undefined;
|
|
568
637
|
items?: undefined;
|
|
@@ -616,6 +685,7 @@ export declare const onboardingExample: {
|
|
|
616
685
|
fontWeight?: undefined;
|
|
617
686
|
textAlign?: undefined;
|
|
618
687
|
fontFamily?: undefined;
|
|
688
|
+
fontStyle?: undefined;
|
|
619
689
|
lineHeight?: undefined;
|
|
620
690
|
opacity?: undefined;
|
|
621
691
|
defaultValues?: undefined;
|
|
@@ -663,6 +733,7 @@ export declare const onboardingExample: {
|
|
|
663
733
|
autoCapitalize?: undefined;
|
|
664
734
|
fontWeight?: undefined;
|
|
665
735
|
fontFamily?: undefined;
|
|
736
|
+
fontStyle?: undefined;
|
|
666
737
|
lineHeight?: undefined;
|
|
667
738
|
defaultValue?: undefined;
|
|
668
739
|
gap?: undefined;
|
|
@@ -717,6 +788,7 @@ export declare const onboardingExample: {
|
|
|
717
788
|
fontWeight?: undefined;
|
|
718
789
|
textAlign?: undefined;
|
|
719
790
|
fontFamily?: undefined;
|
|
791
|
+
fontStyle?: undefined;
|
|
720
792
|
lineHeight?: undefined;
|
|
721
793
|
opacity?: undefined;
|
|
722
794
|
defaultValue?: undefined;
|
|
@@ -766,6 +838,7 @@ export declare const onboardingExample: {
|
|
|
766
838
|
fontWeight?: undefined;
|
|
767
839
|
textAlign?: undefined;
|
|
768
840
|
fontFamily?: undefined;
|
|
841
|
+
fontStyle?: undefined;
|
|
769
842
|
lineHeight?: undefined;
|
|
770
843
|
opacity?: undefined;
|
|
771
844
|
gap?: undefined;
|
|
@@ -815,6 +888,7 @@ export declare const onboardingExample: {
|
|
|
815
888
|
fontWeight?: undefined;
|
|
816
889
|
textAlign?: undefined;
|
|
817
890
|
fontFamily?: undefined;
|
|
891
|
+
fontStyle?: undefined;
|
|
818
892
|
lineHeight?: undefined;
|
|
819
893
|
opacity?: undefined;
|
|
820
894
|
defaultValue?: undefined;
|
|
@@ -870,6 +944,7 @@ export declare const onboardingExample: {
|
|
|
870
944
|
fontWeight?: undefined;
|
|
871
945
|
textAlign?: undefined;
|
|
872
946
|
fontFamily?: undefined;
|
|
947
|
+
fontStyle?: undefined;
|
|
873
948
|
lineHeight?: undefined;
|
|
874
949
|
opacity?: undefined;
|
|
875
950
|
defaultValue?: undefined;
|
|
@@ -960,6 +1035,7 @@ export declare const onboardingExample: {
|
|
|
960
1035
|
fontWeight?: undefined;
|
|
961
1036
|
textAlign?: undefined;
|
|
962
1037
|
fontFamily?: undefined;
|
|
1038
|
+
fontStyle?: undefined;
|
|
963
1039
|
lineHeight?: undefined;
|
|
964
1040
|
opacity?: undefined;
|
|
965
1041
|
defaultValue?: undefined;
|
|
@@ -1017,6 +1093,7 @@ export declare const onboardingExample: {
|
|
|
1017
1093
|
fontWeight?: undefined;
|
|
1018
1094
|
textAlign?: undefined;
|
|
1019
1095
|
fontFamily?: undefined;
|
|
1096
|
+
fontStyle?: undefined;
|
|
1020
1097
|
lineHeight?: undefined;
|
|
1021
1098
|
opacity?: undefined;
|
|
1022
1099
|
defaultValue?: undefined;
|
|
@@ -1093,6 +1170,7 @@ export declare const onboardingExample: {
|
|
|
1093
1170
|
fontWeight?: undefined;
|
|
1094
1171
|
textAlign?: undefined;
|
|
1095
1172
|
fontFamily?: undefined;
|
|
1173
|
+
fontStyle?: undefined;
|
|
1096
1174
|
lineHeight?: undefined;
|
|
1097
1175
|
opacity?: undefined;
|
|
1098
1176
|
defaultValue?: undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"onboarding-example.d.ts","sourceRoot":"","sources":["../src/onboarding-example.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,iBAAiB
|
|
1
|
+
{"version":3,"file":"onboarding-example.d.ts","sourceRoot":"","sources":["../src/onboarding-example.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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