myst-to-react 0.1.19 → 0.1.21
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/dist/cjs/admonitions.d.ts +1 -1
- package/dist/cjs/admonitions.d.ts.map +1 -1
- package/dist/cjs/basic.d.ts +1 -1
- package/dist/cjs/basic.d.ts.map +1 -1
- package/dist/cjs/card.d.ts +1 -1
- package/dist/cjs/card.d.ts.map +1 -1
- package/dist/cjs/cite.d.ts +1 -1
- package/dist/cjs/cite.d.ts.map +1 -1
- package/dist/cjs/code.d.ts +2 -1
- package/dist/cjs/code.d.ts.map +1 -1
- package/dist/cjs/code.js +6 -3
- package/dist/cjs/convertToReact.d.ts +2 -2
- package/dist/cjs/convertToReact.d.ts.map +1 -1
- package/dist/cjs/crossReference.d.ts +1 -1
- package/dist/cjs/crossReference.d.ts.map +1 -1
- package/dist/cjs/crossReference.js +2 -1
- package/dist/cjs/dropdown.d.ts +1 -1
- package/dist/cjs/dropdown.d.ts.map +1 -1
- package/dist/cjs/extensions/chemicalFormula.d.ts +1 -1
- package/dist/cjs/extensions/chemicalFormula.d.ts.map +1 -1
- package/dist/cjs/extensions/index.d.ts +1 -1
- package/dist/cjs/extensions/index.d.ts.map +1 -1
- package/dist/cjs/extensions/siunits.d.ts +1 -1
- package/dist/cjs/extensions/siunits.d.ts.map +1 -1
- package/dist/cjs/footnotes.d.ts +1 -1
- package/dist/cjs/footnotes.d.ts.map +1 -1
- package/dist/cjs/grid.d.ts +1 -1
- package/dist/cjs/grid.d.ts.map +1 -1
- package/dist/cjs/heading.d.ts +1 -1
- package/dist/cjs/heading.d.ts.map +1 -1
- package/dist/cjs/heading.js +1 -1
- package/dist/cjs/iframe.d.ts +1 -1
- package/dist/cjs/iframe.d.ts.map +1 -1
- package/dist/cjs/image.d.ts +1 -1
- package/dist/cjs/image.d.ts.map +1 -1
- package/dist/cjs/index.d.ts +2 -2
- package/dist/cjs/index.d.ts.map +1 -1
- package/dist/cjs/index.js +5 -3
- package/dist/cjs/links/index.d.ts +1 -1
- package/dist/cjs/links/index.d.ts.map +1 -1
- package/dist/cjs/math.d.ts +1 -1
- package/dist/cjs/math.d.ts.map +1 -1
- package/dist/cjs/tabs.d.ts +17 -2
- package/dist/cjs/tabs.d.ts.map +1 -1
- package/dist/cjs/tabs.js +50 -18
- package/dist/types/admonitions.d.ts +1 -1
- package/dist/types/admonitions.d.ts.map +1 -1
- package/dist/types/basic.d.ts +1 -1
- package/dist/types/basic.d.ts.map +1 -1
- package/dist/types/card.d.ts +1 -1
- package/dist/types/card.d.ts.map +1 -1
- package/dist/types/cite.d.ts +1 -1
- package/dist/types/cite.d.ts.map +1 -1
- package/dist/types/code.d.ts +2 -1
- package/dist/types/code.d.ts.map +1 -1
- package/dist/types/convertToReact.d.ts +2 -2
- package/dist/types/convertToReact.d.ts.map +1 -1
- package/dist/types/crossReference.d.ts +1 -1
- package/dist/types/crossReference.d.ts.map +1 -1
- package/dist/types/dropdown.d.ts +1 -1
- package/dist/types/dropdown.d.ts.map +1 -1
- package/dist/types/extensions/chemicalFormula.d.ts +1 -1
- package/dist/types/extensions/chemicalFormula.d.ts.map +1 -1
- package/dist/types/extensions/index.d.ts +1 -1
- package/dist/types/extensions/index.d.ts.map +1 -1
- package/dist/types/extensions/siunits.d.ts +1 -1
- package/dist/types/extensions/siunits.d.ts.map +1 -1
- package/dist/types/footnotes.d.ts +1 -1
- package/dist/types/footnotes.d.ts.map +1 -1
- package/dist/types/grid.d.ts +1 -1
- package/dist/types/grid.d.ts.map +1 -1
- package/dist/types/heading.d.ts +1 -1
- package/dist/types/heading.d.ts.map +1 -1
- package/dist/types/iframe.d.ts +1 -1
- package/dist/types/iframe.d.ts.map +1 -1
- package/dist/types/image.d.ts +1 -1
- package/dist/types/image.d.ts.map +1 -1
- package/dist/types/index.d.ts +2 -2
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/links/index.d.ts +1 -1
- package/dist/types/links/index.d.ts.map +1 -1
- package/dist/types/math.d.ts +1 -1
- package/dist/types/math.d.ts.map +1 -1
- package/dist/types/tabs.d.ts +17 -2
- package/dist/types/tabs.d.ts.map +1 -1
- package/package.json +8 -13
- package/dist/cjs/output/components.d.ts +0 -10
- package/dist/cjs/output/components.d.ts.map +0 -1
- package/dist/cjs/output/components.js +0 -41
- package/dist/cjs/output/error.d.ts +0 -6
- package/dist/cjs/output/error.d.ts.map +0 -1
- package/dist/cjs/output/error.js +0 -15
- package/dist/cjs/output/hooks.d.ts +0 -67
- package/dist/cjs/output/hooks.d.ts.map +0 -1
- package/dist/cjs/output/hooks.js +0 -85
- package/dist/cjs/output/index.d.ts +0 -6
- package/dist/cjs/output/index.d.ts.map +0 -1
- package/dist/cjs/output/index.js +0 -7
- package/dist/cjs/output/jupyter.d.ts +0 -7
- package/dist/cjs/output/jupyter.d.ts.map +0 -1
- package/dist/cjs/output/jupyter.js +0 -75
- package/dist/cjs/output/output.d.ts +0 -7
- package/dist/cjs/output/output.d.ts.map +0 -1
- package/dist/cjs/output/output.js +0 -66
- package/dist/cjs/output/outputBlock.d.ts +0 -10
- package/dist/cjs/output/outputBlock.d.ts.map +0 -1
- package/dist/cjs/output/outputBlock.js +0 -13
- package/dist/cjs/output/safe.d.ts +0 -7
- package/dist/cjs/output/safe.d.ts.map +0 -1
- package/dist/cjs/output/safe.js +0 -77
- package/dist/cjs/output/selectors.d.ts +0 -10
- package/dist/cjs/output/selectors.d.ts.map +0 -1
- package/dist/cjs/output/selectors.js +0 -10
- package/dist/cjs/output/stream.d.ts +0 -6
- package/dist/cjs/output/stream.d.ts.map +0 -1
- package/dist/cjs/output/stream.js +0 -13
- package/dist/cjs/types.d.ts +0 -7
- package/dist/cjs/types.d.ts.map +0 -1
- package/dist/cjs/types.js +0 -2
- package/dist/types/output/components.d.ts +0 -10
- package/dist/types/output/components.d.ts.map +0 -1
- package/dist/types/output/error.d.ts +0 -6
- package/dist/types/output/error.d.ts.map +0 -1
- package/dist/types/output/hooks.d.ts +0 -67
- package/dist/types/output/hooks.d.ts.map +0 -1
- package/dist/types/output/index.d.ts +0 -6
- package/dist/types/output/index.d.ts.map +0 -1
- package/dist/types/output/jupyter.d.ts +0 -7
- package/dist/types/output/jupyter.d.ts.map +0 -1
- package/dist/types/output/output.d.ts +0 -7
- package/dist/types/output/output.d.ts.map +0 -1
- package/dist/types/output/outputBlock.d.ts +0 -10
- package/dist/types/output/outputBlock.d.ts.map +0 -1
- package/dist/types/output/safe.d.ts +0 -7
- package/dist/types/output/safe.d.ts.map +0 -1
- package/dist/types/output/selectors.d.ts +0 -10
- package/dist/types/output/selectors.d.ts.map +0 -1
- package/dist/types/output/stream.d.ts +0 -6
- package/dist/types/output/stream.d.ts.map +0 -1
- package/dist/types/types.d.ts +0 -7
- package/dist/types/types.d.ts.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
|
-
import type { NodeRenderer } from '
|
|
3
|
-
import type { GenericNode } from '
|
|
2
|
+
import type { NodeRenderer } from '@myst-theme/providers';
|
|
3
|
+
import type { GenericNode } from 'myst-common';
|
|
4
4
|
export declare function toReact(fragment: GenericNode[], replacements: Record<string, NodeRenderer>): React.ReactNode;
|
|
5
5
|
export declare function mystToReact(content: GenericNode, replacements: Record<string, NodeRenderer>): React.ReactNode;
|
|
6
6
|
//# sourceMappingURL=convertToReact.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"convertToReact.d.ts","sourceRoot":"","sources":["../../src/convertToReact.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"convertToReact.d.ts","sourceRoot":"","sources":["../../src/convertToReact.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE/C,wBAAgB,OAAO,CACrB,QAAQ,EAAE,WAAW,EAAE,EACvB,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,GACzC,KAAK,CAAC,SAAS,CAiBjB;AAED,wBAAgB,WAAW,CACzB,OAAO,EAAE,WAAW,EACpB,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,GACzC,KAAK,CAAC,SAAS,CAEjB"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import type { CrossReference } from 'myst-spec';
|
|
3
|
-
import type { NodeRenderer } from '
|
|
3
|
+
import type { NodeRenderer } from '@myst-theme/providers';
|
|
4
4
|
export declare function ReferencedContent({ identifier, close, }: {
|
|
5
5
|
identifier: string;
|
|
6
6
|
close: () => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"crossReference.d.ts","sourceRoot":"","sources":["../../src/crossReference.tsx"],"names":[],"mappings":";AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"crossReference.d.ts","sourceRoot":"","sources":["../../src/crossReference.tsx"],"names":[],"mappings":";AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAgBhD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAuC1D,wBAAgB,iBAAiB,CAAC,EAChC,UAAU,EACV,KAAK,GACN,EAAE;IACD,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,IAAI,CAAC;CACnB,eAuDA;AAED,eAAO,MAAM,kBAAkB,EAAE,YAAY,CAAC,cAAc,CAuB3D,CAAC;AAEF,QAAA,MAAM,yBAAyB;;CAE9B,CAAC;AAEF,eAAe,yBAAyB,CAAC"}
|
package/dist/types/dropdown.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dropdown.d.ts","sourceRoot":"","sources":["../../src/dropdown.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"dropdown.d.ts","sourceRoot":"","sources":["../../src/dropdown.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAI1D,KAAK,YAAY,GAAG;IAClB,IAAI,EAAE,SAAS,CAAC;IAChB,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB,CAAC;AACF,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,SAAS,CAAC;CACjB,CAAC;AAIF,eAAO,MAAM,YAAY,EAAE,YAAY,CAAC,WAAW,CAElD,CAAC;AAqCF,eAAO,MAAM,eAAe,EAAE,YAAY,CAAC,YAAY,CAOtD,CAAC;AAEF,QAAA,MAAM,kBAAkB;;;CAGvB,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chemicalFormula.d.ts","sourceRoot":"","sources":["../../../src/extensions/chemicalFormula.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"chemicalFormula.d.ts","sourceRoot":"","sources":["../../../src/extensions/chemicalFormula.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAyB1D,eAAO,MAAM,eAAe,EAAE,YAU7B,CAAC;AAEF,QAAA,MAAM,cAAc;;CAEnB,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/extensions/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/extensions/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAI1D,QAAA,MAAM,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,CAG/C,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"siunits.d.ts","sourceRoot":"","sources":["../../../src/extensions/siunits.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"siunits.d.ts","sourceRoot":"","sources":["../../../src/extensions/siunits.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAE1D,eAAO,MAAM,OAAO,EAAE,YAMrB,CAAC;AAEF,QAAA,MAAM,YAAY;;CAEjB,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"footnotes.d.ts","sourceRoot":"","sources":["../../src/footnotes.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"footnotes.d.ts","sourceRoot":"","sources":["../../src/footnotes.tsx"],"names":[],"mappings":";AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAK1D,wBAAgB,kBAAkB,CAAC,EAAE,UAAU,EAAE,EAAE;IAAE,UAAU,EAAE,MAAM,CAAA;CAAE,eAKxE;AAED,eAAO,MAAM,iBAAiB,EAAE,YAU/B,CAAC;AAEF,QAAA,MAAM,kBAAkB;;CAEvB,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
|
package/dist/types/grid.d.ts
CHANGED
package/dist/types/grid.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"grid.d.ts","sourceRoot":"","sources":["../../src/grid.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"grid.d.ts","sourceRoot":"","sources":["../../src/grid.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAE1D,KAAK,QAAQ,GAAG;IACd,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB,CAAC;AA2GF,eAAO,MAAM,YAAY,EAAE,YAAY,CAAC,QAAQ,CAM/C,CAAC;AAEF,QAAA,MAAM,cAAc;;CAEnB,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
package/dist/types/heading.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"heading.d.ts","sourceRoot":"","sources":["../../src/heading.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"heading.d.ts","sourceRoot":"","sources":["../../src/heading.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAS1D,wBAAgB,QAAQ,CAAC,EACvB,EAAE,EACF,IAAI,EACJ,KAAc,GACf,EAAE;IACD,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;CAC1B,sBAqBA;AAED,QAAA,MAAM,OAAO,EAAE,YAAY,CAAC,OAAO,CAoBlC,CAAC;AAEF,QAAA,MAAM,iBAAiB;;CAEtB,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
|
package/dist/types/iframe.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"iframe.d.ts","sourceRoot":"","sources":["../../src/iframe.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"iframe.d.ts","sourceRoot":"","sources":["../../src/iframe.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAE1D,eAAO,MAAM,MAAM,EAAE,YAiCpB,CAAC;AAEF,QAAA,MAAM,gBAAgB;;CAErB,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
|
package/dist/types/image.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"image.d.ts","sourceRoot":"","sources":["../../src/image.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"image.d.ts","sourceRoot":"","sources":["../../src/image.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,IAAI,aAAa,EAAE,MAAM,WAAW,CAAC;AACxD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAI1D,KAAK,SAAS,GAAG,aAAa,GAAG;IAAE,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAwErD,eAAO,MAAM,KAAK,EAAE,YAAY,CAAC,SAAS,CAczC,CAAC;AAEF,QAAA,MAAM,eAAe;;CAEpB,CAAC;AAEF,eAAe,eAAe,CAAC"}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import type { NodeRenderer } from '
|
|
2
|
+
import type { NodeRenderer } from '@myst-theme/providers';
|
|
3
3
|
import type { GenericParent } from 'myst-common';
|
|
4
|
-
export type { NodeRenderer } from './types';
|
|
5
4
|
export { CopyIcon } from './components/CopyIcon';
|
|
6
5
|
export { CodeBlock } from './code';
|
|
7
6
|
export { Admonition, AdmonitionKind } from './admonitions';
|
|
7
|
+
export { TabSet, TabItem } from './tabs';
|
|
8
8
|
export declare const DEFAULT_RENDERERS: Record<string, NodeRenderer>;
|
|
9
9
|
export declare function useParse(node: GenericParent | null, renderers?: Record<string, NodeRenderer>): import("react").ReactNode;
|
|
10
10
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAoBjD,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AACnC,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC3D,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAEzC,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,CAkB1D,CAAC;AAEF,wBAAgB,QAAQ,CACtB,IAAI,EAAE,aAAa,GAAG,IAAI,EAC1B,SAAS,GAAE,MAAM,CAAC,MAAM,EAAE,YAAY,CAAqB,6BAU5D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/links/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAOtC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/links/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAOtC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAO1D,KAAK,eAAe,GAAG,IAAI,GAAG;IAAE,QAAQ,CAAC,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAiDxE,eAAO,MAAM,IAAI,EAAE,YAAY,CAAC,eAAe,CA+C9C,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,YAAY,CAAC,eAAe,CAkCnD,CAAC;AAEF,QAAA,MAAM,cAAc;;;CAGnB,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
package/dist/types/math.d.ts
CHANGED
package/dist/types/math.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"math.d.ts","sourceRoot":"","sources":["../../src/math.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAGlD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"math.d.ts","sourceRoot":"","sources":["../../src/math.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAGlD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AA2B1D,KAAK,QAAQ,GAAG,CAAC,UAAU,GAAG,IAAI,CAAC,GAAG;IACpC,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAuCF,QAAA,MAAM,cAAc;;;CAGnB,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
package/dist/types/tabs.d.ts
CHANGED
|
@@ -1,10 +1,25 @@
|
|
|
1
|
-
import type { GenericNode } from '
|
|
2
|
-
import
|
|
1
|
+
import type { GenericNode } from 'myst-common';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import type { NodeRenderer } from '@myst-theme/providers';
|
|
3
4
|
interface TabItem extends GenericNode {
|
|
4
5
|
key: string;
|
|
5
6
|
title: string;
|
|
6
7
|
sync?: string;
|
|
8
|
+
selected?: boolean;
|
|
7
9
|
}
|
|
10
|
+
type Tab = {
|
|
11
|
+
title: string | React.ReactNode;
|
|
12
|
+
id: string;
|
|
13
|
+
sync?: string;
|
|
14
|
+
selected?: boolean;
|
|
15
|
+
};
|
|
16
|
+
export declare function TabSet({ tabs, children }: {
|
|
17
|
+
tabs: Tab[];
|
|
18
|
+
children: React.ReactNode;
|
|
19
|
+
}): JSX.Element;
|
|
20
|
+
export declare function TabItem({ id, children, }: Omit<Tab, 'title' | 'sync'> & {
|
|
21
|
+
children: React.ReactNode;
|
|
22
|
+
}): JSX.Element;
|
|
8
23
|
export declare const TabSetRenderer: NodeRenderer;
|
|
9
24
|
export declare const TabItemRenderer: NodeRenderer<TabItem>;
|
|
10
25
|
declare const TAB_RENDERERS: Record<string, NodeRenderer>;
|
package/dist/types/tabs.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tabs.d.ts","sourceRoot":"","sources":["../../src/tabs.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"tabs.d.ts","sourceRoot":"","sources":["../../src/tabs.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,KAAyD,MAAM,OAAO,CAAC;AAE9E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAG1D,UAAU,OAAQ,SAAQ,WAAW;IACnC,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AASD,KAAK,GAAG,GAAG;IAAE,KAAK,EAAE,MAAM,GAAG,KAAK,CAAC,SAAS,CAAC;IAAC,EAAE,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC;AAE9F,wBAAgB,MAAM,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE;IAAE,IAAI,EAAE,GAAG,EAAE,CAAC;IAAC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,eA+CpF;AAED,wBAAgB,OAAO,CAAC,EACtB,EAAE,EACF,QAAQ,GACT,EAAE,IAAI,CAAC,GAAG,EAAE,OAAO,GAAG,MAAM,CAAC,GAAG;IAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,eAI7D;AAED,eAAO,MAAM,cAAc,EAAE,YAY5B,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,YAAY,CAAC,OAAO,CAMjD,CAAC;AAEF,QAAA,MAAM,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,CAG/C,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "myst-to-react",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.21",
|
|
4
4
|
"main": "dist/cjs/index.js",
|
|
5
5
|
"types": "dist/types/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -9,7 +9,6 @@
|
|
|
9
9
|
"license": "MIT",
|
|
10
10
|
"scripts": {
|
|
11
11
|
"clean": "rimraf dist",
|
|
12
|
-
"compile": "tsc",
|
|
13
12
|
"lint": "eslint \"src/**/*.ts*\" \"src/**/*.tsx\" -c ./.eslintrc.js",
|
|
14
13
|
"lint:format": "prettier --check \"src/**/*.{ts,tsx,md}\"",
|
|
15
14
|
"dev": "npm-run-all --parallel \"build:* -- --watch\"",
|
|
@@ -18,18 +17,14 @@
|
|
|
18
17
|
"build": "npm-run-all -l clean -p build:cjs build:types"
|
|
19
18
|
},
|
|
20
19
|
"dependencies": {
|
|
21
|
-
"@
|
|
22
|
-
"@
|
|
23
|
-
"@
|
|
24
|
-
"@
|
|
25
|
-
"@headlessui/react": "^1.6.5",
|
|
26
|
-
"@heroicons/react": "^2.0.12",
|
|
27
|
-
"@popperjs/core": "^2.11.5",
|
|
28
|
-
"ansi-to-react": "^6.1.6",
|
|
20
|
+
"@myst-theme/providers": "^0.1.21",
|
|
21
|
+
"@headlessui/react": "^1.7.7",
|
|
22
|
+
"@heroicons/react": "^2.0.13",
|
|
23
|
+
"@popperjs/core": "^2.11.6",
|
|
29
24
|
"buffer": "^6.0.3",
|
|
30
|
-
"classnames": "^2.3.
|
|
25
|
+
"classnames": "^2.3.2",
|
|
31
26
|
"myst-common": "^0.0.12",
|
|
32
|
-
"myst-config": "^0.0.
|
|
27
|
+
"myst-config": "^0.0.7",
|
|
33
28
|
"myst-spec": "^0.0.4",
|
|
34
29
|
"nanoid": "^4.0.0",
|
|
35
30
|
"react-popper": "^2.3.0",
|
|
@@ -46,7 +41,7 @@
|
|
|
46
41
|
},
|
|
47
42
|
"devDependencies": {
|
|
48
43
|
"@types/js-yaml": "^4.0.5",
|
|
49
|
-
"@types/react-syntax-highlighter": "^15.5.
|
|
44
|
+
"@types/react-syntax-highlighter": "^15.5.6",
|
|
50
45
|
"eslint": "^8.21.0",
|
|
51
46
|
"eslint-config-curvenote": "latest",
|
|
52
47
|
"npm-run-all": "^4.1.5",
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
export declare const MaybeLongContent: ({ content, path, render, }: {
|
|
3
|
-
content?: string | undefined;
|
|
4
|
-
path?: string | undefined;
|
|
5
|
-
render: (content: string) => JSX.Element;
|
|
6
|
-
}) => JSX.Element;
|
|
7
|
-
export declare const DangerousHTML: ({ content, ...rest }: {
|
|
8
|
-
content: string;
|
|
9
|
-
}) => JSX.Element;
|
|
10
|
-
//# sourceMappingURL=components.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"components.d.ts","sourceRoot":"","sources":["../../../src/output/components.tsx"],"names":[],"mappings":";AAGA,eAAO,MAAM,gBAAgB;;;sBAOT,MAAM,KAAK,WAAW;iBAUzC,CAAC;AAEF,eAAO,MAAM,aAAa;aAAqC,MAAM;iBAWpE,CAAC"}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
|
-
var t = {};
|
|
4
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
-
t[p] = s[p];
|
|
6
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
-
t[p[i]] = s[p[i]];
|
|
10
|
-
}
|
|
11
|
-
return t;
|
|
12
|
-
};
|
|
13
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
-
exports.DangerousHTML = exports.MaybeLongContent = void 0;
|
|
15
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
16
|
-
const react_1 = require("react");
|
|
17
|
-
const hooks_1 = require("./hooks");
|
|
18
|
-
const MaybeLongContent = ({ content, path, render, }) => {
|
|
19
|
-
const { error, data } = (0, hooks_1.useLongContent)(content, path);
|
|
20
|
-
if (error) {
|
|
21
|
-
return (0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "text-red-500" }, { children: ["Error loading content: ", error.message] }));
|
|
22
|
-
}
|
|
23
|
-
if (!data) {
|
|
24
|
-
return (0, jsx_runtime_1.jsx)("div", { children: "Fetching long content...." });
|
|
25
|
-
}
|
|
26
|
-
return (0, jsx_runtime_1.jsx)("div", { children: render(data.content) });
|
|
27
|
-
};
|
|
28
|
-
exports.MaybeLongContent = MaybeLongContent;
|
|
29
|
-
const DangerousHTML = (_a) => {
|
|
30
|
-
var { content } = _a, rest = __rest(_a, ["content"]);
|
|
31
|
-
const ref = (0, react_1.useRef)(null);
|
|
32
|
-
(0, react_1.useEffect)(() => {
|
|
33
|
-
if (!content || !ref.current)
|
|
34
|
-
return;
|
|
35
|
-
const el = document.createRange().createContextualFragment(content);
|
|
36
|
-
ref.current.innerHTML = '';
|
|
37
|
-
ref.current.appendChild(el);
|
|
38
|
-
}, [content, ref]);
|
|
39
|
-
return (0, jsx_runtime_1.jsx)("div", Object.assign({}, rest, { ref: ref }));
|
|
40
|
-
};
|
|
41
|
-
exports.DangerousHTML = DangerousHTML;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"error.d.ts","sourceRoot":"","sources":["../../../src/output/error.tsx"],"names":[],"mappings":";AAEA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAG3D,MAAM,CAAC,OAAO,UAAU,KAAK,CAAC,EAAE,MAAM,EAAE,EAAE;IAAE,MAAM,EAAE,mBAAmB,CAAA;CAAE,eAcxE"}
|
package/dist/cjs/output/error.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
7
|
-
const ansi_to_react_1 = __importDefault(require("ansi-to-react"));
|
|
8
|
-
const blocks_1 = require("@curvenote/blocks");
|
|
9
|
-
const components_1 = require("./components");
|
|
10
|
-
function Error({ output }) {
|
|
11
|
-
return ((0, jsx_runtime_1.jsx)(components_1.MaybeLongContent, { content: (0, blocks_1.ensureString)(output.traceback), path: output.path, render: (content) => {
|
|
12
|
-
return ((0, jsx_runtime_1.jsx)("pre", Object.assign({ className: "text-sm font-thin font-system jupyter-error" }, { children: (0, jsx_runtime_1.jsx)(ansi_to_react_1.default, { children: content !== null && content !== void 0 ? content : '' }) })));
|
|
13
|
-
} }));
|
|
14
|
-
}
|
|
15
|
-
exports.default = Error;
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import type { MinifiedOutput } from '@curvenote/nbtx/dist/minify/types';
|
|
2
|
-
/**
|
|
3
|
-
* Truncation vs Summarization
|
|
4
|
-
*
|
|
5
|
-
* In Curvespace, we're decided to change our data structure for outputs to align it as
|
|
6
|
-
* closely as possible with Jupyters nbformat.IOutput[] type, but in a way that still allows
|
|
7
|
-
* us to truncate output content and push that to storage.
|
|
8
|
-
*
|
|
9
|
-
* This will be used only in the CLI and Curvespace initially but should be ported back to
|
|
10
|
-
* the rest of the code base. This will mean
|
|
11
|
-
*
|
|
12
|
-
* - changing the DB schema
|
|
13
|
-
* - migration
|
|
14
|
-
* - changing API response
|
|
15
|
-
* - changing the frontend
|
|
16
|
-
* - changing the extension
|
|
17
|
-
*
|
|
18
|
-
*/
|
|
19
|
-
interface LongContent {
|
|
20
|
-
content_type?: string;
|
|
21
|
-
content: string;
|
|
22
|
-
}
|
|
23
|
-
export declare function useLongContent(content?: string, url?: string): {
|
|
24
|
-
data?: LongContent;
|
|
25
|
-
error?: Error;
|
|
26
|
-
};
|
|
27
|
-
export declare function useFetchAnyTruncatedContent(outputs: MinifiedOutput[]): {
|
|
28
|
-
data: ({
|
|
29
|
-
data: {};
|
|
30
|
-
path?: string | undefined;
|
|
31
|
-
traceback: string & string[];
|
|
32
|
-
output_type: "error";
|
|
33
|
-
ename: string;
|
|
34
|
-
evalue: string;
|
|
35
|
-
} | {
|
|
36
|
-
data: {};
|
|
37
|
-
path?: string | undefined;
|
|
38
|
-
output_type: "stream";
|
|
39
|
-
name: import("@jupyterlab/nbformat").StreamType;
|
|
40
|
-
text: import("@jupyterlab/nbformat").MultilineString;
|
|
41
|
-
} | {
|
|
42
|
-
data: {};
|
|
43
|
-
output_type: import("@curvenote/nbtx/dist/minify/types").MimeOutputType;
|
|
44
|
-
execution_count?: import("@jupyterlab/nbformat").ExecutionCount | undefined;
|
|
45
|
-
metadata: import("@lumino/coreutils").PartialJSONObject;
|
|
46
|
-
} | {
|
|
47
|
-
[x: string]: import("@lumino/coreutils").PartialJSONValue | undefined;
|
|
48
|
-
path?: string | undefined;
|
|
49
|
-
traceback: string & string[];
|
|
50
|
-
output_type: "error";
|
|
51
|
-
ename: string;
|
|
52
|
-
evalue: string;
|
|
53
|
-
} | {
|
|
54
|
-
[x: string]: import("@lumino/coreutils").PartialJSONValue | undefined;
|
|
55
|
-
path?: string | undefined;
|
|
56
|
-
output_type: "stream";
|
|
57
|
-
name: import("@jupyterlab/nbformat").StreamType;
|
|
58
|
-
text: import("@jupyterlab/nbformat").MultilineString;
|
|
59
|
-
})[] | undefined;
|
|
60
|
-
error: any;
|
|
61
|
-
};
|
|
62
|
-
export default function useWindowSize(): {
|
|
63
|
-
width: number;
|
|
64
|
-
height: number;
|
|
65
|
-
};
|
|
66
|
-
export {};
|
|
67
|
-
//# sourceMappingURL=hooks.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../../src/output/hooks.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAIV,cAAc,EAEf,MAAM,mCAAmC,CAAC;AAI3C;;;;;;;;;;;;;;;;GAgBG;AAEH,UAAU,WAAW;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,OAAO,EAAE,MAAM,CAAC;CACjB;AAQD,wBAAgB,cAAc,CAC5B,OAAO,CAAC,EAAE,MAAM,EAChB,GAAG,CAAC,EAAE,MAAM,GACX;IAAE,IAAI,CAAC,EAAE,WAAW,CAAC;IAAC,KAAK,CAAC,EAAE,KAAK,CAAA;CAAE,CAQvC;AAuBD,wBAAgB,2BAA2B,CAAC,OAAO,EAAE,cAAc,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA6BpE;AAUD,MAAM,CAAC,OAAO,UAAU,aAAa;;;EAapC"}
|
package/dist/cjs/output/hooks.js
DELETED
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.useFetchAnyTruncatedContent = exports.useLongContent = void 0;
|
|
7
|
-
const immutable_1 = __importDefault(require("swr/immutable"));
|
|
8
|
-
const utils_1 = require("@curvenote/nbtx/dist/minify/utils");
|
|
9
|
-
const react_1 = require("react");
|
|
10
|
-
const fetcher = (...args) => fetch(...args).then((res) => {
|
|
11
|
-
if (res.status === 200)
|
|
12
|
-
return res.json();
|
|
13
|
-
throw new Error(`Content returned with status ${res.status}.`);
|
|
14
|
-
});
|
|
15
|
-
function useLongContent(content, url) {
|
|
16
|
-
if (typeof document === 'undefined') {
|
|
17
|
-
// This is ONLY called on the server
|
|
18
|
-
return url ? {} : { data: { content: content !== null && content !== void 0 ? content : '' } };
|
|
19
|
-
}
|
|
20
|
-
const { data, error } = (0, immutable_1.default)(url || null, fetcher);
|
|
21
|
-
if (!url)
|
|
22
|
-
return { data: { content: content !== null && content !== void 0 ? content : '' } };
|
|
23
|
-
return { data, error };
|
|
24
|
-
}
|
|
25
|
-
exports.useLongContent = useLongContent;
|
|
26
|
-
const arrayFetcher = (...urls) => {
|
|
27
|
-
return Promise.all(urls.map((url) => fetcher(url)));
|
|
28
|
-
};
|
|
29
|
-
function shallowCloneOutputs(outputs) {
|
|
30
|
-
return outputs.map((output) => {
|
|
31
|
-
if ('data' in output && output.data) {
|
|
32
|
-
const data = output.data;
|
|
33
|
-
return Object.assign(Object.assign({}, output), { data: Object.entries(data).reduce((acc, [mimetype, payload]) => {
|
|
34
|
-
return Object.assign(Object.assign({}, acc), { [mimetype]: Object.assign({}, payload) });
|
|
35
|
-
}, {}) });
|
|
36
|
-
}
|
|
37
|
-
return Object.assign({}, output);
|
|
38
|
-
});
|
|
39
|
-
}
|
|
40
|
-
function useFetchAnyTruncatedContent(outputs) {
|
|
41
|
-
const itemsWithPaths = [];
|
|
42
|
-
const updated = shallowCloneOutputs(outputs);
|
|
43
|
-
(0, utils_1.walkPaths)(updated, (path, obj) => {
|
|
44
|
-
// images have paths, but we don't need to fetch them
|
|
45
|
-
if ('content_type' in obj && obj.content_type.startsWith('image/'))
|
|
46
|
-
return;
|
|
47
|
-
obj.path = path;
|
|
48
|
-
itemsWithPaths.push(obj);
|
|
49
|
-
});
|
|
50
|
-
const { data, error } = (0, immutable_1.default)(itemsWithPaths.map(({ path }) => path), arrayFetcher);
|
|
51
|
-
data === null || data === void 0 ? void 0 : data.forEach(({ content }, idx) => {
|
|
52
|
-
const obj = itemsWithPaths[idx];
|
|
53
|
-
if ('text' in obj)
|
|
54
|
-
obj.text = content; // stream
|
|
55
|
-
if ('traceback' in obj)
|
|
56
|
-
obj.traceback = content; // error
|
|
57
|
-
if ('content' in obj)
|
|
58
|
-
obj.content = content; // mimeoutput
|
|
59
|
-
obj.path = undefined;
|
|
60
|
-
});
|
|
61
|
-
return {
|
|
62
|
-
data: itemsWithPaths.length === 0 || data ? updated : undefined,
|
|
63
|
-
error,
|
|
64
|
-
};
|
|
65
|
-
}
|
|
66
|
-
exports.useFetchAnyTruncatedContent = useFetchAnyTruncatedContent;
|
|
67
|
-
function getWindowSize() {
|
|
68
|
-
const { innerWidth: width, innerHeight: height } = window;
|
|
69
|
-
return {
|
|
70
|
-
width,
|
|
71
|
-
height,
|
|
72
|
-
};
|
|
73
|
-
}
|
|
74
|
-
function useWindowSize() {
|
|
75
|
-
const [windowSize, setWindowSize] = (0, react_1.useState)(getWindowSize());
|
|
76
|
-
(0, react_1.useLayoutEffect)(() => {
|
|
77
|
-
function handleResize() {
|
|
78
|
-
setWindowSize(getWindowSize());
|
|
79
|
-
}
|
|
80
|
-
window.addEventListener('resize', handleResize);
|
|
81
|
-
return () => window.removeEventListener('resize', handleResize);
|
|
82
|
-
}, []);
|
|
83
|
-
return windowSize;
|
|
84
|
-
}
|
|
85
|
-
exports.default = useWindowSize;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/output/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,QAAA,MAAM,gBAAgB;;CAErB,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
|
package/dist/cjs/output/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"jupyter.d.ts","sourceRoot":"","sources":["../../../src/output/jupyter.tsx"],"names":[],"mappings":";AAKA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAQtD,eAAO,MAAM,oBAAoB;QAI3B,MAAM;aACD,cAAc,EAAE;iBAmE1B,CAAC"}
|