@symbiote-native/screen-orientation 1.0.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.
- package/README.md +13 -15
- package/package.json +13 -13
package/README.md
CHANGED
|
@@ -86,9 +86,9 @@ function ScreenOrientationScreen() {
|
|
|
86
86
|
|
|
87
87
|
return (
|
|
88
88
|
<>
|
|
89
|
-
<
|
|
90
|
-
<
|
|
91
|
-
<
|
|
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,8 +109,8 @@ import { useScreenOrientation } from '@symbiote-native/screen-orientation/vue';
|
|
|
110
109
|
const screenOrientation = useScreenOrientation(); // Ref<ScreenOrientationState>
|
|
111
110
|
</script>
|
|
112
111
|
<template>
|
|
113
|
-
<
|
|
114
|
-
<
|
|
112
|
+
<text>Orientation: {{ screenOrientation.orientation }}</text>
|
|
113
|
+
<text>Lock: {{ screenOrientation.orientationLock }}</text>
|
|
115
114
|
</template>
|
|
116
115
|
```
|
|
117
116
|
|
|
@@ -129,20 +128,20 @@ const screenOrientation = useScreenOrientation(); // Ref<ScreenOrientationState>
|
|
|
129
128
|
const screenOrientation = useScreenOrientation();
|
|
130
129
|
</script>
|
|
131
130
|
|
|
132
|
-
<
|
|
133
|
-
<
|
|
131
|
+
<text>Orientation: {screenOrientation.current.orientation}</text>
|
|
132
|
+
<text>Lock: {screenOrientation.current.orientationLock}</text>
|
|
134
133
|
```
|
|
135
134
|
|
|
136
135
|
```ts
|
|
137
136
|
// Angular — examples/expo-angular/src/screens/ScreenOrientationScreen.ts
|
|
138
137
|
import { Component, inject } from '@angular/core';
|
|
139
|
-
import {
|
|
138
|
+
import { SYMBIOTE_ELEMENTS } from '@symbiote-native/angular';
|
|
140
139
|
import { ScreenOrientationService } from '@symbiote-native/screen-orientation/angular';
|
|
141
140
|
|
|
142
141
|
@Component({
|
|
143
142
|
standalone: true,
|
|
144
|
-
imports: [
|
|
145
|
-
template: `<
|
|
143
|
+
imports: [SYMBIOTE_ELEMENTS],
|
|
144
|
+
template: `<text>Orientation: {{ screenOrientation().orientation }}</text>`,
|
|
146
145
|
})
|
|
147
146
|
export class ScreenOrientationScreen {
|
|
148
147
|
readonly screenOrientation = inject(ScreenOrientationService).connect(); // Signal<ScreenOrientationState>
|
|
@@ -151,7 +150,6 @@ export class ScreenOrientationScreen {
|
|
|
151
150
|
|
|
152
151
|
```tsx
|
|
153
152
|
// Solid — the accessor is CALLED; a Solid component body runs once, so a snapshot would freeze.
|
|
154
|
-
import { Text } from '@symbiote-native/solid';
|
|
155
153
|
import {
|
|
156
154
|
lockAsync,
|
|
157
155
|
OrientationLock,
|
|
@@ -163,9 +161,9 @@ function ScreenOrientationScreen() {
|
|
|
163
161
|
|
|
164
162
|
return (
|
|
165
163
|
<>
|
|
166
|
-
<
|
|
167
|
-
<
|
|
168
|
-
<
|
|
164
|
+
<text>Orientation: {screenOrientation().orientation}</text>
|
|
165
|
+
<text>Lock: {screenOrientation().orientationLock}</text>
|
|
166
|
+
<button
|
|
169
167
|
title="Lock landscape"
|
|
170
168
|
onPress={() => lockAsync(OrientationLock.LANDSCAPE)}
|
|
171
169
|
/>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@symbiote-native/screen-orientation",
|
|
3
|
-
"version": "
|
|
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
6
|
"keywords": [
|
|
@@ -80,12 +80,12 @@
|
|
|
80
80
|
"solid-js": ">=1.9.0",
|
|
81
81
|
"svelte": ">=5.56.0",
|
|
82
82
|
"vue": ">=3.5.0",
|
|
83
|
-
"@symbiote-native/angular": "^
|
|
84
|
-
"@symbiote-native/engine": "^0.
|
|
85
|
-
"@symbiote-native/react": "^
|
|
86
|
-
"@symbiote-native/solid": "^
|
|
87
|
-
"@symbiote-native/svelte": "^
|
|
88
|
-
"@symbiote-native/vue": "^
|
|
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"
|
|
89
89
|
},
|
|
90
90
|
"peerDependenciesMeta": {
|
|
91
91
|
"@symbiote-native/angular": {
|
|
@@ -133,13 +133,13 @@
|
|
|
133
133
|
"solid-js": "^1.9.14",
|
|
134
134
|
"svelte": "^5.56.0",
|
|
135
135
|
"typescript": "~6.0.0",
|
|
136
|
-
"@symbiote-native/angular": "
|
|
137
|
-
"@symbiote-native/engine": "0.
|
|
138
|
-
"@symbiote-native/react": "
|
|
139
|
-
"@symbiote-native/solid": "
|
|
140
|
-
"@symbiote-native/svelte": "
|
|
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
141
|
"@symbiote-native/test-utils": "0.3.0",
|
|
142
|
-
"@symbiote-native/vue": "
|
|
142
|
+
"@symbiote-native/vue": "2.0.0"
|
|
143
143
|
},
|
|
144
144
|
"scripts": {
|
|
145
145
|
"typecheck": "tsc --build",
|