@tileflow/react 0.1.0-alpha.21 → 0.1.0-alpha.23

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 CHANGED
@@ -230,9 +230,13 @@ export function Preview() {
230
230
  <StaticMap
231
231
  map="madrid"
232
232
  camera={{type: 'center', center: [-3.7038, 40.4168], zoom: 12}}
233
+ attribution={{mode: 'external'}}
233
234
  size={{width: 1200, height: 800}}
234
235
  createUrl="/api/static-maps"
235
236
  idempotencyKey={idempotencyKey}
237
+ onReady={(result) => {
238
+ if (result.resultVersion === 2) showAttribution(result.attribution.entries);
239
+ }}
236
240
  />
237
241
  );
238
242
  }
@@ -243,6 +247,11 @@ reuse it across retries and remounts. Concurrent React consumers share work only
243
247
  normalized scene, and idempotency key all identify the same operation; unmounting the final
244
248
  consumer aborts its in-flight request.
245
249
 
250
+ `StaticMap` forwards `attribution` as part of the normalized scene and request identity. Omission
251
+ uses embedded automatic placement. With `mode: 'external'`, the component still renders the image,
252
+ but the application must render every structured `onReady` attribution entry beside it. Existing
253
+ `imageUrl` mode has no operation result and cannot infer attribution from an immutable image URL.
254
+
246
255
  Hosted interactive maps automatically preflight a short-lived commercial session grant before
247
256
  eligible resources. Setting `analytics={{enabled: false}}` disables the optional beacon only; it
248
257
  does not remove hosted authorization or override a user `mapOptions.transformRequest` callback.
package/dist/static.d.ts CHANGED
@@ -26,6 +26,6 @@ type StaticMapCreateProps = {
26
26
  imageUrl?: never;
27
27
  };
28
28
  type StaticMapProps = StaticMapBaseProps & (StaticMapCreateProps | StaticMapImageProps);
29
- declare function StaticMap({ alt, camera, className, captureId, createUrl, imageStyle, imageUrl, idempotencyKey, keepPreviousImage, loading, map, onError, onImageLoad, onReady, overlays, size, style, theme, }: StaticMapProps): react.JSX.Element;
29
+ declare function StaticMap({ alt, attribution, camera, className, captureId, createUrl, format, imageStyle, imageUrl, idempotencyKey, keepPreviousImage, loading, map, onError, onImageLoad, onReady, overlays, size, style, theme, }: StaticMapProps): react.JSX.Element;
30
30
 
31
31
  export { StaticMap, type StaticMapProps };
package/dist/static.js CHANGED
@@ -107,10 +107,12 @@ function abortReason(signal) {
107
107
  import { jsx } from "react/jsx-runtime";
108
108
  function StaticMap({
109
109
  alt = "",
110
+ attribution,
110
111
  camera,
111
112
  className,
112
113
  captureId,
113
114
  createUrl,
115
+ format,
114
116
  imageStyle,
115
117
  imageUrl,
116
118
  idempotencyKey,
@@ -135,10 +137,10 @@ function StaticMap({
135
137
  const resolvedCaptureId = normalizeTileflowCaptureId(captureId);
136
138
  const onErrorRef = useRef(onError);
137
139
  const onReadyRef = useRef(onReady);
138
- const sceneInputKey = stableStringify2({ camera, map, overlays, size, theme });
140
+ const sceneInputKey = stableStringify2({ attribution, camera, format, map, overlays, size, theme });
139
141
  const preparedSceneCandidate = useMemo(
140
- () => prepareSceneRequest({ camera, map, overlays, size, theme }),
141
- [camera, map, overlays, size, theme]
142
+ () => prepareSceneRequest({ attribution, camera, format, map, overlays, size, theme }),
143
+ [attribution, camera, format, map, overlays, size, theme]
142
144
  );
143
145
  const preparedScene = useStablePreparedSceneRequest(preparedSceneCandidate);
144
146
  const sceneKey = preparedScene.ok ? preparedScene.request.sceneKey : `invalid:${sceneInputKey}`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tileflow/react",
3
- "version": "0.1.0-alpha.21",
3
+ "version": "0.1.0-alpha.23",
4
4
  "license": "Apache-2.0",
5
5
  "description": "React components for rendering Tileflow maps with MapLibre.",
6
6
  "type": "module",
@@ -25,10 +25,7 @@
25
25
  "types": "./dist/index.d.ts",
26
26
  "files": [
27
27
  "dist",
28
- "LICENSE",
29
- "NOTICE",
30
- "GENERATED_OUTPUT_LICENSE.md",
31
- "TRADEMARKS.md"
28
+ "LICENSE"
32
29
  ],
33
30
  "exports": {
34
31
  ".": {
@@ -46,9 +43,9 @@
46
43
  "access": "public"
47
44
  },
48
45
  "dependencies": {
49
- "@tileflow/core": ">=0.1.0-alpha.22 <0.1.0-beta.0",
50
- "@tileflow/interactions": ">=0.1.0-alpha.1 <0.1.0-beta.0",
51
- "@tileflow/static": ">=0.1.0-alpha.18 <0.1.0-beta.0"
46
+ "@tileflow/core": ">=0.1.0-alpha.24 <0.1.0-beta.0",
47
+ "@tileflow/interactions": ">=0.1.0-alpha.2 <0.1.0-beta.0",
48
+ "@tileflow/static": ">=0.1.0-alpha.23 <0.1.0-beta.0"
52
49
  },
53
50
  "peerDependencies": {
54
51
  "maplibre-gl": ">=5 <7",
@@ -1,21 +0,0 @@
1
- # Tileflow generated-output grant
2
-
3
- In addition to the rights granted by the Apache License, Version 2.0, Tileflow.dev contributors
4
- grant recipients a perpetual, worldwide, non-exclusive, no-charge, royalty-free right to use,
5
- reproduce, modify, display, perform, distribute, sublicense, and commercialize the Tileflow-owned
6
- parts of output generated by this SDK.
7
-
8
- Covered output includes compiled map styles, manifests, receipts, sprites, glyph artifacts, static
9
- render descriptions, and other build artifacts produced from Tileflow maps or application maps.
10
- Original Tileflow map definitions, icons, and patterns distributed by `@tileflow/maps` may likewise
11
- be used, modified, embedded, deployed, and redistributed as part of personal or commercial maps and
12
- applications.
13
-
14
- This grant does not relicense third-party software, fonts, icons, map data, datasets, imagery, or
15
- other input material. Their licenses, attribution requirements, notices, and use restrictions
16
- continue to apply to the relevant source and generated output. You are responsible for having the
17
- rights necessary to process and distribute your own inputs.
18
-
19
- This grant does not provide access to Tileflow hosted services or grant rights in Tileflow names,
20
- logos, or marks. The SDK and generated output are provided without warranties or conditions beyond
21
- those required by applicable law.
package/NOTICE DELETED
@@ -1,9 +0,0 @@
1
- Tileflow SDK
2
- Copyright 2026 Tileflow.dev contributors
3
-
4
- This product includes software and original map artwork developed by Tileflow.dev contributors.
5
-
6
- Third-party materials distributed with a package remain subject to their own license and notice
7
- files. See THIRD_PARTY_NOTICES.md and asset-adjacent license files where present.
8
-
9
- The Tileflow names and marks are not licensed under the Apache License 2.0. See TRADEMARKS.md.
package/TRADEMARKS.md DELETED
@@ -1,10 +0,0 @@
1
- # Tileflow trademarks
2
-
3
- The Apache License, Version 2.0, and the Tileflow generated-output grant do not grant permission to
4
- use the Tileflow name, `tileflow.dev`, logos, service marks, product names, or other Tileflow brand
5
- features except for reasonable and customary use that truthfully describes the origin of the SDK or
6
- compatibility with Tileflow, and for reproducing required notices.
7
-
8
- You may not use Tileflow brand features in a way that suggests sponsorship, endorsement, or an
9
- official Tileflow product when none exists. Third-party names and marks remain the property of their
10
- respective owners.