@flipova/foundation 1.9.0 → 1.10.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/CHANGELOG.md +26 -0
- package/README.md +64 -1
- package/dist/{chunk-3PYMFFVP.mjs → chunk-32VWREEH.mjs} +2289 -7
- package/dist/chunk-32VWREEH.mjs.map +1 -0
- package/dist/{chunk-5ZDSYOFL.js → chunk-3RJREGCN.js} +2604 -309
- package/dist/chunk-3RJREGCN.js.map +1 -0
- package/dist/{chunk-MWRMHYW2.js → chunk-D4QJYQOK.js} +17 -17
- package/dist/{chunk-MWRMHYW2.js.map → chunk-D4QJYQOK.js.map} +1 -1
- package/dist/{chunk-GZPFYWMA.mjs → chunk-IKVONTJC.mjs} +10 -3
- package/dist/chunk-IKVONTJC.mjs.map +1 -0
- package/dist/{chunk-RRZSROIT.mjs → chunk-RRV2Q4SS.mjs} +3 -3
- package/dist/{chunk-RRZSROIT.mjs.map → chunk-RRV2Q4SS.mjs.map} +1 -1
- package/dist/chunk-RUZBEFDO.js +669 -0
- package/dist/{chunk-T7V6TILB.js.map → chunk-RUZBEFDO.js.map} +1 -1
- package/dist/{chunk-45NSZH5Z.js → chunk-UBZMVSIN.js} +10 -2
- package/dist/chunk-UBZMVSIN.js.map +1 -0
- package/dist/{chunk-SYHGZT2M.mjs → chunk-YTD4AWV2.mjs} +4 -4
- package/dist/{chunk-SYHGZT2M.mjs.map → chunk-YTD4AWV2.mjs.map} +1 -1
- package/dist/config/index.js +6 -6
- package/dist/config/index.mjs +1 -1
- package/dist/index.d.mts +1 -2
- package/dist/index.d.ts +1 -2
- package/dist/index.js +200 -201
- package/dist/index.mjs +4 -5
- package/dist/layout/index.d.mts +192 -3
- package/dist/layout/index.d.ts +192 -3
- package/dist/layout/index.js +159 -160
- package/dist/layout/index.mjs +1 -2
- package/dist/studio-v2/cli/index.js +96 -0
- package/dist/theme/index.js +14 -14
- package/dist/theme/index.mjs +1 -1
- package/dist/tokens/index.js +14 -14
- package/dist/tokens/index.mjs +1 -1
- package/dist/web/index.js +3639 -363
- package/dist/web/index.js.map +1 -1
- package/dist/web/index.mjs +3463 -61
- package/dist/web/index.mjs.map +1 -1
- package/package.json +15 -8
- package/studio-v2/apps/web/CHANGELOG.md +7 -0
- package/studio-v2/apps/web/LICENSE +21 -0
- package/studio-v2/apps/web/README.md +56 -0
- package/studio-v2/apps/web/dist/+not-found.html +793 -0
- package/studio-v2/apps/web/dist/_expo/.routes.json +3 -0
- package/studio-v2/apps/web/dist/_expo/static/css/global-a4717de456877faacb88ee482aa99653.css +1 -0
- package/{studio/app/dist/_expo/static/js/web/entry-77f601f6b9353e7b6e3b18cdbe63ac99.js → studio-v2/apps/web/dist/_expo/static/js/web/entry-5d96588cc8f2ee5c00754cef9ac6481d.js} +3707 -17257
- package/studio-v2/apps/web/dist/_expo/static/js/web/index-470f33f64d8c4f7b8d8da2632b2959c2.js +4 -0
- package/{studio/app/dist/_expo/static/js/web/index-ac88f7a39991e452f0b4323da9aa4367.js → studio-v2/apps/web/dist/_expo/static/js/web/index-f7fcd21ae9d8dacf4c88ea5796614af0.js} +3 -3
- package/studio-v2/apps/web/dist/_sitemap.html +793 -0
- package/studio-v2/apps/web/dist/assets/___node_modules/@react-navigation/drawer/lib/module/views/assets/toggle-drawer-icon.ae74bb20586a731af545e6b00fe14a09.png +0 -0
- package/studio-v2/apps/web/dist/assets/___node_modules/expo-router/assets/react-navigation/elements/back-icon-mask.0a328cd9c1afd0afe8e3b1ec5165b1b4.png +0 -0
- package/studio-v2/apps/web/dist/assets/___node_modules/expo-router/assets/react-navigation/elements/back-icon.35ba0eaec5a4f5ed12ca16fabeae451d.png +0 -0
- package/studio-v2/apps/web/dist/assets/___node_modules/expo-router/assets/react-navigation/elements/clear-icon.c94f6478e7ae0cdd9f15de1fcb9e5e55.png +0 -0
- package/studio-v2/apps/web/dist/assets/___node_modules/expo-router/assets/react-navigation/elements/clear-icon.c94f6478e7ae0cdd9f15de1fcb9e5e55@2x.png +0 -0
- package/studio-v2/apps/web/dist/assets/___node_modules/expo-router/assets/react-navigation/elements/clear-icon.c94f6478e7ae0cdd9f15de1fcb9e5e55@3x.png +0 -0
- package/studio-v2/apps/web/dist/assets/___node_modules/expo-router/assets/react-navigation/elements/clear-icon.c94f6478e7ae0cdd9f15de1fcb9e5e55@4x.png +0 -0
- package/studio-v2/apps/web/dist/assets/___node_modules/expo-router/assets/react-navigation/elements/close-icon.808e1b1b9b53114ec2838071a7e6daa7.png +0 -0
- package/studio-v2/apps/web/dist/assets/___node_modules/expo-router/assets/react-navigation/elements/close-icon.808e1b1b9b53114ec2838071a7e6daa7@2x.png +0 -0
- package/studio-v2/apps/web/dist/assets/___node_modules/expo-router/assets/react-navigation/elements/close-icon.808e1b1b9b53114ec2838071a7e6daa7@3x.png +0 -0
- package/studio-v2/apps/web/dist/assets/___node_modules/expo-router/assets/react-navigation/elements/close-icon.808e1b1b9b53114ec2838071a7e6daa7@4x.png +0 -0
- package/studio-v2/apps/web/dist/assets/___node_modules/expo-router/assets/react-navigation/elements/search-icon.286d67d3f74808a60a78d3ebf1a5fb57.png +0 -0
- package/studio-v2/apps/web/dist/index.html +793 -0
- package/dist/chunk-3PYMFFVP.mjs.map +0 -1
- package/dist/chunk-45NSZH5Z.js.map +0 -1
- package/dist/chunk-4QTEZKXE.mjs +0 -2287
- package/dist/chunk-4QTEZKXE.mjs.map +0 -1
- package/dist/chunk-5ZDSYOFL.js.map +0 -1
- package/dist/chunk-BJTO5JO5.mjs +0 -10
- package/dist/chunk-BJTO5JO5.mjs.map +0 -1
- package/dist/chunk-DGUM43GV.js +0 -12
- package/dist/chunk-DGUM43GV.js.map +0 -1
- package/dist/chunk-ECBM426M.mjs +0 -2647
- package/dist/chunk-ECBM426M.mjs.map +0 -1
- package/dist/chunk-EIWDEXBO.js +0 -2690
- package/dist/chunk-EIWDEXBO.js.map +0 -1
- package/dist/chunk-FLEEJX7L.js +0 -2301
- package/dist/chunk-FLEEJX7L.js.map +0 -1
- package/dist/chunk-GZPFYWMA.mjs.map +0 -1
- package/dist/chunk-T7V6TILB.js +0 -669
- package/dist/primitives-DVX2q5St.d.mts +0 -195
- package/dist/primitives-nj-4at-g.d.ts +0 -195
- package/dist/studio/cli/index.d.mts +0 -1
- package/dist/studio/cli/index.d.ts +0 -1
- package/dist/studio/cli/index.js +0 -42
- package/dist/studio/cli/index.js.map +0 -1
- package/dist/studio/cli/index.mjs +0 -35
- package/dist/studio/cli/index.mjs.map +0 -1
- package/dist/studio/index.d.mts +0 -441
- package/dist/studio/index.d.ts +0 -441
- package/dist/studio/index.js +0 -84
- package/dist/studio/index.js.map +0 -1
- package/dist/studio/index.mjs +0 -3
- package/dist/studio/index.mjs.map +0 -1
- package/dist/web/index.d.mts +0 -778
- package/dist/web/index.d.ts +0 -778
- package/studio/README.md +0 -154
- package/studio/app/dist/_expo/static/js/web/index-9587ee2e3c02826ac2da47e86fefe882.js +0 -4
- package/studio/app/dist/index.html +0 -37
- package/studio/app/dist/metadata.json +0 -1
- /package/{studio/app/dist/assets/__node_modules → studio-v2/apps/web/dist/assets/___node_modules}/@expo/vector-icons/build/vendor/react-native-vector-icons/Fonts/AntDesign.3f78af31cca60105799838a1a7a59fbd.ttf +0 -0
- /package/{studio/app/dist/assets/__node_modules → studio-v2/apps/web/dist/assets/___node_modules}/@expo/vector-icons/build/vendor/react-native-vector-icons/Fonts/Entypo.31b5ffea3daddc69dd01a1f3d6cf63c5.ttf +0 -0
- /package/{studio/app/dist/assets/__node_modules → studio-v2/apps/web/dist/assets/___node_modules}/@expo/vector-icons/build/vendor/react-native-vector-icons/Fonts/EvilIcons.140c53a7643ea949007aa9a282153849.ttf +0 -0
- /package/{studio/app/dist/assets/__node_modules → studio-v2/apps/web/dist/assets/___node_modules}/@expo/vector-icons/build/vendor/react-native-vector-icons/Fonts/Feather.ca4b48e04dc1ce10bfbddb262c8b835f.ttf +0 -0
- /package/{studio/app/dist/assets/__node_modules → studio-v2/apps/web/dist/assets/___node_modules}/@expo/vector-icons/build/vendor/react-native-vector-icons/Fonts/FontAwesome.b06871f281fee6b241d60582ae9369b9.ttf +0 -0
- /package/{studio/app/dist/assets/__node_modules → studio-v2/apps/web/dist/assets/___node_modules}/@expo/vector-icons/build/vendor/react-native-vector-icons/Fonts/FontAwesome5_Brands.3b89dd103490708d19a95adcae52210e.ttf +0 -0
- /package/{studio/app/dist/assets/__node_modules → studio-v2/apps/web/dist/assets/___node_modules}/@expo/vector-icons/build/vendor/react-native-vector-icons/Fonts/FontAwesome5_Regular.1f77739ca9ff2188b539c36f30ffa2be.ttf +0 -0
- /package/{studio/app/dist/assets/__node_modules → studio-v2/apps/web/dist/assets/___node_modules}/@expo/vector-icons/build/vendor/react-native-vector-icons/Fonts/FontAwesome5_Solid.605ed7926cf39a2ad5ec2d1f9d391d3d.ttf +0 -0
- /package/{studio/app/dist/assets/__node_modules → studio-v2/apps/web/dist/assets/___node_modules}/@expo/vector-icons/build/vendor/react-native-vector-icons/Fonts/FontAwesome6_Brands.56c8d80832e37783f12c05db7c8849e2.ttf +0 -0
- /package/{studio/app/dist/assets/__node_modules → studio-v2/apps/web/dist/assets/___node_modules}/@expo/vector-icons/build/vendor/react-native-vector-icons/Fonts/FontAwesome6_Regular.370dd5af19f8364907b6e2c41f45dbbf.ttf +0 -0
- /package/{studio/app/dist/assets/__node_modules → studio-v2/apps/web/dist/assets/___node_modules}/@expo/vector-icons/build/vendor/react-native-vector-icons/Fonts/FontAwesome6_Solid.adec7d6f310bc577f05e8fe06a5daccf.ttf +0 -0
- /package/{studio/app/dist/assets/__node_modules → studio-v2/apps/web/dist/assets/___node_modules}/@expo/vector-icons/build/vendor/react-native-vector-icons/Fonts/Fontisto.b49ae8ab2dbccb02c4d11caaacf09eab.ttf +0 -0
- /package/{studio/app/dist/assets/__node_modules → studio-v2/apps/web/dist/assets/___node_modules}/@expo/vector-icons/build/vendor/react-native-vector-icons/Fonts/Foundation.e20945d7c929279ef7a6f1db184a4470.ttf +0 -0
- /package/{studio/app/dist/assets/__node_modules → studio-v2/apps/web/dist/assets/___node_modules}/@expo/vector-icons/build/vendor/react-native-vector-icons/Fonts/Ionicons.b4eb097d35f44ed943676fd56f6bdc51.ttf +0 -0
- /package/{studio/app/dist/assets/__node_modules → studio-v2/apps/web/dist/assets/___node_modules}/@expo/vector-icons/build/vendor/react-native-vector-icons/Fonts/MaterialCommunityIcons.6e435534bd35da5fef04168860a9b8fa.ttf +0 -0
- /package/{studio/app/dist/assets/__node_modules → studio-v2/apps/web/dist/assets/___node_modules}/@expo/vector-icons/build/vendor/react-native-vector-icons/Fonts/MaterialIcons.4e85bc9ebe07e0340c9c4fc2f6c38908.ttf +0 -0
- /package/{studio/app/dist/assets/__node_modules → studio-v2/apps/web/dist/assets/___node_modules}/@expo/vector-icons/build/vendor/react-native-vector-icons/Fonts/Octicons.871378c6eab492a3e689a9385dc45a12.ttf +0 -0
- /package/{studio/app/dist/assets/__node_modules → studio-v2/apps/web/dist/assets/___node_modules}/@expo/vector-icons/build/vendor/react-native-vector-icons/Fonts/SimpleLineIcons.d2285965fe34b05465047401b8595dd0.ttf +0 -0
- /package/{studio/app/dist/assets/__node_modules → studio-v2/apps/web/dist/assets/___node_modules}/@expo/vector-icons/build/vendor/react-native-vector-icons/Fonts/Zocial.1681f34aaca71b8dfb70756bca331eb2.ttf +0 -0
- /package/{studio/app/dist/assets/__node_modules/expo-router/assets/react-navigation/elements → studio-v2/apps/web/dist/assets/___node_modules/@react-navigation/elements/lib/module/assets}/back-icon-mask.0a328cd9c1afd0afe8e3b1ec5165b1b4.png +0 -0
- /package/{studio/app/dist/assets/__node_modules/expo-router/assets/react-navigation/elements → studio-v2/apps/web/dist/assets/___node_modules/@react-navigation/elements/lib/module/assets}/back-icon.35ba0eaec5a4f5ed12ca16fabeae451d.png +0 -0
- /package/{studio/app/dist/assets/__node_modules/expo-router/assets/react-navigation/elements → studio-v2/apps/web/dist/assets/___node_modules/@react-navigation/elements/lib/module/assets}/clear-icon.c94f6478e7ae0cdd9f15de1fcb9e5e55.png +0 -0
- /package/{studio/app/dist/assets/__node_modules/expo-router/assets/react-navigation/elements → studio-v2/apps/web/dist/assets/___node_modules/@react-navigation/elements/lib/module/assets}/clear-icon.c94f6478e7ae0cdd9f15de1fcb9e5e55@2x.png +0 -0
- /package/{studio/app/dist/assets/__node_modules/expo-router/assets/react-navigation/elements → studio-v2/apps/web/dist/assets/___node_modules/@react-navigation/elements/lib/module/assets}/clear-icon.c94f6478e7ae0cdd9f15de1fcb9e5e55@3x.png +0 -0
- /package/{studio/app/dist/assets/__node_modules/expo-router/assets/react-navigation/elements → studio-v2/apps/web/dist/assets/___node_modules/@react-navigation/elements/lib/module/assets}/clear-icon.c94f6478e7ae0cdd9f15de1fcb9e5e55@4x.png +0 -0
- /package/{studio/app/dist/assets/__node_modules/expo-router/assets/react-navigation/elements → studio-v2/apps/web/dist/assets/___node_modules/@react-navigation/elements/lib/module/assets}/close-icon.808e1b1b9b53114ec2838071a7e6daa7.png +0 -0
- /package/{studio/app/dist/assets/__node_modules/expo-router/assets/react-navigation/elements → studio-v2/apps/web/dist/assets/___node_modules/@react-navigation/elements/lib/module/assets}/close-icon.808e1b1b9b53114ec2838071a7e6daa7@2x.png +0 -0
- /package/{studio/app/dist/assets/__node_modules/expo-router/assets/react-navigation/elements → studio-v2/apps/web/dist/assets/___node_modules/@react-navigation/elements/lib/module/assets}/close-icon.808e1b1b9b53114ec2838071a7e6daa7@3x.png +0 -0
- /package/{studio/app/dist/assets/__node_modules/expo-router/assets/react-navigation/elements → studio-v2/apps/web/dist/assets/___node_modules/@react-navigation/elements/lib/module/assets}/close-icon.808e1b1b9b53114ec2838071a7e6daa7@4x.png +0 -0
- /package/{studio/app/dist/assets/__node_modules/expo-router/assets/react-navigation/elements → studio-v2/apps/web/dist/assets/___node_modules/@react-navigation/elements/lib/module/assets}/search-icon.286d67d3f74808a60a78d3ebf1a5fb57.png +0 -0
- /package/{studio/app/dist/assets/__node_modules → studio-v2/apps/web/dist/assets/___node_modules}/expo-router/assets/arrow_down.017bc6ba3fc25503e5eb5e53826d48a8.png +0 -0
- /package/{studio/app/dist/assets/__node_modules → studio-v2/apps/web/dist/assets/___node_modules}/expo-router/assets/error.d1ea1496f9057eb392d5bbf3732a61b7.png +0 -0
- /package/{studio/app/dist/assets/__node_modules → studio-v2/apps/web/dist/assets/___node_modules}/expo-router/assets/file.19eeb73b9593a38f8e9f418337fc7d10.png +0 -0
- /package/{studio/app/dist/assets/__node_modules → studio-v2/apps/web/dist/assets/___node_modules}/expo-router/assets/forward.d8b800c443b8972542883e0b9de2bdc6.png +0 -0
- /package/{studio/app/dist/assets/__node_modules → studio-v2/apps/web/dist/assets/___node_modules}/expo-router/assets/pkg.ab19f4cbc543357183a20571f68380a3.png +0 -0
- /package/{studio/app/dist/assets/__node_modules → studio-v2/apps/web/dist/assets/___node_modules}/expo-router/assets/sitemap.412dd9275b6b48ad28f5e3d81bb1f626.png +0 -0
- /package/{studio/app/dist/assets/__node_modules → studio-v2/apps/web/dist/assets/___node_modules}/expo-router/assets/unmatched.20e71bdf79e3a97bf55fd9e164041578.png +0 -0
|
@@ -1,195 +0,0 @@
|
|
|
1
|
-
import { C as ColorScheme } from './index-D4qJw_Et.mjs';
|
|
2
|
-
import { a as SpacingToken } from './spacing-CXUulLF9.mjs';
|
|
3
|
-
|
|
4
|
-
interface LayoutPadding {
|
|
5
|
-
top?: SpacingToken;
|
|
6
|
-
bottom?: SpacingToken;
|
|
7
|
-
left?: SpacingToken;
|
|
8
|
-
right?: SpacingToken;
|
|
9
|
-
horizontal?: SpacingToken;
|
|
10
|
-
vertical?: SpacingToken;
|
|
11
|
-
}
|
|
12
|
-
type LayoutBackground = string | [string, string, ...string[]];
|
|
13
|
-
type ThemeColorRole = Exclude<{
|
|
14
|
-
[K in keyof ColorScheme]: ColorScheme[K] extends string ? K : never;
|
|
15
|
-
}[keyof ColorScheme], undefined>;
|
|
16
|
-
interface SlotDescriptor {
|
|
17
|
-
name: string;
|
|
18
|
-
label: string;
|
|
19
|
-
required: boolean;
|
|
20
|
-
/**
|
|
21
|
-
* kind — explicit slot mode, no heuristic needed.
|
|
22
|
-
*
|
|
23
|
-
* - "children" : standard React children (layout receives `children` prop)
|
|
24
|
-
* - "items" : primary array slot (layout receives `items={[...]}` or named prop)
|
|
25
|
-
* - "named" : single ReactNode passed as a named prop (e.g. `header={<Header />}`)
|
|
26
|
-
* - "named-array" : array of ReactNodes passed as a named prop (e.g. `backContent={[...]}`)
|
|
27
|
-
*
|
|
28
|
-
* Defaults to "children" when omitted for backward compatibility.
|
|
29
|
-
*/
|
|
30
|
-
kind?: "children" | "items" | "named" | "named-array";
|
|
31
|
-
/** @deprecated use `kind: "items"` instead */
|
|
32
|
-
array?: boolean;
|
|
33
|
-
}
|
|
34
|
-
type PropType = "string" | "number" | "boolean" | "spacing" | "radius" | "shadow" | "color" | "background" | "padding" | "enum" | "ratio" | "json";
|
|
35
|
-
interface PropDescriptor<T = unknown> {
|
|
36
|
-
name: string;
|
|
37
|
-
label: string;
|
|
38
|
-
type: PropType;
|
|
39
|
-
default?: T;
|
|
40
|
-
themeDefault?: ThemeColorRole;
|
|
41
|
-
description?: string;
|
|
42
|
-
required?: boolean;
|
|
43
|
-
options?: readonly string[];
|
|
44
|
-
min?: number;
|
|
45
|
-
max?: number;
|
|
46
|
-
group?: "style" | "layout" | "behavior" | "content";
|
|
47
|
-
}
|
|
48
|
-
type LayoutCategory = "page" | "content" | "navigation" | "card" | "scroll" | "special";
|
|
49
|
-
type ComponentCategory = "input" | "action" | "display" | "feedback" | "overlay" | "media" | "navigation";
|
|
50
|
-
type BlockCategory = "auth" | "profile" | "navigation" | "content" | "data" | "feedback" | "form" | "overlay" | "social" | "ecommerce" | "finance" | "onboarding" | "messaging" | "calendar" | "files" | "location" | "media";
|
|
51
|
-
interface SpringConfig {
|
|
52
|
-
damping: number;
|
|
53
|
-
stiffness: number;
|
|
54
|
-
mass?: number;
|
|
55
|
-
overshootClamping?: boolean;
|
|
56
|
-
}
|
|
57
|
-
interface LayoutConstants {
|
|
58
|
-
springConfig?: SpringConfig;
|
|
59
|
-
springSnap?: SpringConfig;
|
|
60
|
-
springNoBounce?: SpringConfig;
|
|
61
|
-
swipeThreshold?: number;
|
|
62
|
-
flipThreshold?: number;
|
|
63
|
-
exitDistance?: number;
|
|
64
|
-
scaleFactor?: number;
|
|
65
|
-
flipScaleFactor?: number;
|
|
66
|
-
dezoomDuration?: number;
|
|
67
|
-
flipDuration?: number;
|
|
68
|
-
slideOutDuration?: number;
|
|
69
|
-
exitLeft?: number;
|
|
70
|
-
exitRight?: number;
|
|
71
|
-
}
|
|
72
|
-
interface VariantDescriptor {
|
|
73
|
-
name: string;
|
|
74
|
-
label: string;
|
|
75
|
-
description?: string;
|
|
76
|
-
overrides: Record<string, unknown>;
|
|
77
|
-
}
|
|
78
|
-
interface BaseMeta {
|
|
79
|
-
id: string;
|
|
80
|
-
label: string;
|
|
81
|
-
description: string;
|
|
82
|
-
props: PropDescriptor[];
|
|
83
|
-
themeMapping?: Record<string, ThemeColorRole>;
|
|
84
|
-
tags: string[];
|
|
85
|
-
}
|
|
86
|
-
interface LayoutMeta extends BaseMeta {
|
|
87
|
-
category: LayoutCategory;
|
|
88
|
-
slots: SlotDescriptor[];
|
|
89
|
-
constants?: LayoutConstants;
|
|
90
|
-
responsive: boolean;
|
|
91
|
-
animated: boolean;
|
|
92
|
-
dependencies?: string[];
|
|
93
|
-
/** Number of placeholder items to show in Studio when the slot is empty (default: 3) */
|
|
94
|
-
previewItemCount?: number;
|
|
95
|
-
/**
|
|
96
|
-
* Platforms this layout is available on.
|
|
97
|
-
* Omit to indicate support for all platforms.
|
|
98
|
-
* @example ["native", "web"]
|
|
99
|
-
*/
|
|
100
|
-
platforms?: ("native" | "web")[];
|
|
101
|
-
}
|
|
102
|
-
interface ComponentMeta extends BaseMeta {
|
|
103
|
-
category: ComponentCategory;
|
|
104
|
-
variants: VariantDescriptor[];
|
|
105
|
-
sizes?: string[];
|
|
106
|
-
/**
|
|
107
|
-
* Platforms this component is available on.
|
|
108
|
-
* Omit to indicate support for all platforms.
|
|
109
|
-
*/
|
|
110
|
-
platforms?: ("native" | "web")[];
|
|
111
|
-
}
|
|
112
|
-
interface BlockMeta extends BaseMeta {
|
|
113
|
-
category: BlockCategory;
|
|
114
|
-
slots: SlotDescriptor[];
|
|
115
|
-
components: string[];
|
|
116
|
-
}
|
|
117
|
-
type AnyMeta = LayoutMeta | ComponentMeta | BlockMeta;
|
|
118
|
-
type DefaultsOf<T extends Record<string, unknown>> = {
|
|
119
|
-
[K in keyof T]?: T[K];
|
|
120
|
-
};
|
|
121
|
-
|
|
122
|
-
/**
|
|
123
|
-
* Helpers to extract and apply defaults and constants from any registry meta.
|
|
124
|
-
* Works with LayoutMeta, ComponentMeta, and BlockMeta.
|
|
125
|
-
*/
|
|
126
|
-
|
|
127
|
-
declare function extractDefaults(meta: AnyMeta): Record<string, unknown>;
|
|
128
|
-
declare function resolveThemeDefaults(meta: AnyMeta, theme: ColorScheme): Record<string, string>;
|
|
129
|
-
declare function applyDefaults<T extends object>(props: T, meta: AnyMeta, theme?: ColorScheme): T;
|
|
130
|
-
declare function applyVariant<T extends object>(props: T, variant: VariantDescriptor): T;
|
|
131
|
-
declare function getConstants(meta: LayoutMeta): LayoutConstants;
|
|
132
|
-
|
|
133
|
-
/**
|
|
134
|
-
* Layout Registry — Définitions complètes
|
|
135
|
-
*
|
|
136
|
-
* Chaque layout est décrit avec ses slots, props configurables,
|
|
137
|
-
* valeurs par défaut, types, groupes et contraintes.
|
|
138
|
-
*/
|
|
139
|
-
|
|
140
|
-
declare function getLayoutMeta(id: string): LayoutMeta | undefined;
|
|
141
|
-
declare const layoutRegistry: LayoutMeta[];
|
|
142
|
-
|
|
143
|
-
/**
|
|
144
|
-
* Component Registry
|
|
145
|
-
*
|
|
146
|
-
* Base UI components: buttons, inputs, badges, avatars, etc.
|
|
147
|
-
* Each component supports variants (e.g. primary/secondary/ghost for buttons)
|
|
148
|
-
* and sizes. Theme-aware via themeDefault on color props.
|
|
149
|
-
*/
|
|
150
|
-
|
|
151
|
-
declare function getComponentMeta(id: string): ComponentMeta | undefined;
|
|
152
|
-
declare const componentRegistry: ComponentMeta[];
|
|
153
|
-
|
|
154
|
-
/**
|
|
155
|
-
* Block Registry
|
|
156
|
-
*
|
|
157
|
-
* Functional blocks that combine primitives and base components.
|
|
158
|
-
* Each block is a higher-level UI pattern (auth form, header bar, avatar group, etc.)
|
|
159
|
-
* with named slots and theme-aware styling.
|
|
160
|
-
*/
|
|
161
|
-
|
|
162
|
-
declare const blockRegistry: BlockMeta[];
|
|
163
|
-
declare function getBlockMeta(id: string): BlockMeta | undefined;
|
|
164
|
-
|
|
165
|
-
/**
|
|
166
|
-
* Primitives Registry
|
|
167
|
-
*
|
|
168
|
-
* Low-level layout primitives available in the studio.
|
|
169
|
-
* These are the building blocks for all layouts and components.
|
|
170
|
-
*/
|
|
171
|
-
interface PrimitiveMeta {
|
|
172
|
-
id: string;
|
|
173
|
-
label: string;
|
|
174
|
-
description: string;
|
|
175
|
-
category: "primitive";
|
|
176
|
-
tags: string[];
|
|
177
|
-
props: {
|
|
178
|
-
name: string;
|
|
179
|
-
label: string;
|
|
180
|
-
type: string;
|
|
181
|
-
group: string;
|
|
182
|
-
default?: any;
|
|
183
|
-
options?: string[];
|
|
184
|
-
description?: string;
|
|
185
|
-
}[];
|
|
186
|
-
slots?: {
|
|
187
|
-
name: string;
|
|
188
|
-
label: string;
|
|
189
|
-
required: boolean;
|
|
190
|
-
}[];
|
|
191
|
-
}
|
|
192
|
-
declare function getPrimitiveMeta(id: string): PrimitiveMeta | undefined;
|
|
193
|
-
declare const primitiveRegistry: PrimitiveMeta[];
|
|
194
|
-
|
|
195
|
-
export { type AnyMeta as A, type BlockCategory as B, type ComponentCategory as C, type DefaultsOf as D, type LayoutBackground as L, type PropDescriptor as P, type SlotDescriptor as S, type ThemeColorRole as T, type VariantDescriptor as V, type BlockMeta as a, type ComponentMeta as b, type LayoutCategory as c, type LayoutConstants as d, type LayoutMeta as e, type LayoutPadding as f, type PropType as g, type SpringConfig as h, applyDefaults as i, applyVariant as j, blockRegistry as k, componentRegistry as l, extractDefaults as m, getBlockMeta as n, getComponentMeta as o, getConstants as p, getLayoutMeta as q, getPrimitiveMeta as r, layoutRegistry as s, primitiveRegistry as t, resolveThemeDefaults as u };
|
|
@@ -1,195 +0,0 @@
|
|
|
1
|
-
import { C as ColorScheme } from './index-D4qJw_Et.js';
|
|
2
|
-
import { a as SpacingToken } from './spacing-CXUulLF9.js';
|
|
3
|
-
|
|
4
|
-
interface LayoutPadding {
|
|
5
|
-
top?: SpacingToken;
|
|
6
|
-
bottom?: SpacingToken;
|
|
7
|
-
left?: SpacingToken;
|
|
8
|
-
right?: SpacingToken;
|
|
9
|
-
horizontal?: SpacingToken;
|
|
10
|
-
vertical?: SpacingToken;
|
|
11
|
-
}
|
|
12
|
-
type LayoutBackground = string | [string, string, ...string[]];
|
|
13
|
-
type ThemeColorRole = Exclude<{
|
|
14
|
-
[K in keyof ColorScheme]: ColorScheme[K] extends string ? K : never;
|
|
15
|
-
}[keyof ColorScheme], undefined>;
|
|
16
|
-
interface SlotDescriptor {
|
|
17
|
-
name: string;
|
|
18
|
-
label: string;
|
|
19
|
-
required: boolean;
|
|
20
|
-
/**
|
|
21
|
-
* kind — explicit slot mode, no heuristic needed.
|
|
22
|
-
*
|
|
23
|
-
* - "children" : standard React children (layout receives `children` prop)
|
|
24
|
-
* - "items" : primary array slot (layout receives `items={[...]}` or named prop)
|
|
25
|
-
* - "named" : single ReactNode passed as a named prop (e.g. `header={<Header />}`)
|
|
26
|
-
* - "named-array" : array of ReactNodes passed as a named prop (e.g. `backContent={[...]}`)
|
|
27
|
-
*
|
|
28
|
-
* Defaults to "children" when omitted for backward compatibility.
|
|
29
|
-
*/
|
|
30
|
-
kind?: "children" | "items" | "named" | "named-array";
|
|
31
|
-
/** @deprecated use `kind: "items"` instead */
|
|
32
|
-
array?: boolean;
|
|
33
|
-
}
|
|
34
|
-
type PropType = "string" | "number" | "boolean" | "spacing" | "radius" | "shadow" | "color" | "background" | "padding" | "enum" | "ratio" | "json";
|
|
35
|
-
interface PropDescriptor<T = unknown> {
|
|
36
|
-
name: string;
|
|
37
|
-
label: string;
|
|
38
|
-
type: PropType;
|
|
39
|
-
default?: T;
|
|
40
|
-
themeDefault?: ThemeColorRole;
|
|
41
|
-
description?: string;
|
|
42
|
-
required?: boolean;
|
|
43
|
-
options?: readonly string[];
|
|
44
|
-
min?: number;
|
|
45
|
-
max?: number;
|
|
46
|
-
group?: "style" | "layout" | "behavior" | "content";
|
|
47
|
-
}
|
|
48
|
-
type LayoutCategory = "page" | "content" | "navigation" | "card" | "scroll" | "special";
|
|
49
|
-
type ComponentCategory = "input" | "action" | "display" | "feedback" | "overlay" | "media" | "navigation";
|
|
50
|
-
type BlockCategory = "auth" | "profile" | "navigation" | "content" | "data" | "feedback" | "form" | "overlay" | "social" | "ecommerce" | "finance" | "onboarding" | "messaging" | "calendar" | "files" | "location" | "media";
|
|
51
|
-
interface SpringConfig {
|
|
52
|
-
damping: number;
|
|
53
|
-
stiffness: number;
|
|
54
|
-
mass?: number;
|
|
55
|
-
overshootClamping?: boolean;
|
|
56
|
-
}
|
|
57
|
-
interface LayoutConstants {
|
|
58
|
-
springConfig?: SpringConfig;
|
|
59
|
-
springSnap?: SpringConfig;
|
|
60
|
-
springNoBounce?: SpringConfig;
|
|
61
|
-
swipeThreshold?: number;
|
|
62
|
-
flipThreshold?: number;
|
|
63
|
-
exitDistance?: number;
|
|
64
|
-
scaleFactor?: number;
|
|
65
|
-
flipScaleFactor?: number;
|
|
66
|
-
dezoomDuration?: number;
|
|
67
|
-
flipDuration?: number;
|
|
68
|
-
slideOutDuration?: number;
|
|
69
|
-
exitLeft?: number;
|
|
70
|
-
exitRight?: number;
|
|
71
|
-
}
|
|
72
|
-
interface VariantDescriptor {
|
|
73
|
-
name: string;
|
|
74
|
-
label: string;
|
|
75
|
-
description?: string;
|
|
76
|
-
overrides: Record<string, unknown>;
|
|
77
|
-
}
|
|
78
|
-
interface BaseMeta {
|
|
79
|
-
id: string;
|
|
80
|
-
label: string;
|
|
81
|
-
description: string;
|
|
82
|
-
props: PropDescriptor[];
|
|
83
|
-
themeMapping?: Record<string, ThemeColorRole>;
|
|
84
|
-
tags: string[];
|
|
85
|
-
}
|
|
86
|
-
interface LayoutMeta extends BaseMeta {
|
|
87
|
-
category: LayoutCategory;
|
|
88
|
-
slots: SlotDescriptor[];
|
|
89
|
-
constants?: LayoutConstants;
|
|
90
|
-
responsive: boolean;
|
|
91
|
-
animated: boolean;
|
|
92
|
-
dependencies?: string[];
|
|
93
|
-
/** Number of placeholder items to show in Studio when the slot is empty (default: 3) */
|
|
94
|
-
previewItemCount?: number;
|
|
95
|
-
/**
|
|
96
|
-
* Platforms this layout is available on.
|
|
97
|
-
* Omit to indicate support for all platforms.
|
|
98
|
-
* @example ["native", "web"]
|
|
99
|
-
*/
|
|
100
|
-
platforms?: ("native" | "web")[];
|
|
101
|
-
}
|
|
102
|
-
interface ComponentMeta extends BaseMeta {
|
|
103
|
-
category: ComponentCategory;
|
|
104
|
-
variants: VariantDescriptor[];
|
|
105
|
-
sizes?: string[];
|
|
106
|
-
/**
|
|
107
|
-
* Platforms this component is available on.
|
|
108
|
-
* Omit to indicate support for all platforms.
|
|
109
|
-
*/
|
|
110
|
-
platforms?: ("native" | "web")[];
|
|
111
|
-
}
|
|
112
|
-
interface BlockMeta extends BaseMeta {
|
|
113
|
-
category: BlockCategory;
|
|
114
|
-
slots: SlotDescriptor[];
|
|
115
|
-
components: string[];
|
|
116
|
-
}
|
|
117
|
-
type AnyMeta = LayoutMeta | ComponentMeta | BlockMeta;
|
|
118
|
-
type DefaultsOf<T extends Record<string, unknown>> = {
|
|
119
|
-
[K in keyof T]?: T[K];
|
|
120
|
-
};
|
|
121
|
-
|
|
122
|
-
/**
|
|
123
|
-
* Helpers to extract and apply defaults and constants from any registry meta.
|
|
124
|
-
* Works with LayoutMeta, ComponentMeta, and BlockMeta.
|
|
125
|
-
*/
|
|
126
|
-
|
|
127
|
-
declare function extractDefaults(meta: AnyMeta): Record<string, unknown>;
|
|
128
|
-
declare function resolveThemeDefaults(meta: AnyMeta, theme: ColorScheme): Record<string, string>;
|
|
129
|
-
declare function applyDefaults<T extends object>(props: T, meta: AnyMeta, theme?: ColorScheme): T;
|
|
130
|
-
declare function applyVariant<T extends object>(props: T, variant: VariantDescriptor): T;
|
|
131
|
-
declare function getConstants(meta: LayoutMeta): LayoutConstants;
|
|
132
|
-
|
|
133
|
-
/**
|
|
134
|
-
* Layout Registry — Définitions complètes
|
|
135
|
-
*
|
|
136
|
-
* Chaque layout est décrit avec ses slots, props configurables,
|
|
137
|
-
* valeurs par défaut, types, groupes et contraintes.
|
|
138
|
-
*/
|
|
139
|
-
|
|
140
|
-
declare function getLayoutMeta(id: string): LayoutMeta | undefined;
|
|
141
|
-
declare const layoutRegistry: LayoutMeta[];
|
|
142
|
-
|
|
143
|
-
/**
|
|
144
|
-
* Component Registry
|
|
145
|
-
*
|
|
146
|
-
* Base UI components: buttons, inputs, badges, avatars, etc.
|
|
147
|
-
* Each component supports variants (e.g. primary/secondary/ghost for buttons)
|
|
148
|
-
* and sizes. Theme-aware via themeDefault on color props.
|
|
149
|
-
*/
|
|
150
|
-
|
|
151
|
-
declare function getComponentMeta(id: string): ComponentMeta | undefined;
|
|
152
|
-
declare const componentRegistry: ComponentMeta[];
|
|
153
|
-
|
|
154
|
-
/**
|
|
155
|
-
* Block Registry
|
|
156
|
-
*
|
|
157
|
-
* Functional blocks that combine primitives and base components.
|
|
158
|
-
* Each block is a higher-level UI pattern (auth form, header bar, avatar group, etc.)
|
|
159
|
-
* with named slots and theme-aware styling.
|
|
160
|
-
*/
|
|
161
|
-
|
|
162
|
-
declare const blockRegistry: BlockMeta[];
|
|
163
|
-
declare function getBlockMeta(id: string): BlockMeta | undefined;
|
|
164
|
-
|
|
165
|
-
/**
|
|
166
|
-
* Primitives Registry
|
|
167
|
-
*
|
|
168
|
-
* Low-level layout primitives available in the studio.
|
|
169
|
-
* These are the building blocks for all layouts and components.
|
|
170
|
-
*/
|
|
171
|
-
interface PrimitiveMeta {
|
|
172
|
-
id: string;
|
|
173
|
-
label: string;
|
|
174
|
-
description: string;
|
|
175
|
-
category: "primitive";
|
|
176
|
-
tags: string[];
|
|
177
|
-
props: {
|
|
178
|
-
name: string;
|
|
179
|
-
label: string;
|
|
180
|
-
type: string;
|
|
181
|
-
group: string;
|
|
182
|
-
default?: any;
|
|
183
|
-
options?: string[];
|
|
184
|
-
description?: string;
|
|
185
|
-
}[];
|
|
186
|
-
slots?: {
|
|
187
|
-
name: string;
|
|
188
|
-
label: string;
|
|
189
|
-
required: boolean;
|
|
190
|
-
}[];
|
|
191
|
-
}
|
|
192
|
-
declare function getPrimitiveMeta(id: string): PrimitiveMeta | undefined;
|
|
193
|
-
declare const primitiveRegistry: PrimitiveMeta[];
|
|
194
|
-
|
|
195
|
-
export { type AnyMeta as A, type BlockCategory as B, type ComponentCategory as C, type DefaultsOf as D, type LayoutBackground as L, type PropDescriptor as P, type SlotDescriptor as S, type ThemeColorRole as T, type VariantDescriptor as V, type BlockMeta as a, type ComponentMeta as b, type LayoutCategory as c, type LayoutConstants as d, type LayoutMeta as e, type LayoutPadding as f, type PropType as g, type SpringConfig as h, applyDefaults as i, applyVariant as j, blockRegistry as k, componentRegistry as l, extractDefaults as m, getBlockMeta as n, getComponentMeta as o, getConstants as p, getLayoutMeta as q, getPrimitiveMeta as r, layoutRegistry as s, primitiveRegistry as t, resolveThemeDefaults as u };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
package/dist/studio/cli/index.js
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
'use strict';
|
|
3
|
-
|
|
4
|
-
var chunkEIWDEXBO_js = require('../../chunk-EIWDEXBO.js');
|
|
5
|
-
var fs = require('fs');
|
|
6
|
-
var path = require('path');
|
|
7
|
-
|
|
8
|
-
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
9
|
-
|
|
10
|
-
var fs__default = /*#__PURE__*/_interopDefault(fs);
|
|
11
|
-
var path__default = /*#__PURE__*/_interopDefault(path);
|
|
12
|
-
|
|
13
|
-
var args = process.argv.slice(2);
|
|
14
|
-
var portArg = args.indexOf("--port");
|
|
15
|
-
var port = portArg !== -1 ? parseInt(args[portArg + 1], 10) : 4200;
|
|
16
|
-
if (args.includes("generate")) {
|
|
17
|
-
const studioDir = path__default.default.join(process.cwd(), ".flipova-studio");
|
|
18
|
-
const projectFile = path__default.default.join(studioDir, "project.json");
|
|
19
|
-
if (!fs__default.default.existsSync(projectFile)) {
|
|
20
|
-
console.error("No project found. Run `flipova-studio` first.");
|
|
21
|
-
process.exit(1);
|
|
22
|
-
}
|
|
23
|
-
const project = JSON.parse(fs__default.default.readFileSync(projectFile, "utf-8"));
|
|
24
|
-
const { files } = chunkEIWDEXBO_js.generateProject(project);
|
|
25
|
-
const outputDir = path__default.default.join(process.cwd(), "generated");
|
|
26
|
-
for (const file of files) {
|
|
27
|
-
const filePath = path__default.default.join(outputDir, file.path);
|
|
28
|
-
fs__default.default.mkdirSync(path__default.default.dirname(filePath), { recursive: true });
|
|
29
|
-
fs__default.default.writeFileSync(filePath, file.content);
|
|
30
|
-
}
|
|
31
|
-
console.log(`
|
|
32
|
-
\u2713 Generated ${files.length} files in ./generated/
|
|
33
|
-
`);
|
|
34
|
-
process.exit(0);
|
|
35
|
-
}
|
|
36
|
-
console.log(`
|
|
37
|
-
\u2726 Flipova Studio`);
|
|
38
|
-
console.log(` http://localhost:${port}
|
|
39
|
-
`);
|
|
40
|
-
chunkEIWDEXBO_js.startServer({ port });
|
|
41
|
-
//# sourceMappingURL=index.js.map
|
|
42
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../studio/cli/index.ts"],"names":["path","fs","generateProject","startServer"],"mappings":";;;;;;;;;;;;AAgBA,IAAM,IAAA,GAAO,OAAA,CAAQ,IAAA,CAAK,KAAA,CAAM,CAAC,CAAA;AACjC,IAAM,OAAA,GAAU,IAAA,CAAK,OAAA,CAAQ,QAAQ,CAAA;AACrC,IAAM,IAAA,GAAO,YAAY,EAAA,GAAK,QAAA,CAAS,KAAK,OAAA,GAAU,CAAC,CAAA,EAAG,EAAE,CAAA,GAAI,IAAA;AAEhE,IAAI,IAAA,CAAK,QAAA,CAAS,UAAU,CAAA,EAAG;AAC7B,EAAA,MAAM,YAAYA,qBAAA,CAAK,IAAA,CAAK,OAAA,CAAQ,GAAA,IAAO,iBAAiB,CAAA;AAC5D,EAAA,MAAM,WAAA,GAAcA,qBAAA,CAAK,IAAA,CAAK,SAAA,EAAW,cAAc,CAAA;AACvD,EAAA,IAAI,CAACC,mBAAA,CAAG,UAAA,CAAW,WAAW,CAAA,EAAG;AAAE,IAAA,OAAA,CAAQ,MAAM,+CAA+C,CAAA;AAAG,IAAA,OAAA,CAAQ,KAAK,CAAC,CAAA;AAAA,EAAG;AACpH,EAAA,MAAM,UAAU,IAAA,CAAK,KAAA,CAAMA,oBAAG,YAAA,CAAa,WAAA,EAAa,OAAO,CAAC,CAAA;AAChE,EAAA,MAAM,EAAE,KAAA,EAAM,GAAIC,gCAAA,CAAgB,OAAO,CAAA;AACzC,EAAA,MAAM,YAAYF,qBAAA,CAAK,IAAA,CAAK,OAAA,CAAQ,GAAA,IAAO,WAAW,CAAA;AACtD,EAAA,KAAA,MAAW,QAAQ,KAAA,EAAO;AACxB,IAAA,MAAM,QAAA,GAAWA,qBAAA,CAAK,IAAA,CAAK,SAAA,EAAW,KAAK,IAAI,CAAA;AAC/C,IAAAC,mBAAA,CAAG,SAAA,CAAUD,sBAAK,OAAA,CAAQ,QAAQ,GAAG,EAAE,SAAA,EAAW,MAAM,CAAA;AACxD,IAAAC,mBAAA,CAAG,aAAA,CAAc,QAAA,EAAU,IAAA,CAAK,OAAO,CAAA;AAAA,EACzC;AACA,EAAA,OAAA,CAAQ,GAAA,CAAI;AAAA,mBAAA,EAAmB,MAAM,MAAM,CAAA;AAAA,CAA0B,CAAA;AACrE,EAAA,OAAA,CAAQ,KAAK,CAAC,CAAA;AAChB;AAEA,OAAA,CAAQ,GAAA,CAAI;AAAA,uBAAA,CAAsB,CAAA;AAClC,OAAA,CAAQ,GAAA,CAAI,sBAAsB,IAAI;AAAA,CAAI,CAAA;AAC1CE,4BAAA,CAAY,EAAE,MAAM,CAAA","file":"index.js","sourcesContent":["#!/usr/bin/env node\n\n/**\n * Flipova Studio CLI\n *\n * Usage:\n * npx flipova-studio Start the builder (serves pre-built UI)\n * npx flipova-studio --port 3000 Start on a custom port\n * npx flipova-studio generate Generate code from the saved project\n */\n\nimport fs from \"fs\";\nimport path from \"path\";\nimport { startServer } from \"../server\";\nimport { generateProject } from \"../engine/codegen\";\n\nconst args = process.argv.slice(2);\nconst portArg = args.indexOf(\"--port\");\nconst port = portArg !== -1 ? parseInt(args[portArg + 1], 10) : 4200;\n\nif (args.includes(\"generate\")) {\n const studioDir = path.join(process.cwd(), \".flipova-studio\");\n const projectFile = path.join(studioDir, \"project.json\");\n if (!fs.existsSync(projectFile)) { console.error(\"No project found. Run `flipova-studio` first.\"); process.exit(1); }\n const project = JSON.parse(fs.readFileSync(projectFile, \"utf-8\"));\n const { files } = generateProject(project);\n const outputDir = path.join(process.cwd(), \"generated\");\n for (const file of files) {\n const filePath = path.join(outputDir, file.path);\n fs.mkdirSync(path.dirname(filePath), { recursive: true });\n fs.writeFileSync(filePath, file.content);\n }\n console.log(`\\n ✓ Generated ${files.length} files in ./generated/\\n`);\n process.exit(0);\n}\n\nconsole.log(`\\n ✦ Flipova Studio`);\nconsole.log(` http://localhost:${port}\\n`);\nstartServer({ port });\n"]}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import { generateProject, startServer } from '../../chunk-ECBM426M.mjs';
|
|
3
|
-
import fs from 'fs';
|
|
4
|
-
import path from 'path';
|
|
5
|
-
|
|
6
|
-
var args = process.argv.slice(2);
|
|
7
|
-
var portArg = args.indexOf("--port");
|
|
8
|
-
var port = portArg !== -1 ? parseInt(args[portArg + 1], 10) : 4200;
|
|
9
|
-
if (args.includes("generate")) {
|
|
10
|
-
const studioDir = path.join(process.cwd(), ".flipova-studio");
|
|
11
|
-
const projectFile = path.join(studioDir, "project.json");
|
|
12
|
-
if (!fs.existsSync(projectFile)) {
|
|
13
|
-
console.error("No project found. Run `flipova-studio` first.");
|
|
14
|
-
process.exit(1);
|
|
15
|
-
}
|
|
16
|
-
const project = JSON.parse(fs.readFileSync(projectFile, "utf-8"));
|
|
17
|
-
const { files } = generateProject(project);
|
|
18
|
-
const outputDir = path.join(process.cwd(), "generated");
|
|
19
|
-
for (const file of files) {
|
|
20
|
-
const filePath = path.join(outputDir, file.path);
|
|
21
|
-
fs.mkdirSync(path.dirname(filePath), { recursive: true });
|
|
22
|
-
fs.writeFileSync(filePath, file.content);
|
|
23
|
-
}
|
|
24
|
-
console.log(`
|
|
25
|
-
\u2713 Generated ${files.length} files in ./generated/
|
|
26
|
-
`);
|
|
27
|
-
process.exit(0);
|
|
28
|
-
}
|
|
29
|
-
console.log(`
|
|
30
|
-
\u2726 Flipova Studio`);
|
|
31
|
-
console.log(` http://localhost:${port}
|
|
32
|
-
`);
|
|
33
|
-
startServer({ port });
|
|
34
|
-
//# sourceMappingURL=index.mjs.map
|
|
35
|
-
//# sourceMappingURL=index.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../studio/cli/index.ts"],"names":[],"mappings":";;;;;AAgBA,IAAM,IAAA,GAAO,OAAA,CAAQ,IAAA,CAAK,KAAA,CAAM,CAAC,CAAA;AACjC,IAAM,OAAA,GAAU,IAAA,CAAK,OAAA,CAAQ,QAAQ,CAAA;AACrC,IAAM,IAAA,GAAO,YAAY,EAAA,GAAK,QAAA,CAAS,KAAK,OAAA,GAAU,CAAC,CAAA,EAAG,EAAE,CAAA,GAAI,IAAA;AAEhE,IAAI,IAAA,CAAK,QAAA,CAAS,UAAU,CAAA,EAAG;AAC7B,EAAA,MAAM,YAAY,IAAA,CAAK,IAAA,CAAK,OAAA,CAAQ,GAAA,IAAO,iBAAiB,CAAA;AAC5D,EAAA,MAAM,WAAA,GAAc,IAAA,CAAK,IAAA,CAAK,SAAA,EAAW,cAAc,CAAA;AACvD,EAAA,IAAI,CAAC,EAAA,CAAG,UAAA,CAAW,WAAW,CAAA,EAAG;AAAE,IAAA,OAAA,CAAQ,MAAM,+CAA+C,CAAA;AAAG,IAAA,OAAA,CAAQ,KAAK,CAAC,CAAA;AAAA,EAAG;AACpH,EAAA,MAAM,UAAU,IAAA,CAAK,KAAA,CAAM,GAAG,YAAA,CAAa,WAAA,EAAa,OAAO,CAAC,CAAA;AAChE,EAAA,MAAM,EAAE,KAAA,EAAM,GAAI,eAAA,CAAgB,OAAO,CAAA;AACzC,EAAA,MAAM,YAAY,IAAA,CAAK,IAAA,CAAK,OAAA,CAAQ,GAAA,IAAO,WAAW,CAAA;AACtD,EAAA,KAAA,MAAW,QAAQ,KAAA,EAAO;AACxB,IAAA,MAAM,QAAA,GAAW,IAAA,CAAK,IAAA,CAAK,SAAA,EAAW,KAAK,IAAI,CAAA;AAC/C,IAAA,EAAA,CAAG,SAAA,CAAU,KAAK,OAAA,CAAQ,QAAQ,GAAG,EAAE,SAAA,EAAW,MAAM,CAAA;AACxD,IAAA,EAAA,CAAG,aAAA,CAAc,QAAA,EAAU,IAAA,CAAK,OAAO,CAAA;AAAA,EACzC;AACA,EAAA,OAAA,CAAQ,GAAA,CAAI;AAAA,mBAAA,EAAmB,MAAM,MAAM,CAAA;AAAA,CAA0B,CAAA;AACrE,EAAA,OAAA,CAAQ,KAAK,CAAC,CAAA;AAChB;AAEA,OAAA,CAAQ,GAAA,CAAI;AAAA,uBAAA,CAAsB,CAAA;AAClC,OAAA,CAAQ,GAAA,CAAI,sBAAsB,IAAI;AAAA,CAAI,CAAA;AAC1C,WAAA,CAAY,EAAE,MAAM,CAAA","file":"index.mjs","sourcesContent":["#!/usr/bin/env node\n\n/**\n * Flipova Studio CLI\n *\n * Usage:\n * npx flipova-studio Start the builder (serves pre-built UI)\n * npx flipova-studio --port 3000 Start on a custom port\n * npx flipova-studio generate Generate code from the saved project\n */\n\nimport fs from \"fs\";\nimport path from \"path\";\nimport { startServer } from \"../server\";\nimport { generateProject } from \"../engine/codegen\";\n\nconst args = process.argv.slice(2);\nconst portArg = args.indexOf(\"--port\");\nconst port = portArg !== -1 ? parseInt(args[portArg + 1], 10) : 4200;\n\nif (args.includes(\"generate\")) {\n const studioDir = path.join(process.cwd(), \".flipova-studio\");\n const projectFile = path.join(studioDir, \"project.json\");\n if (!fs.existsSync(projectFile)) { console.error(\"No project found. Run `flipova-studio` first.\"); process.exit(1); }\n const project = JSON.parse(fs.readFileSync(projectFile, \"utf-8\"));\n const { files } = generateProject(project);\n const outputDir = path.join(process.cwd(), \"generated\");\n for (const file of files) {\n const filePath = path.join(outputDir, file.path);\n fs.mkdirSync(path.dirname(filePath), { recursive: true });\n fs.writeFileSync(filePath, file.content);\n }\n console.log(`\\n ✓ Generated ${files.length} files in ./generated/\\n`);\n process.exit(0);\n}\n\nconsole.log(`\\n ✦ Flipova Studio`);\nconsole.log(` http://localhost:${port}\\n`);\nstartServer({ port });\n"]}
|