@grove-dev/astro 0.2.2 → 0.2.6

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.
Files changed (105) hide show
  1. package/LICENSE +21 -0
  2. package/package.json +4 -4
  3. package/src/components/ItemCard.astro +35 -18
  4. package/src/components/{AppSection.astro → RecordSection.astro} +11 -6
  5. package/templates/default/src/data/records.ts +61 -29
  6. package/templates/default/src/pages/index.astro +23 -18
  7. package/templates/default/.astro/content.d.ts +0 -155
  8. package/templates/default/.astro/settings.json +0 -5
  9. package/templates/default/.astro/types.d.ts +0 -2
  10. package/templates/default/dist/_astro/BaseLayout.DfpwR3jc.css +0 -1
  11. package/templates/default/dist/about/index.html +0 -165
  12. package/templates/default/dist/icons/platforms/android.svg +0 -1
  13. package/templates/default/dist/icons/platforms/apple-dark.svg +0 -1
  14. package/templates/default/dist/icons/platforms/apple-light.svg +0 -1
  15. package/templates/default/dist/icons/platforms/chrome.svg +0 -1
  16. package/templates/default/dist/icons/platforms/chromeos.svg +0 -5
  17. package/templates/default/dist/icons/platforms/desktop.svg +0 -4
  18. package/templates/default/dist/icons/platforms/embedded.svg +0 -5
  19. package/templates/default/dist/icons/platforms/ios.svg +0 -1
  20. package/templates/default/dist/icons/platforms/linux.svg +0 -1
  21. package/templates/default/dist/icons/platforms/macos.svg +0 -1
  22. package/templates/default/dist/icons/platforms/ubuntu.svg +0 -1
  23. package/templates/default/dist/icons/platforms/web.svg +0 -5
  24. package/templates/default/dist/icons/platforms/windows.svg +0 -6
  25. package/templates/default/dist/icons/stacks/android.svg +0 -1
  26. package/templates/default/dist/icons/stacks/apple-dark.svg +0 -1
  27. package/templates/default/dist/icons/stacks/apple-light.svg +0 -1
  28. package/templates/default/dist/icons/stacks/capacitor.svg +0 -14
  29. package/templates/default/dist/icons/stacks/dart.svg +0 -1
  30. package/templates/default/dist/icons/stacks/firebase.svg +0 -1
  31. package/templates/default/dist/icons/stacks/flutter.svg +0 -1
  32. package/templates/default/dist/icons/stacks/graphql.svg +0 -1
  33. package/templates/default/dist/icons/stacks/ionic.svg +0 -4
  34. package/templates/default/dist/icons/stacks/java.svg +0 -1
  35. package/templates/default/dist/icons/stacks/javascript.svg +0 -1
  36. package/templates/default/dist/icons/stacks/kotlin.svg +0 -1
  37. package/templates/default/dist/icons/stacks/mongodb.svg +0 -1
  38. package/templates/default/dist/icons/stacks/nodejs.svg +0 -1
  39. package/templates/default/dist/icons/stacks/python.svg +0 -1
  40. package/templates/default/dist/icons/stacks/react-native.svg +0 -1
  41. package/templates/default/dist/icons/stacks/react.svg +0 -1
  42. package/templates/default/dist/icons/stacks/rust.svg +0 -1
  43. package/templates/default/dist/icons/stacks/solidity.svg +0 -1
  44. package/templates/default/dist/icons/stacks/swift.svg +0 -1
  45. package/templates/default/dist/icons/stacks/tensorflow.svg +0 -1
  46. package/templates/default/dist/icons/stacks/typescript.svg +0 -1
  47. package/templates/default/dist/index.html +0 -55
  48. package/templates/default/dist/llms-full.txt +0 -14
  49. package/templates/default/dist/llms.txt +0 -11
  50. package/templates/default/dist/og-image.svg +0 -48
  51. package/templates/default/dist/projects/index.html +0 -61
  52. package/templates/default/dist/robots.txt +0 -53
  53. package/templates/default/dist/sitemap.xml +0 -21
  54. package/templates/default/dist/submit/index.html +0 -69
  55. package/templates/default/node_modules/.bin/astro +0 -21
  56. package/templates/default/node_modules/.bin/astro-check +0 -21
  57. package/templates/default/node_modules/.bin/grove +0 -21
  58. package/templates/default/node_modules/.bin/jiti +0 -21
  59. package/templates/default/node_modules/.bin/prettier +0 -21
  60. package/templates/default/node_modules/.bin/rollup +0 -21
  61. package/templates/default/node_modules/.bin/tsc +0 -21
  62. package/templates/default/node_modules/.bin/tsserver +0 -21
  63. package/templates/default/node_modules/.bin/tsx +0 -21
  64. package/templates/default/node_modules/.bin/vite +0 -21
  65. package/templates/default/node_modules/.bin/yaml +0 -21
  66. package/templates/default/node_modules/.vite/deps/_metadata.json +0 -79
  67. package/templates/default/node_modules/.vite/deps/astro-KRVZHBC5.js +0 -433
  68. package/templates/default/node_modules/.vite/deps/astro-KRVZHBC5.js.map +0 -7
  69. package/templates/default/node_modules/.vite/deps/astro___aria-query.js +0 -5
  70. package/templates/default/node_modules/.vite/deps/astro___aria-query.js.map +0 -7
  71. package/templates/default/node_modules/.vite/deps/astro___axobject-query.js +0 -5
  72. package/templates/default/node_modules/.vite/deps/astro___axobject-query.js.map +0 -7
  73. package/templates/default/node_modules/.vite/deps/astro___html-escaper.js +0 -9
  74. package/templates/default/node_modules/.vite/deps/astro___html-escaper.js.map +0 -7
  75. package/templates/default/node_modules/.vite/deps/astro_runtime_client_dev-toolbar_entrypoint__js.js +0 -241
  76. package/templates/default/node_modules/.vite/deps/astro_runtime_client_dev-toolbar_entrypoint__js.js.map +0 -7
  77. package/templates/default/node_modules/.vite/deps/audit-GYHQ3ITH.js +0 -1592
  78. package/templates/default/node_modules/.vite/deps/audit-GYHQ3ITH.js.map +0 -7
  79. package/templates/default/node_modules/.vite/deps/chunk-5WRI5ZAA.js +0 -30
  80. package/templates/default/node_modules/.vite/deps/chunk-5WRI5ZAA.js.map +0 -7
  81. package/templates/default/node_modules/.vite/deps/chunk-7P4KIK53.js +0 -186
  82. package/templates/default/node_modules/.vite/deps/chunk-7P4KIK53.js.map +0 -7
  83. package/templates/default/node_modules/.vite/deps/chunk-BQGHFQJH.js +0 -48
  84. package/templates/default/node_modules/.vite/deps/chunk-BQGHFQJH.js.map +0 -7
  85. package/templates/default/node_modules/.vite/deps/chunk-CJCDKWP2.js +0 -6779
  86. package/templates/default/node_modules/.vite/deps/chunk-CJCDKWP2.js.map +0 -7
  87. package/templates/default/node_modules/.vite/deps/chunk-FHJ3XBDE.js +0 -33
  88. package/templates/default/node_modules/.vite/deps/chunk-FHJ3XBDE.js.map +0 -7
  89. package/templates/default/node_modules/.vite/deps/chunk-FQEMNIUQ.js +0 -88
  90. package/templates/default/node_modules/.vite/deps/chunk-FQEMNIUQ.js.map +0 -7
  91. package/templates/default/node_modules/.vite/deps/chunk-HBSVDAQD.js +0 -72
  92. package/templates/default/node_modules/.vite/deps/chunk-HBSVDAQD.js.map +0 -7
  93. package/templates/default/node_modules/.vite/deps/chunk-HDOQ2U3U.js +0 -3757
  94. package/templates/default/node_modules/.vite/deps/chunk-HDOQ2U3U.js.map +0 -7
  95. package/templates/default/node_modules/.vite/deps/chunk-XEBKRCNE.js +0 -54
  96. package/templates/default/node_modules/.vite/deps/chunk-XEBKRCNE.js.map +0 -7
  97. package/templates/default/node_modules/.vite/deps/package.json +0 -3
  98. package/templates/default/node_modules/.vite/deps/settings-C5H4VHXU.js +0 -213
  99. package/templates/default/node_modules/.vite/deps/settings-C5H4VHXU.js.map +0 -7
  100. package/templates/default/node_modules/.vite/deps/toolbar-H5DB6HVP.js +0 -525
  101. package/templates/default/node_modules/.vite/deps/toolbar-H5DB6HVP.js.map +0 -7
  102. package/templates/default/node_modules/.vite/deps/ui-library-JGHU6JE2.js +0 -1020
  103. package/templates/default/node_modules/.vite/deps/ui-library-JGHU6JE2.js.map +0 -7
  104. package/templates/default/node_modules/.vite/deps/xray-EFCQOW4E.js +0 -147
  105. package/templates/default/node_modules/.vite/deps/xray-EFCQOW4E.js.map +0 -7
@@ -1,33 +0,0 @@
1
- // ../../../../node_modules/.pnpm/html-escaper@3.0.3/node_modules/html-escaper/esm/index.js
2
- var { replace } = "";
3
- var es = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34);/g;
4
- var ca = /[&<>'"]/g;
5
- var esca = {
6
- "&": "&amp;",
7
- "<": "&lt;",
8
- ">": "&gt;",
9
- "'": "&#39;",
10
- '"': "&quot;"
11
- };
12
- var pe = (m) => esca[m];
13
- var escape = (es2) => replace.call(es2, ca, pe);
14
- var unes = {
15
- "&amp;": "&",
16
- "&#38;": "&",
17
- "&lt;": "<",
18
- "&#60;": "<",
19
- "&gt;": ">",
20
- "&#62;": ">",
21
- "&apos;": "'",
22
- "&#39;": "'",
23
- "&quot;": '"',
24
- "&#34;": '"'
25
- };
26
- var cape = (m) => unes[m];
27
- var unescape = (un) => replace.call(un, es, cape);
28
-
29
- export {
30
- escape,
31
- unescape
32
- };
33
- //# sourceMappingURL=chunk-FHJ3XBDE.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../../../../../node_modules/.pnpm/html-escaper@3.0.3/node_modules/html-escaper/esm/index.js"],
4
- "sourcesContent": ["/**\n * Copyright (C) 2017-present by Andrea Giammarchi - @WebReflection\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\nconst {replace} = '';\n\n// escape\nconst es = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34);/g;\nconst ca = /[&<>'\"]/g;\n\nconst esca = {\n '&': '&amp;',\n '<': '&lt;',\n '>': '&gt;',\n \"'\": '&#39;',\n '\"': '&quot;'\n};\nconst pe = m => esca[m];\n\n/**\n * Safely escape HTML entities such as `&`, `<`, `>`, `\"`, and `'`.\n * @param {string} es the input to safely escape\n * @returns {string} the escaped input, and it **throws** an error if\n * the input type is unexpected, except for boolean and numbers,\n * converted as string.\n */\nexport const escape = es => replace.call(es, ca, pe);\n\n\n// unescape\nconst unes = {\n '&amp;': '&',\n '&#38;': '&',\n '&lt;': '<',\n '&#60;': '<',\n '&gt;': '>',\n '&#62;': '>',\n '&apos;': \"'\",\n '&#39;': \"'\",\n '&quot;': '\"',\n '&#34;': '\"'\n};\nconst cape = m => unes[m];\n\n/**\n * Safely unescape previously escaped entities such as `&`, `<`, `>`, `\"`,\n * and `'`.\n * @param {string} un a previously escaped string\n * @returns {string} the unescaped input, and it **throws** an error if\n * the input type is unexpected, except for boolean and numbers,\n * converted as string.\n */\nexport const unescape = un => replace.call(un, es, cape);\n"],
5
- "mappings": ";AAsBA,IAAM,EAAC,QAAO,IAAI;AAGlB,IAAM,KAAK;AACX,IAAM,KAAK;AAEX,IAAM,OAAO;AAAA,EACX,KAAK;AAAA,EACL,KAAK;AAAA,EACL,KAAK;AAAA,EACL,KAAK;AAAA,EACL,KAAK;AACP;AACA,IAAM,KAAK,OAAK,KAAK,CAAC;AASf,IAAM,SAAS,CAAAA,QAAM,QAAQ,KAAKA,KAAI,IAAI,EAAE;AAInD,IAAM,OAAO;AAAA,EACX,SAAS;AAAA,EACT,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,UAAU;AAAA,EACV,SAAS;AAAA,EACT,UAAU;AAAA,EACV,SAAS;AACX;AACA,IAAM,OAAO,OAAK,KAAK,CAAC;AAUjB,IAAM,WAAW,QAAM,QAAQ,KAAK,IAAI,IAAI,IAAI;",
6
- "names": ["es"]
7
- }
@@ -1,88 +0,0 @@
1
- // ../../../../node_modules/.pnpm/astro@6.4.5_@types+node@25.9.2_jiti@2.7.0_lightningcss@1.32.0_rollup@4.61.1_tsx@4.22.4_yaml@2.9.0/node_modules/astro/dist/runtime/client/dev-toolbar/helpers.js
2
- var ToolbarAppEventTarget = class extends EventTarget {
3
- constructor() {
4
- super();
5
- }
6
- /**
7
- * Toggle the notification state of the toolbar
8
- * @param options - The notification options
9
- * @param options.state - The state of the notification
10
- * @param options.level - The level of the notification, optional when state is false
11
- */
12
- toggleNotification(options) {
13
- this.dispatchEvent(
14
- new CustomEvent("toggle-notification", {
15
- detail: {
16
- state: options.state,
17
- level: options.state === true ? options.level : void 0
18
- }
19
- })
20
- );
21
- }
22
- /**
23
- * Toggle the app state on or off
24
- * @param options - The app state options
25
- * @param options.state - The new state of the app
26
- */
27
- toggleState(options) {
28
- this.dispatchEvent(
29
- new CustomEvent("toggle-app", {
30
- detail: {
31
- state: options.state
32
- }
33
- })
34
- );
35
- }
36
- /**
37
- * Fired when the app is toggled on or off
38
- * @param callback - The callback to run when the event is fired, takes an object with the new state
39
- */
40
- onToggled(callback) {
41
- this.addEventListener("app-toggled", (evt) => {
42
- if (!(evt instanceof CustomEvent)) return;
43
- callback(evt.detail);
44
- });
45
- }
46
- /**
47
- * Fired when the toolbar placement is updated by the user
48
- * @param callback - The callback to run when the event is fired, takes an object with the new placement
49
- */
50
- onToolbarPlacementUpdated(callback) {
51
- this.addEventListener("placement-updated", (evt) => {
52
- if (!(evt instanceof CustomEvent)) return;
53
- callback(evt.detail);
54
- });
55
- }
56
- };
57
- var serverHelpers = {
58
- /**
59
- * Send a message to the server, the payload can be any serializable data.
60
- *
61
- * The server can listen for this message in the `astro:server:config` hook of an Astro integration, using the `toolbar.on` method.
62
- *
63
- * @param event - The event name
64
- * @param payload - The payload to send
65
- */
66
- send: (event, payload) => {
67
- if (import.meta.hot) {
68
- import.meta.hot.send(event, payload);
69
- }
70
- },
71
- /**
72
- * Receive a message from the server.
73
- * @param event - The event name
74
- * @param callback - The callback to run when the event is received.
75
- * The payload's content will be passed to the callback as an argument
76
- */
77
- on: (event, callback) => {
78
- if (import.meta.hot) {
79
- import.meta.hot.on(event, callback);
80
- }
81
- }
82
- };
83
-
84
- export {
85
- ToolbarAppEventTarget,
86
- serverHelpers
87
- };
88
- //# sourceMappingURL=chunk-FQEMNIUQ.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../../../../../node_modules/.pnpm/astro@6.4.5_@types+node@25.9.2_jiti@2.7.0_lightningcss@1.32.0_rollup@4.61.1_tsx@4.22.4_yaml@2.9.0/node_modules/astro/dist/runtime/client/dev-toolbar/helpers.js"],
4
- "sourcesContent": ["class ToolbarAppEventTarget extends EventTarget {\n constructor() {\n super();\n }\n /**\n * Toggle the notification state of the toolbar\n * @param options - The notification options\n * @param options.state - The state of the notification\n * @param options.level - The level of the notification, optional when state is false\n */\n toggleNotification(options) {\n this.dispatchEvent(\n new CustomEvent(\"toggle-notification\", {\n detail: {\n state: options.state,\n level: options.state === true ? options.level : void 0\n }\n })\n );\n }\n /**\n * Toggle the app state on or off\n * @param options - The app state options\n * @param options.state - The new state of the app\n */\n toggleState(options) {\n this.dispatchEvent(\n new CustomEvent(\"toggle-app\", {\n detail: {\n state: options.state\n }\n })\n );\n }\n /**\n * Fired when the app is toggled on or off\n * @param callback - The callback to run when the event is fired, takes an object with the new state\n */\n onToggled(callback) {\n this.addEventListener(\"app-toggled\", (evt) => {\n if (!(evt instanceof CustomEvent)) return;\n callback(evt.detail);\n });\n }\n /**\n * Fired when the toolbar placement is updated by the user\n * @param callback - The callback to run when the event is fired, takes an object with the new placement\n */\n onToolbarPlacementUpdated(callback) {\n this.addEventListener(\"placement-updated\", (evt) => {\n if (!(evt instanceof CustomEvent)) return;\n callback(evt.detail);\n });\n }\n}\nconst serverHelpers = {\n /**\n * Send a message to the server, the payload can be any serializable data.\n *\n * The server can listen for this message in the `astro:server:config` hook of an Astro integration, using the `toolbar.on` method.\n *\n * @param event - The event name\n * @param payload - The payload to send\n */\n send: (event, payload) => {\n if (import.meta.hot) {\n import.meta.hot.send(event, payload);\n }\n },\n /**\n * Receive a message from the server.\n * @param event - The event name\n * @param callback - The callback to run when the event is received.\n * The payload's content will be passed to the callback as an argument\n */\n on: (event, callback) => {\n if (import.meta.hot) {\n import.meta.hot.on(event, callback);\n }\n }\n};\nexport {\n ToolbarAppEventTarget,\n serverHelpers\n};\n"],
5
- "mappings": ";AAAA,IAAM,wBAAN,cAAoC,YAAY;AAAA,EAC9C,cAAc;AACZ,UAAM;AAAA,EACR;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOA,mBAAmB,SAAS;AAC1B,SAAK;AAAA,MACH,IAAI,YAAY,uBAAuB;AAAA,QACrC,QAAQ;AAAA,UACN,OAAO,QAAQ;AAAA,UACf,OAAO,QAAQ,UAAU,OAAO,QAAQ,QAAQ;AAAA,QAClD;AAAA,MACF,CAAC;AAAA,IACH;AAAA,EACF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,YAAY,SAAS;AACnB,SAAK;AAAA,MACH,IAAI,YAAY,cAAc;AAAA,QAC5B,QAAQ;AAAA,UACN,OAAO,QAAQ;AAAA,QACjB;AAAA,MACF,CAAC;AAAA,IACH;AAAA,EACF;AAAA;AAAA;AAAA;AAAA;AAAA,EAKA,UAAU,UAAU;AAClB,SAAK,iBAAiB,eAAe,CAAC,QAAQ;AAC5C,UAAI,EAAE,eAAe,aAAc;AACnC,eAAS,IAAI,MAAM;AAAA,IACrB,CAAC;AAAA,EACH;AAAA;AAAA;AAAA;AAAA;AAAA,EAKA,0BAA0B,UAAU;AAClC,SAAK,iBAAiB,qBAAqB,CAAC,QAAQ;AAClD,UAAI,EAAE,eAAe,aAAc;AACnC,eAAS,IAAI,MAAM;AAAA,IACrB,CAAC;AAAA,EACH;AACF;AACA,IAAM,gBAAgB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASpB,MAAM,CAAC,OAAO,YAAY;AACxB,QAAI,YAAY,KAAK;AACnB,kBAAY,IAAI,KAAK,OAAO,OAAO;AAAA,IACrC;AAAA,EACF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOA,IAAI,CAAC,OAAO,aAAa;AACvB,QAAI,YAAY,KAAK;AACnB,kBAAY,IAAI,GAAG,OAAO,QAAQ;AAAA,IACpC;AAAA,EACF;AACF;",
6
- "names": []
7
- }
@@ -1,72 +0,0 @@
1
- // ../../../../node_modules/.pnpm/astro@6.4.5_@types+node@25.9.2_jiti@2.7.0_lightningcss@1.32.0_rollup@4.61.1_tsx@4.22.4_yaml@2.9.0/node_modules/astro/dist/runtime/client/dev-toolbar/apps/utils/highlight.js
2
- function createHighlight(rect, icon, additionalAttributes) {
3
- const highlight = document.createElement("astro-dev-toolbar-highlight");
4
- if (icon) highlight.icon = icon;
5
- if (additionalAttributes) {
6
- for (const [key, value] of Object.entries(additionalAttributes)) {
7
- highlight.setAttribute(key, value);
8
- }
9
- }
10
- highlight.tabIndex = 0;
11
- if (rect.width === 0 || rect.height === 0) {
12
- highlight.style.display = "none";
13
- } else {
14
- positionHighlight(highlight, rect);
15
- }
16
- return highlight;
17
- }
18
- function getElementsPositionInDocument(el) {
19
- let isFixed = false;
20
- let current = el;
21
- while (current instanceof Element) {
22
- let style = getComputedStyle(current);
23
- if (style.position === "fixed") {
24
- isFixed = true;
25
- }
26
- current = current.parentNode;
27
- }
28
- return {
29
- isFixed
30
- };
31
- }
32
- function positionHighlight(highlight, rect) {
33
- highlight.style.display = "block";
34
- const scrollY = highlight.style.position === "fixed" ? 0 : window.scrollY;
35
- highlight.style.top = `${Math.max(rect.top + scrollY - 10, 0)}px`;
36
- highlight.style.left = `${Math.max(rect.left + window.scrollX - 10, 0)}px`;
37
- highlight.style.width = `${rect.width + 15}px`;
38
- highlight.style.height = `${rect.height + 15}px`;
39
- }
40
- function attachTooltipToHighlight(highlight, tooltip, originalElement) {
41
- highlight.shadowRoot.append(tooltip);
42
- ["mouseover", "focus"].forEach((event) => {
43
- highlight.addEventListener(event, () => {
44
- tooltip.dataset.show = "true";
45
- const originalRect = originalElement.getBoundingClientRect();
46
- const dialogRect = tooltip.getBoundingClientRect();
47
- if (originalRect.top < dialogRect.height) {
48
- tooltip.style.top = `${originalRect.height + 15}px`;
49
- } else {
50
- tooltip.style.top = `-${tooltip.offsetHeight}px`;
51
- }
52
- if (dialogRect.right > document.documentElement.clientWidth) {
53
- tooltip.style.right = "0px";
54
- } else if (dialogRect.left < 0) {
55
- tooltip.style.left = "0px";
56
- }
57
- });
58
- });
59
- ["mouseout", "blur"].forEach((event) => {
60
- highlight.addEventListener(event, () => {
61
- tooltip.dataset.show = "false";
62
- });
63
- });
64
- }
65
-
66
- export {
67
- createHighlight,
68
- getElementsPositionInDocument,
69
- positionHighlight,
70
- attachTooltipToHighlight
71
- };
72
- //# sourceMappingURL=chunk-HBSVDAQD.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../../../../../node_modules/.pnpm/astro@6.4.5_@types+node@25.9.2_jiti@2.7.0_lightningcss@1.32.0_rollup@4.61.1_tsx@4.22.4_yaml@2.9.0/node_modules/astro/dist/runtime/client/dev-toolbar/apps/utils/highlight.js"],
4
- "sourcesContent": ["function createHighlight(rect, icon, additionalAttributes) {\n const highlight = document.createElement(\"astro-dev-toolbar-highlight\");\n if (icon) highlight.icon = icon;\n if (additionalAttributes) {\n for (const [key, value] of Object.entries(additionalAttributes)) {\n highlight.setAttribute(key, value);\n }\n }\n highlight.tabIndex = 0;\n if (rect.width === 0 || rect.height === 0) {\n highlight.style.display = \"none\";\n } else {\n positionHighlight(highlight, rect);\n }\n return highlight;\n}\nfunction getElementsPositionInDocument(el) {\n let isFixed = false;\n let current = el;\n while (current instanceof Element) {\n let style = getComputedStyle(current);\n if (style.position === \"fixed\") {\n isFixed = true;\n }\n current = current.parentNode;\n }\n return {\n isFixed\n };\n}\nfunction positionHighlight(highlight, rect) {\n highlight.style.display = \"block\";\n const scrollY = highlight.style.position === \"fixed\" ? 0 : window.scrollY;\n highlight.style.top = `${Math.max(rect.top + scrollY - 10, 0)}px`;\n highlight.style.left = `${Math.max(rect.left + window.scrollX - 10, 0)}px`;\n highlight.style.width = `${rect.width + 15}px`;\n highlight.style.height = `${rect.height + 15}px`;\n}\nfunction attachTooltipToHighlight(highlight, tooltip, originalElement) {\n highlight.shadowRoot.append(tooltip);\n [\"mouseover\", \"focus\"].forEach((event) => {\n highlight.addEventListener(event, () => {\n tooltip.dataset.show = \"true\";\n const originalRect = originalElement.getBoundingClientRect();\n const dialogRect = tooltip.getBoundingClientRect();\n if (originalRect.top < dialogRect.height) {\n tooltip.style.top = `${originalRect.height + 15}px`;\n } else {\n tooltip.style.top = `-${tooltip.offsetHeight}px`;\n }\n if (dialogRect.right > document.documentElement.clientWidth) {\n tooltip.style.right = \"0px\";\n } else if (dialogRect.left < 0) {\n tooltip.style.left = \"0px\";\n }\n });\n });\n [\"mouseout\", \"blur\"].forEach((event) => {\n highlight.addEventListener(event, () => {\n tooltip.dataset.show = \"false\";\n });\n });\n}\nexport {\n attachTooltipToHighlight,\n createHighlight,\n getElementsPositionInDocument,\n positionHighlight\n};\n"],
5
- "mappings": ";AAAA,SAAS,gBAAgB,MAAM,MAAM,sBAAsB;AACzD,QAAM,YAAY,SAAS,cAAc,6BAA6B;AACtE,MAAI,KAAM,WAAU,OAAO;AAC3B,MAAI,sBAAsB;AACxB,eAAW,CAAC,KAAK,KAAK,KAAK,OAAO,QAAQ,oBAAoB,GAAG;AAC/D,gBAAU,aAAa,KAAK,KAAK;AAAA,IACnC;AAAA,EACF;AACA,YAAU,WAAW;AACrB,MAAI,KAAK,UAAU,KAAK,KAAK,WAAW,GAAG;AACzC,cAAU,MAAM,UAAU;AAAA,EAC5B,OAAO;AACL,sBAAkB,WAAW,IAAI;AAAA,EACnC;AACA,SAAO;AACT;AACA,SAAS,8BAA8B,IAAI;AACzC,MAAI,UAAU;AACd,MAAI,UAAU;AACd,SAAO,mBAAmB,SAAS;AACjC,QAAI,QAAQ,iBAAiB,OAAO;AACpC,QAAI,MAAM,aAAa,SAAS;AAC9B,gBAAU;AAAA,IACZ;AACA,cAAU,QAAQ;AAAA,EACpB;AACA,SAAO;AAAA,IACL;AAAA,EACF;AACF;AACA,SAAS,kBAAkB,WAAW,MAAM;AAC1C,YAAU,MAAM,UAAU;AAC1B,QAAM,UAAU,UAAU,MAAM,aAAa,UAAU,IAAI,OAAO;AAClE,YAAU,MAAM,MAAM,GAAG,KAAK,IAAI,KAAK,MAAM,UAAU,IAAI,CAAC,CAAC;AAC7D,YAAU,MAAM,OAAO,GAAG,KAAK,IAAI,KAAK,OAAO,OAAO,UAAU,IAAI,CAAC,CAAC;AACtE,YAAU,MAAM,QAAQ,GAAG,KAAK,QAAQ,EAAE;AAC1C,YAAU,MAAM,SAAS,GAAG,KAAK,SAAS,EAAE;AAC9C;AACA,SAAS,yBAAyB,WAAW,SAAS,iBAAiB;AACrE,YAAU,WAAW,OAAO,OAAO;AACnC,GAAC,aAAa,OAAO,EAAE,QAAQ,CAAC,UAAU;AACxC,cAAU,iBAAiB,OAAO,MAAM;AACtC,cAAQ,QAAQ,OAAO;AACvB,YAAM,eAAe,gBAAgB,sBAAsB;AAC3D,YAAM,aAAa,QAAQ,sBAAsB;AACjD,UAAI,aAAa,MAAM,WAAW,QAAQ;AACxC,gBAAQ,MAAM,MAAM,GAAG,aAAa,SAAS,EAAE;AAAA,MACjD,OAAO;AACL,gBAAQ,MAAM,MAAM,IAAI,QAAQ,YAAY;AAAA,MAC9C;AACA,UAAI,WAAW,QAAQ,SAAS,gBAAgB,aAAa;AAC3D,gBAAQ,MAAM,QAAQ;AAAA,MACxB,WAAW,WAAW,OAAO,GAAG;AAC9B,gBAAQ,MAAM,OAAO;AAAA,MACvB;AAAA,IACF,CAAC;AAAA,EACH,CAAC;AACD,GAAC,YAAY,MAAM,EAAE,QAAQ,CAAC,UAAU;AACtC,cAAU,iBAAiB,OAAO,MAAM;AACtC,cAAQ,QAAQ,OAAO;AAAA,IACzB,CAAC;AAAA,EACH,CAAC;AACH;",
6
- "names": []
7
- }