@tileflow/vue 0.1.0-alpha.19 → 0.1.0-alpha.20
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/GENERATED_OUTPUT_LICENSE.md +21 -0
- package/LICENSE +201 -0
- package/NOTICE +9 -0
- package/README.md +156 -6
- package/TRADEMARKS.md +10 -0
- package/dist/index.d.ts +73 -124
- package/dist/index.js +882 -154
- package/package.json +14 -8
|
@@ -0,0 +1,21 @@
|
|
|
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/LICENSE
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright [yyyy] [name of copyright owner]
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
package/NOTICE
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
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/README.md
CHANGED
|
@@ -12,7 +12,8 @@ import {TileflowMap} from '@tileflow/vue';
|
|
|
12
12
|
|
|
13
13
|
<template>
|
|
14
14
|
<TileflowMap
|
|
15
|
-
|
|
15
|
+
:source="{kind: 'tileflow', map: 'madrid'}"
|
|
16
|
+
theme="system"
|
|
16
17
|
:center="[-3.7038, 40.4168]"
|
|
17
18
|
:zoom="12"
|
|
18
19
|
:map-options="{
|
|
@@ -24,25 +25,174 @@ import {TileflowMap} from '@tileflow/vue';
|
|
|
24
25
|
```
|
|
25
26
|
|
|
26
27
|
`mapOptions` accepts native MapLibre options except `container` and `style`, which
|
|
27
|
-
Tileflow resolves from
|
|
28
|
+
Tileflow resolves from `source`. Direct
|
|
28
29
|
Tileflow props such as `center`, `zoom`, and `interactive` take priority when
|
|
29
|
-
provided.
|
|
30
|
+
provided. Camera resolution is the same in interactive and image modes: direct props, then
|
|
31
|
+
`mapOptions`, then the published manifest view, then Tileflow's shared runtime defaults.
|
|
32
|
+
|
|
33
|
+
Every map has exactly one discriminated `source`. Use `kind: 'tileflow'` with `map` and an optional
|
|
34
|
+
`manifestUrl` for published delivery. `kind: 'maplibre'` is an unmanaged escape hatch for one direct
|
|
35
|
+
style object or URL; it has no Tileflow theme identity, `system` selection, switching, or manifest
|
|
36
|
+
traceability. Browser components do not compile `tileflow.config.ts`.
|
|
37
|
+
|
|
38
|
+
Without `manifestUrl`, the exact default is `/tileflow/manifest.json`. If a bundler, framework base
|
|
39
|
+
path, reverse proxy, or Tileflow plugin publishes it elsewhere, set the final public URL explicitly;
|
|
40
|
+
the component does not guess it. Manifest 404s, unknown map IDs, unresolved styles, and unresolved
|
|
41
|
+
image URLs enter `data-tileflow-state="error"`.
|
|
42
|
+
|
|
43
|
+
`theme` selects a published theme name; omission uses `defaultTheme`, while `"system"` requires the
|
|
44
|
+
map's explicit light/dark mapping. Switching themes preserves the MapLibre instance, camera, and
|
|
45
|
+
interaction state, with rollback on failure. Listen to `themeChange` for transition state.
|
|
46
|
+
|
|
47
|
+
```vue
|
|
48
|
+
<TileflowMap
|
|
49
|
+
:source="{
|
|
50
|
+
kind: 'tileflow',
|
|
51
|
+
map: 'madrid',
|
|
52
|
+
manifestUrl: 'https://cdn.example.com/tileflow/manifest.json',
|
|
53
|
+
}"
|
|
54
|
+
/>
|
|
55
|
+
|
|
56
|
+
<TileflowMap
|
|
57
|
+
:source="{
|
|
58
|
+
kind: 'maplibre',
|
|
59
|
+
style: 'https://cdn.example.com/tileflow/styles/madrid/dark.json',
|
|
60
|
+
}"
|
|
61
|
+
/>
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
`mode="image"` resolves an explicit or published image URL and renders an `<img>` without loading
|
|
65
|
+
or evaluating MapLibre. All environments follow the same published manifest contract.
|
|
66
|
+
|
|
67
|
+
## Annotations, semantic POIs, and native Vue views
|
|
68
|
+
|
|
69
|
+
Use `annotations` for small, application-owned DOM markers. The portable annotation data and
|
|
70
|
+
interaction state remain JSON-safe. Use `interactions` to bind tooltip or popup behavior to
|
|
71
|
+
manifest-declared semantic POIs already rendered by the map style; this avoids creating one DOM
|
|
72
|
+
marker per feature. Scoped slots render native Vue UI into hosts owned by the shared interaction
|
|
73
|
+
runtime.
|
|
74
|
+
|
|
75
|
+
```vue
|
|
76
|
+
<script setup lang="ts">
|
|
77
|
+
import {ref} from 'vue';
|
|
78
|
+
import type {
|
|
79
|
+
TileflowAnnotation,
|
|
80
|
+
TileflowInteractionBinding,
|
|
81
|
+
TileflowInteractionState,
|
|
82
|
+
} from '@tileflow/interactions';
|
|
83
|
+
import {TileflowMap} from '@tileflow/vue';
|
|
84
|
+
|
|
85
|
+
type Property = {address: string; price: number};
|
|
86
|
+
|
|
87
|
+
const annotations = [
|
|
88
|
+
{
|
|
89
|
+
kind: 'marker',
|
|
90
|
+
id: 'property-42',
|
|
91
|
+
coordinate: [-3.7, 40.4],
|
|
92
|
+
ariaLabel: 'Apartment in Madrid',
|
|
93
|
+
data: {address: 'Calle Mayor', price: 320_000},
|
|
94
|
+
tooltip: {content: {kind: 'field', field: 'address'}},
|
|
95
|
+
popup: {content: {kind: 'view', name: 'property-card'}},
|
|
96
|
+
},
|
|
97
|
+
] satisfies readonly TileflowAnnotation<Property>[];
|
|
98
|
+
|
|
99
|
+
const interactions = [
|
|
100
|
+
{
|
|
101
|
+
id: 'restaurant-details',
|
|
102
|
+
target: {kind: 'semantic-feature', domain: 'poi', categories: ['food-drink']},
|
|
103
|
+
tooltip: {content: {kind: 'field', field: 'name', fallback: 'Restaurant'}},
|
|
104
|
+
popup: {content: {kind: 'view', name: 'poi-card'}},
|
|
105
|
+
},
|
|
106
|
+
] satisfies readonly TileflowInteractionBinding[];
|
|
107
|
+
|
|
108
|
+
const interactionState = ref<TileflowInteractionState>({popup: null});
|
|
109
|
+
</script>
|
|
110
|
+
|
|
111
|
+
<template>
|
|
112
|
+
<TileflowMap
|
|
113
|
+
v-model:interaction-state="interactionState"
|
|
114
|
+
:source="{kind: 'tileflow', map: 'madrid'}"
|
|
115
|
+
:annotations="annotations"
|
|
116
|
+
:interactions="interactions"
|
|
117
|
+
@interaction-event="(event) => console.log(event.type, event.target)"
|
|
118
|
+
@interaction-diagnostic="(diagnostic) => console.warn(diagnostic.code)"
|
|
119
|
+
>
|
|
120
|
+
<template #marker="{annotation}">
|
|
121
|
+
<span class="price-marker">{{ annotation.data.price.toLocaleString() }}</span>
|
|
122
|
+
</template>
|
|
123
|
+
|
|
124
|
+
<template #tooltip="{target}">
|
|
125
|
+
<span v-if="target.kind === 'annotation'">{{ target.annotation.data.address }}</span>
|
|
126
|
+
<span v-else-if="target.kind === 'semantic-feature'">
|
|
127
|
+
{{ target.feature.properties.name }}
|
|
128
|
+
</span>
|
|
129
|
+
</template>
|
|
130
|
+
|
|
131
|
+
<template #popup="{target, close}">
|
|
132
|
+
<article v-if="target.kind === 'annotation'">
|
|
133
|
+
<strong>{{ target.annotation.data.address }}</strong>
|
|
134
|
+
<button type="button" @click="close">Close</button>
|
|
135
|
+
</article>
|
|
136
|
+
<article v-else-if="target.kind === 'semantic-feature'">
|
|
137
|
+
<strong>{{ target.feature.properties.name }}</strong>
|
|
138
|
+
<button type="button" @click="close">Close</button>
|
|
139
|
+
</article>
|
|
140
|
+
</template>
|
|
141
|
+
</TileflowMap>
|
|
142
|
+
</template>
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
Omit `interactionState` and use `default-interaction-state` for uncontrolled state. Do not provide
|
|
146
|
+
both or switch ownership modes during a component instance's lifetime. Likewise, the legacy
|
|
147
|
+
`markers` prop and `annotations` are mutually exclusive. Legacy markers
|
|
148
|
+
are normalized into annotations and retain their exact `title = label ?? id` behavior while the
|
|
149
|
+
new API uses singular `coordinate` and required `ariaLabel`.
|
|
150
|
+
|
|
151
|
+
The `marker` slot is annotation-only and preserves the annotation's generic `data` type.
|
|
152
|
+
`tooltip` and `popup` receive the general `TileflowInteractionViewContext`; narrow
|
|
153
|
+
`target.kind` to access either `target.annotation` or the resolved semantic feature. Semantic POI
|
|
154
|
+
bindings require a compatible `tileflow:interaction-manifest` in the active style. Bindings are
|
|
155
|
+
validated before reaching MapLibre, POI hit tests are coalesced with `requestAnimationFrame`, and
|
|
156
|
+
annotation plus semantic runtimes share one controlled or uncontrolled popup state.
|
|
157
|
+
Values in `target.categories` use Tileflow's semantic taxonomy (for example `food` or `coffee`),
|
|
158
|
+
not raw OpenMapTiles classes.
|
|
159
|
+
|
|
160
|
+
Text content is inserted as text, `field` is a bounded declarative lookup, and `view` is only a
|
|
161
|
+
dispatch name for the corresponding application-owned scoped slot. No interaction path evaluates
|
|
162
|
+
HTML. Passing annotations, semantic interactions, or interaction state to `mode="image"` emits an `UNSUPPORTED_MODE`
|
|
163
|
+
diagnostic, marks capture readiness as `error`, and still does not load or evaluate MapLibre.
|
|
164
|
+
|
|
165
|
+
Changing annotations, semantic bindings, slots, state listeners, or diagnostic listeners
|
|
166
|
+
reconciles the existing runtimes; it does not recreate the map. The semantic runtime is initialized
|
|
167
|
+
lazily, and the component and its interaction imports remain SSR-safe.
|
|
30
168
|
|
|
31
169
|
Hosted maps automatically preflight a short-lived commercial session grant before eligible
|
|
32
170
|
resources. Setting `analytics` with `enabled: false` disables the optional beacon only; it does not
|
|
33
171
|
remove hosted authorization or override a user `mapOptions.transformRequest` callback.
|
|
172
|
+
Direct Tileflow World maps keep early `GRACE` silent, show a compact accessible owner-action pill
|
|
173
|
+
when late `GRACE` is activated, and show a stronger banner in `CLAIM_REQUIRED`. Missing tiles and
|
|
174
|
+
MapLibre failures do not remove that recovery path.
|
|
34
175
|
|
|
35
176
|
## Headless capture readiness
|
|
36
177
|
|
|
37
178
|
Pass `capture-id` when a page contains multiple copies of the same named map:
|
|
38
179
|
|
|
39
180
|
```vue
|
|
40
|
-
<TileflowMap
|
|
181
|
+
<TileflowMap :source="{kind: 'tileflow', map: 'madrid'}" capture-id="checkout-map" />
|
|
41
182
|
```
|
|
42
183
|
|
|
43
184
|
The root exposes `data-tileflow-map`, optional `data-tileflow-capture-id`, and
|
|
44
185
|
`data-tileflow-state="loading|idle|error"`. It becomes idle only after MapLibre idle plus two
|
|
45
|
-
animation frames (or image decode/load in image mode)
|
|
46
|
-
|
|
186
|
+
animation frames (or image decode/load in image mode). A change to custom tooltip/popup/marker
|
|
187
|
+
render-target keys independently returns interaction readiness to loading until Vue commits the
|
|
188
|
+
Teleports and two current animation frames pass. Map and interaction errors are combined;
|
|
189
|
+
application capture selects exactly one ready target.
|
|
190
|
+
|
|
191
|
+
## Compatibility
|
|
192
|
+
|
|
193
|
+
The supported peer window is Vue 3.3-3.x and MapLibre GL JS 5-6. Compatibility smoke tests install
|
|
194
|
+
Vue 3.3.0 with the first release of both MapLibre majors from packed Tileflow tarballs, typecheck a
|
|
195
|
+
consumer, and render the image/SSR path while rejecting any MapLibre import. Vue 4 stays outside the
|
|
196
|
+
peer range until that matrix passes.
|
|
47
197
|
|
|
48
198
|
Docs: https://tileflow.dev/docs
|
package/TRADEMARKS.md
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
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.
|
package/dist/index.d.ts
CHANGED
|
@@ -1,140 +1,89 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
1
|
+
import { MapOptions, Map } from 'maplibre-gl';
|
|
2
|
+
import { DefineComponent, VNodeChild } from 'vue';
|
|
3
|
+
import { TileflowThemeTransition } from '@tileflow/core/browser';
|
|
4
|
+
import { TileflowRuntimeSource, TileflowThemeSelection, TileflowAnalytics, TileflowMapMarker } from '@tileflow/core/runtime';
|
|
5
|
+
import { TileflowAnnotation, TileflowInteractionJsonValue, TileflowInteractionState, TileflowInteractionBinding, TileflowInteractionDiagnostic, TileflowInteractionEvent, TileflowAnnotationViewContext, TileflowInteractionViewContext } from '@tileflow/interactions';
|
|
6
|
+
|
|
7
|
+
type TileflowMapStyleSourceProps = {
|
|
8
|
+
source: TileflowRuntimeSource;
|
|
9
|
+
theme?: TileflowThemeSelection;
|
|
10
|
+
};
|
|
5
11
|
|
|
6
12
|
type TileflowMapMode = 'interactive' | 'image';
|
|
7
13
|
type TileflowMapOptions = Omit<MapOptions, 'container' | 'style'>;
|
|
8
|
-
type
|
|
14
|
+
type TileflowMapSource = TileflowRuntimeSource;
|
|
15
|
+
type TileflowMapAnnotationSlotContext<TAnnotation extends TileflowAnnotation = TileflowAnnotation> = TileflowAnnotationViewContext<TAnnotation>;
|
|
16
|
+
type TileflowMapInteractionSlotContext<TAnnotation extends TileflowAnnotation = TileflowAnnotation> = TileflowInteractionViewContext<TAnnotation>;
|
|
17
|
+
type TileflowMapSlots<TAnnotation extends TileflowAnnotation = TileflowAnnotation> = {
|
|
18
|
+
marker?: (context: TileflowMapAnnotationSlotContext<TAnnotation>) => VNodeChild;
|
|
19
|
+
popup?: (context: TileflowMapInteractionSlotContext<TAnnotation>) => VNodeChild;
|
|
20
|
+
tooltip?: (context: TileflowMapInteractionSlotContext<TAnnotation>) => VNodeChild;
|
|
21
|
+
};
|
|
22
|
+
type TileflowMapSharedProps = {
|
|
9
23
|
alt?: string;
|
|
10
24
|
analytics?: TileflowAnalytics;
|
|
11
25
|
center?: [number, number];
|
|
12
26
|
captureId?: string;
|
|
13
27
|
className?: string;
|
|
14
|
-
config?: TileflowConfig;
|
|
15
28
|
height?: number | string;
|
|
16
29
|
imageLoading?: HTMLImageElement['loading'];
|
|
17
30
|
imageUrl?: string;
|
|
18
|
-
interactive?: boolean;
|
|
19
|
-
manifestUrl?: string;
|
|
20
|
-
map?: string;
|
|
21
31
|
mapOptions?: TileflowMapOptions;
|
|
22
|
-
mapStyle?: MapLibreStyle;
|
|
23
|
-
markers?: TileflowMapMarker[];
|
|
24
|
-
mode?: TileflowMapMode;
|
|
25
|
-
preferLocalDev?: boolean;
|
|
26
|
-
styleBaseUrl?: string;
|
|
27
|
-
styleUrl?: string;
|
|
28
|
-
themes?: TileflowProjectThemes;
|
|
29
32
|
zoom?: number;
|
|
30
33
|
};
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
alt: {
|
|
83
|
-
default: string;
|
|
84
|
-
type: StringConstructor;
|
|
85
|
-
};
|
|
86
|
-
analytics: PropType<TileflowAnalytics>;
|
|
87
|
-
center: PropType<[number, number]>;
|
|
88
|
-
captureId: StringConstructor;
|
|
89
|
-
className: StringConstructor;
|
|
90
|
-
config: PropType<TileflowConfig>;
|
|
91
|
-
height: {
|
|
92
|
-
default: number;
|
|
93
|
-
type: PropType<number | string>;
|
|
94
|
-
};
|
|
95
|
-
imageLoading: {
|
|
96
|
-
default: string;
|
|
97
|
-
type: PropType<HTMLImageElement["loading"]>;
|
|
98
|
-
};
|
|
99
|
-
imageUrl: StringConstructor;
|
|
100
|
-
interactive: {
|
|
101
|
-
default: undefined;
|
|
102
|
-
type: PropType<boolean | undefined>;
|
|
103
|
-
};
|
|
104
|
-
manifestUrl: {
|
|
105
|
-
default: string;
|
|
106
|
-
type: StringConstructor;
|
|
107
|
-
};
|
|
108
|
-
map: StringConstructor;
|
|
109
|
-
mapOptions: PropType<TileflowMapOptions>;
|
|
110
|
-
mapStyle: PropType<MapLibreStyle>;
|
|
111
|
-
markers: {
|
|
112
|
-
default: () => never[];
|
|
113
|
-
type: PropType<TileflowMapMarker[]>;
|
|
114
|
-
};
|
|
115
|
-
mode: {
|
|
116
|
-
default: string;
|
|
117
|
-
type: PropType<TileflowMapMode>;
|
|
118
|
-
};
|
|
119
|
-
preferLocalDev: {
|
|
120
|
-
default: boolean;
|
|
121
|
-
type: BooleanConstructor;
|
|
34
|
+
type TileflowMapAnnotationInput<TAnnotation extends TileflowAnnotation> = {
|
|
35
|
+
annotations?: readonly TAnnotation[];
|
|
36
|
+
markers?: never;
|
|
37
|
+
} | {
|
|
38
|
+
annotations?: never;
|
|
39
|
+
markers?: readonly TileflowMapMarker[];
|
|
40
|
+
};
|
|
41
|
+
type TileflowMapStateInput = {
|
|
42
|
+
defaultInteractionState?: never;
|
|
43
|
+
interactionState?: TileflowInteractionState;
|
|
44
|
+
} | {
|
|
45
|
+
defaultInteractionState?: TileflowInteractionState;
|
|
46
|
+
interactionState?: never;
|
|
47
|
+
};
|
|
48
|
+
type TileflowMapInteractiveProps<TAnnotation extends TileflowAnnotation> = TileflowMapSharedProps & TileflowMapAnnotationInput<TAnnotation> & TileflowMapStateInput & {
|
|
49
|
+
interactions?: readonly TileflowInteractionBinding[];
|
|
50
|
+
interactive?: boolean;
|
|
51
|
+
mode?: 'interactive';
|
|
52
|
+
};
|
|
53
|
+
type TileflowMapImageProps = TileflowMapSharedProps & {
|
|
54
|
+
annotations?: never;
|
|
55
|
+
defaultInteractionState?: never;
|
|
56
|
+
interactionState?: never;
|
|
57
|
+
interactions?: never;
|
|
58
|
+
interactive?: never;
|
|
59
|
+
markers?: never;
|
|
60
|
+
mode: 'image';
|
|
61
|
+
};
|
|
62
|
+
type TileflowMapProps<TAnnotation extends TileflowAnnotation = TileflowAnnotation> = (TileflowMapInteractiveProps<TAnnotation> | TileflowMapImageProps) & TileflowMapStyleSourceProps;
|
|
63
|
+
type RuntimeTileflowAnnotation = TileflowAnnotation<TileflowInteractionJsonValue>;
|
|
64
|
+
type RuntimeTileflowMapProps = TileflowMapSharedProps & TileflowMapStyleSourceProps & {
|
|
65
|
+
annotations?: readonly RuntimeTileflowAnnotation[];
|
|
66
|
+
defaultInteractionState?: TileflowInteractionState;
|
|
67
|
+
interactionState?: TileflowInteractionState;
|
|
68
|
+
interactions?: readonly TileflowInteractionBinding[];
|
|
69
|
+
interactive?: boolean;
|
|
70
|
+
markers?: readonly TileflowMapMarker[];
|
|
71
|
+
mode?: TileflowMapMode;
|
|
72
|
+
};
|
|
73
|
+
type PublicTileflowMapStatics = Pick<DefineComponent<RuntimeTileflowMapProps>, keyof DefineComponent<RuntimeTileflowMapProps>>;
|
|
74
|
+
type PublicTileflowMapComponent = PublicTileflowMapStatics & {
|
|
75
|
+
new <TAnnotation extends TileflowAnnotation = TileflowAnnotation>(props: TileflowMapProps<TAnnotation>): {
|
|
76
|
+
$emit: {
|
|
77
|
+
(event: 'interactionDiagnostic', diagnostic: TileflowInteractionDiagnostic): void;
|
|
78
|
+
(event: 'interactionEvent', interactionEvent: TileflowInteractionEvent<TAnnotation>): void;
|
|
79
|
+
(event: 'load', map: Map): void;
|
|
80
|
+
(event: 'themeChange', transition: TileflowThemeTransition): void;
|
|
81
|
+
(event: 'update:interactionState', state: TileflowInteractionState): void;
|
|
82
|
+
};
|
|
83
|
+
$props: TileflowMapProps<TAnnotation>;
|
|
84
|
+
$slots: TileflowMapSlots<TAnnotation>;
|
|
122
85
|
};
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
themes: PropType<TileflowProjectThemes>;
|
|
126
|
-
zoom: NumberConstructor;
|
|
127
|
-
}>> & Readonly<{
|
|
128
|
-
onLoad?: ((_map: maplibregl.Map) => any) | undefined;
|
|
129
|
-
}>, {
|
|
130
|
-
interactive: boolean | undefined;
|
|
131
|
-
alt: string;
|
|
132
|
-
height: string | number;
|
|
133
|
-
imageLoading: "eager" | "lazy";
|
|
134
|
-
manifestUrl: string;
|
|
135
|
-
markers: TileflowMapMarker[];
|
|
136
|
-
mode: TileflowMapMode;
|
|
137
|
-
preferLocalDev: boolean;
|
|
138
|
-
}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
86
|
+
};
|
|
87
|
+
declare const TileflowMap: PublicTileflowMapComponent;
|
|
139
88
|
|
|
140
|
-
export { TileflowMap, type TileflowMapMode, type TileflowMapOptions, type TileflowMapProps, TileflowMap as default };
|
|
89
|
+
export { TileflowMap, type TileflowMapAnnotationSlotContext, type TileflowMapInteractionSlotContext, type TileflowMapMode, type TileflowMapOptions, type TileflowMapProps, type TileflowMapSlots, type TileflowMapSource, TileflowMap as default };
|