foldkit 0.15.0 → 0.16.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/dist/url.js CHANGED
@@ -1,5 +1,6 @@
1
1
  import { Effect, Option, ParseResult, Schema as S, String } from 'effect';
2
2
  import { OptionExt } from './effectExtensions';
3
+ /** Schema representing a parsed URL with protocol, host, port, pathname, search, and hash fields. */
3
4
  export const Url = S.Struct({
4
5
  protocol: S.String,
5
6
  host: S.String,
@@ -72,5 +73,7 @@ const UrlFromLocationAndHref = S.transform(LocationAndHref, Url, {
72
73
  },
73
74
  });
74
75
  const UrlFromString = S.compose(LocationAndHrefFromString, UrlFromLocationAndHref);
76
+ /** Parses a URL string into a `Url`, returning `Option.None` if invalid. */
75
77
  export const fromString = (str) => S.decodeOption(UrlFromString)(str);
78
+ /** Serializes a `Url` back to a string. */
76
79
  export const toString = (url) => S.encodeSync(UrlFromString)(url);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "foldkit",
3
- "version": "0.15.0",
3
+ "version": "0.16.0",
4
4
  "description": "Elm-inspired UI framework powered by Effect",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -39,6 +39,14 @@
39
39
  "types": "./dist/struct.d.ts",
40
40
  "import": "./dist/struct.js"
41
41
  },
42
+ "./ui": {
43
+ "types": "./dist/ui/index.d.ts",
44
+ "import": "./dist/ui/index.js"
45
+ },
46
+ "./ui/tabs": {
47
+ "types": "./dist/ui/tabs.d.ts",
48
+ "import": "./dist/ui/tabs.js"
49
+ },
42
50
  "./url": {
43
51
  "types": "./dist/url.d.ts",
44
52
  "import": "./dist/url.js"
@@ -48,9 +56,11 @@
48
56
  "dist"
49
57
  ],
50
58
  "peerDependencies": {
59
+ "@effect/platform-browser": "^0.74.0",
51
60
  "effect": "^3.18.2"
52
61
  },
53
62
  "devDependencies": {
63
+ "@effect/platform-browser": "^0.74.0",
54
64
  "@effect/vitest": "^0.27.0",
55
65
  "effect": "^3.19.15",
56
66
  "happy-dom": "^18.0.1",
@@ -72,7 +82,6 @@
72
82
  "directory": "packages/foldkit"
73
83
  },
74
84
  "dependencies": {
75
- "@effect/platform-browser": "^0.74.0",
76
85
  "snabbdom": "^3.6.3"
77
86
  },
78
87
  "publishConfig": {
@@ -86,6 +95,7 @@
86
95
  "build": "pnpm run clean && tsc -b",
87
96
  "watch": "tsc -b --watch",
88
97
  "typecheck": "tsc -b --noEmit",
89
- "test": "vitest run"
98
+ "test": "vitest run",
99
+ "docs": "typedoc"
90
100
  }
91
101
  }