@gearbox-protocol/permissionless-ui 1.2.0 → 1.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.
@@ -1,5 +1,4 @@
1
1
  "use strict";
2
- "use client";
3
2
  var __create = Object.create;
4
3
  var __defProp = Object.defineProperty;
5
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -28,7 +28,7 @@ __reExport(components_exports, require('./editable-table/index.js'), module.expo
28
28
  __reExport(components_exports, require('./input.js'), module.exports);
29
29
  __reExport(components_exports, require('./label.js'), module.exports);
30
30
  __reExport(components_exports, require('./layout/index.js'), module.exports);
31
- __reExport(components_exports, require('./markdown-viewer.js'), module.exports);
31
+ __reExport(components_exports, require('./markdown/index.js'), module.exports);
32
32
  __reExport(components_exports, require('./search-bar.js'), module.exports);
33
33
  __reExport(components_exports, require('./select.js'), module.exports);
34
34
  __reExport(components_exports, require('./signatures/index.js'), module.exports);
@@ -53,7 +53,7 @@ __reExport(components_exports, require('./tooltip.js'), module.exports);
53
53
  ...require('./input.js'),
54
54
  ...require('./label.js'),
55
55
  ...require('./layout/index.js'),
56
- ...require('./markdown-viewer.js'),
56
+ ...require('./markdown/index.js'),
57
57
  ...require('./search-bar.js'),
58
58
  ...require('./select.js'),
59
59
  ...require('./signatures/index.js'),
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __copyProps = (to, from, except, desc) => {
7
+ if (from && typeof from === "object" || typeof from === "function") {
8
+ for (let key of __getOwnPropNames(from))
9
+ if (!__hasOwnProp.call(to, key) && key !== except)
10
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
+ }
12
+ return to;
13
+ };
14
+ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
15
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
16
+ var markdown_exports = {};
17
+ module.exports = __toCommonJS(markdown_exports);
18
+ __reExport(markdown_exports, require('./markdown-viewer-wrapper.js'), module.exports);
19
+ // Annotate the CommonJS export names for ESM import in node:
20
+ 0 && (module.exports = {
21
+ ...require('./markdown-viewer-wrapper.js')
22
+ });
@@ -0,0 +1,45 @@
1
+ "use strict";
2
+ "use client";
3
+ var __create = Object.create;
4
+ var __defProp = Object.defineProperty;
5
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
+ var __getOwnPropNames = Object.getOwnPropertyNames;
7
+ var __getProtoOf = Object.getPrototypeOf;
8
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
9
+ var __export = (target, all) => {
10
+ for (var name in all)
11
+ __defProp(target, name, { get: all[name], enumerable: true });
12
+ };
13
+ var __copyProps = (to, from, except, desc) => {
14
+ if (from && typeof from === "object" || typeof from === "function") {
15
+ for (let key of __getOwnPropNames(from))
16
+ if (!__hasOwnProp.call(to, key) && key !== except)
17
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
18
+ }
19
+ return to;
20
+ };
21
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
22
+ // If the importer is in node compatibility mode or this is not an ESM
23
+ // file that has been converted to a CommonJS file using a Babel-
24
+ // compatible transform (i.e. "__esModule" has not been set), then set
25
+ // "default" to the CommonJS "module.exports" for node compatibility.
26
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
27
+ mod
28
+ ));
29
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
30
+ var markdown_viewer_wrapper_exports = {};
31
+ __export(markdown_viewer_wrapper_exports, {
32
+ MarkdownViewer: () => MarkdownViewer
33
+ });
34
+ module.exports = __toCommonJS(markdown_viewer_wrapper_exports);
35
+ var import_dynamic = __toESM(require("next/dynamic"));
36
+ const MarkdownViewer = (0, import_dynamic.default)(
37
+ () => import("./markdown-viewer"),
38
+ {
39
+ ssr: false
40
+ }
41
+ );
42
+ // Annotate the CommonJS export names for ESM import in node:
43
+ 0 && (module.exports = {
44
+ MarkdownViewer
45
+ });
@@ -1,4 +1,5 @@
1
1
  "use strict";
2
+ "use client";
2
3
  var __create = Object.create;
3
4
  var __defProp = Object.defineProperty;
4
5
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -28,7 +29,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
28
29
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
30
  var markdown_viewer_exports = {};
30
31
  __export(markdown_viewer_exports, {
31
- MarkdownViewer: () => MarkdownViewer
32
+ default: () => MarkdownViewer
32
33
  });
33
34
  module.exports = __toCommonJS(markdown_viewer_exports);
34
35
  var import_jsx_runtime = require("react/jsx-runtime");
@@ -36,7 +37,7 @@ var import_navigation = require("next/navigation");
36
37
  var import_react = require("react");
37
38
  var import_react_markdown = __toESM(require("react-markdown"));
38
39
  var import_remark_gfm = __toESM(require("remark-gfm"));
39
- var import_layout = require('./layout/index.js');
40
+ var import_layout = require('../layout/index.js');
40
41
  function slugify(text) {
41
42
  return text.toLowerCase().trim().replace(/[^\w\s-]/g, "").replace(/\s+/g, "-").replace(/-+/g, "-");
42
43
  }
@@ -68,7 +69,10 @@ function extractCustomId(children) {
68
69
  }
69
70
  return { id: slugify(text), displayText: children };
70
71
  }
71
- function MarkdownViewer({ content, title }) {
72
+ function MarkdownViewer({
73
+ content,
74
+ title
75
+ }) {
72
76
  const router = (0, import_navigation.useRouter)();
73
77
  (0, import_react.useEffect)(() => {
74
78
  const hash = window.location.hash;
@@ -228,7 +232,3 @@ function MarkdownViewer({ content, title }) {
228
232
  }
229
233
  );
230
234
  }
231
- // Annotate the CommonJS export names for ESM import in node:
232
- 0 && (module.exports = {
233
- MarkdownViewer
234
- });
@@ -1,4 +1,3 @@
1
- "use client";
2
1
  import { jsx } from "react/jsx-runtime";
3
2
  import Link from "next/link";
4
3
  import React from "react";
@@ -11,7 +11,7 @@ export * from "./editable-table/index.js";
11
11
  export * from "./input.js";
12
12
  export * from "./label.js";
13
13
  export * from "./layout/index.js";
14
- export * from "./markdown-viewer.js";
14
+ export * from "./markdown/index.js";
15
15
  export * from "./search-bar.js";
16
16
  export * from "./select.js";
17
17
  export * from "./signatures/index.js";
@@ -0,0 +1 @@
1
+ export * from "./markdown-viewer-wrapper.js";
@@ -0,0 +1,11 @@
1
+ "use client";
2
+ import dynamic from "next/dynamic";
3
+ const MarkdownViewer = dynamic(
4
+ () => import("./markdown-viewer"),
5
+ {
6
+ ssr: false
7
+ }
8
+ );
9
+ export {
10
+ MarkdownViewer
11
+ };
@@ -1,9 +1,10 @@
1
+ "use client";
1
2
  import { jsx } from "react/jsx-runtime";
2
3
  import { useRouter } from "next/navigation";
3
4
  import { useEffect } from "react";
4
5
  import ReactMarkdown from "react-markdown";
5
6
  import remarkGfm from "remark-gfm";
6
- import { PageLayout } from "./layout/index.js";
7
+ import { PageLayout } from "../layout/index.js";
7
8
  function slugify(text) {
8
9
  return text.toLowerCase().trim().replace(/[^\w\s-]/g, "").replace(/\s+/g, "-").replace(/-+/g, "-");
9
10
  }
@@ -35,7 +36,10 @@ function extractCustomId(children) {
35
36
  }
36
37
  return { id: slugify(text), displayText: children };
37
38
  }
38
- function MarkdownViewer({ content, title }) {
39
+ function MarkdownViewer({
40
+ content,
41
+ title
42
+ }) {
39
43
  const router = useRouter();
40
44
  useEffect(() => {
41
45
  const hash = window.location.hash;
@@ -196,5 +200,5 @@ function MarkdownViewer({ content, title }) {
196
200
  );
197
201
  }
198
202
  export {
199
- MarkdownViewer
203
+ MarkdownViewer as default
200
204
  };
@@ -11,7 +11,7 @@ export * from "./editable-table";
11
11
  export * from "./input";
12
12
  export * from "./label";
13
13
  export * from "./layout";
14
- export * from "./markdown-viewer";
14
+ export * from "./markdown";
15
15
  export * from "./search-bar";
16
16
  export * from "./select";
17
17
  export * from "./signatures";
@@ -0,0 +1 @@
1
+ export * from "./markdown-viewer-wrapper";
@@ -0,0 +1,2 @@
1
+ import type { MarkdownViewerProps } from "./markdown-viewer";
2
+ export declare const MarkdownViewer: import("react").ComponentType<MarkdownViewerProps>;
@@ -0,0 +1,5 @@
1
+ export interface MarkdownViewerProps {
2
+ content: string;
3
+ title?: string;
4
+ }
5
+ export default function MarkdownViewer({ content, title, }: MarkdownViewerProps): import("react/jsx-runtime").JSX.Element;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gearbox-protocol/permissionless-ui",
3
- "version": "1.2.0",
3
+ "version": "1.2.2",
4
4
  "description": "Internal UI components",
5
5
  "license": "MIT",
6
6
  "main": "./dist/cjs/index.js",
@@ -1,6 +0,0 @@
1
- interface MarkdownViewerProps {
2
- content: string;
3
- title?: string;
4
- }
5
- export declare function MarkdownViewer({ content, title }: MarkdownViewerProps): import("react/jsx-runtime").JSX.Element;
6
- export {};