@symbiote-native/cli 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundle.js +4 -33
- package/package.json +1 -1
- package/templates/js/angular/index.js +2 -0
- package/templates/js/angular/src/App.css +2 -4
- package/templates/js/react/App.css +1 -1
- package/templates/js/react/index.js +2 -0
- package/templates/js/solid/App.css +2 -4
- package/templates/js/solid/index.js +2 -0
- package/templates/js/svelte/App.svelte +2 -2
- package/templates/js/svelte/App.typescript.svelte +2 -2
- package/templates/js/svelte/index.js +2 -0
- package/templates/js/vue-sfc/App.typescript.vue +2 -2
- package/templates/js/vue-sfc/App.vue +2 -2
- package/templates/js/vue-sfc/index.js +2 -0
- package/templates/js/vue-tsx/App.css +2 -4
- package/templates/js/vue-tsx/index.js +2 -0
- package/templates/layers/navigation/app/angular/src/App.css +2 -4
- package/templates/layers/navigation/app/react/App.css +1 -1
- package/templates/layers/navigation/app/solid/App.css +2 -4
- package/templates/layers/navigation/app/svelte/App.css +2 -4
- package/templates/layers/navigation/app/vue-sfc/App.css +2 -4
- package/templates/layers/navigation/app/vue-tsx/App.css +2 -4
- package/templates/styling/js/angular/css-modules/src/App.module.css +78 -0
- package/templates/styling/js/angular/css-modules/src/App.ts +30 -6
- package/templates/styling/js/angular/stylesheet/src/App.ts +56 -6
- package/templates/styling/js/react/css-modules/App.jsx +17 -5
- package/templates/styling/js/react/css-modules/App.module.css +60 -0
- package/templates/styling/js/react/css-modules/App.tsx +17 -5
- package/templates/styling/js/react/stylesheet/App.jsx +48 -6
- package/templates/styling/js/react/stylesheet/App.tsx +48 -6
- package/templates/styling/js/solid/css-modules/App.jsx +29 -5
- package/templates/styling/js/solid/css-modules/App.module.css +78 -0
- package/templates/styling/js/solid/css-modules/App.tsx +29 -5
- package/templates/styling/js/solid/stylesheet/App.jsx +60 -6
- package/templates/styling/js/solid/stylesheet/App.tsx +60 -6
- package/templates/styling/js/svelte/css-modules/App.module.css +78 -0
- package/templates/styling/js/svelte/css-modules/App.svelte +27 -5
- package/templates/styling/js/svelte/css-modules/App.typescript.svelte +27 -5
- package/templates/styling/js/svelte/stylesheet/App.svelte +62 -6
- package/templates/styling/js/svelte/stylesheet/App.typescript.svelte +62 -6
- package/templates/styling/js/vue-sfc/css-modules/App.module.css +78 -0
- package/templates/styling/js/vue-sfc/css-modules/App.typescript.vue +29 -5
- package/templates/styling/js/vue-sfc/css-modules/App.vue +29 -5
- package/templates/styling/js/vue-sfc/stylesheet/App.typescript.vue +60 -6
- package/templates/styling/js/vue-sfc/stylesheet/App.vue +60 -6
- package/templates/styling/js/vue-tsx/css-modules/App.jsx +29 -5
- package/templates/styling/js/vue-tsx/css-modules/App.module.css +78 -0
- package/templates/styling/js/vue-tsx/css-modules/App.tsx +29 -5
- package/templates/styling/js/vue-tsx/stylesheet/App.jsx +60 -6
- package/templates/styling/js/vue-tsx/stylesheet/App.tsx +60 -6
- package/templates/styling/navigation/angular/css-modules/src/App.module.css +118 -0
- package/templates/styling/navigation/angular/css-modules/src/DetailsScreen.ts +12 -4
- package/templates/styling/navigation/angular/css-modules/src/MenuScreen.ts +38 -8
- package/templates/styling/navigation/angular/stylesheet/src/DetailsScreen.ts +39 -4
- package/templates/styling/navigation/angular/stylesheet/src/MenuScreen.ts +75 -8
- package/templates/styling/navigation/react/css-modules/App.jsx +56 -11
- package/templates/styling/navigation/react/css-modules/App.module.css +100 -0
- package/templates/styling/navigation/react/css-modules/App.tsx +56 -11
- package/templates/styling/navigation/react/stylesheet/App.jsx +107 -12
- package/templates/styling/navigation/react/stylesheet/App.tsx +107 -12
- package/templates/styling/navigation/solid/css-modules/App.jsx +68 -11
- package/templates/styling/navigation/solid/css-modules/App.module.css +118 -0
- package/templates/styling/navigation/solid/css-modules/App.tsx +68 -11
- package/templates/styling/navigation/solid/stylesheet/App.jsx +119 -12
- package/templates/styling/navigation/solid/stylesheet/App.tsx +119 -12
- package/templates/styling/navigation/svelte/css-modules/App.module.css +118 -0
- package/templates/styling/navigation/svelte/css-modules/DetailsScreen.svelte +14 -3
- package/templates/styling/navigation/svelte/css-modules/DetailsScreen.typescript.svelte +14 -3
- package/templates/styling/navigation/svelte/css-modules/MenuScreen.svelte +34 -6
- package/templates/styling/navigation/svelte/css-modules/MenuScreen.typescript.svelte +34 -6
- package/templates/styling/navigation/svelte/stylesheet/DetailsScreen.svelte +41 -4
- package/templates/styling/navigation/svelte/stylesheet/DetailsScreen.typescript.svelte +41 -4
- package/templates/styling/navigation/svelte/stylesheet/MenuScreen.svelte +80 -7
- package/templates/styling/navigation/svelte/stylesheet/MenuScreen.typescript.svelte +80 -7
- package/templates/styling/navigation/vue-sfc/css-modules/App.module.css +118 -0
- package/templates/styling/navigation/vue-sfc/css-modules/DetailsScreen.typescript.vue +12 -3
- package/templates/styling/navigation/vue-sfc/css-modules/DetailsScreen.vue +12 -3
- package/templates/styling/navigation/vue-sfc/css-modules/MenuScreen.typescript.vue +38 -6
- package/templates/styling/navigation/vue-sfc/css-modules/MenuScreen.vue +38 -6
- package/templates/styling/navigation/vue-sfc/stylesheet/DetailsScreen.typescript.vue +39 -4
- package/templates/styling/navigation/vue-sfc/stylesheet/DetailsScreen.vue +39 -4
- package/templates/styling/navigation/vue-sfc/stylesheet/MenuScreen.typescript.vue +80 -7
- package/templates/styling/navigation/vue-sfc/stylesheet/MenuScreen.vue +80 -7
- package/templates/styling/navigation/vue-tsx/css-modules/App.jsx +63 -18
- package/templates/styling/navigation/vue-tsx/css-modules/App.module.css +118 -0
- package/templates/styling/navigation/vue-tsx/css-modules/App.tsx +63 -18
- package/templates/styling/navigation/vue-tsx/stylesheet/App.jsx +116 -21
- package/templates/styling/navigation/vue-tsx/stylesheet/App.tsx +116 -21
- /package/templates/{native/bootsplash-logo → bootsplash-logo}/angular/android/app/src/main/res/drawable-hdpi/bootsplash_logo.png +0 -0
- /package/templates/{native/bootsplash-logo → bootsplash-logo}/angular/android/app/src/main/res/drawable-mdpi/bootsplash_logo.png +0 -0
- /package/templates/{native/bootsplash-logo → bootsplash-logo}/angular/android/app/src/main/res/drawable-xhdpi/bootsplash_logo.png +0 -0
- /package/templates/{native/bootsplash-logo → bootsplash-logo}/angular/android/app/src/main/res/drawable-xxhdpi/bootsplash_logo.png +0 -0
- /package/templates/{native/bootsplash-logo → bootsplash-logo}/angular/android/app/src/main/res/drawable-xxxhdpi/bootsplash_logo.png +0 -0
- /package/templates/{native/bootsplash-logo → bootsplash-logo}/angular/ios/Canary/Images.xcassets/BootSplashLogo-498e55.imageset/logo-498e55.png +0 -0
- /package/templates/{native/bootsplash-logo → bootsplash-logo}/angular/ios/Canary/Images.xcassets/BootSplashLogo-498e55.imageset/logo-498e55@2x.png +0 -0
- /package/templates/{native/bootsplash-logo → bootsplash-logo}/angular/ios/Canary/Images.xcassets/BootSplashLogo-498e55.imageset/logo-498e55@3x.png +0 -0
- /package/templates/{native/bootsplash-logo → bootsplash-logo}/solid/android/app/src/main/res/drawable-hdpi/bootsplash_logo.png +0 -0
- /package/templates/{native/bootsplash-logo → bootsplash-logo}/solid/android/app/src/main/res/drawable-mdpi/bootsplash_logo.png +0 -0
- /package/templates/{native/bootsplash-logo → bootsplash-logo}/solid/android/app/src/main/res/drawable-xhdpi/bootsplash_logo.png +0 -0
- /package/templates/{native/bootsplash-logo → bootsplash-logo}/solid/android/app/src/main/res/drawable-xxhdpi/bootsplash_logo.png +0 -0
- /package/templates/{native/bootsplash-logo → bootsplash-logo}/solid/android/app/src/main/res/drawable-xxxhdpi/bootsplash_logo.png +0 -0
- /package/templates/{native/bootsplash-logo → bootsplash-logo}/solid/ios/Canary/Images.xcassets/BootSplashLogo-498e55.imageset/logo-498e55.png +0 -0
- /package/templates/{native/bootsplash-logo → bootsplash-logo}/solid/ios/Canary/Images.xcassets/BootSplashLogo-498e55.imageset/logo-498e55@2x.png +0 -0
- /package/templates/{native/bootsplash-logo → bootsplash-logo}/solid/ios/Canary/Images.xcassets/BootSplashLogo-498e55.imageset/logo-498e55@3x.png +0 -0
- /package/templates/{native/bootsplash-logo → bootsplash-logo}/svelte/android/app/src/main/res/drawable-hdpi/bootsplash_logo.png +0 -0
- /package/templates/{native/bootsplash-logo → bootsplash-logo}/svelte/android/app/src/main/res/drawable-mdpi/bootsplash_logo.png +0 -0
- /package/templates/{native/bootsplash-logo → bootsplash-logo}/svelte/android/app/src/main/res/drawable-xhdpi/bootsplash_logo.png +0 -0
- /package/templates/{native/bootsplash-logo → bootsplash-logo}/svelte/android/app/src/main/res/drawable-xxhdpi/bootsplash_logo.png +0 -0
- /package/templates/{native/bootsplash-logo → bootsplash-logo}/svelte/android/app/src/main/res/drawable-xxxhdpi/bootsplash_logo.png +0 -0
- /package/templates/{native/bootsplash-logo → bootsplash-logo}/svelte/ios/Canary/Images.xcassets/BootSplashLogo-498e55.imageset/logo-498e55.png +0 -0
- /package/templates/{native/bootsplash-logo → bootsplash-logo}/svelte/ios/Canary/Images.xcassets/BootSplashLogo-498e55.imageset/logo-498e55@2x.png +0 -0
- /package/templates/{native/bootsplash-logo → bootsplash-logo}/svelte/ios/Canary/Images.xcassets/BootSplashLogo-498e55.imageset/logo-498e55@3x.png +0 -0
- /package/templates/{native/bootsplash-logo → bootsplash-logo}/vue/android/app/src/main/res/drawable-hdpi/bootsplash_logo.png +0 -0
- /package/templates/{native/bootsplash-logo → bootsplash-logo}/vue/android/app/src/main/res/drawable-mdpi/bootsplash_logo.png +0 -0
- /package/templates/{native/bootsplash-logo → bootsplash-logo}/vue/android/app/src/main/res/drawable-xhdpi/bootsplash_logo.png +0 -0
- /package/templates/{native/bootsplash-logo → bootsplash-logo}/vue/android/app/src/main/res/drawable-xxhdpi/bootsplash_logo.png +0 -0
- /package/templates/{native/bootsplash-logo → bootsplash-logo}/vue/android/app/src/main/res/drawable-xxxhdpi/bootsplash_logo.png +0 -0
- /package/templates/{native/bootsplash-logo → bootsplash-logo}/vue/ios/Canary/Images.xcassets/BootSplashLogo-498e55.imageset/logo-498e55.png +0 -0
- /package/templates/{native/bootsplash-logo → bootsplash-logo}/vue/ios/Canary/Images.xcassets/BootSplashLogo-498e55.imageset/logo-498e55@2x.png +0 -0
- /package/templates/{native/bootsplash-logo → bootsplash-logo}/vue/ios/Canary/Images.xcassets/BootSplashLogo-498e55.imageset/logo-498e55@3x.png +0 -0
package/bundle.js
CHANGED
|
@@ -1811,7 +1811,7 @@ function renderTemplate(src, dest, options = DEFAULT_OPTIONS) {
|
|
|
1811
1811
|
//#endregion
|
|
1812
1812
|
//#region src/utils/apply-bootsplash-logo.ts
|
|
1813
1813
|
function applyBootsplashLogo(root, templatesRoot, framework) {
|
|
1814
|
-
const overlayRoot = path.join(templatesRoot, "
|
|
1814
|
+
const overlayRoot = path.join(templatesRoot, "bootsplash-logo", framework);
|
|
1815
1815
|
if (fs.existsSync(overlayRoot)) renderTemplate(overlayRoot, root);
|
|
1816
1816
|
}
|
|
1817
1817
|
//#endregion
|
|
@@ -1883,7 +1883,7 @@ const SKIPPED_DIR_NAMES$1 = /* @__PURE__ */ new Set([
|
|
|
1883
1883
|
"android",
|
|
1884
1884
|
"node_modules"
|
|
1885
1885
|
]);
|
|
1886
|
-
const APP_COMPONENT_FILENAMES
|
|
1886
|
+
const APP_COMPONENT_FILENAMES = /* @__PURE__ */ new Set([
|
|
1887
1887
|
"App.tsx",
|
|
1888
1888
|
"App.jsx",
|
|
1889
1889
|
"App.ts",
|
|
@@ -1899,7 +1899,7 @@ function findAppComponentFile(dir) {
|
|
|
1899
1899
|
if (found !== void 0) return found;
|
|
1900
1900
|
continue;
|
|
1901
1901
|
}
|
|
1902
|
-
if (APP_COMPONENT_FILENAMES
|
|
1902
|
+
if (APP_COMPONENT_FILENAMES.has(entry.name)) return entryPath;
|
|
1903
1903
|
}
|
|
1904
1904
|
}
|
|
1905
1905
|
function escapeRegExp(value) {
|
|
@@ -1978,31 +1978,6 @@ const SKIPPED_DIR_NAMES = /* @__PURE__ */ new Set([
|
|
|
1978
1978
|
"android",
|
|
1979
1979
|
"node_modules"
|
|
1980
1980
|
]);
|
|
1981
|
-
const APP_COMPONENT_FILENAMES = /* @__PURE__ */ new Set([
|
|
1982
|
-
"App.tsx",
|
|
1983
|
-
"App.jsx",
|
|
1984
|
-
"App.ts",
|
|
1985
|
-
"App.vue",
|
|
1986
|
-
"App.svelte"
|
|
1987
|
-
]);
|
|
1988
|
-
const STARTER_CSS_CONTENT = `.container {
|
|
1989
|
-
flex: 1;
|
|
1990
|
-
align-items: center;
|
|
1991
|
-
justify-content: center;
|
|
1992
|
-
}
|
|
1993
|
-
`;
|
|
1994
|
-
function findAppComponentDir(dir) {
|
|
1995
|
-
for (const entry of fs.readdirSync(dir, { withFileTypes: true })) {
|
|
1996
|
-
const entryPath = path.join(dir, entry.name);
|
|
1997
|
-
if (entry.isDirectory()) {
|
|
1998
|
-
if (SKIPPED_DIR_NAMES.has(entry.name)) continue;
|
|
1999
|
-
const found = findAppComponentDir(entryPath);
|
|
2000
|
-
if (found !== void 0) return found;
|
|
2001
|
-
continue;
|
|
2002
|
-
}
|
|
2003
|
-
if (APP_COMPONENT_FILENAMES.has(entry.name)) return dir;
|
|
2004
|
-
}
|
|
2005
|
-
}
|
|
2006
1981
|
function findAppCssFile(dir) {
|
|
2007
1982
|
for (const entry of fs.readdirSync(dir, { withFileTypes: true })) {
|
|
2008
1983
|
if (entry.isDirectory()) {
|
|
@@ -2040,10 +2015,6 @@ function applyStyling(root, options) {
|
|
|
2040
2015
|
if (hasNavigation) renderTemplate(path.join(templatesRoot, "styling", "navigation", jsTemplateDir, styling), root, { hasTypescript });
|
|
2041
2016
|
const orphanedCss = findAppCssFile(root);
|
|
2042
2017
|
if (orphanedCss !== void 0) fs.rmSync(orphanedCss, { force: true });
|
|
2043
|
-
if (styling === "css-modules") {
|
|
2044
|
-
const appDir = findAppComponentDir(root);
|
|
2045
|
-
if (appDir !== void 0) fs.writeFileSync(path.join(appDir, "App.module.css"), STARTER_CSS_CONTENT);
|
|
2046
|
-
}
|
|
2047
2018
|
return;
|
|
2048
2019
|
}
|
|
2049
2020
|
if (INLINE_STYLE_BLOCK_FRAMEWORKS.has(jsTemplateDir)) {
|
|
@@ -2774,7 +2745,7 @@ async function runNew(parsed) {
|
|
|
2774
2745
|
}
|
|
2775
2746
|
//#endregion
|
|
2776
2747
|
//#region package.json
|
|
2777
|
-
var version = "0.1.
|
|
2748
|
+
var version = "0.1.1";
|
|
2778
2749
|
//#endregion
|
|
2779
2750
|
//#region src/index.ts
|
|
2780
2751
|
function printHelp() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@symbiote-native/cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Create a native iOS/Android app in Vue, Svelte, Solid, Angular or React, on React Native's own Fabric renderer. Scaffolds a new app, or wires SymbioteNative into an existing bare React Native one.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react-native",
|
|
@@ -5,6 +5,8 @@
|
|
|
5
5
|
* AppRegistry, then registers the root component — same entry point the other canaries use.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
+
// Registers host behaviors (Image, Pressable, Switch, ...) that /bootstrap alone doesn't reach; deleting this breaks them silently.
|
|
9
|
+
import '@symbiote-native/angular';
|
|
8
10
|
import { bootstrapApplication } from '@symbiote-native/angular/bootstrap';
|
|
9
11
|
import { AppComponent } from './build/angular/src/App';
|
|
10
12
|
import { name as appName } from './app.json';
|
|
@@ -26,14 +26,12 @@
|
|
|
26
26
|
height: 64px;
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
/* aspect-ratio matches each source PNG's real pixel proportions — a shared square box would
|
|
30
|
-
stretch them off their real shape. */
|
|
31
29
|
.brand-logo-react {
|
|
32
|
-
|
|
30
|
+
width: 70px;
|
|
33
31
|
}
|
|
34
32
|
|
|
35
33
|
.brand-logo-angular {
|
|
36
|
-
|
|
34
|
+
width: 61px;
|
|
37
35
|
}
|
|
38
36
|
|
|
39
37
|
.plus-icon {
|
|
@@ -7,6 +7,8 @@
|
|
|
7
7
|
* events, third-party ViewConfigs) before registering, so this file only needs the app itself.
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
+
// Registers host behaviors (Image, Pressable, Switch, ...) that /bootstrap alone doesn't reach; deleting this breaks them silently.
|
|
11
|
+
import '@symbiote-native/react';
|
|
10
12
|
import { registerApp } from '@symbiote-native/react/bootstrap';
|
|
11
13
|
import App from './App';
|
|
12
14
|
import { name as appName } from './app.json';
|
|
@@ -26,14 +26,12 @@
|
|
|
26
26
|
height: 64px;
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
/* aspect-ratio matches each source PNG's real pixel proportions — a shared square box would
|
|
30
|
-
stretch them off their real shape. */
|
|
31
29
|
.brand-logo-react {
|
|
32
|
-
|
|
30
|
+
width: 70px;
|
|
33
31
|
}
|
|
34
32
|
|
|
35
33
|
.brand-logo-solid {
|
|
36
|
-
|
|
34
|
+
width: 66px;
|
|
37
35
|
}
|
|
38
36
|
|
|
39
37
|
.plus-icon {
|
|
@@ -6,6 +6,8 @@
|
|
|
6
6
|
* Same entry shape as every other canary, going through the shared AppRegistry seam.
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
+
// Registers host behaviors (Image, Pressable, Switch, ...) that /bootstrap alone doesn't reach; deleting this breaks them silently.
|
|
10
|
+
import '@symbiote-native/solid';
|
|
9
11
|
import { createApp } from '@symbiote-native/solid/bootstrap';
|
|
10
12
|
import App from './App';
|
|
11
13
|
import { name as appName } from './app.json';
|
|
@@ -6,6 +6,8 @@
|
|
|
6
6
|
* renderer is never in the path.
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
+
// Registers host behaviors (Image, Pressable, Switch, ...) that /bootstrap alone doesn't reach; deleting this breaks them silently.
|
|
10
|
+
import '@symbiote-native/svelte';
|
|
9
11
|
import { createApp } from '@symbiote-native/svelte/bootstrap';
|
|
10
12
|
import App from './App.svelte';
|
|
11
13
|
import { name as appName } from './app.json';
|
|
@@ -6,6 +6,8 @@
|
|
|
6
6
|
* renderer is never in the path.
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
+
// Registers host behaviors (Image, Pressable, Switch, ...) that /bootstrap alone doesn't reach; deleting this breaks them silently.
|
|
10
|
+
import '@symbiote-native/vue';
|
|
9
11
|
import { createApp } from '@symbiote-native/vue/bootstrap';
|
|
10
12
|
import App from './App';
|
|
11
13
|
import { name as appName } from './app.json';
|
|
@@ -26,14 +26,12 @@
|
|
|
26
26
|
height: 64px;
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
/* aspect-ratio matches each source PNG's real pixel proportions — a shared square box would
|
|
30
|
-
stretch them off their real shape. */
|
|
31
29
|
.brand-logo-react {
|
|
32
|
-
|
|
30
|
+
width: 70px;
|
|
33
31
|
}
|
|
34
32
|
|
|
35
33
|
.brand-logo-vue {
|
|
36
|
-
|
|
34
|
+
width: 74px;
|
|
37
35
|
}
|
|
38
36
|
|
|
39
37
|
.plus-icon {
|
|
@@ -7,6 +7,8 @@
|
|
|
7
7
|
* shared AppRegistry seam like every other canary.
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
+
// Registers host behaviors (Image, Pressable, Switch, ...) that /bootstrap alone doesn't reach; deleting this breaks them silently.
|
|
11
|
+
import '@symbiote-native/vue';
|
|
10
12
|
import { createApp } from '@symbiote-native/vue/bootstrap';
|
|
11
13
|
import App from './App';
|
|
12
14
|
import { name as appName } from './app.json';
|
|
@@ -26,14 +26,12 @@
|
|
|
26
26
|
height: 64px;
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
/* aspect-ratio matches each source PNG's real pixel proportions — a shared square box would
|
|
30
|
-
stretch them off their real shape. */
|
|
31
29
|
.brand-logo-react {
|
|
32
|
-
|
|
30
|
+
width: 70px;
|
|
33
31
|
}
|
|
34
32
|
|
|
35
33
|
.brand-logo-angular {
|
|
36
|
-
|
|
34
|
+
width: 61px;
|
|
37
35
|
}
|
|
38
36
|
|
|
39
37
|
.plus-icon {
|
|
@@ -26,14 +26,12 @@
|
|
|
26
26
|
height: 64px;
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
/* aspect-ratio matches each source PNG's real pixel proportions — a shared square box would
|
|
30
|
-
stretch them off their real shape. */
|
|
31
29
|
.brand-logo-react {
|
|
32
|
-
|
|
30
|
+
width: 70px;
|
|
33
31
|
}
|
|
34
32
|
|
|
35
33
|
.brand-logo-solid {
|
|
36
|
-
|
|
34
|
+
width: 66px;
|
|
37
35
|
}
|
|
38
36
|
|
|
39
37
|
.plus-icon {
|
|
@@ -26,14 +26,12 @@
|
|
|
26
26
|
height: 64px;
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
/* aspect-ratio matches each source PNG's real pixel proportions — a shared square box would
|
|
30
|
-
stretch them off their real shape. */
|
|
31
29
|
.brand-logo-react {
|
|
32
|
-
|
|
30
|
+
width: 70px;
|
|
33
31
|
}
|
|
34
32
|
|
|
35
33
|
.brand-logo-svelte {
|
|
36
|
-
|
|
34
|
+
width: 54px;
|
|
37
35
|
}
|
|
38
36
|
|
|
39
37
|
.plus-icon {
|
|
@@ -26,14 +26,12 @@
|
|
|
26
26
|
height: 64px;
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
/* aspect-ratio matches each source PNG's real pixel proportions — a shared square box would
|
|
30
|
-
stretch them off their real shape. */
|
|
31
29
|
.brand-logo-react {
|
|
32
|
-
|
|
30
|
+
width: 70px;
|
|
33
31
|
}
|
|
34
32
|
|
|
35
33
|
.brand-logo-vue {
|
|
36
|
-
|
|
34
|
+
width: 74px;
|
|
37
35
|
}
|
|
38
36
|
|
|
39
37
|
.plus-icon {
|
|
@@ -26,14 +26,12 @@
|
|
|
26
26
|
height: 64px;
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
/* aspect-ratio matches each source PNG's real pixel proportions — a shared square box would
|
|
30
|
-
stretch them off their real shape. */
|
|
31
29
|
.brand-logo-react {
|
|
32
|
-
|
|
30
|
+
width: 70px;
|
|
33
31
|
}
|
|
34
32
|
|
|
35
33
|
.brand-logo-vue {
|
|
36
|
-
|
|
34
|
+
width: 74px;
|
|
37
35
|
}
|
|
38
36
|
|
|
39
37
|
.plus-icon {
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
.screen {
|
|
2
|
+
flex: 1;
|
|
3
|
+
background-color: #0b1622;
|
|
4
|
+
align-items: center;
|
|
5
|
+
justify-content: center;
|
|
6
|
+
gap: 24px;
|
|
7
|
+
padding: 24px 32px;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.brand-row {
|
|
11
|
+
flex-direction: row;
|
|
12
|
+
align-items: center;
|
|
13
|
+
gap: 28px;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.brand-logo {
|
|
17
|
+
height: 64px;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.brand-logo-react {
|
|
21
|
+
width: 70px;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.brand-logo-angular {
|
|
25
|
+
width: 61px;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.plus-icon {
|
|
29
|
+
width: 48px;
|
|
30
|
+
height: 48px;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.title {
|
|
34
|
+
color: #ffffff;
|
|
35
|
+
font-size: 22px;
|
|
36
|
+
font-weight: bold;
|
|
37
|
+
text-align: center;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.subtitle {
|
|
41
|
+
color: #cbd5e1;
|
|
42
|
+
font-size: 14px;
|
|
43
|
+
text-align: center;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.counter-card {
|
|
47
|
+
align-items: center;
|
|
48
|
+
gap: 4px;
|
|
49
|
+
padding: 20px 28px;
|
|
50
|
+
border-radius: 16px;
|
|
51
|
+
background-color: #13243a;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.counter-label {
|
|
55
|
+
color: #41506a;
|
|
56
|
+
font-size: 12px;
|
|
57
|
+
letter-spacing: 1px;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.counter-value {
|
|
61
|
+
color: #dd0031;
|
|
62
|
+
font-size: 32px;
|
|
63
|
+
font-weight: bold;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.button-primary {
|
|
67
|
+
align-items: center;
|
|
68
|
+
justify-content: center;
|
|
69
|
+
border-radius: 12px;
|
|
70
|
+
padding: 14px 22px;
|
|
71
|
+
background-color: #dd0031;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.button-primary-text {
|
|
75
|
+
color: #ffffff;
|
|
76
|
+
font-size: 15px;
|
|
77
|
+
font-weight: bold;
|
|
78
|
+
}
|
|
@@ -7,17 +7,41 @@ import stylesModule from './App.module.css';
|
|
|
7
7
|
standalone: true,
|
|
8
8
|
imports: [SYMBIOTE_ELEMENTS],
|
|
9
9
|
template: `
|
|
10
|
-
<view [class]="
|
|
11
|
-
<
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
<safe-area-view [class]="stylesModule['screen']">
|
|
11
|
+
<view [class]="stylesModule['brand-row']">
|
|
12
|
+
<image
|
|
13
|
+
[class]="stylesModule['brand-logo'] + ' ' + stylesModule['brand-logo-react']"
|
|
14
|
+
resizeMode="contain"
|
|
15
|
+
[source]="reactNativeLogo"
|
|
16
|
+
></image>
|
|
17
|
+
<image [class]="stylesModule['plus-icon']" resizeMode="contain" [source]="plusIcon"></image>
|
|
18
|
+
<image
|
|
19
|
+
[class]="stylesModule['brand-logo'] + ' ' + stylesModule['brand-logo-angular']"
|
|
20
|
+
resizeMode="contain"
|
|
21
|
+
[source]="angularLogo"
|
|
22
|
+
></image>
|
|
23
|
+
</view>
|
|
24
|
+
|
|
25
|
+
<text [class]="stylesModule['title']">Welcome to SymbioteNative!</text>
|
|
26
|
+
<text [class]="stylesModule['subtitle']">Framework-agnostic React Native, driven by Angular.</text>
|
|
27
|
+
|
|
28
|
+
<view [class]="stylesModule['counter-card']">
|
|
29
|
+
<text [class]="stylesModule['counter-label']">TAPS</text>
|
|
30
|
+
<text [class]="stylesModule['counter-value']">{{ count() }}</text>
|
|
31
|
+
</view>
|
|
32
|
+
|
|
33
|
+
<pressable [class]="stylesModule['button-primary']" (press)="increment()">
|
|
34
|
+
<text [class]="stylesModule['button-primary-text']">Tap me</text>
|
|
14
35
|
</pressable>
|
|
15
|
-
</view>
|
|
36
|
+
</safe-area-view>
|
|
16
37
|
`,
|
|
17
38
|
})
|
|
18
39
|
export class AppComponent {
|
|
19
|
-
readonly
|
|
40
|
+
readonly stylesModule = stylesModule;
|
|
20
41
|
readonly count = signal(0);
|
|
42
|
+
readonly reactNativeLogo = require('./assets/react-native-logo.png');
|
|
43
|
+
readonly plusIcon = require('./assets/plus-icon.png');
|
|
44
|
+
readonly angularLogo = require('./assets/angular-logo.png');
|
|
21
45
|
|
|
22
46
|
increment(): void {
|
|
23
47
|
this.count.set(this.count() + 1);
|
|
@@ -6,19 +6,69 @@ import { SYMBIOTE_ELEMENTS, StyleSheet } from '@symbiote-native/angular';
|
|
|
6
6
|
standalone: true,
|
|
7
7
|
imports: [SYMBIOTE_ELEMENTS],
|
|
8
8
|
template: `
|
|
9
|
-
<view [style]="styles.
|
|
10
|
-
<
|
|
11
|
-
|
|
12
|
-
<
|
|
9
|
+
<safe-area-view [style]="styles.screen">
|
|
10
|
+
<view [style]="styles.brandRow">
|
|
11
|
+
<image [style]="[styles.brandLogo, styles.brandLogoReact]" resizeMode="contain" [source]="reactNativeLogo"></image>
|
|
12
|
+
<image [style]="styles.plusIcon" resizeMode="contain" [source]="plusIcon"></image>
|
|
13
|
+
<image [style]="[styles.brandLogo, styles.brandLogoAngular]" resizeMode="contain" [source]="angularLogo"></image>
|
|
14
|
+
</view>
|
|
15
|
+
|
|
16
|
+
<text [style]="styles.title">Welcome to SymbioteNative!</text>
|
|
17
|
+
<text [style]="styles.subtitle">Framework-agnostic React Native, driven by Angular.</text>
|
|
18
|
+
|
|
19
|
+
<view [style]="styles.counterCard">
|
|
20
|
+
<text [style]="styles.counterLabel">TAPS</text>
|
|
21
|
+
<text [style]="styles.counterValue">{{ count() }}</text>
|
|
22
|
+
</view>
|
|
23
|
+
|
|
24
|
+
<pressable [style]="styles.buttonPrimary" (press)="increment()">
|
|
25
|
+
<text [style]="styles.buttonPrimaryText">Tap me</text>
|
|
13
26
|
</pressable>
|
|
14
|
-
</view>
|
|
27
|
+
</safe-area-view>
|
|
15
28
|
`,
|
|
16
29
|
})
|
|
17
30
|
export class AppComponent {
|
|
18
31
|
readonly styles = StyleSheet.create({
|
|
19
|
-
|
|
32
|
+
screen: {
|
|
33
|
+
flex: 1,
|
|
34
|
+
backgroundColor: '#0b1622',
|
|
35
|
+
alignItems: 'center',
|
|
36
|
+
justifyContent: 'center',
|
|
37
|
+
gap: 24,
|
|
38
|
+
paddingVertical: 24,
|
|
39
|
+
paddingHorizontal: 32,
|
|
40
|
+
},
|
|
41
|
+
brandRow: { flexDirection: 'row', alignItems: 'center', gap: 28 },
|
|
42
|
+
brandLogo: { height: 64 },
|
|
43
|
+
brandLogoReact: { width: 70 },
|
|
44
|
+
brandLogoAngular: { width: 61 },
|
|
45
|
+
plusIcon: { width: 48, height: 48 },
|
|
46
|
+
title: { color: '#ffffff', fontSize: 22, fontWeight: 'bold', textAlign: 'center' },
|
|
47
|
+
subtitle: { color: '#cbd5e1', fontSize: 14, textAlign: 'center' },
|
|
48
|
+
counterCard: {
|
|
49
|
+
alignItems: 'center',
|
|
50
|
+
gap: 4,
|
|
51
|
+
paddingVertical: 20,
|
|
52
|
+
paddingHorizontal: 28,
|
|
53
|
+
borderRadius: 16,
|
|
54
|
+
backgroundColor: '#13243a',
|
|
55
|
+
},
|
|
56
|
+
counterLabel: { color: '#41506a', fontSize: 12, letterSpacing: 1 },
|
|
57
|
+
counterValue: { color: '#dd0031', fontSize: 32, fontWeight: 'bold' },
|
|
58
|
+
buttonPrimary: {
|
|
59
|
+
alignItems: 'center',
|
|
60
|
+
justifyContent: 'center',
|
|
61
|
+
borderRadius: 12,
|
|
62
|
+
paddingVertical: 14,
|
|
63
|
+
paddingHorizontal: 22,
|
|
64
|
+
backgroundColor: '#dd0031',
|
|
65
|
+
},
|
|
66
|
+
buttonPrimaryText: { color: '#ffffff', fontSize: 15, fontWeight: 'bold' },
|
|
20
67
|
});
|
|
21
68
|
readonly count = signal(0);
|
|
69
|
+
readonly reactNativeLogo = require('./assets/react-native-logo.png');
|
|
70
|
+
readonly plusIcon = require('./assets/plus-icon.png');
|
|
71
|
+
readonly angularLogo = require('./assets/angular-logo.png');
|
|
22
72
|
|
|
23
73
|
increment(): void {
|
|
24
74
|
this.count.set(this.count() + 1);
|
|
@@ -5,11 +5,23 @@ export default function App() {
|
|
|
5
5
|
const [count, setCount] = useState(0);
|
|
6
6
|
|
|
7
7
|
return (
|
|
8
|
-
<view className={styles
|
|
9
|
-
<
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
<safe-area-view className={styles['screen']}>
|
|
9
|
+
<image
|
|
10
|
+
className={styles['brand-logo']}
|
|
11
|
+
resizeMode="contain"
|
|
12
|
+
source={require('./assets/react-native-logo.png')}
|
|
13
|
+
/>
|
|
14
|
+
<text className={styles['title']}>Welcome to SymbioteNative!</text>
|
|
15
|
+
<text className={styles['subtitle']}>Framework-agnostic React Native, driven by React.</text>
|
|
16
|
+
|
|
17
|
+
<view className={styles['counter-card']}>
|
|
18
|
+
<text className={styles['counter-label']}>TAPS</text>
|
|
19
|
+
<text className={styles['counter-value']}>{count}</text>
|
|
20
|
+
</view>
|
|
21
|
+
|
|
22
|
+
<pressable className={styles['button-primary']} onPress={() => setCount((value) => value + 1)}>
|
|
23
|
+
<text className={styles['button-primary-text']}>Tap me</text>
|
|
12
24
|
</pressable>
|
|
13
|
-
</view>
|
|
25
|
+
</safe-area-view>
|
|
14
26
|
);
|
|
15
27
|
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
.screen {
|
|
2
|
+
flex: 1;
|
|
3
|
+
background-color: #0b1622;
|
|
4
|
+
align-items: center;
|
|
5
|
+
justify-content: center;
|
|
6
|
+
gap: 24px;
|
|
7
|
+
padding: 24px 32px;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.brand-logo {
|
|
11
|
+
width: 70px;
|
|
12
|
+
height: 64px;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.title {
|
|
16
|
+
color: #ffffff;
|
|
17
|
+
font-size: 22px;
|
|
18
|
+
font-weight: bold;
|
|
19
|
+
text-align: center;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.subtitle {
|
|
23
|
+
color: #cbd5e1;
|
|
24
|
+
font-size: 14px;
|
|
25
|
+
text-align: center;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.counter-card {
|
|
29
|
+
align-items: center;
|
|
30
|
+
gap: 4px;
|
|
31
|
+
padding: 20px 28px;
|
|
32
|
+
border-radius: 16px;
|
|
33
|
+
background-color: #13243a;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.counter-label {
|
|
37
|
+
color: #41506a;
|
|
38
|
+
font-size: 12px;
|
|
39
|
+
letter-spacing: 1px;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.counter-value {
|
|
43
|
+
color: #61dafb;
|
|
44
|
+
font-size: 32px;
|
|
45
|
+
font-weight: bold;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.button-primary {
|
|
49
|
+
align-items: center;
|
|
50
|
+
justify-content: center;
|
|
51
|
+
border-radius: 12px;
|
|
52
|
+
padding: 14px 22px;
|
|
53
|
+
background-color: #61dafb;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.button-primary-text {
|
|
57
|
+
color: #0b1622;
|
|
58
|
+
font-size: 15px;
|
|
59
|
+
font-weight: bold;
|
|
60
|
+
}
|