@sublime-ui/ui 0.1.0 → 0.1.2
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/index.js +1 -1
- package/dist/layout/index.js +6 -6
- package/dist/navigation/index.js +4 -4
- package/package.json +105 -61
- package/src/index.ts +1 -1
- package/src/layout/Row.native.tsx +1 -1
- package/src/layout/Row.tsx +1 -1
- package/src/layout/Screen.native.tsx +1 -1
- package/src/layout/Screen.tsx +1 -1
- package/src/layout/Spacer.native.tsx +1 -1
- package/src/layout/Spacer.tsx +1 -1
- package/src/layout/Stack.native.tsx +1 -1
- package/src/layout/Stack.tsx +1 -1
- package/src/layout/index.ts +6 -6
- package/src/navigation/book.ts +1 -1
- package/src/navigation/bridge.native.ts +1 -1
- package/src/navigation/bridge.web.ts +1 -1
- package/src/navigation/index.ts +4 -4
- package/src/navigation/use-nav.ts +2 -2
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "./layout";
|
|
1
|
+
export * from "./layout/index.js";
|
package/dist/layout/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export * from "./Screen";
|
|
2
|
-
export * from "./Screen.types";
|
|
3
|
-
export * from "./Stack";
|
|
4
|
-
export * from "./Row";
|
|
5
|
-
export * from "./Spacer";
|
|
6
|
-
export * from "./Stack.types";
|
|
1
|
+
export * from "./Screen.js";
|
|
2
|
+
export * from "./Screen.types.js";
|
|
3
|
+
export * from "./Stack.js";
|
|
4
|
+
export * from "./Row.js";
|
|
5
|
+
export * from "./Spacer.js";
|
|
6
|
+
export * from "./Stack.types.js";
|
package/dist/navigation/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export * from "./book";
|
|
2
|
-
export * from "./use-nav";
|
|
3
|
-
export * from "./types";
|
|
4
|
-
export * from "./nav.types";
|
|
1
|
+
export * from "./book.js";
|
|
2
|
+
export * from "./use-nav.js";
|
|
3
|
+
export * from "./types.js";
|
|
4
|
+
export * from "./nav.types.js";
|
package/package.json
CHANGED
|
@@ -1,61 +1,105 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@sublime-ui/ui",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": "Cross-platform navigation (storybook → React Navigation / react-router) and layout primitives for Sublime UI.",
|
|
5
|
-
"keywords": [
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
"
|
|
26
|
-
},
|
|
27
|
-
"
|
|
28
|
-
|
|
29
|
-
"
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
"
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
"
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
},
|
|
46
|
-
"
|
|
47
|
-
|
|
48
|
-
"
|
|
49
|
-
"
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
"
|
|
53
|
-
"
|
|
54
|
-
"
|
|
55
|
-
"
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
"react
|
|
59
|
-
"react-
|
|
60
|
-
|
|
61
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "@sublime-ui/ui",
|
|
3
|
+
"version": "0.1.2",
|
|
4
|
+
"description": "Cross-platform navigation (storybook → React Navigation / react-router) and layout primitives for Sublime UI.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"sublime-ui",
|
|
7
|
+
"navigation",
|
|
8
|
+
"react-navigation",
|
|
9
|
+
"react-router",
|
|
10
|
+
"layout",
|
|
11
|
+
"storybook",
|
|
12
|
+
"cross-platform",
|
|
13
|
+
"typescript"
|
|
14
|
+
],
|
|
15
|
+
"homepage": "https://sublime-ui.github.io/sublime-ui/",
|
|
16
|
+
"bugs": "https://github.com/sublime-ui/sublime-ui/issues",
|
|
17
|
+
"repository": {
|
|
18
|
+
"type": "git",
|
|
19
|
+
"url": "git+https://github.com/sublime-ui/sublime-ui.git",
|
|
20
|
+
"directory": "ui"
|
|
21
|
+
},
|
|
22
|
+
"license": "MIT",
|
|
23
|
+
"author": "Aaron Mkandawire",
|
|
24
|
+
"publishConfig": {
|
|
25
|
+
"access": "public"
|
|
26
|
+
},
|
|
27
|
+
"type": "module",
|
|
28
|
+
"exports": {
|
|
29
|
+
".": {
|
|
30
|
+
"types": "./dist/index.d.ts",
|
|
31
|
+
"import": "./dist/index.js"
|
|
32
|
+
},
|
|
33
|
+
"./navigation": {
|
|
34
|
+
"types": "./dist/navigation/index.d.ts",
|
|
35
|
+
"import": "./dist/navigation/index.js"
|
|
36
|
+
},
|
|
37
|
+
"./navigation/bridge.native": {
|
|
38
|
+
"types": "./dist/navigation/bridge.native.d.ts",
|
|
39
|
+
"import": "./dist/navigation/bridge.native.js"
|
|
40
|
+
},
|
|
41
|
+
"./navigation/bridge.web": {
|
|
42
|
+
"types": "./dist/navigation/bridge.web.d.ts",
|
|
43
|
+
"import": "./dist/navigation/bridge.web.js"
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
"react-native": "./src/index.ts",
|
|
47
|
+
"files": [
|
|
48
|
+
"dist",
|
|
49
|
+
"src"
|
|
50
|
+
],
|
|
51
|
+
"scripts": {
|
|
52
|
+
"build": "tsup",
|
|
53
|
+
"typecheck": "tsc --noEmit",
|
|
54
|
+
"test": "vitest run --passWithNoTests",
|
|
55
|
+
"lint": "eslint src"
|
|
56
|
+
},
|
|
57
|
+
"peerDependencies": {
|
|
58
|
+
"react": ">=18",
|
|
59
|
+
"react-native": ">=0.74",
|
|
60
|
+
"@react-navigation/native": ">=6",
|
|
61
|
+
"@react-navigation/native-stack": ">=6",
|
|
62
|
+
"@react-navigation/bottom-tabs": ">=6",
|
|
63
|
+
"@react-navigation/drawer": ">=6",
|
|
64
|
+
"react-native-safe-area-context": ">=4",
|
|
65
|
+
"react-router-dom": ">=6"
|
|
66
|
+
},
|
|
67
|
+
"peerDependenciesMeta": {
|
|
68
|
+
"react-native": {
|
|
69
|
+
"optional": true
|
|
70
|
+
},
|
|
71
|
+
"@react-navigation/native": {
|
|
72
|
+
"optional": true
|
|
73
|
+
},
|
|
74
|
+
"@react-navigation/native-stack": {
|
|
75
|
+
"optional": true
|
|
76
|
+
},
|
|
77
|
+
"@react-navigation/bottom-tabs": {
|
|
78
|
+
"optional": true
|
|
79
|
+
},
|
|
80
|
+
"@react-navigation/drawer": {
|
|
81
|
+
"optional": true
|
|
82
|
+
},
|
|
83
|
+
"react-native-safe-area-context": {
|
|
84
|
+
"optional": true
|
|
85
|
+
},
|
|
86
|
+
"react-router-dom": {
|
|
87
|
+
"optional": true
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
"devDependencies": {
|
|
91
|
+
"@react-navigation/native": "^6.1.18",
|
|
92
|
+
"@react-navigation/native-stack": "^6.11.0",
|
|
93
|
+
"@react-navigation/bottom-tabs": "^6.6.1",
|
|
94
|
+
"@react-navigation/drawer": "^6.7.2",
|
|
95
|
+
"@testing-library/react": "^16.0.1",
|
|
96
|
+
"@types/node": "^22",
|
|
97
|
+
"@types/react": "^18.3.12",
|
|
98
|
+
"jsdom": "^25.0.1",
|
|
99
|
+
"react": "^18.3.1",
|
|
100
|
+
"react-dom": "^18.3.1",
|
|
101
|
+
"react-native": "^0.76.1",
|
|
102
|
+
"react-native-safe-area-context": "^4.14.0",
|
|
103
|
+
"react-router-dom": "^6.27.0"
|
|
104
|
+
}
|
|
105
|
+
}
|
package/src/index.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './layout';
|
|
1
|
+
export * from './layout/index.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { View } from 'react-native';
|
|
2
2
|
import type { ViewStyle } from 'react-native';
|
|
3
|
-
import type { FlexAlign, FlexJustify, RowProps } from './Stack.types';
|
|
3
|
+
import type { FlexAlign, FlexJustify, RowProps } from './Stack.types.js';
|
|
4
4
|
|
|
5
5
|
const ALIGN: Record<FlexAlign, ViewStyle['alignItems']> = {
|
|
6
6
|
start: 'flex-start',
|
package/src/layout/Row.tsx
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { CSSProperties } from 'react';
|
|
2
|
-
import type { FlexAlign, FlexJustify, RowProps } from './Stack.types';
|
|
2
|
+
import type { FlexAlign, FlexJustify, RowProps } from './Stack.types.js';
|
|
3
3
|
|
|
4
4
|
const ALIGN: Record<FlexAlign, CSSProperties['alignItems']> = {
|
|
5
5
|
start: 'flex-start',
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { SafeAreaView } from 'react-native-safe-area-context';
|
|
2
2
|
import { ScrollView, View } from 'react-native';
|
|
3
|
-
import type { ScreenProps } from './Screen.types';
|
|
3
|
+
import type { ScreenProps } from './Screen.types.js';
|
|
4
4
|
|
|
5
5
|
export function Screen({ children, scroll, padded = true, testID }: ScreenProps) {
|
|
6
6
|
const inner = <View style={{ padding: padded ? 16 : 0, flex: 1 }}>{children}</View>;
|
package/src/layout/Screen.tsx
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { View } from 'react-native';
|
|
2
2
|
import type { ViewStyle } from 'react-native';
|
|
3
|
-
import type { SpacerProps } from './Stack.types';
|
|
3
|
+
import type { SpacerProps } from './Stack.types.js';
|
|
4
4
|
|
|
5
5
|
export function Spacer({ size }: SpacerProps) {
|
|
6
6
|
const style: ViewStyle = {
|
package/src/layout/Spacer.tsx
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { View } from 'react-native';
|
|
2
2
|
import type { ViewStyle } from 'react-native';
|
|
3
|
-
import type { FlexAlign, FlexJustify, FlexProps } from './Stack.types';
|
|
3
|
+
import type { FlexAlign, FlexJustify, FlexProps } from './Stack.types.js';
|
|
4
4
|
|
|
5
5
|
const ALIGN: Record<FlexAlign, ViewStyle['alignItems']> = {
|
|
6
6
|
start: 'flex-start',
|
package/src/layout/Stack.tsx
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { CSSProperties } from 'react';
|
|
2
|
-
import type { FlexAlign, FlexJustify, FlexProps } from './Stack.types';
|
|
2
|
+
import type { FlexAlign, FlexJustify, FlexProps } from './Stack.types.js';
|
|
3
3
|
|
|
4
4
|
const ALIGN: Record<FlexAlign, CSSProperties['alignItems']> = {
|
|
5
5
|
start: 'flex-start',
|
package/src/layout/index.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export * from './Screen';
|
|
2
|
-
export * from './Screen.types';
|
|
3
|
-
export * from './Stack';
|
|
4
|
-
export * from './Row';
|
|
5
|
-
export * from './Spacer';
|
|
6
|
-
export * from './Stack.types';
|
|
1
|
+
export * from './Screen.js';
|
|
2
|
+
export * from './Screen.types.js';
|
|
3
|
+
export * from './Stack.js';
|
|
4
|
+
export * from './Row.js';
|
|
5
|
+
export * from './Spacer.js';
|
|
6
|
+
export * from './Stack.types.js';
|
package/src/navigation/book.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type {
|
|
2
2
|
BookDef, Entry, LinkDef, PageDef, PageOptions, PrintFormat, RouteMap,
|
|
3
|
-
} from './types';
|
|
3
|
+
} from './types.js';
|
|
4
4
|
|
|
5
5
|
export function page<P = void>(component: unknown, options: PageOptions = {}): PageDef<P> {
|
|
6
6
|
return { kind: 'page', component, options };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useNavigation, useRoute } from '@react-navigation/native';
|
|
2
|
-
import type { Nav } from './nav.types';
|
|
2
|
+
import type { Nav } from './nav.types.js';
|
|
3
3
|
|
|
4
4
|
export function useNativeNav(): Nav {
|
|
5
5
|
// react-navigation's hook is generic over the app's param list, which is only
|
package/src/navigation/index.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export * from './book';
|
|
2
|
-
export * from './use-nav';
|
|
3
|
-
export * from './types';
|
|
4
|
-
export * from './nav.types';
|
|
1
|
+
export * from './book.js';
|
|
2
|
+
export * from './use-nav.js';
|
|
3
|
+
export * from './types.js';
|
|
4
|
+
export * from './nav.types.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createContext, createElement, useContext, type ReactNode } from 'react';
|
|
2
|
-
import type { Nav, TypedNav } from './nav.types';
|
|
3
|
-
import type { RouteMap } from './types';
|
|
2
|
+
import type { Nav, TypedNav } from './nav.types.js';
|
|
3
|
+
import type { RouteMap } from './types.js';
|
|
4
4
|
|
|
5
5
|
export const NavContext = createContext<Nav | null>(null);
|
|
6
6
|
|