@stnd/modules 0.13.0 → 0.13.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 CHANGED
@@ -1,5 +1,12 @@
1
1
  # @stnd/folios
2
2
 
3
+ ## 0.13.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+ - @stnd/styles@0.26.0
9
+
3
10
  ## 0.13.0
4
11
 
5
12
  ### Minor Changes
@@ -0,0 +1,38 @@
1
+ /**
2
+ * Design Lab Launcher Actions
3
+ *
4
+ * Exposes `::lab` in the command palette to open and pin the Standard Design Lab.
5
+ */
6
+ const labActions = [
7
+ {
8
+ trigger: "::lab",
9
+ meta: {
10
+ title: "Design Lab",
11
+ desc: "Inspecteur de design, tokens CSS et thèmes",
12
+ icon: "robot",
13
+ },
14
+ action: () => {
15
+ if (typeof window !== "undefined") {
16
+ const lab = window.StandardLab;
17
+ if (lab && typeof lab.open === "function") {
18
+ lab.open();
19
+ if (typeof lab.pin === "function") lab.pin();
20
+ } else {
21
+ let tries = 0;
22
+ const timer = setInterval(() => {
23
+ const l = window.StandardLab;
24
+ if (l && typeof l.open === "function") {
25
+ l.open();
26
+ if (typeof l.pin === "function") l.pin();
27
+ clearInterval(timer);
28
+ } else if (++tries > 30) {
29
+ clearInterval(timer);
30
+ }
31
+ }, 50);
32
+ }
33
+ }
34
+ },
35
+ },
36
+ ];
37
+
38
+ export default labActions;
@@ -10,7 +10,6 @@ export default {
10
10
  id: "stnd-lab",
11
11
  name: "Stnd :: Lab",
12
12
  description: "Loads the StandardLab bundle for inspector/debug tools.",
13
- environment: ["dev"],
14
13
  scripts: ["@stnd/lab"],
15
14
 
16
15
  hooks: {
@@ -22,5 +21,11 @@ export default {
22
21
  },
23
22
  },
24
23
  ],
24
+ "launcher:action": [
25
+ {
26
+ action: "./actions/lab.js",
27
+ meta: { label: "Design Lab" },
28
+ },
29
+ ],
25
30
  },
26
31
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stnd/modules",
3
- "version": "0.13.0",
3
+ "version": "0.13.1",
4
4
  "type": "module",
5
5
  "svelte": "./stripe/views/CheckoutView.svelte",
6
6
  "author": "Francis Fontaine",
@@ -17,13 +17,14 @@
17
17
  },
18
18
  "dependencies": {
19
19
  "@astrojs/sitemap": "^3.7.3",
20
+ "@stnd/client": "0.7.7",
20
21
  "@stnd/icon": "0.10.0",
22
+ "@stnd/lab": "1.6.0",
21
23
  "@stnd/layout": "0.10.0",
22
- "@stnd/client": "0.7.7",
23
24
  "@stnd/log": "0.6.0",
24
- "@stnd/utils": "0.9.0",
25
25
  "@stnd/server": "0.10.1",
26
- "@stnd/styles": "0.25.1"
26
+ "@stnd/styles": "0.26.0",
27
+ "@stnd/utils": "0.9.0"
27
28
  },
28
29
  "peerDependencies": {
29
30
  "astro": ">=5.0.0"