feather-k-demo-utils 0.0.4 → 0.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.
@@ -0,0 +1,4 @@
1
+ // src/styles/styles.d.ts
2
+ // Type declaration for importing the CSS module from this package.
3
+ // This allows TypeScript consumers to import "feather-k-demo-utils/styles" without type errors.
4
+ declare module "feather-k-demo-utils/styles";
@@ -3,4 +3,8 @@
3
3
  * Returns the version as a string, or null if not found.
4
4
  */
5
5
  export declare const getFeatherkStylesVersionFromUrl: (url: string) => string | null;
6
+ /**
7
+ * The resolved FeatherK styles version (evaluated at import time).
8
+ */
9
+ export declare const FEATHERK_STYLES_VERSION: string | null;
6
10
  export declare const featherkStylesVersion: string | null;
@@ -1,10 +1,14 @@
1
- import { getFeatherKStylesCdnUrl } from "./constants";
1
+ import { FEATHERK_STYLES_CDN_URL } from "./constants";
2
2
  /**
3
3
  * Extracts the version string (e.g. "1.2.3" or "latest") from a CDN URL for @featherk/styles.
4
4
  * Returns the version as a string, or null if not found.
5
5
  */
6
6
  export const getFeatherkStylesVersionFromUrl = (url) => {
7
7
  const match = url.match(/@featherk\/styles@([^/]+)\//);
8
- return match && typeof match[1] === 'string' ? match[1] : null;
8
+ return match && typeof match[1] === "string" ? match[1] : null;
9
9
  };
10
- export const featherkStylesVersion = getFeatherkStylesVersionFromUrl(getFeatherKStylesCdnUrl());
10
+ /**
11
+ * The resolved FeatherK styles version (evaluated at import time).
12
+ */
13
+ export const FEATHERK_STYLES_VERSION = getFeatherkStylesVersionFromUrl(FEATHERK_STYLES_CDN_URL);
14
+ export const featherkStylesVersion = FEATHERK_STYLES_VERSION;
@@ -3,3 +3,7 @@
3
3
  * Uses import.meta.env.VITE_FEATHERK_STYLES_CDN_URL if available (Vite), otherwise falls back to the default CDN URL.
4
4
  */
5
5
  export declare function getFeatherKStylesCdnUrl(): string;
6
+ /**
7
+ * The resolved FeatherK styles CDN URL (evaluated at import time).
8
+ */
9
+ export declare const FEATHERK_STYLES_CDN_URL: string;
@@ -14,3 +14,7 @@ export function getFeatherKStylesCdnUrl() {
14
14
  }
15
15
  return "https://cdn.jsdelivr.net/npm/@featherk/styles@latest/dist/styles.css";
16
16
  }
17
+ /**
18
+ * The resolved FeatherK styles CDN URL (evaluated at import time).
19
+ */
20
+ export const FEATHERK_STYLES_CDN_URL = getFeatherKStylesCdnUrl();
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "feather-k-demo-utils",
3
3
  "private": false,
4
- "version": "0.0.4",
4
+ "version": "0.0.7",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",
7
7
  "module": "lib/index.js",
@@ -22,7 +22,10 @@
22
22
  ],
23
23
  "exports": {
24
24
  "./utils": "./lib/utils/index.js",
25
- "./styles": "./lib/styles/demo.css"
25
+ "./styles": {
26
+ "default": "./lib/styles/demo.css",
27
+ "types": "./lib/styles/styles.d.ts"
28
+ }
26
29
  },
27
30
  "scripts": {
28
31
  "dev": "vite",
@@ -46,6 +49,7 @@
46
49
  },
47
50
  "files": [
48
51
  "lib/utils",
49
- "lib/styles"
52
+ "lib/styles",
53
+ "lib/styles/styles.d.ts"
50
54
  ]
51
55
  }