@csedl/hotwire-svelte-helpers 2.2.1 → 2.2.3

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
@@ -1,12 +1,10 @@
1
1
  # Hotwire Svelte Helpers
2
2
 
3
- is the successor of the `@csedl/stimulus-dropdown` package
4
-
5
3
  Dropdown with stimulus, based on floating-UI.
6
4
 
7
5
  **Links:**
8
6
  - [Online Demo App](https://hotwire-svelte-helpers.sedlmair.ch/)
9
- - [Ruby Gem: csedl-stimulus-dropdownSvelte](https://gitlab.com/sedl/csedl-stimulus-dropdown)
7
+ - [Ruby Gem: stimulus-overlay-helpers](https://gitlab.com/sedl/stimulus-overlay-helpers)
10
8
  - [How we are building a Rails App](https://dev.to/chmich/setup-vite-svelte-inertia-stimulus-bootstrap-foundation-on-rails-7-overview-1bk1)
11
9
 
12
10
  ## Setup
@@ -20,9 +18,12 @@ HotwireSvelteHelpers.initializeOverlays()
20
18
  This package has a Server-Side Rendering (SSR) safe configuration, which means:
21
19
 
22
20
  You must add the file `<vite-sourcee-code-dir>/config/hotwire-svelte-helpers.js`.
23
- The package inside does a fixed `import customConfigs from '/config/hotwire-svelte-helpers.js'`.
21
+ The package inside does a fixed `import customConfigs from '@/config/hotwire-svelte-helpers.js'`.
24
22
  By this, it must find that file.
25
23
 
24
+ The alias `@` is by default a alias set by vite_rails, pointing to `sourceCodeDir`.
25
+ For this package it is required not to change override this.
26
+
26
27
  Minimal content of this file:
27
28
 
28
29
  ```javascript
@@ -124,11 +125,6 @@ This behaviour can be stopped on:
124
125
 
125
126
  The functions of this package are intended to give flexibility on various ways building a dropdownSvelte.
126
127
 
127
- - Stimulus Controller with Rails Helper
128
- - Example: [Stimulus controller within this package](https://gitlab.com/sedl/csedl-stimulus-dropdown-js/-/blob/main/src/dropdown-controller.js?ref_type=heads)
129
- - Stimulus with Svelte component
130
- - Example: [Stimulus controller on example app](https://gitlab.com/sedl/stimulusfloatingdropdown/-/blob/main/app/frontend/javascript/svelte-dropdown-controller.js?ref_type=heads)
131
-
132
128
  **Important:** When creating or initializing the dropdownSvelte,
133
129
  always call the initialize function before attaching a listener to the panel's close event.
134
130
  The initialize function adds a `close` event listener to the panel that executes the `onPanelClose` function.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@csedl/hotwire-svelte-helpers",
3
- "version": "2.2.1",
3
+ "version": "2.2.3",
4
4
  "description": "Hotwire + Svelte helpers for Rails: Stimulus floating dropdowns/toolips + Svelte global panels/modals + RTurbo-friendly utilities. Build together with the rubygem svelte-on-rails and its npm-package.",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/src/lib/config.js CHANGED
@@ -1,4 +1,4 @@
1
- import customConfigs from '/config/hotwire-svelte-helpers.js'
1
+ import customConfigs from '@/config/hotwire-svelte-helpers.js'
2
2
 
3
3
  export function hotwireSvelteConfig(key) {
4
4