@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
@@ -112,107 +112,93 @@ function empty$1(value) {
112
112
  }
113
113
 
114
114
  /**
115
- * @import {Schema as SchemaType, Space} from 'property-information'
115
+ * @typedef {import('./info.js').Info} Info
116
+ * @typedef {Record<string, Info>} Properties
117
+ * @typedef {Record<string, string>} Normal
116
118
  */
117
119
 
118
- /** @type {SchemaType} */
119
120
  class Schema {
120
121
  /**
121
- * @param {SchemaType['property']} property
122
- * Property.
123
- * @param {SchemaType['normal']} normal
124
- * Normal.
125
- * @param {Space | undefined} [space]
126
- * Space.
127
- * @returns
128
- * Schema.
122
+ * @constructor
123
+ * @param {Properties} property
124
+ * @param {Normal} normal
125
+ * @param {string} [space]
129
126
  */
130
127
  constructor(property, normal, space) {
131
- this.normal = normal;
132
128
  this.property = property;
133
-
129
+ this.normal = normal;
134
130
  if (space) {
135
131
  this.space = space;
136
132
  }
137
133
  }
138
134
  }
139
135
 
140
- Schema.prototype.normal = {};
136
+ /** @type {Properties} */
141
137
  Schema.prototype.property = {};
142
- Schema.prototype.space = undefined;
138
+ /** @type {Normal} */
139
+ Schema.prototype.normal = {};
140
+ /** @type {string|null} */
141
+ Schema.prototype.space = null;
143
142
 
144
143
  /**
145
- * @import {Info, Space} from 'property-information'
144
+ * @typedef {import('./schema.js').Properties} Properties
145
+ * @typedef {import('./schema.js').Normal} Normal
146
146
  */
147
147
 
148
148
 
149
149
  /**
150
- * @param {ReadonlyArray<Schema>} definitions
151
- * Definitions.
152
- * @param {Space | undefined} [space]
153
- * Space.
150
+ * @param {Schema[]} definitions
151
+ * @param {string} [space]
154
152
  * @returns {Schema}
155
- * Schema.
156
153
  */
157
154
  function merge(definitions, space) {
158
- /** @type {Record<string, Info>} */
155
+ /** @type {Properties} */
159
156
  const property = {};
160
- /** @type {Record<string, string>} */
157
+ /** @type {Normal} */
161
158
  const normal = {};
159
+ let index = -1;
162
160
 
163
- for (const definition of definitions) {
164
- Object.assign(property, definition.property);
165
- Object.assign(normal, definition.normal);
161
+ while (++index < definitions.length) {
162
+ Object.assign(property, definitions[index].property);
163
+ Object.assign(normal, definitions[index].normal);
166
164
  }
167
165
 
168
166
  return new Schema(property, normal, space)
169
167
  }
170
168
 
171
169
  /**
172
- * Get the cleaned case insensitive form of an attribute or property.
173
- *
174
170
  * @param {string} value
175
- * An attribute-like or property-like name.
176
171
  * @returns {string}
177
- * Value that can be used to look up the properly cased property on a
178
- * `Schema`.
179
172
  */
180
173
  function normalize$1(value) {
181
174
  return value.toLowerCase()
182
175
  }
183
176
 
184
- /**
185
- * @import {Info as InfoType} from 'property-information'
186
- */
187
-
188
- /** @type {InfoType} */
189
177
  class Info {
190
178
  /**
179
+ * @constructor
191
180
  * @param {string} property
192
- * Property.
193
181
  * @param {string} attribute
194
- * Attribute.
195
- * @returns
196
- * Info.
197
182
  */
198
183
  constructor(property, attribute) {
199
- this.attribute = attribute;
184
+ /** @type {string} */
200
185
  this.property = property;
186
+ /** @type {string} */
187
+ this.attribute = attribute;
201
188
  }
202
189
  }
203
190
 
204
- Info.prototype.attribute = '';
205
- Info.prototype.booleanish = false;
191
+ /** @type {string|null} */
192
+ Info.prototype.space = null;
206
193
  Info.prototype.boolean = false;
207
- Info.prototype.commaOrSpaceSeparated = false;
208
- Info.prototype.commaSeparated = false;
209
- Info.prototype.defined = false;
210
- Info.prototype.mustUseProperty = false;
211
- Info.prototype.number = false;
194
+ Info.prototype.booleanish = false;
212
195
  Info.prototype.overloadedBoolean = false;
213
- Info.prototype.property = '';
196
+ Info.prototype.number = false;
197
+ Info.prototype.commaSeparated = false;
214
198
  Info.prototype.spaceSeparated = false;
215
- Info.prototype.space = undefined;
199
+ Info.prototype.commaOrSpaceSeparated = false;
200
+ Info.prototype.mustUseProperty = false;
201
+ Info.prototype.defined = false;
216
202
 
217
203
  let powers = 0;
218
204
 
@@ -239,28 +225,17 @@ var types = /*#__PURE__*/Object.freeze({
239
225
  spaceSeparated: spaceSeparated
240
226
  });
241
227
 
242
- /**
243
- * @import {Space} from 'property-information'
244
- */
245
-
246
-
247
- const checks = /** @type {ReadonlyArray<keyof typeof types>} */ (
248
- Object.keys(types)
249
- );
228
+ /** @type {Array<keyof types>} */
229
+ // @ts-expect-error: hush.
230
+ const checks = Object.keys(types);
250
231
 
251
232
  class DefinedInfo extends Info {
252
233
  /**
253
234
  * @constructor
254
235
  * @param {string} property
255
- * Property.
256
236
  * @param {string} attribute
257
- * Attribute.
258
- * @param {number | null | undefined} [mask]
259
- * Mask.
260
- * @param {Space | undefined} [space]
261
- * Space.
262
- * @returns
263
- * Info.
237
+ * @param {number|null} [mask]
238
+ * @param {string} [space]
264
239
  */
265
240
  constructor(property, attribute, mask, space) {
266
241
  let index = -1;
@@ -281,65 +256,126 @@ class DefinedInfo extends Info {
281
256
  DefinedInfo.prototype.defined = true;
282
257
 
283
258
  /**
284
- * @template {keyof DefinedInfo} Key
285
- * Key type.
286
259
  * @param {DefinedInfo} values
287
- * Info.
288
- * @param {Key} key
289
- * Key.
290
- * @param {DefinedInfo[Key]} value
291
- * Value.
292
- * @returns {undefined}
293
- * Nothing.
260
+ * @param {string} key
261
+ * @param {unknown} value
294
262
  */
295
263
  function mark(values, key, value) {
296
264
  if (value) {
265
+ // @ts-expect-error: assume `value` matches the expected value of `key`.
297
266
  values[key] = value;
298
267
  }
299
268
  }
300
269
 
301
270
  /**
302
- * @import {Info, Space} from 'property-information'
271
+ * @typedef {import('./schema.js').Properties} Properties
272
+ * @typedef {import('./schema.js').Normal} Normal
273
+ *
274
+ * @typedef {Record<string, string>} Attributes
275
+ *
276
+ * @typedef {Object} Definition
277
+ * @property {Record<string, number|null>} properties
278
+ * @property {(attributes: Attributes, property: string) => string} transform
279
+ * @property {string} [space]
280
+ * @property {Attributes} [attributes]
281
+ * @property {Array<string>} [mustUseProperty]
303
282
  */
304
283
 
305
284
 
285
+ const own$5 = {}.hasOwnProperty;
286
+
306
287
  /**
307
288
  * @param {Definition} definition
308
- * Definition.
309
289
  * @returns {Schema}
310
- * Schema.
311
290
  */
312
291
  function create(definition) {
313
- /** @type {Record<string, Info>} */
314
- const properties = {};
315
- /** @type {Record<string, string>} */
316
- const normals = {};
317
-
318
- for (const [property, value] of Object.entries(definition.properties)) {
319
- const info = new DefinedInfo(
320
- property,
321
- definition.transform(definition.attributes || {}, property),
322
- value,
323
- definition.space
324
- );
292
+ /** @type {Properties} */
293
+ const property = {};
294
+ /** @type {Normal} */
295
+ const normal = {};
296
+ /** @type {string} */
297
+ let prop;
325
298
 
326
- if (
327
- definition.mustUseProperty &&
328
- definition.mustUseProperty.includes(property)
329
- ) {
330
- info.mustUseProperty = true;
299
+ for (prop in definition.properties) {
300
+ if (own$5.call(definition.properties, prop)) {
301
+ const value = definition.properties[prop];
302
+ const info = new DefinedInfo(
303
+ prop,
304
+ definition.transform(definition.attributes || {}, prop),
305
+ value,
306
+ definition.space
307
+ );
308
+
309
+ if (
310
+ definition.mustUseProperty &&
311
+ definition.mustUseProperty.includes(prop)
312
+ ) {
313
+ info.mustUseProperty = true;
314
+ }
315
+
316
+ property[prop] = info;
317
+
318
+ normal[normalize$1(prop)] = prop;
319
+ normal[normalize$1(info.attribute)] = prop;
331
320
  }
321
+ }
332
322
 
333
- properties[property] = info;
323
+ return new Schema(property, normal, definition.space)
324
+ }
334
325
 
335
- normals[normalize$1(property)] = property;
336
- normals[normalize$1(info.attribute)] = property;
326
+ const xlink = create({
327
+ space: 'xlink',
328
+ transform(_, prop) {
329
+ return 'xlink:' + prop.slice(5).toLowerCase()
330
+ },
331
+ properties: {
332
+ xLinkActuate: null,
333
+ xLinkArcRole: null,
334
+ xLinkHref: null,
335
+ xLinkRole: null,
336
+ xLinkShow: null,
337
+ xLinkTitle: null,
338
+ xLinkType: null
337
339
  }
340
+ });
341
+
342
+ const xml = create({
343
+ space: 'xml',
344
+ transform(_, prop) {
345
+ return 'xml:' + prop.slice(3).toLowerCase()
346
+ },
347
+ properties: {xmlLang: null, xmlBase: null, xmlSpace: null}
348
+ });
349
+
350
+ /**
351
+ * @param {Record<string, string>} attributes
352
+ * @param {string} attribute
353
+ * @returns {string}
354
+ */
355
+ function caseSensitiveTransform(attributes, attribute) {
356
+ return attribute in attributes ? attributes[attribute] : attribute
357
+ }
338
358
 
339
- return new Schema(properties, normals, definition.space)
359
+ /**
360
+ * @param {Record<string, string>} attributes
361
+ * @param {string} property
362
+ * @returns {string}
363
+ */
364
+ function caseInsensitiveTransform(attributes, property) {
365
+ return caseSensitiveTransform(attributes, property.toLowerCase())
340
366
  }
341
367
 
368
+ const xmlns = create({
369
+ space: 'xmlns',
370
+ attributes: {xmlnsxlink: 'xmlns:xlink'},
371
+ transform: caseInsensitiveTransform,
372
+ properties: {xmlns: null, xmlnsXLink: null}
373
+ });
374
+
342
375
  const aria = create({
376
+ transform(_, prop) {
377
+ return prop === 'role' ? prop : 'aria-' + prop.slice(4).toLowerCase()
378
+ },
343
379
  properties: {
344
380
  ariaActiveDescendant: null,
345
381
  ariaAtomic: booleanish,
@@ -390,45 +426,18 @@ const aria = create({
390
426
  ariaValueNow: number,
391
427
  ariaValueText: null,
392
428
  role: null
393
- },
394
- transform(_, property) {
395
- return property === 'role'
396
- ? property
397
- : 'aria-' + property.slice(4).toLowerCase()
398
429
  }
399
430
  });
400
431
 
401
- /**
402
- * @param {Record<string, string>} attributes
403
- * Attributes.
404
- * @param {string} attribute
405
- * Attribute.
406
- * @returns {string}
407
- * Transformed attribute.
408
- */
409
- function caseSensitiveTransform(attributes, attribute) {
410
- return attribute in attributes ? attributes[attribute] : attribute
411
- }
412
-
413
- /**
414
- * @param {Record<string, string>} attributes
415
- * Attributes.
416
- * @param {string} property
417
- * Property.
418
- * @returns {string}
419
- * Transformed property.
420
- */
421
- function caseInsensitiveTransform(attributes, property) {
422
- return caseSensitiveTransform(attributes, property.toLowerCase())
423
- }
424
-
425
432
  const html$2 = create({
433
+ space: 'html',
426
434
  attributes: {
427
435
  acceptcharset: 'accept-charset',
428
436
  classname: 'class',
429
437
  htmlfor: 'for',
430
438
  httpequiv: 'http-equiv'
431
439
  },
440
+ transform: caseInsensitiveTransform,
432
441
  mustUseProperty: ['checked', 'multiple', 'muted', 'selected'],
433
442
  properties: {
434
443
  // Standard Properties.
@@ -483,7 +492,7 @@ const html$2 = create({
483
492
  formTarget: null,
484
493
  headers: spaceSeparated,
485
494
  height: number,
486
- hidden: overloadedBoolean,
495
+ hidden: boolean,
487
496
  high: number,
488
497
  href: null,
489
498
  hrefLang: null,
@@ -729,12 +738,11 @@ const html$2 = create({
729
738
  results: number,
730
739
  security: null,
731
740
  unselectable: null
732
- },
733
- space: 'html',
734
- transform: caseInsensitiveTransform
741
+ }
735
742
  });
736
743
 
737
744
  const svg$1 = create({
745
+ space: 'svg',
738
746
  attributes: {
739
747
  accentHeight: 'accent-height',
740
748
  alignmentBaseline: 'alignment-baseline',
@@ -910,6 +918,7 @@ const svg$1 = create({
910
918
  playbackOrder: 'playbackorder',
911
919
  timelineBegin: 'timelinebegin'
912
920
  },
921
+ transform: caseSensitiveTransform,
913
922
  properties: {
914
923
  about: commaOrSpaceSeparated,
915
924
  accentHeight: number,
@@ -1287,115 +1296,26 @@ const svg$1 = create({
1287
1296
  yChannelSelector: null,
1288
1297
  z: null,
1289
1298
  zoomAndPan: null
1290
- },
1291
- space: 'svg',
1292
- transform: caseSensitiveTransform
1293
- });
1294
-
1295
- const xlink = create({
1296
- properties: {
1297
- xLinkActuate: null,
1298
- xLinkArcRole: null,
1299
- xLinkHref: null,
1300
- xLinkRole: null,
1301
- xLinkShow: null,
1302
- xLinkTitle: null,
1303
- xLinkType: null
1304
- },
1305
- space: 'xlink',
1306
- transform(_, property) {
1307
- return 'xlink:' + property.slice(5).toLowerCase()
1308
1299
  }
1309
1300
  });
1310
1301
 
1311
- const xmlns = create({
1312
- attributes: {xmlnsxlink: 'xmlns:xlink'},
1313
- properties: {xmlnsXLink: null, xmlns: null},
1314
- space: 'xmlns',
1315
- transform: caseInsensitiveTransform
1316
- });
1317
-
1318
- const xml = create({
1319
- properties: {xmlBase: null, xmlLang: null, xmlSpace: null},
1320
- space: 'xml',
1321
- transform(_, property) {
1322
- return 'xml:' + property.slice(3).toLowerCase()
1323
- }
1324
- });
1325
-
1326
- /**
1327
- * Special cases for React (`Record<string, string>`).
1328
- *
1329
- * `hast` is close to `React` but differs in a couple of cases.
1330
- * To get a React property from a hast property,
1331
- * check if it is in `hastToReact`.
1332
- * If it is, use the corresponding value;
1333
- * otherwise, use the hast property.
1334
- *
1335
- * @type {Record<string, string>}
1336
- */
1337
- const hastToReact = {
1338
- classId: 'classID',
1339
- dataType: 'datatype',
1340
- itemId: 'itemID',
1341
- strokeDashArray: 'strokeDasharray',
1342
- strokeDashOffset: 'strokeDashoffset',
1343
- strokeLineCap: 'strokeLinecap',
1344
- strokeLineJoin: 'strokeLinejoin',
1345
- strokeMiterLimit: 'strokeMiterlimit',
1346
- typeOf: 'typeof',
1347
- xLinkActuate: 'xlinkActuate',
1348
- xLinkArcRole: 'xlinkArcrole',
1349
- xLinkHref: 'xlinkHref',
1350
- xLinkRole: 'xlinkRole',
1351
- xLinkShow: 'xlinkShow',
1352
- xLinkTitle: 'xlinkTitle',
1353
- xLinkType: 'xlinkType',
1354
- xmlnsXLink: 'xmlnsXlink'
1355
- };
1356
-
1357
1302
  /**
1358
- * @import {Schema} from 'property-information'
1303
+ * @typedef {import('./util/schema.js').Schema} Schema
1359
1304
  */
1360
1305
 
1361
1306
 
1362
- const cap$1 = /[A-Z]/g;
1363
- const dash = /-[a-z]/g;
1364
1307
  const valid = /^data[-\w.:]+$/i;
1308
+ const dash = /-[a-z]/g;
1309
+ const cap$1 = /[A-Z]/g;
1365
1310
 
1366
1311
  /**
1367
- * Look up info on a property.
1368
- *
1369
- * In most cases the given `schema` contains info on the property.
1370
- * All standard,
1371
- * most legacy,
1372
- * and some non-standard properties are supported.
1373
- * For these cases,
1374
- * the returned `Info` has hints about the value of the property.
1375
- *
1376
- * `name` can also be a valid data attribute or property,
1377
- * in which case an `Info` object with the correctly cased `attribute` and
1378
- * `property` is returned.
1379
- *
1380
- * `name` can be an unknown attribute,
1381
- * in which case an `Info` object with `attribute` and `property` set to the
1382
- * given name is returned.
1383
- * It is not recommended to provide unsupported legacy or recently specced
1384
- * properties.
1385
- *
1386
- *
1387
1312
  * @param {Schema} schema
1388
- * Schema;
1389
- * either the `html` or `svg` export.
1390
1313
  * @param {string} value
1391
- * An attribute-like or property-like name;
1392
- * it will be passed through `normalize` to hopefully find the correct info.
1393
1314
  * @returns {Info}
1394
- * Info.
1395
1315
  */
1396
1316
  function find(schema, value) {
1397
1317
  const normal = normalize$1(value);
1398
- let property = value;
1318
+ let prop = value;
1399
1319
  let Type = Info;
1400
1320
 
1401
1321
  if (normal in schema.normal) {
@@ -1407,7 +1327,7 @@ function find(schema, value) {
1407
1327
  if (value.charAt(4) === '-') {
1408
1328
  // Turn it into a property.
1409
1329
  const rest = value.slice(5).replace(dash, camelcase);
1410
- property = 'data' + rest.charAt(0).toUpperCase() + rest.slice(1);
1330
+ prop = 'data' + rest.charAt(0).toUpperCase() + rest.slice(1);
1411
1331
  } else {
1412
1332
  // Turn it into an attribute.
1413
1333
  const rest = value.slice(4);
@@ -1426,14 +1346,12 @@ function find(schema, value) {
1426
1346
  Type = DefinedInfo;
1427
1347
  }
1428
1348
 
1429
- return new Type(property, value)
1349
+ return new Type(prop, value)
1430
1350
  }
1431
1351
 
1432
1352
  /**
1433
1353
  * @param {string} $0
1434
- * Value.
1435
1354
  * @returns {string}
1436
- * Kebab.
1437
1355
  */
1438
1356
  function kebab($0) {
1439
1357
  return '-' + $0.toLowerCase()
@@ -1441,19 +1359,48 @@ function kebab($0) {
1441
1359
 
1442
1360
  /**
1443
1361
  * @param {string} $0
1444
- * Value.
1445
1362
  * @returns {string}
1446
- * Camel.
1447
1363
  */
1448
1364
  function camelcase($0) {
1449
1365
  return $0.charAt(1).toUpperCase()
1450
1366
  }
1451
1367
 
1452
- // Note: types exposed from `index.d.ts`.
1368
+ /**
1369
+ * `hast` is close to `React`, but differs in a couple of cases.
1370
+ *
1371
+ * To get a React property from a hast property, check if it is in
1372
+ * `hastToReact`, if it is, then use the corresponding value,
1373
+ * otherwise, use the hast property.
1374
+ *
1375
+ * @type {Record<string, string>}
1376
+ */
1377
+ const hastToReact = {
1378
+ classId: 'classID',
1379
+ dataType: 'datatype',
1380
+ itemId: 'itemID',
1381
+ strokeDashArray: 'strokeDasharray',
1382
+ strokeDashOffset: 'strokeDashoffset',
1383
+ strokeLineCap: 'strokeLinecap',
1384
+ strokeLineJoin: 'strokeLinejoin',
1385
+ strokeMiterLimit: 'strokeMiterlimit',
1386
+ typeOf: 'typeof',
1387
+ xLinkActuate: 'xlinkActuate',
1388
+ xLinkArcRole: 'xlinkArcrole',
1389
+ xLinkHref: 'xlinkHref',
1390
+ xLinkRole: 'xlinkRole',
1391
+ xLinkShow: 'xlinkShow',
1392
+ xLinkTitle: 'xlinkTitle',
1393
+ xLinkType: 'xlinkType',
1394
+ xmlnsXLink: 'xmlnsXlink'
1395
+ };
1453
1396
 
1454
- const html$1 = merge([aria, html$2, xlink, xmlns, xml], 'html');
1397
+ /**
1398
+ * @typedef {import('./lib/util/info.js').Info} Info
1399
+ * @typedef {import('./lib/util/schema.js').Schema} Schema
1400
+ */
1455
1401
 
1456
- const svg = merge([aria, svg$1, xlink, xmlns, xml], 'svg');
1402
+ const html$1 = merge([xml, xlink, xmlns, aria, html$2], 'html');
1403
+ const svg = merge([xml, xlink, xmlns, aria, svg$1], 'svg');
1457
1404
 
1458
1405
  /**
1459
1406
  * Parse space-separated tokens to an array of strings.
@@ -1476,7 +1423,7 @@ function stringify(values) {
1476
1423
  return values.join(' ').trim()
1477
1424
  }
1478
1425
 
1479
- var cjs$2 = {};
1426
+ var cjs = {};
1480
1427
 
1481
1428
  // http://www.w3.org/TR/CSS21/grammar.html
1482
1429
  // https://github.com/visionmedia/css-parse/pull/49#issuecomment-30088027
@@ -1511,7 +1458,7 @@ var TYPE_DECLARATION = 'declaration';
1511
1458
  * @throws {TypeError}
1512
1459
  * @throws {Error}
1513
1460
  */
1514
- function index$1 (style, options) {
1461
+ var inlineStyleParser = function (style, options) {
1515
1462
  if (typeof style !== 'string') {
1516
1463
  throw new TypeError('First argument must be a string');
1517
1464
  }
@@ -1724,7 +1671,7 @@ function index$1 (style, options) {
1724
1671
 
1725
1672
  whitespace();
1726
1673
  return declarations();
1727
- }
1674
+ };
1728
1675
 
1729
1676
  /**
1730
1677
  * Trim `str`.
@@ -1736,14 +1683,12 @@ function trim(str) {
1736
1683
  return str ? str.replace(TRIM_REGEX, EMPTY_STRING) : EMPTY_STRING;
1737
1684
  }
1738
1685
 
1739
- var cjs$1 = index$1;
1740
-
1741
- var __importDefault$1 = (_commonjsHelpers.commonjsGlobal && _commonjsHelpers.commonjsGlobal.__importDefault) || function (mod) {
1686
+ var __importDefault = (_commonjsHelpers.commonjsGlobal && _commonjsHelpers.commonjsGlobal.__importDefault) || function (mod) {
1742
1687
  return (mod && mod.__esModule) ? mod : { "default": mod };
1743
1688
  };
1744
- Object.defineProperty(cjs$2, "__esModule", { value: true });
1745
- cjs$2.default = StyleToObject;
1746
- const inline_style_parser_1 = __importDefault$1(cjs$1);
1689
+ Object.defineProperty(cjs, "__esModule", { value: true });
1690
+ var _default = cjs.default = StyleToObject;
1691
+ var inline_style_parser_1 = __importDefault(inlineStyleParser);
1747
1692
  /**
1748
1693
  * Parses inline style to object.
1749
1694
  *
@@ -1759,17 +1704,17 @@ const inline_style_parser_1 = __importDefault$1(cjs$1);
1759
1704
  * ```
1760
1705
  */
1761
1706
  function StyleToObject(style, iterator) {
1762
- let styleObject = null;
1707
+ var styleObject = null;
1763
1708
  if (!style || typeof style !== 'string') {
1764
1709
  return styleObject;
1765
1710
  }
1766
- const declarations = (0, inline_style_parser_1.default)(style);
1767
- const hasIterator = typeof iterator === 'function';
1768
- declarations.forEach((declaration) => {
1711
+ var declarations = (0, inline_style_parser_1.default)(style);
1712
+ var hasIterator = typeof iterator === 'function';
1713
+ declarations.forEach(function (declaration) {
1769
1714
  if (declaration.type !== 'declaration') {
1770
1715
  return;
1771
1716
  }
1772
- const { property, value } = declaration;
1717
+ var property = declaration.property, value = declaration.value;
1773
1718
  if (hasIterator) {
1774
1719
  iterator(property, value, declaration);
1775
1720
  }
@@ -1781,80 +1726,8 @@ function StyleToObject(style, iterator) {
1781
1726
  return styleObject;
1782
1727
  }
1783
1728
 
1784
- var utilities = {};
1785
-
1786
- Object.defineProperty(utilities, "__esModule", { value: true });
1787
- utilities.camelCase = void 0;
1788
- var CUSTOM_PROPERTY_REGEX = /^--[a-zA-Z0-9_-]+$/;
1789
- var HYPHEN_REGEX = /-([a-z])/g;
1790
- var NO_HYPHEN_REGEX = /^[^-]+$/;
1791
- var VENDOR_PREFIX_REGEX = /^-(webkit|moz|ms|o|khtml)-/;
1792
- var MS_VENDOR_PREFIX_REGEX = /^-(ms)-/;
1793
- /**
1794
- * Checks whether to skip camelCase.
1795
- */
1796
- var skipCamelCase = function (property) {
1797
- return !property ||
1798
- NO_HYPHEN_REGEX.test(property) ||
1799
- CUSTOM_PROPERTY_REGEX.test(property);
1800
- };
1801
- /**
1802
- * Replacer that capitalizes first character.
1803
- */
1804
- var capitalize = function (match, character) {
1805
- return character.toUpperCase();
1806
- };
1807
- /**
1808
- * Replacer that removes beginning hyphen of vendor prefix property.
1809
- */
1810
- var trimHyphen = function (match, prefix) { return "".concat(prefix, "-"); };
1811
- /**
1812
- * CamelCases a CSS property.
1813
- */
1814
- var camelCase = function (property, options) {
1815
- if (options === void 0) { options = {}; }
1816
- if (skipCamelCase(property)) {
1817
- return property;
1818
- }
1819
- property = property.toLowerCase();
1820
- if (options.reactCompat) {
1821
- // `-ms` vendor prefix should not be capitalized
1822
- property = property.replace(MS_VENDOR_PREFIX_REGEX, trimHyphen);
1823
- }
1824
- else {
1825
- // for non-React, remove first hyphen so vendor prefix is not capitalized
1826
- property = property.replace(VENDOR_PREFIX_REGEX, trimHyphen);
1827
- }
1828
- return property.replace(HYPHEN_REGEX, capitalize);
1829
- };
1830
- utilities.camelCase = camelCase;
1831
-
1832
- var __importDefault = (_commonjsHelpers.commonjsGlobal && _commonjsHelpers.commonjsGlobal.__importDefault) || function (mod) {
1833
- return (mod && mod.__esModule) ? mod : { "default": mod };
1834
- };
1835
- var style_to_object_1 = __importDefault(cjs$2);
1836
- var utilities_1 = utilities;
1837
- /**
1838
- * Parses CSS inline style to JavaScript object (camelCased).
1839
- */
1840
- function StyleToJS(style, options) {
1841
- var output = {};
1842
- if (!style || typeof style !== 'string') {
1843
- return output;
1844
- }
1845
- (0, style_to_object_1.default)(style, function (property, value) {
1846
- // skip CSS comment
1847
- if (property && value) {
1848
- output[(0, utilities_1.camelCase)(property, options)] = value;
1849
- }
1850
- });
1851
- return output;
1852
- }
1853
- StyleToJS.default = StyleToJS;
1854
- var cjs = StyleToJS;
1855
-
1856
-
1857
- var styleToJs = /*@__PURE__*/_commonjsHelpers.getDefaultExportFromCjs(cjs);
1729
+ // ensure compatibility with rollup umd build
1730
+ var styleToObject = _default.default || _default;
1858
1731
 
1859
1732
  /**
1860
1733
  * @typedef {import('unist').Node} Node
@@ -2342,7 +2215,7 @@ VFileMessage.prototype.source = undefined;
2342
2215
  * @import {MdxJsxFlowElementHast, MdxJsxTextElementHast} from 'mdast-util-mdx-jsx'
2343
2216
  * @import {MdxjsEsmHast} from 'mdast-util-mdxjs-esm'
2344
2217
  * @import {Position} from 'unist'
2345
- * @import {Child, Create, Field, JsxElement, State, Style} from './types.js'
2218
+ * @import {Child, Create, Field, State, Style} from './types.js'
2346
2219
  */
2347
2220
 
2348
2221
 
@@ -2353,6 +2226,7 @@ const own$4 = {}.hasOwnProperty;
2353
2226
  const emptyMap = new Map();
2354
2227
 
2355
2228
  const cap = /[A-Z]/g;
2229
+ const dashSomething = /-([a-z])/g;
2356
2230
 
2357
2231
  // `react-dom` triggers a warning for *any* white space in tables.
2358
2232
  // To follow GFM, `mdast-util-to-hast` injects line endings between elements.
@@ -2379,7 +2253,7 @@ const docs = 'https://github.com/syntax-tree/hast-util-to-jsx-runtime';
2379
2253
  * Tree to transform.
2380
2254
  * @param {Options} options
2381
2255
  * Configuration (required).
2382
- * @returns {JsxElement}
2256
+ * @returns {JSX.Element}
2383
2257
  * JSX element.
2384
2258
  */
2385
2259
 
@@ -2961,24 +2835,49 @@ function createProperty(state, prop, value) {
2961
2835
  * Throws `VFileMessage` when CSS cannot be parsed.
2962
2836
  */
2963
2837
  function parseStyle(state, value) {
2838
+ /** @type {Style} */
2839
+ const result = {};
2840
+
2964
2841
  try {
2965
- return styleToJs(value, {reactCompat: true})
2842
+ styleToObject(value, replacer);
2966
2843
  } catch (error) {
2967
- if (state.ignoreInvalidStyle) {
2968
- return {}
2844
+ if (!state.ignoreInvalidStyle) {
2845
+ const cause = /** @type {Error} */ (error);
2846
+ const message = new VFileMessage('Cannot parse `style` attribute', {
2847
+ ancestors: state.ancestors,
2848
+ cause,
2849
+ ruleId: 'style',
2850
+ source: 'hast-util-to-jsx-runtime'
2851
+ });
2852
+ message.file = state.filePath || undefined;
2853
+ message.url = docs + '#cannot-parse-style-attribute';
2854
+
2855
+ throw message
2969
2856
  }
2857
+ }
2970
2858
 
2971
- const cause = /** @type {Error} */ (error);
2972
- const message = new VFileMessage('Cannot parse `style` attribute', {
2973
- ancestors: state.ancestors,
2974
- cause,
2975
- ruleId: 'style',
2976
- source: 'hast-util-to-jsx-runtime'
2977
- });
2978
- message.file = state.filePath || undefined;
2979
- message.url = docs + '#cannot-parse-style-attribute';
2859
+ return result
2980
2860
 
2981
- throw message
2861
+ /**
2862
+ * Add a CSS property (normal, so with dashes) to `result` as a DOM CSS
2863
+ * property.
2864
+ *
2865
+ * @param {string} name
2866
+ * Key.
2867
+ * @param {string} value
2868
+ * Value
2869
+ * @returns {undefined}
2870
+ * Nothing.
2871
+ */
2872
+ function replacer(name, value) {
2873
+ let key = name;
2874
+
2875
+ if (key.slice(0, 2) !== '--') {
2876
+ if (key.slice(0, 4) === '-ms-') key = 'ms-' + key.slice(4);
2877
+ key = key.replace(dashSomething, toCamel);
2878
+ }
2879
+
2880
+ result[key] = value;
2982
2881
  }
2983
2882
  }
2984
2883
 
@@ -3032,7 +2931,8 @@ function findComponentFromName(state, name$1, allowExpression) {
3032
2931
  // Only literals can be passed in `components` currently.
3033
2932
  // No identifiers / member expressions.
3034
2933
  if (result.type === 'Literal') {
3035
- const name = /** @type {string | number} */ (result.value);
2934
+ const name = /** @type {keyof JSX.IntrinsicElements} */ (result.value);
2935
+
3036
2936
  return own$4.call(state.components, name) ? state.components[name] : name
3037
2937
  }
3038
2938
 
@@ -3099,6 +2999,20 @@ function transformStyleToCssCasing(from) {
3099
2999
  return to
3100
3000
  }
3101
3001
 
3002
+ /**
3003
+ * Make `$1` capitalized.
3004
+ *
3005
+ * @param {string} _
3006
+ * Whatever.
3007
+ * @param {string} $1
3008
+ * Single ASCII alphabetical.
3009
+ * @returns {string}
3010
+ * Capitalized `$1`.
3011
+ */
3012
+ function toCamel(_, $1) {
3013
+ return $1.toUpperCase()
3014
+ }
3015
+
3102
3016
  /**
3103
3017
  * Make `$0` dash cased.
3104
3018
  *
@@ -5385,7 +5299,6 @@ const characterEntities = {
5385
5299
  zwnj: '‌'
5386
5300
  };
5387
5301
 
5388
- // To do: next major: use `Object.hasOwn`.
5389
5302
  const own$3 = {}.hasOwnProperty;
5390
5303
 
5391
5304
  /**
@@ -14057,7 +13970,7 @@ const own$2 = {}.hasOwnProperty;
14057
13970
  * mdast tree.
14058
13971
  */
14059
13972
  function fromMarkdown(value, encoding, options) {
14060
- if (encoding && typeof encoding === 'object') {
13973
+ if (typeof encoding !== 'string') {
14061
13974
  options = encoding;
14062
13975
  encoding = undefined;
14063
13976
  }
@@ -15199,11 +15112,12 @@ function remarkParse(options) {
15199
15112
  }
15200
15113
 
15201
15114
  /**
15202
- * @import {Element} from 'hast'
15203
- * @import {Blockquote} from 'mdast'
15204
- * @import {State} from '../state.js'
15115
+ * @typedef {import('hast').Element} Element
15116
+ * @typedef {import('mdast').Blockquote} Blockquote
15117
+ * @typedef {import('../state.js').State} State
15205
15118
  */
15206
15119
 
15120
+
15207
15121
  /**
15208
15122
  * Turn an mdast `blockquote` node into hast.
15209
15123
  *
@@ -15227,11 +15141,13 @@ function blockquote(state, node) {
15227
15141
  }
15228
15142
 
15229
15143
  /**
15230
- * @import {Element, Text} from 'hast'
15231
- * @import {Break} from 'mdast'
15232
- * @import {State} from '../state.js'
15144
+ * @typedef {import('hast').Element} Element
15145
+ * @typedef {import('hast').Text} Text
15146
+ * @typedef {import('mdast').Break} Break
15147
+ * @typedef {import('../state.js').State} State
15233
15148
  */
15234
15149
 
15150
+
15235
15151
  /**
15236
15152
  * Turn an mdast `break` node into hast.
15237
15153
  *
@@ -15250,11 +15166,13 @@ function hardBreak(state, node) {
15250
15166
  }
15251
15167
 
15252
15168
  /**
15253
- * @import {Element, Properties} from 'hast'
15254
- * @import {Code} from 'mdast'
15255
- * @import {State} from '../state.js'
15169
+ * @typedef {import('hast').Element} Element
15170
+ * @typedef {import('hast').Properties} Properties
15171
+ * @typedef {import('mdast').Code} Code
15172
+ * @typedef {import('../state.js').State} State
15256
15173
  */
15257
15174
 
15175
+
15258
15176
  /**
15259
15177
  * Turn an mdast `code` node into hast.
15260
15178
  *
@@ -15269,12 +15187,9 @@ function code(state, node) {
15269
15187
  const value = node.value ? node.value + '\n' : '';
15270
15188
  /** @type {Properties} */
15271
15189
  const properties = {};
15272
- // Someone can write `js&#x20;python&#x9;ruby`.
15273
- const language = node.lang ? node.lang.split(/\s+/) : [];
15274
15190
 
15275
- // GH/CM still drop the non-first languages.
15276
- if (language.length > 0) {
15277
- properties.className = ['language-' + language[0]];
15191
+ if (node.lang) {
15192
+ properties.className = ['language-' + node.lang];
15278
15193
  }
15279
15194
 
15280
15195
  // Create `<code>`.
@@ -15300,11 +15215,12 @@ function code(state, node) {
15300
15215
  }
15301
15216
 
15302
15217
  /**
15303
- * @import {Element} from 'hast'
15304
- * @import {Delete} from 'mdast'
15305
- * @import {State} from '../state.js'
15218
+ * @typedef {import('hast').Element} Element
15219
+ * @typedef {import('mdast').Delete} Delete
15220
+ * @typedef {import('../state.js').State} State
15306
15221
  */
15307
15222
 
15223
+
15308
15224
  /**
15309
15225
  * Turn an mdast `delete` node into hast.
15310
15226
  *
@@ -15328,11 +15244,12 @@ function strikethrough(state, node) {
15328
15244
  }
15329
15245
 
15330
15246
  /**
15331
- * @import {Element} from 'hast'
15332
- * @import {Emphasis} from 'mdast'
15333
- * @import {State} from '../state.js'
15247
+ * @typedef {import('hast').Element} Element
15248
+ * @typedef {import('mdast').Emphasis} Emphasis
15249
+ * @typedef {import('../state.js').State} State
15334
15250
  */
15335
15251
 
15252
+
15336
15253
  /**
15337
15254
  * Turn an mdast `emphasis` node into hast.
15338
15255
  *
@@ -15356,9 +15273,9 @@ function emphasis(state, node) {
15356
15273
  }
15357
15274
 
15358
15275
  /**
15359
- * @import {Element} from 'hast'
15360
- * @import {FootnoteReference} from 'mdast'
15361
- * @import {State} from '../state.js'
15276
+ * @typedef {import('hast').Element} Element
15277
+ * @typedef {import('mdast').FootnoteReference} FootnoteReference
15278
+ * @typedef {import('../state.js').State} State
15362
15279
  */
15363
15280
 
15364
15281
 
@@ -15426,11 +15343,12 @@ function footnoteReference(state, node) {
15426
15343
  }
15427
15344
 
15428
15345
  /**
15429
- * @import {Element} from 'hast'
15430
- * @import {Heading} from 'mdast'
15431
- * @import {State} from '../state.js'
15346
+ * @typedef {import('hast').Element} Element
15347
+ * @typedef {import('mdast').Heading} Heading
15348
+ * @typedef {import('../state.js').State} State
15432
15349
  */
15433
15350
 
15351
+
15434
15352
  /**
15435
15353
  * Turn an mdast `heading` node into hast.
15436
15354
  *
@@ -15454,12 +15372,13 @@ function heading(state, node) {
15454
15372
  }
15455
15373
 
15456
15374
  /**
15457
- * @import {Element} from 'hast'
15458
- * @import {Html} from 'mdast'
15459
- * @import {State} from '../state.js'
15460
- * @import {Raw} from '../../index.js'
15375
+ * @typedef {import('hast').Element} Element
15376
+ * @typedef {import('mdast').Html} Html
15377
+ * @typedef {import('../state.js').State} State
15378
+ * @typedef {import('../../index.js').Raw} Raw
15461
15379
  */
15462
15380
 
15381
+
15463
15382
  /**
15464
15383
  * Turn an mdast `html` node into hast (`raw` node in dangerous mode, otherwise
15465
15384
  * nothing).
@@ -15483,11 +15402,15 @@ function html(state, node) {
15483
15402
  }
15484
15403
 
15485
15404
  /**
15486
- * @import {ElementContent} from 'hast'
15487
- * @import {Reference, Nodes} from 'mdast'
15488
- * @import {State} from './state.js'
15405
+ * @typedef {import('hast').ElementContent} ElementContent
15406
+ *
15407
+ * @typedef {import('mdast').Nodes} Nodes
15408
+ * @typedef {import('mdast').Reference} Reference
15409
+ *
15410
+ * @typedef {import('./state.js').State} State
15489
15411
  */
15490
15412
 
15413
+
15491
15414
  /**
15492
15415
  * Return the content of a reference without definition as plain text.
15493
15416
  *
@@ -15533,9 +15456,11 @@ function revert(state, node) {
15533
15456
  }
15534
15457
 
15535
15458
  /**
15536
- * @import {ElementContent, Element, Properties} from 'hast'
15537
- * @import {ImageReference} from 'mdast'
15538
- * @import {State} from '../state.js'
15459
+ * @typedef {import('hast').Element} Element
15460
+ * @typedef {import('hast').ElementContent} ElementContent
15461
+ * @typedef {import('hast').Properties} Properties
15462
+ * @typedef {import('mdast').ImageReference} ImageReference
15463
+ * @typedef {import('../state.js').State} State
15539
15464
  */
15540
15465
 
15541
15466
 
@@ -15571,9 +15496,10 @@ function imageReference(state, node) {
15571
15496
  }
15572
15497
 
15573
15498
  /**
15574
- * @import {Element, Properties} from 'hast'
15575
- * @import {Image} from 'mdast'
15576
- * @import {State} from '../state.js'
15499
+ * @typedef {import('hast').Element} Element
15500
+ * @typedef {import('hast').Properties} Properties
15501
+ * @typedef {import('mdast').Image} Image
15502
+ * @typedef {import('../state.js').State} State
15577
15503
  */
15578
15504
 
15579
15505
 
@@ -15606,11 +15532,13 @@ function image(state, node) {
15606
15532
  }
15607
15533
 
15608
15534
  /**
15609
- * @import {Element, Text} from 'hast'
15610
- * @import {InlineCode} from 'mdast'
15611
- * @import {State} from '../state.js'
15535
+ * @typedef {import('hast').Element} Element
15536
+ * @typedef {import('hast').Text} Text
15537
+ * @typedef {import('mdast').InlineCode} InlineCode
15538
+ * @typedef {import('../state.js').State} State
15612
15539
  */
15613
15540
 
15541
+
15614
15542
  /**
15615
15543
  * Turn an mdast `inlineCode` node into hast.
15616
15544
  *
@@ -15638,9 +15566,11 @@ function inlineCode(state, node) {
15638
15566
  }
15639
15567
 
15640
15568
  /**
15641
- * @import {ElementContent, Element, Properties} from 'hast'
15642
- * @import {LinkReference} from 'mdast'
15643
- * @import {State} from '../state.js'
15569
+ * @typedef {import('hast').Element} Element
15570
+ * @typedef {import('hast').ElementContent} ElementContent
15571
+ * @typedef {import('hast').Properties} Properties
15572
+ * @typedef {import('mdast').LinkReference} LinkReference
15573
+ * @typedef {import('../state.js').State} State
15644
15574
  */
15645
15575
 
15646
15576
 
@@ -15681,9 +15611,10 @@ function linkReference(state, node) {
15681
15611
  }
15682
15612
 
15683
15613
  /**
15684
- * @import {Element, Properties} from 'hast'
15685
- * @import {Link} from 'mdast'
15686
- * @import {State} from '../state.js'
15614
+ * @typedef {import('hast').Element} Element
15615
+ * @typedef {import('hast').Properties} Properties
15616
+ * @typedef {import('mdast').Link} Link
15617
+ * @typedef {import('../state.js').State} State
15687
15618
  */
15688
15619
 
15689
15620
 
@@ -15717,11 +15648,15 @@ function link(state, node) {
15717
15648
  }
15718
15649
 
15719
15650
  /**
15720
- * @import {ElementContent, Element, Properties} from 'hast'
15721
- * @import {ListItem, Parents} from 'mdast'
15722
- * @import {State} from '../state.js'
15651
+ * @typedef {import('hast').Element} Element
15652
+ * @typedef {import('hast').ElementContent} ElementContent
15653
+ * @typedef {import('hast').Properties} Properties
15654
+ * @typedef {import('mdast').ListItem} ListItem
15655
+ * @typedef {import('mdast').Parents} Parents
15656
+ * @typedef {import('../state.js').State} State
15723
15657
  */
15724
15658
 
15659
+
15725
15660
  /**
15726
15661
  * Turn an mdast `listItem` node into hast.
15727
15662
  *
@@ -15837,11 +15772,13 @@ function listItemLoose(node) {
15837
15772
  }
15838
15773
 
15839
15774
  /**
15840
- * @import {Element, Properties} from 'hast'
15841
- * @import {List} from 'mdast'
15842
- * @import {State} from '../state.js'
15775
+ * @typedef {import('hast').Element} Element
15776
+ * @typedef {import('hast').Properties} Properties
15777
+ * @typedef {import('mdast').List} List
15778
+ * @typedef {import('../state.js').State} State
15843
15779
  */
15844
15780
 
15781
+
15845
15782
  /**
15846
15783
  * Turn an mdast `list` node into hast.
15847
15784
  *
@@ -15890,11 +15827,12 @@ function list(state, node) {
15890
15827
  }
15891
15828
 
15892
15829
  /**
15893
- * @import {Element} from 'hast'
15894
- * @import {Paragraph} from 'mdast'
15895
- * @import {State} from '../state.js'
15830
+ * @typedef {import('hast').Element} Element
15831
+ * @typedef {import('mdast').Paragraph} Paragraph
15832
+ * @typedef {import('../state.js').State} State
15896
15833
  */
15897
15834
 
15835
+
15898
15836
  /**
15899
15837
  * Turn an mdast `paragraph` node into hast.
15900
15838
  *
@@ -15918,11 +15856,13 @@ function paragraph(state, node) {
15918
15856
  }
15919
15857
 
15920
15858
  /**
15921
- * @import {Parents as HastParents, Root as HastRoot} from 'hast'
15922
- * @import {Root as MdastRoot} from 'mdast'
15923
- * @import {State} from '../state.js'
15859
+ * @typedef {import('hast').Parents} HastParents
15860
+ * @typedef {import('hast').Root} HastRoot
15861
+ * @typedef {import('mdast').Root} MdastRoot
15862
+ * @typedef {import('../state.js').State} State
15924
15863
  */
15925
15864
 
15865
+
15926
15866
  /**
15927
15867
  * Turn an mdast `root` node into hast.
15928
15868
  *
@@ -15941,11 +15881,12 @@ function root(state, node) {
15941
15881
  }
15942
15882
 
15943
15883
  /**
15944
- * @import {Element} from 'hast'
15945
- * @import {Strong} from 'mdast'
15946
- * @import {State} from '../state.js'
15884
+ * @typedef {import('hast').Element} Element
15885
+ * @typedef {import('mdast').Strong} Strong
15886
+ * @typedef {import('../state.js').State} State
15947
15887
  */
15948
15888
 
15889
+
15949
15890
  /**
15950
15891
  * Turn an mdast `strong` node into hast.
15951
15892
  *
@@ -15969,9 +15910,9 @@ function strong(state, node) {
15969
15910
  }
15970
15911
 
15971
15912
  /**
15972
- * @import {Table} from 'mdast'
15973
- * @import {Element} from 'hast'
15974
- * @import {State} from '../state.js'
15913
+ * @typedef {import('hast').Element} Element
15914
+ * @typedef {import('mdast').Table} Table
15915
+ * @typedef {import('../state.js').State} State
15975
15916
  */
15976
15917
 
15977
15918
 
@@ -16030,11 +15971,15 @@ function table(state, node) {
16030
15971
  }
16031
15972
 
16032
15973
  /**
16033
- * @import {Element, ElementContent, Properties} from 'hast'
16034
- * @import {Parents, TableRow} from 'mdast'
16035
- * @import {State} from '../state.js'
15974
+ * @typedef {import('hast').Element} Element
15975
+ * @typedef {import('hast').ElementContent} ElementContent
15976
+ * @typedef {import('hast').Properties} Properties
15977
+ * @typedef {import('mdast').Parents} Parents
15978
+ * @typedef {import('mdast').TableRow} TableRow
15979
+ * @typedef {import('../state.js').State} State
16036
15980
  */
16037
15981
 
15982
+
16038
15983
  /**
16039
15984
  * Turn an mdast `tableRow` node into hast.
16040
15985
  *
@@ -16094,11 +16039,12 @@ function tableRow(state, node, parent) {
16094
16039
  }
16095
16040
 
16096
16041
  /**
16097
- * @import {Element} from 'hast'
16098
- * @import {TableCell} from 'mdast'
16099
- * @import {State} from '../state.js'
16042
+ * @typedef {import('hast').Element} Element
16043
+ * @typedef {import('mdast').TableCell} TableCell
16044
+ * @typedef {import('../state.js').State} State
16100
16045
  */
16101
16046
 
16047
+
16102
16048
  /**
16103
16049
  * Turn an mdast `tableCell` node into hast.
16104
16050
  *
@@ -16194,9 +16140,10 @@ function trimLine(value, start, end) {
16194
16140
  }
16195
16141
 
16196
16142
  /**
16197
- * @import {Element as HastElement, Text as HastText} from 'hast'
16198
- * @import {Text as MdastText} from 'mdast'
16199
- * @import {State} from '../state.js'
16143
+ * @typedef {import('hast').Element} HastElement
16144
+ * @typedef {import('hast').Text} HastText
16145
+ * @typedef {import('mdast').Text} MdastText
16146
+ * @typedef {import('../state.js').State} State
16200
16147
  */
16201
16148
 
16202
16149
 
@@ -16218,11 +16165,12 @@ function text(state, node) {
16218
16165
  }
16219
16166
 
16220
16167
  /**
16221
- * @import {Element} from 'hast'
16222
- * @import {ThematicBreak} from 'mdast'
16223
- * @import {State} from '../state.js'
16168
+ * @typedef {import('hast').Element} Element
16169
+ * @typedef {import('mdast').ThematicBreak} ThematicBreak
16170
+ * @typedef {import('../state.js').State} State
16224
16171
  */
16225
16172
 
16173
+
16226
16174
  /**
16227
16175
  * Turn an mdast `thematicBreak` node into hast.
16228
16176
  *
@@ -16245,15 +16193,10 @@ function thematicBreak(state, node) {
16245
16193
  return state.applyData(node, result)
16246
16194
  }
16247
16195
 
16248
- /**
16249
- * @import {Handlers} from '../state.js'
16250
- */
16251
-
16252
-
16253
16196
  /**
16254
16197
  * Default handlers for nodes.
16255
16198
  *
16256
- * @satisfies {Handlers}
16199
+ * @satisfies {import('../state.js').Handlers}
16257
16200
  */
16258
16201
  const handlers = {
16259
16202
  blockquote,
@@ -16358,12 +16301,6 @@ const deserializer = ($, _) => {
16358
16301
  return as(BigInt(value), index);
16359
16302
  case 'BigInt':
16360
16303
  return as(Object(BigInt(value)), index);
16361
- case 'ArrayBuffer':
16362
- return as(new Uint8Array(value).buffer, value);
16363
- case 'DataView': {
16364
- const { buffer } = new Uint8Array(value);
16365
- return as(new DataView(buffer), value);
16366
- }
16367
16304
  }
16368
16305
  return as(new env[type](value), index);
16369
16306
  };
@@ -16406,8 +16343,6 @@ const typeOf = value => {
16406
16343
  return [MAP, EMPTY];
16407
16344
  case 'Set':
16408
16345
  return [SET, EMPTY];
16409
- case 'DataView':
16410
- return [ARRAY, asString];
16411
16346
  }
16412
16347
 
16413
16348
  if (asString.includes('Array'))
@@ -16457,17 +16392,9 @@ const serializer = (strict, json, $, _) => {
16457
16392
  return as([TYPE, entry], value);
16458
16393
  }
16459
16394
  case ARRAY: {
16460
- if (type) {
16461
- let spread = value;
16462
- if (type === 'DataView') {
16463
- spread = new Uint8Array(value.buffer);
16464
- }
16465
- else if (type === 'ArrayBuffer') {
16466
- spread = new Uint8Array(value);
16467
- }
16468
- return as([type, [...spread]], value);
16469
- }
16470
-
16395
+ if (type)
16396
+ return as([type, [...value]], value);
16397
+
16471
16398
  const arr = [];
16472
16399
  const index = as([TYPE, arr], value);
16473
16400
  for (const entry of value)
@@ -16568,8 +16495,10 @@ var structuredClone$1 = typeof structuredClone === "function" ?
16568
16495
  (any, options) => deserialize(serialize(any, options));
16569
16496
 
16570
16497
  /**
16571
- * @import {ElementContent, Element} from 'hast'
16572
- * @import {State} from './state.js'
16498
+ * @typedef {import('hast').Element} Element
16499
+ * @typedef {import('hast').ElementContent} ElementContent
16500
+ *
16501
+ * @typedef {import('./state.js').State} State
16573
16502
  */
16574
16503
 
16575
16504
 
@@ -17217,25 +17146,22 @@ function visit(tree, testOrVisitor, visitorOrReverse, maybeReverse) {
17217
17146
  }
17218
17147
 
17219
17148
  /**
17220
- * @import {
17221
- * ElementContent as HastElementContent,
17222
- * Element as HastElement,
17223
- * Nodes as HastNodes,
17224
- * Properties as HastProperties,
17225
- * RootContent as HastRootContent,
17226
- * Text as HastText
17227
- * } from 'hast'
17228
- * @import {
17229
- * Definition as MdastDefinition,
17230
- * FootnoteDefinition as MdastFootnoteDefinition,
17231
- * Nodes as MdastNodes,
17232
- * Parents as MdastParents
17233
- * } from 'mdast'
17234
- * @import {VFile} from 'vfile'
17235
- * @import {
17236
- * FootnoteBackContentTemplate,
17237
- * FootnoteBackLabelTemplate
17238
- * } from './footer.js'
17149
+ * @typedef {import('hast').Element} HastElement
17150
+ * @typedef {import('hast').ElementContent} HastElementContent
17151
+ * @typedef {import('hast').Nodes} HastNodes
17152
+ * @typedef {import('hast').Properties} HastProperties
17153
+ * @typedef {import('hast').RootContent} HastRootContent
17154
+ * @typedef {import('hast').Text} HastText
17155
+ *
17156
+ * @typedef {import('mdast').Definition} MdastDefinition
17157
+ * @typedef {import('mdast').FootnoteDefinition} MdastFootnoteDefinition
17158
+ * @typedef {import('mdast').Nodes} MdastNodes
17159
+ * @typedef {import('mdast').Parents} MdastParents
17160
+ *
17161
+ * @typedef {import('vfile').VFile} VFile
17162
+ *
17163
+ * @typedef {import('./footer.js').FootnoteBackContentTemplate} FootnoteBackContentTemplate
17164
+ * @typedef {import('./footer.js').FootnoteBackLabelTemplate} FootnoteBackLabelTemplate
17239
17165
  */
17240
17166
 
17241
17167
 
@@ -17535,9 +17461,9 @@ function trimMarkdownSpaceStart(value) {
17535
17461
  }
17536
17462
 
17537
17463
  /**
17538
- * @import {Nodes as HastNodes} from 'hast'
17539
- * @import {Nodes as MdastNodes} from 'mdast'
17540
- * @import {Options} from './state.js'
17464
+ * @typedef {import('hast').Nodes} HastNodes
17465
+ * @typedef {import('mdast').Nodes} MdastNodes
17466
+ * @typedef {import('./state.js').Options} Options
17541
17467
  */
17542
17468
 
17543
17469