@teambit/react.ui.component-highlighter 0.1.0 → 0.2.1
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.
- package/children-highlighter/children-highlighter.composition.tsx +9 -8
- package/dist/children-highlighter/children-highlighter.composition.js +13 -5
- package/dist/children-highlighter/children-highlighter.composition.js.map +1 -1
- package/dist/element-highlighter/element-highlighter.compositions.js +5 -1
- package/dist/element-highlighter/element-highlighter.compositions.js.map +1 -1
- package/dist/element-highlighter/element-highlighter.module.scss +1 -3
- package/dist/frame/frame.js +22 -16
- package/dist/frame/frame.js.map +1 -1
- package/dist/hover-highlighter/hover-highlighter.compositions.js +5 -1
- package/dist/hover-highlighter/hover-highlighter.compositions.js.map +1 -1
- package/dist/hover-highlighter/use-hover-highlighter.d.ts +3 -3
- package/dist/hybrid-highlighter/hybrid-highlighter.js +5 -1
- package/dist/hybrid-highlighter/hybrid-highlighter.js.map +1 -1
- package/dist/label/component-strip.compositions.d.ts +2 -0
- package/dist/label/component-strip.compositions.js +17 -0
- package/dist/label/component-strip.compositions.js.map +1 -0
- package/dist/label/component-strip.js +12 -6
- package/dist/label/component-strip.js.map +1 -1
- package/dist/label/component-strip.module.scss +19 -0
- package/dist/label/label-container.js +7 -2
- package/dist/label/label-container.js.map +1 -1
- package/dist/label/label.js +5 -1
- package/dist/label/label.js.map +1 -1
- package/dist/mock-component.d.ts +1 -0
- package/dist/mock-component.js +9 -1
- package/dist/mock-component.js.map +1 -1
- package/dist/preview-1671357904502.js +10 -0
- package/dist/tsconfig.json +32 -0
- package/element-highlighter/element-highlighter.module.scss +1 -3
- package/frame/frame.tsx +24 -14
- package/label/component-strip.compositions.tsx +13 -0
- package/label/component-strip.module.scss +19 -0
- package/label/component-strip.tsx +7 -5
- package/label/label-container.tsx +3 -1
- package/mock-component.tsx +7 -0
- package/package-tar/teambit-react.ui.component-highlighter-0.2.1.tgz +0 -0
- package/package.json +20 -51
- package/tsconfig.json +8 -2
- package/package-tar/teambit-react.ui.component-highlighter-0.1.0.tgz +0 -0
- package/preview-1649170982547.js +0 -2
|
@@ -57,10 +57,12 @@ export const ChildrenHighlighterInsideIgnore = () => {
|
|
|
57
57
|
};
|
|
58
58
|
|
|
59
59
|
export const ChildrenHighlighterWithRule = () => {
|
|
60
|
+
const rule = '#someSubTree *';
|
|
61
|
+
|
|
60
62
|
return (
|
|
61
|
-
<ChildrenHighlighter rule=
|
|
63
|
+
<ChildrenHighlighter rule={rule} style={{ minWidth: 300, fontFamily: 'sans-serif' }}>
|
|
62
64
|
<div>
|
|
63
|
-
element filter: <code>"
|
|
65
|
+
element filter: <code>"{rule}"</code>
|
|
64
66
|
</div>
|
|
65
67
|
<br />
|
|
66
68
|
<MockedComponentWithMeta>no highlighter</MockedComponentWithMeta>
|
|
@@ -75,20 +77,19 @@ export const ChildrenHighlighterWithRule = () => {
|
|
|
75
77
|
};
|
|
76
78
|
|
|
77
79
|
export const ChildrenHighlighterWithComponentRule = () => {
|
|
80
|
+
const filterTarget = 'teambit.design/ui/mock-target';
|
|
81
|
+
|
|
78
82
|
return (
|
|
79
|
-
<ChildrenHighlighter
|
|
80
|
-
componentRule="teambit.design/ui/icon-button"
|
|
81
|
-
style={{ minWidth: 300, fontFamily: 'sans-serif' }}
|
|
82
|
-
>
|
|
83
|
+
<ChildrenHighlighter componentRule={filterTarget} style={{ minWidth: 300, fontFamily: 'sans-serif' }}>
|
|
83
84
|
<div>
|
|
84
|
-
component filter: <code>"
|
|
85
|
+
component filter: <code>"{filterTarget}"</code>
|
|
85
86
|
</div>
|
|
86
87
|
<br />
|
|
87
88
|
<MockedComponentWithMeta>no highlighter</MockedComponentWithMeta>
|
|
88
89
|
<br />
|
|
89
90
|
<br />
|
|
90
91
|
<br />
|
|
91
|
-
<MockTarget>this will be highlighted</MockTarget>
|
|
92
|
+
<MockTarget style={{ display: 'inline-block', margin: '0 8px' }}>this will be highlighted</MockTarget>
|
|
92
93
|
</ChildrenHighlighter>
|
|
93
94
|
);
|
|
94
95
|
};
|
|
@@ -49,10 +49,14 @@ const ChildrenHighlighterInsideIgnore = () => {
|
|
|
49
49
|
};
|
|
50
50
|
exports.ChildrenHighlighterInsideIgnore = ChildrenHighlighterInsideIgnore;
|
|
51
51
|
const ChildrenHighlighterWithRule = () => {
|
|
52
|
-
|
|
52
|
+
const rule = '#someSubTree *';
|
|
53
|
+
return (react_1.default.createElement(children_highlighter_1.ChildrenHighlighter, { rule: rule, style: { minWidth: 300, fontFamily: 'sans-serif' } },
|
|
53
54
|
react_1.default.createElement("div", null,
|
|
54
55
|
"element filter: ",
|
|
55
|
-
react_1.default.createElement("code", null,
|
|
56
|
+
react_1.default.createElement("code", null,
|
|
57
|
+
"\"",
|
|
58
|
+
rule,
|
|
59
|
+
"\"")),
|
|
56
60
|
react_1.default.createElement("br", null),
|
|
57
61
|
react_1.default.createElement(react_ui_highlighter_component_metadata_bit_component_meta_1.MockedComponentWithMeta, null, "no highlighter"),
|
|
58
62
|
react_1.default.createElement("br", null),
|
|
@@ -63,16 +67,20 @@ const ChildrenHighlighterWithRule = () => {
|
|
|
63
67
|
};
|
|
64
68
|
exports.ChildrenHighlighterWithRule = ChildrenHighlighterWithRule;
|
|
65
69
|
const ChildrenHighlighterWithComponentRule = () => {
|
|
66
|
-
|
|
70
|
+
const filterTarget = 'teambit.design/ui/mock-target';
|
|
71
|
+
return (react_1.default.createElement(children_highlighter_1.ChildrenHighlighter, { componentRule: filterTarget, style: { minWidth: 300, fontFamily: 'sans-serif' } },
|
|
67
72
|
react_1.default.createElement("div", null,
|
|
68
73
|
"component filter: ",
|
|
69
|
-
react_1.default.createElement("code", null,
|
|
74
|
+
react_1.default.createElement("code", null,
|
|
75
|
+
"\"",
|
|
76
|
+
filterTarget,
|
|
77
|
+
"\"")),
|
|
70
78
|
react_1.default.createElement("br", null),
|
|
71
79
|
react_1.default.createElement(react_ui_highlighter_component_metadata_bit_component_meta_1.MockedComponentWithMeta, null, "no highlighter"),
|
|
72
80
|
react_1.default.createElement("br", null),
|
|
73
81
|
react_1.default.createElement("br", null),
|
|
74
82
|
react_1.default.createElement("br", null),
|
|
75
|
-
react_1.default.createElement(mock_component_1.MockTarget,
|
|
83
|
+
react_1.default.createElement(mock_component_1.MockTarget, { style: { display: 'inline-block', margin: '0 8px' } }, "this will be highlighted")));
|
|
76
84
|
};
|
|
77
85
|
exports.ChildrenHighlighterWithComponentRule = ChildrenHighlighterWithComponentRule;
|
|
78
86
|
// export const HighlightingAllElementsInTheEnterprisePage = () => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"children-highlighter.composition.js","sourceRoot":"","sources":["../../children-highlighter/children-highlighter.composition.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,sFAAsF;AACtF,oJAA8G;AAC9G,8DAA2D;AAC3D,iEAA6D;AAC7D,sDAA+C;AAExC,MAAM,0BAA0B,GAAG,GAAG,EAAE;IAC7C,OAAO;IACL,sEAAsE;IACtE,8BAAC,0CAAmB,IAAC,KAAK,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,QAAQ,EAAE,GAAG,EAAE,UAAU,EAAE,YAAY,EAAE;QAClF,8BAAC,oFAAuB,oBAAoC;QAC5D,yCAAM;QACN,yCAAM;QACN,yCAAM;QACN,yCAAM;QACN,8BAAC,oFAAuB,oBAAoC,CACxC,CACvB,CAAC;AACJ,CAAC,CAAC;AAZW,QAAA,0BAA0B,8BAYrC;AAEK,MAAM,mCAAmC,GAAG,GAAG,EAAE;IACtD,OAAO,CACL,8BAAC,0CAAmB,IAClB,KAAK,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,QAAQ,EAAE,GAAG,EAAE,KAAK,EAAE,QAAQ,EAAE,UAAU,EAAE,YAAY,EAAE,EAChF,OAAO,EAAC,gBAAgB,EACxB,YAAY,EAAC,MAAM,EACnB,aAAa,EAAC,eAAe;QAE7B,8BAAC,oFAAuB,qBAAqC;QAC7D,yCAAM;QACN,yCAAM;QACN,yCAAM;QACN,8BAAC,oFAAuB,oBAAoC,CACxC,CACvB,CAAC;AACJ,CAAC,CAAC;AAfW,QAAA,mCAAmC,uCAe9C;AAEK,MAAM,+BAA+B,GAAG,GAAG,EAAE;IAClD,OAAO,CACL,8BAAC,uCAAkB;QACjB,8BAAC,0CAAmB,IAAC,KAAK,EAAE,EAAE,UAAU,EAAE,YAAY,EAAE;;YACN,4CAAO,sBAAsB,CAAQ;YACrF,yCAAM;;YAEN,yCAAM;YACN,yCAAM;YACN,yCAAM;YACN,8BAAC,oFAAuB,qBAAqC;YAC7D,yCAAM;YACN,yCAAM;YACN,yCAAM;YACN,8BAAC,oFAAuB,oBAAoC,CACxC,CACH,CACtB,CAAC;AACJ,CAAC,CAAC;AAlBW,QAAA,+BAA+B,mCAkB1C;AAEK,MAAM,2BAA2B,GAAG,GAAG,EAAE;IAC9C,OAAO,CACL,8BAAC,0CAAmB,IAAC,IAAI,
|
|
1
|
+
{"version":3,"file":"children-highlighter.composition.js","sourceRoot":"","sources":["../../children-highlighter/children-highlighter.composition.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,sFAAsF;AACtF,oJAA8G;AAC9G,8DAA2D;AAC3D,iEAA6D;AAC7D,sDAA+C;AAExC,MAAM,0BAA0B,GAAG,GAAG,EAAE;IAC7C,OAAO;IACL,sEAAsE;IACtE,8BAAC,0CAAmB,IAAC,KAAK,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,QAAQ,EAAE,GAAG,EAAE,UAAU,EAAE,YAAY,EAAE;QAClF,8BAAC,oFAAuB,oBAAoC;QAC5D,yCAAM;QACN,yCAAM;QACN,yCAAM;QACN,yCAAM;QACN,8BAAC,oFAAuB,oBAAoC,CACxC,CACvB,CAAC;AACJ,CAAC,CAAC;AAZW,QAAA,0BAA0B,8BAYrC;AAEK,MAAM,mCAAmC,GAAG,GAAG,EAAE;IACtD,OAAO,CACL,8BAAC,0CAAmB,IAClB,KAAK,EAAE,EAAE,OAAO,EAAE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Y,GAAG,+BAA+B,CAAC;IAErD,OAAO,CACL,8BAAC,0CAAmB,IAAC,aAAa,EAAE,YAAY,EAAE,KAAK,EAAE,EAAE,QAAQ,EAAE,GAAG,EAAE,UAAU,EAAE,YAAY,EAAE;QAClG;;YACoB;;gBAAQ,YAAY;qBAAS,CAC3C;QACN,yCAAM;QACN,8BAAC,oFAAuB,yBAAyC;QACjE,yCAAM;QACN,yCAAM;QACN,yCAAM;QACN,8BAAC,2BAAU,IAAC,KAAK,EAAE,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,EAAE,OAAO,EAAE,+BAAuC,CAClF,CACvB,CAAC;AACJ,CAAC,CAAC;AAhBW,QAAA,oCAAoC,wCAgB/C;AAEF,oEAAoE;AACpE,aAAa;AACb,4BAA4B;AAC5B,uDAAuD;AACvD,6BAA6B;AAC7B,OAAO;AACP,KAAK"}
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"element-highlighter.compositions.js","sourceRoot":"","sources":["../../element-highlighter/element-highlighter.compositions.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"element-highlighter.compositions.js","sourceRoot":"","sources":["../../element-highlighter/element-highlighter.compositions.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,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AO,UAAU,GAAK,YAAY,CAAC,IAAI,YAE1D;YACN,8BAAC,wCAAkB,IAAC,SAAS,EAAE,QAAQ,EAAE,UAAU,EAAE,CAAC,2BAAU,CAAC,EAAE,WAAW,SAAG;YACjF,8BAAC,wCAAkB,IAAC,SAAS,EAAE,QAAQ,EAAE,UAAU,EAAE,CAAC,2BAAU,CAAC,EAAE,WAAW,SAAG;YACjF,8BAAC,wCAAkB,IAAC,SAAS,EAAE,QAAQ,EAAE,UAAU,EAAE,CAAC,2BAAU,CAAC,EAAE,WAAW,SAAG;YACjF,8BAAC,wCAAkB,IAAC,SAAS,EAAE,QAAQ,EAAE,UAAU,EAAE,CAAC,2BAAU,CAAC,EAAE,WAAW,SAAG,CAC7E,CACF,CACP,CAAC;AACJ,CAAC;AA5BD,8CA4BC"}
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
@import '~@teambit/ui-foundation.ui.constants.z-indexes/z-indexes.module.scss';
|
|
2
|
-
|
|
3
1
|
.label {
|
|
4
2
|
// space between the label and the target
|
|
5
3
|
// keep this space so users can move their cursor in this space.
|
|
@@ -8,5 +6,5 @@
|
|
|
8
6
|
|
|
9
7
|
.frame,
|
|
10
8
|
.label {
|
|
11
|
-
z-index: $highlighter-z-index;
|
|
9
|
+
z-index: 15500 // $highlighter-z-index;
|
|
12
10
|
}
|
package/dist/frame/frame.js
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
@@ -41,13 +45,11 @@ const MARGIN_FROM_TARGET = +frame_module_scss_1.default.offset || 6; // setting
|
|
|
41
45
|
/** min. distance from the edge of the screen. */
|
|
42
46
|
const MARGIN_FROM_DOC_EDGE = 0;
|
|
43
47
|
const overflowParameters = { rootBoundary: 'document', padding: MARGIN_FROM_DOC_EDGE };
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
// y - height - vertical (main axis)
|
|
48
|
+
const SHIFT_POSITIVE = 'shiftPositive';
|
|
49
|
+
const HAS_RESIZE_OBSERVER = typeof window !== 'undefined' && !!window.ResizeObserver;
|
|
47
50
|
function Frame({ targetRef, watchMotion, className, stylesClass = frame_module_scss_1.default.overlayBorder, style }) {
|
|
48
51
|
var _a;
|
|
49
52
|
const dimensionRef = (0, react_1.useRef)({ width: 0, height: 0 });
|
|
50
|
-
const shiftRef = (0, react_1.useRef)();
|
|
51
53
|
const { x, y, strategy, reference, floating, update, refs, middlewareData } = (0, react_dom_1.useFloating)({
|
|
52
54
|
placement: 'bottom-start',
|
|
53
55
|
middleware: [
|
|
@@ -61,7 +63,7 @@ function Frame({ targetRef, watchMotion, className, stylesClass = frame_module_s
|
|
|
61
63
|
},
|
|
62
64
|
},
|
|
63
65
|
// reposition x,y, to the top of the reference
|
|
64
|
-
(0, react_dom_1.offset)((
|
|
66
|
+
(0, react_dom_1.offset)(({ rects }) => -rects.reference.height),
|
|
65
67
|
// offset the frame by its extra padding
|
|
66
68
|
(0, react_dom_1.offset)(() => ({ mainAxis: -MARGIN_FROM_TARGET, crossAxis: -MARGIN_FROM_TARGET })),
|
|
67
69
|
// pushes the frame into the document. Similar to shift(), but only pushes when coods are negative
|
|
@@ -77,7 +79,6 @@ function Frame({ targetRef, watchMotion, className, stylesClass = frame_module_s
|
|
|
77
79
|
x: nextCoords.x - args.x,
|
|
78
80
|
y: nextCoords.y - args.y,
|
|
79
81
|
};
|
|
80
|
-
shiftRef.current = shiftAmount;
|
|
81
82
|
return Object.assign(Object.assign({}, nextCoords), { data: shiftAmount });
|
|
82
83
|
}),
|
|
83
84
|
},
|
|
@@ -86,15 +87,20 @@ function Frame({ targetRef, watchMotion, className, stylesClass = frame_module_s
|
|
|
86
87
|
// apply overflow detection in reference to the document
|
|
87
88
|
rootBoundary: 'document',
|
|
88
89
|
padding: MARGIN_FROM_DOC_EDGE,
|
|
89
|
-
apply({
|
|
90
|
-
|
|
91
|
-
const paddingX = 2 * MARGIN_FROM_TARGET -
|
|
92
|
-
const paddingY = 2 * MARGIN_FROM_TARGET -
|
|
93
|
-
|
|
94
|
-
width:
|
|
95
|
-
height:
|
|
90
|
+
apply({ elements, rects, availableHeight, availableWidth, middlewareData }) {
|
|
91
|
+
const shift = middlewareData[SHIFT_POSITIVE] || { x: 0, y: 0 };
|
|
92
|
+
const paddingX = 2 * MARGIN_FROM_TARGET - shift.x;
|
|
93
|
+
const paddingY = 2 * MARGIN_FROM_TARGET - shift.y;
|
|
94
|
+
const dimensions = {
|
|
95
|
+
width: rects.reference.width + paddingX,
|
|
96
|
+
height: rects.reference.height + paddingY,
|
|
97
|
+
maxWidth: availableWidth,
|
|
98
|
+
maxHeight: availableHeight,
|
|
96
99
|
};
|
|
97
|
-
|
|
100
|
+
// per floating-ui docs, apply styles directly during apply()
|
|
101
|
+
Object.assign(elements.floating.style, dimensions);
|
|
102
|
+
// also store in reference, so react renders will have the same value
|
|
103
|
+
dimensionRef.current = dimensions;
|
|
98
104
|
},
|
|
99
105
|
}),
|
|
100
106
|
(0, react_dom_1.hide)({ strategy: 'referenceHidden' }),
|
|
@@ -107,7 +113,7 @@ function Frame({ targetRef, watchMotion, className, stylesClass = frame_module_s
|
|
|
107
113
|
// automatically update on scroll, resize, etc.
|
|
108
114
|
// `watchMotion` will trigger continuous updates using animation frame
|
|
109
115
|
(0, react_1.useEffect)(() => {
|
|
110
|
-
if (!refs.reference.current || !refs.floating.current)
|
|
116
|
+
if (!refs.reference.current || !refs.floating.current || !HAS_RESIZE_OBSERVER)
|
|
111
117
|
return () => { };
|
|
112
118
|
return (0, react_dom_1.autoUpdate)(refs.reference.current, refs.floating.current, update, { animationFrame: watchMotion });
|
|
113
119
|
}, [refs.reference.current, refs.floating.current, update, watchMotion]);
|
package/dist/frame/frame.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"frame.js","sourceRoot":"","sources":["../../frame/frame.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"frame.js","sourceRoot":"","sources":["../../frame/frame.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAA4F;AAC5F,4DAAoC;AACpC,sDAAqG;AAGrG,4EAAyC;AAEzC,sCAAsC;AACtC,MAAM,kBAAkB,GAAG,CAAC,2BAAM,CAAC,MAAM,IAAI,CAAC,CAAC,CAAC,gCAAgC;AAChF,iDAAiD;AACjD,MAAM,oBAAoB,GAAG,CAAC,CAAC;AAE/B,MAAM,kBAAkB,GAAG,EAAE,YAAY,EAAE,UAAU,EAAE,OAAO,EAAE,oBAAoB,EAAW,CAAC;AAChG,MAAM,cAAc,GAAG,eAAe,CAAC;AAEvC,MAAM,mBAAmB,GAAG,OAAO,MAAM,KAAK,WAAW,IAAI,CAAC,CAAC,MAAM,CAAC,cAAc,CAAC;AAoBrF,SAAgB,KAAK,CAAC,EAAE,SAAS,EAAE,WAAW,EAAE,SAAS,EAAE,WAAW,GAAG,2BAAM,CAAC,aAAa,EAAE,KAAK,EAAc;;IAChH,MAAM,YAAY,GAAG,IAAA,cAAM,EAAkB,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,CAAC,CAAC;IAEtE,MAAM,EAAE,CAAC,EAAE,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,cAAc,EAAE,GAAG,IAAA,uBAAW,EAAC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
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hover-highlighter.compositions.js","sourceRoot":"","sources":["../../hover-highlighter/hover-highlighter.compositions.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"hover-highlighter.compositions.js","sourceRoot":"","sources":["../../hover-highlighter/hover-highlighter.compositions.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAmD;AACnD,2DAAuD;AACvD,sDAA2D;AAC3D,8DAA8D;AAEvD,MAAM,gBAAgB,GAAG,GAAG,EAAE;IACnC,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,IAAA,gBAAQ,EAAU,KAAK,CAAC,CAAC;IAEzD,OAAO,CACL,uCAAK,KAAK,EAAE,EAAE,OAAO,EAAE,qBAAqB,EAAE,QAAQ,EAAE,GAAG,EAAE,UAAU,EAAE,YAAY,EAAE;QACrF,8BAAC,oCAAgB,IAAC,KAAK,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,EAAE,QAAQ,EAAE,QAAQ;YAC1D;gBACE,yCAAM;gBACN;oBACE,8BAAC,2BAAU,IAAC,OAAO,EAAE,GAAG,EAAE,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,iBAAyB,CACtE;gBACN;oBACG,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG;;oBAAkB,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,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AO,CACrE,CACI,CACf,CACP,CAAC;AACJ,CAAC,CAAC;AAhBW,QAAA,mBAAmB,uBAgB9B"}
|
|
@@ -16,10 +16,10 @@ export declare type useHoverHighlighterOptions = {
|
|
|
16
16
|
};
|
|
17
17
|
/** fires onChange when targeting a new component */
|
|
18
18
|
export declare function useHoverHighlighter<T extends HTMLElement = HTMLElement>(onChange: (target?: HighlightTarget) => void, props: React.HTMLAttributes<T>, { debounceDuration, scopeClass, disabled, rule, componentRule }: useHoverHighlighterOptions): {
|
|
19
|
-
onMouseOver: (event: React.MouseEvent<T, MouseEvent>) => void;
|
|
20
|
-
onMouseLeave: (event: React.MouseEvent<T, MouseEvent>) => void;
|
|
21
|
-
} | {
|
|
22
19
|
onMouseOver?: undefined;
|
|
23
20
|
onMouseLeave?: undefined;
|
|
21
|
+
} | {
|
|
22
|
+
onMouseOver: (event: React.MouseEvent<T, MouseEvent>) => void;
|
|
23
|
+
onMouseLeave: (event: React.MouseEvent<T, MouseEvent>) => void;
|
|
24
24
|
};
|
|
25
25
|
export {};
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hybrid-highlighter.js","sourceRoot":"","sources":["../../hybrid-highlighter/hybrid-highlighter.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"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|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.ComponentStripPreview = void 0;
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
8
|
+
const component_strip_1 = require("./component-strip");
|
|
9
|
+
const mock_component_1 = require("../mock-component");
|
|
10
|
+
const ComponentStripPreview = () => {
|
|
11
|
+
return (react_1.default.createElement("div", { style: { fontFamily: 'sans-serif', padding: 8 } },
|
|
12
|
+
react_1.default.createElement(component_strip_1.ComponentStrip, { component: mock_component_1.MockSnap }),
|
|
13
|
+
react_1.default.createElement("br", null),
|
|
14
|
+
react_1.default.createElement(component_strip_1.ComponentStrip, { component: mock_component_1.MockButton })));
|
|
15
|
+
};
|
|
16
|
+
exports.ComponentStripPreview = ComponentStripPreview;
|
|
17
|
+
//# sourceMappingURL=component-strip.compositions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"component-strip.compositions.js","sourceRoot":"","sources":["../../label/component-strip.compositions.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,uDAAmD;AACnD,sDAAyD;AAElD,MAAM,qBAAqB,GAAG,GAAG,EAAE;IACxC,OAAO,CACL,uCAAK,KAAK,EAAE,EAAE,UAAU,EAAE,YAAY,EAAE,OAAO,EAAE,CAAC,EAAE;QAClD,8BAAC,gCAAc,IAAC,SAAS,EAAE,yBAAQ,GAAI;QACvC,yCAAM;QACN,8BAAC,gCAAc,IAAC,SAAS,EAAE,2BAAU,GAAI,CACrC,CACP,CAAC;AACJ,CAAC,CAAC;AARW,QAAA,qBAAqB,yBAQhC"}
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
@@ -37,14 +41,16 @@ exports.ComponentStrip = (0, react_1.forwardRef)(function ComponentStrip({ compo
|
|
|
37
41
|
return (react_1.default.createElement("div", { className: component_strip_module_scss_1.default.componentStrip, ref: ref },
|
|
38
42
|
!parsedId && react_1.default.createElement(LabelBlock, { link: homepage }, id),
|
|
39
43
|
parsedId && react_1.default.createElement(LabelBlock, { link: component_modules_component_url_1.ScopeUrl.toUrl(parsedId.scope) }, parsedId.scope),
|
|
40
|
-
parsedId && (react_1.default.createElement(LabelBlock, { link: componentLink },
|
|
41
|
-
parsedId.fullName,
|
|
42
|
-
parsedId.version && parsedId.version !== 'latest' &&
|
|
44
|
+
parsedId && (react_1.default.createElement(LabelBlock, { link: componentLink, className: component_strip_module_scss_1.default.nameBlock },
|
|
45
|
+
react_1.default.createElement("span", null, parsedId.fullName),
|
|
46
|
+
parsedId.version && parsedId.version !== 'latest' && (react_1.default.createElement("span", { className: component_strip_module_scss_1.default.version },
|
|
47
|
+
"@",
|
|
48
|
+
parsedId.version)))),
|
|
43
49
|
children));
|
|
44
50
|
});
|
|
45
|
-
function LabelBlock({ link, children }) {
|
|
51
|
+
function LabelBlock({ link, children, className }) {
|
|
46
52
|
const Comp = link ? base_ui_routing_native_link_1.NativeLink : 'span';
|
|
47
|
-
return (react_1.default.createElement(Comp, { href: link, external: !!link }, children));
|
|
53
|
+
return (react_1.default.createElement(Comp, { href: link, external: !!link, className: className }, children));
|
|
48
54
|
}
|
|
49
55
|
function extractMetadata(metadata) {
|
|
50
56
|
if (typeof metadata === 'string') {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component-strip.js","sourceRoot":"","sources":["../../label/component-strip.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"component-strip.js","sourceRoot":"","sources":["../../label/component-strip.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAA4E;AAC5E,sFAAkE;AAClE,wDAAoD;AACpD,8FAAoE;AACpE,oJAI6E;AAC7E,gGAAmD;AACnD,mCAA4C;AAK/B,QAAA,cAAc,GAAG,IAAA,kBAAU,EAAC,SAAS,cAAc,CAC9D,EAAE,SAAS,EAAE,QAAQ,EAAuB,EAC5C,GAAiC;IAEjC,MAAM,EAAE,EAAE,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAAG,eAAe,CAAC,SAAS,CAAC,CAAC;IAE9D,MAAM,QAAQ,GAAG,IAAA,eAAO,EAAC,GAAG,EAAE,CAAC,0BAAW,CAAC,aAAa,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;IACpE,MAAM,aAAa,GAAG,QAAQ,IAAI,IAAA,yBAAiB,EAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;IAExE,OAAO,CACL,uCAAK,SAAS,EAAE,qCAAM,CAAC,cAAc,EAAE,GAAG,EAAE,GAAG;QAC5C,CAAC,QAAQ,IAAI,8BAAC,UAAU,IAAC,IAAI,EAAE,QAAQ,IAAG,EAAE,CAAc;QAC1D,QAAQ,IAAI,8BAAC,UAAU,IAAC,IAAI,EAAE,0CAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAG,QAAQ,CAAC,KAAK,CAAc;QAC3F,QAAQ,IAAI,CACX,8BAAC,UAAU,IAAC,IAAI,EAAE,aAAa,EAAE,SAAS,EAAE,qCAAM,CAAC,SAAS;YAC1D,4CAAO,QAAQ,CAAC,QAAQ,CAAQ;YAC/B,QAAQ,CAAC,OAAO,IAAI,QAAQ,CAAC,OAAO,KAAK,QAAQ,IAAI,CACpD,wCAAM,SAAS,EAAE,qCAAM,CAAC,OAAO;;gBAAI,QAAQ,CAAC,OAAO,CAAQ,CAC5D,CACU,CACd;QACA,QAAQ,CACL,CACP,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,SAAS,UAAU,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAA8D;IAC3G,MAAM,IAAI,GAAG,IAAI,CAAC,CAAC,CAAC,wCAAU,CAAC,CAAC,CAAC,MAAM,CAAC;IACxC,OAAO,CACL,8BAAC,IAAI,IAAC,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,CAAC,IAAI,EAAE,SAAS,EAAE,SAAS,IACrD,QAAQ,CACJ,CACR,CAAC;AACJ,CAAC;AAED,SAAS,eAAe,CAAC,QAAsC;IAC7D,IAAI,OAAO,QAAQ,KAAK,QAAQ,EAAE;QAChC,OAAO,EAAE,EAAE,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;KACzC;IAED,OAAO,QAAQ,CAAC,+EAAkB,CAAC,CAAC;AACtC,CAAC"}
|
|
@@ -7,6 +7,7 @@ $gap: 0.125em;
|
|
|
7
7
|
|
|
8
8
|
border-radius: $borderRadius;
|
|
9
9
|
box-shadow: var(--bit-highlighter-shadow);
|
|
10
|
+
white-space: nowrap;
|
|
10
11
|
|
|
11
12
|
> * {
|
|
12
13
|
padding: 0 0.5em;
|
|
@@ -47,3 +48,21 @@ $gap: 0.125em;
|
|
|
47
48
|
}
|
|
48
49
|
}
|
|
49
50
|
}
|
|
51
|
+
|
|
52
|
+
.nameBlock {
|
|
53
|
+
display: flex;
|
|
54
|
+
|
|
55
|
+
.version {
|
|
56
|
+
// leave room for 9 digits + 3 "."
|
|
57
|
+
max-width: 13ch;
|
|
58
|
+
overflow: hidden;
|
|
59
|
+
text-overflow: ellipsis;
|
|
60
|
+
white-space: nowrap;
|
|
61
|
+
|
|
62
|
+
transition: max-width 480ms;
|
|
63
|
+
|
|
64
|
+
&:hover {
|
|
65
|
+
max-width: 61ch;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
@@ -39,6 +43,7 @@ const classnames_1 = __importDefault(require("classnames"));
|
|
|
39
43
|
const lodash_compact_1 = __importDefault(require("lodash.compact"));
|
|
40
44
|
const react_dom_1 = require("@floating-ui/react-dom");
|
|
41
45
|
const label_module_scss_1 = __importDefault(require("./label.module.scss"));
|
|
46
|
+
const HAS_RESIZE_OBSERVER = typeof window !== 'undefined' && !!window.ResizeObserver;
|
|
42
47
|
function LabelContainer(_a) {
|
|
43
48
|
var _b;
|
|
44
49
|
var { targetRef, offset, placement, flip = true, watchMotion, className, style } = _a, rest = __rest(_a, ["targetRef", "offset", "placement", "flip", "watchMotion", "className", "style"]);
|
|
@@ -58,7 +63,7 @@ function LabelContainer(_a) {
|
|
|
58
63
|
// automatically update on scroll, resize, etc.
|
|
59
64
|
// `watchMotion` will trigger continuous updates using animation frame
|
|
60
65
|
(0, react_1.useEffect)(() => {
|
|
61
|
-
if (!refs.reference.current || !refs.floating.current)
|
|
66
|
+
if (!refs.reference.current || !refs.floating.current || !HAS_RESIZE_OBSERVER)
|
|
62
67
|
return () => { };
|
|
63
68
|
return (0, react_dom_1.autoUpdate)(refs.reference.current, refs.floating.current, update, { animationFrame: !!watchMotion });
|
|
64
69
|
}, [refs.reference.current, refs.floating.current, update, watchMotion]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"label-container.js","sourceRoot":"","sources":["../../label/label-container.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"label-container.js","sourceRoot":"","sources":["../../label/label-container.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAqE;AACrE,4DAAoC;AACpC,oEAAqC;AACrC,sDAOgC;AAEhC,4EAAyC;AAEzC,MAAM,mBAAmB,GAAG,OAAO,MAAM,KAAK,WAAW,IAAI,CAAC,CAAC,MAAM,CAAC,cAAc,CAAC;AAarF,SAAgB,cAAc,CAAC,EAST;;QATS,EAC7B,SAAS,EACT,MAAM,EACN,SAAS,EACT,IAAI,GAAG,IAAI,EACX,WAAW,EACX,SAAS,EACT,KAAK,OAEe,EADjB,IAAI,cARsB,iFAS9B,CADQ;IAEP,MAAM,EAAE,CAAC,EAAE,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,EAAE,cAAc,EAAE,GAAG,IAAA,uBAAW,EAAC;QACxF,SAAS;QACT,UAAU,EAAE,IAAA,wBAAO,EAAC;YAClB,MAAM,IAAI,IAAA,kBAAgB,EAAC,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC;YACzE,IAAI,IAAI,IAAA,gBAAc,GAAE;YACxB,4GAA4G;YAC5G,IAAA,iBAAK,EAAC,EAAE,YAAY,EAAE,UAAU,EAAE,QAAQ,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;YACpE,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,iBAAiB,EAAE,CAAC;SACtC,CAAC;KACH,CAAC,CAAC;IAEH,IAAA,uBAAe,EAA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(Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
package/dist/label/label.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"label.js","sourceRoot":"","sources":["../../label/label.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"label.js","sourceRoot":"","sources":["../../label/label.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAmD;AACnD,4DAAoC;AAGpC,4EAAyC;AACzC,uDAAmD;AACnD,yDAA2D;AAM3D,SAAgB,KAAK,CAAC,EAAoC;QAApC,EAAE,UAAU,OAAwB,EAAnB,KAAK,cAAtB,cAAwB,CAAF;IAC1C,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,IAAA,gBAAQ,EAAC,KAAK,CAAC,CAAC;IAChD,MAAM,IAAI,GAAG,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC;IACxC,IAAI,CAAC,IAAI;QAAE,OAAO,IAAI,CAAC;IAEvB,MAAM,OAAO,GAAG,UAAU,CAAC,MAAM,GAAG,CAAC,CAAC;IAEtC,+BAA+B;IAC/B,IAAA,iBAAS,EAAC,GAAG,EAAE;QACb,WAAW,CAAC,KAAK,CAAC,CAAC;IACrB,CAAC,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC;IAEjB,OAAO,CACL,8BAAC,wCAAqB,IAAC,UAAU,EAAE,UAAU,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAC,cAAc;QACxF,8BAAC,gCAAc,oBAAK,KAAK,IAAE,SAAS,EAAE,IAAI,KACvC,OAAO,IAAI,CACV,wCACE,SAAS,EAAE,IAAA,oBAAU,EAAC,2BAAM,CAAC,aAAa,EAAE,QAAQ,IAAI,2BAAM,CAAC,MAAM,CAAC,EACtE,OAAO,EAAE,GAAG,EAAE,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,GACrC,CACH,CACc,CACK,CACzB,CAAC;AACJ,CAAC;AAxBD,sBAwBC"}
|
package/dist/mock-component.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import { ButtonHTMLAttributes, HTMLAttributes } from 'react';
|
|
2
2
|
export declare function MockTarget({ children, ...rest }: HTMLAttributes<HTMLDivElement>): JSX.Element;
|
|
3
3
|
export declare function MockButton({ children, ...rest }: ButtonHTMLAttributes<HTMLButtonElement>): JSX.Element;
|
|
4
|
+
export declare function MockSnap({ children, ...rest }: ButtonHTMLAttributes<HTMLButtonElement>): JSX.Element;
|
package/dist/mock-component.js
CHANGED
|
@@ -14,7 +14,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
14
14
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.MockButton = exports.MockTarget = void 0;
|
|
17
|
+
exports.MockSnap = exports.MockButton = exports.MockTarget = void 0;
|
|
18
18
|
const react_1 = __importDefault(require("react"));
|
|
19
19
|
const react_ui_highlighter_component_metadata_bit_component_meta_1 = require("@teambit/react.ui.highlighter.component-metadata.bit-component-meta");
|
|
20
20
|
function MockTarget(_a) {
|
|
@@ -33,4 +33,12 @@ exports.MockButton = MockButton;
|
|
|
33
33
|
MockButton[react_ui_highlighter_component_metadata_bit_component_meta_1.componentMetaField] = {
|
|
34
34
|
id: 'teambit.design/ui/icon-button@1.6.2',
|
|
35
35
|
};
|
|
36
|
+
function MockSnap(_a) {
|
|
37
|
+
var { children } = _a, rest = __rest(_a, ["children"]);
|
|
38
|
+
return react_1.default.createElement("button", Object.assign({}, rest), children);
|
|
39
|
+
}
|
|
40
|
+
exports.MockSnap = MockSnap;
|
|
41
|
+
MockSnap[react_ui_highlighter_component_metadata_bit_component_meta_1.componentMetaField] = {
|
|
42
|
+
id: 'teambit.design/ui/icon-button@a21594d5cc63fd24d2b4763fa7d817b131f0edbb',
|
|
43
|
+
};
|
|
36
44
|
//# sourceMappingURL=mock-component.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mock-component.js","sourceRoot":"","sources":["../mock-component.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,kDAAoE;AACpE,oJAAwH;AAExH,SAAgB,UAAU,CAAC,EAAqD;QAArD,EAAE,QAAQ,OAA2C,EAAtC,IAAI,cAAnB,YAAqB,CAAF;IAC5C,OAAO,uDAAS,IAAI,GAAG,QAAQ,CAAO,CAAC;AACzC,CAAC;AAFD,gCAEC;AACD,UAAU,CAAC,+EAAkB,CAAC,GAAG;IAC/B,EAAE,EAAE,qCAAqC;CACzB,CAAC;AAEnB,SAAgB,UAAU,CAAC,EAA8D;QAA9D,EAAE,QAAQ,OAAoD,EAA/C,IAAI,cAAnB,YAAqB,CAAF;IAC5C,OAAO,0DAAY,IAAI,GAAG,QAAQ,CAAU,CAAC;AAC/C,CAAC;AAFD,gCAEC;AACD,UAAU,CAAC,+EAAkB,CAAC,GAAG;IAC/B,EAAE,EAAE,qCAAqC;CACzB,CAAC"}
|
|
1
|
+
{"version":3,"file":"mock-component.js","sourceRoot":"","sources":["../mock-component.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,kDAAoE;AACpE,oJAAwH;AAExH,SAAgB,UAAU,CAAC,EAAqD;QAArD,EAAE,QAAQ,OAA2C,EAAtC,IAAI,cAAnB,YAAqB,CAAF;IAC5C,OAAO,uDAAS,IAAI,GAAG,QAAQ,CAAO,CAAC;AACzC,CAAC;AAFD,gCAEC;AACD,UAAU,CAAC,+EAAkB,CAAC,GAAG;IAC/B,EAAE,EAAE,qCAAqC;CACzB,CAAC;AAEnB,SAAgB,UAAU,CAAC,EAA8D;QAA9D,EAAE,QAAQ,OAAoD,EAA/C,IAAI,cAAnB,YAAqB,CAAF;IAC5C,OAAO,0DAAY,IAAI,GAAG,QAAQ,CAAU,CAAC;AAC/C,CAAC;AAFD,gCAEC;AACD,UAAU,CAAC,+EAAkB,CAAC,GAAG;IAC/B,EAAE,EAAE,qCAAqC;CACzB,CAAC;AAEnB,SAAgB,QAAQ,CAAC,EAA8D;QAA9D,EAAE,QAAQ,OAAoD,EAA/C,IAAI,cAAnB,YAAqB,CAAF;IAC1C,OAAO,0DAAY,IAAI,GAAG,QAAQ,CAAU,CAAC;AAC/C,CAAC;AAFD,4BAEC;AACD,QAAQ,CAAC,+EAAkB,CAAC,GAAG;IAC7B,EAAE,EAAE,wEAAwE;CAC5D,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as compositions_0 from '/Users/oded/Library/Caches/Bit/capsules/d327b0874e033264587c9ef867c8edb13e956f80/teambit.react_ui_component-highlighter@0.2.1/dist/children-highlighter/children-highlighter.composition.js';
|
|
2
|
+
import * as compositions_1 from '/Users/oded/Library/Caches/Bit/capsules/d327b0874e033264587c9ef867c8edb13e956f80/teambit.react_ui_component-highlighter@0.2.1/dist/element-highlighter/element-highlighter.compositions.js';
|
|
3
|
+
import * as compositions_2 from '/Users/oded/Library/Caches/Bit/capsules/d327b0874e033264587c9ef867c8edb13e956f80/teambit.react_ui_component-highlighter@0.2.1/dist/hover-highlighter/hover-highlighter.compositions.js';
|
|
4
|
+
import * as compositions_3 from '/Users/oded/Library/Caches/Bit/capsules/d327b0874e033264587c9ef867c8edb13e956f80/teambit.react_ui_component-highlighter@0.2.1/dist/label/component-strip.compositions.js';
|
|
5
|
+
import * as overview_0 from '/Users/oded/Library/Caches/Bit/capsules/d327b0874e033264587c9ef867c8edb13e956f80/teambit.react_ui_component-highlighter@0.2.1/dist/component-highlighter.docs.md';
|
|
6
|
+
|
|
7
|
+
export const compositions = [compositions_0, compositions_1, compositions_2, compositions_3];
|
|
8
|
+
export const overview = [overview_0];
|
|
9
|
+
|
|
10
|
+
export const compositions_metadata = {"compositions":[{"displayName":"Children highlighter preview","identifier":"ChildrenHighlighterPreview"},{"displayName":"Children highlighter with custom colors","identifier":"ChildrenHighlighterWithCustomColors"},{"displayName":"Children highlighter inside ignore","identifier":"ChildrenHighlighterInsideIgnore"},{"displayName":"Children highlighter with rule","identifier":"ChildrenHighlighterWithRule"},{"displayName":"Children highlighter with component rule","identifier":"ChildrenHighlighterWithComponentRule"},{"displayName":"Highlighted element","identifier":"HighlightedElement"},{"displayName":"Customized","identifier":"Customized"},{"displayName":"Sizes","identifier":"Sizes"},{"displayName":"Moving element","identifier":"MovingElement"},{"displayName":"Fullscreen element","identifier":"FullscreenElement"},{"displayName":"Offscreen elements","identifier":"OffscreenElements"},{"displayName":"Show when hovering","identifier":"ShowWhenHovering"},{"displayName":"Unmounting element","identifier":"UnmountingElement"},{"displayName":"Hover exclusion zones","identifier":"HoverExclusionZones"},{"displayName":"Component strip preview","identifier":"ComponentStripPreview"}]};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"lib": [
|
|
4
|
+
"es2019",
|
|
5
|
+
"DOM",
|
|
6
|
+
"ES6",
|
|
7
|
+
"DOM.Iterable"
|
|
8
|
+
],
|
|
9
|
+
"target": "es2015",
|
|
10
|
+
"module": "CommonJS",
|
|
11
|
+
"jsx": "react",
|
|
12
|
+
"allowJs": true,
|
|
13
|
+
"composite": true,
|
|
14
|
+
"declaration": true,
|
|
15
|
+
"sourceMap": true,
|
|
16
|
+
"skipLibCheck": true,
|
|
17
|
+
"experimentalDecorators": true,
|
|
18
|
+
"outDir": "dist",
|
|
19
|
+
"moduleResolution": "node",
|
|
20
|
+
"esModuleInterop": true,
|
|
21
|
+
"rootDir": ".",
|
|
22
|
+
"resolveJsonModule": true
|
|
23
|
+
},
|
|
24
|
+
"exclude": [
|
|
25
|
+
"dist",
|
|
26
|
+
"package.json"
|
|
27
|
+
],
|
|
28
|
+
"include": [
|
|
29
|
+
"**/*",
|
|
30
|
+
"**/*.json"
|
|
31
|
+
]
|
|
32
|
+
}
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
@import '~@teambit/ui-foundation.ui.constants.z-indexes/z-indexes.module.scss';
|
|
2
|
-
|
|
3
1
|
.label {
|
|
4
2
|
// space between the label and the target
|
|
5
3
|
// keep this space so users can move their cursor in this space.
|
|
@@ -8,5 +6,5 @@
|
|
|
8
6
|
|
|
9
7
|
.frame,
|
|
10
8
|
.label {
|
|
11
|
-
z-index: $highlighter-z-index;
|
|
9
|
+
z-index: 15500 // $highlighter-z-index;
|
|
12
10
|
}
|
package/frame/frame.tsx
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { useEffect, useLayoutEffect, useRef, RefObject } from 'react';
|
|
1
|
+
import React, { useEffect, useLayoutEffect, useRef, RefObject, CSSProperties } from 'react';
|
|
2
2
|
import classnames from 'classnames';
|
|
3
3
|
import { useFloating, autoUpdate, offset, size, detectOverflow, hide } from '@floating-ui/react-dom';
|
|
4
4
|
import type { Coords } from '@floating-ui/react-dom';
|
|
@@ -11,6 +11,9 @@ const MARGIN_FROM_TARGET = +styles.offset || 6; // setting fallback 6, for tests
|
|
|
11
11
|
const MARGIN_FROM_DOC_EDGE = 0;
|
|
12
12
|
|
|
13
13
|
const overflowParameters = { rootBoundary: 'document', padding: MARGIN_FROM_DOC_EDGE } as const;
|
|
14
|
+
const SHIFT_POSITIVE = 'shiftPositive';
|
|
15
|
+
|
|
16
|
+
const HAS_RESIZE_OBSERVER = typeof window !== 'undefined' && !!window.ResizeObserver;
|
|
14
17
|
|
|
15
18
|
export interface FrameProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
16
19
|
/** apply the frame to this element */
|
|
@@ -28,9 +31,10 @@ export interface FrameProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
28
31
|
// x - width - horizontal (cross axis)
|
|
29
32
|
// y - height - vertical (main axis)
|
|
30
33
|
|
|
34
|
+
type DimensionsStyle = Pick<CSSProperties, 'width' | 'height' | 'maxWidth' | 'maxHeight'>;
|
|
35
|
+
|
|
31
36
|
export function Frame({ targetRef, watchMotion, className, stylesClass = styles.overlayBorder, style }: FrameProps) {
|
|
32
|
-
const dimensionRef = useRef({ width: 0, height: 0 });
|
|
33
|
-
const shiftRef = useRef<Coords | undefined>();
|
|
37
|
+
const dimensionRef = useRef<DimensionsStyle>({ width: 0, height: 0 });
|
|
34
38
|
|
|
35
39
|
const { x, y, strategy, reference, floating, update, refs, middlewareData } = useFloating({
|
|
36
40
|
placement: 'bottom-start',
|
|
@@ -50,7 +54,7 @@ export function Frame({ targetRef, watchMotion, className, stylesClass = styles.
|
|
|
50
54
|
},
|
|
51
55
|
},
|
|
52
56
|
// reposition x,y, to the top of the reference
|
|
53
|
-
offset((
|
|
57
|
+
offset(({ rects }) => -rects.reference.height),
|
|
54
58
|
// offset the frame by its extra padding
|
|
55
59
|
offset(() => ({ mainAxis: -MARGIN_FROM_TARGET, crossAxis: -MARGIN_FROM_TARGET })),
|
|
56
60
|
// pushes the frame into the document. Similar to shift(), but only pushes when coods are negative
|
|
@@ -68,7 +72,6 @@ export function Frame({ targetRef, watchMotion, className, stylesClass = styles.
|
|
|
68
72
|
y: nextCoords.y - args.y,
|
|
69
73
|
};
|
|
70
74
|
|
|
71
|
-
shiftRef.current = shiftAmount;
|
|
72
75
|
return {
|
|
73
76
|
...nextCoords,
|
|
74
77
|
data: shiftAmount,
|
|
@@ -80,16 +83,23 @@ export function Frame({ targetRef, watchMotion, className, stylesClass = styles.
|
|
|
80
83
|
// apply overflow detection in reference to the document
|
|
81
84
|
rootBoundary: 'document',
|
|
82
85
|
padding: MARGIN_FROM_DOC_EDGE,
|
|
83
|
-
apply({
|
|
84
|
-
const
|
|
85
|
-
const
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
86
|
+
apply({ elements, rects, availableHeight, availableWidth, middlewareData }) {
|
|
87
|
+
const shift: Coords = middlewareData[SHIFT_POSITIVE] || { x: 0, y: 0 };
|
|
88
|
+
const paddingX = 2 * MARGIN_FROM_TARGET - shift.x;
|
|
89
|
+
const paddingY = 2 * MARGIN_FROM_TARGET - shift.y;
|
|
90
|
+
|
|
91
|
+
const dimensions: DimensionsStyle = {
|
|
92
|
+
width: rects.reference.width + paddingX,
|
|
93
|
+
height: rects.reference.height + paddingY,
|
|
94
|
+
maxWidth: availableWidth,
|
|
95
|
+
maxHeight: availableHeight,
|
|
90
96
|
};
|
|
91
97
|
|
|
92
|
-
|
|
98
|
+
// per floating-ui docs, apply styles directly during apply()
|
|
99
|
+
Object.assign(elements.floating.style, dimensions);
|
|
100
|
+
|
|
101
|
+
// also store in reference, so react renders will have the same value
|
|
102
|
+
dimensionRef.current = dimensions;
|
|
93
103
|
},
|
|
94
104
|
}),
|
|
95
105
|
hide({ strategy: 'referenceHidden' }),
|
|
@@ -104,7 +114,7 @@ export function Frame({ targetRef, watchMotion, className, stylesClass = styles.
|
|
|
104
114
|
// automatically update on scroll, resize, etc.
|
|
105
115
|
// `watchMotion` will trigger continuous updates using animation frame
|
|
106
116
|
useEffect(() => {
|
|
107
|
-
if (!refs.reference.current || !refs.floating.current) return () => {};
|
|
117
|
+
if (!refs.reference.current || !refs.floating.current || !HAS_RESIZE_OBSERVER) return () => {};
|
|
108
118
|
|
|
109
119
|
return autoUpdate(refs.reference.current, refs.floating.current, update, { animationFrame: watchMotion });
|
|
110
120
|
}, [refs.reference.current, refs.floating.current, update, watchMotion]);
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ComponentStrip } from './component-strip';
|
|
3
|
+
import { MockButton, MockSnap } from '../mock-component';
|
|
4
|
+
|
|
5
|
+
export const ComponentStripPreview = () => {
|
|
6
|
+
return (
|
|
7
|
+
<div style={{ fontFamily: 'sans-serif', padding: 8 }}>
|
|
8
|
+
<ComponentStrip component={MockSnap} />
|
|
9
|
+
<br />
|
|
10
|
+
<ComponentStrip component={MockButton} />
|
|
11
|
+
</div>
|
|
12
|
+
);
|
|
13
|
+
};
|
|
@@ -7,6 +7,7 @@ $gap: 0.125em;
|
|
|
7
7
|
|
|
8
8
|
border-radius: $borderRadius;
|
|
9
9
|
box-shadow: var(--bit-highlighter-shadow);
|
|
10
|
+
white-space: nowrap;
|
|
10
11
|
|
|
11
12
|
> * {
|
|
12
13
|
padding: 0 0.5em;
|
|
@@ -47,3 +48,21 @@ $gap: 0.125em;
|
|
|
47
48
|
}
|
|
48
49
|
}
|
|
49
50
|
}
|
|
51
|
+
|
|
52
|
+
.nameBlock {
|
|
53
|
+
display: flex;
|
|
54
|
+
|
|
55
|
+
.version {
|
|
56
|
+
// leave room for 9 digits + 3 "."
|
|
57
|
+
max-width: 13ch;
|
|
58
|
+
overflow: hidden;
|
|
59
|
+
text-overflow: ellipsis;
|
|
60
|
+
white-space: nowrap;
|
|
61
|
+
|
|
62
|
+
transition: max-width 480ms;
|
|
63
|
+
|
|
64
|
+
&:hover {
|
|
65
|
+
max-width: 61ch;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
@@ -27,9 +27,11 @@ export const ComponentStrip = forwardRef(function ComponentStrip(
|
|
|
27
27
|
{!parsedId && <LabelBlock link={homepage}>{id}</LabelBlock>}
|
|
28
28
|
{parsedId && <LabelBlock link={ScopeUrl.toUrl(parsedId.scope)}>{parsedId.scope}</LabelBlock>}
|
|
29
29
|
{parsedId && (
|
|
30
|
-
<LabelBlock link={componentLink}>
|
|
31
|
-
{parsedId.fullName}
|
|
32
|
-
{parsedId.version && parsedId.version !== 'latest' &&
|
|
30
|
+
<LabelBlock link={componentLink} className={styles.nameBlock}>
|
|
31
|
+
<span>{parsedId.fullName}</span>
|
|
32
|
+
{parsedId.version && parsedId.version !== 'latest' && (
|
|
33
|
+
<span className={styles.version}>@{parsedId.version}</span>
|
|
34
|
+
)}
|
|
33
35
|
</LabelBlock>
|
|
34
36
|
)}
|
|
35
37
|
{children}
|
|
@@ -37,10 +39,10 @@ export const ComponentStrip = forwardRef(function ComponentStrip(
|
|
|
37
39
|
);
|
|
38
40
|
});
|
|
39
41
|
|
|
40
|
-
function LabelBlock({ link, children }: { link?: string; children: ReactNode }) {
|
|
42
|
+
function LabelBlock({ link, children, className }: { link?: string; children: ReactNode; className?: string }) {
|
|
41
43
|
const Comp = link ? NativeLink : 'span';
|
|
42
44
|
return (
|
|
43
|
-
<Comp href={link} external={!!link}>
|
|
45
|
+
<Comp href={link} external={!!link} className={className}>
|
|
44
46
|
{children}
|
|
45
47
|
</Comp>
|
|
46
48
|
);
|
|
@@ -12,6 +12,8 @@ import {
|
|
|
12
12
|
import type { Placement } from '@floating-ui/react-dom';
|
|
13
13
|
import styles from './label.module.scss';
|
|
14
14
|
|
|
15
|
+
const HAS_RESIZE_OBSERVER = typeof window !== 'undefined' && !!window.ResizeObserver;
|
|
16
|
+
|
|
15
17
|
export interface LabelContainerProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
16
18
|
targetRef: RefObject<HTMLElement | null>;
|
|
17
19
|
offset?: [number, number];
|
|
@@ -51,7 +53,7 @@ export function LabelContainer({
|
|
|
51
53
|
// automatically update on scroll, resize, etc.
|
|
52
54
|
// `watchMotion` will trigger continuous updates using animation frame
|
|
53
55
|
useEffect(() => {
|
|
54
|
-
if (!refs.reference.current || !refs.floating.current) return () => {};
|
|
56
|
+
if (!refs.reference.current || !refs.floating.current || !HAS_RESIZE_OBSERVER) return () => {};
|
|
55
57
|
|
|
56
58
|
return autoUpdate(refs.reference.current, refs.floating.current, update, { animationFrame: !!watchMotion });
|
|
57
59
|
}, [refs.reference.current, refs.floating.current, update, watchMotion]);
|
package/mock-component.tsx
CHANGED
|
@@ -14,3 +14,10 @@ export function MockButton({ children, ...rest }: ButtonHTMLAttributes<HTMLButto
|
|
|
14
14
|
MockButton[componentMetaField] = {
|
|
15
15
|
id: 'teambit.design/ui/icon-button@1.6.2',
|
|
16
16
|
} as ComponentMeta;
|
|
17
|
+
|
|
18
|
+
export function MockSnap({ children, ...rest }: ButtonHTMLAttributes<HTMLButtonElement>) {
|
|
19
|
+
return <button {...rest}>{children}</button>;
|
|
20
|
+
}
|
|
21
|
+
MockSnap[componentMetaField] = {
|
|
22
|
+
id: 'teambit.design/ui/icon-button@a21594d5cc63fd24d2b4763fa7d817b131f0edbb',
|
|
23
|
+
} as ComponentMeta;
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,79 +1,48 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teambit/react.ui.component-highlighter",
|
|
3
|
-
"version": "0.1
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"homepage": "https://bit.dev/teambit/react/ui/component-highlighter",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"componentId": {
|
|
7
7
|
"scope": "teambit.react",
|
|
8
8
|
"name": "ui/component-highlighter",
|
|
9
|
-
"version": "0.1
|
|
9
|
+
"version": "0.2.1"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"get-xpath": "3.0.1",
|
|
13
|
-
"classnames": "2.3.1",
|
|
14
|
-
"
|
|
15
|
-
"uuid": "3.4.0",
|
|
16
|
-
"
|
|
17
|
-
"lodash.compact": "3.0.1",
|
|
18
|
-
"url-join": "^4.0.
|
|
12
|
+
"get-xpath": "^3.0.1",
|
|
13
|
+
"classnames": "^2.3.1",
|
|
14
|
+
"use-debounce": "^8.0.1",
|
|
15
|
+
"uuid": "^3.4.0",
|
|
16
|
+
"@floating-ui/react-dom": "0.7.2",
|
|
17
|
+
"lodash.compact": "^3.0.1",
|
|
18
|
+
"url-join": "^4.0.1",
|
|
19
19
|
"@tippyjs/react": "4.2.0",
|
|
20
20
|
"core-js": "^3.0.0",
|
|
21
21
|
"@teambit/react.ui.highlighter.component-metadata.bit-component-meta": "0.0.21",
|
|
22
22
|
"@teambit/component-id": "0.0.402",
|
|
23
|
-
"@teambit/
|
|
23
|
+
"@teambit/react.modules.dom-to-react": "0.2.0",
|
|
24
|
+
"@teambit/react.ui.hover-selector": "0.2.0",
|
|
24
25
|
"@teambit/base-ui.routing.native-link": "1.0.0",
|
|
25
|
-
"@teambit/component.modules.component-url": "0.0.124"
|
|
26
|
-
"@teambit/react.modules.dom-to-react": "0.1.0",
|
|
27
|
-
"@teambit/react.ui.hover-selector": "0.1.0"
|
|
26
|
+
"@teambit/component.modules.component-url": "0.0.124"
|
|
28
27
|
},
|
|
29
28
|
"devDependencies": {
|
|
30
|
-
"@
|
|
29
|
+
"@types/react": "^17.0.8",
|
|
30
|
+
"@testing-library/react": "^12.1.5",
|
|
31
|
+
"@types/react-dom": "^17.0.5",
|
|
31
32
|
"@types/uuid": "3.4.9",
|
|
32
33
|
"@types/lodash.compact": "3.0.6",
|
|
33
34
|
"@types/url-join": "^4.0.0",
|
|
34
35
|
"@types/mocha": "9.1.0",
|
|
35
|
-
"@types/
|
|
36
|
-
"@babel/runtime": "7.12.18",
|
|
36
|
+
"@types/node": "12.20.4",
|
|
37
37
|
"@types/jest": "^26.0.0",
|
|
38
|
-
"@
|
|
39
|
-
"@types/
|
|
40
|
-
"@types/node": "12.20.4"
|
|
38
|
+
"@babel/runtime": "7.20.0",
|
|
39
|
+
"@types/testing-library__jest-dom": "5.9.5"
|
|
41
40
|
},
|
|
42
41
|
"peerDependencies": {
|
|
43
|
-
"
|
|
44
|
-
"
|
|
45
|
-
"react-dom": "^16.8.0 || ^17.0.0",
|
|
46
|
-
"react": "^16.8.0 || ^17.0.0"
|
|
42
|
+
"react": "^16.8.0 || ^17.0.0",
|
|
43
|
+
"react-dom": "^16.8.0 || ^17.0.0"
|
|
47
44
|
},
|
|
48
45
|
"license": "Apache-2.0",
|
|
49
|
-
"bit": {
|
|
50
|
-
"bindingPrefix": "@teambit",
|
|
51
|
-
"env": {},
|
|
52
|
-
"overrides": {
|
|
53
|
-
"dependencies": {
|
|
54
|
-
"@teambit/legacy": "-",
|
|
55
|
-
"core-js": "^3.0.0",
|
|
56
|
-
"react-dom": "-",
|
|
57
|
-
"react": "-"
|
|
58
|
-
},
|
|
59
|
-
"devDependencies": {
|
|
60
|
-
"@teambit/legacy": "-",
|
|
61
|
-
"@types/mocha": "9.1.0",
|
|
62
|
-
"@types/testing-library__jest-dom": "5.9.5",
|
|
63
|
-
"@babel/runtime": "7.12.18",
|
|
64
|
-
"@types/jest": "^26.0.0",
|
|
65
|
-
"@types/react-dom": "^17.0.5",
|
|
66
|
-
"@types/react": "^17.0.8",
|
|
67
|
-
"@types/node": "12.20.4",
|
|
68
|
-
"react-dom": "-",
|
|
69
|
-
"react": "-"
|
|
70
|
-
},
|
|
71
|
-
"peerDependencies": {
|
|
72
|
-
"react-dom": "^16.8.0 || ^17.0.0",
|
|
73
|
-
"react": "^16.8.0 || ^17.0.0"
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
},
|
|
77
46
|
"private": false,
|
|
78
47
|
"repository": {
|
|
79
48
|
"type": "git",
|
package/tsconfig.json
CHANGED
|
@@ -7,13 +7,14 @@
|
|
|
7
7
|
"DOM.Iterable"
|
|
8
8
|
],
|
|
9
9
|
"target": "es2015",
|
|
10
|
-
"module": "
|
|
10
|
+
"module": "CommonJS",
|
|
11
11
|
"jsx": "react",
|
|
12
12
|
"allowJs": true,
|
|
13
13
|
"composite": true,
|
|
14
14
|
"declaration": true,
|
|
15
15
|
"sourceMap": true,
|
|
16
16
|
"skipLibCheck": true,
|
|
17
|
+
"experimentalDecorators": true,
|
|
17
18
|
"outDir": "dist",
|
|
18
19
|
"moduleResolution": "node",
|
|
19
20
|
"esModuleInterop": true,
|
|
@@ -21,6 +22,11 @@
|
|
|
21
22
|
"resolveJsonModule": true
|
|
22
23
|
},
|
|
23
24
|
"exclude": [
|
|
24
|
-
"dist"
|
|
25
|
+
"dist",
|
|
26
|
+
"package.json"
|
|
27
|
+
],
|
|
28
|
+
"include": [
|
|
29
|
+
"**/*",
|
|
30
|
+
"**/*.json"
|
|
25
31
|
]
|
|
26
32
|
}
|
|
Binary file
|
package/preview-1649170982547.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
export const compositions = [require('/Users/kutner/Library/Caches/Bit/capsules/4d3a484af3d3d771b8ef753524d1f10bb4be2fdd/teambit.react_ui_component-highlighter@0.1.0/dist/children-highlighter/children-highlighter.composition.js'), require('/Users/kutner/Library/Caches/Bit/capsules/4d3a484af3d3d771b8ef753524d1f10bb4be2fdd/teambit.react_ui_component-highlighter@0.1.0/dist/element-highlighter/element-highlighter.compositions.js'), require('/Users/kutner/Library/Caches/Bit/capsules/4d3a484af3d3d771b8ef753524d1f10bb4be2fdd/teambit.react_ui_component-highlighter@0.1.0/dist/hover-highlighter/hover-highlighter.compositions.js')]
|
|
2
|
-
export const overview = [require('/Users/kutner/Library/Caches/Bit/capsules/4d3a484af3d3d771b8ef753524d1f10bb4be2fdd/teambit.react_ui_component-highlighter@0.1.0/dist/component-highlighter.docs.md')]
|