bleam 0.0.12 → 0.0.13
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/ai.cjs +5 -4
- package/dist/ai.d.ts +1 -1
- package/dist/ai.js +4 -3
- package/dist/app-storage-D8W4n8ey.cjs +39 -0
- package/dist/app-storage-Isi5Bo0R.js +34 -0
- package/dist/cli.cjs +148 -22
- package/dist/cli.d.cts +13 -0
- package/dist/cli.d.ts +14 -1
- package/dist/cli.js +148 -22
- package/dist/config.d.ts +1 -1
- package/dist/elements-CFk0QHw0.d.cts +127 -0
- package/dist/elements-ClGQ41Sc.d.ts +127 -0
- package/dist/{ui.cjs → elements.cjs} +307 -168
- package/dist/elements.d.cts +2 -0
- package/dist/elements.d.ts +2 -0
- package/dist/{ui.js → elements.js} +306 -169
- package/dist/{files-BXVkPrPN.js → files-DErLhzCB.js} +5 -11
- package/dist/{files-DxaQ-Nv0.cjs → files-lMk-CpL_.cjs} +5 -11
- package/dist/files.cjs +1 -1
- package/dist/files.d.ts +1 -1
- package/dist/files.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/schema.cjs +1 -1
- package/dist/schema.d.cts +1 -1
- package/dist/schema.d.ts +1 -1
- package/dist/schema.js +1 -1
- package/dist/secrets.cjs +146 -0
- package/dist/secrets.d.cts +14 -0
- package/dist/secrets.d.ts +14 -0
- package/dist/secrets.js +142 -0
- package/dist/{state-LssDgpff.cjs → state-BZYyrE2-.cjs} +4 -41
- package/dist/{state-Dh3HLixb.js → state-DkaRFkZJ.js} +4 -35
- package/dist/state.cjs +3 -2
- package/dist/state.d.cts +1 -1
- package/dist/state.d.ts +1 -1
- package/dist/state.js +3 -2
- package/dist/window.d.cts +1 -1
- package/dist/window.d.ts +3 -3
- package/package.json +11 -6
- package/templates/basic/app/index.tsx +2 -2
- package/templates/foundation-models/app/index.tsx +4 -4
- package/templates/image-generation/app/index.tsx +2 -2
- package/templates/native/modules/bleam-runtime/ios/AIModule.swift +7 -8
- package/templates/state/app/index.tsx +2 -2
- package/templates/text-generation/app/index.tsx +4 -4
- package/templates/updates/README.md +1 -1
- package/dist/ui-1WepaMS4.d.cts +0 -92
- package/dist/ui-D7bRLYee.d.ts +0 -92
- package/dist/ui.d.cts +0 -2
- package/dist/ui.d.ts +0 -2
- /package/dist/{config-Chi-flpJ.d.ts → config-Cms0rvqg.d.ts} +0 -0
- /package/dist/{files-VrkQlKIT.d.ts → files-4ZEoAWiv.d.ts} +0 -0
- /package/dist/{native-sqlite-yQLD5s9i.cjs → native-sqlite-Dw--FI9a.cjs} +0 -0
- /package/dist/{native-sqlite-xcGdamRD.js → native-sqlite-WzRNzCSh.js} +0 -0
- /package/dist/{schema-B5BfdswF.js → schema-B7ELMpuI.js} +0 -0
- /package/dist/{schema-BnVZOXfu.cjs → schema-B7SLUBLN.cjs} +0 -0
- /package/dist/{schema-D5eImHxu.d.cts → schema-BWsDPc6c.d.cts} +0 -0
- /package/dist/{schema-SSjokbtw.d.ts → schema-LxnzAfgw.d.ts} +0 -0
package/dist/cli.js
CHANGED
|
@@ -609,13 +609,14 @@ function writeBiomeConfig(configPath) {
|
|
|
609
609
|
}
|
|
610
610
|
}, null, 2)}\n`);
|
|
611
611
|
}
|
|
612
|
-
function writeProjectRuntimeConfig(projectRoot, config, origin) {
|
|
612
|
+
function writeProjectRuntimeConfig(projectRoot, config, origin, client) {
|
|
613
613
|
const projectConfigPath = path.join(projectRoot, ".bleam", "project.json");
|
|
614
614
|
mkdirSync(path.dirname(projectConfigPath), { recursive: true });
|
|
615
615
|
writeFileSync(projectConfigPath, `${JSON.stringify({
|
|
616
616
|
name: config.name,
|
|
617
|
+
id: client.projectId,
|
|
617
618
|
version: config.version,
|
|
618
|
-
bundleIdentifier:
|
|
619
|
+
bundleIdentifier: client.bundleIdentifier,
|
|
619
620
|
teamId: config.teamId,
|
|
620
621
|
appearance: config.appearance,
|
|
621
622
|
devServer: origin,
|
|
@@ -1154,19 +1155,127 @@ async function resolveRuntimeArtifact() {
|
|
|
1154
1155
|
throw new Error(`Failed to resolve the Bleam runtime.\n${runtimeResolutionDetails()}\n\nCause: ${error instanceof Error ? error.message : String(error)}`);
|
|
1155
1156
|
}
|
|
1156
1157
|
}
|
|
1157
|
-
function
|
|
1158
|
-
const
|
|
1158
|
+
function devProjectId(projectRoot) {
|
|
1159
|
+
const idPath = path.join(projectRoot, ".bleam", "project-id");
|
|
1160
|
+
if (existsSync(idPath)) {
|
|
1161
|
+
const projectId$1 = readFileSync(idPath, "utf8").trim();
|
|
1162
|
+
if (/^[0-9a-f]{32}$/i.test(projectId$1)) return projectId$1.toLowerCase();
|
|
1163
|
+
throw new Error(`Invalid Bleam project ID at ${prettyPath(idPath)}`);
|
|
1164
|
+
}
|
|
1165
|
+
const projectId = randomUUID().replaceAll("-", "");
|
|
1166
|
+
mkdirSync(path.dirname(idPath), { recursive: true });
|
|
1167
|
+
writeFileSync(idPath, `${projectId}\n`);
|
|
1168
|
+
return projectId;
|
|
1169
|
+
}
|
|
1170
|
+
function devBundleIdentifier(projectId) {
|
|
1171
|
+
return `dev.bleam.project.p${projectId}`;
|
|
1172
|
+
}
|
|
1173
|
+
function runBundleCommand(command, args) {
|
|
1174
|
+
const result = spawnSync(command, args, {
|
|
1175
|
+
encoding: "utf8",
|
|
1176
|
+
env: process.env
|
|
1177
|
+
});
|
|
1178
|
+
if (result.error) throw result.error;
|
|
1179
|
+
if (result.status !== 0) {
|
|
1180
|
+
const detail = result.stderr.trim() || result.stdout.trim();
|
|
1181
|
+
throw new Error(`${commandText(command, args)} failed${detail ? `: ${detail}` : ""}`);
|
|
1182
|
+
}
|
|
1183
|
+
}
|
|
1184
|
+
function devAppFileName(name) {
|
|
1185
|
+
return `${name.replaceAll("/", "-")}.app`;
|
|
1186
|
+
}
|
|
1187
|
+
function setPlistValue(plistPath, key, type, value) {
|
|
1188
|
+
spawnSync("plutil", [
|
|
1189
|
+
"-remove",
|
|
1190
|
+
key,
|
|
1191
|
+
plistPath
|
|
1192
|
+
], { stdio: "ignore" });
|
|
1193
|
+
runBundleCommand("plutil", [
|
|
1194
|
+
"-insert",
|
|
1195
|
+
key,
|
|
1196
|
+
type,
|
|
1197
|
+
value,
|
|
1198
|
+
plistPath
|
|
1199
|
+
]);
|
|
1200
|
+
}
|
|
1201
|
+
function removePlistValue(plistPath, key) {
|
|
1202
|
+
spawnSync("plutil", [
|
|
1203
|
+
"-remove",
|
|
1204
|
+
key,
|
|
1205
|
+
plistPath
|
|
1206
|
+
], { stdio: "ignore" });
|
|
1207
|
+
}
|
|
1208
|
+
function personalizeRuntimeClient(options) {
|
|
1209
|
+
const appPlist = path.join(options.appPath, "Contents", "Info.plist");
|
|
1210
|
+
const servicePath = path.join(options.appPath, "Contents", "XPCServices", "GenerationService.xpc");
|
|
1211
|
+
const servicePlist = path.join(servicePath, "Contents", "Info.plist");
|
|
1212
|
+
setPlistValue(appPlist, "CFBundleIdentifier", "-string", options.bundleIdentifier);
|
|
1213
|
+
setPlistValue(appPlist, "CFBundleDisplayName", "-string", options.name);
|
|
1214
|
+
setPlistValue(appPlist, "CFBundleName", "-string", options.name);
|
|
1215
|
+
removePlistValue(appPlist, "AppGroupIdentifier");
|
|
1216
|
+
if (existsSync(servicePlist)) {
|
|
1217
|
+
setPlistValue(servicePlist, "CFBundleIdentifier", "-string", `${options.bundleIdentifier}.GenerationService`);
|
|
1218
|
+
removePlistValue(servicePlist, "AppGroupIdentifier");
|
|
1219
|
+
}
|
|
1220
|
+
if (options.iconPath) {
|
|
1221
|
+
const iconName = "BleamProjectIcon.png";
|
|
1222
|
+
cpSync(options.iconPath, path.join(options.appPath, "Contents", "Resources", iconName));
|
|
1223
|
+
setPlistValue(appPlist, "CFBundleIconFile", "-string", iconName);
|
|
1224
|
+
setPlistValue(appPlist, "CFBundleIcons", "-json", JSON.stringify({ CFBundlePrimaryIcon: {
|
|
1225
|
+
CFBundleIconFiles: ["BleamProjectIcon"],
|
|
1226
|
+
CFBundleIconName: "BleamProjectIcon"
|
|
1227
|
+
} }));
|
|
1228
|
+
}
|
|
1229
|
+
rmSync(path.join(options.appPath, "Contents", "embedded.provisionprofile"), { force: true });
|
|
1230
|
+
rmSync(path.join(servicePath, "Contents", "embedded.provisionprofile"), { force: true });
|
|
1231
|
+
if (existsSync(servicePath)) runBundleCommand("codesign", [
|
|
1232
|
+
"--force",
|
|
1233
|
+
"--sign",
|
|
1234
|
+
"-",
|
|
1235
|
+
"--timestamp=none",
|
|
1236
|
+
servicePath
|
|
1237
|
+
]);
|
|
1238
|
+
runBundleCommand("codesign", [
|
|
1239
|
+
"--force",
|
|
1240
|
+
"--sign",
|
|
1241
|
+
"-",
|
|
1242
|
+
"--timestamp=none",
|
|
1243
|
+
options.appPath
|
|
1244
|
+
]);
|
|
1245
|
+
runBundleCommand("codesign", [
|
|
1246
|
+
"--verify",
|
|
1247
|
+
"--deep",
|
|
1248
|
+
"--strict",
|
|
1249
|
+
options.appPath
|
|
1250
|
+
]);
|
|
1251
|
+
}
|
|
1252
|
+
function copyRuntimeClient(projectRoot, runtime, config) {
|
|
1253
|
+
const projectId = devProjectId(projectRoot);
|
|
1254
|
+
const bundleIdentifier = devBundleIdentifier(projectId);
|
|
1255
|
+
const clientRoot = path.join(projectRoot, ".bleam", "client");
|
|
1256
|
+
const appFileName = devAppFileName(config.name);
|
|
1257
|
+
const clientAppPath = path.join(clientRoot, appFileName);
|
|
1159
1258
|
console.log(`Preparing Bleam app at ${prettyPath(clientAppPath)}`);
|
|
1160
|
-
rmSync(
|
|
1259
|
+
rmSync(clientRoot, {
|
|
1161
1260
|
recursive: true,
|
|
1162
1261
|
force: true
|
|
1163
1262
|
});
|
|
1164
|
-
mkdirSync(
|
|
1263
|
+
mkdirSync(clientRoot, { recursive: true });
|
|
1165
1264
|
cpSync(runtime.appPath, clientAppPath, {
|
|
1166
1265
|
recursive: true,
|
|
1167
1266
|
verbatimSymlinks: true
|
|
1168
1267
|
});
|
|
1169
|
-
|
|
1268
|
+
personalizeRuntimeClient({
|
|
1269
|
+
appPath: clientAppPath,
|
|
1270
|
+
name: config.name,
|
|
1271
|
+
bundleIdentifier,
|
|
1272
|
+
iconPath: config.iconPath
|
|
1273
|
+
});
|
|
1274
|
+
return {
|
|
1275
|
+
appPath: clientAppPath,
|
|
1276
|
+
bundleIdentifier,
|
|
1277
|
+
projectId
|
|
1278
|
+
};
|
|
1170
1279
|
}
|
|
1171
1280
|
function cleanDevArtifacts(projectRoot) {
|
|
1172
1281
|
const bleamRoot = path.join(projectRoot, ".bleam");
|
|
@@ -1348,11 +1457,12 @@ function openRuntimeClient(appPath, projectConfigPath, manifest) {
|
|
|
1348
1457
|
if (code && code !== 0) console.error(`Failed to open Bleam runtime at ${appPath}`);
|
|
1349
1458
|
});
|
|
1350
1459
|
}
|
|
1351
|
-
function quitRuntimeClient() {
|
|
1352
|
-
|
|
1460
|
+
function quitRuntimeClient(bundleIdentifier) {
|
|
1461
|
+
const application = `application id ${JSON.stringify(bundleIdentifier)}`;
|
|
1462
|
+
spawnSync("osascript", ["-e", `if ${application} is running then tell ${application} to quit`], { stdio: "ignore" });
|
|
1353
1463
|
}
|
|
1354
|
-
async function launchRuntimeClient(appPath, projectConfigPath, manifest) {
|
|
1355
|
-
quitRuntimeClient();
|
|
1464
|
+
async function launchRuntimeClient(appPath, bundleIdentifier, projectConfigPath, manifest) {
|
|
1465
|
+
quitRuntimeClient(bundleIdentifier);
|
|
1356
1466
|
openRuntimeClient(appPath, projectConfigPath, manifest);
|
|
1357
1467
|
}
|
|
1358
1468
|
async function updateServiceHealthy(serviceUrl) {
|
|
@@ -1441,8 +1551,14 @@ async function startLocalUpdateService() {
|
|
|
1441
1551
|
serviceUrl
|
|
1442
1552
|
};
|
|
1443
1553
|
}
|
|
1444
|
-
function focusRuntimeClient() {
|
|
1445
|
-
|
|
1554
|
+
function focusRuntimeClient(bundleIdentifier) {
|
|
1555
|
+
const application = `application id ${JSON.stringify(bundleIdentifier)}`;
|
|
1556
|
+
const result = spawnSync("osascript", ["-e", `if ${application} is running then
|
|
1557
|
+
tell ${application} to activate
|
|
1558
|
+
return true
|
|
1559
|
+
end if
|
|
1560
|
+
return false`], { encoding: "utf8" });
|
|
1561
|
+
return result.status === 0 && result.stdout.trim() === "true";
|
|
1446
1562
|
}
|
|
1447
1563
|
function sendJson(res, status, value) {
|
|
1448
1564
|
res.writeHead(status, {
|
|
@@ -1581,12 +1697,14 @@ function setupInteractiveControls(options) {
|
|
|
1581
1697
|
if (key === "o") {
|
|
1582
1698
|
(async () => {
|
|
1583
1699
|
try {
|
|
1584
|
-
if (focusRuntimeClient()) {
|
|
1585
|
-
|
|
1700
|
+
if (focusRuntimeClient(options.bundleIdentifier)) {
|
|
1701
|
+
options.onOpen();
|
|
1702
|
+
console.log("Focused project app");
|
|
1586
1703
|
return;
|
|
1587
1704
|
}
|
|
1588
1705
|
console.log(`Opening Bleam app at ${prettyPath(options.clientAppPath)}`);
|
|
1589
|
-
await launchRuntimeClient(options.clientAppPath, options.projectConfigPath, options.manifest);
|
|
1706
|
+
await launchRuntimeClient(options.clientAppPath, options.bundleIdentifier, options.projectConfigPath, options.manifest);
|
|
1707
|
+
options.onOpen();
|
|
1590
1708
|
} catch (error) {
|
|
1591
1709
|
console.error(error instanceof Error ? error.message : String(error));
|
|
1592
1710
|
}
|
|
@@ -1770,11 +1888,11 @@ async function startDevServer(options) {
|
|
|
1770
1888
|
const config = readProjectConfig(options);
|
|
1771
1889
|
if (options.clean) cleanDevArtifacts(options.projectRoot);
|
|
1772
1890
|
const runtime = await resolveRuntimeArtifact();
|
|
1773
|
-
const
|
|
1891
|
+
const client = copyRuntimeClient(options.projectRoot, runtime, config);
|
|
1774
1892
|
console.log("Preparing Bleam dev workspace");
|
|
1775
1893
|
const workspaceRoot = createDevWorkspace(options.projectRoot, config);
|
|
1776
1894
|
const origin = `http://localhost:${options.port}`;
|
|
1777
|
-
const projectConfigPath = writeProjectRuntimeConfig(options.projectRoot, config, origin);
|
|
1895
|
+
const projectConfigPath = writeProjectRuntimeConfig(options.projectRoot, config, origin, client);
|
|
1778
1896
|
const updateService = await startLocalUpdateService();
|
|
1779
1897
|
const child = spawn(process.execPath, [
|
|
1780
1898
|
fileURLToPath(import.meta.url),
|
|
@@ -1815,7 +1933,7 @@ async function startDevServer(options) {
|
|
|
1815
1933
|
if (didCleanupDevSession) return;
|
|
1816
1934
|
didCleanupDevSession = true;
|
|
1817
1935
|
cleanupInteractiveControls();
|
|
1818
|
-
if (didLaunchRuntimeClient) quitRuntimeClient();
|
|
1936
|
+
if (didLaunchRuntimeClient) quitRuntimeClient(client.bundleIdentifier);
|
|
1819
1937
|
if (updateService.child?.exitCode === null) updateService.child.kill("SIGTERM");
|
|
1820
1938
|
};
|
|
1821
1939
|
const stop = (signal) => {
|
|
@@ -1841,15 +1959,19 @@ async function startDevServer(options) {
|
|
|
1841
1959
|
const manifest = await readDevManifest(origin);
|
|
1842
1960
|
cleanupInteractiveControls = setupInteractiveControls({
|
|
1843
1961
|
origin,
|
|
1844
|
-
clientAppPath,
|
|
1962
|
+
clientAppPath: client.appPath,
|
|
1963
|
+
bundleIdentifier: client.bundleIdentifier,
|
|
1845
1964
|
projectConfigPath,
|
|
1846
1965
|
manifest,
|
|
1966
|
+
onOpen: () => {
|
|
1967
|
+
didLaunchRuntimeClient = true;
|
|
1968
|
+
},
|
|
1847
1969
|
stop: () => stop("SIGINT")
|
|
1848
1970
|
});
|
|
1849
1971
|
if (options.run && process.env.BLEAM_NO_OPEN !== "1") try {
|
|
1850
1972
|
await waitForDevBundle(manifest.bundleUrl);
|
|
1851
|
-
console.log(`Opening
|
|
1852
|
-
await launchRuntimeClient(
|
|
1973
|
+
console.log(`Opening project app at ${prettyPath(client.appPath)}`);
|
|
1974
|
+
await launchRuntimeClient(client.appPath, client.bundleIdentifier, projectConfigPath, manifest);
|
|
1853
1975
|
didLaunchRuntimeClient = true;
|
|
1854
1976
|
} catch (error) {
|
|
1855
1977
|
console.error(`Initial app launch failed: ${error instanceof Error ? error.message : String(error)}`);
|
|
@@ -1933,6 +2055,9 @@ if (process.env.VITEST !== "true") main().catch((error) => {
|
|
|
1933
2055
|
const __test = {
|
|
1934
2056
|
createProject,
|
|
1935
2057
|
createBuildNativeWorkspace,
|
|
2058
|
+
devAppFileName,
|
|
2059
|
+
devBundleIdentifier,
|
|
2060
|
+
devProjectId,
|
|
1936
2061
|
hasCurrentPodInstall,
|
|
1937
2062
|
installedAppPath,
|
|
1938
2063
|
installArchivedApp,
|
|
@@ -1943,6 +2068,7 @@ const __test = {
|
|
|
1943
2068
|
parseBuildOptions,
|
|
1944
2069
|
parseNewOptions,
|
|
1945
2070
|
parsePublishOtaOptions,
|
|
2071
|
+
personalizeRuntimeClient,
|
|
1946
2072
|
podInstallInputStamp,
|
|
1947
2073
|
replaceOrInsertPlistString
|
|
1948
2074
|
};
|
package/dist/config.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as HexColor, c as defineConfig, i as BleamUserInterfaceStyle, n as BleamConfig, o as appConfig, r as BleamInternalExpoConfig, s as createExpoConfig, t as BleamAppearance } from "./config-
|
|
1
|
+
import { a as HexColor, c as defineConfig, i as BleamUserInterfaceStyle, n as BleamConfig, o as appConfig, r as BleamInternalExpoConfig, s as createExpoConfig, t as BleamAppearance } from "./config-Cms0rvqg.js";
|
|
2
2
|
export { BleamAppearance, BleamConfig, BleamInternalExpoConfig, BleamUserInterfaceStyle, HexColor, appConfig, createExpoConfig, defineConfig };
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import * as react4 from "react";
|
|
2
|
+
import { ReactNode } from "react";
|
|
3
|
+
import { ColorValue, PressableProps, StyleProp, TextStyle, ViewStyle } from "react-native";
|
|
4
|
+
import * as _nativescript_react_native26 from "@nativescript/react-native";
|
|
5
|
+
|
|
6
|
+
//#region src/elements/shared.d.ts
|
|
7
|
+
type NativeStyle = ViewStyle & TextStyle;
|
|
8
|
+
//#endregion
|
|
9
|
+
//#region src/elements/blur-view.d.ts
|
|
10
|
+
type BlurIntensity = 'ultraThin' | 'thin' | 'regular' | 'thick' | 'chrome';
|
|
11
|
+
type BlurColorScheme = 'auto' | 'light' | 'dark';
|
|
12
|
+
type BlurViewProps = {
|
|
13
|
+
children?: ReactNode;
|
|
14
|
+
style?: StyleProp<NativeStyle>;
|
|
15
|
+
intensity?: BlurIntensity;
|
|
16
|
+
colorScheme?: BlurColorScheme;
|
|
17
|
+
};
|
|
18
|
+
declare const BlurView: _nativescript_react_native26.UIKitViewComponent<BlurViewProps, _nativescript_react_native26.UIKitContainerResult<UIVisualEffectView, UIView>>;
|
|
19
|
+
//#endregion
|
|
20
|
+
//#region src/elements/glass-shared.d.ts
|
|
21
|
+
type GlassStyle = 'regular' | 'clear' | 'none';
|
|
22
|
+
type GlassEffectStyleConfig = {
|
|
23
|
+
style: GlassStyle;
|
|
24
|
+
animate?: boolean;
|
|
25
|
+
animationDuration?: number;
|
|
26
|
+
};
|
|
27
|
+
type GlassVisualStyle = {
|
|
28
|
+
cornerRadius?: number;
|
|
29
|
+
borderWidth?: number;
|
|
30
|
+
borderColor?: ColorValue;
|
|
31
|
+
};
|
|
32
|
+
type GlassViewProps = {
|
|
33
|
+
children?: ReactNode;
|
|
34
|
+
style?: StyleProp<NativeStyle>;
|
|
35
|
+
glassStyle?: GlassVisualStyle;
|
|
36
|
+
glassEffectStyle?: GlassStyle | GlassEffectStyleConfig;
|
|
37
|
+
tintColor?: string;
|
|
38
|
+
isInteractive?: boolean;
|
|
39
|
+
};
|
|
40
|
+
type GlassContainerProps = {
|
|
41
|
+
children?: ReactNode;
|
|
42
|
+
style?: StyleProp<NativeStyle>;
|
|
43
|
+
glassStyle?: GlassVisualStyle;
|
|
44
|
+
spacing?: number;
|
|
45
|
+
};
|
|
46
|
+
//#endregion
|
|
47
|
+
//#region src/elements/glass-view.d.ts
|
|
48
|
+
declare const GlassView: _nativescript_react_native26.UIKitViewComponent<GlassViewProps, _nativescript_react_native26.UIKitContainerResult<UIVisualEffectView, UIView>>;
|
|
49
|
+
//#endregion
|
|
50
|
+
//#region src/elements/button.d.ts
|
|
51
|
+
type ButtonVariant = 'primary' | 'secondary' | 'plain';
|
|
52
|
+
type ButtonSize = 'small' | 'regular' | 'large';
|
|
53
|
+
type ButtonBaseProps = Omit<PressableProps, 'children' | 'disabled'> & {
|
|
54
|
+
label?: string;
|
|
55
|
+
icon?: ReactNode;
|
|
56
|
+
loading?: boolean;
|
|
57
|
+
disabled?: boolean;
|
|
58
|
+
size?: ButtonSize;
|
|
59
|
+
activeOpacity?: number;
|
|
60
|
+
labelStyle?: StyleProp<TextStyle>;
|
|
61
|
+
};
|
|
62
|
+
type ButtonProps = ButtonBaseProps & {
|
|
63
|
+
variant?: ButtonVariant;
|
|
64
|
+
};
|
|
65
|
+
type GlassButtonProps = ButtonBaseProps & Pick<GlassViewProps, 'glassEffectStyle' | 'tintColor'> & {
|
|
66
|
+
glassStyle?: GlassVisualStyle;
|
|
67
|
+
};
|
|
68
|
+
declare function Button({
|
|
69
|
+
accessibilityRole,
|
|
70
|
+
accessibilityState,
|
|
71
|
+
activeOpacity,
|
|
72
|
+
disabled,
|
|
73
|
+
icon,
|
|
74
|
+
label,
|
|
75
|
+
labelStyle,
|
|
76
|
+
loading,
|
|
77
|
+
size,
|
|
78
|
+
style,
|
|
79
|
+
variant,
|
|
80
|
+
...props
|
|
81
|
+
}: ButtonProps): react4.JSX.Element;
|
|
82
|
+
declare function GlassButton({
|
|
83
|
+
accessibilityRole,
|
|
84
|
+
accessibilityState,
|
|
85
|
+
activeOpacity,
|
|
86
|
+
disabled,
|
|
87
|
+
glassEffectStyle,
|
|
88
|
+
glassStyle,
|
|
89
|
+
icon,
|
|
90
|
+
label,
|
|
91
|
+
labelStyle,
|
|
92
|
+
loading,
|
|
93
|
+
size,
|
|
94
|
+
style,
|
|
95
|
+
tintColor,
|
|
96
|
+
...props
|
|
97
|
+
}: GlassButtonProps): react4.JSX.Element;
|
|
98
|
+
//#endregion
|
|
99
|
+
//#region src/elements/glass-container.d.ts
|
|
100
|
+
declare const GlassContainer: _nativescript_react_native26.UIKitViewComponent<GlassContainerProps, _nativescript_react_native26.UIKitContainerResult<UIVisualEffectView, UIView>>;
|
|
101
|
+
//#endregion
|
|
102
|
+
//#region src/elements/label.d.ts
|
|
103
|
+
type LabelTone = 'primary' | 'secondary' | 'tertiary';
|
|
104
|
+
type LabelProps = {
|
|
105
|
+
children?: ReactNode;
|
|
106
|
+
text?: string;
|
|
107
|
+
tone?: LabelTone;
|
|
108
|
+
numberOfLines?: number;
|
|
109
|
+
style?: StyleProp<NativeStyle>;
|
|
110
|
+
};
|
|
111
|
+
declare const Label: _nativescript_react_native26.UIKitViewComponent<LabelProps, UILabel>;
|
|
112
|
+
//#endregion
|
|
113
|
+
//#region src/elements/symbol.d.ts
|
|
114
|
+
type SymbolName = string;
|
|
115
|
+
type SymbolWeight = 'ultraLight' | 'thin' | 'light' | 'regular' | 'medium' | 'semibold' | 'bold' | 'heavy' | 'black';
|
|
116
|
+
type SymbolScale = 'small' | 'medium' | 'large';
|
|
117
|
+
type SymbolProps = {
|
|
118
|
+
symbol: SymbolName;
|
|
119
|
+
size?: number;
|
|
120
|
+
weight?: SymbolWeight;
|
|
121
|
+
scale?: SymbolScale;
|
|
122
|
+
color?: ColorValue;
|
|
123
|
+
style?: StyleProp<NativeStyle>;
|
|
124
|
+
};
|
|
125
|
+
declare const SFSymbol: _nativescript_react_native26.UIKitViewComponent<SymbolProps, UIImageView>;
|
|
126
|
+
//#endregion
|
|
127
|
+
export { BlurIntensity as C, BlurColorScheme as S, BlurViewProps as T, GlassContainerProps as _, SymbolWeight as a, GlassViewProps as b, LabelTone as c, ButtonProps as d, ButtonSize as f, GlassView as g, GlassButtonProps as h, SymbolScale as i, GlassContainer as l, GlassButton as m, SymbolName as n, Label as o, ButtonVariant as p, SymbolProps as r, LabelProps as s, SFSymbol as t, Button as u, GlassEffectStyleConfig as v, BlurView as w, GlassVisualStyle as x, GlassStyle as y };
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import * as _nativescript_react_native25 from "@nativescript/react-native";
|
|
2
|
+
import * as react3 from "react";
|
|
3
|
+
import { ReactNode } from "react";
|
|
4
|
+
import { ColorValue, PressableProps, StyleProp, TextStyle, ViewStyle } from "react-native";
|
|
5
|
+
|
|
6
|
+
//#region src/elements/shared.d.ts
|
|
7
|
+
type NativeStyle = ViewStyle & TextStyle;
|
|
8
|
+
//#endregion
|
|
9
|
+
//#region src/elements/blur-view.d.ts
|
|
10
|
+
type BlurIntensity = 'ultraThin' | 'thin' | 'regular' | 'thick' | 'chrome';
|
|
11
|
+
type BlurColorScheme = 'auto' | 'light' | 'dark';
|
|
12
|
+
type BlurViewProps = {
|
|
13
|
+
children?: ReactNode;
|
|
14
|
+
style?: StyleProp<NativeStyle>;
|
|
15
|
+
intensity?: BlurIntensity;
|
|
16
|
+
colorScheme?: BlurColorScheme;
|
|
17
|
+
};
|
|
18
|
+
declare const BlurView: _nativescript_react_native25.UIKitViewComponent<BlurViewProps, _nativescript_react_native25.UIKitContainerResult<UIVisualEffectView, UIView>>;
|
|
19
|
+
//#endregion
|
|
20
|
+
//#region src/elements/glass-shared.d.ts
|
|
21
|
+
type GlassStyle = 'regular' | 'clear' | 'none';
|
|
22
|
+
type GlassEffectStyleConfig = {
|
|
23
|
+
style: GlassStyle;
|
|
24
|
+
animate?: boolean;
|
|
25
|
+
animationDuration?: number;
|
|
26
|
+
};
|
|
27
|
+
type GlassVisualStyle = {
|
|
28
|
+
cornerRadius?: number;
|
|
29
|
+
borderWidth?: number;
|
|
30
|
+
borderColor?: ColorValue;
|
|
31
|
+
};
|
|
32
|
+
type GlassViewProps = {
|
|
33
|
+
children?: ReactNode;
|
|
34
|
+
style?: StyleProp<NativeStyle>;
|
|
35
|
+
glassStyle?: GlassVisualStyle;
|
|
36
|
+
glassEffectStyle?: GlassStyle | GlassEffectStyleConfig;
|
|
37
|
+
tintColor?: string;
|
|
38
|
+
isInteractive?: boolean;
|
|
39
|
+
};
|
|
40
|
+
type GlassContainerProps = {
|
|
41
|
+
children?: ReactNode;
|
|
42
|
+
style?: StyleProp<NativeStyle>;
|
|
43
|
+
glassStyle?: GlassVisualStyle;
|
|
44
|
+
spacing?: number;
|
|
45
|
+
};
|
|
46
|
+
//#endregion
|
|
47
|
+
//#region src/elements/glass-view.d.ts
|
|
48
|
+
declare const GlassView: _nativescript_react_native25.UIKitViewComponent<GlassViewProps, _nativescript_react_native25.UIKitContainerResult<UIVisualEffectView, UIView>>;
|
|
49
|
+
//#endregion
|
|
50
|
+
//#region src/elements/button.d.ts
|
|
51
|
+
type ButtonVariant = 'primary' | 'secondary' | 'plain';
|
|
52
|
+
type ButtonSize = 'small' | 'regular' | 'large';
|
|
53
|
+
type ButtonBaseProps = Omit<PressableProps, 'children' | 'disabled'> & {
|
|
54
|
+
label?: string;
|
|
55
|
+
icon?: ReactNode;
|
|
56
|
+
loading?: boolean;
|
|
57
|
+
disabled?: boolean;
|
|
58
|
+
size?: ButtonSize;
|
|
59
|
+
activeOpacity?: number;
|
|
60
|
+
labelStyle?: StyleProp<TextStyle>;
|
|
61
|
+
};
|
|
62
|
+
type ButtonProps = ButtonBaseProps & {
|
|
63
|
+
variant?: ButtonVariant;
|
|
64
|
+
};
|
|
65
|
+
type GlassButtonProps = ButtonBaseProps & Pick<GlassViewProps, 'glassEffectStyle' | 'tintColor'> & {
|
|
66
|
+
glassStyle?: GlassVisualStyle;
|
|
67
|
+
};
|
|
68
|
+
declare function Button({
|
|
69
|
+
accessibilityRole,
|
|
70
|
+
accessibilityState,
|
|
71
|
+
activeOpacity,
|
|
72
|
+
disabled,
|
|
73
|
+
icon,
|
|
74
|
+
label,
|
|
75
|
+
labelStyle,
|
|
76
|
+
loading,
|
|
77
|
+
size,
|
|
78
|
+
style,
|
|
79
|
+
variant,
|
|
80
|
+
...props
|
|
81
|
+
}: ButtonProps): react3.JSX.Element;
|
|
82
|
+
declare function GlassButton({
|
|
83
|
+
accessibilityRole,
|
|
84
|
+
accessibilityState,
|
|
85
|
+
activeOpacity,
|
|
86
|
+
disabled,
|
|
87
|
+
glassEffectStyle,
|
|
88
|
+
glassStyle,
|
|
89
|
+
icon,
|
|
90
|
+
label,
|
|
91
|
+
labelStyle,
|
|
92
|
+
loading,
|
|
93
|
+
size,
|
|
94
|
+
style,
|
|
95
|
+
tintColor,
|
|
96
|
+
...props
|
|
97
|
+
}: GlassButtonProps): react3.JSX.Element;
|
|
98
|
+
//#endregion
|
|
99
|
+
//#region src/elements/glass-container.d.ts
|
|
100
|
+
declare const GlassContainer: _nativescript_react_native25.UIKitViewComponent<GlassContainerProps, _nativescript_react_native25.UIKitContainerResult<UIVisualEffectView, UIView>>;
|
|
101
|
+
//#endregion
|
|
102
|
+
//#region src/elements/label.d.ts
|
|
103
|
+
type LabelTone = 'primary' | 'secondary' | 'tertiary';
|
|
104
|
+
type LabelProps = {
|
|
105
|
+
children?: ReactNode;
|
|
106
|
+
text?: string;
|
|
107
|
+
tone?: LabelTone;
|
|
108
|
+
numberOfLines?: number;
|
|
109
|
+
style?: StyleProp<NativeStyle>;
|
|
110
|
+
};
|
|
111
|
+
declare const Label: _nativescript_react_native25.UIKitViewComponent<LabelProps, UILabel>;
|
|
112
|
+
//#endregion
|
|
113
|
+
//#region src/elements/symbol.d.ts
|
|
114
|
+
type SymbolName = string;
|
|
115
|
+
type SymbolWeight = 'ultraLight' | 'thin' | 'light' | 'regular' | 'medium' | 'semibold' | 'bold' | 'heavy' | 'black';
|
|
116
|
+
type SymbolScale = 'small' | 'medium' | 'large';
|
|
117
|
+
type SymbolProps = {
|
|
118
|
+
symbol: SymbolName;
|
|
119
|
+
size?: number;
|
|
120
|
+
weight?: SymbolWeight;
|
|
121
|
+
scale?: SymbolScale;
|
|
122
|
+
color?: ColorValue;
|
|
123
|
+
style?: StyleProp<NativeStyle>;
|
|
124
|
+
};
|
|
125
|
+
declare const SFSymbol: _nativescript_react_native25.UIKitViewComponent<SymbolProps, UIImageView>;
|
|
126
|
+
//#endregion
|
|
127
|
+
export { BlurIntensity as C, BlurColorScheme as S, BlurViewProps as T, GlassContainerProps as _, SymbolWeight as a, GlassViewProps as b, LabelTone as c, ButtonProps as d, ButtonSize as f, GlassView as g, GlassButtonProps as h, SymbolScale as i, GlassContainer as l, GlassButton as m, SymbolName as n, Label as o, ButtonVariant as p, SymbolProps as r, LabelProps as s, SFSymbol as t, Button as u, GlassEffectStyleConfig as v, BlurView as w, GlassVisualStyle as x, GlassStyle as y };
|