@sakuzu/maplibre-gl-draw-ui 1.0.0 → 1.2.0

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 CHANGED
@@ -7,6 +7,194 @@ follows semantic versioning.
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [1.2.0] - 2026-10-02
11
+
12
+ The narrow screen and the stage, from the visual review: the map's
13
+ padding and its controls follow the panes kata's Shell reports, the
14
+ actions card stands above the attribution and fits the map, the
15
+ inspector takes the width of its sheet and keeps its tabs in the head,
16
+ Delete has one place, maplibre-gl's controls follow the theme, and every
17
+ dataset is dragged among the layers. It reads kata 1.6.0.
18
+
19
+ ### Added in 1.2.0
20
+
21
+ - maplibre-gl's controls in the map's container, those of the
22
+ application too, follow the theme of `createDrawUI` (#10). The control
23
+ container (`.maplibregl-control-container`) has `data-mgd-ui-controls`,
24
+ to which the build moves kata's tokens as it does to `.mgd-ui`, and
25
+ the `data-color-mode` of the root, following `setTheme` and the
26
+ system; `destroy()` removes both. The groups of buttons, the lines
27
+ between them, the attribution and the scale are painted with the
28
+ tokens, and maplibre-gl's icons are inverted in the dark look.
29
+
30
+ ### Changed in 1.2.0
31
+
32
+ - Every dataset is dragged among the layers in the layer panel (#6). A
33
+ dataset of `above-store` or `below-store` dropped among the layers is
34
+ moved to `layer-order` (`datasets.move`) and placed with
35
+ `layers.reorder`; when the reorder is refused, it goes back to its
36
+ own order. `LayerPanelDraw` needs `datasets.move`.
37
+ - The map's padding follows the inset of kata's Shell (`onlayout`)
38
+ (#8): at the left, the room the left pane takes, beside the map or
39
+ floating over it with its gap; at the bottom, the height of the
40
+ sheets. The right pane, which opens with the selection, and the
41
+ toolbar are no longer padding, so the view does not jump on a
42
+ selection.
43
+ - The controls of the bottom right of the map (not the attribution)
44
+ move to the left of the right pane, gap-md apart, while they would be
45
+ under it, and the bottom left corner (the scale) rises above the
46
+ attribution's box where that box reaches it across, as the two-line
47
+ attribution of a narrow map does (#8). The attribution is only read;
48
+ its compact form stays maplibre-gl's own.
49
+ - The actions card stands above the higher of the scale and the
50
+ attribution's box where that box reaches the card across (#7). Its
51
+ height is capped to the map above its place, less gap-md at the top
52
+ and the button that opens the layer panel again while it shows, and
53
+ the whole card scrolls.
54
+ - In a sheet, on a narrow map, the inspector takes the width of the
55
+ sheet instead of the width of a panel (#9). The inspector of a feature
56
+ passes its tabs to kata's InspectorFrame, so they stay in the head
57
+ while the content scrolls; its measurements are under the head, and
58
+ its description starts the content of each tab.
59
+ - Delete is in the lead of the foot for several features, layers or
60
+ groups, as for one feature, instead of among the operations (#11).
61
+ - kata 1.6.0: the Footer of an inspector stacks only when its row does
62
+ not fit, a sheet's half stage is the content's height, a narrow map
63
+ opens one side sheet at a time, and the actions of a row of the layer
64
+ panel that show on hover take no room until the row is hovered.
65
+
66
+ ## [1.1.0] - 2026-10-01
67
+
68
+ The basemaps as the back of the stack in the layer panel, the datasets
69
+ as rows of the stack, a limit on the features the panel lists, the
70
+ snapping settings on the magnet, the actions of the application in a
71
+ card, the inspector on the first tab of its options, and the layer panel
72
+ without a pencil, in-place renaming and row counts. The word
73
+ `activeLayer` leaves the `Messages` type (a locale that still sets it is
74
+ ignored at runtime).
75
+
76
+ ### Added in 1.1.0
77
+
78
+ - The datasets are rows of the layer panel, in their place in
79
+ the stack: those of `above-store` in front of every layer, those of
80
+ `layer-order` where `layers.getOrder()` places them among the layers,
81
+ and those of `below-store` behind every layer. A row shows the ID of
82
+ the dataset with a database mark, and the eye shows and hides it with
83
+ `setVisible`. It has no lock, and a press
84
+ on it leaves the selection as it is. A
85
+ `layer-order` dataset is dragged among the layers (`layers.reorder`
86
+ with its ID); the others stay. The rows follow `dataset.added`,
87
+ `dataset.removed`, `dataset.reordered` and the `changed` event of each
88
+ dataset. The option `datasets: false` (`LayerPanelOptions`) leaves
89
+ them out. New word: `datasets`.
90
+ - The basemaps of the layer panel, `basemaps` (`{ id, label,
91
+ style, preview }`), `basemap` and `onbasemap`, in the options of
92
+ `createDrawUI` and of `createLayerPanel` (`LayerPanelOptions`). With
93
+ two or more, the basemap row opens them on the right, in the place of
94
+ the inspector: a list of their labels, each with its `preview` (a
95
+ value of CSS `background`; a neutral square without one) and a check
96
+ on the current one. Opening it clears the selection; a selection made
97
+ on the map or in the tree, its close button and Escape close it.
98
+ Choosing one replaces the map's style, calls `onbasemap` and leaves
99
+ the list open; `basemap` names the current one at the start, and
100
+ `ui.setBasemap(id)` and `ui.getBasemap()` change and read it. The
101
+ drawing is drawn again on top of the new style. The layer panel put
102
+ alone opens the list in the place of its sections.
103
+ - The legend lists the style rules of the datasets as well as
104
+ those of the layers, in the order of the stack: a block for each
105
+ dataset with a rule (`Dataset.getStyleRule()` of core), titled with
106
+ its ID, with the rows `deriveLegend` gives and swatches shaped after
107
+ the types of its first rows. It follows `dataset.added`,
108
+ `dataset.removed`, `dataset.reordered` and the `changed` event of each
109
+ dataset (the reasons `style` and `rows`). The word `noLegend` now says
110
+ that no layer or dataset has a style rule. It needs core with
111
+ `Dataset.getStyleRule()`.
112
+ - The actions of the application, rows of a card at the bottom
113
+ left of the map, above maplibre-gl's scale: `ui.actions` (`add`,
114
+ `remove`, `list`, `refresh`) and the options `actions` and
115
+ `actionsTitle` of `createDrawUI`. An action (`ActionSpec`) is a switch
116
+ (`kind: 'toggle'`), which shows what `checked` returns, or a button
117
+ (`kind: 'action'`), and its `shortcut` is a key of the interface,
118
+ listed with `?` under the title of the card. `run` is called by a
119
+ press and by the key; `checked` and `disabled` are read again after
120
+ each run and on `refresh()`, and `hint` is a caption under the row. A
121
+ key the interface or another action uses is refused with an error, and
122
+ `tools.add` refuses the key of an action. The card folds into one
123
+ button from its head, starts folded on a map narrower than 48rem, and
124
+ stands above the toolbar where it would reach it across; the layer
125
+ panel floating at the left ends above it. New word: `actions`.
126
+ `actionsOpen: false` starts the card folded.
127
+
128
+ ### Changed in 1.1.0
129
+
130
+ - The layer panel lists up to 1,000 features in a layer, those
131
+ of its groups included. A layer that holds more lists none of them and
132
+ none of its groups: its one child is a row with their number and a
133
+ hint, "12,345 features. Select them on the map.", which is not
134
+ pressed, hidden, locked or dragged. The row of the layer works as
135
+ before. Each row of the panel costs about a third of a millisecond to
136
+ draw, so a layer of 20,000 features took seconds. `features`
137
+ (`LayerPanelOptions`) is now `boolean | number`: `true` (the default)
138
+ for the limit of 1,000, a number for another limit, `false` for no
139
+ features; a number less than 0 throws. New word: `manyFeatures` (with
140
+ `{count}`).
141
+ - The layer panel is a stack of two sections, as in the
142
+ reference layout. The first, Stack (the new word `stack`), is the
143
+ tree with the add menu in its head; the second, Basemap, holds one
144
+ row with a globe mark and the name of the basemap the map shows: the
145
+ label of the current one of `basemaps`, else the `name` of the map's
146
+ style, else the word `basemap`. The panel lists the stack from the
147
+ front, and the basemap is its back. The row is not a node of the tree:
148
+ it is not dragged, hidden, locked or selected. Before the release, the
149
+ menu of the basemaps was a button at the top right of the map, beside
150
+ the theme button, and then a menu under the tree; both are gone.
151
+ - The inspector of a feature opens on the first tab of
152
+ `inspector.tabs`, so `['attributes', 'style']` opens on Attributes.
153
+ The default stays `['style', 'attributes']`, which opens on Style. Once
154
+ a tab is chosen, it is kept from one feature to the next as before.
155
+ - The magnet of the toolbar opens the snapping settings above
156
+ the toolbar instead of switching snapping: snapping, the kinds of
157
+ target under it (vertices, edges, intersections and guides, off while
158
+ snapping is off), snapping to datasets, tracing edges and moving shared
159
+ vertices together, and the key that pauses snapping. Each switch writes
160
+ `draw.options.update` and follows `options.changed`. The magnet stays
161
+ pressed while snapping is on. New words: `snapVertex`, `snapEdge`,
162
+ `snapIntersection`, `snapGuide`, `snapDatasets`, `traceEdges`,
163
+ `sharedVertexDrag` and `snapPauseKey` (with `{key}`).
164
+
165
+ ### Removed in 1.1.0
166
+
167
+ - Renaming in place in the layer panel (F2 or a double click on
168
+ a row), as in the reference layout. The names of layers, groups and
169
+ features are changed in the head of the inspector, which also ends a
170
+ defect: a locked row could still be renamed in the tree.
171
+ - The pencil that marked the active layer (the layer drawn
172
+ features go into) in the layer panel, as in the reference layout: the
173
+ row of a layer looks the same whether it is active or not. Pressing a
174
+ layer still makes it active (`layers.setActive`). The word
175
+ `activeLayer` is gone with it; at run time a locale that still gives
176
+ it is accepted and the word is ignored.
177
+
178
+ ### Fixed in 1.1.0
179
+
180
+ - In the inspector of a feature, what a tab shows first is spaced
181
+ from the line of the tabs as the content of a panel is from its head
182
+ (pad-md to the first field, pad-lg to a section title). The panel of
183
+ the tab is now a Stack of its own under the tabs, so kata's spacing of
184
+ a first group applies; before, the title of the first section touched
185
+ the line.
186
+ - The fields of the style have no "Style" title any more: they
187
+ sit straight under the Style tab, and the sections of the application
188
+ and Operations keep their titles. The reset of the style, which was an
189
+ icon button in that title, is a "Reset the style" text action after
190
+ the fields. In the same way, the shared fields of a selection, the
191
+ fields of a group and the fields of a layer have no title repeating
192
+ what the head says; the style rule of a layer keeps its title.
193
+ - The page without a bundler in the README names
194
+ `@sakuzu/maplibre-gl-draw/geometry` in its import map, which the
195
+ single-file build imports. The README also shows the package from
196
+ React and from Vue, and a page that loads it from a CDN.
197
+
10
198
  ## [1.0.0] - 2026-10-01
11
199
 
12
200
  The first release of the standard user interface of