@kwirthmagnify/kwirth-common-front 0.5.6 → 0.5.8

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.
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ interface IMarkdownViewerProps {
3
+ content: string;
4
+ style?: React.CSSProperties;
5
+ }
6
+ declare const MarkdownViewer: React.FC<IMarkdownViewerProps>;
7
+ export { MarkdownViewer };
@@ -0,0 +1,13 @@
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.MarkdownViewer = void 0;
7
+ const react_1 = __importDefault(require("react"));
8
+ const react_markdown_1 = __importDefault(require("react-markdown"));
9
+ const MarkdownViewer = ({ content, style }) => {
10
+ return (react_1.default.createElement("div", { style: Object.assign({ fontSize: 14, lineHeight: 1.6 }, style) },
11
+ react_1.default.createElement(react_markdown_1.default, null, content)));
12
+ };
13
+ exports.MarkdownViewer = MarkdownViewer;
package/dist/index.d.ts CHANGED
@@ -18,7 +18,7 @@ export interface IChannelObject {
18
18
  config: any;
19
19
  data: any;
20
20
  accessString?: string;
21
- isElectron: boolean;
21
+ isDesktop: boolean;
22
22
  channelId: string;
23
23
  frontChannels?: Map<string, TChannelConstructor>;
24
24
  notifications?: any[];
@@ -33,6 +33,7 @@ export interface IChannelObject {
33
33
  setPalette?: (palette: string) => void;
34
34
  notify?: (channelId: string | undefined, level: ENotifyLevel, message: string) => void;
35
35
  exit?: () => void;
36
+ stopChannel?: () => void;
36
37
  }
37
38
  export interface ISetupProps {
38
39
  onChannelSetupClosed: (channel: IChannel, channelSettings: IChannelSettings, start: boolean, defaultValues: boolean) => void;
@@ -71,3 +72,4 @@ export interface IChannel {
71
72
  onExternalConfigApply?: (channelObject: IChannelObject, values: any) => boolean;
72
73
  }
73
74
  export declare const cleanANSI: (text: string) => string;
75
+ export { MarkdownViewer } from './MarkdownViewer';
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.cleanANSI = exports.ENotifyLevel = exports.EChannelRefreshAction = exports.useKeyboard = void 0;
3
+ exports.MarkdownViewer = exports.cleanANSI = exports.ENotifyLevel = exports.EChannelRefreshAction = exports.useKeyboard = void 0;
4
4
  const react_1 = require("react");
5
5
  const kwirth_common_1 = require("@kwirthmagnify/kwirth-common");
6
6
  Object.defineProperty(exports, "EChannelRefreshAction", { enumerable: true, get: function () { return kwirth_common_1.EChannelRefreshAction; } });
@@ -30,3 +30,5 @@ const useKeyboard = (onEscape, id) => {
30
30
  exports.useKeyboard = useKeyboard;
31
31
  const cleanANSI = (text) => text.replace(/\x1b\[[0-9;]*[mKHVfJrcegH]|\x1b\[\d*n/g, '');
32
32
  exports.cleanANSI = cleanANSI;
33
+ var MarkdownViewer_1 = require("./MarkdownViewer");
34
+ Object.defineProperty(exports, "MarkdownViewer", { enumerable: true, get: function () { return MarkdownViewer_1.MarkdownViewer; } });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kwirthmagnify/kwirth-common-front",
3
- "version": "0.5.6",
3
+ "version": "0.5.8",
4
4
  "description": "Frontend channel interfaces for Kwirth plugins and channels",
5
5
  "scripts": {
6
6
  "build": "del .\\dist\\* /s /q && tsc"
@@ -18,7 +18,8 @@
18
18
  "author": "Julio Fernandez",
19
19
  "license": "ISC",
20
20
  "dependencies": {
21
- "@kwirthmagnify/kwirth-common": "^0.5.1"
21
+ "@kwirthmagnify/kwirth-common": "^0.5.1",
22
+ "react-markdown": "^10.1.0"
22
23
  },
23
24
  "peerDependencies": {
24
25
  "react": ">=18.0.0"