@spear-ai/spectral 1.3.13 → 1.3.14

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 (62) hide show
  1. package/dist/.js +3 -3
  2. package/dist/Accordion/AccordionBase.js +3 -3
  3. package/dist/App.js +3 -3
  4. package/dist/Badge/BadgeBase.js +3 -3
  5. package/dist/Badge.js +3 -3
  6. package/dist/Button.js +3 -3
  7. package/dist/Card.js +3 -3
  8. package/dist/Checkbox/CheckboxBase.js +3 -3
  9. package/dist/Drawer.js +3 -3
  10. package/dist/Icons/AnnotationsIcon.js +3 -3
  11. package/dist/Icons/CalendarIcon.js +3 -3
  12. package/dist/Icons/ClockIcon.js +3 -3
  13. package/dist/Icons/DeleteIcon.js +3 -3
  14. package/dist/Icons/DurationIcon.js +3 -3
  15. package/dist/Icons/EraserIcon.js +3 -3
  16. package/dist/Icons/GoToFirstIcon.js +3 -3
  17. package/dist/Icons/GoToLastIcon.js +3 -3
  18. package/dist/Icons/IconBase.js +3 -3
  19. package/dist/Icons/LabelIcon.js +3 -3
  20. package/dist/Icons/LassoIcon.js +3 -3
  21. package/dist/Icons/LineToolIcon.js +3 -3
  22. package/dist/Icons/LiveViewIcon.js +3 -3
  23. package/dist/Icons/LocationIcon.js +3 -3
  24. package/dist/Icons/MetadataIcon.js +3 -3
  25. package/dist/Icons/OntologyIcon.js +3 -3
  26. package/dist/Icons/PlayIcon.js +3 -3
  27. package/dist/Icons/PlusIcon.js +3 -3
  28. package/dist/Icons/ResetIcon.js +3 -3
  29. package/dist/Icons/ScissorsIcon.js +3 -3
  30. package/dist/Icons/TrashIcon.js +3 -3
  31. package/dist/Icons/UndoIcon.js +3 -3
  32. package/dist/Icons/ZoomAllIcon.js +3 -3
  33. package/dist/Icons/ZoomXIcon.js +3 -3
  34. package/dist/Icons/ZoomYIcon.js +3 -3
  35. package/dist/Icons/iconTypes.js +3 -3
  36. package/dist/Icons.js +3 -3
  37. package/dist/Label.js +3 -3
  38. package/dist/Popover.js +3 -3
  39. package/dist/RadioGroup/RadioGroupBase.js +3 -3
  40. package/dist/Skeleton.js +3 -3
  41. package/dist/Slider/SliderBase.js +3 -3
  42. package/dist/Slider.js +3 -3
  43. package/dist/Switch/SwitchBase.js +3 -3
  44. package/dist/Switch.js +3 -3
  45. package/dist/Toggle/ToggleBase.js +3 -3
  46. package/dist/Toggle.js +3 -3
  47. package/dist/ToggleGroup/ToggleGroupBase.js +3 -3
  48. package/dist/ToggleGroup.js +3 -3
  49. package/dist/Toolbar.js +3 -3
  50. package/dist/Tooltip/TooltipBase.js +3 -3
  51. package/dist/Tooltip.js +3 -3
  52. package/dist/features/LabelingTools.js +3 -3
  53. package/dist/hooks/useAccordionAutoScroll.js +3 -3
  54. package/dist/hooks/useOutsideClick.js +3 -3
  55. package/dist/hooks/useTheme.js +3 -3
  56. package/dist/main.js +3 -3
  57. package/dist/primitives/label.js +3 -3
  58. package/dist/primitives/slot.js +3 -3
  59. package/dist/utils/refs.js +3 -3
  60. package/dist/utils/shared.js +3 -3
  61. package/dist/utils/twUtils.js +3 -3
  62. package/package.json +7 -3
@@ -1,14 +1,14 @@
1
1
 
2
- // Only inject CSS for library consumers, not in Storybook
3
2
  (function() {
4
- if (typeof document !== 'undefined' &&
3
+ if (typeof document !== 'undefined' &&
5
4
  !document.querySelector('link[data-spectral-css]') &&
6
5
  !window.location.pathname.includes('iframe.html') &&
7
6
  !document.querySelector('[data-is-storybook]')) {
8
7
  const link = document.createElement('link');
9
8
  link.rel = 'stylesheet';
10
9
  link.setAttribute('data-spectral-css', '');
11
- link.href = new URL('./assets/main.css', import.meta.url).href;
10
+ const baseUrl = new URL('.', import.meta.url);
11
+ link.href = new URL('assets/main.css', baseUrl).href;
12
12
  document.head.appendChild(link);
13
13
  }
14
14
  })();
@@ -1,14 +1,14 @@
1
1
 
2
- // Only inject CSS for library consumers, not in Storybook
3
2
  (function() {
4
- if (typeof document !== 'undefined' &&
3
+ if (typeof document !== 'undefined' &&
5
4
  !document.querySelector('link[data-spectral-css]') &&
6
5
  !window.location.pathname.includes('iframe.html') &&
7
6
  !document.querySelector('[data-is-storybook]')) {
8
7
  const link = document.createElement('link');
9
8
  link.rel = 'stylesheet';
10
9
  link.setAttribute('data-spectral-css', '');
11
- link.href = new URL('./assets/main.css', import.meta.url).href;
10
+ const baseUrl = new URL('.', import.meta.url);
11
+ link.href = new URL('assets/main.css', baseUrl).href;
12
12
  document.head.appendChild(link);
13
13
  }
14
14
  })();
package/dist/Icons.js CHANGED
@@ -1,14 +1,14 @@
1
1
 
2
- // Only inject CSS for library consumers, not in Storybook
3
2
  (function() {
4
- if (typeof document !== 'undefined' &&
3
+ if (typeof document !== 'undefined' &&
5
4
  !document.querySelector('link[data-spectral-css]') &&
6
5
  !window.location.pathname.includes('iframe.html') &&
7
6
  !document.querySelector('[data-is-storybook]')) {
8
7
  const link = document.createElement('link');
9
8
  link.rel = 'stylesheet';
10
9
  link.setAttribute('data-spectral-css', '');
11
- link.href = new URL('./assets/main.css', import.meta.url).href;
10
+ const baseUrl = new URL('.', import.meta.url);
11
+ link.href = new URL('assets/main.css', baseUrl).href;
12
12
  document.head.appendChild(link);
13
13
  }
14
14
  })();
package/dist/Label.js CHANGED
@@ -1,14 +1,14 @@
1
1
 
2
- // Only inject CSS for library consumers, not in Storybook
3
2
  (function() {
4
- if (typeof document !== 'undefined' &&
3
+ if (typeof document !== 'undefined' &&
5
4
  !document.querySelector('link[data-spectral-css]') &&
6
5
  !window.location.pathname.includes('iframe.html') &&
7
6
  !document.querySelector('[data-is-storybook]')) {
8
7
  const link = document.createElement('link');
9
8
  link.rel = 'stylesheet';
10
9
  link.setAttribute('data-spectral-css', '');
11
- link.href = new URL('./assets/main.css', import.meta.url).href;
10
+ const baseUrl = new URL('.', import.meta.url);
11
+ link.href = new URL('assets/main.css', baseUrl).href;
12
12
  document.head.appendChild(link);
13
13
  }
14
14
  })();
package/dist/Popover.js CHANGED
@@ -1,14 +1,14 @@
1
1
 
2
- // Only inject CSS for library consumers, not in Storybook
3
2
  (function() {
4
- if (typeof document !== 'undefined' &&
3
+ if (typeof document !== 'undefined' &&
5
4
  !document.querySelector('link[data-spectral-css]') &&
6
5
  !window.location.pathname.includes('iframe.html') &&
7
6
  !document.querySelector('[data-is-storybook]')) {
8
7
  const link = document.createElement('link');
9
8
  link.rel = 'stylesheet';
10
9
  link.setAttribute('data-spectral-css', '');
11
- link.href = new URL('./assets/main.css', import.meta.url).href;
10
+ const baseUrl = new URL('.', import.meta.url);
11
+ link.href = new URL('assets/main.css', baseUrl).href;
12
12
  document.head.appendChild(link);
13
13
  }
14
14
  })();
@@ -1,14 +1,14 @@
1
1
 
2
- // Only inject CSS for library consumers, not in Storybook
3
2
  (function() {
4
- if (typeof document !== 'undefined' &&
3
+ if (typeof document !== 'undefined' &&
5
4
  !document.querySelector('link[data-spectral-css]') &&
6
5
  !window.location.pathname.includes('iframe.html') &&
7
6
  !document.querySelector('[data-is-storybook]')) {
8
7
  const link = document.createElement('link');
9
8
  link.rel = 'stylesheet';
10
9
  link.setAttribute('data-spectral-css', '');
11
- link.href = new URL('./assets/main.css', import.meta.url).href;
10
+ const baseUrl = new URL('.', import.meta.url);
11
+ link.href = new URL('assets/main.css', baseUrl).href;
12
12
  document.head.appendChild(link);
13
13
  }
14
14
  })();
package/dist/Skeleton.js CHANGED
@@ -1,14 +1,14 @@
1
1
 
2
- // Only inject CSS for library consumers, not in Storybook
3
2
  (function() {
4
- if (typeof document !== 'undefined' &&
3
+ if (typeof document !== 'undefined' &&
5
4
  !document.querySelector('link[data-spectral-css]') &&
6
5
  !window.location.pathname.includes('iframe.html') &&
7
6
  !document.querySelector('[data-is-storybook]')) {
8
7
  const link = document.createElement('link');
9
8
  link.rel = 'stylesheet';
10
9
  link.setAttribute('data-spectral-css', '');
11
- link.href = new URL('./assets/main.css', import.meta.url).href;
10
+ const baseUrl = new URL('.', import.meta.url);
11
+ link.href = new URL('assets/main.css', baseUrl).href;
12
12
  document.head.appendChild(link);
13
13
  }
14
14
  })();
@@ -1,14 +1,14 @@
1
1
 
2
- // Only inject CSS for library consumers, not in Storybook
3
2
  (function() {
4
- if (typeof document !== 'undefined' &&
3
+ if (typeof document !== 'undefined' &&
5
4
  !document.querySelector('link[data-spectral-css]') &&
6
5
  !window.location.pathname.includes('iframe.html') &&
7
6
  !document.querySelector('[data-is-storybook]')) {
8
7
  const link = document.createElement('link');
9
8
  link.rel = 'stylesheet';
10
9
  link.setAttribute('data-spectral-css', '');
11
- link.href = new URL('./assets/main.css', import.meta.url).href;
10
+ const baseUrl = new URL('.', import.meta.url);
11
+ link.href = new URL('assets/main.css', baseUrl).href;
12
12
  document.head.appendChild(link);
13
13
  }
14
14
  })();
package/dist/Slider.js CHANGED
@@ -1,14 +1,14 @@
1
1
 
2
- // Only inject CSS for library consumers, not in Storybook
3
2
  (function() {
4
- if (typeof document !== 'undefined' &&
3
+ if (typeof document !== 'undefined' &&
5
4
  !document.querySelector('link[data-spectral-css]') &&
6
5
  !window.location.pathname.includes('iframe.html') &&
7
6
  !document.querySelector('[data-is-storybook]')) {
8
7
  const link = document.createElement('link');
9
8
  link.rel = 'stylesheet';
10
9
  link.setAttribute('data-spectral-css', '');
11
- link.href = new URL('./assets/main.css', import.meta.url).href;
10
+ const baseUrl = new URL('.', import.meta.url);
11
+ link.href = new URL('assets/main.css', baseUrl).href;
12
12
  document.head.appendChild(link);
13
13
  }
14
14
  })();
@@ -1,14 +1,14 @@
1
1
 
2
- // Only inject CSS for library consumers, not in Storybook
3
2
  (function() {
4
- if (typeof document !== 'undefined' &&
3
+ if (typeof document !== 'undefined' &&
5
4
  !document.querySelector('link[data-spectral-css]') &&
6
5
  !window.location.pathname.includes('iframe.html') &&
7
6
  !document.querySelector('[data-is-storybook]')) {
8
7
  const link = document.createElement('link');
9
8
  link.rel = 'stylesheet';
10
9
  link.setAttribute('data-spectral-css', '');
11
- link.href = new URL('./assets/main.css', import.meta.url).href;
10
+ const baseUrl = new URL('.', import.meta.url);
11
+ link.href = new URL('assets/main.css', baseUrl).href;
12
12
  document.head.appendChild(link);
13
13
  }
14
14
  })();
package/dist/Switch.js CHANGED
@@ -1,14 +1,14 @@
1
1
 
2
- // Only inject CSS for library consumers, not in Storybook
3
2
  (function() {
4
- if (typeof document !== 'undefined' &&
3
+ if (typeof document !== 'undefined' &&
5
4
  !document.querySelector('link[data-spectral-css]') &&
6
5
  !window.location.pathname.includes('iframe.html') &&
7
6
  !document.querySelector('[data-is-storybook]')) {
8
7
  const link = document.createElement('link');
9
8
  link.rel = 'stylesheet';
10
9
  link.setAttribute('data-spectral-css', '');
11
- link.href = new URL('./assets/main.css', import.meta.url).href;
10
+ const baseUrl = new URL('.', import.meta.url);
11
+ link.href = new URL('assets/main.css', baseUrl).href;
12
12
  document.head.appendChild(link);
13
13
  }
14
14
  })();
@@ -1,14 +1,14 @@
1
1
 
2
- // Only inject CSS for library consumers, not in Storybook
3
2
  (function() {
4
- if (typeof document !== 'undefined' &&
3
+ if (typeof document !== 'undefined' &&
5
4
  !document.querySelector('link[data-spectral-css]') &&
6
5
  !window.location.pathname.includes('iframe.html') &&
7
6
  !document.querySelector('[data-is-storybook]')) {
8
7
  const link = document.createElement('link');
9
8
  link.rel = 'stylesheet';
10
9
  link.setAttribute('data-spectral-css', '');
11
- link.href = new URL('./assets/main.css', import.meta.url).href;
10
+ const baseUrl = new URL('.', import.meta.url);
11
+ link.href = new URL('assets/main.css', baseUrl).href;
12
12
  document.head.appendChild(link);
13
13
  }
14
14
  })();
package/dist/Toggle.js CHANGED
@@ -1,14 +1,14 @@
1
1
 
2
- // Only inject CSS for library consumers, not in Storybook
3
2
  (function() {
4
- if (typeof document !== 'undefined' &&
3
+ if (typeof document !== 'undefined' &&
5
4
  !document.querySelector('link[data-spectral-css]') &&
6
5
  !window.location.pathname.includes('iframe.html') &&
7
6
  !document.querySelector('[data-is-storybook]')) {
8
7
  const link = document.createElement('link');
9
8
  link.rel = 'stylesheet';
10
9
  link.setAttribute('data-spectral-css', '');
11
- link.href = new URL('./assets/main.css', import.meta.url).href;
10
+ const baseUrl = new URL('.', import.meta.url);
11
+ link.href = new URL('assets/main.css', baseUrl).href;
12
12
  document.head.appendChild(link);
13
13
  }
14
14
  })();
@@ -1,14 +1,14 @@
1
1
 
2
- // Only inject CSS for library consumers, not in Storybook
3
2
  (function() {
4
- if (typeof document !== 'undefined' &&
3
+ if (typeof document !== 'undefined' &&
5
4
  !document.querySelector('link[data-spectral-css]') &&
6
5
  !window.location.pathname.includes('iframe.html') &&
7
6
  !document.querySelector('[data-is-storybook]')) {
8
7
  const link = document.createElement('link');
9
8
  link.rel = 'stylesheet';
10
9
  link.setAttribute('data-spectral-css', '');
11
- link.href = new URL('./assets/main.css', import.meta.url).href;
10
+ const baseUrl = new URL('.', import.meta.url);
11
+ link.href = new URL('assets/main.css', baseUrl).href;
12
12
  document.head.appendChild(link);
13
13
  }
14
14
  })();
@@ -1,14 +1,14 @@
1
1
 
2
- // Only inject CSS for library consumers, not in Storybook
3
2
  (function() {
4
- if (typeof document !== 'undefined' &&
3
+ if (typeof document !== 'undefined' &&
5
4
  !document.querySelector('link[data-spectral-css]') &&
6
5
  !window.location.pathname.includes('iframe.html') &&
7
6
  !document.querySelector('[data-is-storybook]')) {
8
7
  const link = document.createElement('link');
9
8
  link.rel = 'stylesheet';
10
9
  link.setAttribute('data-spectral-css', '');
11
- link.href = new URL('./assets/main.css', import.meta.url).href;
10
+ const baseUrl = new URL('.', import.meta.url);
11
+ link.href = new URL('assets/main.css', baseUrl).href;
12
12
  document.head.appendChild(link);
13
13
  }
14
14
  })();
package/dist/Toolbar.js CHANGED
@@ -1,14 +1,14 @@
1
1
 
2
- // Only inject CSS for library consumers, not in Storybook
3
2
  (function() {
4
- if (typeof document !== 'undefined' &&
3
+ if (typeof document !== 'undefined' &&
5
4
  !document.querySelector('link[data-spectral-css]') &&
6
5
  !window.location.pathname.includes('iframe.html') &&
7
6
  !document.querySelector('[data-is-storybook]')) {
8
7
  const link = document.createElement('link');
9
8
  link.rel = 'stylesheet';
10
9
  link.setAttribute('data-spectral-css', '');
11
- link.href = new URL('./assets/main.css', import.meta.url).href;
10
+ const baseUrl = new URL('.', import.meta.url);
11
+ link.href = new URL('assets/main.css', baseUrl).href;
12
12
  document.head.appendChild(link);
13
13
  }
14
14
  })();
@@ -1,14 +1,14 @@
1
1
 
2
- // Only inject CSS for library consumers, not in Storybook
3
2
  (function() {
4
- if (typeof document !== 'undefined' &&
3
+ if (typeof document !== 'undefined' &&
5
4
  !document.querySelector('link[data-spectral-css]') &&
6
5
  !window.location.pathname.includes('iframe.html') &&
7
6
  !document.querySelector('[data-is-storybook]')) {
8
7
  const link = document.createElement('link');
9
8
  link.rel = 'stylesheet';
10
9
  link.setAttribute('data-spectral-css', '');
11
- link.href = new URL('./assets/main.css', import.meta.url).href;
10
+ const baseUrl = new URL('.', import.meta.url);
11
+ link.href = new URL('assets/main.css', baseUrl).href;
12
12
  document.head.appendChild(link);
13
13
  }
14
14
  })();
package/dist/Tooltip.js CHANGED
@@ -1,14 +1,14 @@
1
1
 
2
- // Only inject CSS for library consumers, not in Storybook
3
2
  (function() {
4
- if (typeof document !== 'undefined' &&
3
+ if (typeof document !== 'undefined' &&
5
4
  !document.querySelector('link[data-spectral-css]') &&
6
5
  !window.location.pathname.includes('iframe.html') &&
7
6
  !document.querySelector('[data-is-storybook]')) {
8
7
  const link = document.createElement('link');
9
8
  link.rel = 'stylesheet';
10
9
  link.setAttribute('data-spectral-css', '');
11
- link.href = new URL('./assets/main.css', import.meta.url).href;
10
+ const baseUrl = new URL('.', import.meta.url);
11
+ link.href = new URL('assets/main.css', baseUrl).href;
12
12
  document.head.appendChild(link);
13
13
  }
14
14
  })();
@@ -1,14 +1,14 @@
1
1
 
2
- // Only inject CSS for library consumers, not in Storybook
3
2
  (function() {
4
- if (typeof document !== 'undefined' &&
3
+ if (typeof document !== 'undefined' &&
5
4
  !document.querySelector('link[data-spectral-css]') &&
6
5
  !window.location.pathname.includes('iframe.html') &&
7
6
  !document.querySelector('[data-is-storybook]')) {
8
7
  const link = document.createElement('link');
9
8
  link.rel = 'stylesheet';
10
9
  link.setAttribute('data-spectral-css', '');
11
- link.href = new URL('./assets/main.css', import.meta.url).href;
10
+ const baseUrl = new URL('.', import.meta.url);
11
+ link.href = new URL('assets/main.css', baseUrl).href;
12
12
  document.head.appendChild(link);
13
13
  }
14
14
  })();
@@ -1,14 +1,14 @@
1
1
 
2
- // Only inject CSS for library consumers, not in Storybook
3
2
  (function() {
4
- if (typeof document !== 'undefined' &&
3
+ if (typeof document !== 'undefined' &&
5
4
  !document.querySelector('link[data-spectral-css]') &&
6
5
  !window.location.pathname.includes('iframe.html') &&
7
6
  !document.querySelector('[data-is-storybook]')) {
8
7
  const link = document.createElement('link');
9
8
  link.rel = 'stylesheet';
10
9
  link.setAttribute('data-spectral-css', '');
11
- link.href = new URL('./assets/main.css', import.meta.url).href;
10
+ const baseUrl = new URL('.', import.meta.url);
11
+ link.href = new URL('assets/main.css', baseUrl).href;
12
12
  document.head.appendChild(link);
13
13
  }
14
14
  })();
@@ -1,14 +1,14 @@
1
1
 
2
- // Only inject CSS for library consumers, not in Storybook
3
2
  (function() {
4
- if (typeof document !== 'undefined' &&
3
+ if (typeof document !== 'undefined' &&
5
4
  !document.querySelector('link[data-spectral-css]') &&
6
5
  !window.location.pathname.includes('iframe.html') &&
7
6
  !document.querySelector('[data-is-storybook]')) {
8
7
  const link = document.createElement('link');
9
8
  link.rel = 'stylesheet';
10
9
  link.setAttribute('data-spectral-css', '');
11
- link.href = new URL('./assets/main.css', import.meta.url).href;
10
+ const baseUrl = new URL('.', import.meta.url);
11
+ link.href = new URL('assets/main.css', baseUrl).href;
12
12
  document.head.appendChild(link);
13
13
  }
14
14
  })();
@@ -1,14 +1,14 @@
1
1
 
2
- // Only inject CSS for library consumers, not in Storybook
3
2
  (function() {
4
- if (typeof document !== 'undefined' &&
3
+ if (typeof document !== 'undefined' &&
5
4
  !document.querySelector('link[data-spectral-css]') &&
6
5
  !window.location.pathname.includes('iframe.html') &&
7
6
  !document.querySelector('[data-is-storybook]')) {
8
7
  const link = document.createElement('link');
9
8
  link.rel = 'stylesheet';
10
9
  link.setAttribute('data-spectral-css', '');
11
- link.href = new URL('./assets/main.css', import.meta.url).href;
10
+ const baseUrl = new URL('.', import.meta.url);
11
+ link.href = new URL('assets/main.css', baseUrl).href;
12
12
  document.head.appendChild(link);
13
13
  }
14
14
  })();
package/dist/main.js CHANGED
@@ -1,14 +1,14 @@
1
1
 
2
- // Only inject CSS for library consumers, not in Storybook
3
2
  (function() {
4
- if (typeof document !== 'undefined' &&
3
+ if (typeof document !== 'undefined' &&
5
4
  !document.querySelector('link[data-spectral-css]') &&
6
5
  !window.location.pathname.includes('iframe.html') &&
7
6
  !document.querySelector('[data-is-storybook]')) {
8
7
  const link = document.createElement('link');
9
8
  link.rel = 'stylesheet';
10
9
  link.setAttribute('data-spectral-css', '');
11
- link.href = new URL('./assets/main.css', import.meta.url).href;
10
+ const baseUrl = new URL('.', import.meta.url);
11
+ link.href = new URL('assets/main.css', baseUrl).href;
12
12
  document.head.appendChild(link);
13
13
  }
14
14
  })();
@@ -1,14 +1,14 @@
1
1
 
2
- // Only inject CSS for library consumers, not in Storybook
3
2
  (function() {
4
- if (typeof document !== 'undefined' &&
3
+ if (typeof document !== 'undefined' &&
5
4
  !document.querySelector('link[data-spectral-css]') &&
6
5
  !window.location.pathname.includes('iframe.html') &&
7
6
  !document.querySelector('[data-is-storybook]')) {
8
7
  const link = document.createElement('link');
9
8
  link.rel = 'stylesheet';
10
9
  link.setAttribute('data-spectral-css', '');
11
- link.href = new URL('./assets/main.css', import.meta.url).href;
10
+ const baseUrl = new URL('.', import.meta.url);
11
+ link.href = new URL('assets/main.css', baseUrl).href;
12
12
  document.head.appendChild(link);
13
13
  }
14
14
  })();
@@ -1,14 +1,14 @@
1
1
 
2
- // Only inject CSS for library consumers, not in Storybook
3
2
  (function() {
4
- if (typeof document !== 'undefined' &&
3
+ if (typeof document !== 'undefined' &&
5
4
  !document.querySelector('link[data-spectral-css]') &&
6
5
  !window.location.pathname.includes('iframe.html') &&
7
6
  !document.querySelector('[data-is-storybook]')) {
8
7
  const link = document.createElement('link');
9
8
  link.rel = 'stylesheet';
10
9
  link.setAttribute('data-spectral-css', '');
11
- link.href = new URL('./assets/main.css', import.meta.url).href;
10
+ const baseUrl = new URL('.', import.meta.url);
11
+ link.href = new URL('assets/main.css', baseUrl).href;
12
12
  document.head.appendChild(link);
13
13
  }
14
14
  })();
@@ -1,14 +1,14 @@
1
1
 
2
- // Only inject CSS for library consumers, not in Storybook
3
2
  (function() {
4
- if (typeof document !== 'undefined' &&
3
+ if (typeof document !== 'undefined' &&
5
4
  !document.querySelector('link[data-spectral-css]') &&
6
5
  !window.location.pathname.includes('iframe.html') &&
7
6
  !document.querySelector('[data-is-storybook]')) {
8
7
  const link = document.createElement('link');
9
8
  link.rel = 'stylesheet';
10
9
  link.setAttribute('data-spectral-css', '');
11
- link.href = new URL('./assets/main.css', import.meta.url).href;
10
+ const baseUrl = new URL('.', import.meta.url);
11
+ link.href = new URL('assets/main.css', baseUrl).href;
12
12
  document.head.appendChild(link);
13
13
  }
14
14
  })();
@@ -1,14 +1,14 @@
1
1
 
2
- // Only inject CSS for library consumers, not in Storybook
3
2
  (function() {
4
- if (typeof document !== 'undefined' &&
3
+ if (typeof document !== 'undefined' &&
5
4
  !document.querySelector('link[data-spectral-css]') &&
6
5
  !window.location.pathname.includes('iframe.html') &&
7
6
  !document.querySelector('[data-is-storybook]')) {
8
7
  const link = document.createElement('link');
9
8
  link.rel = 'stylesheet';
10
9
  link.setAttribute('data-spectral-css', '');
11
- link.href = new URL('./assets/main.css', import.meta.url).href;
10
+ const baseUrl = new URL('.', import.meta.url);
11
+ link.href = new URL('assets/main.css', baseUrl).href;
12
12
  document.head.appendChild(link);
13
13
  }
14
14
  })();
@@ -1,14 +1,14 @@
1
1
 
2
- // Only inject CSS for library consumers, not in Storybook
3
2
  (function() {
4
- if (typeof document !== 'undefined' &&
3
+ if (typeof document !== 'undefined' &&
5
4
  !document.querySelector('link[data-spectral-css]') &&
6
5
  !window.location.pathname.includes('iframe.html') &&
7
6
  !document.querySelector('[data-is-storybook]')) {
8
7
  const link = document.createElement('link');
9
8
  link.rel = 'stylesheet';
10
9
  link.setAttribute('data-spectral-css', '');
11
- link.href = new URL('./assets/main.css', import.meta.url).href;
10
+ const baseUrl = new URL('.', import.meta.url);
11
+ link.href = new URL('assets/main.css', baseUrl).href;
12
12
  document.head.appendChild(link);
13
13
  }
14
14
  })();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spear-ai/spectral",
3
- "version": "1.3.13",
3
+ "version": "1.3.14",
4
4
  "type": "module",
5
5
  "private": false,
6
6
  "repository": {
@@ -11,9 +11,13 @@
11
11
  "module": "./dist/index.js",
12
12
  "types": "./dist/index.d.ts",
13
13
  "exports": {
14
+ ".": {
15
+ "import": "./dist/index.js",
16
+ "types": "./dist/index.d.ts"
17
+ },
14
18
  "./*": {
15
- "types": "./dist/*.d.ts",
16
- "default": "./dist/*.js"
19
+ "import": "./dist/*.js",
20
+ "types": "./dist/*.d.ts"
17
21
  },
18
22
  "./styles": "./dist/assets/main.css"
19
23
  },