@lavalogic/scoria 0.37.26 → 0.37.27

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.
@@ -4,7 +4,6 @@
4
4
  lang="ts"
5
5
  generics="T extends object, FilterValueType, RowIdType extends Primitive"
6
6
  >
7
- import Portal from '../../../../Portal.svelte';
8
7
  import type { AbstractDisplayDef } from '../../../Types/Columns/Definitions/Display/AbstractDisplayDef.svelte.js';
9
8
  import { TableContext } from '../../../Types/Context/TableContext.svelte.js';
10
9
  import { type Primitive } from '../../../Types/Context/TableInitOptions.js';
@@ -210,19 +209,22 @@
210
209
  </div>
211
210
  {#if showModal && modalComponent}
212
211
  <!--
213
- Mirrors the `ValidityCell` pattern: portal the modal to
214
- `document.body` so the surrounding sticky / overflow:hidden
215
- ancestors (header, pinned columns, virtualised viewport) never
216
- clip it. The component receives the public
217
- `DisplayModalProps<T>` shape `{ row, close }`.
212
+ The component receives the public `DisplayModalProps<T>` shape
213
+ `{ row, close }`. The dialog is NOT wrapped in
214
+ `<Portal target={document.body}>` any more. `<dialog>` opened
215
+ via `showModal()` enters the browser's top layer, so it already
216
+ escapes overflow:hidden / sticky / transform ancestors without
217
+ needing to be re-parented. Moving the `<div>` ancestor mid-mount
218
+ (Portal's $effect runs during the same microtask round as
219
+ BaseModal's `tick().then` `dialog.showModal()`) was popping the
220
+ dialog out of the top layer and leaving it to render inline at
221
+ the bottom of the page.
218
222
  -->
219
- <Portal target={document.body}>
220
- {@const ModalComponent = modalComponent}
221
- <ModalComponent
222
- row={cell.row.original}
223
- close={onclose}
224
- />
225
- </Portal>
223
+ {@const ModalComponent = modalComponent}
224
+ <ModalComponent
225
+ row={cell.row.original}
226
+ close={onclose}
227
+ />
226
228
  {/if}
227
229
 
228
230
  <style>.focusable,
@@ -6,7 +6,6 @@
6
6
  >
7
7
  import Action from '../../../../Action.svelte';
8
8
  import type { IconProps } from '../../../../IconProps.js';
9
- import Portal from '../../../../Portal.svelte';
10
9
  import type { AbstractDisplayDef } from '../../../Types/Columns/Definitions/Display/AbstractDisplayDef.svelte.js';
11
10
  import { TableContext } from '../../../Types/Context/TableContext.svelte.js';
12
11
  import type { TableFocusDetails } from '../../../Types/Focus/TableFocusDetails.svelte.js';
@@ -161,22 +160,30 @@
161
160
  />
162
161
  </div>
163
162
  {#if showModal}
164
- <Portal target={document.body}>
165
- <!--
166
- `ColumnDef.modal` is declared as
167
- `Component<DisplayModalProps<TRow>>` on the public column
168
- options, which exposes a stable `{ row, close }` prop
169
- shape. Cell renderers used to hand a legacy
170
- `{ cell, onclose, onsubmit }` triple here, which made the
171
- public type lie about the runtime shape - migrated to
172
- `{ row, close }` so consumer-authored modals can rely on
173
- the documented type.
174
- -->
175
- <ColumnDef.modal
176
- row={cell.row.original}
177
- close={onclose}
178
- />
179
- </Portal>
163
+ <!--
164
+ `ColumnDef.modal` is declared as
165
+ `Component<DisplayModalProps<TRow>>` on the public column
166
+ options, which exposes a stable `{ row, close }` prop
167
+ shape. Cell renderers used to hand a legacy
168
+ `{ cell, onclose, onsubmit }` triple here, which made the
169
+ public type lie about the runtime shape - migrated to
170
+ `{ row, close }` so consumer-authored modals can rely on
171
+ the documented type.
172
+
173
+ The dialog is NOT wrapped in `<Portal target={document.body}>`
174
+ any more. `<dialog>` opened via `showModal()` enters the
175
+ browser's top layer, so it already escapes overflow:hidden /
176
+ sticky / transform ancestors without needing to be re-parented.
177
+ Moving the `<div>` ancestor mid-mount (Portal's $effect runs
178
+ during the same microtask round as BaseModal's `tick().then`
179
+ `dialog.showModal()`) was popping the dialog out of the top
180
+ layer and leaving it to render inline at the bottom of the
181
+ page.
182
+ -->
183
+ <ColumnDef.modal
184
+ row={cell.row.original}
185
+ close={onclose}
186
+ />
180
187
  {/if}
181
188
  </div>
182
189
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@lavalogic/scoria",
3
3
  "description": "Svelte components used for the FloWMS Web Frontend",
4
- "version": "0.37.26",
4
+ "version": "0.37.27",
5
5
  "publishConfig": {
6
6
  "access": "restricted"
7
7
  },