@jobber/components 7.1.2-MIKElock--7916eb4.2 → 7.2.0

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 (240) hide show
  1. package/dist/AtlantisThemeContext-cjs.js +1 -1
  2. package/dist/AtlantisThemeContext-es.js +9 -9
  3. package/dist/Autocomplete/index.cjs +2 -2
  4. package/dist/Autocomplete/index.mjs +5 -5
  5. package/dist/Body-cjs.js +1 -1
  6. package/dist/Body-es.js +2 -2
  7. package/dist/BottomSheet-cjs.js +1 -1
  8. package/dist/BottomSheet-es.js +1 -1
  9. package/dist/Box-cjs.js +2 -2
  10. package/dist/Box-es.js +2 -2
  11. package/dist/Button/index.mjs +1 -1
  12. package/dist/Button-es.js +1 -1
  13. package/dist/Card-cjs.js +1 -1
  14. package/dist/Card-es.js +1 -1
  15. package/dist/Checkbox/index.cjs +1 -1
  16. package/dist/Checkbox/index.mjs +1 -1
  17. package/dist/Chip/Chip.d.ts +7 -1
  18. package/dist/Chip/Chip.types.d.ts +7 -2
  19. package/dist/Chip/index.cjs +1 -1
  20. package/dist/Chip/index.mjs +2 -2
  21. package/dist/Chip-cjs.js +42 -27
  22. package/dist/Chip-es.js +42 -27
  23. package/dist/ChipDismissible-es.js +1 -1
  24. package/dist/Chips/InternalChipDismissible/hooks/index.mjs +1 -1
  25. package/dist/Combobox/components/ComboboxTrigger/index.cjs +1 -1
  26. package/dist/Combobox/components/ComboboxTrigger/index.mjs +1 -1
  27. package/dist/Combobox-cjs.js +1 -1
  28. package/dist/Combobox-es.js +1 -1
  29. package/dist/ComboboxAction-cjs.js +1 -1
  30. package/dist/ComboboxAction-es.js +1 -1
  31. package/dist/ComboboxContent-cjs.js +1 -1
  32. package/dist/ComboboxContent-es.js +2 -2
  33. package/dist/ComboboxContentHeader-cjs.js +1 -1
  34. package/dist/ComboboxContentHeader-es.js +1 -1
  35. package/dist/ComboboxContentList-es.js +1 -1
  36. package/dist/ComboboxContentSearch-cjs.js +1 -1
  37. package/dist/ComboboxContentSearch-es.js +1 -1
  38. package/dist/ComboboxLoadMore-cjs.js +1 -1
  39. package/dist/ComboboxLoadMore-es.js +1 -1
  40. package/dist/ComboboxOption-cjs.js +1 -1
  41. package/dist/ComboboxOption-es.js +1 -1
  42. package/dist/Container-cjs.js +1 -1
  43. package/dist/Container-es.js +1 -1
  44. package/dist/Content-cjs.js +1 -1
  45. package/dist/Content-es.js +1 -1
  46. package/dist/ContentBlock-cjs.js +1 -1
  47. package/dist/ContentBlock-es.js +1 -1
  48. package/dist/Countdown-cjs.js +3 -7
  49. package/dist/Countdown-es.js +4 -8
  50. package/dist/Cover-cjs.js +1 -1
  51. package/dist/Cover-es.js +1 -1
  52. package/dist/DataList-es.js +3 -3
  53. package/dist/DataList.const-cjs.js +1 -0
  54. package/dist/DataList.const-es.js +2 -1
  55. package/dist/DataList.module-cjs.js +1 -1
  56. package/dist/DataList.module-es.js +1 -1
  57. package/dist/DataList.utils-es.js +6 -6
  58. package/dist/DataListAction-cjs.js +1 -1
  59. package/dist/DataListAction-es.js +1 -1
  60. package/dist/DataListActionsMenu-cjs.js +1 -1
  61. package/dist/DataListActionsMenu-es.js +2 -2
  62. package/dist/DataListBulkActions-cjs.js +1 -1
  63. package/dist/DataListBulkActions-es.js +1 -1
  64. package/dist/DataListEmptyState-cjs.js +1 -1
  65. package/dist/DataListEmptyState-es.js +1 -1
  66. package/dist/DataListHeaderTile-cjs.js +2 -2
  67. package/dist/DataListHeaderTile-es.js +2 -2
  68. package/dist/DataListItemActions-cjs.js +1 -1
  69. package/dist/DataListItemActions-es.js +2 -2
  70. package/dist/DataListLayoutActions-cjs.js +1 -1
  71. package/dist/DataListLayoutActions-es.js +2 -2
  72. package/dist/DataListLoadMore-cjs.js +1 -1
  73. package/dist/DataListLoadMore-es.js +1 -1
  74. package/dist/DataListLoadingState-cjs.js +1 -1
  75. package/dist/DataListLoadingState-es.js +2 -2
  76. package/dist/DataListOverflowFade-cjs.js +1 -1
  77. package/dist/DataListOverflowFade-es.js +1 -1
  78. package/dist/DataListSearch-cjs.js +1 -1
  79. package/dist/DataListSearch-es.js +1 -1
  80. package/dist/DataListSortingOptions-cjs.js +1 -1
  81. package/dist/DataListSortingOptions-es.js +1 -1
  82. package/dist/DataListStickyHeader-cjs.js +1 -1
  83. package/dist/DataListStickyHeader-es.js +1 -1
  84. package/dist/DataListTags-cjs.js +1 -1
  85. package/dist/DataListTags-es.js +1 -1
  86. package/dist/DataListTotalCount-cjs.js +1 -1
  87. package/dist/DataListTotalCount-es.js +2 -2
  88. package/dist/DataTable/index.mjs +1 -1
  89. package/dist/DataTable-cjs.js +3 -3
  90. package/dist/DataTable-es.js +5 -5
  91. package/dist/DataTableTable-cjs.js +2 -2
  92. package/dist/DataTableTable-es.js +3 -3
  93. package/dist/DatePicker-cjs.js +81 -266
  94. package/dist/DatePicker-es.js +83 -268
  95. package/dist/DayOfMonthSelect-cjs.js +5 -5
  96. package/dist/DayOfMonthSelect-es.js +6 -6
  97. package/dist/DescriptionList-cjs.js +1 -1
  98. package/dist/DescriptionList-es.js +1 -1
  99. package/dist/Disclosure-cjs.js +1 -1
  100. package/dist/Disclosure-es.js +1 -1
  101. package/dist/Divider-cjs.js +1 -1
  102. package/dist/Divider-es.js +1 -1
  103. package/dist/DrawerGrid-cjs.js +2 -2
  104. package/dist/DrawerGrid-es.js +2 -2
  105. package/dist/DrawerRoot-cjs.js +48 -10
  106. package/dist/DrawerRoot-es.js +50 -12
  107. package/dist/FeatureSwitch-cjs.js +1 -1
  108. package/dist/FeatureSwitch-es.js +1 -1
  109. package/dist/FormField/index.mjs +1 -1
  110. package/dist/FormField-cjs.js +1 -1
  111. package/dist/FormField-es.js +2 -2
  112. package/dist/FormatEmail-cjs.js +1 -1
  113. package/dist/FormatEmail-es.js +1 -1
  114. package/dist/FormatFile-cjs.js +6 -1
  115. package/dist/FormatFile-es.js +6 -1
  116. package/dist/Frame-cjs.js +1 -1
  117. package/dist/Frame-es.js +1 -1
  118. package/dist/Glimmer/index.mjs +1 -1
  119. package/dist/Glimmer-cjs.js +1 -1
  120. package/dist/Glimmer-es.js +2 -2
  121. package/dist/Grid-cjs.js +1 -1
  122. package/dist/Grid-es.js +1 -1
  123. package/dist/GridCell-cjs.js +1 -1
  124. package/dist/GridCell-es.js +1 -1
  125. package/dist/InputAvatar-cjs.js +1 -1
  126. package/dist/InputAvatar-es.js +1 -1
  127. package/dist/InputDate/index.mjs +1 -1
  128. package/dist/InputEmail/index.mjs +1 -1
  129. package/dist/InputFile-cjs.js +3 -8
  130. package/dist/InputFile-es.js +3 -8
  131. package/dist/InputNumber/index.cjs +59 -165
  132. package/dist/InputNumber/index.mjs +62 -168
  133. package/dist/InputPassword-es.js +1 -1
  134. package/dist/InputPhoneNumber/index.cjs +1 -1
  135. package/dist/InputPhoneNumber/index.mjs +2 -2
  136. package/dist/InputText/InputText.d.ts +70 -2
  137. package/dist/InputText/index.mjs +1 -1
  138. package/dist/InputTime/index.cjs +1 -0
  139. package/dist/InputTime/index.mjs +2 -1
  140. package/dist/InputValidation-cjs.js +1 -1
  141. package/dist/InputValidation-es.js +1 -1
  142. package/dist/InternalChipDismissible-cjs.js +2 -2
  143. package/dist/InternalChipDismissible-es.js +3 -3
  144. package/dist/LightBox-cjs.js +1 -1
  145. package/dist/LightBox-es.js +1 -1
  146. package/dist/Link-cjs.js +1 -1
  147. package/dist/Link-es.js +1 -1
  148. package/dist/List-cjs.js +3 -3
  149. package/dist/List-es.js +7 -7
  150. package/dist/Markdown-cjs.js +392 -466
  151. package/dist/Markdown-es.js +398 -472
  152. package/dist/Menu-cjs.js +577 -739
  153. package/dist/Menu-es.js +573 -735
  154. package/dist/Modal/index.cjs +2 -2
  155. package/dist/Modal/index.mjs +2 -2
  156. package/dist/MultiSelect-cjs.js +2 -2
  157. package/dist/MultiSelect-es.js +2 -2
  158. package/dist/OverlaySeparator-cjs.js +1 -1
  159. package/dist/OverlaySeparator-es.js +1 -1
  160. package/dist/Popover-cjs.js +1 -1
  161. package/dist/Popover-es.js +2 -2
  162. package/dist/ProgressBar-cjs.js +1 -1
  163. package/dist/ProgressBar-es.js +1 -1
  164. package/dist/RadioGroup-cjs.js +1 -1
  165. package/dist/RadioGroup-es.js +1 -1
  166. package/dist/RecurringSelect/components/index.mjs +1 -1
  167. package/dist/RecurringSelect/index.cjs +0 -1
  168. package/dist/RecurringSelect/index.mjs +0 -1
  169. package/dist/RecurringSelect-cjs.js +1 -1
  170. package/dist/RecurringSelect-es.js +2 -2
  171. package/dist/SegmentedControl-cjs.js +1 -1
  172. package/dist/SegmentedControl-es.js +2 -2
  173. package/dist/Select/index.cjs +1 -1
  174. package/dist/Select/index.mjs +2 -2
  175. package/dist/SideDrawer-cjs.js +1 -1
  176. package/dist/SideDrawer-es.js +1 -1
  177. package/dist/Spinner-cjs.js +1 -1
  178. package/dist/Spinner-es.js +1 -1
  179. package/dist/StatusIndicator-cjs.js +1 -1
  180. package/dist/StatusIndicator-es.js +1 -1
  181. package/dist/Switch-cjs.js +1 -1
  182. package/dist/Switch-es.js +1 -1
  183. package/dist/Table/index.mjs +1 -1
  184. package/dist/Tabs/index.mjs +1 -1
  185. package/dist/Tabs-cjs.js +1 -1
  186. package/dist/Tabs-es.js +6 -6
  187. package/dist/Text-cjs2.js +164 -298
  188. package/dist/Text-es2.js +164 -295
  189. package/dist/Thumbnail-cjs.js +1 -1
  190. package/dist/Thumbnail-es.js +2 -2
  191. package/dist/Tiles-cjs.js +1 -1
  192. package/dist/Tiles-es.js +1 -1
  193. package/dist/Tooltip-cjs.js +1 -1
  194. package/dist/Tooltip-es.js +2 -2
  195. package/dist/Typography-cjs.js +3 -3
  196. package/dist/Typography-es.js +3 -3
  197. package/dist/_baseEach-cjs.js +1 -1
  198. package/dist/_baseEach-es.js +7 -7
  199. package/dist/_baseFlatten-es.js +1 -1
  200. package/dist/_getAllKeys-cjs.js +8 -2
  201. package/dist/_getAllKeys-es.js +10 -4
  202. package/dist/_getTag-es.js +1 -1
  203. package/dist/_isIterateeCall-es.js +3 -3
  204. package/dist/_setToString-es.js +2 -2
  205. package/dist/debounce-es.js +4 -4
  206. package/dist/docs/Autocomplete/AutocompleteV1.md +1 -1
  207. package/dist/docs/Autocomplete/AutocompleteV2.md +1 -1
  208. package/dist/docs/Banner/Banner.md +1 -1
  209. package/dist/docs/Chip/Chip.md +4 -2
  210. package/dist/docs/DataList/DataList.md +1 -1
  211. package/dist/docs/FormField/FormField.md +2 -2
  212. package/dist/docs/InputEmail/InputEmail.md +1 -1
  213. package/dist/docs/InputNumber/InputNumber.md +2 -2
  214. package/dist/docs/InputPhoneNumber/InputPhoneNumber.md +1 -1
  215. package/dist/docs/InputText/InputText.md +2 -2
  216. package/dist/docs/Modal/Modal.md +3 -3
  217. package/dist/docs/Select/Select.md +2 -2
  218. package/dist/floating-ui.react-cjs.js +16 -35
  219. package/dist/floating-ui.react-dom-es.js +2 -2
  220. package/dist/floating-ui.react-es.js +18 -37
  221. package/dist/identity-es.js +5 -5
  222. package/dist/index-cjs.js +6 -6
  223. package/dist/index-es.js +6 -6
  224. package/dist/index.esm-es.js +1 -1
  225. package/dist/index.mjs +6 -6
  226. package/dist/isSymbol-es.js +1 -1
  227. package/dist/isTypedArray-cjs.js +4 -4
  228. package/dist/isTypedArray-es.js +6 -6
  229. package/dist/keysIn-cjs.js +2 -2
  230. package/dist/keysIn-es.js +5 -5
  231. package/dist/noop-es.js +4 -4
  232. package/dist/omit-cjs.js +5 -37
  233. package/dist/omit-es.js +14 -46
  234. package/dist/showToast-cjs.js +1 -1
  235. package/dist/showToast-es.js +1 -1
  236. package/dist/styles.css +117 -54
  237. package/dist/unstyledPrimitives/index.mjs +3 -3
  238. package/dist/useScrollToActive-cjs.js +1 -1
  239. package/dist/useScrollToActive-es.js +8 -8
  240. package/package.json +3 -4
@@ -3,7 +3,7 @@ import { T as Text } from './Text-es.js';
3
3
  import { E as Emphasis } from './Emphasis-es.js';
4
4
  import { H as Heading } from './Heading-es.js';
5
5
  import { C as Content } from './Content-es.js';
6
- import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
6
+ import { Fragment, jsx, jsxs } from 'react/jsx-runtime';
7
7
  import { c as commonjsGlobal, g as getDefaultExportFromCjs } from './_commonjsHelpers-es.js';
8
8
 
9
9
  function ok$1() {}
@@ -110,107 +110,93 @@ function empty$1(value) {
110
110
  }
111
111
 
112
112
  /**
113
- * @import {Schema as SchemaType, Space} from 'property-information'
113
+ * @typedef {import('./info.js').Info} Info
114
+ * @typedef {Record<string, Info>} Properties
115
+ * @typedef {Record<string, string>} Normal
114
116
  */
115
117
 
116
- /** @type {SchemaType} */
117
118
  class Schema {
118
119
  /**
119
- * @param {SchemaType['property']} property
120
- * Property.
121
- * @param {SchemaType['normal']} normal
122
- * Normal.
123
- * @param {Space | undefined} [space]
124
- * Space.
125
- * @returns
126
- * Schema.
120
+ * @constructor
121
+ * @param {Properties} property
122
+ * @param {Normal} normal
123
+ * @param {string} [space]
127
124
  */
128
125
  constructor(property, normal, space) {
129
- this.normal = normal;
130
126
  this.property = property;
131
-
127
+ this.normal = normal;
132
128
  if (space) {
133
129
  this.space = space;
134
130
  }
135
131
  }
136
132
  }
137
133
 
138
- Schema.prototype.normal = {};
134
+ /** @type {Properties} */
139
135
  Schema.prototype.property = {};
140
- Schema.prototype.space = undefined;
136
+ /** @type {Normal} */
137
+ Schema.prototype.normal = {};
138
+ /** @type {string|null} */
139
+ Schema.prototype.space = null;
141
140
 
142
141
  /**
143
- * @import {Info, Space} from 'property-information'
142
+ * @typedef {import('./schema.js').Properties} Properties
143
+ * @typedef {import('./schema.js').Normal} Normal
144
144
  */
145
145
 
146
146
 
147
147
  /**
148
- * @param {ReadonlyArray<Schema>} definitions
149
- * Definitions.
150
- * @param {Space | undefined} [space]
151
- * Space.
148
+ * @param {Schema[]} definitions
149
+ * @param {string} [space]
152
150
  * @returns {Schema}
153
- * Schema.
154
151
  */
155
152
  function merge(definitions, space) {
156
- /** @type {Record<string, Info>} */
153
+ /** @type {Properties} */
157
154
  const property = {};
158
- /** @type {Record<string, string>} */
155
+ /** @type {Normal} */
159
156
  const normal = {};
157
+ let index = -1;
160
158
 
161
- for (const definition of definitions) {
162
- Object.assign(property, definition.property);
163
- Object.assign(normal, definition.normal);
159
+ while (++index < definitions.length) {
160
+ Object.assign(property, definitions[index].property);
161
+ Object.assign(normal, definitions[index].normal);
164
162
  }
165
163
 
166
164
  return new Schema(property, normal, space)
167
165
  }
168
166
 
169
167
  /**
170
- * Get the cleaned case insensitive form of an attribute or property.
171
- *
172
168
  * @param {string} value
173
- * An attribute-like or property-like name.
174
169
  * @returns {string}
175
- * Value that can be used to look up the properly cased property on a
176
- * `Schema`.
177
170
  */
178
171
  function normalize$1(value) {
179
172
  return value.toLowerCase()
180
173
  }
181
174
 
182
- /**
183
- * @import {Info as InfoType} from 'property-information'
184
- */
185
-
186
- /** @type {InfoType} */
187
175
  class Info {
188
176
  /**
177
+ * @constructor
189
178
  * @param {string} property
190
- * Property.
191
179
  * @param {string} attribute
192
- * Attribute.
193
- * @returns
194
- * Info.
195
180
  */
196
181
  constructor(property, attribute) {
197
- this.attribute = attribute;
182
+ /** @type {string} */
198
183
  this.property = property;
184
+ /** @type {string} */
185
+ this.attribute = attribute;
199
186
  }
200
187
  }
201
188
 
202
- Info.prototype.attribute = '';
203
- Info.prototype.booleanish = false;
189
+ /** @type {string|null} */
190
+ Info.prototype.space = null;
204
191
  Info.prototype.boolean = false;
205
- Info.prototype.commaOrSpaceSeparated = false;
206
- Info.prototype.commaSeparated = false;
207
- Info.prototype.defined = false;
208
- Info.prototype.mustUseProperty = false;
209
- Info.prototype.number = false;
192
+ Info.prototype.booleanish = false;
210
193
  Info.prototype.overloadedBoolean = false;
211
- Info.prototype.property = '';
194
+ Info.prototype.number = false;
195
+ Info.prototype.commaSeparated = false;
212
196
  Info.prototype.spaceSeparated = false;
213
- Info.prototype.space = undefined;
197
+ Info.prototype.commaOrSpaceSeparated = false;
198
+ Info.prototype.mustUseProperty = false;
199
+ Info.prototype.defined = false;
214
200
 
215
201
  let powers = 0;
216
202
 
@@ -237,28 +223,17 @@ var types = /*#__PURE__*/Object.freeze({
237
223
  spaceSeparated: spaceSeparated
238
224
  });
239
225
 
240
- /**
241
- * @import {Space} from 'property-information'
242
- */
243
-
244
-
245
- const checks = /** @type {ReadonlyArray<keyof typeof types>} */ (
246
- Object.keys(types)
247
- );
226
+ /** @type {Array<keyof types>} */
227
+ // @ts-expect-error: hush.
228
+ const checks = Object.keys(types);
248
229
 
249
230
  class DefinedInfo extends Info {
250
231
  /**
251
232
  * @constructor
252
233
  * @param {string} property
253
- * Property.
254
234
  * @param {string} attribute
255
- * Attribute.
256
- * @param {number | null | undefined} [mask]
257
- * Mask.
258
- * @param {Space | undefined} [space]
259
- * Space.
260
- * @returns
261
- * Info.
235
+ * @param {number|null} [mask]
236
+ * @param {string} [space]
262
237
  */
263
238
  constructor(property, attribute, mask, space) {
264
239
  let index = -1;
@@ -279,65 +254,126 @@ class DefinedInfo extends Info {
279
254
  DefinedInfo.prototype.defined = true;
280
255
 
281
256
  /**
282
- * @template {keyof DefinedInfo} Key
283
- * Key type.
284
257
  * @param {DefinedInfo} values
285
- * Info.
286
- * @param {Key} key
287
- * Key.
288
- * @param {DefinedInfo[Key]} value
289
- * Value.
290
- * @returns {undefined}
291
- * Nothing.
258
+ * @param {string} key
259
+ * @param {unknown} value
292
260
  */
293
261
  function mark(values, key, value) {
294
262
  if (value) {
263
+ // @ts-expect-error: assume `value` matches the expected value of `key`.
295
264
  values[key] = value;
296
265
  }
297
266
  }
298
267
 
299
268
  /**
300
- * @import {Info, Space} from 'property-information'
269
+ * @typedef {import('./schema.js').Properties} Properties
270
+ * @typedef {import('./schema.js').Normal} Normal
271
+ *
272
+ * @typedef {Record<string, string>} Attributes
273
+ *
274
+ * @typedef {Object} Definition
275
+ * @property {Record<string, number|null>} properties
276
+ * @property {(attributes: Attributes, property: string) => string} transform
277
+ * @property {string} [space]
278
+ * @property {Attributes} [attributes]
279
+ * @property {Array<string>} [mustUseProperty]
301
280
  */
302
281
 
303
282
 
283
+ const own$5 = {}.hasOwnProperty;
284
+
304
285
  /**
305
286
  * @param {Definition} definition
306
- * Definition.
307
287
  * @returns {Schema}
308
- * Schema.
309
288
  */
310
289
  function create(definition) {
311
- /** @type {Record<string, Info>} */
312
- const properties = {};
313
- /** @type {Record<string, string>} */
314
- const normals = {};
315
-
316
- for (const [property, value] of Object.entries(definition.properties)) {
317
- const info = new DefinedInfo(
318
- property,
319
- definition.transform(definition.attributes || {}, property),
320
- value,
321
- definition.space
322
- );
290
+ /** @type {Properties} */
291
+ const property = {};
292
+ /** @type {Normal} */
293
+ const normal = {};
294
+ /** @type {string} */
295
+ let prop;
323
296
 
324
- if (
325
- definition.mustUseProperty &&
326
- definition.mustUseProperty.includes(property)
327
- ) {
328
- info.mustUseProperty = true;
297
+ for (prop in definition.properties) {
298
+ if (own$5.call(definition.properties, prop)) {
299
+ const value = definition.properties[prop];
300
+ const info = new DefinedInfo(
301
+ prop,
302
+ definition.transform(definition.attributes || {}, prop),
303
+ value,
304
+ definition.space
305
+ );
306
+
307
+ if (
308
+ definition.mustUseProperty &&
309
+ definition.mustUseProperty.includes(prop)
310
+ ) {
311
+ info.mustUseProperty = true;
312
+ }
313
+
314
+ property[prop] = info;
315
+
316
+ normal[normalize$1(prop)] = prop;
317
+ normal[normalize$1(info.attribute)] = prop;
329
318
  }
319
+ }
330
320
 
331
- properties[property] = info;
321
+ return new Schema(property, normal, definition.space)
322
+ }
332
323
 
333
- normals[normalize$1(property)] = property;
334
- normals[normalize$1(info.attribute)] = property;
324
+ const xlink = create({
325
+ space: 'xlink',
326
+ transform(_, prop) {
327
+ return 'xlink:' + prop.slice(5).toLowerCase()
328
+ },
329
+ properties: {
330
+ xLinkActuate: null,
331
+ xLinkArcRole: null,
332
+ xLinkHref: null,
333
+ xLinkRole: null,
334
+ xLinkShow: null,
335
+ xLinkTitle: null,
336
+ xLinkType: null
335
337
  }
338
+ });
339
+
340
+ const xml = create({
341
+ space: 'xml',
342
+ transform(_, prop) {
343
+ return 'xml:' + prop.slice(3).toLowerCase()
344
+ },
345
+ properties: {xmlLang: null, xmlBase: null, xmlSpace: null}
346
+ });
347
+
348
+ /**
349
+ * @param {Record<string, string>} attributes
350
+ * @param {string} attribute
351
+ * @returns {string}
352
+ */
353
+ function caseSensitiveTransform(attributes, attribute) {
354
+ return attribute in attributes ? attributes[attribute] : attribute
355
+ }
336
356
 
337
- return new Schema(properties, normals, definition.space)
357
+ /**
358
+ * @param {Record<string, string>} attributes
359
+ * @param {string} property
360
+ * @returns {string}
361
+ */
362
+ function caseInsensitiveTransform(attributes, property) {
363
+ return caseSensitiveTransform(attributes, property.toLowerCase())
338
364
  }
339
365
 
366
+ const xmlns = create({
367
+ space: 'xmlns',
368
+ attributes: {xmlnsxlink: 'xmlns:xlink'},
369
+ transform: caseInsensitiveTransform,
370
+ properties: {xmlns: null, xmlnsXLink: null}
371
+ });
372
+
340
373
  const aria = create({
374
+ transform(_, prop) {
375
+ return prop === 'role' ? prop : 'aria-' + prop.slice(4).toLowerCase()
376
+ },
341
377
  properties: {
342
378
  ariaActiveDescendant: null,
343
379
  ariaAtomic: booleanish,
@@ -388,45 +424,18 @@ const aria = create({
388
424
  ariaValueNow: number,
389
425
  ariaValueText: null,
390
426
  role: null
391
- },
392
- transform(_, property) {
393
- return property === 'role'
394
- ? property
395
- : 'aria-' + property.slice(4).toLowerCase()
396
427
  }
397
428
  });
398
429
 
399
- /**
400
- * @param {Record<string, string>} attributes
401
- * Attributes.
402
- * @param {string} attribute
403
- * Attribute.
404
- * @returns {string}
405
- * Transformed attribute.
406
- */
407
- function caseSensitiveTransform(attributes, attribute) {
408
- return attribute in attributes ? attributes[attribute] : attribute
409
- }
410
-
411
- /**
412
- * @param {Record<string, string>} attributes
413
- * Attributes.
414
- * @param {string} property
415
- * Property.
416
- * @returns {string}
417
- * Transformed property.
418
- */
419
- function caseInsensitiveTransform(attributes, property) {
420
- return caseSensitiveTransform(attributes, property.toLowerCase())
421
- }
422
-
423
430
  const html$2 = create({
431
+ space: 'html',
424
432
  attributes: {
425
433
  acceptcharset: 'accept-charset',
426
434
  classname: 'class',
427
435
  htmlfor: 'for',
428
436
  httpequiv: 'http-equiv'
429
437
  },
438
+ transform: caseInsensitiveTransform,
430
439
  mustUseProperty: ['checked', 'multiple', 'muted', 'selected'],
431
440
  properties: {
432
441
  // Standard Properties.
@@ -481,7 +490,7 @@ const html$2 = create({
481
490
  formTarget: null,
482
491
  headers: spaceSeparated,
483
492
  height: number,
484
- hidden: overloadedBoolean,
493
+ hidden: boolean,
485
494
  high: number,
486
495
  href: null,
487
496
  hrefLang: null,
@@ -727,12 +736,11 @@ const html$2 = create({
727
736
  results: number,
728
737
  security: null,
729
738
  unselectable: null
730
- },
731
- space: 'html',
732
- transform: caseInsensitiveTransform
739
+ }
733
740
  });
734
741
 
735
742
  const svg$1 = create({
743
+ space: 'svg',
736
744
  attributes: {
737
745
  accentHeight: 'accent-height',
738
746
  alignmentBaseline: 'alignment-baseline',
@@ -908,6 +916,7 @@ const svg$1 = create({
908
916
  playbackOrder: 'playbackorder',
909
917
  timelineBegin: 'timelinebegin'
910
918
  },
919
+ transform: caseSensitiveTransform,
911
920
  properties: {
912
921
  about: commaOrSpaceSeparated,
913
922
  accentHeight: number,
@@ -1285,115 +1294,26 @@ const svg$1 = create({
1285
1294
  yChannelSelector: null,
1286
1295
  z: null,
1287
1296
  zoomAndPan: null
1288
- },
1289
- space: 'svg',
1290
- transform: caseSensitiveTransform
1291
- });
1292
-
1293
- const xlink = create({
1294
- properties: {
1295
- xLinkActuate: null,
1296
- xLinkArcRole: null,
1297
- xLinkHref: null,
1298
- xLinkRole: null,
1299
- xLinkShow: null,
1300
- xLinkTitle: null,
1301
- xLinkType: null
1302
- },
1303
- space: 'xlink',
1304
- transform(_, property) {
1305
- return 'xlink:' + property.slice(5).toLowerCase()
1306
1297
  }
1307
1298
  });
1308
1299
 
1309
- const xmlns = create({
1310
- attributes: {xmlnsxlink: 'xmlns:xlink'},
1311
- properties: {xmlnsXLink: null, xmlns: null},
1312
- space: 'xmlns',
1313
- transform: caseInsensitiveTransform
1314
- });
1315
-
1316
- const xml = create({
1317
- properties: {xmlBase: null, xmlLang: null, xmlSpace: null},
1318
- space: 'xml',
1319
- transform(_, property) {
1320
- return 'xml:' + property.slice(3).toLowerCase()
1321
- }
1322
- });
1323
-
1324
- /**
1325
- * Special cases for React (`Record<string, string>`).
1326
- *
1327
- * `hast` is close to `React` but differs in a couple of cases.
1328
- * To get a React property from a hast property,
1329
- * check if it is in `hastToReact`.
1330
- * If it is, use the corresponding value;
1331
- * otherwise, use the hast property.
1332
- *
1333
- * @type {Record<string, string>}
1334
- */
1335
- const hastToReact = {
1336
- classId: 'classID',
1337
- dataType: 'datatype',
1338
- itemId: 'itemID',
1339
- strokeDashArray: 'strokeDasharray',
1340
- strokeDashOffset: 'strokeDashoffset',
1341
- strokeLineCap: 'strokeLinecap',
1342
- strokeLineJoin: 'strokeLinejoin',
1343
- strokeMiterLimit: 'strokeMiterlimit',
1344
- typeOf: 'typeof',
1345
- xLinkActuate: 'xlinkActuate',
1346
- xLinkArcRole: 'xlinkArcrole',
1347
- xLinkHref: 'xlinkHref',
1348
- xLinkRole: 'xlinkRole',
1349
- xLinkShow: 'xlinkShow',
1350
- xLinkTitle: 'xlinkTitle',
1351
- xLinkType: 'xlinkType',
1352
- xmlnsXLink: 'xmlnsXlink'
1353
- };
1354
-
1355
1300
  /**
1356
- * @import {Schema} from 'property-information'
1301
+ * @typedef {import('./util/schema.js').Schema} Schema
1357
1302
  */
1358
1303
 
1359
1304
 
1360
- const cap$1 = /[A-Z]/g;
1361
- const dash = /-[a-z]/g;
1362
1305
  const valid = /^data[-\w.:]+$/i;
1306
+ const dash = /-[a-z]/g;
1307
+ const cap$1 = /[A-Z]/g;
1363
1308
 
1364
1309
  /**
1365
- * Look up info on a property.
1366
- *
1367
- * In most cases the given `schema` contains info on the property.
1368
- * All standard,
1369
- * most legacy,
1370
- * and some non-standard properties are supported.
1371
- * For these cases,
1372
- * the returned `Info` has hints about the value of the property.
1373
- *
1374
- * `name` can also be a valid data attribute or property,
1375
- * in which case an `Info` object with the correctly cased `attribute` and
1376
- * `property` is returned.
1377
- *
1378
- * `name` can be an unknown attribute,
1379
- * in which case an `Info` object with `attribute` and `property` set to the
1380
- * given name is returned.
1381
- * It is not recommended to provide unsupported legacy or recently specced
1382
- * properties.
1383
- *
1384
- *
1385
1310
  * @param {Schema} schema
1386
- * Schema;
1387
- * either the `html` or `svg` export.
1388
1311
  * @param {string} value
1389
- * An attribute-like or property-like name;
1390
- * it will be passed through `normalize` to hopefully find the correct info.
1391
1312
  * @returns {Info}
1392
- * Info.
1393
1313
  */
1394
1314
  function find(schema, value) {
1395
1315
  const normal = normalize$1(value);
1396
- let property = value;
1316
+ let prop = value;
1397
1317
  let Type = Info;
1398
1318
 
1399
1319
  if (normal in schema.normal) {
@@ -1405,7 +1325,7 @@ function find(schema, value) {
1405
1325
  if (value.charAt(4) === '-') {
1406
1326
  // Turn it into a property.
1407
1327
  const rest = value.slice(5).replace(dash, camelcase);
1408
- property = 'data' + rest.charAt(0).toUpperCase() + rest.slice(1);
1328
+ prop = 'data' + rest.charAt(0).toUpperCase() + rest.slice(1);
1409
1329
  } else {
1410
1330
  // Turn it into an attribute.
1411
1331
  const rest = value.slice(4);
@@ -1424,14 +1344,12 @@ function find(schema, value) {
1424
1344
  Type = DefinedInfo;
1425
1345
  }
1426
1346
 
1427
- return new Type(property, value)
1347
+ return new Type(prop, value)
1428
1348
  }
1429
1349
 
1430
1350
  /**
1431
1351
  * @param {string} $0
1432
- * Value.
1433
1352
  * @returns {string}
1434
- * Kebab.
1435
1353
  */
1436
1354
  function kebab($0) {
1437
1355
  return '-' + $0.toLowerCase()
@@ -1439,19 +1357,48 @@ function kebab($0) {
1439
1357
 
1440
1358
  /**
1441
1359
  * @param {string} $0
1442
- * Value.
1443
1360
  * @returns {string}
1444
- * Camel.
1445
1361
  */
1446
1362
  function camelcase($0) {
1447
1363
  return $0.charAt(1).toUpperCase()
1448
1364
  }
1449
1365
 
1450
- // Note: types exposed from `index.d.ts`.
1366
+ /**
1367
+ * `hast` is close to `React`, but differs in a couple of cases.
1368
+ *
1369
+ * To get a React property from a hast property, check if it is in
1370
+ * `hastToReact`, if it is, then use the corresponding value,
1371
+ * otherwise, use the hast property.
1372
+ *
1373
+ * @type {Record<string, string>}
1374
+ */
1375
+ const hastToReact = {
1376
+ classId: 'classID',
1377
+ dataType: 'datatype',
1378
+ itemId: 'itemID',
1379
+ strokeDashArray: 'strokeDasharray',
1380
+ strokeDashOffset: 'strokeDashoffset',
1381
+ strokeLineCap: 'strokeLinecap',
1382
+ strokeLineJoin: 'strokeLinejoin',
1383
+ strokeMiterLimit: 'strokeMiterlimit',
1384
+ typeOf: 'typeof',
1385
+ xLinkActuate: 'xlinkActuate',
1386
+ xLinkArcRole: 'xlinkArcrole',
1387
+ xLinkHref: 'xlinkHref',
1388
+ xLinkRole: 'xlinkRole',
1389
+ xLinkShow: 'xlinkShow',
1390
+ xLinkTitle: 'xlinkTitle',
1391
+ xLinkType: 'xlinkType',
1392
+ xmlnsXLink: 'xmlnsXlink'
1393
+ };
1451
1394
 
1452
- const html$1 = merge([aria, html$2, xlink, xmlns, xml], 'html');
1395
+ /**
1396
+ * @typedef {import('./lib/util/info.js').Info} Info
1397
+ * @typedef {import('./lib/util/schema.js').Schema} Schema
1398
+ */
1453
1399
 
1454
- const svg = merge([aria, svg$1, xlink, xmlns, xml], 'svg');
1400
+ const html$1 = merge([xml, xlink, xmlns, aria, html$2], 'html');
1401
+ const svg = merge([xml, xlink, xmlns, aria, svg$1], 'svg');
1455
1402
 
1456
1403
  /**
1457
1404
  * Parse space-separated tokens to an array of strings.
@@ -1474,7 +1421,7 @@ function stringify(values) {
1474
1421
  return values.join(' ').trim()
1475
1422
  }
1476
1423
 
1477
- var cjs$2 = {};
1424
+ var cjs = {};
1478
1425
 
1479
1426
  // http://www.w3.org/TR/CSS21/grammar.html
1480
1427
  // https://github.com/visionmedia/css-parse/pull/49#issuecomment-30088027
@@ -1509,7 +1456,7 @@ var TYPE_DECLARATION = 'declaration';
1509
1456
  * @throws {TypeError}
1510
1457
  * @throws {Error}
1511
1458
  */
1512
- function index$1 (style, options) {
1459
+ var inlineStyleParser = function (style, options) {
1513
1460
  if (typeof style !== 'string') {
1514
1461
  throw new TypeError('First argument must be a string');
1515
1462
  }
@@ -1722,7 +1669,7 @@ function index$1 (style, options) {
1722
1669
 
1723
1670
  whitespace();
1724
1671
  return declarations();
1725
- }
1672
+ };
1726
1673
 
1727
1674
  /**
1728
1675
  * Trim `str`.
@@ -1734,14 +1681,12 @@ function trim(str) {
1734
1681
  return str ? str.replace(TRIM_REGEX, EMPTY_STRING) : EMPTY_STRING;
1735
1682
  }
1736
1683
 
1737
- var cjs$1 = index$1;
1738
-
1739
- var __importDefault$1 = (commonjsGlobal && commonjsGlobal.__importDefault) || function (mod) {
1684
+ var __importDefault = (commonjsGlobal && commonjsGlobal.__importDefault) || function (mod) {
1740
1685
  return (mod && mod.__esModule) ? mod : { "default": mod };
1741
1686
  };
1742
- Object.defineProperty(cjs$2, "__esModule", { value: true });
1743
- cjs$2.default = StyleToObject;
1744
- const inline_style_parser_1 = __importDefault$1(cjs$1);
1687
+ Object.defineProperty(cjs, "__esModule", { value: true });
1688
+ var _default = cjs.default = StyleToObject;
1689
+ var inline_style_parser_1 = __importDefault(inlineStyleParser);
1745
1690
  /**
1746
1691
  * Parses inline style to object.
1747
1692
  *
@@ -1757,17 +1702,17 @@ const inline_style_parser_1 = __importDefault$1(cjs$1);
1757
1702
  * ```
1758
1703
  */
1759
1704
  function StyleToObject(style, iterator) {
1760
- let styleObject = null;
1705
+ var styleObject = null;
1761
1706
  if (!style || typeof style !== 'string') {
1762
1707
  return styleObject;
1763
1708
  }
1764
- const declarations = (0, inline_style_parser_1.default)(style);
1765
- const hasIterator = typeof iterator === 'function';
1766
- declarations.forEach((declaration) => {
1709
+ var declarations = (0, inline_style_parser_1.default)(style);
1710
+ var hasIterator = typeof iterator === 'function';
1711
+ declarations.forEach(function (declaration) {
1767
1712
  if (declaration.type !== 'declaration') {
1768
1713
  return;
1769
1714
  }
1770
- const { property, value } = declaration;
1715
+ var property = declaration.property, value = declaration.value;
1771
1716
  if (hasIterator) {
1772
1717
  iterator(property, value, declaration);
1773
1718
  }
@@ -1779,80 +1724,8 @@ function StyleToObject(style, iterator) {
1779
1724
  return styleObject;
1780
1725
  }
1781
1726
 
1782
- var utilities = {};
1783
-
1784
- Object.defineProperty(utilities, "__esModule", { value: true });
1785
- utilities.camelCase = void 0;
1786
- var CUSTOM_PROPERTY_REGEX = /^--[a-zA-Z0-9_-]+$/;
1787
- var HYPHEN_REGEX = /-([a-z])/g;
1788
- var NO_HYPHEN_REGEX = /^[^-]+$/;
1789
- var VENDOR_PREFIX_REGEX = /^-(webkit|moz|ms|o|khtml)-/;
1790
- var MS_VENDOR_PREFIX_REGEX = /^-(ms)-/;
1791
- /**
1792
- * Checks whether to skip camelCase.
1793
- */
1794
- var skipCamelCase = function (property) {
1795
- return !property ||
1796
- NO_HYPHEN_REGEX.test(property) ||
1797
- CUSTOM_PROPERTY_REGEX.test(property);
1798
- };
1799
- /**
1800
- * Replacer that capitalizes first character.
1801
- */
1802
- var capitalize = function (match, character) {
1803
- return character.toUpperCase();
1804
- };
1805
- /**
1806
- * Replacer that removes beginning hyphen of vendor prefix property.
1807
- */
1808
- var trimHyphen = function (match, prefix) { return "".concat(prefix, "-"); };
1809
- /**
1810
- * CamelCases a CSS property.
1811
- */
1812
- var camelCase = function (property, options) {
1813
- if (options === void 0) { options = {}; }
1814
- if (skipCamelCase(property)) {
1815
- return property;
1816
- }
1817
- property = property.toLowerCase();
1818
- if (options.reactCompat) {
1819
- // `-ms` vendor prefix should not be capitalized
1820
- property = property.replace(MS_VENDOR_PREFIX_REGEX, trimHyphen);
1821
- }
1822
- else {
1823
- // for non-React, remove first hyphen so vendor prefix is not capitalized
1824
- property = property.replace(VENDOR_PREFIX_REGEX, trimHyphen);
1825
- }
1826
- return property.replace(HYPHEN_REGEX, capitalize);
1827
- };
1828
- utilities.camelCase = camelCase;
1829
-
1830
- var __importDefault = (commonjsGlobal && commonjsGlobal.__importDefault) || function (mod) {
1831
- return (mod && mod.__esModule) ? mod : { "default": mod };
1832
- };
1833
- var style_to_object_1 = __importDefault(cjs$2);
1834
- var utilities_1 = utilities;
1835
- /**
1836
- * Parses CSS inline style to JavaScript object (camelCased).
1837
- */
1838
- function StyleToJS(style, options) {
1839
- var output = {};
1840
- if (!style || typeof style !== 'string') {
1841
- return output;
1842
- }
1843
- (0, style_to_object_1.default)(style, function (property, value) {
1844
- // skip CSS comment
1845
- if (property && value) {
1846
- output[(0, utilities_1.camelCase)(property, options)] = value;
1847
- }
1848
- });
1849
- return output;
1850
- }
1851
- StyleToJS.default = StyleToJS;
1852
- var cjs = StyleToJS;
1853
-
1854
-
1855
- var styleToJs = /*@__PURE__*/getDefaultExportFromCjs(cjs);
1727
+ // ensure compatibility with rollup umd build
1728
+ var styleToObject = _default.default || _default;
1856
1729
 
1857
1730
  /**
1858
1731
  * @typedef {import('unist').Node} Node
@@ -2340,7 +2213,7 @@ VFileMessage.prototype.source = undefined;
2340
2213
  * @import {MdxJsxFlowElementHast, MdxJsxTextElementHast} from 'mdast-util-mdx-jsx'
2341
2214
  * @import {MdxjsEsmHast} from 'mdast-util-mdxjs-esm'
2342
2215
  * @import {Position} from 'unist'
2343
- * @import {Child, Create, Field, JsxElement, State, Style} from './types.js'
2216
+ * @import {Child, Create, Field, State, Style} from './types.js'
2344
2217
  */
2345
2218
 
2346
2219
 
@@ -2351,6 +2224,7 @@ const own$4 = {}.hasOwnProperty;
2351
2224
  const emptyMap = new Map();
2352
2225
 
2353
2226
  const cap = /[A-Z]/g;
2227
+ const dashSomething = /-([a-z])/g;
2354
2228
 
2355
2229
  // `react-dom` triggers a warning for *any* white space in tables.
2356
2230
  // To follow GFM, `mdast-util-to-hast` injects line endings between elements.
@@ -2377,7 +2251,7 @@ const docs = 'https://github.com/syntax-tree/hast-util-to-jsx-runtime';
2377
2251
  * Tree to transform.
2378
2252
  * @param {Options} options
2379
2253
  * Configuration (required).
2380
- * @returns {JsxElement}
2254
+ * @returns {JSX.Element}
2381
2255
  * JSX element.
2382
2256
  */
2383
2257
 
@@ -2959,24 +2833,49 @@ function createProperty(state, prop, value) {
2959
2833
  * Throws `VFileMessage` when CSS cannot be parsed.
2960
2834
  */
2961
2835
  function parseStyle(state, value) {
2836
+ /** @type {Style} */
2837
+ const result = {};
2838
+
2962
2839
  try {
2963
- return styleToJs(value, {reactCompat: true})
2840
+ styleToObject(value, replacer);
2964
2841
  } catch (error) {
2965
- if (state.ignoreInvalidStyle) {
2966
- return {}
2842
+ if (!state.ignoreInvalidStyle) {
2843
+ const cause = /** @type {Error} */ (error);
2844
+ const message = new VFileMessage('Cannot parse `style` attribute', {
2845
+ ancestors: state.ancestors,
2846
+ cause,
2847
+ ruleId: 'style',
2848
+ source: 'hast-util-to-jsx-runtime'
2849
+ });
2850
+ message.file = state.filePath || undefined;
2851
+ message.url = docs + '#cannot-parse-style-attribute';
2852
+
2853
+ throw message
2967
2854
  }
2855
+ }
2968
2856
 
2969
- const cause = /** @type {Error} */ (error);
2970
- const message = new VFileMessage('Cannot parse `style` attribute', {
2971
- ancestors: state.ancestors,
2972
- cause,
2973
- ruleId: 'style',
2974
- source: 'hast-util-to-jsx-runtime'
2975
- });
2976
- message.file = state.filePath || undefined;
2977
- message.url = docs + '#cannot-parse-style-attribute';
2857
+ return result
2978
2858
 
2979
- throw message
2859
+ /**
2860
+ * Add a CSS property (normal, so with dashes) to `result` as a DOM CSS
2861
+ * property.
2862
+ *
2863
+ * @param {string} name
2864
+ * Key.
2865
+ * @param {string} value
2866
+ * Value
2867
+ * @returns {undefined}
2868
+ * Nothing.
2869
+ */
2870
+ function replacer(name, value) {
2871
+ let key = name;
2872
+
2873
+ if (key.slice(0, 2) !== '--') {
2874
+ if (key.slice(0, 4) === '-ms-') key = 'ms-' + key.slice(4);
2875
+ key = key.replace(dashSomething, toCamel);
2876
+ }
2877
+
2878
+ result[key] = value;
2980
2879
  }
2981
2880
  }
2982
2881
 
@@ -3030,7 +2929,8 @@ function findComponentFromName(state, name$1, allowExpression) {
3030
2929
  // Only literals can be passed in `components` currently.
3031
2930
  // No identifiers / member expressions.
3032
2931
  if (result.type === 'Literal') {
3033
- const name = /** @type {string | number} */ (result.value);
2932
+ const name = /** @type {keyof JSX.IntrinsicElements} */ (result.value);
2933
+
3034
2934
  return own$4.call(state.components, name) ? state.components[name] : name
3035
2935
  }
3036
2936
 
@@ -3097,6 +2997,20 @@ function transformStyleToCssCasing(from) {
3097
2997
  return to
3098
2998
  }
3099
2999
 
3000
+ /**
3001
+ * Make `$1` capitalized.
3002
+ *
3003
+ * @param {string} _
3004
+ * Whatever.
3005
+ * @param {string} $1
3006
+ * Single ASCII alphabetical.
3007
+ * @returns {string}
3008
+ * Capitalized `$1`.
3009
+ */
3010
+ function toCamel(_, $1) {
3011
+ return $1.toUpperCase()
3012
+ }
3013
+
3100
3014
  /**
3101
3015
  * Make `$0` dash cased.
3102
3016
  *
@@ -5383,7 +5297,6 @@ const characterEntities = {
5383
5297
  zwnj: '‌'
5384
5298
  };
5385
5299
 
5386
- // To do: next major: use `Object.hasOwn`.
5387
5300
  const own$3 = {}.hasOwnProperty;
5388
5301
 
5389
5302
  /**
@@ -14055,7 +13968,7 @@ const own$2 = {}.hasOwnProperty;
14055
13968
  * mdast tree.
14056
13969
  */
14057
13970
  function fromMarkdown(value, encoding, options) {
14058
- if (encoding && typeof encoding === 'object') {
13971
+ if (typeof encoding !== 'string') {
14059
13972
  options = encoding;
14060
13973
  encoding = undefined;
14061
13974
  }
@@ -15197,11 +15110,12 @@ function remarkParse(options) {
15197
15110
  }
15198
15111
 
15199
15112
  /**
15200
- * @import {Element} from 'hast'
15201
- * @import {Blockquote} from 'mdast'
15202
- * @import {State} from '../state.js'
15113
+ * @typedef {import('hast').Element} Element
15114
+ * @typedef {import('mdast').Blockquote} Blockquote
15115
+ * @typedef {import('../state.js').State} State
15203
15116
  */
15204
15117
 
15118
+
15205
15119
  /**
15206
15120
  * Turn an mdast `blockquote` node into hast.
15207
15121
  *
@@ -15225,11 +15139,13 @@ function blockquote(state, node) {
15225
15139
  }
15226
15140
 
15227
15141
  /**
15228
- * @import {Element, Text} from 'hast'
15229
- * @import {Break} from 'mdast'
15230
- * @import {State} from '../state.js'
15142
+ * @typedef {import('hast').Element} Element
15143
+ * @typedef {import('hast').Text} Text
15144
+ * @typedef {import('mdast').Break} Break
15145
+ * @typedef {import('../state.js').State} State
15231
15146
  */
15232
15147
 
15148
+
15233
15149
  /**
15234
15150
  * Turn an mdast `break` node into hast.
15235
15151
  *
@@ -15248,11 +15164,13 @@ function hardBreak(state, node) {
15248
15164
  }
15249
15165
 
15250
15166
  /**
15251
- * @import {Element, Properties} from 'hast'
15252
- * @import {Code} from 'mdast'
15253
- * @import {State} from '../state.js'
15167
+ * @typedef {import('hast').Element} Element
15168
+ * @typedef {import('hast').Properties} Properties
15169
+ * @typedef {import('mdast').Code} Code
15170
+ * @typedef {import('../state.js').State} State
15254
15171
  */
15255
15172
 
15173
+
15256
15174
  /**
15257
15175
  * Turn an mdast `code` node into hast.
15258
15176
  *
@@ -15267,12 +15185,9 @@ function code(state, node) {
15267
15185
  const value = node.value ? node.value + '\n' : '';
15268
15186
  /** @type {Properties} */
15269
15187
  const properties = {};
15270
- // Someone can write `js&#x20;python&#x9;ruby`.
15271
- const language = node.lang ? node.lang.split(/\s+/) : [];
15272
15188
 
15273
- // GH/CM still drop the non-first languages.
15274
- if (language.length > 0) {
15275
- properties.className = ['language-' + language[0]];
15189
+ if (node.lang) {
15190
+ properties.className = ['language-' + node.lang];
15276
15191
  }
15277
15192
 
15278
15193
  // Create `<code>`.
@@ -15298,11 +15213,12 @@ function code(state, node) {
15298
15213
  }
15299
15214
 
15300
15215
  /**
15301
- * @import {Element} from 'hast'
15302
- * @import {Delete} from 'mdast'
15303
- * @import {State} from '../state.js'
15216
+ * @typedef {import('hast').Element} Element
15217
+ * @typedef {import('mdast').Delete} Delete
15218
+ * @typedef {import('../state.js').State} State
15304
15219
  */
15305
15220
 
15221
+
15306
15222
  /**
15307
15223
  * Turn an mdast `delete` node into hast.
15308
15224
  *
@@ -15326,11 +15242,12 @@ function strikethrough(state, node) {
15326
15242
  }
15327
15243
 
15328
15244
  /**
15329
- * @import {Element} from 'hast'
15330
- * @import {Emphasis} from 'mdast'
15331
- * @import {State} from '../state.js'
15245
+ * @typedef {import('hast').Element} Element
15246
+ * @typedef {import('mdast').Emphasis} Emphasis
15247
+ * @typedef {import('../state.js').State} State
15332
15248
  */
15333
15249
 
15250
+
15334
15251
  /**
15335
15252
  * Turn an mdast `emphasis` node into hast.
15336
15253
  *
@@ -15354,9 +15271,9 @@ function emphasis(state, node) {
15354
15271
  }
15355
15272
 
15356
15273
  /**
15357
- * @import {Element} from 'hast'
15358
- * @import {FootnoteReference} from 'mdast'
15359
- * @import {State} from '../state.js'
15274
+ * @typedef {import('hast').Element} Element
15275
+ * @typedef {import('mdast').FootnoteReference} FootnoteReference
15276
+ * @typedef {import('../state.js').State} State
15360
15277
  */
15361
15278
 
15362
15279
 
@@ -15424,11 +15341,12 @@ function footnoteReference(state, node) {
15424
15341
  }
15425
15342
 
15426
15343
  /**
15427
- * @import {Element} from 'hast'
15428
- * @import {Heading} from 'mdast'
15429
- * @import {State} from '../state.js'
15344
+ * @typedef {import('hast').Element} Element
15345
+ * @typedef {import('mdast').Heading} Heading
15346
+ * @typedef {import('../state.js').State} State
15430
15347
  */
15431
15348
 
15349
+
15432
15350
  /**
15433
15351
  * Turn an mdast `heading` node into hast.
15434
15352
  *
@@ -15452,12 +15370,13 @@ function heading(state, node) {
15452
15370
  }
15453
15371
 
15454
15372
  /**
15455
- * @import {Element} from 'hast'
15456
- * @import {Html} from 'mdast'
15457
- * @import {State} from '../state.js'
15458
- * @import {Raw} from '../../index.js'
15373
+ * @typedef {import('hast').Element} Element
15374
+ * @typedef {import('mdast').Html} Html
15375
+ * @typedef {import('../state.js').State} State
15376
+ * @typedef {import('../../index.js').Raw} Raw
15459
15377
  */
15460
15378
 
15379
+
15461
15380
  /**
15462
15381
  * Turn an mdast `html` node into hast (`raw` node in dangerous mode, otherwise
15463
15382
  * nothing).
@@ -15481,11 +15400,15 @@ function html(state, node) {
15481
15400
  }
15482
15401
 
15483
15402
  /**
15484
- * @import {ElementContent} from 'hast'
15485
- * @import {Reference, Nodes} from 'mdast'
15486
- * @import {State} from './state.js'
15403
+ * @typedef {import('hast').ElementContent} ElementContent
15404
+ *
15405
+ * @typedef {import('mdast').Nodes} Nodes
15406
+ * @typedef {import('mdast').Reference} Reference
15407
+ *
15408
+ * @typedef {import('./state.js').State} State
15487
15409
  */
15488
15410
 
15411
+
15489
15412
  /**
15490
15413
  * Return the content of a reference without definition as plain text.
15491
15414
  *
@@ -15531,9 +15454,11 @@ function revert(state, node) {
15531
15454
  }
15532
15455
 
15533
15456
  /**
15534
- * @import {ElementContent, Element, Properties} from 'hast'
15535
- * @import {ImageReference} from 'mdast'
15536
- * @import {State} from '../state.js'
15457
+ * @typedef {import('hast').Element} Element
15458
+ * @typedef {import('hast').ElementContent} ElementContent
15459
+ * @typedef {import('hast').Properties} Properties
15460
+ * @typedef {import('mdast').ImageReference} ImageReference
15461
+ * @typedef {import('../state.js').State} State
15537
15462
  */
15538
15463
 
15539
15464
 
@@ -15569,9 +15494,10 @@ function imageReference(state, node) {
15569
15494
  }
15570
15495
 
15571
15496
  /**
15572
- * @import {Element, Properties} from 'hast'
15573
- * @import {Image} from 'mdast'
15574
- * @import {State} from '../state.js'
15497
+ * @typedef {import('hast').Element} Element
15498
+ * @typedef {import('hast').Properties} Properties
15499
+ * @typedef {import('mdast').Image} Image
15500
+ * @typedef {import('../state.js').State} State
15575
15501
  */
15576
15502
 
15577
15503
 
@@ -15604,11 +15530,13 @@ function image(state, node) {
15604
15530
  }
15605
15531
 
15606
15532
  /**
15607
- * @import {Element, Text} from 'hast'
15608
- * @import {InlineCode} from 'mdast'
15609
- * @import {State} from '../state.js'
15533
+ * @typedef {import('hast').Element} Element
15534
+ * @typedef {import('hast').Text} Text
15535
+ * @typedef {import('mdast').InlineCode} InlineCode
15536
+ * @typedef {import('../state.js').State} State
15610
15537
  */
15611
15538
 
15539
+
15612
15540
  /**
15613
15541
  * Turn an mdast `inlineCode` node into hast.
15614
15542
  *
@@ -15636,9 +15564,11 @@ function inlineCode(state, node) {
15636
15564
  }
15637
15565
 
15638
15566
  /**
15639
- * @import {ElementContent, Element, Properties} from 'hast'
15640
- * @import {LinkReference} from 'mdast'
15641
- * @import {State} from '../state.js'
15567
+ * @typedef {import('hast').Element} Element
15568
+ * @typedef {import('hast').ElementContent} ElementContent
15569
+ * @typedef {import('hast').Properties} Properties
15570
+ * @typedef {import('mdast').LinkReference} LinkReference
15571
+ * @typedef {import('../state.js').State} State
15642
15572
  */
15643
15573
 
15644
15574
 
@@ -15679,9 +15609,10 @@ function linkReference(state, node) {
15679
15609
  }
15680
15610
 
15681
15611
  /**
15682
- * @import {Element, Properties} from 'hast'
15683
- * @import {Link} from 'mdast'
15684
- * @import {State} from '../state.js'
15612
+ * @typedef {import('hast').Element} Element
15613
+ * @typedef {import('hast').Properties} Properties
15614
+ * @typedef {import('mdast').Link} Link
15615
+ * @typedef {import('../state.js').State} State
15685
15616
  */
15686
15617
 
15687
15618
 
@@ -15715,11 +15646,15 @@ function link(state, node) {
15715
15646
  }
15716
15647
 
15717
15648
  /**
15718
- * @import {ElementContent, Element, Properties} from 'hast'
15719
- * @import {ListItem, Parents} from 'mdast'
15720
- * @import {State} from '../state.js'
15649
+ * @typedef {import('hast').Element} Element
15650
+ * @typedef {import('hast').ElementContent} ElementContent
15651
+ * @typedef {import('hast').Properties} Properties
15652
+ * @typedef {import('mdast').ListItem} ListItem
15653
+ * @typedef {import('mdast').Parents} Parents
15654
+ * @typedef {import('../state.js').State} State
15721
15655
  */
15722
15656
 
15657
+
15723
15658
  /**
15724
15659
  * Turn an mdast `listItem` node into hast.
15725
15660
  *
@@ -15835,11 +15770,13 @@ function listItemLoose(node) {
15835
15770
  }
15836
15771
 
15837
15772
  /**
15838
- * @import {Element, Properties} from 'hast'
15839
- * @import {List} from 'mdast'
15840
- * @import {State} from '../state.js'
15773
+ * @typedef {import('hast').Element} Element
15774
+ * @typedef {import('hast').Properties} Properties
15775
+ * @typedef {import('mdast').List} List
15776
+ * @typedef {import('../state.js').State} State
15841
15777
  */
15842
15778
 
15779
+
15843
15780
  /**
15844
15781
  * Turn an mdast `list` node into hast.
15845
15782
  *
@@ -15888,11 +15825,12 @@ function list(state, node) {
15888
15825
  }
15889
15826
 
15890
15827
  /**
15891
- * @import {Element} from 'hast'
15892
- * @import {Paragraph} from 'mdast'
15893
- * @import {State} from '../state.js'
15828
+ * @typedef {import('hast').Element} Element
15829
+ * @typedef {import('mdast').Paragraph} Paragraph
15830
+ * @typedef {import('../state.js').State} State
15894
15831
  */
15895
15832
 
15833
+
15896
15834
  /**
15897
15835
  * Turn an mdast `paragraph` node into hast.
15898
15836
  *
@@ -15916,11 +15854,13 @@ function paragraph(state, node) {
15916
15854
  }
15917
15855
 
15918
15856
  /**
15919
- * @import {Parents as HastParents, Root as HastRoot} from 'hast'
15920
- * @import {Root as MdastRoot} from 'mdast'
15921
- * @import {State} from '../state.js'
15857
+ * @typedef {import('hast').Parents} HastParents
15858
+ * @typedef {import('hast').Root} HastRoot
15859
+ * @typedef {import('mdast').Root} MdastRoot
15860
+ * @typedef {import('../state.js').State} State
15922
15861
  */
15923
15862
 
15863
+
15924
15864
  /**
15925
15865
  * Turn an mdast `root` node into hast.
15926
15866
  *
@@ -15939,11 +15879,12 @@ function root(state, node) {
15939
15879
  }
15940
15880
 
15941
15881
  /**
15942
- * @import {Element} from 'hast'
15943
- * @import {Strong} from 'mdast'
15944
- * @import {State} from '../state.js'
15882
+ * @typedef {import('hast').Element} Element
15883
+ * @typedef {import('mdast').Strong} Strong
15884
+ * @typedef {import('../state.js').State} State
15945
15885
  */
15946
15886
 
15887
+
15947
15888
  /**
15948
15889
  * Turn an mdast `strong` node into hast.
15949
15890
  *
@@ -15967,9 +15908,9 @@ function strong(state, node) {
15967
15908
  }
15968
15909
 
15969
15910
  /**
15970
- * @import {Table} from 'mdast'
15971
- * @import {Element} from 'hast'
15972
- * @import {State} from '../state.js'
15911
+ * @typedef {import('hast').Element} Element
15912
+ * @typedef {import('mdast').Table} Table
15913
+ * @typedef {import('../state.js').State} State
15973
15914
  */
15974
15915
 
15975
15916
 
@@ -16028,11 +15969,15 @@ function table(state, node) {
16028
15969
  }
16029
15970
 
16030
15971
  /**
16031
- * @import {Element, ElementContent, Properties} from 'hast'
16032
- * @import {Parents, TableRow} from 'mdast'
16033
- * @import {State} from '../state.js'
15972
+ * @typedef {import('hast').Element} Element
15973
+ * @typedef {import('hast').ElementContent} ElementContent
15974
+ * @typedef {import('hast').Properties} Properties
15975
+ * @typedef {import('mdast').Parents} Parents
15976
+ * @typedef {import('mdast').TableRow} TableRow
15977
+ * @typedef {import('../state.js').State} State
16034
15978
  */
16035
15979
 
15980
+
16036
15981
  /**
16037
15982
  * Turn an mdast `tableRow` node into hast.
16038
15983
  *
@@ -16092,11 +16037,12 @@ function tableRow(state, node, parent) {
16092
16037
  }
16093
16038
 
16094
16039
  /**
16095
- * @import {Element} from 'hast'
16096
- * @import {TableCell} from 'mdast'
16097
- * @import {State} from '../state.js'
16040
+ * @typedef {import('hast').Element} Element
16041
+ * @typedef {import('mdast').TableCell} TableCell
16042
+ * @typedef {import('../state.js').State} State
16098
16043
  */
16099
16044
 
16045
+
16100
16046
  /**
16101
16047
  * Turn an mdast `tableCell` node into hast.
16102
16048
  *
@@ -16192,9 +16138,10 @@ function trimLine(value, start, end) {
16192
16138
  }
16193
16139
 
16194
16140
  /**
16195
- * @import {Element as HastElement, Text as HastText} from 'hast'
16196
- * @import {Text as MdastText} from 'mdast'
16197
- * @import {State} from '../state.js'
16141
+ * @typedef {import('hast').Element} HastElement
16142
+ * @typedef {import('hast').Text} HastText
16143
+ * @typedef {import('mdast').Text} MdastText
16144
+ * @typedef {import('../state.js').State} State
16198
16145
  */
16199
16146
 
16200
16147
 
@@ -16216,11 +16163,12 @@ function text(state, node) {
16216
16163
  }
16217
16164
 
16218
16165
  /**
16219
- * @import {Element} from 'hast'
16220
- * @import {ThematicBreak} from 'mdast'
16221
- * @import {State} from '../state.js'
16166
+ * @typedef {import('hast').Element} Element
16167
+ * @typedef {import('mdast').ThematicBreak} ThematicBreak
16168
+ * @typedef {import('../state.js').State} State
16222
16169
  */
16223
16170
 
16171
+
16224
16172
  /**
16225
16173
  * Turn an mdast `thematicBreak` node into hast.
16226
16174
  *
@@ -16243,15 +16191,10 @@ function thematicBreak(state, node) {
16243
16191
  return state.applyData(node, result)
16244
16192
  }
16245
16193
 
16246
- /**
16247
- * @import {Handlers} from '../state.js'
16248
- */
16249
-
16250
-
16251
16194
  /**
16252
16195
  * Default handlers for nodes.
16253
16196
  *
16254
- * @satisfies {Handlers}
16197
+ * @satisfies {import('../state.js').Handlers}
16255
16198
  */
16256
16199
  const handlers = {
16257
16200
  blockquote,
@@ -16356,12 +16299,6 @@ const deserializer = ($, _) => {
16356
16299
  return as(BigInt(value), index);
16357
16300
  case 'BigInt':
16358
16301
  return as(Object(BigInt(value)), index);
16359
- case 'ArrayBuffer':
16360
- return as(new Uint8Array(value).buffer, value);
16361
- case 'DataView': {
16362
- const { buffer } = new Uint8Array(value);
16363
- return as(new DataView(buffer), value);
16364
- }
16365
16302
  }
16366
16303
  return as(new env[type](value), index);
16367
16304
  };
@@ -16404,8 +16341,6 @@ const typeOf = value => {
16404
16341
  return [MAP, EMPTY];
16405
16342
  case 'Set':
16406
16343
  return [SET, EMPTY];
16407
- case 'DataView':
16408
- return [ARRAY, asString];
16409
16344
  }
16410
16345
 
16411
16346
  if (asString.includes('Array'))
@@ -16455,17 +16390,9 @@ const serializer = (strict, json, $, _) => {
16455
16390
  return as([TYPE, entry], value);
16456
16391
  }
16457
16392
  case ARRAY: {
16458
- if (type) {
16459
- let spread = value;
16460
- if (type === 'DataView') {
16461
- spread = new Uint8Array(value.buffer);
16462
- }
16463
- else if (type === 'ArrayBuffer') {
16464
- spread = new Uint8Array(value);
16465
- }
16466
- return as([type, [...spread]], value);
16467
- }
16468
-
16393
+ if (type)
16394
+ return as([type, [...value]], value);
16395
+
16469
16396
  const arr = [];
16470
16397
  const index = as([TYPE, arr], value);
16471
16398
  for (const entry of value)
@@ -16566,8 +16493,10 @@ var structuredClone$1 = typeof structuredClone === "function" ?
16566
16493
  (any, options) => deserialize(serialize(any, options));
16567
16494
 
16568
16495
  /**
16569
- * @import {ElementContent, Element} from 'hast'
16570
- * @import {State} from './state.js'
16496
+ * @typedef {import('hast').Element} Element
16497
+ * @typedef {import('hast').ElementContent} ElementContent
16498
+ *
16499
+ * @typedef {import('./state.js').State} State
16571
16500
  */
16572
16501
 
16573
16502
 
@@ -17215,25 +17144,22 @@ function visit(tree, testOrVisitor, visitorOrReverse, maybeReverse) {
17215
17144
  }
17216
17145
 
17217
17146
  /**
17218
- * @import {
17219
- * ElementContent as HastElementContent,
17220
- * Element as HastElement,
17221
- * Nodes as HastNodes,
17222
- * Properties as HastProperties,
17223
- * RootContent as HastRootContent,
17224
- * Text as HastText
17225
- * } from 'hast'
17226
- * @import {
17227
- * Definition as MdastDefinition,
17228
- * FootnoteDefinition as MdastFootnoteDefinition,
17229
- * Nodes as MdastNodes,
17230
- * Parents as MdastParents
17231
- * } from 'mdast'
17232
- * @import {VFile} from 'vfile'
17233
- * @import {
17234
- * FootnoteBackContentTemplate,
17235
- * FootnoteBackLabelTemplate
17236
- * } from './footer.js'
17147
+ * @typedef {import('hast').Element} HastElement
17148
+ * @typedef {import('hast').ElementContent} HastElementContent
17149
+ * @typedef {import('hast').Nodes} HastNodes
17150
+ * @typedef {import('hast').Properties} HastProperties
17151
+ * @typedef {import('hast').RootContent} HastRootContent
17152
+ * @typedef {import('hast').Text} HastText
17153
+ *
17154
+ * @typedef {import('mdast').Definition} MdastDefinition
17155
+ * @typedef {import('mdast').FootnoteDefinition} MdastFootnoteDefinition
17156
+ * @typedef {import('mdast').Nodes} MdastNodes
17157
+ * @typedef {import('mdast').Parents} MdastParents
17158
+ *
17159
+ * @typedef {import('vfile').VFile} VFile
17160
+ *
17161
+ * @typedef {import('./footer.js').FootnoteBackContentTemplate} FootnoteBackContentTemplate
17162
+ * @typedef {import('./footer.js').FootnoteBackLabelTemplate} FootnoteBackLabelTemplate
17237
17163
  */
17238
17164
 
17239
17165
 
@@ -17533,9 +17459,9 @@ function trimMarkdownSpaceStart(value) {
17533
17459
  }
17534
17460
 
17535
17461
  /**
17536
- * @import {Nodes as HastNodes} from 'hast'
17537
- * @import {Nodes as MdastNodes} from 'mdast'
17538
- * @import {Options} from './state.js'
17462
+ * @typedef {import('hast').Nodes} HastNodes
17463
+ * @typedef {import('mdast').Nodes} MdastNodes
17464
+ * @typedef {import('./state.js').Options} Options
17539
17465
  */
17540
17466
 
17541
17467
 
@@ -17855,7 +17781,7 @@ var getProperty = function getProperty(obj, name) {
17855
17781
  return obj[name];
17856
17782
  };
17857
17783
 
17858
- var extend$1 = function extend() {
17784
+ var extend = function extend() {
17859
17785
  var options, name, src, copy, copyIsArray, clone;
17860
17786
  var target = arguments[0];
17861
17787
  var i = 1;
@@ -17909,7 +17835,7 @@ var extend$1 = function extend() {
17909
17835
  return target;
17910
17836
  };
17911
17837
 
17912
- var extend = /*@__PURE__*/getDefaultExportFromCjs(extend$1);
17838
+ var extend$1 = /*@__PURE__*/getDefaultExportFromCjs(extend);
17913
17839
 
17914
17840
  function isPlainObject(value) {
17915
17841
  if (typeof value !== 'object' || value === null) {
@@ -19514,7 +19440,7 @@ class Processor extends CallableInstance {
19514
19440
  destination.use(...attacher);
19515
19441
  }
19516
19442
 
19517
- destination.data(extend(true, {}, this.namespace));
19443
+ destination.data(extend$1(true, {}, this.namespace));
19518
19444
 
19519
19445
  return destination
19520
19446
  }
@@ -20112,7 +20038,7 @@ class Processor extends CallableInstance {
20112
20038
  addList(result.plugins);
20113
20039
 
20114
20040
  if (result.settings) {
20115
- namespace.settings = extend(true, namespace.settings, result.settings);
20041
+ namespace.settings = extend$1(true, namespace.settings, result.settings);
20116
20042
  }
20117
20043
  }
20118
20044
 
@@ -20158,7 +20084,7 @@ class Processor extends CallableInstance {
20158
20084
  let [primary, ...rest] = parameters;
20159
20085
  const currentPrimary = attachers[entryIndex][1];
20160
20086
  if (isPlainObject(currentPrimary) && isPlainObject(primary)) {
20161
- primary = extend(true, currentPrimary, primary);
20087
+ primary = extend$1(true, currentPrimary, primary);
20162
20088
  }
20163
20089
 
20164
20090
  attachers[entryIndex] = [plugin, primary, ...rest];