tosijs-ui 1.0.4 → 1.0.7

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/README.md CHANGED
@@ -5,10 +5,17 @@
5
5
 
6
6
  <!--{ "pin": "top" }-->
7
7
 
8
- [ui.xinjs.net live demo](https://ui.xinjs.net) | [xinjs](https://xinjs.net) | [discord](https://discord.gg/ramJ9rgky5) | [github](https://github.com/tonioloewald/tosijs-ui#readme) | [npm](https://www.npmjs.com/package/tosijs-ui)
8
+ [ui.tosijs.net live demo](https://ui.tosijs.net) | [tosijs](https://tosijs.net) | [discord](https://discord.gg/ramJ9rgky5) | [github](https://github.com/tonioloewald/tosijs-ui#readme) | [npm](https://www.npmjs.com/package/tosijs-ui)
9
+
10
+ [![tosijs is on NPM](https://badge.fury.io/js/tosijs.svg)](https://www.npmjs.com/package/tosijs-ui)
11
+ [![tosijs is about 10kB gzipped](https://deno.bundlejs.com/?q=tosijs-ui&badge=)](https://bundlejs.com/?q=tosijs-ui&badge=)
12
+ [![tosijs on jsdelivr](https://data.jsdelivr.com/v1/package/npm/tosijs-ui/badge)](https://www.jsdelivr.com/package/npm/tosijs-ui)
9
13
 
10
14
  <center>
11
- <xin-icon class="logo" icon="tosiUi" size=300></xin-icon>
15
+ <xin-lottie
16
+ style="width: 280px; height: 280px; background: #da1167; border-radius: 40px;"
17
+ src="/tosi-ui.json"
18
+ ></xin-lottie>
12
19
  </center>
13
20
 
14
21
  Copyright ©2023-2025 Tonio Loewald
@@ -27,7 +34,7 @@ It works beautifully with other web-component libraries, such as [shoelace.style
27
34
 
28
35
  Add xinjs-ui to your project, e.g.
29
36
 
30
- ```
37
+ ```bash
31
38
  npm add xinjs-ui
32
39
  ```
33
40
 
@@ -35,7 +42,7 @@ Then you can import the component `elementCreator` and create the element any wa
35
42
  like, the easiest way being to use the `elementCreator` itself. A `tosijs` `elementCreator`
36
43
  is syntax sugar around `document.createElement()`.
37
44
 
38
- ```
45
+ ```ts
39
46
  import { dataTable } from 'xinjs-ui'
40
47
 
41
48
  document.body.append(dataTable())
@@ -166,3 +173,11 @@ for an `<input>` or `<textarea>` (while mitigating the historical pathologies of
166
173
  `<select>` and `<input type="radio">`). E.g. the `<xin-select>` does not suffer from a
167
174
  race-condition between having its value set and being given an `<option>` with the intended value
168
175
  and you can differentiate between the user picking a value (`action`) and the value changing (`change`).
176
+
177
+ ## Credits
178
+
179
+ `tosijs-ui` is being developed using [bun](https://bun.sh/).
180
+ `bun` is crazy fast (based on Webkit's JS engine, vs. V8), does a lot of stuff
181
+ natively, and runs TypeScript (with import and require) directly.
182
+
183
+ Logo animations by [@anicoremotion](https://pro.fiverr.com/freelancers/anicoremotion).
package/dist/ab-test.d.ts CHANGED
@@ -11,4 +11,4 @@ export declare class AbTest extends Component {
11
11
  disconnectedCallback(): void;
12
12
  render(): void;
13
13
  }
14
- export declare const abTest: import("tosijs").ElementCreator<Component<import("tosijs").PartsMap>>;
14
+ export declare const abTest: import("tosijs").ElementCreator<AbTest>;
@@ -6,11 +6,13 @@ export declare class CodeEditor extends WebComponent {
6
6
  mode: string;
7
7
  disabled: boolean;
8
8
  role: string;
9
- get editor(): any;
9
+ private _ace;
10
10
  private _editor;
11
11
  private _editorPromise;
12
12
  options: any;
13
13
  theme: string;
14
+ get ace(): any;
15
+ get editor(): any;
14
16
  static styleSpec: {
15
17
  ':host': {
16
18
  display: string;
package/dist/dialog.d.ts CHANGED
@@ -18,5 +18,5 @@ export declare class TosiDialog extends Component<DialogParts> {
18
18
  ok: () => void;
19
19
  content: () => HTMLDialogElement;
20
20
  }
21
- export declare const tosiDialog: import("tosijs").ElementCreator<Component<PartsMap>>;
21
+ export declare const tosiDialog: import("tosijs").ElementCreator<TosiDialog>;
22
22
  export {};
@@ -93,5 +93,5 @@ export declare class EditableRect extends Component {
93
93
  connectedCallback(): void;
94
94
  render(): void;
95
95
  }
96
- export declare const editableRect: import("tosijs").ElementCreator<Component<import("tosijs").PartsMap>>;
96
+ export declare const editableRect: import("tosijs").ElementCreator<EditableRect>;
97
97
  export {};
@@ -1,4 +1,5 @@
1
- import { Component as WebComponent, ElementCreator } from 'tosijs';
1
+ import { Component as WebComponent, ElementCreator, PartsMap } from 'tosijs';
2
+ import { XinSelect } from './select';
2
3
  type ObjectTest = (obj: any) => boolean;
3
4
  type ArrayFilter = (array: any[]) => any[];
4
5
  interface FilterMaker {
@@ -23,7 +24,13 @@ export interface FilterPartState {
23
24
  condition: string;
24
25
  needle: string;
25
26
  }
26
- export declare class FilterPart extends WebComponent {
27
+ interface FilterPartParts extends PartsMap {
28
+ haystack: XinSelect;
29
+ condition: XinSelect;
30
+ needle: HTMLInputElement;
31
+ remove: HTMLButtonElement;
32
+ }
33
+ export declare class FilterPart extends WebComponent<FilterPartParts> {
27
34
  fields: Fields;
28
35
  filters: {
29
36
  [key: string]: FilterMaker;
@@ -31,7 +38,7 @@ export declare class FilterPart extends WebComponent {
31
38
  haystack: string;
32
39
  condition: string;
33
40
  needle: string;
34
- content: () => (SVGElement | HTMLSpanElement)[];
41
+ content: () => HTMLSpanElement[];
35
42
  filter: Filter;
36
43
  constructor();
37
44
  get state(): FilterPartState;
@@ -42,7 +49,11 @@ export declare class FilterPart extends WebComponent {
42
49
  }
43
50
  export declare const filterPart: ElementCreator<FilterPart>;
44
51
  export type FilterState = FilterPartState[];
45
- export declare class FilterBuilder extends WebComponent {
52
+ export interface FilterBuilderParts extends PartsMap {
53
+ add: HTMLButtonElement;
54
+ resent: HTMLButtonElement;
55
+ }
56
+ export declare class FilterBuilder extends WebComponent<FilterBuilderParts> {
46
57
  private _fields;
47
58
  get fields(): Fields;
48
59
  set fields(_fields: Fields);
package/dist/icons.d.ts CHANGED
@@ -3,7 +3,7 @@ import { SVGIconMap } from './icon-types';
3
3
  export declare const defineIcons: (newIcons: {
4
4
  [key: string]: string;
5
5
  }) => void;
6
- export declare const svg2DataUrl: (svg: SVGElement, fill?: string | false, stroke?: string | false, strokeWidth?: number | string) => string;
6
+ export declare const svg2DataUrl: (svg: SVGElement, fill?: string, stroke?: string, strokeWidth?: number) => string;
7
7
  export declare const icons: SVGIconMap;
8
8
  export declare class SvgIcon extends WebComponent {
9
9
  icon: string;
@@ -14,4 +14,4 @@ export declare class SvgIcon extends WebComponent {
14
14
  constructor();
15
15
  render(): void;
16
16
  }
17
- export declare const svgIcon: ElementCreator<WebComponent<import("tosijs").PartsMap>>;
17
+ export declare const svgIcon: ElementCreator<SvgIcon>;