@nebularstreams/libmui 4.0.4 → 4.0.5

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,117 @@
1
+ /** Attributes accepted by LibMui Mithril widgets. */
2
+ export interface MuiAttrs {
3
+ [name: string]: unknown;
4
+ }
5
+
6
+ /** A Mithril-compatible component supplied by LibMui. */
7
+ export type MuiWidget<A extends MuiAttrs = MuiAttrs> = any;
8
+
9
+ export const Button: MuiWidget;
10
+ export const ButtonChoiceWidget: MuiWidget;
11
+ export const ButtonNew: MuiWidget;
12
+ export const CardieWidget: MuiWidget;
13
+ export const ColorJoeWidget: MuiWidget;
14
+ export const ColorJoePack: MuiWidget;
15
+ export const ComboPrompt: MuiWidget;
16
+ export const ComboWidget: MuiWidget;
17
+ export const CoolerEmpty: MuiWidget;
18
+ export const Empty: MuiWidget;
19
+ export const EmptyButton: MuiWidget;
20
+ export const Icon: MuiWidget;
21
+ export const InputWidget: MuiWidget;
22
+ export const NoticeWidget: MuiWidget;
23
+ export const PlusMinus: MuiWidget;
24
+ export const RangeWidget: MuiWidget;
25
+ export const Selector: MuiWidget;
26
+ export const SmileysButton: MuiWidget;
27
+ export const SwitchWidget: MuiWidget;
28
+ export const Separator: MuiWidget;
29
+ export const TitleBarWidget: MuiWidget;
30
+ export const ThematicWrapper: MuiWidget;
31
+
32
+ export const FileSelectButton: MuiWidget;
33
+ export const ImageDataButton: MuiWidget;
34
+ export const ImageSelectButton: MuiWidget;
35
+ export const ImageProcessButton: MuiWidget;
36
+ export const MediaSelectButton: MuiWidget;
37
+
38
+ export const TemplatedInputWidget: MuiWidget;
39
+ export const ParameterTable: MuiWidget;
40
+ export const ParameterCardie: MuiWidget;
41
+ export const MultiToggleWidget: MuiWidget;
42
+ export const RangeToggleWidget: MuiWidget;
43
+
44
+ export const CoolContentTicker: MuiWidget;
45
+ export const CoolGenericTicker: MuiWidget;
46
+ export const GenericButtonTicker: MuiWidget;
47
+
48
+ export interface NotificationQueue {
49
+ add(text: string, type?: "info" | "success" | "error" | string): void;
50
+ clear(): void;
51
+ }
52
+
53
+ export const Notification: NotificationQueue;
54
+
55
+ export function OverflowMenu(
56
+ domItem: Element,
57
+ item: Record<string, unknown>,
58
+ actions: Array<Record<string, unknown>>,
59
+ options?: Record<string, unknown>
60
+ ): Promise<Record<string, unknown>>;
61
+
62
+ export const OverflowUtils: {
63
+ choose(items: unknown[], config?: Record<string, unknown>): void;
64
+ promptOptions(items: unknown[] | Record<string, unknown>, onchange: (...args: unknown[]) => unknown, options?: Record<string, unknown>): void;
65
+ promptName(title: string, value: string, hint: string, action: (value: string) => unknown, state?: Record<string, unknown>): void;
66
+ [name: string]: unknown;
67
+ };
68
+
69
+ export function optionsPrompt(
70
+ items: unknown[],
71
+ index: number,
72
+ onAdd?: (...args: unknown[]) => unknown,
73
+ onDelete?: (...args: unknown[]) => unknown,
74
+ onEdit?: (...args: unknown[]) => unknown,
75
+ allowUpdate?: boolean
76
+ ): void;
77
+
78
+ export const Tokenizer: unknown;
79
+ export const MainState: Record<string, unknown>;
80
+ export function MainStateImplement(implementation: Record<string, unknown>): void;
81
+
82
+ export function clearModal(): boolean;
83
+ export function clone<T>(value: T): T;
84
+ export function confirm(
85
+ message: string,
86
+ onconfirm: (index: number) => unknown,
87
+ onCancel?: () => unknown,
88
+ optionYes?: string,
89
+ optionNo?: string
90
+ ): void;
91
+ export function confirmPromise(text: string, options?: string[], cancelError?: string): Promise<number>;
92
+ export function ConfirmPromise(
93
+ title: string,
94
+ message: string,
95
+ actions: string[],
96
+ isModal?: boolean | (() => unknown)
97
+ ): Promise<{idx: number; name: string}>;
98
+
99
+ export function defineWidget(
100
+ view?: (...args: unknown[]) => unknown,
101
+ oninit?: (...args: unknown[]) => unknown,
102
+ oncreate?: (...args: unknown[]) => unknown,
103
+ onremove?: (...args: unknown[]) => unknown,
104
+ onupdate?: (...args: unknown[]) => unknown
105
+ ): MuiWidget;
106
+
107
+ export function makeLocalPath(path: string[]): string;
108
+ export function makeLocalUrl(base: string, path: string[]): string;
109
+ export function processImage(file: File): Promise<HTMLImageElement>;
110
+ export function popupMessage(message?: unknown, cancelable?: boolean | (() => unknown), contentClass?: string): void;
111
+ export function startApp(target: string, appMetadata: {default?: string; routes: Record<string, unknown>}): void;
112
+ export const tainter: {
113
+ taint(): void;
114
+ taintRedraw(): void;
115
+ isTainted(): boolean;
116
+ untaint(): void;
117
+ };
package/dist/index.js CHANGED
@@ -1,5 +1,4 @@
1
1
  // Package entry copied to dist by the Rollup build.
2
2
  // This keeps CSS automatic for consumers while publishing only dist assets.
3
3
  import "./libmui.css";
4
-
5
4
  export * from "./libmui.esm.min.js";
package/package.json CHANGED
@@ -1,10 +1,11 @@
1
1
  {
2
2
  "name": "@nebularstreams/libmui",
3
3
  "description": "Lightweight, high-performance Mithril widget library for modern websites and JavaScript applications.",
4
- "version": "4.0.4",
4
+ "version": "4.0.5",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.js",
8
+ "types": "dist/index.d.ts",
8
9
  "style": "dist/libmui.css",
9
10
  "scripts": {
10
11
  "build": "rollup -c"