Merge "feat: add change device mode tool to agent" into main
diff --git a/packages/frontend/lib/features/preview/components/inspector_tree.dart b/packages/frontend/lib/features/preview/components/inspector_tree.dart
index 1ff9af6..165cdf9 100644
--- a/packages/frontend/lib/features/preview/components/inspector_tree.dart
+++ b/packages/frontend/lib/features/preview/components/inspector_tree.dart
@@ -342,7 +342,7 @@
final widgetTheme = WidgetTheme.fromName(widgetName);
if (widgetTheme.iconAsset case final assetPath?) {
- final src = '/packages/devtools_icons/$assetPath';
+ final src = 'packages/devtools_icons/$assetPath';
return img(
classes: 'tree-node-icon',
src: src,
diff --git a/packages/frontend/lib/features/project/data/project_repository.dart b/packages/frontend/lib/features/project/data/project_repository.dart
index c5a01ee..a541565 100644
--- a/packages/frontend/lib/features/project/data/project_repository.dart
+++ b/packages/frontend/lib/features/project/data/project_repository.dart
@@ -88,7 +88,7 @@
final templates = await listTemplates();
final template = templates.firstWhere((t) => t.id == templateId);
- final baseUrl = Uri.parse(web.window.location.origin);
+ final baseUrl = Uri.parse(web.window.document.baseURI);
final zipUrl = baseUrl.resolve('examples/${template.zipFileName}').toString();
final response = await web.window.fetch(zipUrl.toJS).toDart;
diff --git a/packages/frontend/pubspec.yaml b/packages/frontend/pubspec.yaml
index a1b5351..8729f78 100644
--- a/packages/frontend/pubspec.yaml
+++ b/packages/frontend/pubspec.yaml
@@ -66,6 +66,11 @@
url: https://github.com/schultek/jaspr
path: packages/jaspr_cli
ref: da22e003c20452ce743cb46a872f3d2f5fdac3f3
+ jaspr_router:
+ git:
+ url: https://github.com/schultek/jaspr
+ path: packages/jaspr_router
+ ref: da22e003c20452ce743cb46a872f3d2f5fdac3f3
universal_web:
git:
url: https://github.com/schultek/universal_web
diff --git a/packages/frontend/web/index.html b/packages/frontend/web/index.html
index c47e433..7c6d468 100644
--- a/packages/frontend/web/index.html
+++ b/packages/frontend/web/index.html
@@ -5,7 +5,13 @@
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
- <base href="./">
+
+ <script>
+ var pathname = window.location.pathname;
+ var match = pathname.match(/^\/hosting\/[^\/]+\//);
+ var baseHref = match ? match[0] : '/';
+ document.write('<base href="' + baseHref + '">');
+ </script>
<title>VibePad</title>
<link rel="icon" href="favicon.png">
@@ -23,4 +29,4 @@
<body>
</body>
-</html>
+</html>
\ No newline at end of file
diff --git a/pubspec.lock b/pubspec.lock
index 7a0395e..f1276b0 100644
--- a/pubspec.lock
+++ b/pubspec.lock
@@ -753,12 +753,13 @@
source: hosted
version: "0.5.2"
jaspr_router:
- dependency: transitive
+ dependency: "direct overridden"
description:
- name: jaspr_router
- sha256: "43abdfd63c19cae8faac50334c7f3065635bac3e85fd558b6076517978ade64a"
- url: "https://pub.dev"
- source: hosted
+ path: "packages/jaspr_router"
+ ref: da22e003c20452ce743cb46a872f3d2f5fdac3f3
+ resolved-ref: da22e003c20452ce743cb46a872f3d2f5fdac3f3
+ url: "https://github.com/schultek/jaspr"
+ source: git
version: "0.8.2"
jni:
dependency: transitive
@@ -892,10 +893,10 @@
dependency: transitive
description:
name: matcher
- sha256: dc0b7dc7651697ea4ff3e69ef44b0407ea32c487a39fff6a4004fa585e901861
+ sha256: "31bd099b47c10cd1aeb55146a2d46ce0277630ecef3f7dae54ad7873f36696cd"
url: "https://pub.dev"
source: hosted
- version: "0.12.19"
+ version: "0.12.20"
material_color_utilities:
dependency: transitive
description:
@@ -908,10 +909,10 @@
dependency: transitive
description:
name: meta
- sha256: "1741988757a65eb6b36abe716829688cf01910bbf91c34354ff7ec1c3de2b349"
+ sha256: c82594181e3312f3d0695fc95aaaf7758d75b8d4ae2bbecf223b9fd5109a059d
url: "https://pub.dev"
source: hosted
- version: "1.18.0"
+ version: "1.18.3"
mime:
dependency: transitive
description:
@@ -1329,26 +1330,26 @@
dependency: transitive
description:
name: test
- sha256: "8d9ceddbab833f180fbefed08afa76d7c03513dfdba87ffcec2718b02bbcbf20"
+ sha256: ca578dc12bb8b2f40b67b7d3bd2fac4f31c01a6ff7130a14e2597b919934507f
url: "https://pub.dev"
source: hosted
- version: "1.31.0"
+ version: "1.31.1"
test_api:
dependency: transitive
description:
name: test_api
- sha256: "949a932224383300f01be9221c39180316445ecb8e7547f70a41a35bf421fb9e"
+ sha256: "2a122cbe059f8b610d3a5415f42e255b6c17b1f21eee1d960f31080237fb4f11"
url: "https://pub.dev"
source: hosted
- version: "0.7.11"
+ version: "0.7.12"
test_core:
dependency: transitive
description:
name: test_core
- sha256: "1991d4cfe85d5043241acac92962c3977c8d2f2add1ee73130c7b286417d1d34"
+ sha256: d2e98ec12998368dc59ddd47ab709f2cd55acd6b66dc7db764455a44082f4bc5
url: "https://pub.dev"
source: hosted
- version: "0.6.17"
+ version: "0.6.18"
timezone:
dependency: transitive
description:
@@ -1394,10 +1395,10 @@
dependency: transitive
description:
name: vector_math
- sha256: d530bd74fea330e6e364cda7a85019c434070188383e1cd8d9777ee586914c5b
+ sha256: "1d774bbdf6b72a0b12122fc1560c9c2d2a67db5a4a4cc2bd8a5c990ab20e3188"
url: "https://pub.dev"
source: hosted
- version: "2.2.0"
+ version: "2.4.0"
vm_service:
dependency: transitive
description: