@moraby/app-launcher 2.0.12 → 2.0.14

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
@@ -166,11 +166,11 @@ function AdminLauncher() {
166
166
  isOpen={showSettings}
167
167
  onClose={() => setShowSettings(false)}
168
168
  apps={apps}
169
- onAdd={(app) => setApps([...apps, { ...app, id: Date.now().toString() }])}
170
- onUpdate={(id, updates) =>
169
+ onAdd={(app: Omit<AppItem, 'id'>) => setApps([...apps, { ...app, id: Date.now().toString() }])}
170
+ onUpdate={(id: string, updates: Partial<Omit<AppItem, 'id'>>) =>
171
171
  setApps(apps.map((a) => (a.id === id ? { ...a, ...updates } : a)))
172
172
  }
173
- onDelete={(id) => setApps(apps.filter((a) => a.id !== id))}
173
+ onDelete={(id: string) => setApps(apps.filter((a) => a.id !== id))}
174
174
  />
175
175
  </>
176
176
  );
@@ -179,6 +179,14 @@ function AdminLauncher() {
179
179
 
180
180
  **Note:** If you forget `renderFooter`, there will be no button to open the settings!
181
181
 
182
+ ### Modal Rendering & CSS Isolation
183
+
184
+ The `AppSettings` modal renders using a **React Portal** directly attached to `document.body`.
185
+
186
+ - **Placement & Clipping:** This prevents the modal from being clipped by host application styles such as `overflow: hidden` or complex `z-index` stacking contexts.
187
+ - **Client-Side Only:** In Next.js App Router, ensure the component (or its parent wrapper) is a Client Component (`'use client'`) since `document.body` is required.
188
+ - **CSS Isolation:** The launcher utilizes targeted CSS resets (`all: revert`, explicit `box-sizing`) to protect its buttons and SVG icons from host application global styles (e.g., global `button {}` or `svg {}` styles bleeding into the component).
189
+
182
190
  ## Configuration JSON Format
183
191
 
184
192
  Export your configuration from the admin app and host it as a JSON file: