@cahyo-dimas/freeday 1.14.0 → 1.15.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.
- package/CHANGELOG.md +14 -0
- package/README.id.md +1 -1
- package/README.md +1 -1
- package/dist/asset.d.ts +6 -0
- package/dist/freeday.d.ts +24 -0
- package/package.json +14 -8
- package/tokens/breakpoints.d.ts +8 -0
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,20 @@
|
|
|
3
3
|
Semua perubahan penting dicatat di sini. Format longgar mengikuti
|
|
4
4
|
[Keep a Changelog](https://keepachangelog.com/); tiap versi = git tag.
|
|
5
5
|
|
|
6
|
+
## [1.15.0] — 2026-08-10
|
|
7
|
+
### Added
|
|
8
|
+
- **Type declarations for every export (#40).** Only `./vue` and `./react` shipped a `types`
|
|
9
|
+
condition; the other eight exports had none. A TypeScript consumer's two side-effect imports —
|
|
10
|
+
`import '@cahyo-dimas/freeday/css'` and `import '@cahyo-dimas/freeday'` — plus `./enhancers/*` and
|
|
11
|
+
`./breakpoints` therefore failed to resolve (TS 5 leaves them untyped / `implicitly any`; TS 6 makes
|
|
12
|
+
it a hard `noUncheckedSideEffectImports` error), and `window.Freeday` was reconstructed by hand in
|
|
13
|
+
every consumer. Now every export names a `types` condition: `dist/asset.d.ts` (a one-line stub for the
|
|
14
|
+
side-effect-only CSS/enhancer imports), `tokens/breakpoints.d.ts` (the breakpoint scale), and
|
|
15
|
+
`dist/freeday.d.ts` — which declares the `window.Freeday` global from the source: `toast(opts?)` with
|
|
16
|
+
all-optional `variant` / `title` / `message` / `timeout`, returning the toast `HTMLElement` (looser and
|
|
17
|
+
more correct than the guesses consumers had been copying). `files` now also ships
|
|
18
|
+
`tokens/breakpoints.d.ts`. Runtime unchanged; purely additive.
|
|
19
|
+
|
|
6
20
|
## [1.14.0] — 2026-08-01
|
|
7
21
|
### Added
|
|
8
22
|
- **Read-only state across the form controls (#39).** `input` / `textarea` gain a `[readonly]` rule —
|
package/README.id.md
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
> **Lebih banyak _free day_ buat dev — UI kit-nya sudah siap pakai.**
|
|
6
6
|
|
|
7
7
|
[](https://cahyo-dimas.github.io/freeday-ui-kit/)
|
|
8
|
-
[](https://github.com/cahyo-dimas/freeday-ui-kit/tree/v1.15.0)
|
|
9
9
|
|
|
10
10
|
UI KIT yang token-driven & framework-agnostic — satu sumber kebenaran untuk warna, tipografi,
|
|
11
11
|
spasi, dan komponen. Blueprint: `docs/superpowers/specs/2026-07-21-freeday-ui-kit-design.md`.
|
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
> **More free days for devs — the UI kit is ready to use.**
|
|
6
6
|
|
|
7
7
|
[](https://cahyo-dimas.github.io/freeday-ui-kit/)
|
|
8
|
-
[](https://github.com/cahyo-dimas/freeday-ui-kit/tree/v1.15.0)
|
|
9
9
|
|
|
10
10
|
A token-driven, framework-agnostic UI kit — one source of truth for color, typography,
|
|
11
11
|
spacing, and components. Blueprint: `docs/superpowers/specs/2026-07-21-freeday-ui-kit-design.md`.
|
package/dist/asset.d.ts
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
// Shared type stub for every export imported purely for its side effects — the CSS
|
|
2
|
+
// bundles (`./css`, `./css/components`, `./tokens`) and the individual enhancer scripts
|
|
3
|
+
// (`./enhancers/*`). TypeScript only needs the `types` condition to *resolve* the module;
|
|
4
|
+
// there is no value surface to describe. (The root `.` import is different — it augments
|
|
5
|
+
// window.Freeday — so it points at ./freeday.d.ts instead.)
|
|
6
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
// Type surface for the root side-effect import `@cahyo-dimas/freeday`, which loads every
|
|
2
|
+
// enhancer and registers the `window.Freeday` global. Authored from src/freeday-toast.js
|
|
3
|
+
// — keep in sync with it. (The per-component window.Freeday<Name> enhancer namespaces are
|
|
4
|
+
// intentionally not typed here; no consumer reconstructs those.)
|
|
5
|
+
|
|
6
|
+
export interface FreedayToastOptions {
|
|
7
|
+
/** Accent + ARIA role. Omitted = neutral. 'danger' uses role="alert"; the rest role="status". */
|
|
8
|
+
variant?: 'success' | 'warning' | 'danger' | 'info';
|
|
9
|
+
title?: string;
|
|
10
|
+
message?: string;
|
|
11
|
+
/** Milliseconds before auto-dismiss. Default 4000; 0 = sticky. */
|
|
12
|
+
timeout?: number;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export interface FreedayGlobal {
|
|
16
|
+
/** Show a transient toast in a live region (created on first use). Returns the toast element. */
|
|
17
|
+
toast(opts?: FreedayToastOptions): HTMLElement;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
declare global {
|
|
21
|
+
interface Window {
|
|
22
|
+
Freeday?: FreedayGlobal;
|
|
23
|
+
}
|
|
24
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cahyo-dimas/freeday",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.15.0",
|
|
4
4
|
"description": "Freeday — token-driven, framework-agnostic UI KIT (design source-of-truth).",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -25,17 +25,18 @@
|
|
|
25
25
|
"adapters",
|
|
26
26
|
"tokens/tokens.json",
|
|
27
27
|
"tokens/breakpoints.mjs",
|
|
28
|
+
"tokens/breakpoints.d.ts",
|
|
28
29
|
"README.md",
|
|
29
30
|
"README.id.md",
|
|
30
31
|
"CHANGELOG.md"
|
|
31
32
|
],
|
|
32
33
|
"exports": {
|
|
33
|
-
".": "./dist/freeday.js",
|
|
34
|
-
"./css": "./dist/freeday.bundle.css",
|
|
35
|
-
"./css/components": "./dist/freeday.css",
|
|
36
|
-
"./tokens": "./dist/freeday.tokens.css",
|
|
37
|
-
"./breakpoints": "./tokens/breakpoints.mjs",
|
|
38
|
-
"./enhancers/*": "./dist/freeday-*.js",
|
|
34
|
+
".": { "types": "./dist/freeday.d.ts", "default": "./dist/freeday.js" },
|
|
35
|
+
"./css": { "types": "./dist/asset.d.ts", "default": "./dist/freeday.bundle.css" },
|
|
36
|
+
"./css/components": { "types": "./dist/asset.d.ts", "default": "./dist/freeday.css" },
|
|
37
|
+
"./tokens": { "types": "./dist/asset.d.ts", "default": "./dist/freeday.tokens.css" },
|
|
38
|
+
"./breakpoints": { "types": "./tokens/breakpoints.d.ts", "default": "./tokens/breakpoints.mjs" },
|
|
39
|
+
"./enhancers/*": { "types": "./dist/asset.d.ts", "default": "./dist/freeday-*.js" },
|
|
39
40
|
"./vue": {
|
|
40
41
|
"types": "./adapters/vue/index.d.ts",
|
|
41
42
|
"default": "./adapters/vue/index.js"
|
|
@@ -62,12 +63,17 @@
|
|
|
62
63
|
"scripts": {
|
|
63
64
|
"build": "node tokens/build.mjs",
|
|
64
65
|
"test": "node --test",
|
|
66
|
+
"test:browser": "node --test browser/vanilla.mjs browser/adapter.mjs",
|
|
65
67
|
"prepack": "node tokens/build.mjs",
|
|
66
68
|
"version": "node tokens/build.mjs && git add dist",
|
|
67
69
|
"typecheck:react": "tsc -p adapters/react/tsconfig.json --noEmit"
|
|
68
70
|
},
|
|
69
71
|
"devDependencies": {
|
|
70
72
|
"@types/react": "^19.2.17",
|
|
71
|
-
"
|
|
73
|
+
"esbuild": "^0.28.1",
|
|
74
|
+
"react": "^19.2.8",
|
|
75
|
+
"react-dom": "^19.2.8",
|
|
76
|
+
"typescript": "^7.0.2",
|
|
77
|
+
"vue": "^3.5.40"
|
|
72
78
|
}
|
|
73
79
|
}
|