@shelamkoff/rector 1.0.0 → 1.0.2

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 (94) hide show
  1. package/README.md +25 -23
  2. package/dist/core/clipboard/Clipboard.d.ts +2 -0
  3. package/dist/core/clipboard/Clipboard.js +52 -24
  4. package/dist/core/index.js +195 -194
  5. package/dist/core/locale/en.d.ts +1 -0
  6. package/dist/core/locale/en.js +1 -0
  7. package/dist/core/locale/ru.d.ts +1 -0
  8. package/dist/core/locale/ru.js +1 -0
  9. package/dist/core/themes/light.css +1 -1
  10. package/dist/core/themes/variables.css +72 -10
  11. package/dist/inline-plugins/mention/index.js +1 -2
  12. package/dist/locale/en.d.ts +41 -0
  13. package/dist/locale/ru.d.ts +41 -0
  14. package/dist/plugins/attaches/attaches.css +16 -14
  15. package/dist/plugins/attaches/index.js +997 -921
  16. package/dist/plugins/attaches/locale/en.d.ts +9 -0
  17. package/dist/plugins/attaches/locale/en.js +11 -2
  18. package/dist/plugins/attaches/locale/ru.d.ts +9 -0
  19. package/dist/plugins/attaches/locale/ru.js +11 -2
  20. package/dist/plugins/carousel/carousel.css +213 -49
  21. package/dist/plugins/carousel/index.js +918 -859
  22. package/dist/plugins/carousel/locale/en.d.ts +15 -0
  23. package/dist/plugins/carousel/locale/en.js +18 -3
  24. package/dist/plugins/carousel/locale/ru.d.ts +15 -0
  25. package/dist/plugins/carousel/locale/ru.js +18 -3
  26. package/dist/plugins/checklist/index.js +1 -2
  27. package/dist/plugins/code/index.js +1 -2
  28. package/dist/plugins/columns/index.js +1 -2
  29. package/dist/plugins/delimiter/index.js +1 -2
  30. package/dist/plugins/embed/index.js +1 -2
  31. package/dist/plugins/gallery/gallery.css +6 -1
  32. package/dist/plugins/gallery/index.js +375 -355
  33. package/dist/plugins/gallery/locale/en.d.ts +8 -0
  34. package/dist/plugins/gallery/locale/en.js +11 -3
  35. package/dist/plugins/gallery/locale/ru.d.ts +8 -0
  36. package/dist/plugins/gallery/locale/ru.js +11 -3
  37. package/dist/plugins/gallery/view-empty.d.ts +2 -0
  38. package/dist/plugins/gallery/view-empty.js +21 -15
  39. package/dist/plugins/gallery/view-filled.d.ts +2 -2
  40. package/dist/plugins/gallery/view-filled.js +61 -56
  41. package/dist/plugins/heading/index.js +1 -2
  42. package/dist/plugins/image/image.css +7 -2
  43. package/dist/plugins/image/index.js +365 -346
  44. package/dist/plugins/image/locale/en.d.ts +8 -0
  45. package/dist/plugins/image/locale/en.js +11 -3
  46. package/dist/plugins/image/locale/ru.d.ts +8 -0
  47. package/dist/plugins/image/locale/ru.js +11 -3
  48. package/dist/plugins/image/view-empty.d.ts +2 -0
  49. package/dist/plugins/image/view-empty.js +21 -15
  50. package/dist/plugins/image/view-filled.d.ts +2 -2
  51. package/dist/plugins/image/view-filled.js +77 -72
  52. package/dist/plugins/link-preview/index.js +1 -2
  53. package/dist/plugins/list/index.js +1 -2
  54. package/dist/plugins/paragraph/index.js +1 -2
  55. package/dist/plugins/person/index.js +1 -2
  56. package/dist/plugins/poll/index.js +1 -2
  57. package/dist/plugins/quote/index.js +1 -2
  58. package/dist/plugins/raw/index.js +1 -2
  59. package/dist/plugins/shared/dropzone.d.ts +6 -0
  60. package/dist/plugins/shared/dropzone.js +47 -36
  61. package/dist/plugins/shared/layer.d.ts +13 -0
  62. package/dist/plugins/shared/layer.js +45 -0
  63. package/dist/plugins/shared/sourceEditor.css +165 -0
  64. package/dist/plugins/shared/sourceEditor.d.ts +97 -0
  65. package/dist/plugins/shared/sourceEditor.js +260 -0
  66. package/dist/plugins/spoiler/index.js +1 -2
  67. package/dist/plugins/table/index.js +1 -2
  68. package/dist/plugins/toggle/index.js +1 -2
  69. package/dist/plugins/warning/index.js +1 -2
  70. package/dist/renderer/index.js +1 -2
  71. package/dist/renderer/renderers/attaches/index.js +1 -2
  72. package/dist/renderer/renderers/carousel/index.js +24 -24
  73. package/dist/renderer/renderers/carousel/styles.css +8 -2
  74. package/dist/renderer/renderers/checklist/index.js +1 -2
  75. package/dist/renderer/renderers/code/index.js +1 -2
  76. package/dist/renderer/renderers/columns/index.js +1 -2
  77. package/dist/renderer/renderers/delimiter/index.js +1 -2
  78. package/dist/renderer/renderers/embed/index.js +1 -2
  79. package/dist/renderer/renderers/gallery/index.js +1 -2
  80. package/dist/renderer/renderers/heading/index.js +1 -2
  81. package/dist/renderer/renderers/image/index.js +1 -2
  82. package/dist/renderer/renderers/link-preview/index.js +1 -2
  83. package/dist/renderer/renderers/list/index.js +1 -2
  84. package/dist/renderer/renderers/paragraph/index.js +1 -2
  85. package/dist/renderer/renderers/person/index.js +1 -2
  86. package/dist/renderer/renderers/poll/index.js +1 -2
  87. package/dist/renderer/renderers/quote/index.js +1 -2
  88. package/dist/renderer/renderers/spoiler/index.js +1 -2
  89. package/dist/renderer/renderers/table/index.js +1 -2
  90. package/dist/renderer/renderers/toggle/index.js +1 -2
  91. package/dist/renderer/renderers/warning/index.js +1 -2
  92. package/package.json +27 -29
  93. package/dist/shared/resolvePath.d.ts +0 -8
  94. package/dist/shared/resolvePath.js +0 -10
@@ -9,28 +9,27 @@ import {
9
9
  createSwipe,
10
10
  createThumbnails,
11
11
  } from '@shelamkoff/carousel'
12
- import { resolvePath } from '../../../shared/resolvePath.js'
13
12
  import { normalizeCarouselData } from '../../../shared/carouselData.js'
14
13
  import { setSanitizedRawHtml } from '../../../shared/sanitize/sanitizeRawHtml.js'
15
14
  import { setSafeUrlAttribute } from '../../../shared/sanitize/sanitizeUrl.js'
16
15
 
17
- const styles = resolvePath('./styles.css', import.meta.url)
16
+ const styles = new URL('./styles.css', import.meta.url).href
18
17
 
19
- /**
20
- * Create the mixed-media carousel renderer and own its Carousel instances.
21
- * @param {string} classPrefix
22
- * @param {Record<string, import('../../../shared/localeTypes').LocaleValue>} locale
23
- * @returns {import('../../types').BlockRenderer<import('../../types').CarouselBlock>}
24
- */
25
- export function createCarouselRenderer(classPrefix, locale) {
18
+ /**
19
+ * Create the mixed-media carousel renderer and own its Carousel instances.
20
+ * @param {string} classPrefix
21
+ * @param {Record<string, import('../../../shared/localeTypes').LocaleValue>} locale
22
+ * @returns {import('../../types').BlockRenderer<import('../../types').CarouselBlock>}
23
+ */
24
+ export function createCarouselRenderer(classPrefix, locale) {
26
25
  const p = `${classPrefix}-carousel-block`
27
26
  /** @type {WeakMap<HTMLElement, Carousel>} */
28
- const instances = new WeakMap()
29
- /** @param {string} key @param {string} fallback */
30
- const t = (key, fallback) => {
31
- const value = locale[`renderer.carousel.${key}`]
32
- return typeof value === 'string' ? value : fallback
33
- }
27
+ const instances = new WeakMap()
28
+ /** @param {string} key @param {string} fallback */
29
+ const t = (key, fallback) => {
30
+ const value = locale[`renderer.carousel.${key}`]
31
+ return typeof value === 'string' ? value : fallback
32
+ }
34
33
 
35
34
  return {
36
35
  type: 'carousel',
@@ -42,10 +41,11 @@ export function createCarouselRenderer(classPrefix, locale) {
42
41
  root.className = p
43
42
  root.setAttribute('aria-label', t('label', 'Content carousel'))
44
43
  if (data.options.aspectRatio && data.options.aspectRatio !== 'auto') {
44
+ root.classList.add(`${p}--fixed-ratio`)
45
45
  root.style.aspectRatio = data.options.aspectRatio
46
46
  }
47
47
 
48
- const slides = data.slides.map(slide => {
48
+ const slides = data.slides.map(slide => {
49
49
  const content = () => {
50
50
  const figure = document.createElement('figure')
51
51
  figure.className = `${p}__slide`
@@ -81,14 +81,14 @@ export function createCarouselRenderer(classPrefix, locale) {
81
81
  ...(slide.type === 'image' && slide.src ? { thumb: slide.src } : {}),
82
82
  ...(slide.type === 'video' && slide.poster ? { thumb: slide.poster } : {}),
83
83
  meta: { id: slide.id, type: slide.type },
84
- }
85
- })
86
-
87
- // Preserve mode may intentionally pass a normalized empty carousel.
88
- // Avoid constructing a runtime instance with no navigable slides.
89
- if (!slides.length) return root
90
-
91
- const plugins = [createKeyboard({ scope: 'container' }), createSwipe({ mouse: true })]
84
+ }
85
+ })
86
+
87
+ // Preserve mode may intentionally pass a normalized empty carousel.
88
+ // Avoid constructing a runtime instance with no navigable slides.
89
+ if (!slides.length) return root
90
+
91
+ const plugins = [createKeyboard({ scope: 'container' }), createSwipe({ mouse: true })]
92
92
  if (data.options.navigation) plugins.push(createArrows())
93
93
  if (data.options.pagination) plugins.push(createDots())
94
94
  if (data.options.thumbnails) plugins.push(createThumbnails())
@@ -1,7 +1,13 @@
1
1
  .editor-carousel-block { position: relative; width: 100%; }
2
- .editor-carousel-block .carousel__viewport { border-radius: var(--er-radius); background: var(--er-surface); }
2
+ .editor-carousel-block .carousel__viewport { border-radius: var(--er-radius); }
3
3
  .editor-carousel-block__slide { display: grid; place-items: center; box-sizing: border-box; width: 100%; min-height: 16rem; margin: 0; }
4
- .editor-carousel-block__slide img, .editor-carousel-block__slide video { display: block; width: 100%; height: 100%; max-height: 36rem; object-fit: contain; }
4
+ .editor-carousel-block__slide img, .editor-carousel-block__slide video { display: block; width: 100%; height: auto; max-height: none; object-fit: contain; }
5
+ .editor-carousel-block--fixed-ratio .carousel__viewport { height: 100%; background: var(--er-surface); }
6
+ .editor-carousel-block--fixed-ratio .carousel,
7
+ .editor-carousel-block--fixed-ratio .carousel__track,
8
+ .editor-carousel-block--fixed-ratio .editor-carousel-block__slide { height: 100%; min-height: 0; }
9
+ .editor-carousel-block--fixed-ratio .editor-carousel-block__slide img,
10
+ .editor-carousel-block--fixed-ratio .editor-carousel-block__slide video { height: 100%; max-height: 100%; object-fit: contain; }
5
11
  .editor-carousel-block__html { box-sizing: border-box; width: 100%; padding: 1rem; }
6
12
  .editor-carousel-block figcaption { box-sizing: border-box; width: 100%; padding: .625rem .875rem; color: var(--er-text-2); font-size: .8125rem; text-align: center; }
7
13
  .editor-carousel-block .carousel__arrow:focus-visible, .editor-carousel-block .carousel__dot:focus-visible, .editor-carousel-block .carousel__thumb:focus-visible { outline: 2px solid var(--er-accent); outline-offset: 2px; }
@@ -1,8 +1,7 @@
1
1
  // @ts-check
2
- import { resolvePath } from '../../../shared/resolvePath.js'
3
2
  import { mapChecklistTextFields as mapTextFields } from '../../../shared/mapTextFields.js'
4
3
 
5
- const styles = resolvePath('./styles.css', import.meta.url)
4
+ const styles = new URL('./styles.css', import.meta.url).href
6
5
 
7
6
  /**
8
7
  * Checklist block renderer
@@ -5,9 +5,8 @@ import {
5
5
  loadHighlightRuntime,
6
6
  } from '../../../shared/highlightRuntime.js'
7
7
  import { escapeHtml } from '../../../shared/sanitize/escapeHtml.js'
8
- import { resolvePath } from '../../../shared/resolvePath.js'
9
8
 
10
- const styles = resolvePath('./styles.css', import.meta.url)
9
+ const styles = new URL('./styles.css', import.meta.url).href
11
10
 
12
11
 
13
12
  /**
@@ -1,8 +1,7 @@
1
1
  // @ts-check
2
- import { resolvePath } from '../../../shared/resolvePath.js'
3
2
  import { mapColumnsTextFields as mapTextFields } from '../../../shared/mapTextFields.js'
4
3
 
5
- const styles = resolvePath('./styles.css', import.meta.url)
4
+ const styles = new URL('./styles.css', import.meta.url).href
6
5
 
7
6
  /** @type {Record<string, string>} */
8
7
  const LAYOUT_GRIDS = {
@@ -1,7 +1,6 @@
1
1
  // @ts-check
2
- import { resolvePath } from '../../../shared/resolvePath.js'
3
2
 
4
- const styles = resolvePath('./styles.css', import.meta.url)
3
+ const styles = new URL('./styles.css', import.meta.url).href
5
4
 
6
5
  /**
7
6
  * Delimiter block renderer
@@ -1,8 +1,7 @@
1
1
  // @ts-check
2
2
  import { buildPlayer } from '../../../shared/embedPlayer.js'
3
- import { resolvePath } from '../../../shared/resolvePath.js'
4
3
 
5
- const styles = resolvePath('./styles.css', import.meta.url)
4
+ const styles = new URL('./styles.css', import.meta.url).href
6
5
 
7
6
  const ICON_PLAY = `<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M6 4v16a1 1 0 0 0 1.524 .852l13 -8a1 1 0 0 0 0 -1.704l-13 -8a1 1 0 0 0 -1.524 .852z" stroke-width="0" fill="currentColor"/></svg>`
8
7
 
@@ -10,10 +10,9 @@ import {
10
10
  createFullscreen,
11
11
  exposeStylesUrl,
12
12
  } from '@shelamkoff/expose'
13
- import { resolvePath } from '../../../shared/resolvePath.js'
14
13
  import { setSafeUrlAttribute } from '../../../shared/sanitize/sanitizeUrl.js'
15
14
 
16
- const styles = resolvePath('./styles.css', import.meta.url)
15
+ const styles = new URL('./styles.css', import.meta.url).href
17
16
  const exposeStyles = exposeStylesUrl
18
17
 
19
18
  const MAX_VISIBLE = 6
@@ -1,8 +1,7 @@
1
1
  // @ts-check
2
- import { resolvePath } from '../../../shared/resolvePath.js'
3
2
  import { mapHeadingTextFields as mapTextFields } from '../../../shared/mapTextFields.js'
4
3
 
5
- const styles = resolvePath('./styles.css', import.meta.url)
4
+ const styles = new URL('./styles.css', import.meta.url).href
6
5
 
7
6
  /**
8
7
  * Heading block renderer for the Rector document format.
@@ -1,8 +1,7 @@
1
1
  // @ts-check
2
- import { resolvePath } from '../../../shared/resolvePath.js'
3
2
  import { setSafeUrlAttribute } from '../../../shared/sanitize/sanitizeUrl.js'
4
3
 
5
- const styles = resolvePath('./styles.css', import.meta.url)
4
+ const styles = new URL('./styles.css', import.meta.url).href
6
5
 
7
6
  /**
8
7
  * Apply user-configured inline styles to the image and figure.
@@ -1,8 +1,7 @@
1
1
  // @ts-check
2
- import { resolvePath } from '../../../shared/resolvePath.js'
3
2
  import { sanitizeUrl, setSafeUrlAttribute } from '../../../shared/sanitize/sanitizeUrl.js'
4
3
 
5
- const styles = resolvePath('./styles.css', import.meta.url)
4
+ const styles = new URL('./styles.css', import.meta.url).href
6
5
 
7
6
  // Tabler icon: external-link
8
7
  const ICON_EXTERNAL = `<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 6h-6a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-6"/><path d="M11 13l9-9"/><path d="M15 4h5v5"/></svg>`
@@ -1,8 +1,7 @@
1
1
  // @ts-check
2
- import { resolvePath } from '../../../shared/resolvePath.js'
3
2
  import { mapListTextFields as mapTextFields } from '../../../shared/mapTextFields.js'
4
3
 
5
- const styles = resolvePath('./styles.css', import.meta.url)
4
+ const styles = new URL('./styles.css', import.meta.url).href
6
5
 
7
6
  /**
8
7
  * List block renderer for the Rector document format.
@@ -1,8 +1,7 @@
1
1
  // @ts-check
2
- import { resolvePath } from '../../../shared/resolvePath.js'
3
2
  import { mapParagraphTextFields as mapTextFields } from '../../../shared/mapTextFields.js'
4
3
 
5
- const styles = resolvePath('./styles.css', import.meta.url)
4
+ const styles = new URL('./styles.css', import.meta.url).href
6
5
 
7
6
  /**
8
7
  * Paragraph block renderer for the Rector document format.
@@ -1,9 +1,8 @@
1
1
  // @ts-check
2
2
  import { Carousel, createSwipe, carouselStylesUrl } from '@shelamkoff/carousel'
3
- import { resolvePath } from '../../../shared/resolvePath.js'
4
3
  import { setSafeUrlAttribute } from '../../../shared/sanitize/sanitizeUrl.js'
5
4
 
6
- const styles = resolvePath('./styles.css', import.meta.url)
5
+ const styles = new URL('./styles.css', import.meta.url).href
7
6
  const carouselStyles = carouselStylesUrl
8
7
 
9
8
  const ICON_LEFT = '<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><path d="M15 6l-6 6l6 6"/></svg>'
@@ -1,5 +1,4 @@
1
1
  // @ts-check
2
- import { resolvePath } from '../../../shared/resolvePath.js'
3
2
  import {
4
3
  applyLocalPollVote,
5
4
  normalizePollData,
@@ -8,7 +7,7 @@ import {
8
7
  } from '../../../shared/pollData.js'
9
8
  import { setSafeUrlAttribute } from '../../../shared/sanitize/sanitizeUrl.js'
10
9
 
11
- const styles = resolvePath('./styles.css', import.meta.url)
10
+ const styles = new URL('./styles.css', import.meta.url).href
12
11
 
13
12
  /**
14
13
  * Interactive poll renderer. Author configuration stays in the document;
@@ -1,8 +1,7 @@
1
1
  // @ts-check
2
- import { resolvePath } from '../../../shared/resolvePath.js'
3
2
  import { mapQuoteTextFields as mapTextFields } from '../../../shared/mapTextFields.js'
4
3
 
5
- const styles = resolvePath('./styles.css', import.meta.url)
4
+ const styles = new URL('./styles.css', import.meta.url).href
6
5
 
7
6
  // Tabler icon: quote
8
7
  const ICON_QUOTE = `<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M3 21c3 0 7-1 7-8V5c0-1.25-.756-2.017-2-2H4c-1.25 0-2 .75-2 1.972V11c0 1.25.75 2 2 2 1 0 1 0 1 1v1c0 1-1 2-2 2s-1 .008-1 1.031V20c0 1 0 1 1 1z"/><path d="M15 21c3 0 7-1 7-8V5c0-1.25-.756-2.017-2-2h-4c-1.25 0-2 .75-2 1.972V11c0 1.25.75 2 2 2 1 0 1 0 1 1v1c0 1-1 2-2 2s-1 .008-1 1.031V20c0 1 0 1 1 1z"/></svg>`
@@ -1,8 +1,7 @@
1
1
  // @ts-check
2
- import { resolvePath } from '../../../shared/resolvePath.js'
3
2
  import { mapSpoilerTextFields as mapTextFields } from '../../../shared/mapTextFields.js'
4
3
 
5
- const styles = resolvePath('./styles.css', import.meta.url)
4
+ const styles = new URL('./styles.css', import.meta.url).href
6
5
 
7
6
  // Tabler icon: eye-off
8
7
  const ICON = '<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M10.585 10.587a2 2 0 0 0 2.829 2.828"/><path d="M16.681 16.673a8.717 8.717 0 0 1-4.681 1.327c-3.6 0-6.6-2-9-6 1.272-2.12 2.712-3.678 4.32-4.674m2.86-1.146a9.055 9.055 0 0 1 1.82-.18c3.6 0 6.6 2 9 6-.666 1.11-1.379 2.067-2.138 2.87"/><path d="M3 3l18 18"/></svg>'
@@ -1,8 +1,7 @@
1
1
  // @ts-check
2
- import { resolvePath } from '../../../shared/resolvePath.js'
3
2
  import { mapTableTextFields as mapTextFields } from '../../../shared/mapTextFields.js'
4
3
 
5
- const styles = resolvePath('./styles.css', import.meta.url)
4
+ const styles = new URL('./styles.css', import.meta.url).href
6
5
 
7
6
  /**
8
7
  * Table block renderer
@@ -1,8 +1,7 @@
1
1
  // @ts-check
2
- import { resolvePath } from '../../../shared/resolvePath.js'
3
2
  import { mapToggleTextFields as mapTextFields } from '../../../shared/mapTextFields.js'
4
3
 
5
- const styles = resolvePath('./styles.css', import.meta.url)
4
+ const styles = new URL('./styles.css', import.meta.url).href
6
5
 
7
6
  // Tabler icon: chevron-right
8
7
  const ICON_CHEVRON = `<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M9 6l6 6l-6 6"/></svg>`
@@ -1,8 +1,7 @@
1
1
  // @ts-check
2
- import { resolvePath } from '../../../shared/resolvePath.js'
3
2
  import { mapWarningTextFields as mapTextFields } from '../../../shared/mapTextFields.js'
4
3
 
5
- const styles = resolvePath('./styles.css', import.meta.url)
4
+ const styles = new URL('./styles.css', import.meta.url).href
6
5
 
7
6
  // Tabler icon: alert-triangle
8
7
  const ICON_WARNING = `<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 9v4"/><path d="M10.363 3.591l-8.106 13.534a1.914 1.914 0 0 0 1.636 2.871h16.214a1.914 1.914 0 0 0 1.636-2.87l-8.106-13.536a1.914 1.914 0 0 0-3.274 0z"/><path d="M12 16h.01"/></svg>`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shelamkoff/rector",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "Extensible browser-native block editor with atomic history, versioned JSON, and document rendering",
5
5
  "type": "module",
6
6
  "sideEffects": [
@@ -46,14 +46,14 @@
46
46
  "types": "./dist/inline-tools/*.d.ts",
47
47
  "import": "./dist/inline-tools/*.js"
48
48
  },
49
- "./renderer": {
50
- "types": "./dist/renderer/index.d.ts",
51
- "import": "./dist/renderer/index.js"
52
- },
53
- "./renderer/types": {
54
- "types": "./dist/renderer/types.d.ts"
55
- },
56
- "./renderer/async": {
49
+ "./renderer": {
50
+ "types": "./dist/renderer/index.d.ts",
51
+ "import": "./dist/renderer/index.js"
52
+ },
53
+ "./renderer/types": {
54
+ "types": "./dist/renderer/types.d.ts"
55
+ },
56
+ "./renderer/async": {
57
57
  "types": "./dist/renderer/async.d.ts",
58
58
  "import": "./dist/renderer/async.js"
59
59
  },
@@ -78,39 +78,37 @@
78
78
  "./styles/themes/*": "./dist/core/themes/*.css",
79
79
  "./package.json": "./package.json"
80
80
  },
81
- "files": [
82
- "dist",
83
- "README.md",
84
- "LICENSE",
85
- "NOTICE",
86
- "THIRD_PARTY_LICENSES.txt"
81
+ "files": [
82
+ "dist",
83
+ "README.md",
84
+ "LICENSE",
85
+ "NOTICE",
86
+ "THIRD_PARTY_LICENSES.txt"
87
87
  ],
88
88
  "scripts": {
89
- "build": "npm run docs:validate-readmes && node scripts/build-package.mjs",
89
+ "build": "npm run docs:validate-readmes && node scripts/build-package.mjs",
90
90
  "build:types": "node scripts/generate-declarations.mjs --out dist",
91
91
  "typecheck": "node node_modules/typescript/bin/tsc -p jsconfig.json",
92
- "docs:validate-readmes": "node scripts/validate-extension-readmes.mjs",
93
- "docs:sync": "npm run docs:validate-readmes && node scripts/sync-vitepress-readmes.mjs",
92
+ "docs:validate-readmes": "node scripts/validate-extension-readmes.mjs",
93
+ "docs:sync": "npm run docs:validate-readmes && node scripts/sync-vitepress-readmes.mjs",
94
94
  "docs:dev": "npm run docs:sync && vitepress dev docs --host 127.0.0.1",
95
95
  "docs:build": "npm run docs:sync && vitepress build docs",
96
96
  "docs:preview": "vitepress preview docs --host 127.0.0.1",
97
- "docs:check": "npm run docs:build && node scripts/vitepress-docs-smoke.mjs && node scripts/vitepress-browser-smoke.mjs",
98
- "test": "node --test",
99
- "test:browser": "node tests/browser/run.mjs && node tests/browser/physical-history.mjs && node tests/browser/heap-gate.mjs",
100
- "test:plugin-source": "node scripts/plugin-source-audit.mjs",
101
- "test:plugin-locales": "node scripts/plugin-locale-audit.mjs",
102
- "test:docs": "npm run docs:validate-readmes && npm run test:plugin-source && npm run test:plugin-locales && node scripts/documentation-contract-audit.mjs && node scripts/readme-smoke.mjs",
97
+ "docs:check": "npm run docs:build && node scripts/vitepress-docs-smoke.mjs && node scripts/vitepress-browser-smoke.mjs",
98
+ "test": "node --test",
99
+ "test:browser": "node tests/browser/run.mjs && node tests/browser/physical-history.mjs && node tests/browser/heap-gate.mjs",
100
+ "test:plugin-source": "node scripts/plugin-source-audit.mjs",
101
+ "test:plugin-locales": "node scripts/plugin-locale-audit.mjs",
102
+ "test:docs": "npm run docs:validate-readmes && npm run test:plugin-source && npm run test:plugin-locales && node scripts/documentation-contract-audit.mjs && node scripts/readme-smoke.mjs",
103
103
  "test:types": "node --test shared/declarationParity.test.js",
104
104
  "test:package": "node scripts/package-consumer-gate.mjs",
105
105
  "prepublishOnly": "npm run typecheck && npm test && npm run test:browser && npm run test:docs && npm run test:types && npm run test:package",
106
106
  "prepack": "npm run build"
107
107
  },
108
108
  "dependencies": {
109
- "@shelamkoff/color-picker": "^1.0.0",
110
- "@shelamkoff/event-bus": "^1.0.0"
111
- },
112
- "peerDependencies": {
113
109
  "@shelamkoff/carousel": "^1.0.0",
110
+ "@shelamkoff/color-picker": "^1.0.0",
111
+ "@shelamkoff/event-bus": "^1.0.0",
114
112
  "@shelamkoff/cropper": "^1.0.0",
115
113
  "@shelamkoff/expose": "^1.0.0"
116
114
  },
@@ -137,7 +135,7 @@
137
135
  "type": "git",
138
136
  "url": "git+https://github.com/Shelamkoff/editor.git"
139
137
  },
140
- "homepage": "https://shelamkoff.github.io/editor/",
138
+ "homepage": "https://shelamkoff.github.io/editor/",
141
139
  "bugs": {
142
140
  "url": "https://github.com/Shelamkoff/editor/issues"
143
141
  },
@@ -1,8 +0,0 @@
1
- /**
2
- * Resolve a relative file path against a module URL.
3
- *
4
- * @param {string} relativePath — path relative to the calling module (e.g. './styles.css')
5
- * @param {string} base — pass `import.meta.url` of the calling module
6
- * @returns {string} absolute URL string
7
- */
8
- export function resolvePath(relativePath: string, base: string): string;
@@ -1,10 +0,0 @@
1
- /**
2
- * Resolve a relative file path against a module URL.
3
- *
4
- * @param {string} relativePath — path relative to the calling module (e.g. './styles.css')
5
- * @param {string} base — pass `import.meta.url` of the calling module
6
- * @returns {string} absolute URL string
7
- */
8
- export function resolvePath(relativePath, base) {
9
- return new URL(relativePath, base).href
10
- }