@legendapp/spark 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/native.d.cts +6 -3
- package/package.json +36 -28
- package/patches/react-native-enriched-markdown@1.1.1.patch +141 -10
- package/skills/spark/UPGRADING.md +88 -3
- package/vendor/node_modules/@legendapp/spark-ai/package.json +5 -5
- package/vendor/node_modules/@legendapp/spark-audio/package.json +5 -5
- package/vendor/node_modules/@legendapp/spark-audio/src/index.macos.ts +1 -0
- package/vendor/node_modules/@legendapp/spark-auth-session/package.json +6 -6
- package/vendor/node_modules/@legendapp/spark-auth-session/src/index.macos.ts +1 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/add-desktop.js +2 -2
- package/vendor/node_modules/@legendapp/spark-cli/dist/build.js +11 -2
- package/vendor/node_modules/@legendapp/spark-cli/dist/cli-arguments.js +4 -2
- package/vendor/node_modules/@legendapp/spark-cli/dist/create.js +8 -4
- package/vendor/node_modules/@legendapp/spark-cli/dist/dependency-pins.js +45 -1
- package/vendor/node_modules/@legendapp/spark-cli/dist/dev.js +8 -1
- package/vendor/node_modules/@legendapp/spark-cli/dist/examples.js +2 -2
- package/vendor/node_modules/@legendapp/spark-cli/dist/expo-dev-patch.cjs +3 -3
- package/vendor/node_modules/@legendapp/spark-cli/dist/expo-dev-preload.cjs +3 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/index.js +26 -7
- package/vendor/node_modules/@legendapp/spark-cli/dist/metro.cjs +3 -1
- package/vendor/node_modules/@legendapp/spark-cli/dist/migration-helpers.cjs +20 -5
- package/vendor/node_modules/@legendapp/spark-cli/dist/migration-helpers.d.cts +1 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/migrations.cjs +7 -2
- package/vendor/node_modules/@legendapp/spark-cli/dist/native-patch-preflight.js +3 -3
- package/vendor/node_modules/@legendapp/spark-cli/dist/project.js +16 -10
- package/vendor/node_modules/@legendapp/spark-cli/dist/release-runner-root.js +108 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/release.json +13 -13
- package/vendor/node_modules/@legendapp/spark-cli/dist/watchman.js +12 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/windows-geometry.js +2 -2
- package/vendor/node_modules/@legendapp/spark-cli/dist/windows.js +1 -1
- package/vendor/node_modules/@legendapp/spark-cli/package.json +3 -3
- package/vendor/node_modules/@legendapp/spark-cli/templates/blank-typescript/desktop.config.json +1 -1
- package/vendor/node_modules/@legendapp/spark-cli/templates/blank-typescript/package.json +27 -25
- package/vendor/node_modules/@legendapp/spark-cli/templates/universal/desktop.config.json +1 -1
- package/vendor/node_modules/@legendapp/spark-cli/templates/universal/package.json +35 -33
- package/vendor/node_modules/@legendapp/spark-cli/templates/windows/package.json +29 -27
- package/vendor/node_modules/@legendapp/spark-clipboard/package.json +5 -5
- package/vendor/node_modules/@legendapp/spark-clipboard/src/index.macos.ts +1 -0
- package/vendor/node_modules/@legendapp/spark-codex/package.json +4 -4
- package/vendor/node_modules/@legendapp/spark-commands/package.json +7 -7
- package/vendor/node_modules/@legendapp/spark-context-menu/package.json +4 -4
- package/vendor/node_modules/@legendapp/spark-desktop-app/macos/SparkDesktop.mm +7 -2
- package/vendor/node_modules/@legendapp/spark-desktop-app/package.json +3 -3
- package/vendor/node_modules/@legendapp/spark-desktop-config/accessibility-state.cjs +2 -2
- package/vendor/node_modules/@legendapp/spark-desktop-config/app.plugin.cjs +12 -0
- package/vendor/node_modules/@legendapp/spark-desktop-config/autolinking.cjs +4 -4
- package/vendor/node_modules/@legendapp/spark-desktop-config/config.d.cts +1 -1
- package/vendor/node_modules/@legendapp/spark-desktop-config/fabric-lifecycle.cjs +1 -1
- package/vendor/node_modules/@legendapp/spark-desktop-config/keyboard-events.cjs +2 -2
- package/vendor/node_modules/@legendapp/spark-desktop-config/macos-host.cjs +39 -0
- package/vendor/node_modules/@legendapp/spark-desktop-config/native-patches.cjs +47 -12
- package/vendor/node_modules/@legendapp/spark-desktop-config/native-patches.d.cts +2 -1
- package/vendor/node_modules/@legendapp/spark-desktop-config/package.json +8 -6
- package/vendor/node_modules/@legendapp/spark-desktop-config/rtl-scroll-view.cjs +2 -2
- package/vendor/node_modules/@legendapp/spark-desktop-config/rtl-text-alignment.cjs +2 -2
- package/vendor/node_modules/@legendapp/spark-desktop-config/rtl-text-input-alignment.cjs +2 -2
- package/vendor/node_modules/@legendapp/spark-desktop-config/text-input-accessibility.cjs +2 -2
- package/vendor/node_modules/@legendapp/spark-desktop-host/macos/AppDelegate.h +6 -0
- package/vendor/node_modules/@legendapp/spark-desktop-host/macos/Main.storyboard +684 -0
- package/vendor/node_modules/@legendapp/spark-desktop-host/macos/main.m +5 -0
- package/vendor/node_modules/@legendapp/spark-desktop-host/package.json +3 -2
- package/vendor/node_modules/@legendapp/spark-desktop-links/package.json +5 -5
- package/vendor/node_modules/@legendapp/spark-desktop-links/src/index.macos.ts +1 -0
- package/vendor/node_modules/@legendapp/spark-desktop-shortcuts/package.json +4 -4
- package/vendor/node_modules/@legendapp/spark-desktop-windows/macos/window-manager/RNWindowManager.mm +68 -17
- package/vendor/node_modules/@legendapp/spark-desktop-windows/package.json +5 -5
- package/vendor/node_modules/@legendapp/spark-desktop-windows/src/macos-adapter.ts +2 -1
- package/vendor/node_modules/@legendapp/spark-documents/package.json +9 -9
- package/vendor/node_modules/@legendapp/spark-drag-drop/package.json +4 -4
- package/vendor/node_modules/@legendapp/spark-file-dialog/package.json +4 -4
- package/vendor/node_modules/@legendapp/spark-file-system/macos/RNDesktopFileSystem.mm +14 -5
- package/vendor/node_modules/@legendapp/spark-file-system/package.json +4 -4
- package/vendor/node_modules/@legendapp/spark-file-system/src/index.ts +1 -1
- package/vendor/node_modules/@legendapp/spark-global-shortcuts/package.json +4 -4
- package/vendor/node_modules/@legendapp/spark-html/package.json +4 -4
- package/vendor/node_modules/@legendapp/spark-markdown/package.json +4 -4
- package/vendor/node_modules/@legendapp/spark-message-dialog/package.json +4 -4
- package/vendor/node_modules/@legendapp/spark-native-menu/package.json +4 -4
- package/vendor/node_modules/@legendapp/spark-notifications/package.json +4 -4
- package/vendor/node_modules/@legendapp/spark-processes/macos/RNDesktopProcesses.mm +110 -19
- package/vendor/node_modules/@legendapp/spark-processes/package.json +4 -4
- package/vendor/node_modules/@legendapp/spark-processes/src/index.ts +17 -3
- package/vendor/node_modules/@legendapp/spark-processes/src/types.ts +6 -0
- package/vendor/node_modules/@legendapp/spark-rich-text/package.json +4 -4
- package/vendor/node_modules/@legendapp/spark-secure-storage/package.json +5 -5
- package/vendor/node_modules/@legendapp/spark-secure-storage/src/index.macos.ts +1 -0
- package/vendor/node_modules/@legendapp/spark-settings/package.json +3 -3
- package/vendor/node_modules/@legendapp/spark-settings-ui/package.json +6 -6
- package/vendor/node_modules/@legendapp/spark-sqlite/package.json +12 -5
- package/vendor/node_modules/@legendapp/spark-system/package.json +4 -4
- package/vendor/node_modules/@legendapp/spark-tray/package.json +4 -4
- package/vendor/node_modules/@legendapp/spark-ui/macos/appkit-split-view/RNSidebarSplitViewComponent.mm +82 -18
- package/vendor/node_modules/@legendapp/spark-ui/package.json +6 -6
- package/vendor/node_modules/@legendapp/spark-ui/src/appkit-split-view/SidebarSplitViewNativeComponent.ts +4 -0
- package/vendor/node_modules/@legendapp/spark-ui/src/appkit-split-view/index.tsx +11 -9
- package/vendor/node_modules/@legendapp/spark-ui/src/index.android.tsx +20 -10
- package/vendor/node_modules/@legendapp/spark-ui/src/index.ios.tsx +15 -10
- package/vendor/node_modules/@legendapp/spark-ui/src/index.macos.tsx +1 -0
- package/vendor/node_modules/@legendapp/spark-updates/package.json +4 -4
- package/vendor/node_modules/@legendapp/spark-webview/package.json +11 -4
- package/vendor/node_modules/@legendapp/spark-window-options/package.json +1 -1
- package/camera.ts +0 -13
package/native.d.cts
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
export type NativeConfiguration =
|
|
1
|
+
/** React Native discovery overrides produced by Spark. */
|
|
2
|
+
export type NativeConfiguration = {
|
|
3
|
+
platforms?: Record<string, { npmPackageName?: string }>;
|
|
4
|
+
dependencies?: Record<string, { root?: string; platforms?: Record<string, unknown> }>;
|
|
5
|
+
};
|
|
3
6
|
/** Spark-owned project: generate native discovery configuration. */
|
|
4
7
|
export function nativeConfig(root: string): NativeConfiguration;
|
|
5
8
|
/** Existing Expo project: compose with its React Native CLI configuration. */
|
|
6
|
-
export function withSparkNative<T extends
|
|
9
|
+
export function withSparkNative<T extends object>(config: T, root: string): T & NativeConfiguration;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@legendapp/spark",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.2",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -72,7 +72,6 @@
|
|
|
72
72
|
"./diagnostics": "./diagnostics.ts",
|
|
73
73
|
"./ai": "./ai.ts",
|
|
74
74
|
"./ai/codex": "./ai-codex.ts",
|
|
75
|
-
"./camera": "./camera.ts",
|
|
76
75
|
"./customize": "./customize.ts",
|
|
77
76
|
"./markdown": "./markdown.ts",
|
|
78
77
|
"./html": "./html.ts"
|
|
@@ -98,18 +97,11 @@
|
|
|
98
97
|
"react-native-nitro-modules": "0.37.0",
|
|
99
98
|
"@legendapp/state": "^3.0.0-beta.42",
|
|
100
99
|
"expo-desktop-config-plugins": "1.3.2",
|
|
101
|
-
"@expo/config-plugins": "
|
|
102
|
-
"@expo/config-types": "54.0.10",
|
|
100
|
+
"@expo/config-plugins": "55.0.12",
|
|
103
101
|
"@react-native-runtimes/core": "0.1.0-alpha.2",
|
|
104
|
-
"@react-native-
|
|
105
|
-
"react-native-vision-camera": "5.2.3",
|
|
106
|
-
"react-native-nitro-image": "0.15.2",
|
|
107
|
-
"react-native-enriched-markdown": "1.1.1",
|
|
108
|
-
"react-native-enriched-html": "1.1.1",
|
|
109
|
-
"@op-engineering/op-sqlite": "18.2.1",
|
|
102
|
+
"@react-native-windows/find-dotnet-tools": "0.0.0-canary.3",
|
|
110
103
|
"clsx": "^2.1.1",
|
|
111
|
-
"tailwind-merge": "^3.4.0"
|
|
112
|
-
"react-native-webview": "16.0.0"
|
|
104
|
+
"tailwind-merge": "^3.4.0"
|
|
113
105
|
},
|
|
114
106
|
"description": "Legend Spark — native applications with React Native and Expo",
|
|
115
107
|
"bin": {
|
|
@@ -119,20 +111,24 @@
|
|
|
119
111
|
"node": ">=24.19.0"
|
|
120
112
|
},
|
|
121
113
|
"peerDependencies": {
|
|
122
|
-
"react": "^19.
|
|
123
|
-
"react-native": "0.
|
|
124
|
-
"expo-audio": "
|
|
125
|
-
"expo-web-browser": "~
|
|
126
|
-
"expo-crypto": "~
|
|
127
|
-
"expo-clipboard": "~
|
|
128
|
-
"expo": "
|
|
129
|
-
"react-dom": "^19.
|
|
130
|
-
"
|
|
131
|
-
"
|
|
114
|
+
"react": "^19.2.0",
|
|
115
|
+
"react-native": "0.83.10",
|
|
116
|
+
"expo-audio": "55.0.18",
|
|
117
|
+
"expo-web-browser": "~55.0.20",
|
|
118
|
+
"expo-crypto": "~55.0.19",
|
|
119
|
+
"expo-clipboard": "~55.0.17",
|
|
120
|
+
"expo": "55.0.32",
|
|
121
|
+
"react-dom": "^19.2.0",
|
|
122
|
+
"react-native-enriched-markdown": "1.1.1",
|
|
123
|
+
"react-native-enriched-html": "1.1.1",
|
|
124
|
+
"expo-linking": "~55.0.17",
|
|
125
|
+
"expo-secure-store": "~55.0.18",
|
|
132
126
|
"@legendapp/list": ">=3.3.0",
|
|
133
|
-
"@
|
|
127
|
+
"@op-engineering/op-sqlite": "18.2.1",
|
|
128
|
+
"@expo/ui": "55.0.17",
|
|
134
129
|
"uniwind": "^1.6.3",
|
|
135
|
-
"react-native-windows": "0.
|
|
130
|
+
"react-native-windows": "0.83.2",
|
|
131
|
+
"react-native-webview": "16.0.0"
|
|
136
132
|
},
|
|
137
133
|
"peerDependenciesMeta": {
|
|
138
134
|
"expo-audio": {
|
|
@@ -150,12 +146,21 @@
|
|
|
150
146
|
"react-dom": {
|
|
151
147
|
"optional": true
|
|
152
148
|
},
|
|
149
|
+
"react-native-enriched-markdown": {
|
|
150
|
+
"optional": true
|
|
151
|
+
},
|
|
152
|
+
"react-native-enriched-html": {
|
|
153
|
+
"optional": true
|
|
154
|
+
},
|
|
153
155
|
"expo-linking": {
|
|
154
156
|
"optional": true
|
|
155
157
|
},
|
|
156
158
|
"expo-secure-store": {
|
|
157
159
|
"optional": true
|
|
158
160
|
},
|
|
161
|
+
"@op-engineering/op-sqlite": {
|
|
162
|
+
"optional": true
|
|
163
|
+
},
|
|
159
164
|
"@expo/ui": {
|
|
160
165
|
"optional": true
|
|
161
166
|
},
|
|
@@ -164,6 +169,9 @@
|
|
|
164
169
|
},
|
|
165
170
|
"react-native-windows": {
|
|
166
171
|
"optional": true
|
|
172
|
+
},
|
|
173
|
+
"react-native-webview": {
|
|
174
|
+
"optional": true
|
|
167
175
|
}
|
|
168
176
|
},
|
|
169
177
|
"publishConfig": {
|
|
@@ -176,7 +184,7 @@
|
|
|
176
184
|
"spark": {
|
|
177
185
|
"nativePatchRequirements": {
|
|
178
186
|
"schema": 1,
|
|
179
|
-
"frameworkVersion": "0.0.
|
|
187
|
+
"frameworkVersion": "0.0.2",
|
|
180
188
|
"packages": {
|
|
181
189
|
"@react-native-runtimes/core": {
|
|
182
190
|
"version": "0.1.0-alpha.2",
|
|
@@ -199,9 +207,9 @@
|
|
|
199
207
|
"upstreamIntegrity": "sha512-KIg5Yhy04lQfHdXC1JQPM+0kftMfPnH6AqDH7v6YskQ9kzfUacooofOFRmbaZHASq/0WY87Fx0peiFETFjOcCg=="
|
|
200
208
|
},
|
|
201
209
|
"expo-audio": {
|
|
202
|
-
"version": "
|
|
203
|
-
"patchHash": "
|
|
204
|
-
"upstreamIntegrity": "sha512-
|
|
210
|
+
"version": "55.0.18",
|
|
211
|
+
"patchHash": "11548c0285732fa2898e3d1912633b8c4d2bded3ea46ff124a214e7d0d8e6770",
|
|
212
|
+
"upstreamIntegrity": "sha512-izDr80hhHXkfIZn0TXdCheUhWEVRV205a6j0gdhgJ9se36C9Yo+REyaqFrEI1La4p95vPXvaH7UkAx/EGRKNHQ=="
|
|
205
213
|
}
|
|
206
214
|
}
|
|
207
215
|
},
|
|
@@ -4462,18 +4462,20 @@ index d0a9b3af..9e336c7e 100644
|
|
|
4462
4462
|
}
|
|
4463
4463
|
|
|
4464
4464
|
diff --git a/ios/segments/ENRMCodeBlockContainerView.m b/ios/segments/ENRMCodeBlockContainerView.m
|
|
4465
|
-
index
|
|
4465
|
+
index 0c022cfd5644ed59ffc492b12f79ca0b3521fdc1..bb3d7cdb81628b816914b1f43e77a29615f0ea8a 100644
|
|
4466
4466
|
--- a/ios/segments/ENRMCodeBlockContainerView.m
|
|
4467
4467
|
+++ b/ios/segments/ENRMCodeBlockContainerView.m
|
|
4468
|
-
@@ -
|
|
4468
|
+
@@ -4,7 +4,9 @@
|
|
4469
|
+
#import "MarkdownASTNode.h"
|
|
4469
4470
|
#import "PasteboardUtils.h"
|
|
4470
4471
|
#if TARGET_OS_OSX
|
|
4472
|
+
+#import "ENRMHorizontalScrollView.h"
|
|
4471
4473
|
#import "ENRMMenuAction.h"
|
|
4472
4474
|
+#import "ENRMCodeBlockLineLayout.h"
|
|
4473
4475
|
#endif
|
|
4474
4476
|
|
|
4475
4477
|
// Block segment view for fenced code blocks (see SegmentRenderer.m):
|
|
4476
|
-
@@ -67,6 +
|
|
4478
|
+
@@ -67,6 +69,7 @@ static CGFloat ENRMCodeBlockHeaderLabelLineHeight(NSFont *headerFont)
|
|
4477
4479
|
return attributed;
|
|
4478
4480
|
}
|
|
4479
4481
|
|
|
@@ -4481,7 +4483,7 @@ index 0c022cfd..667592c9 100644
|
|
|
4481
4483
|
// Per-line height applied to the code text (see ENRMApplyCodeBlockTextAttributes):
|
|
4482
4484
|
// when a code block line height is configured every line fragment is exactly that
|
|
4483
4485
|
// tall; otherwise the font's natural line height is used.
|
|
4484
|
-
@@ -95,6 +
|
|
4486
|
+
@@ -95,6 +98,8 @@ static CGFloat ENRMCodeBlockCodeHeight(NSString *code, StyleConfig *config)
|
|
4485
4487
|
return ceil(lineCount * ENRMCodeBlockPerLineHeight(config));
|
|
4486
4488
|
}
|
|
4487
4489
|
|
|
@@ -4490,7 +4492,7 @@ index 0c022cfd..667592c9 100644
|
|
|
4490
4492
|
// Used only to pick the scroll indicator style for the code pane, so the
|
|
4491
4493
|
// indicator stays visible on dark code block backgrounds without affecting
|
|
4492
4494
|
// any other scroll view.
|
|
4493
|
-
@@ -140,6 +
|
|
4495
|
+
@@ -140,6 +145,7 @@ @interface ENRMCodeBlockContentView : RCTUIView
|
|
4494
4496
|
@property (nonatomic, readonly) CGFloat usedWidth;
|
|
4495
4497
|
#if TARGET_OS_OSX
|
|
4496
4498
|
@property (nonatomic, copy, nullable) NSMenu * (^menuProvider)(void);
|
|
@@ -4498,7 +4500,7 @@ index 0c022cfd..667592c9 100644
|
|
|
4498
4500
|
#endif
|
|
4499
4501
|
@end
|
|
4500
4502
|
|
|
4501
|
-
@@ -170,6 +
|
|
4503
|
+
@@ -170,6 +176,9 @@ - (void)setAttributedCode:(nullable NSAttributedString *)attributedCode
|
|
4502
4504
|
_textContainer = nil;
|
|
4503
4505
|
return;
|
|
4504
4506
|
}
|
|
@@ -4508,7 +4510,7 @@ index 0c022cfd..667592c9 100644
|
|
|
4508
4510
|
_textStorage = [[NSTextStorage alloc] initWithAttributedString:attributedCode];
|
|
4509
4511
|
_layoutManager = [[NSLayoutManager alloc] init];
|
|
4510
4512
|
_layoutManager.usesFontLeading = NO;
|
|
4511
|
-
@@ -179,6 +
|
|
4513
|
+
@@ -179,6 +188,7 @@ - (void)setAttributedCode:(nullable NSAttributedString *)attributedCode
|
|
4512
4514
|
[_layoutManager addTextContainer:_textContainer];
|
|
4513
4515
|
[_textStorage addLayoutManager:_layoutManager];
|
|
4514
4516
|
[_layoutManager ensureLayoutForTextContainer:_textContainer];
|
|
@@ -4516,7 +4518,7 @@ index 0c022cfd..667592c9 100644
|
|
|
4516
4518
|
}
|
|
4517
4519
|
|
|
4518
4520
|
- (CGFloat)usedWidth
|
|
4519
|
-
@@ -191,6 +
|
|
4521
|
+
@@ -191,6 +201,12 @@ - (CGFloat)usedWidth
|
|
4520
4522
|
|
|
4521
4523
|
- (void)drawRect:(CGRect)rect
|
|
4522
4524
|
{
|
|
@@ -4529,7 +4531,19 @@ index 0c022cfd..667592c9 100644
|
|
|
4529
4531
|
if (!_layoutManager) {
|
|
4530
4532
|
return;
|
|
4531
4533
|
}
|
|
4532
|
-
@@ -
|
|
4534
|
+
@@ -302,7 +318,11 @@ - (instancetype)initWithConfig:(StyleConfig *)config
|
|
4535
|
+
|
|
4536
|
+
- (void)setupScrollView
|
|
4537
|
+
{
|
|
4538
|
+
+#if TARGET_OS_OSX
|
|
4539
|
+
+ _scrollView = [[ENRMHorizontalScrollView alloc] init];
|
|
4540
|
+
+#else
|
|
4541
|
+
_scrollView = [[RCTUIScrollView alloc] init];
|
|
4542
|
+
+#endif
|
|
4543
|
+
_scrollView.showsVerticalScrollIndicator = NO;
|
|
4544
|
+
_scrollView.showsHorizontalScrollIndicator = YES;
|
|
4545
|
+
_codeContentView = [[ENRMCodeBlockContentView alloc] initWithFrame:CGRectZero];
|
|
4546
|
+
@@ -409,7 +429,12 @@ - (void)rebuildAttributedCode
|
|
4533
4547
|
// Setting attributedCode builds and lays out the cached TextKit stack once;
|
|
4534
4548
|
// width then reads out of that layout, and height stays analytic.
|
|
4535
4549
|
_codeContentView.attributedCode = _attributedCode;
|
|
@@ -4542,7 +4556,7 @@ index 0c022cfd..667592c9 100644
|
|
|
4542
4556
|
}
|
|
4543
4557
|
|
|
4544
4558
|
- (void)applyCodeBlockNode:(MarkdownASTNode *)node
|
|
4545
|
-
@@ -482,8 +
|
|
4559
|
+
@@ -482,8 +507,13 @@ + (CGFloat)measureHeightForCodeBlockNode:(MarkdownASTNode *)node config:(StyleCo
|
|
4546
4560
|
{
|
|
4547
4561
|
CGFloat inset = ENRMCodeBlockContentInset(config);
|
|
4548
4562
|
CGFloat headerH = inset + ENRMCodeBlockHeaderLabelLineHeight(ENRMCodeBlockHeaderFont(config));
|
|
@@ -7749,3 +7763,120 @@ index ec26198d..58c362d3 100644
|
|
|
7749
7763
|
}
|
|
7750
7764
|
|
|
7751
7765
|
- (void)showTrailingBulletInTextView:(UITextView *)textView
|
|
7766
|
+
diff --git a/ios/segments/ENRMVideoContainerView.m b/ios/segments/ENRMVideoContainerView.m
|
|
7767
|
+
index d3137e1597d588a444ef1fa4cc85a4ac4d1ae9ab..e516922ff4455b7f0455a6c67c4791f586fabf8f 100644
|
|
7768
|
+
--- a/ios/segments/ENRMVideoContainerView.m
|
|
7769
|
+
+++ b/ios/segments/ENRMVideoContainerView.m
|
|
7770
|
+
@@ -296,8 +296,36 @@ - (void)dealloc
|
|
7771
|
+
|
|
7772
|
+
// ===== macOS implementation =====
|
|
7773
|
+
|
|
7774
|
+
+@interface ENRMPlayerView : AVPlayerView
|
|
7775
|
+
+@end
|
|
7776
|
+
+
|
|
7777
|
+
+@implementation ENRMPlayerView
|
|
7778
|
+
+
|
|
7779
|
+
+- (NSView *)hitTest:(NSPoint)point
|
|
7780
|
+
+{
|
|
7781
|
+
+ NSView *hit = [super hitTest:point];
|
|
7782
|
+
+ NSEvent *event = NSApp.currentEvent;
|
|
7783
|
+
+ // AVKit's internal content view seeks without forwarding scrollWheel:.
|
|
7784
|
+
+ if (hit && event.type == NSEventTypeScrollWheel &&
|
|
7785
|
+
+ fabs(event.scrollingDeltaY) > fabs(event.scrollingDeltaX)) {
|
|
7786
|
+
+ return self;
|
|
7787
|
+
+ }
|
|
7788
|
+
+ return hit;
|
|
7789
|
+
+}
|
|
7790
|
+
+
|
|
7791
|
+
+- (void)scrollWheel:(NSEvent *)event
|
|
7792
|
+
+{
|
|
7793
|
+
+ if (fabs(event.scrollingDeltaY) > fabs(event.scrollingDeltaX)) {
|
|
7794
|
+
+ [self.nextResponder scrollWheel:event];
|
|
7795
|
+
+ } else {
|
|
7796
|
+
+ [super scrollWheel:event];
|
|
7797
|
+
+ }
|
|
7798
|
+
+}
|
|
7799
|
+
+
|
|
7800
|
+
+@end
|
|
7801
|
+
+
|
|
7802
|
+
@implementation ENRMVideoContainerView {
|
|
7803
|
+
- AVPlayerView *_playerView;
|
|
7804
|
+
+ ENRMPlayerView *_playerView;
|
|
7805
|
+
NSString *_currentURL;
|
|
7806
|
+
}
|
|
7807
|
+
|
|
7808
|
+
@@ -308,7 +336,7 @@ - (instancetype)initWithConfig:(StyleConfig *)config
|
|
7809
|
+
_dynamicProps = [[ENRMDynamicBlockProps alloc] init];
|
|
7810
|
+
self.wantsLayer = YES;
|
|
7811
|
+
|
|
7812
|
+
- _playerView = [[AVPlayerView alloc] init];
|
|
7813
|
+
+ _playerView = [[ENRMPlayerView alloc] init];
|
|
7814
|
+
_playerView.controlsStyle = AVPlayerViewControlsStyleInline;
|
|
7815
|
+
_playerView.wantsLayer = YES;
|
|
7816
|
+
_playerView.layer.masksToBounds = YES;
|
|
7817
|
+
diff --git a/ios/segments/TableContainerView.m b/ios/segments/TableContainerView.m
|
|
7818
|
+
index 7a39908bd40067a817051d4f0a1c9e7f23e9b4eb..944b088e75a773f2a0bf825709e9a6cf6b15e1bc 100644
|
|
7819
|
+
--- a/ios/segments/TableContainerView.m
|
|
7820
|
+
+++ b/ios/segments/TableContainerView.m
|
|
7821
|
+
@@ -12,6 +12,7 @@
|
|
7822
|
+
#import "StyleConfig.h"
|
|
7823
|
+
#include <TargetConditionals.h>
|
|
7824
|
+
#if TARGET_OS_OSX
|
|
7825
|
+
+#import "ENRMHorizontalScrollView.h"
|
|
7826
|
+
#import "ENRMMenuAction.h"
|
|
7827
|
+
#import "ENRMTableGridView.h"
|
|
7828
|
+
#else
|
|
7829
|
+
@@ -270,7 +271,11 @@ - (instancetype)initWithConfig:(StyleConfig *)config
|
|
7830
|
+
|
|
7831
|
+
- (void)setupScrollView
|
|
7832
|
+
{
|
|
7833
|
+
+#if TARGET_OS_OSX
|
|
7834
|
+
+ _scrollView = [[ENRMHorizontalScrollView alloc] init];
|
|
7835
|
+
+#else
|
|
7836
|
+
_scrollView = [[RCTUIScrollView alloc] init];
|
|
7837
|
+
+#endif
|
|
7838
|
+
_scrollView.showsVerticalScrollIndicator = NO;
|
|
7839
|
+
_scrollView.showsHorizontalScrollIndicator = YES;
|
|
7840
|
+
#if !TARGET_OS_OSX
|
|
7841
|
+
diff --git a/ios/utils/ENRMHorizontalScrollView.h b/ios/utils/ENRMHorizontalScrollView.h
|
|
7842
|
+
new file mode 100644
|
|
7843
|
+
index 0000000000000000000000000000000000000000..024bb02e051a01ff9b9aaa7930445d91101d9599
|
|
7844
|
+
--- /dev/null
|
|
7845
|
+
+++ b/ios/utils/ENRMHorizontalScrollView.h
|
|
7846
|
+
@@ -0,0 +1,8 @@
|
|
7847
|
+
+#pragma once
|
|
7848
|
+
+
|
|
7849
|
+
+#import "ENRMUIKit.h"
|
|
7850
|
+
+
|
|
7851
|
+
+#if TARGET_OS_OSX
|
|
7852
|
+
+@interface ENRMHorizontalScrollView : RCTUIScrollView
|
|
7853
|
+
+@end
|
|
7854
|
+
+#endif
|
|
7855
|
+
diff --git a/ios/utils/ENRMHorizontalScrollView.m b/ios/utils/ENRMHorizontalScrollView.m
|
|
7856
|
+
new file mode 100644
|
|
7857
|
+
index 0000000000000000000000000000000000000000..73ff9a8a7cfbfb1a6958a98383bf44fc84f050f9
|
|
7858
|
+
--- /dev/null
|
|
7859
|
+
+++ b/ios/utils/ENRMHorizontalScrollView.m
|
|
7860
|
+
@@ -0,0 +1,22 @@
|
|
7861
|
+
+#import "ENRMHorizontalScrollView.h"
|
|
7862
|
+
+
|
|
7863
|
+
+#if TARGET_OS_OSX
|
|
7864
|
+
+@implementation ENRMHorizontalScrollView
|
|
7865
|
+
+
|
|
7866
|
+
+// Overriding scrollWheel: otherwise disables responsive horizontal scrolling.
|
|
7867
|
+
++ (BOOL)isCompatibleWithResponsiveScrolling
|
|
7868
|
+
+{
|
|
7869
|
+
+ return YES;
|
|
7870
|
+
+}
|
|
7871
|
+
+
|
|
7872
|
+
+- (void)scrollWheel:(NSEvent *)event
|
|
7873
|
+
+{
|
|
7874
|
+
+ if (fabs(event.scrollingDeltaY) > fabs(event.scrollingDeltaX)) {
|
|
7875
|
+
+ [self.nextResponder scrollWheel:event];
|
|
7876
|
+
+ } else {
|
|
7877
|
+
+ [super scrollWheel:event];
|
|
7878
|
+
+ }
|
|
7879
|
+
+}
|
|
7880
|
+
+
|
|
7881
|
+
+@end
|
|
7882
|
+
+#endif
|
|
@@ -211,9 +211,10 @@ After (for this release):
|
|
|
211
211
|
```
|
|
212
212
|
|
|
213
213
|
Camera and enriched Markdown native dependency patches are applied by the SDK.
|
|
214
|
-
Use public `/camera`
|
|
215
|
-
|
|
216
|
-
|
|
214
|
+
Use public `/camera` (removed in 0.0.2 — import `react-native-vision-camera`
|
|
215
|
+
directly) and `/markdown` imports; stop manually patching their bundled dependencies.
|
|
216
|
+
Existing custom runtimes must rebuild to include changed native code. Native
|
|
217
|
+
production builds fail when app source imports an excluded module:
|
|
217
218
|
check `spark analyze` and native-only `include` requirements rather than weakening
|
|
218
219
|
the selection. SidebarSplitView gained a native content-list column and swipe
|
|
219
220
|
actions; review customized pane composition if affected. Windows notification
|
|
@@ -320,3 +321,87 @@ desktop app by itself, such as with `--no-open`.
|
|
|
320
321
|
|
|
321
322
|
No changes are needed in existing apps. Update `@legendapp/spark` to `0.0.1`
|
|
322
323
|
and reinstall.
|
|
324
|
+
|
|
325
|
+
## 0.0.2
|
|
326
|
+
|
|
327
|
+
Breaking: yes. Spark moves from Expo SDK 54 / React Native 0.81 to **Expo SDK 55
|
|
328
|
+
and React Native 0.83**, and `@legendapp/spark/camera` was removed.
|
|
329
|
+
|
|
330
|
+
### Expo SDK 55 and React Native 0.83
|
|
331
|
+
|
|
332
|
+
The SDK now pins Expo 55.0.32, React Native 0.83.10, React 19.2.0, React Native
|
|
333
|
+
macOS 0.83.0 and React Native Windows 0.83.2, with the Expo Desktop SDK 55
|
|
334
|
+
packages (`expo-desktop-metro-config` 55.83.3, `expo-desktop-template-bare-minimum`
|
|
335
|
+
55.83.10, `expo-desktop-modules-core` and `expo-desktop-stubs` 55.0.2). Expo
|
|
336
|
+
Desktop CLI, prebuild-config and config-plugins stay on their 1.x releases.
|
|
337
|
+
React peer ranges are now `^19.2.0`.
|
|
338
|
+
|
|
339
|
+
`spark upgrade` updates the SDK-pinned dependencies and overrides in
|
|
340
|
+
`package.json`. For example:
|
|
341
|
+
|
|
342
|
+
Before:
|
|
343
|
+
```json
|
|
344
|
+
{ "dependencies": { "expo": "54.0.37", "react": "19.1.4", "react-native": "0.81.6", "react-native-macos": "0.81.7" } }
|
|
345
|
+
```
|
|
346
|
+
After:
|
|
347
|
+
```json
|
|
348
|
+
{ "dependencies": { "expo": "55.0.32", "react": "19.2.0", "react-native": "0.83.10", "react-native-macos": "0.83.0" } }
|
|
349
|
+
```
|
|
350
|
+
|
|
351
|
+
It does not move Expo modules that only your app depends on (for example
|
|
352
|
+
`expo-image` or `expo-camera`). Move those to their Expo SDK 55 versions, then
|
|
353
|
+
review the Expo SDK 55 and React Native
|
|
354
|
+
0.83 changelogs for APIs your app code and custom native modules use. Run
|
|
355
|
+
`spark doctor`, your typecheck and tests, rebuild custom runtimes
|
|
356
|
+
(`spark build --dev`), and exercise your app's desktop flows.
|
|
357
|
+
|
|
358
|
+
On Android, `@legendapp/spark/ui` `Select` segments now expose radio-button
|
|
359
|
+
accessibility semantics, so screen readers announce the selected option.
|
|
360
|
+
|
|
361
|
+
The `--universal` hint printed by the creator now names an exact
|
|
362
|
+
`npx @legendapp/create-spark@<version>` command.
|
|
363
|
+
|
|
364
|
+
### Camera and optional backends
|
|
365
|
+
|
|
366
|
+
`@legendapp/spark/camera` was removed. Install
|
|
367
|
+
`react-native-vision-camera@5.2.3` and `react-native-nitro-image@0.15.2` in your
|
|
368
|
+
app, with `react-native-nitro-modules@0.37.0`. Import camera APIs directly from
|
|
369
|
+
`react-native-vision-camera`, and `NitroImage` / `Image` from
|
|
370
|
+
`react-native-nitro-image`. Spark still applies its version-pinned native patches
|
|
371
|
+
automatically when your app depends on these libraries. Rebuild custom runtimes.
|
|
372
|
+
|
|
373
|
+
The `/markdown`, `/html`, `/webview`, and `/sqlite` APIs remain available, but
|
|
374
|
+
Spark no longer installs their backends. Add only the libraries your app uses
|
|
375
|
+
to its own `dependencies`, retaining the SDK's tested overrides:
|
|
376
|
+
|
|
377
|
+
| Spark import | App dependency |
|
|
378
|
+
| --- | --- |
|
|
379
|
+
| `@legendapp/spark/markdown` | `react-native-enriched-markdown@1.1.1` |
|
|
380
|
+
| `@legendapp/spark/html` | `react-native-enriched-html@1.1.1` |
|
|
381
|
+
| `@legendapp/spark/webview` | `react-native-webview@16.0.0` |
|
|
382
|
+
| `@legendapp/spark/sqlite` | `@op-engineering/op-sqlite@18.2.1` |
|
|
383
|
+
|
|
384
|
+
For WebView and SQLite, keep the matching patched SDK archive override supplied
|
|
385
|
+
by `spark upgrade` or `spark add desktop`. Run your package manager's install,
|
|
386
|
+
then `spark doctor` and rebuild custom runtimes. Native discovery and patching
|
|
387
|
+
activate only for installed app dependencies; optional peers alone do not select
|
|
388
|
+
native code. Nitro Modules and Runtimes remain hard dependencies.
|
|
389
|
+
|
|
390
|
+
Universal apps targeting Windows must exclude `react-native-enriched-html` and
|
|
391
|
+
`react-native-enriched-markdown` in `expoByPlatform.windows.autolinking.exclude`
|
|
392
|
+
in `desktop.config.json`, because these backends have no Windows implementation.
|
|
393
|
+
|
|
394
|
+
The `/native` `NativeConfiguration` type now describes only Spark's emitted
|
|
395
|
+
`platforms` and `dependencies` overrides; use your own CLI configuration type for
|
|
396
|
+
extra project or dependency fields, preserved by `withSparkNative`.
|
|
397
|
+
|
|
398
|
+
New apps now get a placeholder bundle ID, `com.example.<app-name>`, instead of
|
|
399
|
+
`so.legend.spark.prototype.<app-name>`. Pass `--bundle-id com.yourcompany.myapp`
|
|
400
|
+
to `create` to choose one up front, or change `bundleIdentifier` in
|
|
401
|
+
`desktop.config.json` before you ship. Release builds warn while the ID still
|
|
402
|
+
starts with `com.example.`. Existing apps keep their ID.
|
|
403
|
+
|
|
404
|
+
`spark dev` no longer hangs on "Waiting for Watchman `watch-project`" when
|
|
405
|
+
Watchman stops responding. After 10 seconds it starts Metro without Watchman
|
|
406
|
+
for that session and suggests `watchman watch-del-all && watchman shutdown-server`
|
|
407
|
+
to fix it.
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@legendapp/spark-ai",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.2",
|
|
4
4
|
"private": true,
|
|
5
5
|
"main": "src/index.ts",
|
|
6
6
|
"react-native": "src/index.ts",
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@legendapp/spark-desktop-app": "0.0.
|
|
9
|
-
"@legendapp/spark-processes": "0.0.
|
|
8
|
+
"@legendapp/spark-desktop-app": "0.0.2",
|
|
9
|
+
"@legendapp/spark-processes": "0.0.2"
|
|
10
10
|
},
|
|
11
11
|
"peerDependencies": {
|
|
12
|
-
"react": "^19.
|
|
13
|
-
"react-native": "0.
|
|
12
|
+
"react": "^19.2.0",
|
|
13
|
+
"react-native": "0.83.10"
|
|
14
14
|
},
|
|
15
15
|
"license": "MIT",
|
|
16
16
|
"files": [
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@legendapp/spark-audio",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.2",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "src/index",
|
|
6
6
|
"react-native": "src/index",
|
|
@@ -11,9 +11,9 @@
|
|
|
11
11
|
"*.podspec"
|
|
12
12
|
],
|
|
13
13
|
"peerDependencies": {
|
|
14
|
-
"react": "^19.
|
|
15
|
-
"react-native": "0.
|
|
16
|
-
"expo-audio": "
|
|
14
|
+
"react": "^19.2.0",
|
|
15
|
+
"react-native": "0.83.10",
|
|
16
|
+
"expo-audio": "55.0.18"
|
|
17
17
|
},
|
|
18
18
|
"peerDependenciesMeta": {
|
|
19
19
|
"expo-audio": {
|
|
@@ -47,6 +47,6 @@
|
|
|
47
47
|
},
|
|
48
48
|
"private": true,
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"@legendapp/spark-desktop-app": "0.0.
|
|
50
|
+
"@legendapp/spark-desktop-app": "0.0.2"
|
|
51
51
|
}
|
|
52
52
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./desktop";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@legendapp/spark-auth-session",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.2",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "src/index",
|
|
6
6
|
"react-native": "src/index",
|
|
@@ -8,14 +8,14 @@
|
|
|
8
8
|
"src"
|
|
9
9
|
],
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@legendapp/spark-desktop-links": "0.0.
|
|
11
|
+
"@legendapp/spark-desktop-links": "0.0.2",
|
|
12
12
|
"base64-js": "1.5.1",
|
|
13
|
-
"@legendapp/spark-desktop-app": "0.0.
|
|
13
|
+
"@legendapp/spark-desktop-app": "0.0.2"
|
|
14
14
|
},
|
|
15
15
|
"peerDependencies": {
|
|
16
|
-
"react-native": "0.
|
|
17
|
-
"expo-web-browser": "~
|
|
18
|
-
"expo-crypto": "~
|
|
16
|
+
"react-native": "0.83.10",
|
|
17
|
+
"expo-web-browser": "~55.0.20",
|
|
18
|
+
"expo-crypto": "~55.0.19"
|
|
19
19
|
},
|
|
20
20
|
"peerDependenciesMeta": {
|
|
21
21
|
"expo-web-browser": {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./index.ts";
|
|
@@ -58,7 +58,7 @@ export async function addDesktop(root, manifestFile) {
|
|
|
58
58
|
const req = createRequire(pkgFile);
|
|
59
59
|
const installed = (name) => readJson(req.resolve(`${name}/package.json`)).version;
|
|
60
60
|
// Never upgrade the mobile baseline as a side effect of adding desktop.
|
|
61
|
-
for (const [name, version] of Object.entries({ expo: "
|
|
61
|
+
for (const [name, version] of Object.entries({ expo: "55.0.32", "react-native": "0.83.10", react: "19.2.0" })) {
|
|
62
62
|
let actual;
|
|
63
63
|
try {
|
|
64
64
|
actual = installed(name);
|
|
@@ -161,7 +161,7 @@ export async function addDesktop(root, manifestFile) {
|
|
|
161
161
|
}
|
|
162
162
|
// Resolve local transitive SDK packages without replacing any mobile pins.
|
|
163
163
|
const vendor = ["@react-native-runtimes/core", "react-native-nitro-modules", "@op-engineering/op-sqlite", "react-native-webview"];
|
|
164
|
-
const overrides = { ...Object.fromEntries(local.map(name => [name, dependencies[name]])), "@expo/cli": "
|
|
164
|
+
const overrides = { ...Object.fromEntries(local.map(name => [name, dependencies[name]])), "@expo/cli": "55.0.37",
|
|
165
165
|
"react-native-macos": defaults.overrides["react-native-macos"], "react-native-windows": defaults.overrides["react-native-windows"] };
|
|
166
166
|
for (const name of vendor) {
|
|
167
167
|
if (archives[name]) {
|
|
@@ -134,6 +134,11 @@ export async function analyze(root) {
|
|
|
134
134
|
].join("\n"));
|
|
135
135
|
return result;
|
|
136
136
|
}
|
|
137
|
+
export function warnExampleBundleId(config) {
|
|
138
|
+
const id = config.expo?.macos?.bundleIdentifier;
|
|
139
|
+
if (id?.startsWith("com.example."))
|
|
140
|
+
console.warn(`Warning: the bundle ID is still the placeholder ${id}. Change bundleIdentifier in desktop.config.json to an ID you own before you distribute this app.`);
|
|
141
|
+
}
|
|
137
142
|
export async function build(root, mode, force = false) {
|
|
138
143
|
assertNativePatchPreflight(root);
|
|
139
144
|
const lock = stateFile(root, "build.lock");
|
|
@@ -176,6 +181,8 @@ async function buildUnlocked(root, mode, force) {
|
|
|
176
181
|
if (projectPlatform(root) === "windows")
|
|
177
182
|
return buildWindows(root, mode, force);
|
|
178
183
|
prepareConfig(root);
|
|
184
|
+
if (mode === "release")
|
|
185
|
+
warnExampleBundleId(readAppConfig(root));
|
|
179
186
|
if (mode === "go") {
|
|
180
187
|
const issues = goConfigurationIssues(readAppConfig(root));
|
|
181
188
|
if (issues.length)
|
|
@@ -194,7 +201,9 @@ async function buildUnlocked(root, mode, force) {
|
|
|
194
201
|
if (productionHash)
|
|
195
202
|
runtime.fingerprint = digest(runtime.fingerprint + productionHash);
|
|
196
203
|
const resultFile = stateFile(root, `${mode}-build.json`);
|
|
204
|
+
// RNW's CLI config probes for PowerShell when Expo autolinking loads it on macOS.
|
|
197
205
|
const excludedNames = [...new Set([
|
|
206
|
+
"react-native-windows",
|
|
198
207
|
...(readAppConfig(root).expo.autolinking?.exclude ?? []),
|
|
199
208
|
...chosen.excluded.map((p) => p.name),
|
|
200
209
|
])];
|
|
@@ -259,7 +268,7 @@ async function buildUnlocked(root, mode, force) {
|
|
|
259
268
|
"--platform",
|
|
260
269
|
"macos",
|
|
261
270
|
"--template",
|
|
262
|
-
"expo-desktop-template-bare-minimum@
|
|
271
|
+
"expo-desktop-template-bare-minimum@55.83.10",
|
|
263
272
|
"--no-install",
|
|
264
273
|
// Template renaming is not idempotent (HelloWorld becomes
|
|
265
274
|
// LegendHelloWorld, then LegendLegendHelloWorld). Native projects
|
|
@@ -324,7 +333,7 @@ async function buildUnlocked(root, mode, force) {
|
|
|
324
333
|
"CODE_SIGNING_ALLOWED=NO",
|
|
325
334
|
...(mode === "release" ? macOSReleaseSettings : []),
|
|
326
335
|
"-jobs",
|
|
327
|
-
"8",
|
|
336
|
+
/^\d+$/.test(process.env.SPARK_XCODEBUILD_JOBS ?? "") ? process.env.SPARK_XCODEBUILD_JOBS : "8",
|
|
328
337
|
"build",
|
|
329
338
|
], {
|
|
330
339
|
// Absolute, like analysis: Metro resolves a relative entry from its server root.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { parseArgs } from "node:util";
|
|
2
2
|
import { buildMode } from "./build-mode.js";
|
|
3
3
|
const options = {
|
|
4
|
-
example: { type: "string" }, "package-manager": { type: "string" },
|
|
4
|
+
example: { type: "string" }, "package-manager": { type: "string" }, "bundle-id": { type: "string" },
|
|
5
5
|
runtime: { type: "string", multiple: true }, universal: { type: "boolean" },
|
|
6
6
|
device: { type: "string" }, project: { type: "string" }, platform: { type: "string" },
|
|
7
7
|
packages: { type: "string" }, port: { type: "string" }, runner: { type: "boolean" },
|
|
@@ -9,7 +9,7 @@ const options = {
|
|
|
9
9
|
force: { type: "boolean" }, "dry-run": { type: "boolean" }, "submission-id": { type: "string" }, help: { type: "boolean", short: "h" },
|
|
10
10
|
};
|
|
11
11
|
const commands = {
|
|
12
|
-
create: { flags: ["example", "package-manager", "universal", "platform", "packages"], arguments: [1, 1] },
|
|
12
|
+
create: { flags: ["example", "package-manager", "bundle-id", "universal", "platform", "packages"], arguments: [1, 1] },
|
|
13
13
|
"add desktop": { flags: ["project", "packages"], arguments: [0, 0] },
|
|
14
14
|
"sdk export": { flags: ["packages", "runtime"], arguments: [1, 1] },
|
|
15
15
|
"sdk import": { flags: [], arguments: [1, 1] },
|
|
@@ -53,6 +53,8 @@ export function cliArguments(args) {
|
|
|
53
53
|
throw new Error("Port must be an integer between 1 and 65535.");
|
|
54
54
|
if (values["package-manager"] && !["npm", "pnpm", "yarn", "bun"].includes(values["package-manager"]))
|
|
55
55
|
throw new Error("Package manager must be npm, pnpm, yarn, or bun.");
|
|
56
|
+
if (values["bundle-id"] !== undefined && !/^[A-Za-z][A-Za-z0-9-]*(\.[A-Za-z0-9-]+)+$/.test(values["bundle-id"]))
|
|
57
|
+
throw new Error("Bundle ID must be reverse DNS, such as com.yourcompany.myapp.");
|
|
56
58
|
if (command === "build")
|
|
57
59
|
buildMode(values);
|
|
58
60
|
if (command === "sdk build-runner" && values.project && (values.packages || values["package-manager"]))
|