@symbiote-native/screen-orientation 0.3.0 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +29 -13
  2. package/package.json +27 -15
package/README.md CHANGED
@@ -86,9 +86,9 @@ function ScreenOrientationScreen() {
86
86
 
87
87
  return (
88
88
  <>
89
- <Text>Orientation: {orientation}</Text>
90
- <Text>Lock: {orientationLock}</Text>
91
- <Button
89
+ <text>Orientation: {orientation}</text>
90
+ <text>Lock: {orientationLock}</text>
91
+ <button
92
92
  title="Lock landscape"
93
93
  onPress={() => lockAsync(OrientationLock.LANDSCAPE)}
94
94
  />
@@ -100,7 +100,6 @@ function ScreenOrientationScreen() {
100
100
  ```vue
101
101
  <!-- Vue — examples/expo-vue-sfc/screens/ScreenOrientationScreen.vue -->
102
102
  <script setup lang="ts">
103
- import { Text } from '@symbiote-native/vue';
104
103
  import {
105
104
  lockAsync,
106
105
  OrientationLock,
@@ -110,21 +109,39 @@ import { useScreenOrientation } from '@symbiote-native/screen-orientation/vue';
110
109
  const screenOrientation = useScreenOrientation(); // Ref<ScreenOrientationState>
111
110
  </script>
112
111
  <template>
113
- <Text>Orientation: {{ screenOrientation.orientation }}</Text>
114
- <Text>Lock: {{ screenOrientation.orientationLock }}</Text>
112
+ <text>Orientation: {{ screenOrientation.orientation }}</text>
113
+ <text>Lock: {{ screenOrientation.orientationLock }}</text>
115
114
  </template>
116
115
  ```
117
116
 
117
+ ```svelte
118
+ <!-- Svelte — examples/expo-svelte/screens/ScreenOrientationScreen.svelte -->
119
+ <script lang="ts">
120
+ import {
121
+ lockAsync,
122
+ OrientationLock,
123
+ } from '@symbiote-native/screen-orientation';
124
+ import { useScreenOrientation } from '@symbiote-native/screen-orientation/svelte';
125
+
126
+ // The rune hands back a boxed getter, so `.current` is what a `$derived` subscribes to —
127
+ // Svelte's twin of unwrapping Vue's Ref via `.value`.
128
+ const screenOrientation = useScreenOrientation();
129
+ </script>
130
+
131
+ <text>Orientation: {screenOrientation.current.orientation}</text>
132
+ <text>Lock: {screenOrientation.current.orientationLock}</text>
133
+ ```
134
+
118
135
  ```ts
119
136
  // Angular — examples/expo-angular/src/screens/ScreenOrientationScreen.ts
120
137
  import { Component, inject } from '@angular/core';
121
- import { Text } from '@symbiote-native/angular';
138
+ import { SYMBIOTE_ELEMENTS } from '@symbiote-native/angular';
122
139
  import { ScreenOrientationService } from '@symbiote-native/screen-orientation/angular';
123
140
 
124
141
  @Component({
125
142
  standalone: true,
126
- imports: [Text],
127
- template: `<Text>Orientation: {{ screenOrientation().orientation }}</Text>`,
143
+ imports: [SYMBIOTE_ELEMENTS],
144
+ template: `<text>Orientation: {{ screenOrientation().orientation }}</text>`,
128
145
  })
129
146
  export class ScreenOrientationScreen {
130
147
  readonly screenOrientation = inject(ScreenOrientationService).connect(); // Signal<ScreenOrientationState>
@@ -133,7 +150,6 @@ export class ScreenOrientationScreen {
133
150
 
134
151
  ```tsx
135
152
  // Solid — the accessor is CALLED; a Solid component body runs once, so a snapshot would freeze.
136
- import { Text } from '@symbiote-native/solid';
137
153
  import {
138
154
  lockAsync,
139
155
  OrientationLock,
@@ -145,9 +161,9 @@ function ScreenOrientationScreen() {
145
161
 
146
162
  return (
147
163
  <>
148
- <Text>Orientation: {screenOrientation().orientation}</Text>
149
- <Text>Lock: {screenOrientation().orientationLock}</Text>
150
- <Button
164
+ <text>Orientation: {screenOrientation().orientation}</text>
165
+ <text>Lock: {screenOrientation().orientationLock}</text>
166
+ <button
151
167
  title="Lock landscape"
152
168
  onPress={() => lockAsync(OrientationLock.LANDSCAPE)}
153
169
  />
package/package.json CHANGED
@@ -1,8 +1,20 @@
1
1
  {
2
2
  "name": "@symbiote-native/screen-orientation",
3
- "version": "0.3.0",
3
+ "version": "2.0.0",
4
4
  "description": "expo-screen-orientation wrapped for SymbioteNative — one framework-agnostic core, built once and reachable from the React, Vue, Svelte, Solid, and Angular adapters. Orientation locking (lockAsync/lockPlatformAsync/unlockAsync), the current orientation and lock, and an auto-updating orientation-change hook/composable/service.",
5
5
  "license": "MIT",
6
+ "keywords": [
7
+ "react-native",
8
+ "symbiote-native",
9
+ "expo-screen-orientation",
10
+ "react",
11
+ "vue",
12
+ "svelte",
13
+ "solid",
14
+ "angular",
15
+ "orientation-lock",
16
+ "orientation"
17
+ ],
6
18
  "repository": {
7
19
  "type": "git",
8
20
  "url": "git+https://github.com/OneEyed1366/symbiote-native.git",
@@ -61,19 +73,19 @@
61
73
  "expo-modules-core": "57.0.5"
62
74
  },
63
75
  "peerDependencies": {
64
- "@symbiote-native/angular": ">=0.6.2",
65
- "@symbiote-native/engine": ">=0.1.7",
66
- "@symbiote-native/react": ">=0.2.8",
67
- "@symbiote-native/solid": ">=0.0.1",
68
- "@symbiote-native/svelte": ">=0.1.0",
69
- "@symbiote-native/vue": ">=0.3.8",
70
76
  "@angular/core": ">=20",
71
77
  "@vue/runtime-core": "^3.5.13",
72
78
  "react": ">=19.0.0",
73
79
  "react-native": ">=0.86",
74
80
  "solid-js": ">=1.9.0",
75
81
  "svelte": ">=5.56.0",
76
- "vue": ">=3.5.0"
82
+ "vue": ">=3.5.0",
83
+ "@symbiote-native/angular": "^2.0.0",
84
+ "@symbiote-native/engine": "^0.5.0",
85
+ "@symbiote-native/react": "^2.0.0",
86
+ "@symbiote-native/solid": "^2.0.0",
87
+ "@symbiote-native/svelte": "^2.0.0",
88
+ "@symbiote-native/vue": "^2.0.0"
77
89
  },
78
90
  "peerDependenciesMeta": {
79
91
  "@symbiote-native/angular": {
@@ -121,13 +133,13 @@
121
133
  "solid-js": "^1.9.14",
122
134
  "svelte": "^5.56.0",
123
135
  "typescript": "~6.0.0",
124
- "@symbiote-native/angular": "0.8.0",
125
- "@symbiote-native/engine": "0.3.0",
126
- "@symbiote-native/react": "0.4.0",
127
- "@symbiote-native/solid": "0.1.0",
128
- "@symbiote-native/svelte": "0.3.0",
129
- "@symbiote-native/test-utils": "0.2.0",
130
- "@symbiote-native/vue": "0.5.0"
136
+ "@symbiote-native/angular": "2.0.0",
137
+ "@symbiote-native/engine": "0.5.0",
138
+ "@symbiote-native/react": "2.0.0",
139
+ "@symbiote-native/solid": "2.0.0",
140
+ "@symbiote-native/svelte": "2.0.0",
141
+ "@symbiote-native/test-utils": "0.3.0",
142
+ "@symbiote-native/vue": "2.0.0"
131
143
  },
132
144
  "scripts": {
133
145
  "typecheck": "tsc --build",