@frontman-ai/astro 0.2.3 → 0.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1622 -451
- package/dist/integration.js +1606 -435
- package/dist/toolbar.js +56 -22
- package/package.json +5 -1
package/dist/toolbar.js
CHANGED
|
@@ -1,29 +1,63 @@
|
|
|
1
1
|
import * as Toolbar from 'astro/toolbar';
|
|
2
2
|
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
3
|
+
// ../../node_modules/@rescript/runtime/lib/es6/Primitive_option.js
|
|
4
|
+
function some(x) {
|
|
5
|
+
if (x === void 0) {
|
|
6
|
+
return {
|
|
7
|
+
BS_PRIVATE_NESTED_SOME_NONE: 0
|
|
8
|
+
};
|
|
9
|
+
} else if (x !== null && x.BS_PRIVATE_NESTED_SOME_NONE !== void 0) {
|
|
10
|
+
return {
|
|
11
|
+
BS_PRIVATE_NESTED_SOME_NONE: x.BS_PRIVATE_NESTED_SOME_NONE + 1 | 0
|
|
12
|
+
};
|
|
13
|
+
} else {
|
|
14
|
+
return x;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
function fromNull(x) {
|
|
18
|
+
if (x === null) {
|
|
19
|
+
return;
|
|
20
|
+
} else {
|
|
21
|
+
return some(x);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
function valFromOption(x) {
|
|
25
|
+
if (x === null || x.BS_PRIVATE_NESTED_SOME_NONE === void 0) {
|
|
26
|
+
return x;
|
|
27
|
+
}
|
|
28
|
+
let depth = x.BS_PRIVATE_NESTED_SOME_NONE;
|
|
29
|
+
if (depth === 0) {
|
|
30
|
+
return;
|
|
31
|
+
} else {
|
|
32
|
+
return {
|
|
33
|
+
BS_PRIVATE_NESTED_SOME_NONE: depth - 1 | 0
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
// ../../node_modules/@rescript/runtime/lib/es6/Stdlib_Option.js
|
|
39
|
+
function getOr(opt, $$default2) {
|
|
40
|
+
if (opt !== void 0) {
|
|
41
|
+
return valFromOption(opt);
|
|
42
|
+
} else {
|
|
43
|
+
return $$default2;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
function app_init(_canvas, app2, _server) {
|
|
47
|
+
app2.onToggled((param) => {
|
|
48
|
+
if (!param.state) {
|
|
23
49
|
return;
|
|
24
50
|
}
|
|
25
|
-
|
|
26
|
-
|
|
51
|
+
let meta = document.querySelector(`meta[name="frontman-base-path"]`);
|
|
52
|
+
let basePath = meta !== null ? getOr(fromNull(meta.getAttribute("content")), "frontman") : "frontman";
|
|
53
|
+
window.location.assign(`/` + basePath + `/`);
|
|
54
|
+
app2.toggleState({
|
|
55
|
+
state: false
|
|
56
|
+
});
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
var app = {
|
|
60
|
+
init: app_init
|
|
27
61
|
};
|
|
28
62
|
var $$default = Toolbar.defineToolbarApp(app);
|
|
29
63
|
var Bindings;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@frontman-ai/astro",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.4",
|
|
4
4
|
"description": "Astro integration for Frontman",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Frontman AI",
|
|
@@ -21,6 +21,10 @@
|
|
|
21
21
|
"devtools",
|
|
22
22
|
"dev-toolbar",
|
|
23
23
|
"ai",
|
|
24
|
+
"browser",
|
|
25
|
+
"visual-editing",
|
|
26
|
+
"developer-tools",
|
|
27
|
+
"frontend",
|
|
24
28
|
"development"
|
|
25
29
|
],
|
|
26
30
|
"type": "module",
|