@symbiote-native/vue 0.1.1 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -18,6 +18,20 @@ mutation-oriented framework driving the already-validated engine.
18
18
 
19
19
  ---
20
20
 
21
+ ## Install
22
+
23
+ ```bash
24
+ npm install @symbiote-native/vue react-native vue
25
+ ```
26
+
27
+ `react-native` and `vue` stay your app's own top-level dependencies — this package only replaces
28
+ the JS renderer that drives them. **TSX** needs nothing beyond the install above; **SFC**
29
+ additionally needs a Metro transformer for `.vue` files (see
30
+ [`examples/vue-sfc`](../../examples/vue-sfc)'s `metro.config.js`), since there's no
31
+ `create-symbiote` scaffolder yet to wire it for you.
32
+
33
+ ---
34
+
21
35
  ## Use it
22
36
 
23
37
  The native entry reaches the *same* `registerRunnable` seam as React — only the adapter changes. It
@@ -0,0 +1,7 @@
1
+ import type { Component } from '@vue/runtime-core';
2
+ import { type IBootstrapHostOptions } from '@symbiote-native/components/bootstrap';
3
+ export type { IBootstrapHostOptions } from '@symbiote-native/components/bootstrap';
4
+ export type ISymbioteVueApp = {
5
+ mount(appName: string): void;
6
+ };
7
+ export declare function createApp(App: Component, options?: IBootstrapHostOptions): ISymbioteVueApp;
@@ -0,0 +1,17 @@
1
+ // Zero-config app entry, the Vue twin of adapters/react/src/bootstrap.ts. createApp(App) stays
2
+ // inert (matching real Vue's own semantics); mount(appName) is where the RN host seams and
3
+ // AppRegistry actually get wired. Lives OUTSIDE the package's main barrel — see that file's
4
+ // header for why anything importing react-native must stay there.
5
+ import { AppRegistry as RNAppRegistry } from 'react-native';
6
+ import { bootstrapHost } from '@symbiote-native/components/bootstrap';
7
+ import { AppRegistry, setHostRegistrar } from './modules/app-registry';
8
+ // Mirrors real Vue's createApp(App).mount(selector) two-step idiom.
9
+ export function createApp(App, options = {}) {
10
+ return {
11
+ mount(appName) {
12
+ bootstrapHost(options);
13
+ setHostRegistrar(RNAppRegistry);
14
+ AppRegistry.registerComponent(appName, () => App);
15
+ },
16
+ };
17
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@symbiote-native/vue",
3
- "version": "0.1.1",
3
+ "version": "0.2.0",
4
4
  "description": "SymbioteNative's Vue adapter — a @vue/runtime-core createRenderer driving real native iOS/Android views through the same engine as the React adapter.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -21,6 +21,10 @@
21
21
  "types": "./build/index.d.ts",
22
22
  "default": "./build/index.js"
23
23
  },
24
+ "./bootstrap": {
25
+ "types": "./build/bootstrap.d.ts",
26
+ "default": "./build/bootstrap.js"
27
+ },
24
28
  "./runtime-helpers": {
25
29
  "types": "./build/runtime-helpers.d.ts",
26
30
  "default": "./build/runtime-helpers.js"
@@ -36,8 +40,8 @@
36
40
  },
37
41
  "dependencies": {
38
42
  "@vue/runtime-core": "^3.5.13",
39
- "@symbiote-native/components": "0.1.1",
40
43
  "@symbiote-native/css-parser": "0.1.1",
44
+ "@symbiote-native/components": "0.2.0",
41
45
  "@symbiote-native/engine": "0.1.1"
42
46
  },
43
47
  "peerDependencies": {
@@ -45,7 +49,7 @@
45
49
  "react-native": ">=0.86"
46
50
  },
47
51
  "devDependencies": {
48
- "@symbiote-native/test-utils": "0.0.0"
52
+ "@symbiote-native/test-utils": "0.1.1"
49
53
  },
50
54
  "scripts": {
51
55
  "typecheck": "tsc --build",