@motionscript/geography 0.1.0 → 0.1.1-alpha.1
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 +21 -0
- package/README.md +4 -5
- package/dist/border/format.d.ts +1 -1
- package/dist/border/format.d.ts.map +1 -1
- package/dist/border/format.js.map +1 -1
- package/dist/border/geo-border.d.ts +1 -13
- package/dist/border/geo-border.d.ts.map +1 -1
- package/dist/border/geo-border.js.map +1 -1
- package/dist/border/index.d.ts +0 -8
- package/dist/border/index.d.ts.map +1 -1
- package/dist/border/index.js +2 -8
- package/dist/border/index.js.map +1 -1
- package/dist/browser/index.js.map +2 -2
- package/dist/browser/manifest.json +1 -1
- package/dist/nodes.d.ts +0 -12
- package/dist/nodes.d.ts.map +1 -1
- package/dist/nodes.js +0 -12
- package/dist/nodes.js.map +1 -1
- package/package.json +4 -4
- package/src/border/format.ts +1 -1
- package/src/border/geo-border.ts +0 -12
- package/src/border/index.ts +2 -8
- package/src/nodes.ts +0 -12
package/dist/nodes.d.ts
CHANGED
|
@@ -1,15 +1,3 @@
|
|
|
1
1
|
import { GeoBorder } from "./border/index.js";
|
|
2
|
-
/**
|
|
3
|
-
* Every node type this package publishes.
|
|
4
|
-
*
|
|
5
|
-
* A host registers these by handing the array to an engine —
|
|
6
|
-
* `new Engine(platform, { nodes: NODES })` — which reads each component's key.
|
|
7
|
-
* Defining a component only *declares* that key: nothing is registered by
|
|
8
|
-
* importing a module, so a registry holds exactly what its owner asked for.
|
|
9
|
-
*
|
|
10
|
-
* Listing the component **values** is also what survives bundling: this package
|
|
11
|
-
* declares `sideEffects: false`, and a document names a node type by string, so
|
|
12
|
-
* an import kept only for its side effect is exactly what gets shaken out.
|
|
13
|
-
*/
|
|
14
2
|
export declare const NODES: (typeof GeoBorder)[];
|
|
15
3
|
//# sourceMappingURL=nodes.d.ts.map
|
package/dist/nodes.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nodes.d.ts","sourceRoot":"","sources":["../src/nodes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"nodes.d.ts","sourceRoot":"","sources":["../src/nodes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAGrC,eAAO,MAAM,KAAK,EAAE,CAAC,OAAO,SAAS,CAAC,EAAgB,CAAC"}
|
package/dist/nodes.js
CHANGED
|
@@ -1,16 +1,4 @@
|
|
|
1
1
|
import { GeoBorder } from "./border/index.js";
|
|
2
|
-
/**
|
|
3
|
-
* Every node type this package publishes.
|
|
4
|
-
*
|
|
5
|
-
* A host registers these by handing the array to an engine —
|
|
6
|
-
* `new Engine(platform, { nodes: NODES })` — which reads each component's key.
|
|
7
|
-
* Defining a component only *declares* that key: nothing is registered by
|
|
8
|
-
* importing a module, so a registry holds exactly what its owner asked for.
|
|
9
|
-
*
|
|
10
|
-
* Listing the component **values** is also what survives bundling: this package
|
|
11
|
-
* declares `sideEffects: false`, and a document names a node type by string, so
|
|
12
|
-
* an import kept only for its side effect is exactly what gets shaken out.
|
|
13
|
-
*/
|
|
14
2
|
// Typed by name, so the declaration names each component rather than spelling out its type through core.
|
|
15
3
|
export const NODES = [GeoBorder];
|
|
16
4
|
//# sourceMappingURL=nodes.js.map
|
package/dist/nodes.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nodes.js","sourceRoot":"","sources":["../src/nodes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAErC
|
|
1
|
+
{"version":3,"file":"nodes.js","sourceRoot":"","sources":["../src/nodes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAErC,yGAAyG;AACzG,MAAM,CAAC,MAAM,KAAK,GAAyB,CAAC,SAAS,CAAC,CAAC","sourcesContent":["import { GeoBorder } from \"./border\";\n\n// Typed by name, so the declaration names each component rather than spelling out its type through core.\nexport const NODES: (typeof GeoBorder)[] = [GeoBorder];\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@motionscript/geography",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1-alpha.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Geography for Motion Script: GeoBorder, and the country and state outlines it draws by ISO 3166 code, derived from Natural Earth (public domain).",
|
|
6
6
|
"repository": {
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"license": "Apache-2.0",
|
|
52
52
|
"author": "Motionscript",
|
|
53
53
|
"peerDependencies": {
|
|
54
|
-
"@motionscript/sdk": "^0.1.
|
|
54
|
+
"@motionscript/sdk": "^0.1.1-alpha.1"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"@types/d3-geo": "^3.1.0",
|
|
@@ -67,8 +67,8 @@
|
|
|
67
67
|
"typescript": "^6.0.3",
|
|
68
68
|
"typescript-eslint": "^8.48.0",
|
|
69
69
|
"vitest": "^4.1.5",
|
|
70
|
-
"@motionscript/
|
|
71
|
-
"@motionscript/
|
|
70
|
+
"@motionscript/sdk": "0.1.1-alpha.1",
|
|
71
|
+
"@motionscript/core": "0.1.1-alpha.1"
|
|
72
72
|
},
|
|
73
73
|
"dependencies": {
|
|
74
74
|
"d3-geo": "^3.1.1"
|
package/src/border/format.ts
CHANGED
|
@@ -43,7 +43,7 @@ export interface GeoArc {
|
|
|
43
43
|
key: number | string
|
|
44
44
|
/** Interleaved lon/lat, in degrees. */
|
|
45
45
|
points: Float64Array
|
|
46
|
-
/** Per point: 0 always survives, higher buckets are less significant
|
|
46
|
+
/** Per point: 0 always survives, higher buckets are less significant. */
|
|
47
47
|
buckets: Uint8Array
|
|
48
48
|
}
|
|
49
49
|
|
package/src/border/geo-border.ts
CHANGED
|
@@ -21,7 +21,6 @@ import {
|
|
|
21
21
|
type Vector2 as _Vector2,
|
|
22
22
|
type PathBounds,
|
|
23
23
|
type ShadowResolved,
|
|
24
|
-
type ShapeProps,
|
|
25
24
|
type Size2D,
|
|
26
25
|
type StrokeResolved,
|
|
27
26
|
type Type,
|
|
@@ -33,17 +32,6 @@ import { geoDataVersion, geoLoader } from "./loader"
|
|
|
33
32
|
import { geoRegistry } from "./registry"
|
|
34
33
|
import { geoFilesFor, normalizeIso, selectGeoFeatures, type GeoFrame, type GeoLevel } from "./selection"
|
|
35
34
|
|
|
36
|
-
export interface GeoBorderProps extends ShapeProps {
|
|
37
|
-
/** ISO 3166-1 alpha-2 (`"FR"`) or ISO 3166-2 (`"US-CA"`) codes. */
|
|
38
|
-
iso: string | readonly string[]
|
|
39
|
-
level: GeoLevel
|
|
40
|
-
/** 0–1: 1 is full resolution, lower is a more stylised outline. */
|
|
41
|
-
detail: number
|
|
42
|
-
projection: GeoProjectionKind
|
|
43
|
-
frame: GeoFrame
|
|
44
|
-
borders: GeoBorders
|
|
45
|
-
}
|
|
46
|
-
|
|
47
35
|
interface Chunk {
|
|
48
36
|
data: string
|
|
49
37
|
/** Where this chunk's contours sit along the whole drawing, as fractions of its length. */
|
package/src/border/index.ts
CHANGED
|
@@ -1,11 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
*
|
|
4
|
-
* A copy of `geo-border` takes only `geo-border.ts`. Everything it imports from
|
|
5
|
-
* here — the source registry, the file cache, the geometry — stays behind the
|
|
6
|
-
* package, so a forked node shares the host's registered sources instead of
|
|
7
|
-
* owning an empty registry of its own.
|
|
8
|
-
*/
|
|
1
|
+
// A copy of `geo-border` takes only `geo-border.ts`; the registry, file cache and geometry stay behind
|
|
2
|
+
// the package, so a fork shares the host's registered sources instead of owning an empty registry.
|
|
9
3
|
export * from "./format"
|
|
10
4
|
export * from "./geo-border"
|
|
11
5
|
export * from "./geometry"
|
package/src/nodes.ts
CHANGED
|
@@ -1,16 +1,4 @@
|
|
|
1
1
|
import { GeoBorder } from "./border";
|
|
2
2
|
|
|
3
|
-
/**
|
|
4
|
-
* Every node type this package publishes.
|
|
5
|
-
*
|
|
6
|
-
* A host registers these by handing the array to an engine —
|
|
7
|
-
* `new Engine(platform, { nodes: NODES })` — which reads each component's key.
|
|
8
|
-
* Defining a component only *declares* that key: nothing is registered by
|
|
9
|
-
* importing a module, so a registry holds exactly what its owner asked for.
|
|
10
|
-
*
|
|
11
|
-
* Listing the component **values** is also what survives bundling: this package
|
|
12
|
-
* declares `sideEffects: false`, and a document names a node type by string, so
|
|
13
|
-
* an import kept only for its side effect is exactly what gets shaken out.
|
|
14
|
-
*/
|
|
15
3
|
// Typed by name, so the declaration names each component rather than spelling out its type through core.
|
|
16
4
|
export const NODES: (typeof GeoBorder)[] = [GeoBorder];
|