vite-plugin-specter 0.4.0 → 0.4.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/dist/client.js +7 -1
- package/dist/extension-chrome/content.js +7 -1
- package/dist/extension-chrome/manifest.json +1 -1
- package/dist/extension-firefox/content.js +7 -1
- package/dist/extension-firefox/manifest.json +1 -1
- package/dist/index.cjs +7 -1
- package/dist/index.js +7 -1
- package/extension/content.js +7 -1
- package/extension/manifest.firefox.json +1 -1
- package/extension/manifest.json +1 -1
- package/package.json +1 -1
package/dist/client.js
CHANGED
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
(function() {
|
|
2
2
|
'use strict';
|
|
3
|
-
|
|
3
|
+
// Guard against running twice on one page. Use a DOM marker (not just a
|
|
4
|
+
// window global) so the browser-extension build (isolated world) and the
|
|
5
|
+
// Vite-plugin build (page main world) can see each other and only one runs —
|
|
6
|
+
// they share the DOM but not window globals, so a per-world flag misses.
|
|
7
|
+
if (window.__specter || document.documentElement.hasAttribute('data-specter')) return;
|
|
8
|
+
window.__specter = true;
|
|
9
|
+
document.documentElement.setAttribute('data-specter', '');
|
|
4
10
|
|
|
5
11
|
// ─── Constants ──────────────────────────────────────────────────────────────
|
|
6
12
|
var PURPLE = '#AD24D3';
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
(function() {
|
|
2
2
|
'use strict';
|
|
3
|
-
|
|
3
|
+
// Guard against running twice on one page. Use a DOM marker (not just a
|
|
4
|
+
// window global) so the browser-extension build (isolated world) and the
|
|
5
|
+
// Vite-plugin build (page main world) can see each other and only one runs —
|
|
6
|
+
// they share the DOM but not window globals, so a per-world flag misses.
|
|
7
|
+
if (window.__specter || document.documentElement.hasAttribute('data-specter')) return;
|
|
8
|
+
window.__specter = true;
|
|
9
|
+
document.documentElement.setAttribute('data-specter', '');
|
|
4
10
|
|
|
5
11
|
// ─── Constants ──────────────────────────────────────────────────────────────
|
|
6
12
|
var PURPLE = '#AD24D3';
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
(function() {
|
|
2
2
|
'use strict';
|
|
3
|
-
|
|
3
|
+
// Guard against running twice on one page. Use a DOM marker (not just a
|
|
4
|
+
// window global) so the browser-extension build (isolated world) and the
|
|
5
|
+
// Vite-plugin build (page main world) can see each other and only one runs —
|
|
6
|
+
// they share the DOM but not window globals, so a per-world flag misses.
|
|
7
|
+
if (window.__specter || document.documentElement.hasAttribute('data-specter')) return;
|
|
8
|
+
window.__specter = true;
|
|
9
|
+
document.documentElement.setAttribute('data-specter', '');
|
|
4
10
|
|
|
5
11
|
// ─── Constants ──────────────────────────────────────────────────────────────
|
|
6
12
|
var PURPLE = '#AD24D3';
|
package/dist/index.cjs
CHANGED
|
@@ -30,7 +30,13 @@ function getClientScript(options) {
|
|
|
30
30
|
const activateShortcut = options.shortcuts?.activate ?? "ctrl+alt+z";
|
|
31
31
|
return `(function() {
|
|
32
32
|
'use strict';
|
|
33
|
-
|
|
33
|
+
// Guard against running twice on one page. Use a DOM marker (not just a
|
|
34
|
+
// window global) so the browser-extension build (isolated world) and the
|
|
35
|
+
// Vite-plugin build (page main world) can see each other and only one runs \u2014
|
|
36
|
+
// they share the DOM but not window globals, so a per-world flag misses.
|
|
37
|
+
if (window.__specter || document.documentElement.hasAttribute('data-specter')) return;
|
|
38
|
+
window.__specter = true;
|
|
39
|
+
document.documentElement.setAttribute('data-specter', '');
|
|
34
40
|
|
|
35
41
|
// \u2500\u2500\u2500 Constants \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500
|
|
36
42
|
var PURPLE = '#AD24D3';
|
package/dist/index.js
CHANGED
|
@@ -3,7 +3,13 @@ function getClientScript(options) {
|
|
|
3
3
|
const activateShortcut = options.shortcuts?.activate ?? "ctrl+alt+z";
|
|
4
4
|
return `(function() {
|
|
5
5
|
'use strict';
|
|
6
|
-
|
|
6
|
+
// Guard against running twice on one page. Use a DOM marker (not just a
|
|
7
|
+
// window global) so the browser-extension build (isolated world) and the
|
|
8
|
+
// Vite-plugin build (page main world) can see each other and only one runs \u2014
|
|
9
|
+
// they share the DOM but not window globals, so a per-world flag misses.
|
|
10
|
+
if (window.__specter || document.documentElement.hasAttribute('data-specter')) return;
|
|
11
|
+
window.__specter = true;
|
|
12
|
+
document.documentElement.setAttribute('data-specter', '');
|
|
7
13
|
|
|
8
14
|
// \u2500\u2500\u2500 Constants \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500
|
|
9
15
|
var PURPLE = '#AD24D3';
|
package/extension/content.js
CHANGED
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
(function() {
|
|
2
2
|
'use strict';
|
|
3
|
-
|
|
3
|
+
// Guard against running twice on one page. Use a DOM marker (not just a
|
|
4
|
+
// window global) so the browser-extension build (isolated world) and the
|
|
5
|
+
// Vite-plugin build (page main world) can see each other and only one runs —
|
|
6
|
+
// they share the DOM but not window globals, so a per-world flag misses.
|
|
7
|
+
if (window.__specter || document.documentElement.hasAttribute('data-specter')) return;
|
|
8
|
+
window.__specter = true;
|
|
9
|
+
document.documentElement.setAttribute('data-specter', '');
|
|
4
10
|
|
|
5
11
|
// ─── Constants ──────────────────────────────────────────────────────────────
|
|
6
12
|
var PURPLE = '#AD24D3';
|
package/extension/manifest.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vite-plugin-specter",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.1",
|
|
4
4
|
"description": "Inspect elements and Figma-style measure spacing in your vibe-coded Vite projects. Give your AI exactly what it needs to make the right change.",
|
|
5
5
|
"author": "Setu Kathawate <dev@setugk.com>",
|
|
6
6
|
"homepage": "https://github.com/setugk/vite-plugin-specter#readme",
|