krackedmaps 0.1.1 → 0.1.2
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 +1 -1
- package/bin/cli.js +2 -2
- package/bin/mcp.js +1 -1
- package/dist/krackedmaps.cjs +1 -1
- package/dist/krackedmaps.esm.js +1 -1
- package/dist/krackedmaps.umd.js +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@ Kuala Lumpur, Putrajaya, Labuan) and **159 admin-2 *daerah*** — with **zero ru
|
|
|
5
5
|
dependencies**. Use it as a live component, a CLI, an MCP server for Claude, an embeddable
|
|
6
6
|
iframe, or raw SVG / GeoJSON.
|
|
7
7
|
|
|
8
|
-
**Customize & export:** https://
|
|
8
|
+
**Customize & export:** https://maps.krackeddevs.com · **Live demo:** https://maps.krackeddevs.com/demo.html
|
|
9
9
|
|
|
10
10
|
Two aligned layers from one shared projection: click a state to **drill in** (carve its
|
|
11
11
|
districts + info panel); hover a district for its name; press Esc to step back out. East
|
package/bin/cli.js
CHANGED
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
STATES, DISTRICTS, PROJECTION, PRESETS,
|
|
8
8
|
} from "../dist/krackedmaps.esm.js";
|
|
9
9
|
|
|
10
|
-
const VERSION = "0.1.
|
|
10
|
+
const VERSION = "0.1.2";
|
|
11
11
|
const readGeo = (f) => readFileSync(fileURLToPath(new URL("../dist/" + f, import.meta.url)), "utf8");
|
|
12
12
|
|
|
13
13
|
// crude flag parser → { _: [positional], flag: value | true }
|
|
@@ -55,7 +55,7 @@ Commands:
|
|
|
55
55
|
mcp start the MCP server (stdio)
|
|
56
56
|
|
|
57
57
|
Themes: ${Object.keys(PRESETS).join(", ")}
|
|
58
|
-
Docs: https://
|
|
58
|
+
Docs: https://maps.krackeddevs.com`;
|
|
59
59
|
|
|
60
60
|
async function main() {
|
|
61
61
|
const [cmd, ...rest] = process.argv.slice(2);
|
package/bin/mcp.js
CHANGED
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
STATES, DISTRICTS, PROJECTION, PRESETS,
|
|
9
9
|
} from "../dist/krackedmaps.esm.js";
|
|
10
10
|
|
|
11
|
-
const VERSION = "0.1.
|
|
11
|
+
const VERSION = "0.1.2";
|
|
12
12
|
const readGeo = (f) => readFileSync(fileURLToPath(new URL("../dist/" + f, import.meta.url)), "utf8");
|
|
13
13
|
const themeEnum = Object.keys(PRESETS);
|
|
14
14
|
|
package/dist/krackedmaps.cjs
CHANGED
|
@@ -14,6 +14,6 @@ export function MalaysiaMap({ onSelect }) {
|
|
|
14
14
|
return () => map.destroy();
|
|
15
15
|
}, []);
|
|
16
16
|
return <div ref={ref} style={{ width: "100%" }} />;
|
|
17
|
-
}`}function d1({origin:r="https://
|
|
17
|
+
}`}function d1({origin:r="https://maps.krackeddevs.com",theme:i="blueprint",districts:t=!1,labels:s=!1,static:y=!1}={}){let l=new URLSearchParams({embed:"1",theme:i});return t&&l.set("districts","1"),s&&l.set("labels","1"),y&&l.set("static","1"),`<iframe src="${r}/?${l}"
|
|
18
18
|
width="800" height="360" style="border:0;border-radius:10px"
|
|
19
19
|
title="Map of Malaysia" loading="lazy"></iframe>`}
|
package/dist/krackedmaps.esm.js
CHANGED
|
@@ -14,6 +14,6 @@ export function MalaysiaMap({ onSelect }) {
|
|
|
14
14
|
return () => map.destroy();
|
|
15
15
|
}, []);
|
|
16
16
|
return <div ref={ref} style={{ width: "100%" }} />;
|
|
17
|
-
}`}function P1({origin:r="https://
|
|
17
|
+
}`}function P1({origin:r="https://maps.krackeddevs.com",theme:l="blueprint",districts:t=!1,labels:s=!1,static:P=!1}={}){let i=new URLSearchParams({embed:"1",theme:l});return t&&i.set("districts","1"),s&&i.set("labels","1"),P&&i.set("static","1"),`<iframe src="${r}/?${i}"
|
|
18
18
|
width="800" height="360" style="border:0;border-radius:10px"
|
|
19
19
|
title="Map of Malaysia" loading="lazy"></iframe>`}export{S as DISTRICTS,I as PRESETS,M as PROJECTION,T as STATES,v1 as createMalaysiaMap,t1 as data,P1 as embedSnippet,A as project,S1 as reactComponent,w1 as renderSVG,n1 as resolveTheme};
|
package/dist/krackedmaps.umd.js
CHANGED
|
@@ -14,6 +14,6 @@ export function MalaysiaMap({ onSelect }) {
|
|
|
14
14
|
return () => map.destroy();
|
|
15
15
|
}, []);
|
|
16
16
|
return <div ref={ref} style={{ width: "100%" }} />;
|
|
17
|
-
}`}function d1({origin:r="https://
|
|
17
|
+
}`}function d1({origin:r="https://maps.krackeddevs.com",theme:i="blueprint",districts:t=!1,labels:s=!1,static:y=!1}={}){let l=new URLSearchParams({embed:"1",theme:i});return t&&l.set("districts","1"),s&&l.set("labels","1"),y&&l.set("static","1"),`<iframe src="${r}/?${l}"
|
|
18
18
|
width="800" height="360" style="border:0;border-radius:10px"
|
|
19
19
|
title="Map of Malaysia" loading="lazy"></iframe>`}return K1(C1);})();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "krackedmaps",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "Interactive, themeable SVG map of Malaysia (16 states + 159 districts) — library, CLI, and MCP server. Zero runtime dependencies.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"engines": {
|
|
32
32
|
"node": ">=18"
|
|
33
33
|
},
|
|
34
|
-
"homepage": "https://
|
|
34
|
+
"homepage": "https://maps.krackeddevs.com",
|
|
35
35
|
"scripts": {
|
|
36
36
|
"build": "node build.mjs",
|
|
37
37
|
"dev": "python3 -m http.server 4173",
|