@medway-ui/native 1.8.1 → 1.9.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.
Files changed (35) hide show
  1. package/README.md +18 -9
  2. package/lib/commonjs/components/Button.js +1 -1
  3. package/lib/commonjs/components/Button.js.map +1 -1
  4. package/lib/commonjs/components/Input.js +128 -29
  5. package/lib/commonjs/components/Input.js.map +1 -1
  6. package/lib/commonjs/components/Switch.js +5 -2
  7. package/lib/commonjs/components/Switch.js.map +1 -1
  8. package/lib/commonjs/editor/editorHtml.generated.js +3 -3
  9. package/lib/commonjs/editor/index.js.map +1 -1
  10. package/lib/module/components/Button.js +1 -1
  11. package/lib/module/components/Button.js.map +1 -1
  12. package/lib/module/components/Input.js +130 -31
  13. package/lib/module/components/Input.js.map +1 -1
  14. package/lib/module/components/Switch.js +5 -2
  15. package/lib/module/components/Switch.js.map +1 -1
  16. package/lib/module/editor/editorHtml.generated.js +3 -3
  17. package/lib/module/editor/index.js.map +1 -1
  18. package/lib/typescript/components/Input.d.ts +5 -1
  19. package/lib/typescript/components/Input.d.ts.map +1 -1
  20. package/lib/typescript/components/Switch.d.ts +3 -1
  21. package/lib/typescript/components/Switch.d.ts.map +1 -1
  22. package/lib/typescript/editor/editorHtml.generated.d.ts +3 -3
  23. package/lib/typescript/editor/index.d.ts +2 -1
  24. package/lib/typescript/editor/index.d.ts.map +1 -1
  25. package/package.json +11 -23
  26. package/setup/MedwayUiProvider.tsx +30 -8
  27. package/setup/babel-brownfield.js +14 -34
  28. package/setup/metro.js +6 -67
  29. package/setup/monorepo.js +102 -0
  30. package/setup/tailwind.js +5 -6
  31. package/src/components/Button.tsx +1 -1
  32. package/src/components/Input.tsx +147 -26
  33. package/src/components/Switch.tsx +6 -6
  34. package/src/editor/editorHtml.generated.ts +3 -3
  35. package/src/editor/index.ts +2 -4
@@ -1 +1 @@
1
- {"version":3,"names":["default","NoteEditor","EDITOR_PROTOCOL_VERSION","EDITOR_RECEIVE_HANDLER","isEditorMessage"],"sourceRoot":"../../../src","sources":["editor/index.ts"],"mappings":";;AAAA,SAASA,OAAO,IAAIC,UAAU,QAAQ,cAAc;AAIpD,SACEC,uBAAuB,EACvBC,sBAAsB,EACtBC,eAAe,QACV,YAAY","ignoreList":[]}
1
+ {"version":3,"names":["default","NoteEditor","EDITOR_PROTOCOL_VERSION","EDITOR_RECEIVE_HANDLER","isEditorMessage"],"sourceRoot":"../../../src","sources":["editor/index.ts"],"mappings":";;AAAA,SAASA,OAAO,IAAIC,UAAU,QAAQ,cAAc;AAKpD,SACEC,uBAAuB,EACvBC,sBAAsB,EACtBC,eAAe,QACV,YAAY","ignoreList":[]}
@@ -32,6 +32,10 @@ export interface InputLabelProps {
32
32
  children?: ReactNode;
33
33
  floated?: boolean;
34
34
  disabled?: boolean;
35
+ invalid?: boolean;
36
+ size?: VariantProps<typeof inputVariants>["size"];
37
+ hasStartIcon?: boolean;
38
+ hasEndIcon?: boolean;
35
39
  }
36
40
  export interface InputTextProps extends TextComponentProps {
37
41
  invalid?: boolean;
@@ -44,7 +48,7 @@ declare const inputVariants: (props?: ({
44
48
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
45
49
  declare function InputWrapper({ className, ...props }: ViewProps): import("react").JSX.Element;
46
50
  declare function InputField({ className, ...props }: ViewProps): import("react").JSX.Element;
47
- declare function InputLabel({ children, floated, disabled }: InputLabelProps): import("react").JSX.Element;
51
+ declare function InputLabel(props: InputLabelProps): import("react").JSX.Element;
48
52
  declare function InputText({ invalid, className, ...props }: InputTextProps): import("react").JSX.Element;
49
53
  declare function InputAdornment({ className, ...props }: ViewProps): import("react").JSX.Element;
50
54
  declare function InputStartIcon({ className, ...props }: ViewProps): import("react").JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"Input.d.ts","sourceRoot":"","sources":["../../../src/components/Input.tsx"],"names":[],"mappings":"AAAA,OAAO,EAKL,KAAK,YAAY,EACjB,KAAK,SAAS,EACf,MAAM,OAA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,aAAa,CAAC,EACrB,SAAS,EACT,IAAW,EACX,OAAe,EACf,KAAK,EACL,KAAK,EACL,YAAY,EACZ,OAAO,EACP,MAAM,EACN,YAAY,EACZ,GAAG,KAAK,EACT,EAAE,kBAAkB,+BAwDpB;AAED,iBAAS,YAAY,CAAC,EACpB,SAAS,EACT,IAAW,EACX,OAAe,EACf,QAAQ,EACR,GAAG,EACH,KAAK,EACL,YAAY,EACZ,YAAY,EACZ,QAAe,EACf,aAAqB,EACrB,KAAK,EACL,OAAO,EACP,MAAM,EACN,GAAG,KAAK,EACT,EAAE,iBAAiB,+BA4FnB;AAgFD,iBAAS,KAAK,CAAC,EACb,SAAS,EACT,IAAa,EACb,IAAW,EACX,OAAe,EACf,QAAQ,EACR,SAAS,EACT,KAAK,EACL,KAAK,EACL,YAAY,EACZ,QAAe,EACf,OAAO,EACP,MAAM,EACN,YAAY,EACZ,GAAG,KAAK,EACT,EAAE,UAAU,+BAwDZ;AAED,OAAO,EACL,KAAK,EACL,cAAc,EACd,kBAAkB,EAClB,YAAY,EACZ,UAAU,EACV,UAAU,EACV,YAAY,EACZ,aAAa,EACb,cAAc,EACd,SAAS,EACT,YAAY,EACZ,aAAa,GACd,CAAC"}
1
+ {"version":3,"file":"Input.d.ts","sourceRoot":"","sources":["../../../src/components/Input.tsx"],"names":[],"mappings":"AAAA,OAAO,EAML,KAAK,YAAY,EACjB,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAEf,OAAO,EAML,KAAK,cAAc,EACnB,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AAStB,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AASlE,OAAO,EAAQ,KAAK,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAMlE,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,GAAG,UAAU,CAAC;AAElE,KAAK,WAAW,GAAG,YAAY,CAAC;IAC9B,KAAK,CAAC,EAAE,MAAM,CA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T,IAAW,EACX,OAAe,EACf,QAAQ,EACR,GAAG,EACH,KAAK,EACL,YAAY,EACZ,YAAY,EACZ,QAAe,EACf,aAAqB,EACrB,KAAK,EACL,OAAO,EACP,MAAM,EACN,GAAG,KAAK,EACT,EAAE,iBAAiB,+BAyGnB;AA6FD,iBAAS,KAAK,CAAC,EACb,SAAS,EACT,IAAa,EACb,IAAW,EACX,OAAe,EACf,QAAQ,EACR,SAAS,EACT,KAAK,EACL,KAAK,EACL,YAAY,EACZ,QAAe,EACf,OAAO,EACP,MAAM,EACN,YAAY,EACZ,GAAG,KAAK,EACT,EAAE,UAAU,+BAwDZ;AAED,OAAO,EACL,KAAK,EACL,cAAc,EACd,kBAAkB,EAClB,YAAY,EACZ,UAAU,EACV,UAAU,EACV,YAAY,EACZ,aAAa,EACb,cAAc,EACd,SAAS,EACT,YAAY,EACZ,aAAa,GACd,CAAC"}
@@ -1,11 +1,13 @@
1
1
  import { type ReactNode } from "react";
2
+ import { type StyleProp, type ViewStyle } from "react-native";
2
3
  import * as SwitchPrimitive from "@rn-primitives/switch";
3
4
  import { type VariantProps } from "class-variance-authority";
4
5
  declare const switchVariants: (props?: ({
5
6
  variant?: "regular" | null | undefined;
6
7
  size?: "sm" | "md" | "lg" | null | undefined;
7
8
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
8
- interface SwitchProps extends Omit<SwitchPrimitive.RootProps, "checked" | "onCheckedChange" | "children">, VariantProps<typeof switchVariants> {
9
+ interface SwitchProps extends Omit<SwitchPrimitive.RootProps, "checked" | "onCheckedChange" | "children" | "style">, VariantProps<typeof switchVariants> {
10
+ style?: StyleProp<ViewStyle>;
9
11
  checked?: boolean;
10
12
  defaultChecked?: boolean;
11
13
  onCheckedChange?: (checked: boolean) => void;
@@ -1 +1 @@
1
- {"version":3,"file":"Switch.d.ts","sourceRoot":"","sources":["../../../src/components/Switch.tsx"],"names":[],"mappings":"AAAA,OAAO,EASL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;A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AC;IACzB,eAAe,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IAC7C,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,aAAa,CAAC,EAAE,SAAS,CAAC;CAC3B;AAoDD,QAAA,MAAM,MAAM,mDAwLV,CAAC;AAEH,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,CAAC;AAClC,YAAY,EAAE,WAAW,EAAE,CAAC"}
@@ -4,10 +4,10 @@
4
4
  * Single-file build of the Tiptap editor that runs inside the WebView rendered
5
5
  * by `@medway-ui/native/NoteEditor`. Regenerate with:
6
6
  *
7
- * cd editor-bundle && npm install && npm run build
7
+ * pnpm build:editor-bundle
8
8
  *
9
- * Source lives in `editor-bundle/src`. The bridge protocol it speaks is defined
10
- * in `../native/src/editor/protocol.ts`, which both sides compile against.
9
+ * Source lives in `packages/editor-bundle/src`. The bridge protocol it speaks is defined
10
+ * in `packages/native/src/editor/protocol.ts`, which both sides compile against.
11
11
  */
12
12
  export declare const EDITOR_HTML: string;
13
13
  //# sourceMappingURL=editorHtml.generated.d.ts.map
@@ -1,6 +1,7 @@
1
1
  export { default as NoteEditor } from "./NoteEditor";
2
2
  export type { NoteEditorHandle } from "./NoteEditor";
3
+ export type { EditorDocument } from "@medway-ui/notes-core";
3
4
  export type { WebViewMessageEvent } from "react-native-webview";
4
5
  export { EDITOR_PROTOCOL_VERSION, EDITOR_RECEIVE_HANDLER, isEditorMessage, } from "./protocol";
5
- export type { EditorToNativeMessage, NativeToEditorMessage, } from "./protocol";
6
+ export type { EditorToNativeMessage, NativeToEditorMessage } from "./protocol";
6
7
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/editor/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,cAAc,CAAC;AACrD,YAAY,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AACrD,YAAY,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAEhE,OAAO,EACL,uBAAuB,EACvB,sBAAsB,EACtB,eAAe,GAChB,MAAM,YAAY,CAAC;AACpB,YAAY,EACV,qBAAqB,EACrB,qBAAqB,GACtB,MAAM,YAAY,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/editor/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,cAAc,CAAC;AACrD,YAAY,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AACrD,YAAY,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAC5D,YAAY,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAEhE,OAAO,EACL,uBAAuB,EACvB,sBAAsB,EACtB,eAAe,GAChB,MAAM,YAAY,CAAC;AACpB,YAAY,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@medway-ui/native",
3
- "version": "1.8.1",
3
+ "version": "1.9.0",
4
4
  "description": "Medway UI components for React Native (iOS/Android via Expo)",
5
5
  "author": "Alekcarvalho",
6
6
  "license": "MIT",
@@ -49,16 +49,8 @@
49
49
  "./setup/MedwayUiProvider.tsx",
50
50
  "./setup/global.css"
51
51
  ],
52
- "scripts": {
53
- "prebuild:lib": "npm --prefix .. run build:notes-core",
54
- "build:lib": "bob build",
55
- "pretypecheck": "npm --prefix .. run build:notes-core",
56
- "typecheck": "tsc --noEmit",
57
- "changeset": "changeset",
58
- "version": "changeset version",
59
- "release": "yarn build:lib && changeset publish"
60
- },
61
52
  "dependencies": {
53
+ "@medway-ui/notes-core": "^0.2.1",
62
54
  "@rn-primitives/alert-dialog": "^1.0.0",
63
55
  "@rn-primitives/avatar": "^1.0.0",
64
56
  "@rn-primitives/checkbox": "^1.0.0",
@@ -74,9 +66,8 @@
74
66
  "@rn-primitives/tooltip": "^1.0.0"
75
67
  },
76
68
  "peerDependencies": {
77
- "@medway-ui/core": ">=1.0.0",
69
+ "@medway-ui/core": "^1.0.0",
78
70
  "@medway-ui/icons": "^1.12.0",
79
- "@medway-ui/notes-core": ">=0.2.0",
80
71
  "@react-native-masked-view/masked-view": ">=0.3.0",
81
72
  "@react-navigation/native": ">=6.0.0",
82
73
  "@react-navigation/native-stack": ">=6.0.0",
@@ -105,15 +96,9 @@
105
96
  "@medway-ui/core": {
106
97
  "optional": true
107
98
  },
108
- "@medway-ui/notes-core": {
109
- "optional": true
110
- },
111
99
  "@react-native-masked-view/masked-view": {
112
100
  "optional": true
113
101
  },
114
- "@react-navigation/native-stack": {
115
- "optional": true
116
- },
117
102
  "expo-linear-gradient": {
118
103
  "optional": true
119
104
  },
@@ -125,8 +110,6 @@
125
110
  }
126
111
  },
127
112
  "devDependencies": {
128
- "@changesets/changelog-github": "^0.7.0",
129
- "@changesets/cli": "^2.31.1",
130
113
  "@medway-ui/icons": "^1.12.1",
131
114
  "@react-native-masked-view/masked-view": "^0.3.2",
132
115
  "@react-navigation/native": "^7.3.18",
@@ -144,6 +127,7 @@
144
127
  "react-native-svg": "^15.15.5",
145
128
  "react-native-webview": "^14.0.1",
146
129
  "tailwind-merge": "^3.2.0",
130
+ "tailwindcss": "^3.4",
147
131
  "typescript": "^5"
148
132
  },
149
133
  "react-native-builder-bob": {
@@ -171,7 +155,7 @@
171
155
  "repository": {
172
156
  "type": "git",
173
157
  "url": "https://github.com/medway-dev/medway-ui.git",
174
- "directory": "native"
158
+ "directory": "packages/native"
175
159
  },
176
160
  "keywords": [
177
161
  "react-native",
@@ -182,5 +166,9 @@
182
166
  "medway",
183
167
  "ios",
184
168
  "android"
185
- ]
186
- }
169
+ ],
170
+ "scripts": {
171
+ "build": "bob build",
172
+ "typecheck": "tsc --noEmit"
173
+ }
174
+ }
@@ -1,7 +1,7 @@
1
1
  import { type ReactNode, useEffect } from 'react';
2
2
  import { View, StyleSheet } from 'react-native';
3
3
  import { PortalHost } from '@rn-primitives/portal';
4
- import { useColorScheme } from 'nativewind';
4
+ import { colorScheme as nativeWindColorScheme, useColorScheme } from 'nativewind';
5
5
 
6
6
  import { OverlayHostProvider } from '../src/lib/overlay-host';
7
7
 
@@ -14,36 +14,58 @@ type MedwayUiColorScheme = 'light' | 'dark';
14
14
  type MedwayUiProviderProps = {
15
15
  children: ReactNode;
16
16
  /**
17
- * Esquema já resolvido pelo app (ex.: `useAppColorScheme()` no test-prep-app).
18
- * Tem prioridade sobre `theme`.
17
+ * Tema escolhido pelo usuário no app. Tem prioridade sobre `theme`.
18
+ * Quando o app segue o sistema, não passe: o `useColorScheme` do React Native devolve
19
+ * o tema que o provider aplicou, não o do sistema.
19
20
  */
20
21
  colorScheme?: MedwayUiColorScheme;
21
22
  /**
22
23
  * Alternativa quando o app não resolve o tema externamente.
23
- * Default: `system` (segue o OS via NativeWind).
24
+ * Default: `system` (segue o tema em vigor no app, sem forçar nenhum).
24
25
  */
25
26
  theme?: MedwayUiTheme;
26
27
  };
27
28
 
29
+ type ColorSchemeRequest = { scheme: MedwayUiColorScheme };
30
+
31
+ const colorSchemeRequests: ColorSchemeRequest[] = [];
32
+
33
+ function applyLatestColorSchemeRequest() {
34
+ const latest = colorSchemeRequests[colorSchemeRequests.length - 1];
35
+ nativeWindColorScheme.set(latest?.scheme ?? 'system');
36
+ }
37
+
28
38
  /**
29
39
  * Carrega tokens + Tailwind (NativeWind) para a subárvore.
30
40
  * - OverlayHostProvider: DropdownMenu (acima da stack, sem Modal/Portal zustand)
31
41
  * - PortalHost: Select/Dialog/Popover/Tooltip do rn-primitives
32
42
  *
33
43
  * Dark mode: requer `darkMode: 'class'` no tailwind do app (via createMedwayUiTailwindConfig).
44
+ * O NativeWind aplica o tema pelo `Appearance`, que vale para o app inteiro: vale o pedido do
45
+ * provider montado por último, e ao desmontar volta o pedido anterior ou o tema do sistema.
34
46
  */
35
47
  function MedwayUiProvider({
36
48
  children,
37
49
  colorScheme,
38
50
  theme = 'system',
39
51
  }: MedwayUiProviderProps) {
40
- const { colorScheme: activeScheme, setColorScheme } = useColorScheme();
52
+ const { colorScheme: activeScheme } = useColorScheme();
53
+ const requestedScheme = colorScheme ?? (theme === 'system' ? undefined : theme);
54
+ const isDark = (requestedScheme ?? activeScheme) === 'dark';
41
55
 
42
56
  useEffect(() => {
43
- setColorScheme(colorScheme ?? theme);
44
- }, [colorScheme, theme, setColorScheme]);
57
+ if (!requestedScheme) return;
58
+
59
+ const request: ColorSchemeRequest = { scheme: requestedScheme };
60
+ colorSchemeRequests.push(request);
61
+ applyLatestColorSchemeRequest();
45
62
 
46
- const isDark = (colorScheme ?? activeScheme) === 'dark';
63
+ return () => {
64
+ const index = colorSchemeRequests.indexOf(request);
65
+ if (index !== -1) colorSchemeRequests.splice(index, 1);
66
+ applyLatestColorSchemeRequest();
67
+ };
68
+ }, [requestedScheme]);
47
69
 
48
70
  return (
49
71
  <View style={styles.root} className={isDark ? 'dark' : undefined}>
@@ -1,68 +1,48 @@
1
1
  const fs = require('fs');
2
2
  const path = require('path');
3
+ const { medwayUiNativeRoots, resolveMedwayUiPaths } = require('./monorepo');
3
4
 
4
5
  const DEFAULT_APP_PAGES_DIR = 'medway-ui';
5
6
 
7
+ function isInsideNativeRoot(filename, nativeRoots) {
8
+ return nativeRoots.some((root) => filename.startsWith(root + path.sep));
9
+ }
10
+
6
11
  function createNativeWindScopeTest(options = {}) {
7
12
  const appPagesDir = options.appPagesDir ?? DEFAULT_APP_PAGES_DIR;
8
13
  const appPagesSegment = `${path.sep}pages${path.sep}${appPagesDir}${path.sep}`;
14
+ const nativeRoots = medwayUiNativeRoots(options.projectRoot ?? process.cwd());
9
15
 
10
16
  return function isNativeWindScope(filename) {
11
17
  return (
12
18
  filename.includes(`${path.sep}@medway-ui${path.sep}native${path.sep}`) ||
13
19
  filename.includes(`${path.sep}medway-ui${path.sep}native${path.sep}`) ||
20
+ isInsideNativeRoot(filename, nativeRoots) ||
14
21
  filename.includes(`${path.sep}@rn-primitives${path.sep}`) ||
15
22
  filename.includes(appPagesSegment)
16
23
  );
17
24
  };
18
25
  }
19
26
 
20
- function createMedwayUiSourceTest() {
27
+ function createMedwayUiSourceTest(projectRoot = process.cwd()) {
28
+ const nativeRoots = medwayUiNativeRoots(projectRoot);
29
+
21
30
  return function isMedwayUiSourceFile(currentFile) {
22
31
  return (
23
32
  currentFile.includes(`${path.sep}@medway-ui${path.sep}native${path.sep}`) ||
24
- currentFile.includes(`${path.sep}medway-ui${path.sep}native${path.sep}`)
33
+ currentFile.includes(`${path.sep}medway-ui${path.sep}native${path.sep}`) ||
34
+ isInsideNativeRoot(currentFile, nativeRoots)
25
35
  );
26
36
  };
27
37
  }
28
38
 
29
39
  function resolveMedwayUiNativeSrc(projectRoot) {
30
- const npmNativeSrc = path.join(projectRoot, 'node_modules/@medway-ui/native/src');
31
-
32
- if (fs.existsSync(npmNativeSrc) && !isNativePackageSymlinkedToMonorepo(projectRoot)) {
33
- return npmNativeSrc;
34
- }
35
-
36
- const monorepoNativeSrc = path.resolve(projectRoot, '../medway-ui/native/src');
37
- if (fs.existsSync(monorepoNativeSrc)) {
38
- return monorepoNativeSrc;
39
- }
40
-
41
- return npmNativeSrc;
42
- }
43
-
44
- function isNativePackageSymlinkedToMonorepo(projectRoot) {
45
- const nativePath = path.join(projectRoot, 'node_modules/@medway-ui/native');
46
-
47
- if (!fs.existsSync(nativePath)) {
48
- return false;
49
- }
50
-
51
- try {
52
- const nativeRealPath = fs.realpathSync(nativePath);
53
- const monorepoNativePath = fs.realpathSync(
54
- path.resolve(projectRoot, '../medway-ui/native'),
55
- );
56
-
57
- return nativeRealPath === monorepoNativePath;
58
- } catch {
59
- return false;
60
- }
40
+ return resolveMedwayUiPaths(projectRoot).medwayUiNativeSrc;
61
41
  }
62
42
 
63
43
  function createMedwayUiAliasResolver(projectRoot) {
64
44
  const medwayUiNativeSrc = resolveMedwayUiNativeSrc(projectRoot);
65
- const isMedwayUiSourceFile = createMedwayUiSourceTest();
45
+ const isMedwayUiSourceFile = createMedwayUiSourceTest(projectRoot);
66
46
 
67
47
  return function resolveMedwayUiAlias(sourcePath, currentFile) {
68
48
  if (!isMedwayUiSourceFile(currentFile) || !sourcePath.startsWith('@/')) {
package/setup/metro.js CHANGED
@@ -1,5 +1,6 @@
1
1
  const fs = require('fs');
2
2
  const path = require('path');
3
+ const { detectLinkedMedwayUiRoot, resolveMedwayUiPaths } = require('./monorepo');
3
4
 
4
5
  /**
5
6
  * Subpaths whose `exports` entry points at `lib/` — the bob build output, which
@@ -107,74 +108,12 @@ function resolveBareModule(moduleName, searchRoots) {
107
108
  }
108
109
 
109
110
  /**
110
- * Detecta monorepo file: (`../medway-ui`) vs pacotes npm (`node_modules/@medway-ui`).
111
- * Prioriza npm quando o pacote não é symlink para o clone local.
112
- */
113
- function isNativePackageSymlinkedToMonorepo(projectRoot) {
114
- const nativePath = path.join(projectRoot, 'node_modules/@medway-ui/native');
115
-
116
- if (!fs.existsSync(nativePath)) {
117
- return false;
118
- }
119
-
120
- try {
121
- const nativeRealPath = fs.realpathSync(nativePath);
122
- const monorepoNativePath = fs.realpathSync(
123
- path.resolve(projectRoot, '../medway-ui/native'),
124
- );
125
-
126
- return nativeRealPath === monorepoNativePath;
127
- } catch {
128
- return false;
129
- }
130
- }
131
-
132
- function detectLinkedMedwayUiRoot(projectRoot) {
133
- const npmScopedRoot = 'node_modules/@medway-ui';
134
- const npmNativeSrc = path.resolve(projectRoot, npmScopedRoot, 'native/src');
135
-
136
- if (fs.existsSync(npmNativeSrc) && !isNativePackageSymlinkedToMonorepo(projectRoot)) {
137
- return npmScopedRoot;
138
- }
139
-
140
- const monorepoRoot = '../medway-ui';
141
- const monorepoNativeSrc = path.resolve(projectRoot, monorepoRoot, 'native/src');
142
-
143
- if (fs.existsSync(monorepoNativeSrc)) {
144
- return monorepoRoot;
145
- }
146
-
147
- if (fs.existsSync(npmNativeSrc)) {
148
- return npmScopedRoot;
149
- }
150
-
151
- return monorepoRoot;
152
- }
153
-
154
- function resolveMedwayUiPaths(projectRoot, linkedMedwayUiRoot, nativePackageRoot) {
155
- const medwayUiRoot = path.resolve(projectRoot, linkedMedwayUiRoot);
156
- const linkedNativeSrc = path.resolve(medwayUiRoot, 'native/src');
157
- const npmNativeSrc = path.join(nativePackageRoot, 'src');
158
- const isMonorepoLink = fs.existsSync(linkedNativeSrc);
159
-
160
- return {
161
- medwayUiRoot: isMonorepoLink ? medwayUiRoot : nativePackageRoot,
162
- medwayUiNativeRoot: isMonorepoLink
163
- ? path.resolve(medwayUiRoot, 'native')
164
- : nativePackageRoot,
165
- medwayUiNativeSrc: isMonorepoLink ? linkedNativeSrc : npmNativeSrc,
166
- medwayUiSharedSrc: isMonorepoLink ? path.resolve(medwayUiRoot, 'src') : null,
167
- isMonorepoLink,
168
- };
169
- }
170
-
171
- /**
172
- * Metro + NativeWind para @medway-ui/native (monorepo file: ou npm).
111
+ * Metro + NativeWind para @medway-ui/native (npm ou clone do medway-ui linkado).
173
112
  *
174
113
  * @param {import('expo/metro-config').MetroConfig} config
175
114
  * @param {object} [options]
176
115
  * @param {string} options.projectRoot
177
- * @param {string} [options.linkedMedwayUiRoot] - auto-detecta monorepo ou npm quando omitido
116
+ * @param {string} [options.linkedMedwayUiRoot] - raiz do clone do medway-ui; detectada quando omitida
178
117
  * @param {boolean} [options.resolveNativeSource=true] - aponta @medway-ui/native para src/
179
118
  */
180
119
  function withMedwayUi(config, options = {}) {
@@ -195,7 +134,7 @@ function withMedwayUi(config, options = {}) {
195
134
  } = resolveMedwayUiPaths(projectRoot, linkedMedwayUiRoot, nativePackageRoot);
196
135
 
197
136
  if (isMonorepoLink) {
198
- const escapedMedwayUiRoot = medwayUiRoot.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
137
+ const escapeRegex = (value) => value.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
199
138
 
200
139
  config.watchFolders = [...(config.watchFolders ?? []), medwayUiRoot];
201
140
 
@@ -208,8 +147,8 @@ function withMedwayUi(config, options = {}) {
208
147
 
209
148
  config.resolver.blockList = [
210
149
  ...blockListArray,
211
- new RegExp(`${escapedMedwayUiRoot}[\\\\/]native[\\\\/]node_modules[\\\\/].*`),
212
- new RegExp(`${escapedMedwayUiRoot}[\\\\/]node_modules[\\\\/].*`),
150
+ new RegExp(`${escapeRegex(medwayUiNativeRoot)}[\\\\/]node_modules[\\\\/].*`),
151
+ new RegExp(`${escapeRegex(medwayUiRoot)}[\\\\/]node_modules[\\\\/].*`),
213
152
  ];
214
153
  }
215
154
 
@@ -0,0 +1,102 @@
1
+ const fs = require('fs');
2
+ const path = require('path');
3
+
4
+ const NPM_MEDWAY_UI_ROOT = 'node_modules/@medway-ui';
5
+ const OWN_NATIVE_ROOT = path.resolve(__dirname, '..');
6
+
7
+ function realpathOrNull(target) {
8
+ try {
9
+ return fs.realpathSync(target);
10
+ } catch {
11
+ return null;
12
+ }
13
+ }
14
+
15
+ /** Same lookup as Node: the closest node_modules up from the app, so a hoisted install is found too. */
16
+ function findInstalledNative(projectRoot) {
17
+ for (let dir = path.resolve(projectRoot); ; dir = path.dirname(dir)) {
18
+ const nativeRoot = realpathOrNull(path.join(dir, 'node_modules', '@medway-ui', 'native'));
19
+ if (nativeRoot) return nativeRoot;
20
+ if (path.dirname(dir) === dir) return null;
21
+ }
22
+ }
23
+
24
+ function findWorkspaceRoot(fromDir) {
25
+ for (let dir = fromDir; ; dir = path.dirname(dir)) {
26
+ if (fs.existsSync(path.join(dir, 'pnpm-workspace.yaml'))) return dir;
27
+ if (path.dirname(dir) === dir) return null;
28
+ }
29
+ }
30
+
31
+ function isMedwayUiClone(dir) {
32
+ return fs.existsSync(path.join(dir, 'packages', 'native', 'src'));
33
+ }
34
+
35
+ /**
36
+ * The medway-ui clone the app links to (`file:`/`link:` symlink), relative to the app, or
37
+ * `node_modules/@medway-ui` for an npm install. An npm copy always resolves inside a
38
+ * node_modules folder; a linked clone never does, whatever its folder is called.
39
+ */
40
+ function detectLinkedMedwayUiRoot(projectRoot) {
41
+ const nativeRoot = findInstalledNative(projectRoot);
42
+ if (nativeRoot && !nativeRoot.split(path.sep).includes('node_modules')) {
43
+ const cloneRoot = findWorkspaceRoot(nativeRoot);
44
+ if (cloneRoot && isMedwayUiClone(cloneRoot)) {
45
+ return path.relative(projectRoot, cloneRoot) || '.';
46
+ }
47
+ }
48
+ return NPM_MEDWAY_UI_ROOT;
49
+ }
50
+
51
+ function resolveMedwayUiPaths(
52
+ projectRoot,
53
+ linkedMedwayUiRoot = detectLinkedMedwayUiRoot(projectRoot),
54
+ nativePackageRoot = OWN_NATIVE_ROOT,
55
+ ) {
56
+ const cloneRoot = path.resolve(projectRoot, linkedMedwayUiRoot);
57
+
58
+ // node_modules/@medway-ui (npm) and pre-monorepo clones keep the shape apps already build with.
59
+ const flatNativeRoot = path.join(cloneRoot, 'native');
60
+ if (fs.existsSync(path.join(flatNativeRoot, 'src'))) {
61
+ return {
62
+ medwayUiRoot: cloneRoot,
63
+ medwayUiNativeRoot: flatNativeRoot,
64
+ medwayUiNativeSrc: path.join(flatNativeRoot, 'src'),
65
+ medwayUiSharedSrc: path.join(cloneRoot, 'src'),
66
+ isMonorepoLink: true,
67
+ };
68
+ }
69
+
70
+ if (isMedwayUiClone(cloneRoot)) {
71
+ const nativeRoot = path.join(cloneRoot, 'packages', 'native');
72
+ return {
73
+ medwayUiRoot: cloneRoot,
74
+ medwayUiNativeRoot: nativeRoot,
75
+ medwayUiNativeSrc: path.join(nativeRoot, 'src'),
76
+ medwayUiSharedSrc: path.join(cloneRoot, 'packages', 'core', 'src'),
77
+ isMonorepoLink: true,
78
+ };
79
+ }
80
+
81
+ return {
82
+ medwayUiRoot: nativePackageRoot,
83
+ medwayUiNativeRoot: nativePackageRoot,
84
+ medwayUiNativeSrc: path.join(nativePackageRoot, 'src'),
85
+ medwayUiSharedSrc: null,
86
+ isMonorepoLink: false,
87
+ };
88
+ }
89
+
90
+ /** Real folders of @medway-ui/native for this app: the npm copy and, when linked, the clone's. */
91
+ function medwayUiNativeRoots(projectRoot) {
92
+ const roots = [OWN_NATIVE_ROOT, resolveMedwayUiPaths(projectRoot).medwayUiNativeRoot]
93
+ .map((root) => realpathOrNull(root) ?? root);
94
+ return [...new Set(roots)];
95
+ }
96
+
97
+ module.exports = {
98
+ NPM_MEDWAY_UI_ROOT,
99
+ detectLinkedMedwayUiRoot,
100
+ resolveMedwayUiPaths,
101
+ medwayUiNativeRoots,
102
+ };
package/setup/tailwind.js CHANGED
@@ -1,5 +1,5 @@
1
- const fs = require('fs');
2
1
  const path = require('path');
2
+ const { resolveMedwayUiPaths } = require('./monorepo');
3
3
 
4
4
  function loadDesignTokens(projectRoot) {
5
5
  const tokensPath = require.resolve('@medway-ui/core/tokens', {
@@ -70,7 +70,7 @@ function createNativeMontserratFontPlugin() {
70
70
  * @param {object} [options]
71
71
  * @param {string} options.projectRoot - raiz do app consumidor
72
72
  * @param {string[]} [options.content] - globs extras (ex.: telas migradas)
73
- * @param {string} [options.linkedMedwayUiRoot] - monorepo file: (ex.: '../medway-ui')
73
+ * @param {string} [options.linkedMedwayUiRoot] - clone do medway-ui (ex.: '../medway-ui')
74
74
  */
75
75
  function createMedwayUiTailwindConfig(options = {}) {
76
76
  const { projectRoot = process.cwd(), content = [], linkedMedwayUiRoot } = options;
@@ -92,14 +92,13 @@ function createMedwayUiTailwindConfig(options = {}) {
92
92
  ];
93
93
 
94
94
  if (linkedMedwayUiRoot) {
95
- const linkedNativeSrc = path.resolve(
95
+ const { medwayUiNativeSrc, isMonorepoLink } = resolveMedwayUiPaths(
96
96
  projectRoot,
97
97
  linkedMedwayUiRoot,
98
- 'native/src',
99
98
  );
100
99
 
101
- if (fs.existsSync(linkedNativeSrc)) {
102
- libContent.push(path.join(linkedNativeSrc, '**/*.{ts,tsx}'));
100
+ if (isMonorepoLink) {
101
+ libContent.push(path.join(medwayUiNativeSrc, '**/*.{ts,tsx}'));
103
102
  }
104
103
  }
105
104
 
@@ -109,7 +109,7 @@ const buttonVariants = cva(
109
109
  "success-basic":
110
110
  "bg-transparent active:bg-green-background-soft-emphasis disabled:bg-transparent",
111
111
  outlined:
112
- "border border-gray-stroke-muted bg-transparent active:bg-gray-50 disabled:border-gray-stroke-muted",
112
+ "border border-gray-stroke-muted bg-transparent active:bg-state-hover disabled:border-gray-stroke-muted",
113
113
  gradient:
114
114
  "bg-primary active:opacity-90 disabled:bg-gray-background-fill-muted",
115
115
  medbrain: