@dxos/react-ui-syntax-highlighter 0.8.4-main.9735255 → 0.8.4-main.9be5663bfe

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.
@@ -1 +1 @@
1
- {"inputs":{"src/SyntaxHighlighter/SyntaxHighlighter.tsx":{"bytes":5909,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"react-syntax-highlighter/dist/esm/prism-async-light","kind":"import-statement","external":true},{"path":"react-syntax-highlighter/dist/esm/styles/prism","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/ui-theme","kind":"import-statement","external":true}],"format":"esm"},"src/SyntaxHighlighter/index.ts":{"bytes":979,"imports":[{"path":"react-syntax-highlighter/dist/esm/create-element","kind":"import-statement","external":true},{"path":"src/SyntaxHighlighter/SyntaxHighlighter.tsx","kind":"import-statement","original":"./SyntaxHighlighter"}],"format":"esm"},"src/Json/Json.tsx":{"bytes":8440,"imports":[{"path":"jsonpath","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"src/SyntaxHighlighter/index.ts","kind":"import-statement","original":"../SyntaxHighlighter"}],"format":"esm"},"src/Json/index.ts":{"bytes":463,"imports":[{"path":"src/Json/Json.tsx","kind":"import-statement","original":"./Json"}],"format":"esm"},"src/index.ts":{"bytes":571,"imports":[{"path":"src/Json/index.ts","kind":"import-statement","original":"./Json"},{"path":"src/SyntaxHighlighter/index.ts","kind":"import-statement","original":"./SyntaxHighlighter"}],"format":"esm"}},"outputs":{"dist/lib/node-esm/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":7911},"dist/lib/node-esm/index.mjs":{"imports":[{"path":"jsonpath","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"react-syntax-highlighter/dist/esm/create-element","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"react-syntax-highlighter/dist/esm/prism-async-light","kind":"import-statement","external":true},{"path":"react-syntax-highlighter/dist/esm/styles/prism","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/ui-theme","kind":"import-statement","external":true}],"exports":["Json","JsonFilter","SyntaxHighlighter","createElement"],"entryPoint":"src/index.ts","inputs":{"src/Json/Json.tsx":{"bytesInOutput":2070},"src/SyntaxHighlighter/index.ts":{"bytesInOutput":78},"src/SyntaxHighlighter/SyntaxHighlighter.tsx":{"bytesInOutput":1081},"src/index.ts":{"bytesInOutput":0}},"bytes":3554}}}
1
+ {"inputs":{"src/SyntaxHighlighter/SyntaxHighlighter.tsx":{"bytes":7063,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"react-syntax-highlighter/dist/esm/prism-async-light","kind":"import-statement","external":true},{"path":"react-syntax-highlighter/dist/esm/styles/prism","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/ui-theme","kind":"import-statement","external":true}],"format":"esm"},"src/SyntaxHighlighter/index.ts":{"bytes":979,"imports":[{"path":"react-syntax-highlighter/dist/esm/create-element","kind":"import-statement","external":true},{"path":"src/SyntaxHighlighter/SyntaxHighlighter.tsx","kind":"import-statement","original":"./SyntaxHighlighter"}],"format":"esm"},"src/Json/Json.tsx":{"bytes":16024,"imports":[{"path":"jsonpath-plus","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/ui-theme","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"src/SyntaxHighlighter/index.ts","kind":"import-statement","original":"../SyntaxHighlighter"}],"format":"esm"},"src/Json/index.ts":{"bytes":618,"imports":[{"path":"src/Json/Json.tsx","kind":"import-statement","original":"./Json"}],"format":"esm"},"src/index.ts":{"bytes":571,"imports":[{"path":"src/Json/index.ts","kind":"import-statement","original":"./Json"},{"path":"src/SyntaxHighlighter/index.ts","kind":"import-statement","original":"./SyntaxHighlighter"}],"format":"esm"}},"outputs":{"dist/lib/node-esm/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":12709},"dist/lib/node-esm/index.mjs":{"imports":[{"path":"jsonpath-plus","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/ui-theme","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"react-syntax-highlighter/dist/esm/create-element","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"react-syntax-highlighter/dist/esm/prism-async-light","kind":"import-statement","external":true},{"path":"react-syntax-highlighter/dist/esm/styles/prism","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/ui-theme","kind":"import-statement","external":true}],"exports":["Json","SyntaxHighlighter","createElement"],"entryPoint":"src/index.ts","inputs":{"src/Json/Json.tsx":{"bytesInOutput":3608},"src/SyntaxHighlighter/index.ts":{"bytesInOutput":78},"src/SyntaxHighlighter/SyntaxHighlighter.tsx":{"bytesInOutput":1359},"src/Json/index.ts":{"bytesInOutput":0},"src/index.ts":{"bytesInOutput":0}},"bytes":5356}}}
@@ -1,26 +1,37 @@
1
- import React from 'react';
2
- import { type ThemedClassName } from '@dxos/react-ui';
1
+ import React, { type PropsWithChildren } from 'react';
2
+ import { type ComposableProps } from '@dxos/ui-types';
3
3
  import { type CreateReplacerProps } from '@dxos/util';
4
- export type JsonProps = ThemedClassName<{
4
+ type JsonRootProps = PropsWithChildren<{
5
5
  data?: any;
6
- filter?: boolean;
7
6
  replacer?: CreateReplacerProps;
8
- testId?: string;
9
7
  }>;
10
- export declare const Json: React.ForwardRefExoticComponent<Omit<{
11
- data?: any;
12
- filter?: boolean;
13
- replacer?: CreateReplacerProps;
14
- testId?: string;
15
- }, "className"> & {
16
- classNames?: import("@dxos/ui-types").ClassNameValue;
17
- } & React.RefAttributes<HTMLDivElement>>;
18
- export declare const JsonFilter: React.ForwardRefExoticComponent<Omit<{
8
+ type JsonContentProps = ComposableProps;
9
+ type JsonFilterProps = ComposableProps<{
10
+ placeholder?: string;
11
+ }>;
12
+ type JsonDataProps = ComposableProps<{
19
13
  data?: any;
20
- filter?: boolean;
21
14
  replacer?: CreateReplacerProps;
22
15
  testId?: string;
23
- }, "className"> & {
24
- classNames?: import("@dxos/ui-types").ClassNameValue;
25
- } & React.RefAttributes<HTMLDivElement>>;
16
+ }>;
17
+ export declare const Json: {
18
+ Root: React.ForwardRefExoticComponent<{
19
+ data?: any;
20
+ replacer?: CreateReplacerProps;
21
+ } & {
22
+ children?: React.ReactNode | undefined;
23
+ } & React.RefAttributes<HTMLDivElement>>;
24
+ Content: React.ForwardRefExoticComponent<Omit<JsonContentProps, "className"> & {
25
+ classNames?: import("@dxos/ui-types").ClassNameValue;
26
+ } & Pick<React.HTMLAttributes<Element>, "className" | "children" | "role" | "style"> & React.RefAttributes<HTMLDivElement>>;
27
+ Filter: React.ForwardRefExoticComponent<Omit<{
28
+ placeholder?: string;
29
+ }, "className"> & {
30
+ classNames?: import("@dxos/ui-types").ClassNameValue;
31
+ } & Pick<React.HTMLAttributes<Element>, "className" | "children" | "role" | "style"> & React.RefAttributes<HTMLInputElement>>;
32
+ Data: React.ForwardRefExoticComponent<Omit<JsonDataProps, "className"> & {
33
+ classNames?: import("@dxos/ui-types").ClassNameValue;
34
+ } & Pick<React.HTMLAttributes<Element>, "className" | "children" | "role" | "style"> & React.RefAttributes<HTMLDivElement>>;
35
+ };
36
+ export type { JsonRootProps, JsonContentProps, JsonFilterProps, JsonDataProps };
26
37
  //# sourceMappingURL=Json.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Json.d.ts","sourceRoot":"","sources":["../../../../src/Json/Json.tsx"],"names":[],"mappings":"AAMA,O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AA4BH,eAAO,MAAM,IAAI;;eA5HR,GAAG;mBACC,mBAAmB;;;;;;;;sBA4DhB,MAAM;;;;;;;CAoErB,CAAC;AAEF,YAAY,EAAE,aAAa,EAAE,gBAAgB,EAAE,eAAe,EAAE,aAAa,EAAE,CAAC"}
@@ -1,22 +1,21 @@
1
1
  import { type StoryObj } from '@storybook/react-vite';
2
2
  import React from 'react';
3
- import { Json } from './Json';
4
3
  declare const meta: {
5
4
  title: string;
6
- component: React.ForwardRefExoticComponent<Omit<{
5
+ component: React.ForwardRefExoticComponent<{
7
6
  data?: any;
8
- filter?: boolean;
9
7
  replacer?: import("@dxos/util").CreateReplacerProps;
10
- testId?: string;
11
- }, "className"> & {
12
- classNames?: import("@dxos/ui-types").ClassNameValue;
8
+ } & {
9
+ children?: React.ReactNode | undefined;
13
10
  } & React.RefAttributes<HTMLDivElement>>;
14
11
  decorators: import("@storybook/react").Decorator[];
15
12
  };
16
13
  export default meta;
17
- type Story = StoryObj<typeof Json>;
14
+ type Story = StoryObj<typeof meta>;
15
+ /** Standalone Json.Data — simplest usage. */
18
16
  export declare const Default: Story;
19
- export declare const Filter: Story;
20
- export declare const Large: Story;
17
+ /** Circular reference handling. */
21
18
  export declare const Cycle: Story;
19
+ /** Large dataset with replacer. */
20
+ export declare const Filter: Story;
22
21
  //# sourceMappingURL=Json.stories.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Json.stories.d.ts","sourceRoot":"","sources":["../../../../src/Json/Json.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AA6C9B,QAAA,MAAM,IAAI;;;;;;;;;;;CAImB,CAAC;AAE9B,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAInC,eAAO,MAAM,OAAO,EAAE,KAKrB,CAAC;AAEF,eAAO,MAAM,MAAM,EAAE,KAMpB,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,KAWnB,CAAC;AAUF,eAAO,MAAM,KAAK,EAAE,KAEnB,CAAC"}
1
+ {"version":3,"file":"Json.stories.d.ts","sourceRoot":"","sources":["../../../../src/Json/Json.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAK,MAAM,OAAO,CAAC;AA4D1B,QAAA,MAAM,IAAI;;;;;;;;;CAIM,CAAC;AAEjB,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,6CAA6C;AAC7C,eAAO,MAAM,OAAO,EAAE,KAKrB,CAAC;AAEF,mCAAmC;AACnC,eAAO,MAAM,KAAK,EAAE,KAKnB,CAAC;AAEF,mCAAmC;AACnC,eAAO,MAAM,MAAM,EAAE,KAapB,CAAC"}
@@ -1,2 +1,2 @@
1
- export * from './Json';
1
+ export { Json, type JsonRootProps, type JsonContentProps, type JsonFilterProps, type JsonDataProps } from './Json';
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/Json/index.ts"],"names":[],"mappings":"AAIA,cAAc,QAAQ,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/Json/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,IAAI,EAAE,KAAK,aAAa,EAAE,KAAK,gBAAgB,EAAE,KAAK,eAAe,EAAE,KAAK,aAAa,EAAE,MAAM,QAAQ,CAAC"}
@@ -1,9 +1,8 @@
1
1
  import React from 'react';
2
2
  import { type SyntaxHighlighterProps as NaturalSyntaxHighlighterProps } from 'react-syntax-highlighter';
3
- import { type ThemedClassName } from '@dxos/react-ui';
4
- export type SyntaxHighlighterProps = ThemedClassName<NaturalSyntaxHighlighterProps & {
3
+ export type SyntaxHighlighterProps = NaturalSyntaxHighlighterProps & {
5
4
  fallback?: string;
6
- }>;
5
+ };
7
6
  /**
8
7
  * NOTE: Using `light-async` version directly from dist to avoid any chance of the heavy one being loaded.
9
8
  * The lightweight version will load specific language parsers asynchronously.
@@ -11,5 +10,7 @@ export type SyntaxHighlighterProps = ThemedClassName<NaturalSyntaxHighlighterPro
11
10
  * https://github.com/react-syntax-highlighter/react-syntax-highlighter
12
11
  * https://react-syntax-highlighter.github.io/react-syntax-highlighter/demo/prism.html
13
12
  */
14
- export declare const SyntaxHighlighter: ({ classNames, children, language, fallback, ...props }: SyntaxHighlighterProps) => React.JSX.Element;
13
+ export declare const SyntaxHighlighter: React.ForwardRefExoticComponent<Omit<SyntaxHighlighterProps, "className"> & {
14
+ classNames?: import("@dxos/ui-types").ClassNameValue;
15
+ } & Pick<React.HTMLAttributes<Element>, "className" | "children" | "role" | "style"> & React.RefAttributes<HTMLDivElement>>;
15
16
  //# sourceMappingURL=SyntaxHighlighter.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"SyntaxHighlighter.d.ts","sourceRoot":"","sources":["../../../../src/SyntaxHighlighter/SyntaxHighlighter.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,KAAK,sBAAsB,IAAI,6BAA6B,EAAE,MAAM,0BAA0B,CAAC;AAIxG,OAAO,EAAE,KAAK,eAAe,EAAmB,MAAM,gBAAgB,CAAC;AAKvE,MAAM,MAAM,sBAAsB,GAAG,eAAe,CAClD,6BAA6B,GAAG;IAC9B,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CACF,CAAC;AAEF;;;;;;GAMG;AAEH,eAAO,MAAM,iBAAiB,GAAI,wDAM/B,sBAAsB,sBAuBxB,CAAC"}
1
+ {"version":3,"file":"SyntaxHighlighter.d.ts","sourceRoot":"","sources":["../../../../src/SyntaxHighlighter/SyntaxHighlighter.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAwB,MAAM,OAAO,CAAC;AAC7C,OAAO,EAAE,KAAK,sBAAsB,IAAI,6BAA6B,EAAE,MAAM,0BAA0B,CAAC;AAcxG,MAAM,MAAM,sBAAsB,GAAG,6BAA6B,GAAG;IACnE,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB;;2HAgC7B,CAAC"}
@@ -2,8 +2,13 @@ import { type StoryObj } from '@storybook/react-vite';
2
2
  import { SyntaxHighlighter } from './SyntaxHighlighter';
3
3
  declare const meta: {
4
4
  title: string;
5
- component: ({ classNames, children, language, fallback, ...props }: import("./SyntaxHighlighter").SyntaxHighlighterProps) => import("react").JSX.Element;
5
+ component: import("react").ForwardRefExoticComponent<Omit<import("./SyntaxHighlighter").SyntaxHighlighterProps, "className"> & {
6
+ classNames?: import("@dxos/ui-types").ClassNameValue;
7
+ } & Pick<import("react").HTMLAttributes<Element>, "className" | "children" | "role" | "style"> & import("react").RefAttributes<HTMLDivElement>>;
6
8
  decorators: import("@storybook/react").Decorator[];
9
+ parameters: {
10
+ layout: string;
11
+ };
7
12
  };
8
13
  export default meta;
9
14
  type Story = StoryObj<typeof SyntaxHighlighter>;
@@ -1 +1 @@
1
- {"version":3,"file":"SyntaxHighlighter.stories.d.ts","sourceRoot":"","sources":["../../../../src/SyntaxHighlighter/SyntaxHighlighter.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAKjE,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAExD,QAAA,MAAM,IAAI;;;;CAIgC,CAAC;AAE3C,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAEhD,eAAO,MAAM,OAAO,EAAE,KAMrB,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KAWxB,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,KAInB,CAAC"}
1
+ {"version":3,"file":"SyntaxHighlighter.stories.d.ts","sourceRoot":"","sources":["../../../../src/SyntaxHighlighter/SyntaxHighlighter.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAOjE,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAExD,QAAA,MAAM,IAAI;;;;;;;;;CAOgC,CAAC;AAE3C,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAEhD,eAAO,MAAM,OAAO,EAAE,KAMrB,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KAWxB,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,KAAU,CAAC"}