@fias/arche-sdk 1.6.1 → 1.8.1
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/bridge.d.ts.map +1 -1
- package/dist/bridge.js +10 -0
- package/dist/bridge.js.map +1 -1
- package/dist/hooks.d.ts +24 -11
- package/dist/hooks.d.ts.map +1 -1
- package/dist/hooks.js +157 -35
- package/dist/hooks.js.map +1 -1
- package/dist/hooks.test.js +197 -98
- package/dist/hooks.test.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.mjs +104 -21
- package/dist/theme.d.ts +1 -1
- package/dist/theme.js +1 -1
- package/dist/themes/fonts.d.ts +1 -1
- package/dist/themes/fonts.js +1 -1
- package/dist/themes/index.d.ts +1 -1
- package/dist/themes/index.js +1 -1
- package/dist/types.d.ts +20 -1
- package/dist/types.d.ts.map +1 -1
- package/package.json +2 -4
- package/templates/default/AGENTS.md +114 -8
- package/templates/default/CLAUDE.md +114 -8
- package/templates/multi-step/README.md +13 -0
- package/templates/multi-step/fias-plugin.json +11 -0
- package/templates/multi-step/index.html +12 -0
- package/templates/multi-step/package.json +26 -0
- package/templates/multi-step/src/App.tsx +38 -0
- package/templates/multi-step/src/context/AppContext.tsx +36 -0
- package/templates/multi-step/src/index.tsx +12 -0
- package/templates/multi-step/src/steps/step-one/StepOne.tsx +43 -0
- package/templates/multi-step/src/steps/step-two/StepTwo.tsx +40 -0
- package/templates/multi-step/tsconfig.json +17 -0
- package/templates/multi-step/vite.config.ts +18 -0
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { useFiasTheme } from '@fias/arche-sdk';
|
|
2
|
+
import { useAppContext } from '../../context/AppContext';
|
|
3
|
+
|
|
4
|
+
export function StepTwo() {
|
|
5
|
+
const theme = useFiasTheme();
|
|
6
|
+
const { notes, setCurrentStep } = useAppContext();
|
|
7
|
+
|
|
8
|
+
if (!theme) return null;
|
|
9
|
+
|
|
10
|
+
return (
|
|
11
|
+
<div>
|
|
12
|
+
<h1 style={{ fontFamily: theme.fonts.heading }}>Step 2 — Review</h1>
|
|
13
|
+
<pre
|
|
14
|
+
style={{
|
|
15
|
+
padding: theme.spacing.md,
|
|
16
|
+
backgroundColor: theme.colors.surface,
|
|
17
|
+
color: theme.colors.text,
|
|
18
|
+
borderRadius: theme.components.cardRadius,
|
|
19
|
+
whiteSpace: 'pre-wrap',
|
|
20
|
+
}}
|
|
21
|
+
>
|
|
22
|
+
{notes}
|
|
23
|
+
</pre>
|
|
24
|
+
<button
|
|
25
|
+
onClick={() => setCurrentStep('step-one')}
|
|
26
|
+
style={{
|
|
27
|
+
marginTop: theme.spacing.md,
|
|
28
|
+
padding: `${theme.spacing.sm} ${theme.spacing.lg}`,
|
|
29
|
+
backgroundColor: theme.colors.surface,
|
|
30
|
+
color: theme.colors.text,
|
|
31
|
+
border: `${theme.components.borderWidth} solid ${theme.colors.border}`,
|
|
32
|
+
borderRadius: theme.components.buttonRadius,
|
|
33
|
+
cursor: 'pointer',
|
|
34
|
+
}}
|
|
35
|
+
>
|
|
36
|
+
Back
|
|
37
|
+
</button>
|
|
38
|
+
</div>
|
|
39
|
+
);
|
|
40
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2020",
|
|
4
|
+
"module": "ESNext",
|
|
5
|
+
"moduleResolution": "bundler",
|
|
6
|
+
"lib": ["ES2020", "DOM", "DOM.Iterable"],
|
|
7
|
+
"jsx": "react-jsx",
|
|
8
|
+
"strict": true,
|
|
9
|
+
"esModuleInterop": true,
|
|
10
|
+
"skipLibCheck": true,
|
|
11
|
+
"forceConsistentCasingInFileNames": true,
|
|
12
|
+
"resolveJsonModule": true,
|
|
13
|
+
"isolatedModules": true,
|
|
14
|
+
"noEmit": true
|
|
15
|
+
},
|
|
16
|
+
"include": ["src"]
|
|
17
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { defineConfig } from 'vite';
|
|
2
|
+
import react from '@vitejs/plugin-react';
|
|
3
|
+
|
|
4
|
+
export default defineConfig({
|
|
5
|
+
plugins: [react()],
|
|
6
|
+
build: {
|
|
7
|
+
outDir: 'dist',
|
|
8
|
+
rollupOptions: {
|
|
9
|
+
input: 'index.html',
|
|
10
|
+
},
|
|
11
|
+
},
|
|
12
|
+
server: {
|
|
13
|
+
port: 3100,
|
|
14
|
+
cors: true,
|
|
15
|
+
headers: { 'Access-Control-Allow-Origin': '*' },
|
|
16
|
+
hmr: { host: 'localhost' },
|
|
17
|
+
},
|
|
18
|
+
});
|