@nisoku/sazami 0.1.0

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.
Files changed (53) hide show
  1. package/README.md +261 -0
  2. package/dist/config/generator.d.ts +3 -0
  3. package/dist/config/tokens.d.ts +1 -0
  4. package/dist/curvomorphism/index.d.ts +10 -0
  5. package/dist/errors.d.ts +16 -0
  6. package/dist/escape.d.ts +26 -0
  7. package/dist/icons/index.d.ts +1 -0
  8. package/dist/index.cjs +9473 -0
  9. package/dist/index.cjs.map +1 -0
  10. package/dist/index.d.ts +14 -0
  11. package/dist/index.mjs +9473 -0
  12. package/dist/index.mjs.map +1 -0
  13. package/dist/primitives/accordion.d.ts +35 -0
  14. package/dist/primitives/avatar.d.ts +54 -0
  15. package/dist/primitives/badge.d.ts +34 -0
  16. package/dist/primitives/base.d.ts +129 -0
  17. package/dist/primitives/button.d.ts +55 -0
  18. package/dist/primitives/card.d.ts +44 -0
  19. package/dist/primitives/checkbox.d.ts +43 -0
  20. package/dist/primitives/chip.d.ts +57 -0
  21. package/dist/primitives/column.d.ts +24 -0
  22. package/dist/primitives/coverart.d.ts +34 -0
  23. package/dist/primitives/divider.d.ts +24 -0
  24. package/dist/primitives/generic.d.ts +4 -0
  25. package/dist/primitives/grid.d.ts +29 -0
  26. package/dist/primitives/heading.d.ts +35 -0
  27. package/dist/primitives/icon-button.d.ts +45 -0
  28. package/dist/primitives/icon.d.ts +32 -0
  29. package/dist/primitives/image.d.ts +36 -0
  30. package/dist/primitives/input.d.ts +53 -0
  31. package/dist/primitives/label.d.ts +26 -0
  32. package/dist/primitives/modal.d.ts +34 -0
  33. package/dist/primitives/modifier-map.d.ts +3 -0
  34. package/dist/primitives/progress.d.ts +49 -0
  35. package/dist/primitives/radio.d.ts +48 -0
  36. package/dist/primitives/registry.d.ts +2 -0
  37. package/dist/primitives/row.d.ts +29 -0
  38. package/dist/primitives/section.d.ts +39 -0
  39. package/dist/primitives/select.d.ts +58 -0
  40. package/dist/primitives/shared.d.ts +15 -0
  41. package/dist/primitives/slider.d.ts +60 -0
  42. package/dist/primitives/spacer.d.ts +14 -0
  43. package/dist/primitives/spinner.d.ts +29 -0
  44. package/dist/primitives/stack.d.ts +19 -0
  45. package/dist/primitives/switch.d.ts +53 -0
  46. package/dist/primitives/tabs.d.ts +30 -0
  47. package/dist/primitives/tag.d.ts +25 -0
  48. package/dist/primitives/text.d.ts +39 -0
  49. package/dist/primitives/toast.d.ts +45 -0
  50. package/dist/primitives/toggle.d.ts +51 -0
  51. package/dist/runtime/renderer.d.ts +2 -0
  52. package/dist/runtime/transformer.d.ts +8 -0
  53. package/package.json +55 -0
@@ -0,0 +1,39 @@
1
+ import { SazamiComponent } from "./base";
2
+ import { type Readable } from "@nisoku/sairin";
3
+ declare const textConfig: {
4
+ readonly observedAttributes: readonly ["content"];
5
+ readonly properties: {
6
+ readonly size: {
7
+ readonly type: "string";
8
+ readonly reflect: false;
9
+ };
10
+ readonly weight: {
11
+ readonly type: "string";
12
+ readonly reflect: false;
13
+ };
14
+ readonly tone: {
15
+ readonly type: "string";
16
+ readonly reflect: false;
17
+ };
18
+ readonly leading: {
19
+ readonly type: "string";
20
+ readonly reflect: false;
21
+ };
22
+ };
23
+ };
24
+ export declare class SazamiText extends SazamiComponent<typeof textConfig> {
25
+ size: string;
26
+ weight: string;
27
+ tone: string;
28
+ leading: string;
29
+ private _content;
30
+ private _textNode;
31
+ private _isReadable;
32
+ set content(value: string | Readable<string>);
33
+ get content(): string | Readable<string>;
34
+ private _setTextContent;
35
+ private _bindContentSignal;
36
+ render(): void;
37
+ attributeChangedCallback(name: string, oldVal: string | null, newVal: string | null): void;
38
+ }
39
+ export {};
@@ -0,0 +1,45 @@
1
+ import { SazamiComponent } from "./base";
2
+ import { Signal } from "@nisoku/sairin";
3
+ declare const toastConfig: {
4
+ readonly properties: {
5
+ readonly message: {
6
+ readonly type: "string";
7
+ readonly reflect: false;
8
+ };
9
+ readonly variant: {
10
+ readonly type: "string";
11
+ readonly reflect: false;
12
+ };
13
+ readonly duration: {
14
+ readonly type: "number";
15
+ readonly reflect: false;
16
+ readonly default: 3000;
17
+ };
18
+ readonly visible: {
19
+ readonly type: "boolean";
20
+ readonly reflect: false;
21
+ };
22
+ };
23
+ readonly events: {
24
+ readonly close: {
25
+ readonly name: "saz-close";
26
+ readonly detail: {};
27
+ };
28
+ };
29
+ };
30
+ export declare class SazamiToast extends SazamiComponent<typeof toastConfig> {
31
+ message: string;
32
+ variant: string;
33
+ duration: number;
34
+ visible: boolean;
35
+ messageSignal?: Signal<string>;
36
+ private _hideTimeout?;
37
+ private _removeTimeout?;
38
+ private _closeHandler;
39
+ private _handleKeydown;
40
+ disconnectedCallback(): void;
41
+ render(): void;
42
+ hide(): void;
43
+ static show(message: string, variant?: string, duration?: number): HTMLElement;
44
+ }
45
+ export {};
@@ -0,0 +1,51 @@
1
+ import { SazamiComponent } from "./base";
2
+ import { type Readable } from "@nisoku/sairin";
3
+ declare const toggleConfig: {
4
+ readonly properties: {
5
+ readonly checked: {
6
+ readonly type: "boolean";
7
+ readonly reflect: true;
8
+ };
9
+ readonly disabled: {
10
+ readonly type: "boolean";
11
+ readonly reflect: true;
12
+ };
13
+ readonly variant: {
14
+ readonly type: "string";
15
+ readonly reflect: false;
16
+ };
17
+ };
18
+ readonly events: {
19
+ readonly change: {
20
+ readonly name: "saz-change";
21
+ readonly detail: {
22
+ readonly checked: "checked";
23
+ };
24
+ };
25
+ };
26
+ readonly binds: {
27
+ readonly checked: "attribute";
28
+ readonly disabled: "attribute";
29
+ };
30
+ };
31
+ export declare class SazamiToggle extends SazamiComponent<typeof toggleConfig> {
32
+ variant: string;
33
+ private _checkedSignal;
34
+ private _checkedBindingDispose;
35
+ private _disabledSignal;
36
+ private _disabledBindingDispose;
37
+ private _isReadableBool;
38
+ set checked(value: boolean | Readable<boolean>);
39
+ get checked(): boolean | Readable<boolean>;
40
+ private _setChecked;
41
+ set disabled(value: boolean | Readable<boolean>);
42
+ get disabled(): boolean | Readable<boolean>;
43
+ private _setDisabled;
44
+ private _getIsDisabled;
45
+ render(): void;
46
+ private _handleClick;
47
+ private _handleKeydown;
48
+ private _updateAria;
49
+ attributeChangedCallback(name: string, oldVal: string, newVal: string): void;
50
+ }
51
+ export {};
@@ -0,0 +1,2 @@
1
+ import { VNode } from "./transformer";
2
+ export declare function render(vnode: VNode | string, parent: HTMLElement): void;
@@ -0,0 +1,8 @@
1
+ import type { ASTNode } from "@nisoku/sakko";
2
+ export declare type VNode = {
3
+ type: string;
4
+ props: Record<string, any>;
5
+ children: (VNode | string)[];
6
+ };
7
+ export declare function getTag(name: string): string;
8
+ export declare function transformAST(node: ASTNode): VNode | VNode[];
package/package.json ADDED
@@ -0,0 +1,55 @@
1
+ {
2
+ "name": "@nisoku/sazami",
3
+ "version": "0.1.0",
4
+ "description": "Sazami UI, the curvomorphic UI library",
5
+ "license": "Apache-2.0",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "https://github.com/Nisoku/Sazami"
9
+ },
10
+ "main": "dist/index.cjs",
11
+ "module": "dist/index.mjs",
12
+ "types": "dist/index.d.ts",
13
+ "sideEffects": false,
14
+ "exports": {
15
+ ".": {
16
+ "import": {
17
+ "types": "./dist/index.d.ts",
18
+ "default": "./dist/index.mjs"
19
+ },
20
+ "require": {
21
+ "types": "./dist/index.d.ts",
22
+ "default": "./dist/index.cjs"
23
+ }
24
+ }
25
+ },
26
+ "files": [
27
+ "dist",
28
+ "README.md"
29
+ ],
30
+ "scripts": {
31
+ "build": "vite build",
32
+ "build:demo": "vite build && node ./scripts/build-demo.js",
33
+ "test": "jest --no-cache",
34
+ "typecheck": "tsc --noEmit",
35
+ "make-pretty": "prettier --write 'src/**/*.{ts,tsx,js,jsx,json,css,scss,md,html,cjs}'"
36
+ },
37
+ "dependencies": {
38
+ "@nisoku/sairin": "^0.1.2",
39
+ "@nisoku/sakko": "^0.1.5",
40
+ "@nisoku/satori": "^0.1.3"
41
+ },
42
+ "devDependencies": {
43
+ "@types/jest": "^29.5.14",
44
+ "@types/node": "^25.5.0",
45
+ "css.escape": "^1.5.1",
46
+ "jest": "^30.0.0",
47
+ "jest-environment-jsdom": "^30.0.0",
48
+ "jest-fixed-jsdom": "^0.0.11",
49
+ "prettier": "^3.8.1",
50
+ "ts-jest": "^29.4.0",
51
+ "typescript": "^5.3.0",
52
+ "vite": "^7.3.1",
53
+ "vite-plugin-dts": "^1.0.5"
54
+ }
55
+ }