@idealyst/mcp-server 1.2.16 → 1.2.18
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/data/components/Button.d.ts.map +1 -1
- package/dist/data/components/Button.js +14 -5
- package/dist/data/components/Button.js.map +1 -1
- package/dist/data/components/Dialog.js +1 -1
- package/dist/data/components/Progress.js +4 -4
- package/dist/data/components/RadioButton.js +1 -1
- package/dist/data/components/Select.js +1 -1
- package/dist/data/framework-guides.d.ts.map +1 -1
- package/dist/data/framework-guides.js +31 -19
- package/dist/data/framework-guides.js.map +1 -1
- package/dist/data/navigation-guides.d.ts.map +1 -1
- package/dist/data/navigation-guides.js +115 -48
- package/dist/data/navigation-guides.js.map +1 -1
- package/dist/data/packages.d.ts +39 -0
- package/dist/data/packages.d.ts.map +1 -0
- package/dist/data/packages.js +550 -0
- package/dist/data/packages.js.map +1 -0
- package/dist/data/storage-guides.d.ts +2 -0
- package/dist/data/storage-guides.d.ts.map +1 -0
- package/dist/data/storage-guides.js +418 -0
- package/dist/data/storage-guides.js.map +1 -0
- package/dist/index.js +314 -2
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../src/data/components/Button.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../src/data/components/Button.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM;;;;;;;;;;;;;;CAoHlB,CAAC"}
|
|
@@ -6,6 +6,7 @@ export const Button = {
|
|
|
6
6
|
- \`title\`: string - The text title to display inside the button (for web)
|
|
7
7
|
- \`onPress\`: function - Called when the button is pressed
|
|
8
8
|
- \`disabled\`: boolean - Whether the button is disabled
|
|
9
|
+
- \`loading\`: boolean - Whether the button is in a loading state. Shows a spinner and disables interaction.
|
|
9
10
|
- \`type\`: ButtonType - The visual style type of the button ('contained' | 'outlined' | 'text')
|
|
10
11
|
- \`intent\`: ButtonIntentVariant - The intent/color scheme of the button
|
|
11
12
|
- \`size\`: ButtonSizeVariant - The size of the button
|
|
@@ -17,6 +18,7 @@ export const Button = {
|
|
|
17
18
|
"Three type variants: contained, outlined, text",
|
|
18
19
|
"Five intent colors: primary, neutral, success, error, warning",
|
|
19
20
|
"Five sizes: xs, sm, md, lg, xl",
|
|
21
|
+
"Loading state with spinner (matches text color)",
|
|
20
22
|
"Gradient overlay effects (darken/lighten) for contained buttons",
|
|
21
23
|
"Left and right icon support with MDI icons or custom React elements",
|
|
22
24
|
"Disabled states with visual feedback",
|
|
@@ -35,7 +37,7 @@ import { Button } from '@idealyst/components';
|
|
|
35
37
|
<Button
|
|
36
38
|
type="contained"
|
|
37
39
|
intent="primary"
|
|
38
|
-
|
|
40
|
+
leftIcon="check"
|
|
39
41
|
onPress={() => console.log('Pressed')}
|
|
40
42
|
>
|
|
41
43
|
Save Changes
|
|
@@ -56,13 +58,20 @@ import { Button } from '@idealyst/components';
|
|
|
56
58
|
<Button type="text" intent="primary">Text</Button>`,
|
|
57
59
|
"with-icons": `import { Button } from '@idealyst/components';
|
|
58
60
|
|
|
59
|
-
// Button with icon
|
|
60
|
-
<Button
|
|
61
|
+
// Button with left icon
|
|
62
|
+
<Button leftIcon="check">
|
|
61
63
|
Confirm
|
|
62
64
|
</Button>
|
|
63
65
|
|
|
64
|
-
//
|
|
65
|
-
<Button
|
|
66
|
+
// Button with right icon
|
|
67
|
+
<Button rightIcon="arrow-right">
|
|
68
|
+
Next
|
|
69
|
+
</Button>
|
|
70
|
+
|
|
71
|
+
// Button with both icons
|
|
72
|
+
<Button leftIcon="check" rightIcon="arrow-right">
|
|
73
|
+
Continue
|
|
74
|
+
</Button>`,
|
|
66
75
|
interactive: `import { Button } from '@idealyst/components';
|
|
67
76
|
import { useState } from 'react';
|
|
68
77
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.js","sourceRoot":"","sources":["../../../src/data/components/Button.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,MAAM,GAAG;IACtB,QAAQ,EAAE,MAAM;IACZ,WAAW,EAAE,8EAA8E;IACvF,KAAK,EAAE
|
|
1
|
+
{"version":3,"file":"Button.js","sourceRoot":"","sources":["../../../src/data/components/Button.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,MAAM,GAAG;IACtB,QAAQ,EAAE,MAAM;IACZ,WAAW,EAAE,8EAA8E;IACvF,KAAK,EAAE;;;;;;;;;;;;CAYd;IACG,QAAQ,EAAE;QACR,gDAAgD;QAChD,+DAA+D;QAC/D,gCAAgC;QAChC,iDAAiD;QACjD,iEAAiE;QACjE,qEAAqE;QACrE,sCAAsC;QACtC,uCAAuC;KACxC;IACD,aAAa,EAAE;QACb,uCAAuC;QACvC,+CAA+C;QAC/C,6DAA6D;QAC7D,gDAAgD;QAChD,qEAAqE;KACtE;IACD,KAAK,EAAE;;;;;;;;;;;CAWV;IACG,QAAQ,EAAE;QACR,KAAK,EAAE;;;;;UAKH;QACJ,QAAQ,EAAE;;;;;mDAKmC;QAC7C,YAAY,EAAE;;;;;;;;;;;;;;;UAeV;QACJ,WAAW,EAAE;;;;;;;;;;;;;;;;;;;;EAoBjB;QACI,QAAQ,EAAE;;;;;;;;;;;;;;;;;;;UAmBN;KACL;CACJ,CAAC"}
|
|
@@ -7,7 +7,7 @@ export const Dialog = {
|
|
|
7
7
|
- \`title\`: string - Optional title for the dialog
|
|
8
8
|
- \`children\`: React.ReactNode - The content to display inside the dialog
|
|
9
9
|
- \`size\`: DialogSizeVariant - The size of the dialog
|
|
10
|
-
- \`showCloseButton\`: boolean -
|
|
10
|
+
- \`showCloseButton\`: boolean - Whether to show the close button in the header
|
|
11
11
|
- \`closeOnBackdropClick\`: boolean - Whether clicking the backdrop should close the dialog
|
|
12
12
|
- \`closeOnEscapeKey\`: boolean - Whether pressing escape key should close the dialog (web only)
|
|
13
13
|
- \`animationType\`: DialogAnimationType - Animation type for the dialog (native only)
|
|
@@ -33,7 +33,7 @@ import { Progress } from '@idealyst/components';
|
|
|
33
33
|
|
|
34
34
|
<Progress
|
|
35
35
|
value={65}
|
|
36
|
-
|
|
36
|
+
variant="linear"
|
|
37
37
|
intent="primary"
|
|
38
38
|
showLabel
|
|
39
39
|
/>
|
|
@@ -45,9 +45,9 @@ import { Progress } from '@idealyst/components';
|
|
|
45
45
|
variants: `import { Progress, View } from '@idealyst/components';
|
|
46
46
|
|
|
47
47
|
<View spacing="md">
|
|
48
|
-
<Progress value={30}
|
|
49
|
-
<Progress value={60}
|
|
50
|
-
<Progress value={value}
|
|
48
|
+
<Progress value={30} variant="linear" intent="primary" />
|
|
49
|
+
<Progress value={60} variant="linear" intent="success" />
|
|
50
|
+
<Progress value={value} variant="circular" size="lg" showLabel />
|
|
51
51
|
</View>`,
|
|
52
52
|
"with-icons": `import { Progress, View, Text } from '@idealyst/components';
|
|
53
53
|
|
|
@@ -107,7 +107,7 @@ function Example() {
|
|
|
107
107
|
{options.map((option) => (
|
|
108
108
|
<Card
|
|
109
109
|
key={option.value}
|
|
110
|
-
|
|
110
|
+
type={shipping === option.value ? 'outlined' : 'elevated'}
|
|
111
111
|
padding="sm"
|
|
112
112
|
clickable
|
|
113
113
|
onPress={() => setShipping(option.value)}
|
|
@@ -10,7 +10,7 @@ export const Select = {
|
|
|
10
10
|
- \`error\`: boolean - Whether the select shows an error state
|
|
11
11
|
- \`helperText\`: string - Helper text to display below the select
|
|
12
12
|
- \`label\`: string - Label text to display above the select
|
|
13
|
-
- \`intent\`: SelectIntentVariant - The
|
|
13
|
+
- \`intent\`: SelectIntentVariant - The intent/color scheme of the select
|
|
14
14
|
- \`size\`: SelectSizeVariant - The size of the select
|
|
15
15
|
- \`margin\`: Size - Margin on all sides ('xs' | 'sm' | 'md' | 'lg' | 'xl')
|
|
16
16
|
- \`marginVertical\`: Size - Top and bottom margin
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"framework-guides.d.ts","sourceRoot":"","sources":["../../src/data/framework-guides.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"framework-guides.d.ts","sourceRoot":"","sources":["../../src/data/framework-guides.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CA0sDlD,CAAC"}
|
|
@@ -120,24 +120,36 @@ Idealyst provides a comprehensive library of cross-platform React components org
|
|
|
120
120
|
- **Icon**: MDI icon with theming
|
|
121
121
|
- **Skeleton**: Loading placeholder
|
|
122
122
|
- **Alert**: Notification message
|
|
123
|
+
- **Accordion**: Collapsible content sections
|
|
124
|
+
- **Image**: Cross-platform image component
|
|
125
|
+
- **SVGImage**: SVG image renderer
|
|
126
|
+
- **Video**: Video player component
|
|
123
127
|
|
|
124
128
|
### Navigation Components
|
|
125
129
|
- **Tabs**: Tab navigation
|
|
126
130
|
- **TabBar**: Bottom tab bar
|
|
127
131
|
- **Breadcrumb**: Breadcrumb navigation
|
|
128
132
|
- **Menu**: Dropdown menu
|
|
133
|
+
- **MenuItem**: Individual menu item
|
|
129
134
|
- **List**: Vertical list with sections
|
|
135
|
+
- **ListItem**: Individual list item
|
|
136
|
+
- **Link**: Navigation link component
|
|
130
137
|
|
|
131
138
|
### Overlay Components
|
|
132
139
|
- **Dialog**: Modal dialog
|
|
133
140
|
- **Popover**: Contextual overlay
|
|
134
141
|
- **Tooltip**: Hover tooltip
|
|
135
142
|
|
|
143
|
+
### Feedback Components
|
|
144
|
+
- **Progress**: Progress indicator (linear/circular)
|
|
145
|
+
- **ActivityIndicator**: Loading spinner
|
|
146
|
+
|
|
136
147
|
### Data Components
|
|
137
148
|
- **Table**: Data table with sorting and filtering
|
|
138
149
|
- **DataGrid**: Advanced data grid
|
|
139
150
|
- **DatePicker**: Date selection component
|
|
140
|
-
- **
|
|
151
|
+
- **TimePicker**: Time selection component
|
|
152
|
+
- **DateTimePicker**: Combined date and time picker
|
|
141
153
|
|
|
142
154
|
## Common Props
|
|
143
155
|
|
|
@@ -154,11 +166,12 @@ Components support intent-based colors:
|
|
|
154
166
|
- \`error\`: Destructive actions
|
|
155
167
|
- \`warning\`: Caution actions
|
|
156
168
|
|
|
157
|
-
###
|
|
158
|
-
Many components offer visual
|
|
159
|
-
-
|
|
160
|
-
-
|
|
161
|
-
-
|
|
169
|
+
### Type/Variant Props
|
|
170
|
+
Many components offer visual type or variant options:
|
|
171
|
+
- Button \`type\`: \`contained\`, \`outlined\`, \`text\`
|
|
172
|
+
- Card \`type\`: \`default\`, \`outlined\`, \`elevated\`, \`filled\`
|
|
173
|
+
- Chip \`type\`: \`filled\`, \`outlined\`, \`soft\`
|
|
174
|
+
- Progress \`variant\`: \`linear\`, \`circular\`
|
|
162
175
|
|
|
163
176
|
### Sizes
|
|
164
177
|
Most components support size variants:
|
|
@@ -173,8 +186,9 @@ Components with icon support accept:
|
|
|
173
186
|
|
|
174
187
|
Example:
|
|
175
188
|
\`\`\`tsx
|
|
176
|
-
<Button
|
|
177
|
-
<Button
|
|
189
|
+
<Button leftIcon="check">Save</Button>
|
|
190
|
+
<Button leftIcon={<CustomIcon />}>Save</Button>
|
|
191
|
+
<Button rightIcon="arrow-right">Next</Button>
|
|
178
192
|
\`\`\`
|
|
179
193
|
|
|
180
194
|
## Theming
|
|
@@ -438,32 +452,30 @@ idealyst create <name> --type <type> [options]
|
|
|
438
452
|
**Options:**
|
|
439
453
|
- \`--type <type>\`: Package type (required)
|
|
440
454
|
- \`web\`: React web app with Vite
|
|
441
|
-
- \`
|
|
455
|
+
- \`mobile\`: React Native mobile app
|
|
442
456
|
- \`api\`: tRPC API server
|
|
443
|
-
- \`database\`: Prisma database layer
|
|
444
457
|
- \`shared\`: Shared utilities library
|
|
445
|
-
- \`--app-name <name>\`: Display name for
|
|
446
|
-
- \`--with-trpc\`: Include tRPC setup (web/
|
|
447
|
-
- \`--no-trpc\`: Exclude tRPC setup (web/
|
|
458
|
+
- \`--app-name <name>\`: Display name for mobile apps (required for mobile)
|
|
459
|
+
- \`--with-trpc\`: Include tRPC setup (web/mobile)
|
|
460
|
+
- \`--no-trpc\`: Exclude tRPC setup (web/mobile)
|
|
448
461
|
|
|
449
462
|
**Examples:**
|
|
450
463
|
\`\`\`bash
|
|
451
464
|
# Web app
|
|
452
465
|
idealyst create web --type web --with-trpc
|
|
453
466
|
|
|
454
|
-
#
|
|
455
|
-
idealyst create mobile --type
|
|
467
|
+
# Mobile app
|
|
468
|
+
idealyst create mobile --type mobile --app-name "My App" --with-trpc
|
|
456
469
|
|
|
457
470
|
# API server
|
|
458
471
|
idealyst create api --type api
|
|
459
472
|
|
|
460
|
-
# Database
|
|
461
|
-
idealyst create database --type database
|
|
462
|
-
|
|
463
473
|
# Shared library
|
|
464
474
|
idealyst create shared --type shared
|
|
465
475
|
\`\`\`
|
|
466
476
|
|
|
477
|
+
**Note:** The database package is automatically created during workspace initialization. Use the \`init\` command to create a new workspace with all packages including database.
|
|
478
|
+
|
|
467
479
|
## Package Types
|
|
468
480
|
|
|
469
481
|
### Web Package
|
|
@@ -474,7 +486,7 @@ idealyst create shared --type shared
|
|
|
474
486
|
- @idealyst/components
|
|
475
487
|
- @idealyst/theme
|
|
476
488
|
|
|
477
|
-
###
|
|
489
|
+
### Mobile Package
|
|
478
490
|
- React Native 0.80
|
|
479
491
|
- TypeScript
|
|
480
492
|
- React Navigation
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"framework-guides.js","sourceRoot":"","sources":["../../src/data/framework-guides.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,eAAe,GAA2B;IACrD,sCAAsC,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqI1C;CACA,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"navigation-guides.d.ts","sourceRoot":"","sources":["../../src/data/navigation-guides.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"navigation-guides.d.ts","sourceRoot":"","sources":["../../src/data/navigation-guides.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAsqDnD,CAAC"}
|
|
@@ -56,18 +56,18 @@ function App() {
|
|
|
56
56
|
|
|
57
57
|
### Quick Start with Examples
|
|
58
58
|
|
|
59
|
-
Use pre-built example
|
|
59
|
+
Use the pre-built example router for instant working navigation:
|
|
60
60
|
|
|
61
61
|
\`\`\`tsx
|
|
62
|
-
import {
|
|
62
|
+
import { ExampleNavigationRouter } from '@idealyst/navigation/examples';
|
|
63
63
|
|
|
64
|
-
<NavigatorProvider route={
|
|
64
|
+
<NavigatorProvider route={ExampleNavigationRouter} />
|
|
65
65
|
\`\`\`
|
|
66
66
|
|
|
67
|
-
|
|
68
|
-
-
|
|
69
|
-
-
|
|
70
|
-
-
|
|
67
|
+
The example router demonstrates:
|
|
68
|
+
- Stack-based navigation structure
|
|
69
|
+
- Custom web layouts with header and sidebar
|
|
70
|
+
- Tab navigation for nested sections
|
|
71
71
|
|
|
72
72
|
## Platform Differences
|
|
73
73
|
|
|
@@ -161,8 +161,10 @@ navigator.navigate({
|
|
|
161
161
|
});
|
|
162
162
|
|
|
163
163
|
// Access in component:
|
|
164
|
-
|
|
165
|
-
|
|
164
|
+
import { useParams } from '@idealyst/navigation';
|
|
165
|
+
|
|
166
|
+
const params = useParams();
|
|
167
|
+
const userId = params.id;
|
|
166
168
|
\`\`\`
|
|
167
169
|
|
|
168
170
|
### Optional Parameters
|
|
@@ -922,25 +924,68 @@ navigator.navigate({ path: '/new-location', replace: true });
|
|
|
922
924
|
- URL canonicalization/normalization
|
|
923
925
|
- Redirect from deprecated routes
|
|
924
926
|
|
|
925
|
-
|
|
927
|
+
## useParams Hook
|
|
926
928
|
|
|
927
|
-
Access current route
|
|
929
|
+
Access current route path parameters:
|
|
928
930
|
|
|
929
931
|
\`\`\`tsx
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
932
|
+
import { useParams } from '@idealyst/navigation';
|
|
933
|
+
|
|
934
|
+
function UserScreen() {
|
|
935
|
+
const params = useParams();
|
|
936
|
+
const userId = params.id; // Path param from /user/:id
|
|
937
|
+
|
|
938
|
+
return <Text>User ID: {userId}</Text>;
|
|
939
|
+
}
|
|
933
940
|
\`\`\`
|
|
934
941
|
|
|
935
|
-
|
|
942
|
+
## useNavigationState Hook
|
|
936
943
|
|
|
937
|
-
|
|
944
|
+
Access navigation state passed via the \`state\` property:
|
|
938
945
|
|
|
939
946
|
\`\`\`tsx
|
|
940
|
-
|
|
941
|
-
const path = navigator.currentPath;
|
|
947
|
+
import { useNavigationState } from '@idealyst/navigation';
|
|
942
948
|
|
|
943
|
-
|
|
949
|
+
// When navigating:
|
|
950
|
+
navigator.navigate({
|
|
951
|
+
path: '/recording',
|
|
952
|
+
state: { autostart: true, source: 'home' }
|
|
953
|
+
});
|
|
954
|
+
|
|
955
|
+
// In destination screen:
|
|
956
|
+
function RecordingScreen() {
|
|
957
|
+
const { autostart, source } = useNavigationState<{
|
|
958
|
+
autostart?: boolean;
|
|
959
|
+
source?: string;
|
|
960
|
+
}>();
|
|
961
|
+
|
|
962
|
+
// autostart = true, source = 'home'
|
|
963
|
+
}
|
|
964
|
+
\`\`\`
|
|
965
|
+
|
|
966
|
+
### Consuming State (Web)
|
|
967
|
+
|
|
968
|
+
Remove state from URL after reading:
|
|
969
|
+
|
|
970
|
+
\`\`\`tsx
|
|
971
|
+
// URL: /recording?autostart=true
|
|
972
|
+
const { autostart } = useNavigationState<{ autostart?: boolean }>({
|
|
973
|
+
consume: ['autostart']
|
|
974
|
+
});
|
|
975
|
+
// autostart = true, URL becomes: /recording (param removed)
|
|
976
|
+
\`\`\`
|
|
977
|
+
|
|
978
|
+
## useLocation (React Router)
|
|
979
|
+
|
|
980
|
+
Get the current route path on web:
|
|
981
|
+
|
|
982
|
+
\`\`\`tsx
|
|
983
|
+
import { useLocation } from '@idealyst/navigation';
|
|
984
|
+
|
|
985
|
+
function MyComponent() {
|
|
986
|
+
const location = useLocation();
|
|
987
|
+
console.log(location.pathname); // "/user/123"
|
|
988
|
+
}
|
|
944
989
|
\`\`\`
|
|
945
990
|
|
|
946
991
|
### navigator.canGoBack()
|
|
@@ -992,9 +1037,11 @@ In route configuration:
|
|
|
992
1037
|
|
|
993
1038
|
In the screen component:
|
|
994
1039
|
\`\`\`tsx
|
|
1040
|
+
import { useParams } from '@idealyst/navigation';
|
|
1041
|
+
|
|
995
1042
|
function UserScreen() {
|
|
996
|
-
const
|
|
997
|
-
const userId =
|
|
1043
|
+
const params = useParams();
|
|
1044
|
+
const userId = params.id;
|
|
998
1045
|
|
|
999
1046
|
return <Text>User ID: {userId}</Text>;
|
|
1000
1047
|
}
|
|
@@ -1003,6 +1050,8 @@ function UserScreen() {
|
|
|
1003
1050
|
### Multiple Parameters
|
|
1004
1051
|
|
|
1005
1052
|
\`\`\`tsx
|
|
1053
|
+
import { useParams } from '@idealyst/navigation';
|
|
1054
|
+
|
|
1006
1055
|
// Route: "post/:postId/comment/:commentId"
|
|
1007
1056
|
|
|
1008
1057
|
// Navigate:
|
|
@@ -1012,8 +1061,9 @@ navigator.navigate({
|
|
|
1012
1061
|
});
|
|
1013
1062
|
|
|
1014
1063
|
// Access:
|
|
1015
|
-
const
|
|
1016
|
-
const
|
|
1064
|
+
const params = useParams();
|
|
1065
|
+
const postId = params.postId;
|
|
1066
|
+
const commentId = params.commentId;
|
|
1017
1067
|
\`\`\`
|
|
1018
1068
|
|
|
1019
1069
|
## Query Parameters
|
|
@@ -1036,12 +1086,15 @@ navigator.navigate({
|
|
|
1036
1086
|
### Reading Query Params
|
|
1037
1087
|
|
|
1038
1088
|
\`\`\`tsx
|
|
1039
|
-
|
|
1040
|
-
const navigator = useNavigator();
|
|
1089
|
+
import { useNavigationState } from '@idealyst/navigation';
|
|
1041
1090
|
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
const sort =
|
|
1091
|
+
function SearchScreen() {
|
|
1092
|
+
// Query params are accessed via useNavigationState on web
|
|
1093
|
+
const { q, category, sort } = useNavigationState<{
|
|
1094
|
+
q?: string;
|
|
1095
|
+
category?: string;
|
|
1096
|
+
sort?: string;
|
|
1097
|
+
}>();
|
|
1045
1098
|
|
|
1046
1099
|
// Use params...
|
|
1047
1100
|
}
|
|
@@ -1086,8 +1139,8 @@ Pass data through navigation:
|
|
|
1086
1139
|
|
|
1087
1140
|
// Detail screen
|
|
1088
1141
|
function ProductScreen() {
|
|
1089
|
-
const
|
|
1090
|
-
const productId =
|
|
1142
|
+
const params = useParams();
|
|
1143
|
+
const productId = params.id;
|
|
1091
1144
|
|
|
1092
1145
|
const product = useProduct(productId);
|
|
1093
1146
|
// Render product...
|
|
@@ -1118,15 +1171,18 @@ function ProtectedScreen() {
|
|
|
1118
1171
|
### Navigation Guards
|
|
1119
1172
|
|
|
1120
1173
|
\`\`\`tsx
|
|
1174
|
+
import { useNavigator, useLocation } from '@idealyst/navigation';
|
|
1175
|
+
|
|
1121
1176
|
function useAuthGuard() {
|
|
1122
|
-
const
|
|
1177
|
+
const { navigate } = useNavigator();
|
|
1178
|
+
const location = useLocation();
|
|
1123
1179
|
const { isAuthenticated } = useAuth();
|
|
1124
1180
|
|
|
1125
1181
|
useEffect(() => {
|
|
1126
|
-
if (!isAuthenticated &&
|
|
1127
|
-
|
|
1182
|
+
if (!isAuthenticated && location.pathname !== '/login') {
|
|
1183
|
+
navigate({ path: '/login' });
|
|
1128
1184
|
}
|
|
1129
|
-
}, [isAuthenticated,
|
|
1185
|
+
}, [isAuthenticated, location.pathname]);
|
|
1130
1186
|
}
|
|
1131
1187
|
|
|
1132
1188
|
function App() {
|
|
@@ -1161,13 +1217,15 @@ useEffect(() => {
|
|
|
1161
1217
|
Track navigation history:
|
|
1162
1218
|
|
|
1163
1219
|
\`\`\`tsx
|
|
1220
|
+
import { useLocation } from '@idealyst/navigation';
|
|
1221
|
+
|
|
1164
1222
|
function useNavigationHistory() {
|
|
1165
|
-
const
|
|
1223
|
+
const location = useLocation();
|
|
1166
1224
|
const [history, setHistory] = useState<string[]>([]);
|
|
1167
1225
|
|
|
1168
1226
|
useEffect(() => {
|
|
1169
|
-
setHistory(prev => [...prev,
|
|
1170
|
-
}, [
|
|
1227
|
+
setHistory(prev => [...prev, location.pathname]);
|
|
1228
|
+
}, [location.pathname]);
|
|
1171
1229
|
|
|
1172
1230
|
return history;
|
|
1173
1231
|
}
|
|
@@ -1243,19 +1301,28 @@ const { canGoBack, goBack } = useNavigator();
|
|
|
1243
1301
|
### Tab Navigation
|
|
1244
1302
|
|
|
1245
1303
|
\`\`\`tsx
|
|
1304
|
+
import { useNavigator, useLocation } from '@idealyst/navigation';
|
|
1305
|
+
|
|
1246
1306
|
const tabs = ['feed', 'search', 'profile'];
|
|
1247
1307
|
|
|
1248
|
-
|
|
1249
|
-
{
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1308
|
+
function TabBar() {
|
|
1309
|
+
const { navigate } = useNavigator();
|
|
1310
|
+
const location = useLocation();
|
|
1311
|
+
|
|
1312
|
+
return (
|
|
1313
|
+
<View>
|
|
1314
|
+
{tabs.map(tab => (
|
|
1315
|
+
<Button
|
|
1316
|
+
key={tab}
|
|
1317
|
+
onPress={() => navigate({ path: \`/\${tab}\` })}
|
|
1318
|
+
type={location.pathname === \`/\${tab}\` ? 'contained' : 'outlined'}
|
|
1319
|
+
>
|
|
1320
|
+
{tab}
|
|
1321
|
+
</Button>
|
|
1322
|
+
))}
|
|
1323
|
+
</View>
|
|
1324
|
+
);
|
|
1325
|
+
}
|
|
1259
1326
|
\`\`\`
|
|
1260
1327
|
|
|
1261
1328
|
### Modal Navigation
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"navigation-guides.js","sourceRoot":"","sources":["../../src/data/navigation-guides.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,gBAAgB,GAA2B;IACtD,gCAAgC,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4FnC;IAEC,2CAA2C,EAAE
|
|
1
|
+
{"version":3,"file":"navigation-guides.js","sourceRoot":"","sources":["../../src/data/navigation-guides.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,gBAAgB,GAA2B;IACtD,gCAAgC,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4FnC;IAEC,2CAA2C,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwO9C;IAEC,uCAAuC,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+VjD;CACA,CAAC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Idealyst Framework Package Registry
|
|
3
|
+
* Central metadata for all @idealyst packages
|
|
4
|
+
*/
|
|
5
|
+
export interface PackageInfo {
|
|
6
|
+
name: string;
|
|
7
|
+
npmName: string;
|
|
8
|
+
description: string;
|
|
9
|
+
category: "core" | "ui" | "media" | "data" | "auth" | "utility" | "tooling";
|
|
10
|
+
platforms: ("web" | "native" | "node")[];
|
|
11
|
+
documentationStatus: "full" | "partial" | "minimal";
|
|
12
|
+
installation: string;
|
|
13
|
+
peerDependencies?: string[];
|
|
14
|
+
features: string[];
|
|
15
|
+
quickStart: string;
|
|
16
|
+
apiHighlights?: string[];
|
|
17
|
+
relatedPackages?: string[];
|
|
18
|
+
}
|
|
19
|
+
export declare const packages: Record<string, PackageInfo>;
|
|
20
|
+
/**
|
|
21
|
+
* Get all packages grouped by category
|
|
22
|
+
*/
|
|
23
|
+
export declare function getPackagesByCategory(): Record<string, PackageInfo[]>;
|
|
24
|
+
/**
|
|
25
|
+
* Get a summary list of all packages
|
|
26
|
+
*/
|
|
27
|
+
export declare function getPackageSummary(): Array<{
|
|
28
|
+
name: string;
|
|
29
|
+
npmName: string;
|
|
30
|
+
category: string;
|
|
31
|
+
description: string;
|
|
32
|
+
platforms: string[];
|
|
33
|
+
documentationStatus: string;
|
|
34
|
+
}>;
|
|
35
|
+
/**
|
|
36
|
+
* Search packages by query
|
|
37
|
+
*/
|
|
38
|
+
export declare function searchPackages(query: string): PackageInfo[];
|
|
39
|
+
//# sourceMappingURL=packages.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"packages.d.ts","sourceRoot":"","sources":["../../src/data/packages.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,GAAG,IAAI,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,SAAS,GAAG,SAAS,CAAC;IAC5E,SAAS,EAAE,CAAC,KAAK,GAAG,QAAQ,GAAG,MAAM,CAAC,EAAE,CAAC;IACzC,mBAAmB,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS,CAAC;IACpD,YAAY,EAAE,MAAM,CAAC;IACrB,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC5B,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;IACzB,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;CAC5B;AAED,eAAO,MAAM,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAshBhD,CAAC;AAEF;;GAEG;AACH,wBAAgB,qBAAqB,IAAI,MAAM,CAAC,MAAM,EAAE,WAAW,EAAE,CAAC,CAWrE;AAED;;GAEG;AACH,wBAAgB,iBAAiB,IAAI,KAAK,CAAC;IACzC,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,mBAAmB,EAAE,MAAM,CAAC;CAC7B,CAAC,CASD;AAED;;GAEG;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