@lblod/ember-rdfa-editor-lblod-plugins 28.2.1 → 29.0.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
@@ -1,5 +1,25 @@
1
1
  # @lblod/ember-rdfa-editor-lblod-plugins
2
2
 
3
+ ## 29.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - [#554](https://github.com/lblod/ember-rdfa-editor-lblod-plugins/pull/554) [`91e5c25`](https://github.com/lblod/ember-rdfa-editor-lblod-plugins/commit/91e5c2540fb66aa4a8356a0e3977ff7ab7655440) Thanks [@elpoelma](https://github.com/elpoelma)! - Remove obsolete `webpack-config.js`. This config is solely needed for the tests, and is now inlined in the `ember-cli-build` file of the test-app
8
+
9
+ ### Patch Changes
10
+
11
+ - [#556](https://github.com/lblod/ember-rdfa-editor-lblod-plugins/pull/556) [`aa0c182`](https://github.com/lblod/ember-rdfa-editor-lblod-plugins/commit/aa0c1824811712fa6052f5962a2b8473d0bab7a4) Thanks [@piemonkey](https://github.com/piemonkey)! - Bundle location plugin marker icons to avoid issues when bundling the code for embeddable
12
+
13
+ - [`867ca46`](https://github.com/lblod/ember-rdfa-editor-lblod-plugins/commit/867ca46b680b2fdc8c5c41481a839f43968ebfd5) Thanks [@abeforgit](https://github.com/abeforgit)! - Always render a period after structure names, it should never be a colon
14
+
15
+ - [#554](https://github.com/lblod/ember-rdfa-editor-lblod-plugins/pull/554) [`bc1a294`](https://github.com/lblod/ember-rdfa-editor-lblod-plugins/commit/bc1a29474c4fd09367bfc08c8e97439cbba27198) Thanks [@elpoelma](https://github.com/elpoelma)! - Update `ember-template-imports` to version 4.3.0 . This version unlocks `.gts`/`.gjs` sourcemaps.
16
+
17
+ ## 28.2.2
18
+
19
+ ### Patch Changes
20
+
21
+ - [`261f2a3`](https://github.com/lblod/ember-rdfa-editor-lblod-plugins/commit/261f2a39b5b67c6ba373e3b35a91c242d27a4277) Thanks [@piemonkey](https://github.com/piemonkey)! - Bundle location plugin marker icons to avoid issues when bundling the code for embeddable
22
+
3
23
  ## 28.2.1
4
24
 
5
25
  ### Patch Changes
@@ -6,6 +6,7 @@ import and from 'ember-truth-helpers/helpers/and';
6
6
  import eq from 'ember-truth-helpers/helpers/eq';
7
7
  import t from 'ember-intl/helpers/t';
8
8
  import {
9
+ Leaflet,
9
10
  LeafletMap,
10
11
  type LeafletMapSig,
11
12
  type LeafletMapStart,
@@ -20,6 +21,38 @@ import {
20
21
  type GlobalCoordinates,
21
22
  } from '@lblod/ember-rdfa-editor-lblod-plugins/plugins/location-plugin/utils/geo-helpers';
22
23
 
24
+ // Taken from Leaflet's default icon, with the viewbox tweaked (from 0 0 500 820), so that the icon
25
+ // is a whole number of pixels in size, to make positioning the point easy.
26
+ const ICON_HTML = `<svg viewBox="0 0 500 800" version="1.1" xmlns="http://www.w3.org/2000/svg" xml:space="preserve"
27
+ style="fill-rule: evenodd; clip-rule: evenodd; stroke-linecap: round;">
28
+ <defs>
29
+ <linearGradient x1="0" y1="0" x2="1" y2="0" gradientUnits="userSpaceOnUse" gradientTransform="matrix(2.30025e-15,-37.566,37.566,2.30025e-15,416.455,540.999)" id="map-marker-38-f">
30
+ <stop offset="0" stop-color="rgb(18,111,198)"/>
31
+ <stop offset="1" stop-color="rgb(76,156,209)"/>
32
+ </linearGradient>
33
+ <linearGradient x1="0" y1="0" x2="1" y2="0"
34
+ gradientUnits="userSpaceOnUse"
35
+ gradientTransform="matrix(1.16666e-15,-19.053,19.053,1.16666e-15,414.482,522.486)"
36
+ id="map-marker-38-s">
37
+ <stop offset="0" stop-color="rgb(46,108,151)"/>
38
+ <stop offset="1" stop-color="rgb(56,131,183)"/>
39
+ </linearGradient>
40
+ </defs>
41
+ <g transform="matrix(19.5417,0,0,19.5417,-7889.1,-9807.44)">
42
+ <path fill="#FFFFFF" d="M421.2,515.5c0,2.6-2.1,4.7-4.7,4.7c-2.6,0-4.7-2.1-4.7-4.7c0-2.6,2.1-4.7,4.7-4.7 C419.1,510.8,421.2,512.9,421.2,515.5z"/>
43
+ <path d="M416.544,503.612C409.971,503.612 404.5,509.303 404.5,515.478C404.5,518.256 406.064,521.786 407.194,524.224L416.5,542.096L425.762,524.224C426.892,521.786 428.5,518.433 428.5,515.478C428.5,509.303 423.117,503.612 416.544,503.612ZM416.544,510.767C419.128,510.784 421.223,512.889 421.223,515.477C421.223,518.065 419.128,520.14 416.544,520.156C413.96,520.139 411.865,518.066 411.865,515.477C411.865,512.889 413.96,510.784 416.544,510.767Z" stroke-width="1.1px" fill="url(#map-marker-38-f)" stroke="url(#map-marker-38-s)"/>
44
+ </g>
45
+ </svg>`;
46
+ // We use Leaflet.divIcon directly, as passing arguments to the ember-leaflet helper seems to be
47
+ // broken
48
+ const MARKER_ICON = Leaflet.divIcon({
49
+ html: ICON_HTML,
50
+ // This prevents the default class from being applied, along with the default styling
51
+ className: '',
52
+ iconAnchor: [15, 48],
53
+ iconSize: [30, 48],
54
+ });
55
+
23
56
  export const SUPPORTED_LOCATION_TYPES = ['address', 'place', 'area'] as const;
24
57
  export type LocationType = (typeof SUPPORTED_LOCATION_TYPES)[number];
25
58
 
@@ -248,7 +281,11 @@ export default class LocationPluginMapComponent extends Component<Signature> {
248
281
  }
249
282
 
250
283
  <template>
251
- <div class='map-wrapper' ...attributes>
284
+ <div
285
+ class='map-wrapper
286
+ {{unless (eq @locationType "address") "map-cursor-pointer"}}'
287
+ ...attributes
288
+ >
252
289
  <MapWrapper
253
290
  @mapStart={{this.mapLocation}}
254
291
  @onClick={{this.onMapClick}}
@@ -259,7 +296,11 @@ export default class LocationPluginMapComponent extends Component<Signature> {
259
296
  @attribution={{MAP_TILE_ATTRIBUTION}}
260
297
  />
261
298
  {{#if (and @address (eq @locationType 'address') this.foundAddress)}}
262
- <layers.marker @location={{this.foundAddress}} as |marker|>
299
+ <layers.marker
300
+ @location={{this.foundAddress}}
301
+ @icon={{MARKER_ICON}}
302
+ as |marker|
303
+ >
263
304
  <marker.tooltip>
264
305
  {{@address.formatted}}
265
306
  </marker.tooltip>
@@ -269,6 +310,7 @@ export default class LocationPluginMapComponent extends Component<Signature> {
269
310
  <layers.marker
270
311
  @opacity={{if @location 0.3 1}}
271
312
  @location={{this.existingLocationCoords}}
313
+ @icon={{MARKER_ICON}}
272
314
  as |marker|
273
315
  >
274
316
  <marker.tooltip>
@@ -277,7 +319,7 @@ export default class LocationPluginMapComponent extends Component<Signature> {
277
319
  </layers.marker>
278
320
  {{/if}}
279
321
  {{#if (and @location (eq @locationType 'place'))}}
280
- <layers.marker @location={{@location.global}} />
322
+ <layers.marker @location={{@location.global}} @icon={{MARKER_ICON}} />
281
323
  {{/if}}
282
324
  {{#if (eq @locationType 'area')}}
283
325
  <layers.polyline @locations={{this.vertices}} />
@@ -285,6 +327,7 @@ export default class LocationPluginMapComponent extends Component<Signature> {
285
327
  <layers.marker
286
328
  @location={{vertex}}
287
329
  @onClick={{fn this.onVertexClick index}}
330
+ @icon={{MARKER_ICON}}
288
331
  as |marker|
289
332
  >
290
333
  {{#if (eq index 0)}}
@@ -1,2 +1,2 @@
1
- export { type LpdcPluginConfig, LPDC } from './types';
1
+ export type { LpdcPluginConfig, LPDC } from './types';
2
2
  export { fetchLpdcs } from './api';
@@ -21,6 +21,11 @@
21
21
  height: 100%;
22
22
  }
23
23
 
24
+ // Override the 'grab' cursor to 'pointer' so we can accurately pick points
25
+ .map-cursor-pointer > .leaflet-grab {
26
+ cursor: pointer;
27
+ }
28
+
24
29
  .leaflet-container {
25
30
  height: 100%;
26
31
  }
@@ -1,2 +1,2 @@
1
- export { type LpdcPluginConfig, LPDC } from './types';
1
+ export type { LpdcPluginConfig, LPDC } from './types';
2
2
  export { fetchLpdcs } from './api';
package/index.js CHANGED
@@ -13,9 +13,6 @@ module.exports = {
13
13
  sourceMaps: 'inline',
14
14
  plugins: [],
15
15
  },
16
- autoImport: {
17
- webpack: require('./webpack-config'),
18
- },
19
16
  },
20
17
 
21
18
  init() {
@@ -33,7 +30,6 @@ module.exports = {
33
30
  // ember-concurrency v4+ requires a custom babel transform. Once we drop ember-concurrency v3 support we can remove this conditional registration.
34
31
  this.options.babel.plugins.push(
35
32
  // require is missing as this lib uses a too old ember-concurrency version
36
- // eslint-disable-next-line node/no-missing-require
37
33
  require.resolve('ember-concurrency/async-arrow-task-transform'),
38
34
  );
39
35
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lblod/ember-rdfa-editor-lblod-plugins",
3
- "version": "28.2.1",
3
+ "version": "29.0.0",
4
4
  "description": "Ember addon providing lblod specific plugins for the ember-rdfa-editor",
5
5
  "keywords": [
6
6
  "ember-addon",
@@ -74,7 +74,7 @@
74
74
  "ember-cli-version-checker": "^5.1.2",
75
75
  "ember-mu-transform-helpers": "^2.1.2",
76
76
  "ember-resources": "^7.0.2",
77
- "ember-template-imports": "^4.1.1",
77
+ "ember-template-imports": "^4.3.0",
78
78
  "ember-velcro": "^2.2.0",
79
79
  "fetch-sparql-endpoint": "^3.3.3",
80
80
  "n2words": "^1.21.0",
@@ -97,7 +97,11 @@
97
97
  "@ember/render-modifiers": "^2.1.0",
98
98
  "@ember/string": "^3.1.1",
99
99
  "@ember/test-helpers": "^3.3.1",
100
+ "@embroider/broccoli-side-watch": "^1.0.1",
101
+ "@embroider/compat": "^3.8.4",
102
+ "@embroider/core": "^3.5.4",
100
103
  "@embroider/test-setup": "^4.0.0",
104
+ "@embroider/webpack": "^4.1.0",
101
105
  "@gavant/glint-template-types": "^0.4.0",
102
106
  "@glimmer/component": "^1.1.2",
103
107
  "@glimmer/tracking": "^1.1.2",
@@ -135,6 +139,7 @@
135
139
  "ember-cli-sass": "^11.0.1",
136
140
  "ember-cli-sri": "^2.1.1",
137
141
  "ember-cli-terser": "^4.0.2",
142
+ "ember-concurrency": "^4.0.2",
138
143
  "ember-disable-prototype-extensions": "^1.1.3",
139
144
  "ember-element-helper": "^0.8.6",
140
145
  "ember-eslint-parser": "^0.5.7",
@@ -142,7 +147,6 @@
142
147
  "ember-leaflet": "^5.1.3",
143
148
  "ember-load-initializers": "^2.1.2",
144
149
  "ember-modifier": "~4.1.0",
145
- "ember-concurrency": "^4.0.2",
146
150
  "ember-page-title": "^8.2.3",
147
151
  "ember-power-select": "~7.1.0",
148
152
  "ember-qunit": "^8.1.0",
@@ -171,6 +175,7 @@
171
175
  "sass": "^1.77.6",
172
176
  "sinon": "^17.0.1",
173
177
  "typescript": "^5.6.2",
178
+ "vm-browserify": "^1.1.2",
174
179
  "webpack": "^5.95.0"
175
180
  },
176
181
  "peerDependencies": {