canvas-globe 1.1.0 → 1.1.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 +6 -0
- package/README.md +4 -4
- package/codemeta.json +1 -1
- package/dist/canvas-globe.umd.js +12 -2
- package/package.json +1 -1
- package/src/license.js +11 -1
- package/src/version.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,12 @@ All notable changes to this package are documented here. The format follows
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
## [1.1.1] - 2026-09-17
|
|
10
|
+
|
|
11
|
+
- Prevented the production licensing presentation from covering live globes on
|
|
12
|
+
the official CanvasGlobe website and its Cloudflare preview deployments.
|
|
13
|
+
- Kept the licensing presentation unchanged for customer production domains.
|
|
14
|
+
|
|
9
15
|
## [1.1.0] - 2026-09-17
|
|
10
16
|
|
|
11
17
|
- Added official Vue, Angular, Svelte, and Web Component packages that keep
|
package/README.md
CHANGED
|
@@ -135,19 +135,19 @@ your existing application rather than installing a second React copy.
|
|
|
135
135
|
For a plain `<script>` installation, use the versioned UMD build:
|
|
136
136
|
|
|
137
137
|
```html
|
|
138
|
-
<script src="https://cdn.jsdelivr.net/npm/canvas-globe@1.1.
|
|
138
|
+
<script src="https://cdn.jsdelivr.net/npm/canvas-globe@1.1.1/dist/canvas-globe.umd.js"></script>
|
|
139
139
|
```
|
|
140
140
|
|
|
141
141
|
The same npm release is also available from UNPKG:
|
|
142
142
|
|
|
143
143
|
```html
|
|
144
|
-
<script src="https://unpkg.com/canvas-globe@1.1.
|
|
144
|
+
<script src="https://unpkg.com/canvas-globe@1.1.1/dist/canvas-globe.umd.js"></script>
|
|
145
145
|
```
|
|
146
146
|
|
|
147
147
|
Modern browsers can import the package through an ESM CDN:
|
|
148
148
|
|
|
149
149
|
```js
|
|
150
|
-
import { createGlobe } from "https://esm.sh/canvas-globe@1.1.
|
|
150
|
+
import { createGlobe } from "https://esm.sh/canvas-globe@1.1.1";
|
|
151
151
|
```
|
|
152
152
|
|
|
153
153
|
Pin an exact version in production so a future release cannot change a deployed page unexpectedly.
|
|
@@ -167,7 +167,7 @@ import { createGlobe } from "canvas-globe";
|
|
|
167
167
|
Or drop the UMD build on a page with no build step at all:
|
|
168
168
|
|
|
169
169
|
```html
|
|
170
|
-
<script src="https://cdn.jsdelivr.net/npm/canvas-globe@1.1.
|
|
170
|
+
<script src="https://cdn.jsdelivr.net/npm/canvas-globe@1.1.1/dist/canvas-globe.umd.js"></script>
|
|
171
171
|
<canvas id="globe" style="width:520px;aspect-ratio:1"></canvas>
|
|
172
172
|
<script>
|
|
173
173
|
CanvasGlobe.createGlobe(document.getElementById("globe"), {
|
package/codemeta.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"identifier": "canvas-globe",
|
|
6
6
|
"description": "CanvasGlobe helps developers add interactive 3D globes and flat world maps to JavaScript and React apps with Canvas 2D, without WebGL, map tiles, API keys, or runtime network calls.",
|
|
7
7
|
"url": "https://canvasglobe.swiftools.com/",
|
|
8
|
-
"version": "1.1.
|
|
8
|
+
"version": "1.1.1",
|
|
9
9
|
"codeRepository": "https://github.com/Shree-hari/canvas-globe",
|
|
10
10
|
"issueTracker": "https://github.com/Shree-hari/canvas-globe/issues",
|
|
11
11
|
"downloadUrl": "https://www.npmjs.com/package/canvas-globe",
|
package/dist/canvas-globe.umd.js
CHANGED
|
@@ -1314,7 +1314,7 @@ function drawFitted(ctx, media, box) {
|
|
|
1314
1314
|
}
|
|
1315
1315
|
|
|
1316
1316
|
// Keep in sync with package.json. Release checks enforce this value.
|
|
1317
|
-
const CANVAS_GLOBE_VERSION = "1.1.
|
|
1317
|
+
const CANVAS_GLOBE_VERSION = "1.1.1";
|
|
1318
1318
|
|
|
1319
1319
|
/** Local license-key checks and production-use presentation helpers. */
|
|
1320
1320
|
|
|
@@ -1342,9 +1342,18 @@ const PRIVATE_HOST_PATTERNS = [
|
|
|
1342
1342
|
/^::1$/,
|
|
1343
1343
|
];
|
|
1344
1344
|
|
|
1345
|
+
const OFFICIAL_SITE_HOSTS = new Set([
|
|
1346
|
+
"canvasglobe.swiftools.com",
|
|
1347
|
+
"canvas-globe-website.pages.dev",
|
|
1348
|
+
]);
|
|
1349
|
+
const OFFICIAL_PREVIEW_SUFFIX = ".canvas-globe-website.pages.dev";
|
|
1350
|
+
|
|
1345
1351
|
const normalizeLicenseKey = (value) =>
|
|
1346
1352
|
typeof value === "string" ? value.trim() : "";
|
|
1347
1353
|
|
|
1354
|
+
const isOfficialSiteHost = (hostname) =>
|
|
1355
|
+
OFFICIAL_SITE_HOSTS.has(hostname) || hostname.endsWith(OFFICIAL_PREVIEW_SUFFIX);
|
|
1356
|
+
|
|
1348
1357
|
/** Returns development, production or unknown for a browser location. */
|
|
1349
1358
|
function inspectRuntime(locationValue = globalThis.location) {
|
|
1350
1359
|
if (!locationValue) return { kind: "unknown", hostname: "", public: false };
|
|
@@ -1391,7 +1400,7 @@ function getLicensePresentation(
|
|
|
1391
1400
|
) {
|
|
1392
1401
|
const status = inspectLicenseKey(value, mode);
|
|
1393
1402
|
const runtime = inspectRuntime(locationValue);
|
|
1394
|
-
if (!mode || status.valid || !runtime.public) {
|
|
1403
|
+
if (!mode || status.valid || !runtime.public || isOfficialSiteHost(runtime.hostname)) {
|
|
1395
1404
|
return { status, runtime, notice: null };
|
|
1396
1405
|
}
|
|
1397
1406
|
return {
|
|
@@ -1411,6 +1420,7 @@ function reportLicenseStatus(value, mode = COMMERCIAL_LICENSE_MODE) {
|
|
|
1411
1420
|
const presentation = getLicensePresentation(value, globalThis.location, mode);
|
|
1412
1421
|
const { status } = presentation;
|
|
1413
1422
|
if (typeof location === "undefined") return status;
|
|
1423
|
+
if (!presentation.notice) return status;
|
|
1414
1424
|
if (status.kind === "missing") {
|
|
1415
1425
|
console.error(
|
|
1416
1426
|
mode
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "canvas-globe",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.1",
|
|
4
4
|
"description": "Build interactive 3D globes and flat world maps in JavaScript, React, Vue, Angular, or Svelte with Canvas 2D and no WebGL.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"author": {
|
package/src/license.js
CHANGED
|
@@ -24,9 +24,18 @@ const PRIVATE_HOST_PATTERNS = [
|
|
|
24
24
|
/^::1$/,
|
|
25
25
|
];
|
|
26
26
|
|
|
27
|
+
const OFFICIAL_SITE_HOSTS = new Set([
|
|
28
|
+
"canvasglobe.swiftools.com",
|
|
29
|
+
"canvas-globe-website.pages.dev",
|
|
30
|
+
]);
|
|
31
|
+
const OFFICIAL_PREVIEW_SUFFIX = ".canvas-globe-website.pages.dev";
|
|
32
|
+
|
|
27
33
|
const normalizeLicenseKey = (value) =>
|
|
28
34
|
typeof value === "string" ? value.trim() : "";
|
|
29
35
|
|
|
36
|
+
const isOfficialSiteHost = (hostname) =>
|
|
37
|
+
OFFICIAL_SITE_HOSTS.has(hostname) || hostname.endsWith(OFFICIAL_PREVIEW_SUFFIX);
|
|
38
|
+
|
|
30
39
|
/** Returns development, production or unknown for a browser location. */
|
|
31
40
|
export function inspectRuntime(locationValue = globalThis.location) {
|
|
32
41
|
if (!locationValue) return { kind: "unknown", hostname: "", public: false };
|
|
@@ -73,7 +82,7 @@ export function getLicensePresentation(
|
|
|
73
82
|
) {
|
|
74
83
|
const status = inspectLicenseKey(value, mode);
|
|
75
84
|
const runtime = inspectRuntime(locationValue);
|
|
76
|
-
if (!mode || status.valid || !runtime.public) {
|
|
85
|
+
if (!mode || status.valid || !runtime.public || isOfficialSiteHost(runtime.hostname)) {
|
|
77
86
|
return { status, runtime, notice: null };
|
|
78
87
|
}
|
|
79
88
|
return {
|
|
@@ -93,6 +102,7 @@ export function reportLicenseStatus(value, mode = COMMERCIAL_LICENSE_MODE) {
|
|
|
93
102
|
const presentation = getLicensePresentation(value, globalThis.location, mode);
|
|
94
103
|
const { status } = presentation;
|
|
95
104
|
if (typeof location === "undefined") return status;
|
|
105
|
+
if (!presentation.notice) return status;
|
|
96
106
|
if (status.kind === "missing") {
|
|
97
107
|
console.error(
|
|
98
108
|
mode
|
package/src/version.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// Keep in sync with package.json. Release checks enforce this value.
|
|
2
|
-
export const CANVAS_GLOBE_VERSION = "1.1.
|
|
2
|
+
export const CANVAS_GLOBE_VERSION = "1.1.1";
|