@teambit/react.ui.component-highlighter 0.2.1 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.bit-capsule-ready +0 -0
- package/dist/children-highlighter/children-highlighter.composition.d.ts +6 -6
- package/dist/children-highlighter/children-highlighter.d.ts +3 -3
- package/dist/children-highlighter/use-children-highlighter.d.ts +2 -2
- package/dist/element-highlighter/element-highlighter.compositions.d.ts +8 -8
- package/dist/element-highlighter/element-highlighter.d.ts +2 -2
- package/dist/frame/frame.d.ts +1 -1
- package/dist/hover-highlighter/bubble-to-component.d.ts +1 -1
- package/dist/hover-highlighter/bubble-to-component.js.map +1 -1
- package/dist/hover-highlighter/hover-highlighter.compositions.d.ts +4 -4
- package/dist/hover-highlighter/hover-highlighter.d.ts +3 -3
- package/dist/hover-highlighter/use-hover-highlighter.d.ts +2 -2
- package/dist/hover-highlighter/use-hover-highlighter.js.map +1 -1
- package/dist/hybrid-highlighter/hybrid-highlighter.d.ts +1 -1
- package/dist/ignore-highlighter.d.ts +3 -3
- package/dist/label/component-strip.compositions.d.ts +2 -2
- package/dist/label/component-strip.js.map +1 -1
- package/dist/label/label-container.d.ts +1 -1
- package/dist/label/label.d.ts +1 -1
- package/dist/label/other-components.d.ts +3 -3
- package/dist/mock-component.d.ts +14 -4
- package/dist/rule-matcher.d.ts +3 -3
- package/dist/rule-matcher.js.map +1 -1
- package/dist/tsconfig.json +5 -1
- package/package.json +8 -6
- package/schema.json +2952 -0
- package/static/css/teambit.react/ui/component-highlighter.5d8cd801.css +1 -0
- package/teambit_react_ui_component_highlighter-component.js +42 -0
- package/teambit_react_ui_component_highlighter-preview.js +101 -0
- package/dist/preview-1671357904502.js +0 -10
- package/package-tar/teambit-react.ui.component-highlighter-0.2.1.tgz +0 -0
- package/tsconfig.json +0 -32
- package/types/asset.d.ts +0 -29
- package/types/style.d.ts +0 -42
|
File without changes
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const ChildrenHighlighterPreview: () => JSX.Element;
|
|
3
|
-
export declare const ChildrenHighlighterWithCustomColors: () => JSX.Element;
|
|
4
|
-
export declare const ChildrenHighlighterInsideIgnore: () => JSX.Element;
|
|
5
|
-
export declare const ChildrenHighlighterWithRule: () => JSX.Element;
|
|
6
|
-
export declare const ChildrenHighlighterWithComponentRule: () => JSX.Element;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare const ChildrenHighlighterPreview: () => React.JSX.Element;
|
|
3
|
+
export declare const ChildrenHighlighterWithCustomColors: () => React.JSX.Element;
|
|
4
|
+
export declare const ChildrenHighlighterInsideIgnore: () => React.JSX.Element;
|
|
5
|
+
export declare const ChildrenHighlighterWithRule: () => React.JSX.Element;
|
|
6
|
+
export declare const ChildrenHighlighterWithComponentRule: () => React.JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import { HybridHighlighterProps } from '../hybrid-highlighter';
|
|
3
|
-
export
|
|
4
|
-
export declare function ChildrenHighlighter({ watchMotion, ...props }: ChildrenHighlighterProps): JSX.Element;
|
|
3
|
+
export type ChildrenHighlighterProps = Omit<HybridHighlighterProps, 'mode'>;
|
|
4
|
+
export declare function ChildrenHighlighter({ watchMotion, ...props }: ChildrenHighlighterProps): React.JSX.Element;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { RefObject } from 'react';
|
|
2
2
|
import { ComponentMetaHolder } from '@teambit/react.ui.highlighter.component-metadata.bit-component-meta';
|
|
3
3
|
import { MatchRule, ComponentMatchRule } from '../rule-matcher';
|
|
4
|
-
|
|
4
|
+
type HighlighterTarget = Record<string, {
|
|
5
5
|
element: HTMLElement;
|
|
6
6
|
components: ComponentMetaHolder[];
|
|
7
7
|
}>;
|
|
8
|
-
export
|
|
8
|
+
export type ChildrenHighlighterOptions = {
|
|
9
9
|
onChange: (highlighterTargets: HighlighterTarget) => void;
|
|
10
10
|
disabled?: boolean;
|
|
11
11
|
scopeRef: RefObject<HTMLElement>;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { CSSProperties } from 'react';
|
|
2
|
-
|
|
1
|
+
import React, { CSSProperties } from 'react';
|
|
2
|
+
type HighlightedElementProps = {
|
|
3
3
|
style?: CSSProperties;
|
|
4
4
|
targetStyle?: CSSProperties;
|
|
5
5
|
className?: string;
|
|
6
6
|
watchMotion?: boolean;
|
|
7
7
|
};
|
|
8
|
-
export declare const HighlightedElement: ({ style, targetStyle, watchMotion, className }: HighlightedElementProps) => JSX.Element;
|
|
9
|
-
export declare const Customized: () => JSX.Element;
|
|
10
|
-
export declare const Sizes: () => JSX.Element;
|
|
11
|
-
export declare const MovingElement: () => JSX.Element;
|
|
12
|
-
export declare const FullscreenElement: () => JSX.Element;
|
|
13
|
-
export declare function OffscreenElements(): JSX.Element;
|
|
8
|
+
export declare const HighlightedElement: ({ style, targetStyle, watchMotion, className }: HighlightedElementProps) => React.JSX.Element;
|
|
9
|
+
export declare const Customized: () => React.JSX.Element;
|
|
10
|
+
export declare const Sizes: () => React.JSX.Element;
|
|
11
|
+
export declare const MovingElement: () => React.JSX.Element;
|
|
12
|
+
export declare const FullscreenElement: () => React.JSX.Element;
|
|
13
|
+
export declare function OffscreenElements(): React.JSX.Element;
|
|
14
14
|
export {};
|
|
@@ -14,9 +14,9 @@ export interface ElementHighlighterProps extends React.HTMLAttributes<HTMLDivEle
|
|
|
14
14
|
watchMotion?: boolean;
|
|
15
15
|
}
|
|
16
16
|
export { Placement };
|
|
17
|
-
export
|
|
17
|
+
export type HighlightClasses = {
|
|
18
18
|
container?: string;
|
|
19
19
|
frame?: string;
|
|
20
20
|
label?: string;
|
|
21
21
|
};
|
|
22
|
-
export declare function ElementHighlighter({ targetRef, components, placement, watchMotion, className, classes, ...props }: ElementHighlighterProps): JSX.Element;
|
|
22
|
+
export declare function ElementHighlighter({ targetRef, components, placement, watchMotion, className, classes, ...props }: ElementHighlighterProps): React.JSX.Element;
|
package/dist/frame/frame.d.ts
CHANGED
|
@@ -10,4 +10,4 @@ export interface FrameProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
10
10
|
/** continually update frame position to match moving elements */
|
|
11
11
|
watchMotion?: boolean;
|
|
12
12
|
}
|
|
13
|
-
export declare function Frame({ targetRef, watchMotion, className, stylesClass, style }: FrameProps): JSX.Element;
|
|
13
|
+
export declare function Frame({ targetRef, watchMotion, className, stylesClass, style }: FrameProps): React.JSX.Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ReactComponentMetaHolder } from '@teambit/react.ui.highlighter.component-metadata.bit-component-meta';
|
|
2
2
|
import { MatchRule, ComponentMatchRule } from '../rule-matcher';
|
|
3
|
-
|
|
3
|
+
type BubblingOptions = {
|
|
4
4
|
/** filter elements by this rule */
|
|
5
5
|
elementRule?: MatchRule;
|
|
6
6
|
/** filter components by this rule */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bubble-to-component.js","sourceRoot":"","sources":["../../hover-highlighter/bubble-to-component.tsx"],"names":[],"mappings":";;;AAAA,oFAAiF;AACjF,oJAI6E;AAC7E,kDAAmG;AAcnG,8DAA8D;AAC9D,SAAgB,iBAAiB,CAC/B,OAA2B,EAC3B,EAAE,WAAW,EAAE,aAAa,EAAE,oBAAoB,GAAG,IAAI,KAAsB,EAAE;IAEjF,IAAI,OAAO,GAAG,sBAAsB,CAAC,OAAO,EAAE,WAAW,EAAE,aAAa,CAAC,CAAC;IAC1E,IAAI,CAAC,oBAAoB;QAAE,OAAO,OAAO,CAAC;IAE1C,OAAO,OAAO,EAAE;
|
|
1
|
+
{"version":3,"file":"bubble-to-component.js","sourceRoot":"","sources":["../../hover-highlighter/bubble-to-component.tsx"],"names":[],"mappings":";;;AAAA,oFAAiF;AACjF,oJAI6E;AAC7E,kDAAmG;AAcnG,8DAA8D;AAC9D,SAAgB,iBAAiB,CAC/B,OAA2B,EAC3B,EAAE,WAAW,EAAE,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GAAG,IAAA,wCAAW,EAAC,OAAO,CAAC,CAAC;YAExC,MAAM,kBAAkB,GAAG,UAAU,CAAC,MAAM,CAC1C,CAAC,CAAC,EAAE,EAAE,CAAC,IAAA,6EAAgB,EAAC,CAAC,CAAC,IAAI,IAAA,mCAAoB,EAAC,EAAE,IAAI,EAAE,CAAC,CAAC,+EAAkB,CAAC,EAAE,EAAE,aAAa,CAAC,CACrE,CAAC;YAEhC,IAAI,kBAAkB,CAAC,MAAM,GAAG,CAAC;gBAAE,OAAO,SAAS,CAAC;YACpD,OAAO;gBACL,OAAO,EAAE,OAAO;gBAChB,UAAU,EAAE,kBAAkB;aAC/B,CAAC;QACJ,CAAC;IACH,CAAC;IAED,OAAO,SAAS,CAAC;AACnB,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const ShowWhenHovering: () => JSX.Element;
|
|
3
|
-
export declare const UnmountingElement: () => JSX.Element;
|
|
4
|
-
export declare const HoverExclusionZones: () => JSX.Element;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare const ShowWhenHovering: () => React.JSX.Element;
|
|
3
|
+
export declare const UnmountingElement: () => React.JSX.Element;
|
|
4
|
+
export declare const HoverExclusionZones: () => React.JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import { HybridHighlighterProps } from '../hybrid-highlighter';
|
|
3
|
-
export
|
|
4
|
-
export declare function HoverHighlighter({ ...props }: HoverHighlighterProps): JSX.Element;
|
|
3
|
+
export type HoverHighlighterProps = Omit<HybridHighlighterProps, 'mode'>;
|
|
4
|
+
export declare function HoverHighlighter({ ...props }: HoverHighlighterProps): React.JSX.Element;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ComponentMetaHolder } from '@teambit/react.ui.highlighter.component-metadata.bit-component-meta';
|
|
3
3
|
import { MatchRule, ComponentMatchRule } from '../rule-matcher';
|
|
4
|
-
|
|
4
|
+
type HighlightTarget = {
|
|
5
5
|
element: HTMLElement;
|
|
6
6
|
components: ComponentMetaHolder[];
|
|
7
7
|
};
|
|
8
|
-
export
|
|
8
|
+
export type useHoverHighlighterOptions = {
|
|
9
9
|
debounceDuration: number;
|
|
10
10
|
scopeClass: string;
|
|
11
11
|
disabled?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-hover-highlighter.js","sourceRoot":"","sources":["../../hover-highlighter/use-hover-highlighter.tsx"],"names":[],"mappings":";;;AAAA,iCAAyC;AACzC,+CAAoD;AACpD,8EAAqE;AAGrE,8DAA4F;AAE5F,+DAA0D;AAa1D,oDAAoD;AACpD,SAAgB,mBAAmB,CACjC,QAA4C,EAC5C,QAAiC,EAAE,EACnC,EAAE,gBAAgB,EAAE,UAAU,EAAE,QAAQ,EAAE,IAAI,EAAE,aAAa,EAA8B;IAE3F,MAAM,EAAE,aAAa,EAAE,GAAG,eAAe,CAAC,EAAE,QAAQ,EAAE,UAAU,EAAE,gBAAgB,EAAE,QAAQ,EAAE,IAAI,EAAE,aAAa,EAAE,CAAC,CAAC;IAErH,MAAM,QAAQ,GAAG,IAAA,2CAAiB,EAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,aAAa,EAAE,KAAK,CAAC,CAAC;IAEhF,OAAO,QAAQ,CAAC;AAClB,CAAC;AAVD,kDAUC;AAWD,SAAS,eAAe,CAAC,EACvB,QAAQ,EACR,UAAU,GAAG,EAAE,EACf,gBAAgB,EAChB,QAAQ,EACR,IAAI,EACJ,aAAa,GACY;IACzB,yDAAyD;IACzD,MAAM,cAAc,GAAG,CAAC,OAA2B,EAAE,EAAE;QACrD,kCAAkC;QAClC,IAAI,CAAC,OAAO,IAAI,OAAO,CAAC,YAAY,CAAC,kCAAkC,CAAC,EAAE;
|
|
1
|
+
{"version":3,"file":"use-hover-highlighter.js","sourceRoot":"","sources":["../../hover-highlighter/use-hover-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AW,EAAE,IAAI,EAAE,aAAa,EAAE,CAAC,CAAC;QAChF,IAAI,CAAC,MAAM;YAAE,OAAO;QAEpB,QAAQ,CAAC;YACP,OAAO,EAAE,MAAM,CAAC,OAAO;YACvB,UAAU,EAAE,MAAM,CAAC,UAAU;SAC9B,CAAC,CAAC;IACL,CAAC,CAAC;IAEF,MAAM,aAAa,GAAG,IAAA,mCAAoB,EAAC,cAAc,EAAE,gBAAgB,CAAC,CAAC;IAE7E,uBAAuB;IACvB,IAAA,iBAAS,EAAC,GAAG,EAAE;QACb,IAAI,QAAQ;YAAE,aAAa,CAAC,MAAM,EAAE,CAAC;IACvC,CAAC,EAAE,CAAC,QAAQ,EAAE,aAAa,CAAC,CAAC,CAAC;IAE9B,OAAO,EAAE,aAAa,EAAE,CAAC;AAC3B,CAAC"}
|
|
@@ -33,4 +33,4 @@ export interface HybridHighlighterProps extends React.HTMLAttributes<HTMLDivElem
|
|
|
33
33
|
bgColorActive?: string;
|
|
34
34
|
}
|
|
35
35
|
/** automatically highlight components on hover */
|
|
36
|
-
export declare function HybridHighlighter({ disabled, mode, debounceSelection, watchMotion, placement, rule, componentRule, classes, highlightStyle, className, style, bgColor, bgColorHover, bgColorActive, children, ...rest }: HybridHighlighterProps): JSX.Element;
|
|
36
|
+
export declare function HybridHighlighter({ disabled, mode, debounceSelection, watchMotion, placement, rule, componentRule, classes, highlightStyle, className, style, bgColor, bgColorHover, bgColorActive, children, ...rest }: HybridHighlighterProps): React.JSX.Element;
|
|
@@ -2,13 +2,13 @@ import React from 'react';
|
|
|
2
2
|
/** name of ignore attribute */
|
|
3
3
|
export declare const excludeHighlighterAttrName = "data-ignore-component-highlight";
|
|
4
4
|
/** selector for elements with the ignore attribute */
|
|
5
|
-
export declare const excludeHighlighterSelector
|
|
5
|
+
export declare const excludeHighlighterSelector = "[data-ignore-component-highlight]";
|
|
6
6
|
/** highlighter will exclude elements with this attribute */
|
|
7
7
|
export declare const excludeHighlighterAtt: {
|
|
8
8
|
"data-ignore-component-highlight": boolean;
|
|
9
9
|
};
|
|
10
10
|
/** children of this element will be excluded by the automatic highlighter */
|
|
11
|
-
export declare function ExcludeHighlighter(props: React.HTMLAttributes<HTMLDivElement>): JSX.Element;
|
|
11
|
+
export declare function ExcludeHighlighter(props: React.HTMLAttributes<HTMLDivElement>): React.JSX.Element;
|
|
12
12
|
/** name of skip attribute */
|
|
13
13
|
export declare const skipHighlighterAttrName = "data-skip-component-highlight";
|
|
14
14
|
/** highlighter will skip (ignore) elements with these attributes */
|
|
@@ -16,4 +16,4 @@ export declare const skipHighlighterAttr: {
|
|
|
16
16
|
"data-skip-component-highlight": boolean;
|
|
17
17
|
};
|
|
18
18
|
/** selector for elements with the skip attribute */
|
|
19
|
-
export declare const skipHighlighterSelector
|
|
19
|
+
export declare const skipHighlighterSelector = "[data-skip-component-highlight]";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const ComponentStripPreview: () => JSX.Element;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare const ComponentStripPreview: () => React.JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
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,CA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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,CAAC;QACjC,OAAO,EAAE,EAAE,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IAC1C,CAAC;IAED,OAAO,QAAQ,CAAC,+EAAkB,CAAC,CAAC;AACtC,CAAC"}
|
|
@@ -9,4 +9,4 @@ export interface LabelContainerProps extends React.HTMLAttributes<HTMLDivElement
|
|
|
9
9
|
watchMotion?: boolean;
|
|
10
10
|
}
|
|
11
11
|
export type { Placement };
|
|
12
|
-
export declare function LabelContainer({ targetRef, offset, placement, flip, watchMotion, className, style, ...rest }: LabelContainerProps): JSX.Element;
|
|
12
|
+
export declare function LabelContainer({ targetRef, offset, placement, flip, watchMotion, className, style, ...rest }: LabelContainerProps): React.JSX.Element;
|
package/dist/label/label.d.ts
CHANGED
|
@@ -3,4 +3,4 @@ import { ComponentMetaHolder } from '@teambit/react.ui.highlighter.component-met
|
|
|
3
3
|
export interface LabelProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
4
4
|
components: (ComponentMetaHolder | string)[];
|
|
5
5
|
}
|
|
6
|
-
export declare function Label({ components, ...props }: LabelProps): JSX.Element;
|
|
6
|
+
export declare function Label({ components, ...props }: LabelProps): React.JSX.Element;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import { TippyProps } from '@tippyjs/react/headless';
|
|
3
3
|
import { ComponentMetaHolder } from '@teambit/react.ui.highlighter.component-metadata.bit-component-meta';
|
|
4
|
-
export
|
|
4
|
+
export type OtherComponentsProps = {
|
|
5
5
|
components: (ComponentMetaHolder | string)[];
|
|
6
6
|
start?: number;
|
|
7
7
|
end?: number;
|
|
8
8
|
} & TippyProps;
|
|
9
|
-
export declare function OtherComponentsPopper({ components, children, start, end, placement, interactive, ...tippyProps }: OtherComponentsProps): JSX.Element;
|
|
9
|
+
export declare function OtherComponentsPopper({ components, children, start, end, placement, interactive, ...tippyProps }: OtherComponentsProps): React.JSX.Element;
|
package/dist/mock-component.d.ts
CHANGED
|
@@ -1,4 +1,14 @@
|
|
|
1
|
-
import { ButtonHTMLAttributes, HTMLAttributes } from 'react';
|
|
2
|
-
|
|
3
|
-
export declare function
|
|
4
|
-
export declare
|
|
1
|
+
import React, { ButtonHTMLAttributes, HTMLAttributes } from 'react';
|
|
2
|
+
import { ComponentMeta } from '@teambit/react.ui.highlighter.component-metadata.bit-component-meta';
|
|
3
|
+
export declare function MockTarget({ children, ...rest }: HTMLAttributes<HTMLDivElement>): React.JSX.Element;
|
|
4
|
+
export declare namespace MockTarget {
|
|
5
|
+
var __bit_component: ComponentMeta;
|
|
6
|
+
}
|
|
7
|
+
export declare function MockButton({ children, ...rest }: ButtonHTMLAttributes<HTMLButtonElement>): React.JSX.Element;
|
|
8
|
+
export declare namespace MockButton {
|
|
9
|
+
var __bit_component: ComponentMeta;
|
|
10
|
+
}
|
|
11
|
+
export declare function MockSnap({ children, ...rest }: ButtonHTMLAttributes<HTMLButtonElement>): React.JSX.Element;
|
|
12
|
+
export declare namespace MockSnap {
|
|
13
|
+
var __bit_component: ComponentMeta;
|
|
14
|
+
}
|
package/dist/rule-matcher.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ComponentMeta } from '@teambit/react.ui.highlighter.component-metadata.bit-component-meta';
|
|
2
|
-
export
|
|
3
|
-
export
|
|
2
|
+
export type MatchRule = undefined | string | ((element: HTMLElement) => boolean);
|
|
3
|
+
export type ComponentMatchRule = undefined | string | string[] | ((target: ComponentMatchTarget) => boolean);
|
|
4
4
|
export declare function ruleMatcher(element: HTMLElement, rule: MatchRule): boolean;
|
|
5
|
-
export
|
|
5
|
+
export type ComponentMatchTarget = {
|
|
6
6
|
meta: ComponentMeta;
|
|
7
7
|
};
|
|
8
8
|
export declare function componentRuleMatcher(target: ComponentMatchTarget, rule: ComponentMatchRule): boolean;
|
package/dist/rule-matcher.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rule-matcher.js","sourceRoot":"","sources":["../rule-matcher.tsx"],"names":[],"mappings":";;;AAAA,gFAAgF;AAChF,wDAAoD;AAMpD,SAAgB,WAAW,CAAC,OAAoB,EAAE,IAAe;IAC/D,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE;
|
|
1
|
+
{"version":3,"file":"rule-matcher.js","sourceRoot":"","sources":["../rule-matcher.tsx"],"names":[],"mappings":";;;AAAA,gFAAgF;AAChF,wDAAoD;AAMpD,SAAgB,WAAW,CAAC,OAAoB,EAAE,IAAe;IAC/D,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE,CAAC;QAC7B,OAAO,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IAC/B,CAAC;IAED,IAAI,OAAO,IAAI,KAAK,UAAU,EAAE,CAAC;QAC/B,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC;IACvB,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC;AAVD,kCAUC;AAID,SAAgB,oBAAoB,CAAC,MAA4B,EAAE,IAAwB;IACzF,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE,CAAC;QAC7B,MAAM,WAAW,GAAG,0BAAW,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QAC9D,MAAM,SAAS,GAAG,0BAAW,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;QAElD,OAAO,0BAAW,CAAC,OAAO,CAAC,SAAS,EAAE,WAAW,EAAE,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC,CAAC;IAC9E,CAAC;IAED,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC;QACxB,MAAM,WAAW,GAAG,0BAAW,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QAC9D,MAAM,UAAU,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,0BAAW,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC;QAEjE,OAAO,UAAU,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,0BAAW,CAAC,OAAO,CAAC,WAAW,EAAE,KAAK,EAAE,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;IACtG,CAAC;IAED,IAAI,OAAO,IAAI,KAAK,UAAU,EAAE,CAAC;QAC/B,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC;AApBD,oDAoBC"}
|
package/dist/tsconfig.json
CHANGED
package/package.json
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teambit/react.ui.component-highlighter",
|
|
3
|
-
"version": "0.2.
|
|
4
|
-
"homepage": "https://bit.
|
|
3
|
+
"version": "0.2.2",
|
|
4
|
+
"homepage": "https://bit.cloud/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.2.
|
|
9
|
+
"version": "0.2.2"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"get-xpath": "^3.0.1",
|
|
13
13
|
"classnames": "^2.3.1",
|
|
14
14
|
"use-debounce": "^8.0.1",
|
|
15
|
-
"uuid": "^
|
|
16
|
-
"@floating-ui/react-dom": "0.7.2",
|
|
15
|
+
"uuid": "^10.0.0",
|
|
17
16
|
"lodash.compact": "^3.0.1",
|
|
17
|
+
"@floating-ui/react-dom": "0.7.2",
|
|
18
18
|
"url-join": "^4.0.1",
|
|
19
19
|
"@tippyjs/react": "4.2.0",
|
|
20
20
|
"core-js": "^3.0.0",
|
|
@@ -43,6 +43,8 @@
|
|
|
43
43
|
"react-dom": "^16.8.0 || ^17.0.0"
|
|
44
44
|
},
|
|
45
45
|
"license": "Apache-2.0",
|
|
46
|
+
"optionalDependencies": {},
|
|
47
|
+
"peerDependenciesMeta": {},
|
|
46
48
|
"private": false,
|
|
47
49
|
"repository": {
|
|
48
50
|
"type": "git",
|
|
@@ -56,4 +58,4 @@
|
|
|
56
58
|
"react",
|
|
57
59
|
"react-components"
|
|
58
60
|
]
|
|
59
|
-
}
|
|
61
|
+
}
|