@vinyasa/typography 1.0.23 → 1.0.25

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 (56) hide show
  1. package/README.md +77 -2
  2. package/dist/cjs/blockquote.cjs +3 -2
  3. package/dist/cjs/caption.cjs +82 -14
  4. package/dist/cjs/caption.css +104 -2
  5. package/dist/cjs/code.cjs +4 -3
  6. package/dist/cjs/heading.cjs +82 -14
  7. package/dist/cjs/heading.css +104 -2
  8. package/dist/cjs/highlight.cjs +700 -0
  9. package/dist/cjs/highlight.css +197 -0
  10. package/dist/cjs/index.cjs +597 -21
  11. package/dist/cjs/index.css +172 -2
  12. package/dist/cjs/kbd.cjs +3 -2
  13. package/dist/cjs/label.cjs +82 -14
  14. package/dist/cjs/label.css +104 -2
  15. package/dist/cjs/link.cjs +82 -14
  16. package/dist/cjs/link.css +104 -2
  17. package/dist/cjs/list.cjs +431 -0
  18. package/dist/cjs/list.css +60 -0
  19. package/dist/cjs/mark.cjs +246 -0
  20. package/dist/cjs/mark.css +8 -0
  21. package/dist/cjs/markdown-renderer.cjs +87 -17
  22. package/dist/cjs/markdown-renderer.css +104 -2
  23. package/dist/cjs/paragraph.cjs +82 -14
  24. package/dist/cjs/paragraph.css +104 -2
  25. package/dist/cjs/text.cjs +83 -15
  26. package/dist/cjs/text.css +104 -2
  27. package/dist/esm/191.css +104 -2
  28. package/dist/esm/191.js +74 -13
  29. package/dist/esm/227.css +7 -0
  30. package/dist/esm/227.js +39 -0
  31. package/dist/esm/513.css +60 -0
  32. package/dist/esm/513.js +126 -0
  33. package/dist/esm/651.js +4 -2
  34. package/dist/esm/767.js +33 -0
  35. package/dist/esm/783.js +3 -1
  36. package/dist/esm/919.js +3 -1
  37. package/dist/esm/components/highlight/Highlight.d.ts +14 -0
  38. package/dist/esm/components/highlight/index.d.ts +1 -0
  39. package/dist/esm/components/list/List.css.d.ts +47 -0
  40. package/dist/esm/components/list/List.d.ts +52 -0
  41. package/dist/esm/components/list/index.d.ts +1 -0
  42. package/dist/esm/components/mark/Mark.css.d.ts +1 -0
  43. package/dist/esm/components/mark/Mark.d.ts +5 -0
  44. package/dist/esm/components/mark/index.d.ts +1 -0
  45. package/dist/esm/components/text/Text.css.d.ts +94 -1
  46. package/dist/esm/components/text/Text.d.ts +55 -9
  47. package/dist/esm/highlight.d.ts +2 -0
  48. package/dist/esm/highlight.js +1 -0
  49. package/dist/esm/index.d.ts +4 -0
  50. package/dist/esm/index.js +26 -0
  51. package/dist/esm/list.d.ts +2 -0
  52. package/dist/esm/list.js +1 -0
  53. package/dist/esm/mark.d.ts +2 -0
  54. package/dist/esm/mark.js +1 -0
  55. package/dist/esm/useIsTruncated.d.ts +15 -0
  56. package/package.json +25 -5
@@ -41,16 +41,20 @@ __webpack_require__.d(__webpack_exports__, {
41
41
  Caption: ()=>caption_Caption,
42
42
  Code: ()=>code_Code,
43
43
  Heading: ()=>heading_Heading,
44
+ Highlight: ()=>highlight_Highlight,
44
45
  Kbd: ()=>kbd_Kbd,
45
46
  Label: ()=>label_Label,
46
47
  Link: ()=>link_Link,
48
+ List: ()=>list_List,
49
+ Mark: ()=>mark_Mark,
47
50
  MarkdownRenderer: ()=>markdown_renderer_MarkdownRenderer,
48
51
  Paragraph: ()=>paragraph_Paragraph,
49
- Text: ()=>text_Text
52
+ Text: ()=>text_Text,
53
+ useIsTruncated: ()=>useIsTruncated
50
54
  });
51
55
  const jsx_runtime_namespaceObject = require("react/jsx-runtime");
52
- const external_react_namespaceObject = require("react");
53
56
  const tokens_namespaceObject = require("@vinyasa/tokens");
57
+ const external_react_namespaceObject = require("react");
54
58
  const space = {
55
59
  1: tokens_namespaceObject.themeContract.space1,
56
60
  2: tokens_namespaceObject.themeContract.space2,
@@ -227,6 +231,7 @@ const Blockquote = /*#__PURE__*/ (0, external_react_namespaceObject.forwardRef)(
227
231
  "style",
228
232
  "children"
229
233
  ]), [ref] = _rest;
234
+ const themedRef = (0, tokens_namespaceObject.useThemedRef)(ref);
230
235
  const classes = className ? `${blockquote} ${className}` : blockquote;
231
236
  const computedStyle = _object_spread({}, resolveSpacingStyle({
232
237
  m,
@@ -245,7 +250,7 @@ const Blockquote = /*#__PURE__*/ (0, external_react_namespaceObject.forwardRef)(
245
250
  py
246
251
  }), style);
247
252
  return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("blockquote", _object_spread_props(_object_spread({
248
- ref: ref,
253
+ ref: themedRef,
249
254
  className: classes,
250
255
  style: computedStyle
251
256
  }, rest), {
@@ -368,10 +373,47 @@ var Text_css_text = createRuntimeFn({
368
373
  default: '_4sie9wg',
369
374
  muted: '_4sie9wh',
370
375
  primary: '_4sie9wi',
371
- error: '_4sie9wj'
376
+ info: '_4sie9wj',
377
+ success: '_4sie9wk',
378
+ warning: '_4sie9wl',
379
+ error: '_4sie9wm'
372
380
  },
373
381
  truncate: {
374
- true: '_4sie9wk'
382
+ end: '_4sie9wn',
383
+ start: '_4sie9wo'
384
+ },
385
+ italic: {
386
+ true: '_4sie9wp'
387
+ },
388
+ textTransform: {
389
+ uppercase: '_4sie9wq',
390
+ lowercase: '_4sie9wr',
391
+ capitalize: '_4sie9ws',
392
+ none: '_4sie9wt'
393
+ },
394
+ decoration: {
395
+ underline: '_4sie9wu',
396
+ 'line-through': '_4sie9wv',
397
+ none: '_4sie9ww'
398
+ },
399
+ letterSpacing: {
400
+ tight: '_4sie9wx',
401
+ normal: '_4sie9wy',
402
+ wide: '_4sie9wz'
403
+ },
404
+ lineHeight: {
405
+ tight: '_4sie9w10',
406
+ normal: '_4sie9w11',
407
+ loose: '_4sie9w12'
408
+ },
409
+ textWrap: {
410
+ wrap: '_4sie9w13',
411
+ balance: '_4sie9w14',
412
+ pretty: '_4sie9w15',
413
+ nowrap: '_4sie9w16'
414
+ },
415
+ variant: {
416
+ gradient: '_4sie9w17'
375
417
  }
376
418
  },
377
419
  defaultVariants: {
@@ -463,13 +505,23 @@ const Text = /*#__PURE__*/ (0, external_react_namespaceObject.forwardRef)((_0, _
463
505
  let _ref = [
464
506
  _0,
465
507
  _1
466
- ], [_ref1, ..._rest] = _ref, { as: Component = 'span', size, weight, align, color, truncate, m, mt, mr, mb, ml, mx, my, p, pt, pr, pb, pl, px, py, className, style, children } = _ref1, rest = Text_object_without_properties(_ref1, [
508
+ ], [_ref1, ..._rest] = _ref, { as: Component = 'span', size, weight, align, color, truncate, italic, textTransform, decoration, letterSpacing, lineHeight, textWrap, variant, lineClamp, inherit, gradient, m, mt, mr, mb, ml, mx, my, p, pt, pr, pb, pl, px, py, className, style, children } = _ref1, rest = Text_object_without_properties(_ref1, [
467
509
  "as",
468
510
  "size",
469
511
  "weight",
470
512
  "align",
471
513
  "color",
472
514
  "truncate",
515
+ "italic",
516
+ "textTransform",
517
+ "decoration",
518
+ "letterSpacing",
519
+ "lineHeight",
520
+ "textWrap",
521
+ "variant",
522
+ "lineClamp",
523
+ "inherit",
524
+ "gradient",
473
525
  "m",
474
526
  "mt",
475
527
  "mr",
@@ -488,19 +540,24 @@ const Text = /*#__PURE__*/ (0, external_react_namespaceObject.forwardRef)((_0, _
488
540
  "style",
489
541
  "children"
490
542
  ]), [ref] = _rest;
491
- const classes = className ? `${Text_css_text({
492
- size,
493
- weight,
494
- align,
495
- color,
496
- truncate
497
- })} ${className}` : Text_css_text({
543
+ var _gradient_deg;
544
+ const themedRef = (0, tokens_namespaceObject.useThemedRef)(ref);
545
+ const normalizedTruncate = true === truncate ? 'end' : false === truncate ? void 0 : truncate;
546
+ const variantArgs = {
498
547
  size,
499
548
  weight,
500
549
  align,
501
550
  color,
502
- truncate
503
- });
551
+ truncate: normalizedTruncate,
552
+ italic,
553
+ textTransform,
554
+ decoration,
555
+ letterSpacing,
556
+ lineHeight,
557
+ textWrap,
558
+ variant
559
+ };
560
+ const classes = className ? `${Text_css_text(variantArgs)} ${className}` : Text_css_text(variantArgs);
504
561
  const spacingStyle = resolveSpacingStyle({
505
562
  m,
506
563
  mt,
@@ -517,10 +574,26 @@ const Text = /*#__PURE__*/ (0, external_react_namespaceObject.forwardRef)((_0, _
517
574
  px,
518
575
  py
519
576
  });
577
+ const inheritStyle = inherit ? {
578
+ fontFamily: 'inherit',
579
+ fontSize: 'inherit',
580
+ fontWeight: 'inherit',
581
+ color: 'inherit',
582
+ lineHeight: 'inherit'
583
+ } : void 0;
584
+ const gradientStyle = 'gradient' === variant && gradient ? {
585
+ backgroundImage: `linear-gradient(${String(null != (_gradient_deg = gradient.deg) ? _gradient_deg : 45)}deg, ${gradient.from}, ${gradient.to})`
586
+ } : void 0;
587
+ const lineClampStyle = void 0 !== lineClamp ? {
588
+ display: '-webkit-box',
589
+ WebkitLineClamp: lineClamp,
590
+ WebkitBoxOrient: 'vertical',
591
+ overflow: 'hidden'
592
+ } : void 0;
520
593
  return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(Component, Text_object_spread_props(Text_object_spread({
521
- ref: ref,
594
+ ref: themedRef,
522
595
  className: classes,
523
- style: Text_object_spread({}, spacingStyle, style)
596
+ style: Text_object_spread({}, spacingStyle, inheritStyle, gradientStyle, lineClampStyle, style)
524
597
  }, rest), {
525
598
  children: children
526
599
  }));
@@ -718,6 +791,7 @@ const Code = /*#__PURE__*/ (0, external_react_namespaceObject.forwardRef)((_0, _
718
791
  "style",
719
792
  "children"
720
793
  ]), [ref] = _rest;
794
+ const themedRef = (0, tokens_namespaceObject.useThemedRef)(ref);
721
795
  const classes = className ? `${code({
722
796
  block
723
797
  })} ${className}` : code({
@@ -740,7 +814,7 @@ const Code = /*#__PURE__*/ (0, external_react_namespaceObject.forwardRef)((_0, _
740
814
  py
741
815
  }), style);
742
816
  if (block) return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("pre", Code_object_spread_props(Code_object_spread({
743
- ref: ref,
817
+ ref: themedRef,
744
818
  className: classes,
745
819
  style: computedStyle
746
820
  }, rest), {
@@ -749,7 +823,7 @@ const Code = /*#__PURE__*/ (0, external_react_namespaceObject.forwardRef)((_0, _
749
823
  })
750
824
  }));
751
825
  return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("code", Code_object_spread_props(Code_object_spread({
752
- ref: ref,
826
+ ref: themedRef,
753
827
  className: classes,
754
828
  style: computedStyle
755
829
  }, rest), {
@@ -843,6 +917,249 @@ const Heading = /*#__PURE__*/ (0, external_react_namespaceObject.forwardRef)((_0
843
917
  });
844
918
  Heading.displayName = 'Heading';
845
919
  const heading_Heading = Heading;
920
+ var mark = 'x8q83o0';
921
+ function Mark_define_property(obj, key, value) {
922
+ if (key in obj) Object.defineProperty(obj, key, {
923
+ value: value,
924
+ enumerable: true,
925
+ configurable: true,
926
+ writable: true
927
+ });
928
+ else obj[key] = value;
929
+ return obj;
930
+ }
931
+ function Mark_object_spread(target) {
932
+ for(var i = 1; i < arguments.length; i++){
933
+ var source = null != arguments[i] ? arguments[i] : {};
934
+ var ownKeys = Object.keys(source);
935
+ if ("function" == typeof Object.getOwnPropertySymbols) ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
936
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
937
+ }));
938
+ ownKeys.forEach(function(key) {
939
+ Mark_define_property(target, key, source[key]);
940
+ });
941
+ }
942
+ return target;
943
+ }
944
+ function Mark_ownKeys(object, enumerableOnly) {
945
+ var keys = Object.keys(object);
946
+ if (Object.getOwnPropertySymbols) {
947
+ var symbols = Object.getOwnPropertySymbols(object);
948
+ if (enumerableOnly) symbols = symbols.filter(function(sym) {
949
+ return Object.getOwnPropertyDescriptor(object, sym).enumerable;
950
+ });
951
+ keys.push.apply(keys, symbols);
952
+ }
953
+ return keys;
954
+ }
955
+ function Mark_object_spread_props(target, source) {
956
+ source = null != source ? source : {};
957
+ if (Object.getOwnPropertyDescriptors) Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
958
+ else Mark_ownKeys(Object(source)).forEach(function(key) {
959
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
960
+ });
961
+ return target;
962
+ }
963
+ function Mark_object_without_properties(source, excluded) {
964
+ if (null == source) return {};
965
+ var target = {}, sourceKeys, key, i;
966
+ if ("u" > typeof Reflect && Reflect.ownKeys) {
967
+ sourceKeys = Reflect.ownKeys(Object(source));
968
+ for(i = 0; i < sourceKeys.length; i++){
969
+ key = sourceKeys[i];
970
+ if (!(excluded.indexOf(key) >= 0)) {
971
+ if (Object.prototype.propertyIsEnumerable.call(source, key)) target[key] = source[key];
972
+ }
973
+ }
974
+ return target;
975
+ }
976
+ target = Mark_object_without_properties_loose(source, excluded);
977
+ if (Object.getOwnPropertySymbols) {
978
+ sourceKeys = Object.getOwnPropertySymbols(source);
979
+ for(i = 0; i < sourceKeys.length; i++){
980
+ key = sourceKeys[i];
981
+ if (!(excluded.indexOf(key) >= 0)) {
982
+ if (Object.prototype.propertyIsEnumerable.call(source, key)) target[key] = source[key];
983
+ }
984
+ }
985
+ }
986
+ return target;
987
+ }
988
+ function Mark_object_without_properties_loose(source, excluded) {
989
+ if (null == source) return {};
990
+ var target = {}, sourceKeys = Object.getOwnPropertyNames(source), key, i;
991
+ for(i = 0; i < sourceKeys.length; i++){
992
+ key = sourceKeys[i];
993
+ if (!(excluded.indexOf(key) >= 0)) {
994
+ if (Object.prototype.propertyIsEnumerable.call(source, key)) target[key] = source[key];
995
+ }
996
+ }
997
+ return target;
998
+ }
999
+ const Mark = /*#__PURE__*/ (0, external_react_namespaceObject.forwardRef)((_0, _1)=>{
1000
+ let _ref = [
1001
+ _0,
1002
+ _1
1003
+ ], [_ref1, ..._rest] = _ref, { m, mt, mr, mb, ml, mx, my, p, pt, pr, pb, pl, px, py, className, style, children } = _ref1, rest = Mark_object_without_properties(_ref1, [
1004
+ "m",
1005
+ "mt",
1006
+ "mr",
1007
+ "mb",
1008
+ "ml",
1009
+ "mx",
1010
+ "my",
1011
+ "p",
1012
+ "pt",
1013
+ "pr",
1014
+ "pb",
1015
+ "pl",
1016
+ "px",
1017
+ "py",
1018
+ "className",
1019
+ "style",
1020
+ "children"
1021
+ ]), [ref] = _rest;
1022
+ const themedRef = (0, tokens_namespaceObject.useThemedRef)(ref);
1023
+ const classes = className ? `${mark} ${className}` : mark;
1024
+ const computedStyle = Mark_object_spread({}, resolveSpacingStyle({
1025
+ m,
1026
+ mt,
1027
+ mr,
1028
+ mb,
1029
+ ml,
1030
+ mx,
1031
+ my,
1032
+ p,
1033
+ pt,
1034
+ pr,
1035
+ pb,
1036
+ pl,
1037
+ px,
1038
+ py
1039
+ }), style);
1040
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("mark", Mark_object_spread_props(Mark_object_spread({
1041
+ ref: themedRef,
1042
+ className: classes,
1043
+ style: computedStyle
1044
+ }, rest), {
1045
+ children: children
1046
+ }));
1047
+ });
1048
+ Mark.displayName = 'Mark';
1049
+ const mark_Mark = Mark;
1050
+ function Highlight_define_property(obj, key, value) {
1051
+ if (key in obj) Object.defineProperty(obj, key, {
1052
+ value: value,
1053
+ enumerable: true,
1054
+ configurable: true,
1055
+ writable: true
1056
+ });
1057
+ else obj[key] = value;
1058
+ return obj;
1059
+ }
1060
+ function Highlight_object_spread(target) {
1061
+ for(var i = 1; i < arguments.length; i++){
1062
+ var source = null != arguments[i] ? arguments[i] : {};
1063
+ var ownKeys = Object.keys(source);
1064
+ if ("function" == typeof Object.getOwnPropertySymbols) ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
1065
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
1066
+ }));
1067
+ ownKeys.forEach(function(key) {
1068
+ Highlight_define_property(target, key, source[key]);
1069
+ });
1070
+ }
1071
+ return target;
1072
+ }
1073
+ function Highlight_ownKeys(object, enumerableOnly) {
1074
+ var keys = Object.keys(object);
1075
+ if (Object.getOwnPropertySymbols) {
1076
+ var symbols = Object.getOwnPropertySymbols(object);
1077
+ if (enumerableOnly) symbols = symbols.filter(function(sym) {
1078
+ return Object.getOwnPropertyDescriptor(object, sym).enumerable;
1079
+ });
1080
+ keys.push.apply(keys, symbols);
1081
+ }
1082
+ return keys;
1083
+ }
1084
+ function Highlight_object_spread_props(target, source) {
1085
+ source = null != source ? source : {};
1086
+ if (Object.getOwnPropertyDescriptors) Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
1087
+ else Highlight_ownKeys(Object(source)).forEach(function(key) {
1088
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
1089
+ });
1090
+ return target;
1091
+ }
1092
+ function Highlight_object_without_properties(source, excluded) {
1093
+ if (null == source) return {};
1094
+ var target = {}, sourceKeys, key, i;
1095
+ if ("u" > typeof Reflect && Reflect.ownKeys) {
1096
+ sourceKeys = Reflect.ownKeys(Object(source));
1097
+ for(i = 0; i < sourceKeys.length; i++){
1098
+ key = sourceKeys[i];
1099
+ if (!(excluded.indexOf(key) >= 0)) {
1100
+ if (Object.prototype.propertyIsEnumerable.call(source, key)) target[key] = source[key];
1101
+ }
1102
+ }
1103
+ return target;
1104
+ }
1105
+ target = Highlight_object_without_properties_loose(source, excluded);
1106
+ if (Object.getOwnPropertySymbols) {
1107
+ sourceKeys = Object.getOwnPropertySymbols(source);
1108
+ for(i = 0; i < sourceKeys.length; i++){
1109
+ key = sourceKeys[i];
1110
+ if (!(excluded.indexOf(key) >= 0)) {
1111
+ if (Object.prototype.propertyIsEnumerable.call(source, key)) target[key] = source[key];
1112
+ }
1113
+ }
1114
+ }
1115
+ return target;
1116
+ }
1117
+ function Highlight_object_without_properties_loose(source, excluded) {
1118
+ if (null == source) return {};
1119
+ var target = {}, sourceKeys = Object.getOwnPropertyNames(source), key, i;
1120
+ for(i = 0; i < sourceKeys.length; i++){
1121
+ key = sourceKeys[i];
1122
+ if (!(excluded.indexOf(key) >= 0)) {
1123
+ if (Object.prototype.propertyIsEnumerable.call(source, key)) target[key] = source[key];
1124
+ }
1125
+ }
1126
+ return target;
1127
+ }
1128
+ const escapeRegExp = (value)=>value.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
1129
+ const Highlight = /*#__PURE__*/ (0, external_react_namespaceObject.forwardRef)((_0, _1)=>{
1130
+ let _ref = [
1131
+ _0,
1132
+ _1
1133
+ ], [_ref1, ..._rest] = _ref, { children, highlight } = _ref1, props = Highlight_object_without_properties(_ref1, [
1134
+ "children",
1135
+ "highlight"
1136
+ ]), [ref] = _rest;
1137
+ const terms = (Array.isArray(highlight) ? highlight : [
1138
+ highlight
1139
+ ]).filter(Boolean);
1140
+ if (0 === terms.length) return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(text_Text, Highlight_object_spread_props(Highlight_object_spread({
1141
+ ref: ref
1142
+ }, props), {
1143
+ children: children
1144
+ }));
1145
+ const lowerTerms = new Set(terms.map((term)=>term.toLowerCase()));
1146
+ const pattern = new RegExp(`(${terms.map(escapeRegExp).join('|')})`, 'gi');
1147
+ const parts = children.split(pattern);
1148
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(text_Text, Highlight_object_spread_props(Highlight_object_spread({
1149
+ ref: ref
1150
+ }, props), {
1151
+ children: parts.map((part, index)=>{
1152
+ const key = `${String(index)}-${part}`;
1153
+ return lowerTerms.has(part.toLowerCase()) ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(mark_Mark, {
1154
+ children: part
1155
+ }, key) : /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_react_namespaceObject.Fragment, {
1156
+ children: part
1157
+ }, key);
1158
+ })
1159
+ }));
1160
+ });
1161
+ Highlight.displayName = 'Highlight';
1162
+ const highlight_Highlight = Highlight;
846
1163
  var kbd = '_18ahdyj0';
847
1164
  function Kbd_define_property(obj, key, value) {
848
1165
  if (key in obj) Object.defineProperty(obj, key, {
@@ -945,6 +1262,7 @@ const Kbd = /*#__PURE__*/ (0, external_react_namespaceObject.forwardRef)((_0, _1
945
1262
  "style",
946
1263
  "children"
947
1264
  ]), [ref] = _rest;
1265
+ const themedRef = (0, tokens_namespaceObject.useThemedRef)(ref);
948
1266
  const classes = className ? `${kbd} ${className}` : kbd;
949
1267
  const computedStyle = Kbd_object_spread({}, resolveSpacingStyle({
950
1268
  m,
@@ -963,7 +1281,7 @@ const Kbd = /*#__PURE__*/ (0, external_react_namespaceObject.forwardRef)((_0, _1
963
1281
  py
964
1282
  }), style);
965
1283
  return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("kbd", Kbd_object_spread_props(Kbd_object_spread({
966
- ref: ref,
1284
+ ref: themedRef,
967
1285
  className: classes,
968
1286
  style: computedStyle
969
1287
  }, rest), {
@@ -1185,6 +1503,235 @@ const Link = /*#__PURE__*/ (0, external_react_namespaceObject.forwardRef)((_0, _
1185
1503
  });
1186
1504
  Link.displayName = 'Link';
1187
1505
  const link_Link = Link;
1506
+ var item = createRuntimeFn({
1507
+ defaultClassName: '_1ohxnc19',
1508
+ variantClassNames: {
1509
+ withIcon: {
1510
+ true: '_1ohxnc1a'
1511
+ },
1512
+ center: {
1513
+ true: '_1ohxnc1b'
1514
+ }
1515
+ },
1516
+ defaultVariants: {},
1517
+ compoundVariants: []
1518
+ });
1519
+ var itemIcon = '_1ohxnc1c';
1520
+ var list = createRuntimeFn({
1521
+ defaultClassName: '_1ohxnc10',
1522
+ variantClassNames: {
1523
+ spacing: {
1524
+ 1: '_1ohxnc11',
1525
+ 2: '_1ohxnc12',
1526
+ 3: '_1ohxnc13',
1527
+ 4: '_1ohxnc14',
1528
+ 5: '_1ohxnc15',
1529
+ 6: '_1ohxnc16'
1530
+ },
1531
+ withPadding: {
1532
+ true: '_1ohxnc17',
1533
+ false: '_1ohxnc18'
1534
+ }
1535
+ },
1536
+ defaultVariants: {
1537
+ spacing: 2,
1538
+ withPadding: true
1539
+ },
1540
+ compoundVariants: []
1541
+ });
1542
+ function List_define_property(obj, key, value) {
1543
+ if (key in obj) Object.defineProperty(obj, key, {
1544
+ value: value,
1545
+ enumerable: true,
1546
+ configurable: true,
1547
+ writable: true
1548
+ });
1549
+ else obj[key] = value;
1550
+ return obj;
1551
+ }
1552
+ function List_object_spread(target) {
1553
+ for(var i = 1; i < arguments.length; i++){
1554
+ var source = null != arguments[i] ? arguments[i] : {};
1555
+ var ownKeys = Object.keys(source);
1556
+ if ("function" == typeof Object.getOwnPropertySymbols) ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
1557
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
1558
+ }));
1559
+ ownKeys.forEach(function(key) {
1560
+ List_define_property(target, key, source[key]);
1561
+ });
1562
+ }
1563
+ return target;
1564
+ }
1565
+ function List_ownKeys(object, enumerableOnly) {
1566
+ var keys = Object.keys(object);
1567
+ if (Object.getOwnPropertySymbols) {
1568
+ var symbols = Object.getOwnPropertySymbols(object);
1569
+ if (enumerableOnly) symbols = symbols.filter(function(sym) {
1570
+ return Object.getOwnPropertyDescriptor(object, sym).enumerable;
1571
+ });
1572
+ keys.push.apply(keys, symbols);
1573
+ }
1574
+ return keys;
1575
+ }
1576
+ function List_object_spread_props(target, source) {
1577
+ source = null != source ? source : {};
1578
+ if (Object.getOwnPropertyDescriptors) Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
1579
+ else List_ownKeys(Object(source)).forEach(function(key) {
1580
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
1581
+ });
1582
+ return target;
1583
+ }
1584
+ function List_object_without_properties(source, excluded) {
1585
+ if (null == source) return {};
1586
+ var target = {}, sourceKeys, key, i;
1587
+ if ("u" > typeof Reflect && Reflect.ownKeys) {
1588
+ sourceKeys = Reflect.ownKeys(Object(source));
1589
+ for(i = 0; i < sourceKeys.length; i++){
1590
+ key = sourceKeys[i];
1591
+ if (!(excluded.indexOf(key) >= 0)) {
1592
+ if (Object.prototype.propertyIsEnumerable.call(source, key)) target[key] = source[key];
1593
+ }
1594
+ }
1595
+ return target;
1596
+ }
1597
+ target = List_object_without_properties_loose(source, excluded);
1598
+ if (Object.getOwnPropertySymbols) {
1599
+ sourceKeys = Object.getOwnPropertySymbols(source);
1600
+ for(i = 0; i < sourceKeys.length; i++){
1601
+ key = sourceKeys[i];
1602
+ if (!(excluded.indexOf(key) >= 0)) {
1603
+ if (Object.prototype.propertyIsEnumerable.call(source, key)) target[key] = source[key];
1604
+ }
1605
+ }
1606
+ }
1607
+ return target;
1608
+ }
1609
+ function List_object_without_properties_loose(source, excluded) {
1610
+ if (null == source) return {};
1611
+ var target = {}, sourceKeys = Object.getOwnPropertyNames(source), key, i;
1612
+ for(i = 0; i < sourceKeys.length; i++){
1613
+ key = sourceKeys[i];
1614
+ if (!(excluded.indexOf(key) >= 0)) {
1615
+ if (Object.prototype.propertyIsEnumerable.call(source, key)) target[key] = source[key];
1616
+ }
1617
+ }
1618
+ return target;
1619
+ }
1620
+ const ListContext = /*#__PURE__*/ (0, external_react_namespaceObject.createContext)({});
1621
+ const ListRoot = /*#__PURE__*/ (0, external_react_namespaceObject.forwardRef)((_0, _1)=>{
1622
+ let _ref = [
1623
+ _0,
1624
+ _1
1625
+ ], [_ref1, ..._rest] = _ref, { type = 'unordered', spacing, withPadding, icon, center, m, mt, mr, mb, ml, mx, my, p, pt, pr, pb, pl, px, py, className, style, children } = _ref1, rest = List_object_without_properties(_ref1, [
1626
+ "type",
1627
+ "spacing",
1628
+ "withPadding",
1629
+ "icon",
1630
+ "center",
1631
+ "m",
1632
+ "mt",
1633
+ "mr",
1634
+ "mb",
1635
+ "ml",
1636
+ "mx",
1637
+ "my",
1638
+ "p",
1639
+ "pt",
1640
+ "pr",
1641
+ "pb",
1642
+ "pl",
1643
+ "px",
1644
+ "py",
1645
+ "className",
1646
+ "style",
1647
+ "children"
1648
+ ]), [ref] = _rest;
1649
+ const themedRef = (0, tokens_namespaceObject.useThemedRef)(ref);
1650
+ const classes = className ? `${list({
1651
+ spacing,
1652
+ withPadding
1653
+ })} ${className}` : list({
1654
+ spacing,
1655
+ withPadding
1656
+ });
1657
+ const computedStyle = List_object_spread({}, resolveSpacingStyle({
1658
+ m,
1659
+ mt,
1660
+ mr,
1661
+ mb,
1662
+ ml,
1663
+ mx,
1664
+ my,
1665
+ p,
1666
+ pt,
1667
+ pr,
1668
+ pb,
1669
+ pl,
1670
+ px,
1671
+ py
1672
+ }), style);
1673
+ const contextValue = {
1674
+ icon,
1675
+ center
1676
+ };
1677
+ if ('ordered' === type) return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(ListContext.Provider, {
1678
+ value: contextValue,
1679
+ children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("ol", List_object_spread_props(List_object_spread({
1680
+ ref: themedRef,
1681
+ className: classes,
1682
+ style: computedStyle
1683
+ }, rest), {
1684
+ children: children
1685
+ }))
1686
+ });
1687
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(ListContext.Provider, {
1688
+ value: contextValue,
1689
+ children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("ul", List_object_spread_props(List_object_spread({
1690
+ ref: themedRef,
1691
+ className: classes,
1692
+ style: computedStyle
1693
+ }, rest), {
1694
+ children: children
1695
+ }))
1696
+ });
1697
+ });
1698
+ ListRoot.displayName = 'List';
1699
+ const ListItem = /*#__PURE__*/ (0, external_react_namespaceObject.forwardRef)((_0, _1)=>{
1700
+ let _ref = [
1701
+ _0,
1702
+ _1
1703
+ ], [_ref1, ..._rest] = _ref, { icon, className, children } = _ref1, rest = List_object_without_properties(_ref1, [
1704
+ "icon",
1705
+ "className",
1706
+ "children"
1707
+ ]), [ref] = _rest;
1708
+ const context = (0, external_react_namespaceObject.useContext)(ListContext);
1709
+ const resolvedIcon = null != icon ? icon : context.icon;
1710
+ const classes = className ? `${item({
1711
+ withIcon: Boolean(resolvedIcon),
1712
+ center: context.center
1713
+ })} ${className}` : item({
1714
+ withIcon: Boolean(resolvedIcon),
1715
+ center: context.center
1716
+ });
1717
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("li", List_object_spread_props(List_object_spread({
1718
+ ref: ref,
1719
+ className: classes
1720
+ }, rest), {
1721
+ children: [
1722
+ resolvedIcon ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
1723
+ className: itemIcon,
1724
+ children: resolvedIcon
1725
+ }) : null,
1726
+ children
1727
+ ]
1728
+ }));
1729
+ });
1730
+ ListItem.displayName = 'ListItem';
1731
+ const List = Object.assign(ListRoot, {
1732
+ Item: ListItem
1733
+ });
1734
+ const list_List = List;
1188
1735
  const box_namespaceObject = require("@vinyasa/layout/box");
1189
1736
  var box_default = /*#__PURE__*/ __webpack_require__.n(box_namespaceObject);
1190
1737
  const external_react_markdown_namespaceObject = require("react-markdown");
@@ -1366,27 +1913,56 @@ const MarkdownRenderer = /*#__PURE__*/ (0, external_react_namespaceObject.forwar
1366
1913
  });
1367
1914
  MarkdownRenderer.displayName = 'MarkdownRenderer';
1368
1915
  const markdown_renderer_MarkdownRenderer = MarkdownRenderer;
1916
+ const checkOverflow = (element)=>element.scrollWidth > element.clientWidth || element.scrollHeight > element.clientHeight;
1917
+ const useIsTruncated = (deps = [])=>{
1918
+ const ref = (0, external_react_namespaceObject.useRef)(null);
1919
+ const [isTruncated, setIsTruncated] = (0, external_react_namespaceObject.useState)(false);
1920
+ (0, external_react_namespaceObject.useLayoutEffect)(()=>{
1921
+ const element = ref.current;
1922
+ if (!element) return;
1923
+ setIsTruncated(checkOverflow(element));
1924
+ const observer = new ResizeObserver(()=>{
1925
+ setIsTruncated(checkOverflow(element));
1926
+ });
1927
+ observer.observe(element);
1928
+ return ()=>{
1929
+ observer.disconnect();
1930
+ };
1931
+ }, deps);
1932
+ return [
1933
+ ref,
1934
+ isTruncated
1935
+ ];
1936
+ };
1369
1937
  exports.Blockquote = __webpack_exports__.Blockquote;
1370
1938
  exports.Caption = __webpack_exports__.Caption;
1371
1939
  exports.Code = __webpack_exports__.Code;
1372
1940
  exports.Heading = __webpack_exports__.Heading;
1941
+ exports.Highlight = __webpack_exports__.Highlight;
1373
1942
  exports.Kbd = __webpack_exports__.Kbd;
1374
1943
  exports.Label = __webpack_exports__.Label;
1375
1944
  exports.Link = __webpack_exports__.Link;
1945
+ exports.List = __webpack_exports__.List;
1946
+ exports.Mark = __webpack_exports__.Mark;
1376
1947
  exports.MarkdownRenderer = __webpack_exports__.MarkdownRenderer;
1377
1948
  exports.Paragraph = __webpack_exports__.Paragraph;
1378
1949
  exports.Text = __webpack_exports__.Text;
1950
+ exports.useIsTruncated = __webpack_exports__.useIsTruncated;
1379
1951
  for(var __rspack_i in __webpack_exports__)if (-1 === [
1380
1952
  "Blockquote",
1381
1953
  "Caption",
1382
1954
  "Code",
1383
1955
  "Heading",
1956
+ "Highlight",
1384
1957
  "Kbd",
1385
1958
  "Label",
1386
1959
  "Link",
1960
+ "List",
1961
+ "Mark",
1387
1962
  "MarkdownRenderer",
1388
1963
  "Paragraph",
1389
- "Text"
1964
+ "Text",
1965
+ "useIsTruncated"
1390
1966
  ].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
1391
1967
  Object.defineProperty(exports, '__esModule', {
1392
1968
  value: true