@reacteditor/core 0.0.11 → 0.0.13

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.
Files changed (37) hide show
  1. package/dist/{Editor-GK6JTUPD.mjs → Editor-3COFH5WN.mjs} +7 -7
  2. package/dist/{actions-C0LX6bI4.d.mts → actions-DDpLL_TR.d.mts} +17 -2
  3. package/dist/{actions-C0LX6bI4.d.ts → actions-DDpLL_TR.d.ts} +17 -2
  4. package/dist/{chunk-MJJPWASL.mjs → chunk-AD7BMXAA.mjs} +1 -1
  5. package/dist/{chunk-TGVAC3JP.mjs → chunk-BUR5T7IX.mjs} +7 -7
  6. package/dist/{chunk-YBG2RYVF.mjs → chunk-BZ4BQZJR.mjs} +3 -3
  7. package/dist/{chunk-X4EUZIHA.mjs → chunk-FT6UFK7G.mjs} +1 -1
  8. package/dist/{chunk-ERNSJXVF.mjs → chunk-IIRJMJFU.mjs} +0 -1
  9. package/dist/{chunk-74TOLW7F.mjs → chunk-KX5XDJF6.mjs} +61 -19
  10. package/dist/{chunk-56I7ST5F.mjs → chunk-LRFRIIKG.mjs} +1 -1
  11. package/dist/{chunk-XLVEWZWT.mjs → chunk-OIFPBVSF.mjs} +1 -1
  12. package/dist/{chunk-II42EKFK.mjs → chunk-PUDWMFBH.mjs} +1 -1
  13. package/dist/{full-IUPXFMQP.mjs → full-QT5KXRDP.mjs} +6 -6
  14. package/dist/{index-DMbFEg8G.d.mts → index-BTatdZaE.d.mts} +1 -1
  15. package/dist/{index-DmThy7vE.d.ts → index-zhUFD8aP.d.ts} +1 -1
  16. package/dist/index.css +44 -40
  17. package/dist/index.d.mts +13 -7
  18. package/dist/index.d.ts +13 -7
  19. package/dist/index.js +54 -13
  20. package/dist/index.mjs +9 -9
  21. package/dist/internal.d.mts +2 -2
  22. package/dist/internal.d.ts +2 -2
  23. package/dist/{loaded-BT7NIVEO.mjs → loaded-GLBLMTBL.mjs} +3 -3
  24. package/dist/{loaded-HVOKDVC3.mjs → loaded-O4QHGE26.mjs} +3 -3
  25. package/dist/{loaded-YFYCF5F4.mjs → loaded-R34BR6I5.mjs} +3 -3
  26. package/dist/no-external.css +44 -40
  27. package/dist/no-external.d.mts +3 -3
  28. package/dist/no-external.d.ts +3 -3
  29. package/dist/no-external.js +54 -13
  30. package/dist/no-external.mjs +9 -9
  31. package/dist/rsc.d.mts +2 -2
  32. package/dist/rsc.d.ts +2 -2
  33. package/dist/rsc.js +0 -1
  34. package/dist/rsc.mjs +2 -2
  35. package/dist/{walk-tree-B1q6t5Jp.d.ts → walk-tree-Cnyva5MB.d.ts} +1 -1
  36. package/dist/{walk-tree-5oDs6qOL.d.mts → walk-tree-Cxbt1UVr.d.mts} +1 -1
  37. package/package.json +1 -1
package/dist/index.css CHANGED
@@ -2344,25 +2344,25 @@ body:has(._DropZone--isAnimating_1h108_70:empty) [data-editor-overlay] {
2344
2344
  }
2345
2345
 
2346
2346
  /* css-module:/Users/rami/Documents/apps/react-editor/packages/core/components/Editor/components/Layout/styles.module.css/#css-module-data */
2347
- ._Editor_1ty8s_19 {
2347
+ ._Editor_frglt_19 {
2348
2348
  --editor-space-px: 16px;
2349
2349
  color: var(--editor-text-primary);
2350
2350
  font-family: var(--editor-font-family);
2351
2351
  overflow-x: hidden;
2352
2352
  }
2353
2353
  @media (min-width: 766px) {
2354
- ._Editor_1ty8s_19 {
2354
+ ._Editor_frglt_19 {
2355
2355
  overflow-x: auto;
2356
2356
  }
2357
2357
  }
2358
- ._Editor-portal_1ty8s_32 {
2358
+ ._Editor-portal_frglt_32 {
2359
2359
  position: relative;
2360
2360
  z-index: 2;
2361
2361
  }
2362
- ._EditorLayout_1ty8s_37 {
2362
+ ._EditorLayout_frglt_37 {
2363
2363
  height: 100dvh;
2364
2364
  }
2365
- ._EditorLayout-inner_1ty8s_41 {
2365
+ ._EditorLayout-inner_frglt_41 {
2366
2366
  --editor-frame-width: auto;
2367
2367
  --editor-side-nav-width: min-content;
2368
2368
  --editor-side-bar-width: 0px;
@@ -2380,88 +2380,92 @@ body:has(._DropZone--isAnimating_1h108_70:empty) [data-editor-overlay] {
2380
2380
  overflow: hidden;
2381
2381
  }
2382
2382
  @media (min-width: 638px) {
2383
- ._EditorLayout-inner_1ty8s_41 {
2383
+ ._EditorLayout-inner_frglt_41 {
2384
2384
  --editor-side-nav-width: 44px;
2385
2385
  grid-template-areas: "sidenav left editor right";
2386
2386
  grid-template-columns: var(--editor-side-nav-width) 0 var(--editor-frame-width) 0;
2387
2387
  grid-template-rows: auto;
2388
2388
  }
2389
- ._Editor--hidePlugins_1ty8s_73 ._EditorLayout-inner_1ty8s_41 {
2389
+ ._Editor--hidePlugins_frglt_73 ._EditorLayout-inner_frglt_41,
2390
+ ._EditorLayout_frglt_37:not(._EditorLayout--navBarVisible_frglt_74) ._EditorLayout-inner_frglt_41 {
2390
2391
  --editor-side-nav-width: 0;
2391
2392
  }
2392
2393
  }
2393
- ._EditorLayout--mounted_1ty8s_78 ._EditorLayout-inner_1ty8s_41 {
2394
+ ._EditorLayout_frglt_37:not(._EditorLayout--navBarVisible_frglt_74) ._EditorLayout-inner_frglt_41 {
2395
+ --editor-side-nav-width: 0;
2396
+ }
2397
+ ._EditorLayout--mounted_frglt_83 ._EditorLayout-inner_frglt_41 {
2394
2398
  --editor-side-bar-width: 186px;
2395
2399
  }
2396
- ._EditorLayout--mobilePanelHeightToggle_1ty8s_82._EditorLayout--leftSideBarVisible_1ty8s_82 ._EditorLayout-inner_1ty8s_41 {
2400
+ ._EditorLayout--mobilePanelHeightToggle_frglt_87._EditorLayout--leftSideBarVisible_frglt_87 ._EditorLayout-inner_frglt_41 {
2397
2401
  grid-template-rows: auto 60% 0 0 var(--editor-side-nav-width);
2398
2402
  }
2399
- ._EditorLayout--mobilePanelCustomHeight_1ty8s_87._EditorLayout--leftSideBarVisible_1ty8s_82 ._EditorLayout-inner_1ty8s_41 {
2403
+ ._EditorLayout--mobilePanelCustomHeight_frglt_92._EditorLayout--leftSideBarVisible_frglt_87 ._EditorLayout-inner_frglt_41 {
2400
2404
  grid-template-rows: auto var(--editor-mobile-panel-height, 60%) 0 0 var(--editor-side-nav-width);
2401
2405
  }
2402
2406
  @media (min-width: 638px) {
2403
- ._EditorLayout--mobilePanelHeightToggle_1ty8s_82._EditorLayout--leftSideBarVisible_1ty8s_82 ._EditorLayout-inner_1ty8s_41 {
2407
+ ._EditorLayout--mobilePanelHeightToggle_frglt_87._EditorLayout--leftSideBarVisible_frglt_87 ._EditorLayout-inner_frglt_41 {
2404
2408
  grid-template-columns: var(--editor-side-nav-width) var(--editor-left-side-bar-width) var( --editor-frame-width ) 0;
2405
2409
  grid-template-rows: auto;
2406
2410
  }
2407
2411
  }
2408
- ._EditorLayout--mobilePanelHeightMinContent_1ty8s_105._EditorLayout--leftSideBarVisible_1ty8s_82 ._EditorLayout-inner_1ty8s_41 {
2412
+ ._EditorLayout--mobilePanelHeightMinContent_frglt_110._EditorLayout--leftSideBarVisible_frglt_87 ._EditorLayout-inner_frglt_41 {
2409
2413
  grid-template-rows: auto min-content 0 0 var(--editor-side-nav-width);
2410
2414
  }
2411
2415
  @media (min-width: 638px) {
2412
- ._EditorLayout--mobilePanelHeightToggle_1ty8s_82._EditorLayout--leftSideBarVisible_1ty8s_82 ._EditorLayout-inner_1ty8s_41,
2413
- ._EditorLayout--mobilePanelCustomHeight_1ty8s_87._EditorLayout--leftSideBarVisible_1ty8s_82 ._EditorLayout-inner_1ty8s_41,
2414
- ._EditorLayout--mobilePanelHeightMinContent_1ty8s_105._EditorLayout--leftSideBarVisible_1ty8s_82 ._EditorLayout-inner_1ty8s_41 {
2416
+ ._EditorLayout--mobilePanelHeightToggle_frglt_87._EditorLayout--leftSideBarVisible_frglt_87 ._EditorLayout-inner_frglt_41,
2417
+ ._EditorLayout--mobilePanelCustomHeight_frglt_92._EditorLayout--leftSideBarVisible_frglt_87 ._EditorLayout-inner_frglt_41,
2418
+ ._EditorLayout--mobilePanelHeightMinContent_frglt_110._EditorLayout--leftSideBarVisible_frglt_87 ._EditorLayout-inner_frglt_41 {
2415
2419
  grid-template-columns: var(--editor-side-nav-width) var(--editor-left-side-bar-width) var( --editor-frame-width ) 0;
2416
2420
  grid-template-rows: auto;
2417
2421
  }
2418
2422
  }
2419
2423
  @media (min-width: 638px) {
2420
- ._EditorLayout--rightSideBarVisible_1ty8s_127 ._EditorLayout-inner_1ty8s_41 {
2424
+ ._EditorLayout--rightSideBarVisible_frglt_132 ._EditorLayout-inner_frglt_41 {
2421
2425
  grid-template-columns: var(--editor-side-nav-width) 0 var(--editor-frame-width) var(--editor-right-side-bar-width);
2422
2426
  }
2423
2427
  }
2424
2428
  @media (min-width: 638px) {
2425
- ._EditorLayout--leftSideBarVisible_1ty8s_82._EditorLayout--rightSideBarVisible_1ty8s_127 ._EditorLayout-inner_1ty8s_41 {
2429
+ ._EditorLayout--leftSideBarVisible_frglt_87._EditorLayout--rightSideBarVisible_frglt_132 ._EditorLayout-inner_frglt_41 {
2426
2430
  grid-template-columns: var(--editor-side-nav-width) var(--editor-left-side-bar-width) var( --editor-frame-width ) var(--editor-right-side-bar-width);
2427
2431
  }
2428
2432
  }
2429
2433
  @media (min-width: 458px) {
2430
- ._EditorLayout-mounted_1ty8s_146 ._EditorLayout-inner_1ty8s_41 {
2434
+ ._EditorLayout-mounted_frglt_151 ._EditorLayout-inner_frglt_41 {
2431
2435
  --editor-frame-width: minmax(266px, auto);
2432
2436
  }
2433
2437
  }
2434
2438
  @media (min-width: 638px) {
2435
- ._EditorLayout_1ty8s_37 ._EditorLayout-inner_1ty8s_41 {
2439
+ ._EditorLayout_frglt_37 ._EditorLayout-inner_frglt_41 {
2436
2440
  --editor-side-bar-width: minmax(186px, 250px);
2437
2441
  }
2438
2442
  }
2439
2443
  @media (min-width: 766px) {
2440
- ._EditorLayout_1ty8s_37 ._EditorLayout-inner_1ty8s_41 {
2444
+ ._EditorLayout_frglt_37 ._EditorLayout-inner_frglt_41 {
2441
2445
  --editor-frame-width: auto;
2442
2446
  }
2443
2447
  }
2444
2448
  @media (min-width: 990px) {
2445
- ._EditorLayout_1ty8s_37 ._EditorLayout-inner_1ty8s_41 {
2449
+ ._EditorLayout_frglt_37 ._EditorLayout-inner_frglt_41 {
2446
2450
  --editor-side-bar-width: 256px;
2447
2451
  }
2448
2452
  }
2449
2453
  @media (min-width: 1198px) {
2450
- ._EditorLayout_1ty8s_37 ._EditorLayout-inner_1ty8s_41 {
2454
+ ._EditorLayout_frglt_37 ._EditorLayout-inner_frglt_41 {
2451
2455
  --editor-side-bar-width: 274px;
2452
2456
  }
2453
2457
  }
2454
2458
  @media (min-width: 1398px) {
2455
- ._EditorLayout_1ty8s_37 ._EditorLayout-inner_1ty8s_41 {
2459
+ ._EditorLayout_frglt_37 ._EditorLayout-inner_frglt_41 {
2456
2460
  --editor-side-bar-width: 290px;
2457
2461
  }
2458
2462
  }
2459
2463
  @media (min-width: 1598px) {
2460
- ._EditorLayout_1ty8s_37 ._EditorLayout-inner_1ty8s_41 {
2464
+ ._EditorLayout_frglt_37 ._EditorLayout-inner_frglt_41 {
2461
2465
  --editor-side-bar-width: 320px;
2462
2466
  }
2463
2467
  }
2464
- ._EditorLayout-nav_1ty8s_187 {
2468
+ ._EditorLayout-nav_frglt_192 {
2465
2469
  border-top: 1px solid var(--editor-border-subtle);
2466
2470
  background-color: var(--editor-surface-panel);
2467
2471
  grid-area: sidenav;
@@ -2469,13 +2473,13 @@ body:has(._DropZone--isAnimating_1h108_70:empty) [data-editor-overlay] {
2469
2473
  width: 100%;
2470
2474
  }
2471
2475
  @media (min-width: 638px) {
2472
- ._EditorLayout-nav_1ty8s_187 {
2476
+ ._EditorLayout-nav_frglt_192 {
2473
2477
  border-top: 0;
2474
2478
  border-right: 1px solid var(--editor-border-subtle);
2475
2479
  box-sizing: border-box;
2476
2480
  }
2477
2481
  }
2478
- ._Editor-fieldSideBarToolbar_1ty8s_203 {
2482
+ ._Editor-fieldSideBarToolbar_frglt_208 {
2479
2483
  align-items: center;
2480
2484
  background: var(--editor-surface-panel);
2481
2485
  border-bottom: 1px solid var(--editor-border-subtle);
@@ -2484,17 +2488,17 @@ body:has(._DropZone--isAnimating_1h108_70:empty) [data-editor-overlay] {
2484
2488
  justify-content: space-between;
2485
2489
  padding: 8px 12px;
2486
2490
  }
2487
- ._Editor-fieldSideBarHistory_1ty8s_213 {
2491
+ ._Editor-fieldSideBarHistory_frglt_218 {
2488
2492
  color: var(--editor-text-tertiary);
2489
2493
  display: flex;
2490
2494
  gap: 2px;
2491
2495
  }
2492
- ._Editor-fieldSideBarActions_1ty8s_219 {
2496
+ ._Editor-fieldSideBarActions_frglt_224 {
2493
2497
  align-items: center;
2494
2498
  display: flex;
2495
2499
  gap: 8px;
2496
2500
  }
2497
- ._EditorLayout-mobilePanel_1ty8s_225 {
2501
+ ._EditorLayout-mobilePanel_frglt_230 {
2498
2502
  grid-area: mobilepanel;
2499
2503
  background: var(--editor-surface-panel);
2500
2504
  border-block-start: 1px solid var(--editor-border-subtle);
@@ -2502,22 +2506,22 @@ body:has(._DropZone--isAnimating_1h108_70:empty) [data-editor-overlay] {
2502
2506
  flex-direction: column;
2503
2507
  overflow: hidden;
2504
2508
  }
2505
- ._EditorLayout--leftSideBarVisible_1ty8s_82 ._EditorLayout-mobilePanel_1ty8s_225 {
2509
+ ._EditorLayout--leftSideBarVisible_frglt_87 ._EditorLayout-mobilePanel_frglt_230 {
2506
2510
  display: flex;
2507
2511
  }
2508
2512
  @media (min-width: 638px) {
2509
- ._EditorLayout-mobilePanel_1ty8s_225,
2510
- ._EditorLayout--leftSideBarVisible_1ty8s_82 ._EditorLayout-mobilePanel_1ty8s_225 {
2513
+ ._EditorLayout-mobilePanel_frglt_230,
2514
+ ._EditorLayout--leftSideBarVisible_frglt_87 ._EditorLayout-mobilePanel_frglt_230 {
2511
2515
  display: none;
2512
2516
  }
2513
2517
  }
2514
- ._EditorLayout-mobilePanelContent_1ty8s_245 {
2518
+ ._EditorLayout-mobilePanelContent_frglt_250 {
2515
2519
  flex: 1;
2516
2520
  overflow-y: auto;
2517
2521
  display: flex;
2518
2522
  flex-direction: column;
2519
2523
  }
2520
- ._EditorLayout-mobileDragHandle_1ty8s_252 {
2524
+ ._EditorLayout-mobileDragHandle_frglt_257 {
2521
2525
  display: flex;
2522
2526
  align-items: center;
2523
2527
  justify-content: center;
@@ -2526,25 +2530,25 @@ body:has(._DropZone--isAnimating_1h108_70:empty) [data-editor-overlay] {
2526
2530
  touch-action: none;
2527
2531
  flex-shrink: 0;
2528
2532
  }
2529
- ._EditorLayout-mobileDragHandle_1ty8s_252:active {
2533
+ ._EditorLayout-mobileDragHandle_frglt_257:active {
2530
2534
  cursor: grabbing;
2531
2535
  }
2532
- ._EditorLayout-mobileDragHandlePill_1ty8s_266 {
2536
+ ._EditorLayout-mobileDragHandlePill_frglt_271 {
2533
2537
  width: 36px;
2534
2538
  height: 4px;
2535
2539
  border-radius: 2px;
2536
2540
  background-color: var(--editor-border-subtle);
2537
2541
  }
2538
- ._EditorPluginTab_1ty8s_273 {
2542
+ ._EditorPluginTab_frglt_278 {
2539
2543
  display: none;
2540
2544
  flex-grow: 1;
2541
2545
  max-height: 100%;
2542
2546
  }
2543
- ._EditorPluginTab--visible_1ty8s_279 {
2547
+ ._EditorPluginTab--visible_frglt_284 {
2544
2548
  display: flex;
2545
2549
  flex-direction: column;
2546
2550
  }
2547
- ._EditorPluginTab-body_1ty8s_284 {
2551
+ ._EditorPluginTab-body_frglt_289 {
2548
2552
  flex-grow: 1;
2549
2553
  max-height: 100%;
2550
2554
  }
package/dist/index.d.mts CHANGED
@@ -1,10 +1,10 @@
1
- import { D as Data, o as Field, p as FieldProps, C as Config, U as UserGenerics, O as OnAction, f as UiState, d as Plugin, e as Overrides, h as FieldTransforms, M as Metadata, I as IframeConfig, V as Viewports, a as Permissions, E as EditorAction, q as InitialHistory, b as ComponentData, l as DefaultComponentProps, m as DefaultRootFieldProps, c as ResolveDataTrigger, r as ItemSelector, s as PluginInternal } from './actions-C0LX6bI4.mjs';
2
- export { t as Adaptor, A as AppState, u as ArrayField, v as ArrayState, w as AsFieldProps, B as BaseData, x as BaseField, y as CacheOpts, z as ColorField, g as ComponentConfig, G as ComponentConfigExtensions, J as ComponentConfigParams, K as ComponentDataMap, L as ComponentDataOptionalId, N as ComponentMetadata, Q as ConfigParams, j as Content, S as CustomField, T as CustomFieldRender, k as DefaultComponents, X as DefaultRootProps, Y as DefaultRootRenderProps, Z as Direction, _ as DragAxis, $ as EditorComponent, a0 as EditorContext, a1 as EditorMetadata, a2 as ExternalField, a3 as ExternalFieldWithAdaptor, a4 as ExtractConfigParams, a5 as ExtractField, a6 as FieldMetadata, a7 as FieldRenderFunctions, a8 as FieldTransformFn, a9 as FieldTransformFnParams, F as Fields, H as History, aa as ItemWithId, ab as MappedItem, ac as NumberField, ad as ObjectField, ae as OverrideKey, af as RadioField, ag as RichText, i as RichtextField, ah as RootConfig, n as RootData, R as RootDataWithProps, ai as RootDataWithoutProps, aj as SelectField, ak as Slot, al as SlotComponent, am as SlotField, an as TextField, ao as TextareaField, ap as Viewport, aq as WithChildren, ar as WithEditorProps, W as WithId, as as WithSlotProps, at as overrideKeys } from './actions-C0LX6bI4.mjs';
3
- export { G as GetRoutePropsOptions, g as getRouteProps, m as migrate, r as resolveAllData, a as resolveRouteFromString, t as transformProps, w as walkTree } from './walk-tree-5oDs6qOL.mjs';
1
+ import { D as Data, o as Field, p as FieldProps, C as Config, U as UserGenerics, O as OnAction, f as UiState, q as EditorChromeConfig, d as Plugin, e as Overrides, h as FieldTransforms, M as Metadata, I as IframeConfig, V as Viewports, a as Permissions, E as EditorAction, r as InitialHistory, b as ComponentData, l as DefaultComponentProps, m as DefaultRootFieldProps, c as ResolveDataTrigger, s as ItemSelector, t as PluginInternal } from './actions-DDpLL_TR.mjs';
2
+ export { u as Adaptor, A as AppState, v as ArrayField, w as ArrayState, x as AsFieldProps, B as BaseData, y as BaseField, z as CacheOpts, G as ColorField, g as ComponentConfig, J as ComponentConfigExtensions, K as ComponentConfigParams, L as ComponentDataMap, N as ComponentDataOptionalId, Q as ComponentMetadata, S as ConfigParams, j as Content, T as CustomField, X as CustomFieldRender, k as DefaultComponents, Y as DefaultRootProps, Z as DefaultRootRenderProps, _ as Direction, $ as DragAxis, a0 as EditorComponent, a1 as EditorContext, a2 as EditorMetadata, a3 as ExternalField, a4 as ExternalFieldWithAdaptor, a5 as ExtractConfigParams, a6 as ExtractField, a7 as FieldMetadata, a8 as FieldRenderFunctions, a9 as FieldTransformFn, aa as FieldTransformFnParams, F as Fields, H as History, ab as ItemWithId, ac as MappedItem, ad as NumberField, ae as ObjectField, af as OverrideKey, ag as RadioField, ah as RichText, i as RichtextField, ai as RootConfig, n as RootData, R as RootDataWithProps, aj as RootDataWithoutProps, ak as SelectField, al as Slot, am as SlotComponent, an as SlotField, ao as TextField, ap as TextareaField, aq as Viewport, ar as WithChildren, as as WithEditorProps, W as WithId, at as WithSlotProps, au as overrideKeys } from './actions-DDpLL_TR.mjs';
3
+ export { G as GetRoutePropsOptions, g as getRouteProps, m as migrate, r as resolveAllData, a as resolveRouteFromString, t as transformProps, w as walkTree } from './walk-tree-Cxbt1UVr.mjs';
4
4
  import * as react_jsx_runtime from 'react/jsx-runtime';
5
5
  import * as react from 'react';
6
6
  import react__default, { ReactNode, SyntheticEvent, ReactElement, CSSProperties } from 'react';
7
- import { A as AppStore, G as GetPermissions, R as RefreshPermissions, H as HistorySlice } from './index-DMbFEg8G.mjs';
7
+ import { A as AppStore, G as GetPermissions, R as RefreshPermissions, H as HistorySlice } from './index-BTatdZaE.mjs';
8
8
  import '@tiptap/react';
9
9
  import '@tiptap/extension-blockquote';
10
10
  import '@tiptap/extension-bold';
@@ -153,7 +153,7 @@ type EditorPassthroughProps<UserConfig extends Config = Config, G extends UserGe
153
153
  onPublish?: (data: G["UserData"], route?: string) => void;
154
154
  onChange?: (data: G["UserData"]) => void;
155
155
  onAction?: OnAction<G["UserData"]>;
156
- ui?: Partial<UiState>;
156
+ ui?: Partial<UiState> & Partial<EditorChromeConfig>;
157
157
  plugins?: Plugin<UserConfig>[];
158
158
  overrides?: Partial<Overrides<UserConfig>>;
159
159
  fieldTransforms?: FieldTransforms<UserConfig>;
@@ -288,7 +288,13 @@ type EditorProps<UserConfig extends Config = Config, G extends UserGenerics<User
288
288
  children?: ReactNode;
289
289
  config: UserConfig;
290
290
  data: Partial<G["UserData"] | Data>;
291
- ui?: Partial<UiState>;
291
+ /**
292
+ * Initial runtime UI state plus static chrome flags (`navBar`,
293
+ * `themeToggle`, `historyControls`, `urlBar`, `deviceToggle`,
294
+ * `fullScreenToggle`). Chrome flags are read once on mount and cannot be
295
+ * toggled via `dispatch` — they live on props, not in AppState.
296
+ */
297
+ ui?: Partial<UiState> & Partial<EditorChromeConfig>;
292
298
  onChange?: (data: G["UserData"]) => void;
293
299
  onPublish?: (data: G["UserData"], route?: string) => void;
294
300
  onAction?: OnAction<G["UserData"]>;
@@ -551,4 +557,4 @@ declare const outlinePlugin: () => Plugin;
551
557
 
552
558
  declare const legacySideBarPlugin: () => Plugin;
553
559
 
554
- export { Action, ActionBar, App, type AppContextValue, type AppEditorProps, type AppMatched, type AppProps, AppProvider, type AppProviderProps, type AppRenderProps, type AppRouterVariant, AutoField, Button, ComponentData, ComponentList, Config, Data, DefaultComponentProps, DefaultRootFieldProps, Drawer, Editor, EditorAction, type EditorApi, type EditorCommands, Field, FieldLabel, FieldProps, FieldTransforms, type GlobalsMap, Group, IconButton, IframeConfig, InitialHistory, type InsertComponentArgs, Label, Metadata, type MoveDestination, OnAction, Overrides, type PageMetadata, type Parent, Permissions, Plugin, Render, ResolveDataTrigger, RichTextMenu, type Route, type RouteKey, Separator, UiState, type UseEditorData, UserGenerics, Viewports, appConfigContext, blocksPlugin, createUseEditor, fieldsPlugin, legacySideBarPlugin, outlinePlugin, pageMetadata, registerOverlayPortal, renderContext, setDeep, useApp, useEditor, useGetEditor, usePropsContext, useRouteParams, useStableValue };
560
+ export { Action, ActionBar, App, type AppContextValue, type AppEditorProps, type AppMatched, type AppProps, AppProvider, type AppProviderProps, type AppRenderProps, type AppRouterVariant, AutoField, Button, ComponentData, ComponentList, Config, Data, DefaultComponentProps, DefaultRootFieldProps, Drawer, Editor, EditorAction, type EditorApi, EditorChromeConfig, type EditorCommands, Field, FieldLabel, FieldProps, FieldTransforms, type GlobalsMap, Group, IconButton, IframeConfig, InitialHistory, type InsertComponentArgs, Label, Metadata, type MoveDestination, OnAction, Overrides, type PageMetadata, type Parent, Permissions, Plugin, Render, ResolveDataTrigger, RichTextMenu, type Route, type RouteKey, Separator, UiState, type UseEditorData, UserGenerics, Viewports, appConfigContext, blocksPlugin, createUseEditor, fieldsPlugin, legacySideBarPlugin, outlinePlugin, pageMetadata, registerOverlayPortal, renderContext, setDeep, useApp, useEditor, useGetEditor, usePropsContext, useRouteParams, useStableValue };
package/dist/index.d.ts CHANGED
@@ -1,10 +1,10 @@
1
- import { D as Data, o as Field, p as FieldProps, C as Config, U as UserGenerics, O as OnAction, f as UiState, d as Plugin, e as Overrides, h as FieldTransforms, M as Metadata, I as IframeConfig, V as Viewports, a as Permissions, E as EditorAction, q as InitialHistory, b as ComponentData, l as DefaultComponentProps, m as DefaultRootFieldProps, c as ResolveDataTrigger, r as ItemSelector, s as PluginInternal } from './actions-C0LX6bI4.js';
2
- export { t as Adaptor, A as AppState, u as ArrayField, v as ArrayState, w as AsFieldProps, B as BaseData, x as BaseField, y as CacheOpts, z as ColorField, g as ComponentConfig, G as ComponentConfigExtensions, J as ComponentConfigParams, K as ComponentDataMap, L as ComponentDataOptionalId, N as ComponentMetadata, Q as ConfigParams, j as Content, S as CustomField, T as CustomFieldRender, k as DefaultComponents, X as DefaultRootProps, Y as DefaultRootRenderProps, Z as Direction, _ as DragAxis, $ as EditorComponent, a0 as EditorContext, a1 as EditorMetadata, a2 as ExternalField, a3 as ExternalFieldWithAdaptor, a4 as ExtractConfigParams, a5 as ExtractField, a6 as FieldMetadata, a7 as FieldRenderFunctions, a8 as FieldTransformFn, a9 as FieldTransformFnParams, F as Fields, H as History, aa as ItemWithId, ab as MappedItem, ac as NumberField, ad as ObjectField, ae as OverrideKey, af as RadioField, ag as RichText, i as RichtextField, ah as RootConfig, n as RootData, R as RootDataWithProps, ai as RootDataWithoutProps, aj as SelectField, ak as Slot, al as SlotComponent, am as SlotField, an as TextField, ao as TextareaField, ap as Viewport, aq as WithChildren, ar as WithEditorProps, W as WithId, as as WithSlotProps, at as overrideKeys } from './actions-C0LX6bI4.js';
3
- export { G as GetRoutePropsOptions, g as getRouteProps, m as migrate, r as resolveAllData, a as resolveRouteFromString, t as transformProps, w as walkTree } from './walk-tree-B1q6t5Jp.js';
1
+ import { D as Data, o as Field, p as FieldProps, C as Config, U as UserGenerics, O as OnAction, f as UiState, q as EditorChromeConfig, d as Plugin, e as Overrides, h as FieldTransforms, M as Metadata, I as IframeConfig, V as Viewports, a as Permissions, E as EditorAction, r as InitialHistory, b as ComponentData, l as DefaultComponentProps, m as DefaultRootFieldProps, c as ResolveDataTrigger, s as ItemSelector, t as PluginInternal } from './actions-DDpLL_TR.js';
2
+ export { u as Adaptor, A as AppState, v as ArrayField, w as ArrayState, x as AsFieldProps, B as BaseData, y as BaseField, z as CacheOpts, G as ColorField, g as ComponentConfig, J as ComponentConfigExtensions, K as ComponentConfigParams, L as ComponentDataMap, N as ComponentDataOptionalId, Q as ComponentMetadata, S as ConfigParams, j as Content, T as CustomField, X as CustomFieldRender, k as DefaultComponents, Y as DefaultRootProps, Z as DefaultRootRenderProps, _ as Direction, $ as DragAxis, a0 as EditorComponent, a1 as EditorContext, a2 as EditorMetadata, a3 as ExternalField, a4 as ExternalFieldWithAdaptor, a5 as ExtractConfigParams, a6 as ExtractField, a7 as FieldMetadata, a8 as FieldRenderFunctions, a9 as FieldTransformFn, aa as FieldTransformFnParams, F as Fields, H as History, ab as ItemWithId, ac as MappedItem, ad as NumberField, ae as ObjectField, af as OverrideKey, ag as RadioField, ah as RichText, i as RichtextField, ai as RootConfig, n as RootData, R as RootDataWithProps, aj as RootDataWithoutProps, ak as SelectField, al as Slot, am as SlotComponent, an as SlotField, ao as TextField, ap as TextareaField, aq as Viewport, ar as WithChildren, as as WithEditorProps, W as WithId, at as WithSlotProps, au as overrideKeys } from './actions-DDpLL_TR.js';
3
+ export { G as GetRoutePropsOptions, g as getRouteProps, m as migrate, r as resolveAllData, a as resolveRouteFromString, t as transformProps, w as walkTree } from './walk-tree-Cnyva5MB.js';
4
4
  import * as react_jsx_runtime from 'react/jsx-runtime';
5
5
  import * as react from 'react';
6
6
  import react__default, { ReactNode, SyntheticEvent, ReactElement, CSSProperties } from 'react';
7
- import { A as AppStore, G as GetPermissions, R as RefreshPermissions, H as HistorySlice } from './index-DmThy7vE.js';
7
+ import { A as AppStore, G as GetPermissions, R as RefreshPermissions, H as HistorySlice } from './index-zhUFD8aP.js';
8
8
  import '@tiptap/react';
9
9
  import '@tiptap/extension-blockquote';
10
10
  import '@tiptap/extension-bold';
@@ -153,7 +153,7 @@ type EditorPassthroughProps<UserConfig extends Config = Config, G extends UserGe
153
153
  onPublish?: (data: G["UserData"], route?: string) => void;
154
154
  onChange?: (data: G["UserData"]) => void;
155
155
  onAction?: OnAction<G["UserData"]>;
156
- ui?: Partial<UiState>;
156
+ ui?: Partial<UiState> & Partial<EditorChromeConfig>;
157
157
  plugins?: Plugin<UserConfig>[];
158
158
  overrides?: Partial<Overrides<UserConfig>>;
159
159
  fieldTransforms?: FieldTransforms<UserConfig>;
@@ -288,7 +288,13 @@ type EditorProps<UserConfig extends Config = Config, G extends UserGenerics<User
288
288
  children?: ReactNode;
289
289
  config: UserConfig;
290
290
  data: Partial<G["UserData"] | Data>;
291
- ui?: Partial<UiState>;
291
+ /**
292
+ * Initial runtime UI state plus static chrome flags (`navBar`,
293
+ * `themeToggle`, `historyControls`, `urlBar`, `deviceToggle`,
294
+ * `fullScreenToggle`). Chrome flags are read once on mount and cannot be
295
+ * toggled via `dispatch` — they live on props, not in AppState.
296
+ */
297
+ ui?: Partial<UiState> & Partial<EditorChromeConfig>;
292
298
  onChange?: (data: G["UserData"]) => void;
293
299
  onPublish?: (data: G["UserData"], route?: string) => void;
294
300
  onAction?: OnAction<G["UserData"]>;
@@ -551,4 +557,4 @@ declare const outlinePlugin: () => Plugin;
551
557
 
552
558
  declare const legacySideBarPlugin: () => Plugin;
553
559
 
554
- export { Action, ActionBar, App, type AppContextValue, type AppEditorProps, type AppMatched, type AppProps, AppProvider, type AppProviderProps, type AppRenderProps, type AppRouterVariant, AutoField, Button, ComponentData, ComponentList, Config, Data, DefaultComponentProps, DefaultRootFieldProps, Drawer, Editor, EditorAction, type EditorApi, type EditorCommands, Field, FieldLabel, FieldProps, FieldTransforms, type GlobalsMap, Group, IconButton, IframeConfig, InitialHistory, type InsertComponentArgs, Label, Metadata, type MoveDestination, OnAction, Overrides, type PageMetadata, type Parent, Permissions, Plugin, Render, ResolveDataTrigger, RichTextMenu, type Route, type RouteKey, Separator, UiState, type UseEditorData, UserGenerics, Viewports, appConfigContext, blocksPlugin, createUseEditor, fieldsPlugin, legacySideBarPlugin, outlinePlugin, pageMetadata, registerOverlayPortal, renderContext, setDeep, useApp, useEditor, useGetEditor, usePropsContext, useRouteParams, useStableValue };
560
+ export { Action, ActionBar, App, type AppContextValue, type AppEditorProps, type AppMatched, type AppProps, AppProvider, type AppProviderProps, type AppRenderProps, type AppRouterVariant, AutoField, Button, ComponentData, ComponentList, Config, Data, DefaultComponentProps, DefaultRootFieldProps, Drawer, Editor, EditorAction, type EditorApi, EditorChromeConfig, type EditorCommands, Field, FieldLabel, FieldProps, FieldTransforms, type GlobalsMap, Group, IconButton, IframeConfig, InitialHistory, type InsertComponentArgs, Label, Metadata, type MoveDestination, OnAction, Overrides, type PageMetadata, type Parent, Permissions, Plugin, Render, ResolveDataTrigger, RichTextMenu, type Route, type RouteKey, Separator, UiState, type UseEditorData, UserGenerics, Viewports, appConfigContext, blocksPlugin, createUseEditor, fieldsPlugin, legacySideBarPlugin, outlinePlugin, pageMetadata, registerOverlayPortal, renderContext, setDeep, useApp, useEditor, useGetEditor, usePropsContext, useRouteParams, useStableValue };
package/dist/index.js CHANGED
@@ -3165,7 +3165,6 @@ var init_default_app_state = __esm({
3165
3165
  ui: {
3166
3166
  leftSideBarVisible: true,
3167
3167
  rightSideBarVisible: true,
3168
- navBarVisible: true,
3169
3168
  arrayState: {},
3170
3169
  itemSelector: null,
3171
3170
  componentList: {},
@@ -12972,7 +12971,7 @@ init_lib();
12972
12971
 
12973
12972
  // css-module:/Users/rami/Documents/apps/react-editor/packages/core/components/Editor/components/Layout/styles.module.css#css-module
12974
12973
  init_react_import();
12975
- var styles_module_default25 = { "Editor": "_Editor_1ty8s_19", "Editor-portal": "_Editor-portal_1ty8s_32", "EditorLayout": "_EditorLayout_1ty8s_37", "EditorLayout-inner": "_EditorLayout-inner_1ty8s_41", "Editor--hidePlugins": "_Editor--hidePlugins_1ty8s_73", "EditorLayout--mounted": "_EditorLayout--mounted_1ty8s_78", "EditorLayout--mobilePanelHeightToggle": "_EditorLayout--mobilePanelHeightToggle_1ty8s_82", "EditorLayout--leftSideBarVisible": "_EditorLayout--leftSideBarVisible_1ty8s_82", "EditorLayout--mobilePanelCustomHeight": "_EditorLayout--mobilePanelCustomHeight_1ty8s_87", "EditorLayout--mobilePanelHeightMinContent": "_EditorLayout--mobilePanelHeightMinContent_1ty8s_105", "EditorLayout--rightSideBarVisible": "_EditorLayout--rightSideBarVisible_1ty8s_127", "EditorLayout-mounted": "_EditorLayout-mounted_1ty8s_146", "EditorLayout-nav": "_EditorLayout-nav_1ty8s_187", "Editor-fieldSideBarToolbar": "_Editor-fieldSideBarToolbar_1ty8s_203", "Editor-fieldSideBarHistory": "_Editor-fieldSideBarHistory_1ty8s_213", "Editor-fieldSideBarActions": "_Editor-fieldSideBarActions_1ty8s_219", "EditorLayout-mobilePanel": "_EditorLayout-mobilePanel_1ty8s_225", "EditorLayout-mobilePanelContent": "_EditorLayout-mobilePanelContent_1ty8s_245", "EditorLayout-mobileDragHandle": "_EditorLayout-mobileDragHandle_1ty8s_252", "EditorLayout-mobileDragHandlePill": "_EditorLayout-mobileDragHandlePill_1ty8s_266", "EditorPluginTab": "_EditorPluginTab_1ty8s_273", "EditorPluginTab--visible": "_EditorPluginTab--visible_1ty8s_279", "EditorPluginTab-body": "_EditorPluginTab-body_1ty8s_284" };
12974
+ var styles_module_default25 = { "Editor": "_Editor_frglt_19", "Editor-portal": "_Editor-portal_frglt_32", "EditorLayout": "_EditorLayout_frglt_37", "EditorLayout-inner": "_EditorLayout-inner_frglt_41", "Editor--hidePlugins": "_Editor--hidePlugins_frglt_73", "EditorLayout--navBarVisible": "_EditorLayout--navBarVisible_frglt_74", "EditorLayout--mounted": "_EditorLayout--mounted_frglt_83", "EditorLayout--mobilePanelHeightToggle": "_EditorLayout--mobilePanelHeightToggle_frglt_87", "EditorLayout--leftSideBarVisible": "_EditorLayout--leftSideBarVisible_frglt_87", "EditorLayout--mobilePanelCustomHeight": "_EditorLayout--mobilePanelCustomHeight_frglt_92", "EditorLayout--mobilePanelHeightMinContent": "_EditorLayout--mobilePanelHeightMinContent_frglt_110", "EditorLayout--rightSideBarVisible": "_EditorLayout--rightSideBarVisible_frglt_132", "EditorLayout-mounted": "_EditorLayout-mounted_frglt_151", "EditorLayout-nav": "_EditorLayout-nav_frglt_192", "Editor-fieldSideBarToolbar": "_Editor-fieldSideBarToolbar_frglt_208", "Editor-fieldSideBarHistory": "_Editor-fieldSideBarHistory_frglt_218", "Editor-fieldSideBarActions": "_Editor-fieldSideBarActions_frglt_224", "EditorLayout-mobilePanel": "_EditorLayout-mobilePanel_frglt_230", "EditorLayout-mobilePanelContent": "_EditorLayout-mobilePanelContent_frglt_250", "EditorLayout-mobileDragHandle": "_EditorLayout-mobileDragHandle_frglt_257", "EditorLayout-mobileDragHandlePill": "_EditorLayout-mobileDragHandlePill_frglt_271", "EditorPluginTab": "_EditorPluginTab_frglt_278", "EditorPluginTab--visible": "_EditorPluginTab--visible_frglt_284", "EditorPluginTab-body": "_EditorPluginTab-body_frglt_289" };
12976
12975
 
12977
12976
  // lib/use-inject-css.ts
12978
12977
  init_react_import();
@@ -13304,6 +13303,7 @@ var BrowserBar = ({
13304
13303
  onViewportChange
13305
13304
  }) => {
13306
13305
  const { routes, currentRoute, onRouteChange } = usePropsContext();
13306
+ const chrome = useChromeConfig();
13307
13307
  const viewports = useAppStore((s) => s.state.ui.viewports);
13308
13308
  const dispatch = useAppStore((s) => s.dispatch);
13309
13309
  const leftSideBarVisible = useAppStore((s) => s.state.ui.leftSideBarVisible);
@@ -13341,8 +13341,11 @@ var BrowserBar = ({
13341
13341
  if (!next || next === currentRoute) return;
13342
13342
  void (onRouteChange == null ? void 0 : onRouteChange(next));
13343
13343
  };
13344
+ if (!chrome.showUrlBar && !chrome.showDeviceToggle && !chrome.showFullScreenToggle) {
13345
+ return null;
13346
+ }
13344
13347
  return /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: getClassName36(), children: [
13345
- showRoutePicker ? /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(
13348
+ chrome.showUrlBar && (showRoutePicker ? /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(
13346
13349
  Combobox,
13347
13350
  {
13348
13351
  items: routes,
@@ -13386,9 +13389,9 @@ var BrowserBar = ({
13386
13389
  ) : /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: getClassName36("urlTrigger"), children: [
13387
13390
  /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Globe, { className: getClassName36("urlIcon"), size: 14 }),
13388
13391
  /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("span", { className: getClassName36("urlText"), children: "/" })
13389
- ] }),
13390
- /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: getClassName36("actions"), children: [
13391
- /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
13392
+ ] })),
13393
+ (chrome.showDeviceToggle || chrome.showFullScreenToggle) && /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: getClassName36("actions"), children: [
13394
+ chrome.showDeviceToggle && /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
13392
13395
  IconButton,
13393
13396
  {
13394
13397
  type: "button",
@@ -13397,7 +13400,7 @@ var BrowserBar = ({
13397
13400
  children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("span", { className: getClassName36("deviceIcon"), children: activeDevice === "desktop" ? /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Monitor, { size: 16 }) : /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Smartphone, { size: 16 }) })
13398
13401
  }
13399
13402
  ),
13400
- /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
13403
+ chrome.showFullScreenToggle && /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
13401
13404
  IconButton,
13402
13405
  {
13403
13406
  type: "button",
@@ -14156,6 +14159,7 @@ var getPluginTabClassName = get_class_name_factory_default("EditorPluginTab", st
14156
14159
  var FieldSideBarToolbar = () => {
14157
14160
  const appStore = useAppStoreApi();
14158
14161
  const { onPublish, currentRoute } = usePropsContext();
14162
+ const chrome = useChromeConfig();
14159
14163
  const back = useAppStore((s) => s.history.back);
14160
14164
  const forward = useAppStore((s) => s.history.forward);
14161
14165
  const hasFuture = useAppStore((s) => s.history.hasFuture());
@@ -14164,7 +14168,7 @@ var FieldSideBarToolbar = () => {
14164
14168
  (s) => s.overrides.headerActions || DefaultOverride
14165
14169
  );
14166
14170
  return /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)("div", { className: getClassName43("fieldSideBarToolbar"), children: [
14167
- /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)("div", { className: getClassName43("fieldSideBarHistory"), children: [
14171
+ chrome.showHistoryControls ? /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)("div", { className: getClassName43("fieldSideBarHistory"), children: [
14168
14172
  /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
14169
14173
  IconButton,
14170
14174
  {
@@ -14185,7 +14189,7 @@ var FieldSideBarToolbar = () => {
14185
14189
  children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(Redo2, { size: 18 })
14186
14190
  }
14187
14191
  )
14188
- ] }),
14192
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("div", {}),
14189
14193
  /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("div", { className: getClassName43("fieldSideBarActions"), children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(CustomHeaderActions, { children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
14190
14194
  Button,
14191
14195
  {
@@ -14238,7 +14242,8 @@ var Layout = ({ children }) => {
14238
14242
  const rightSideBarVisible = useAppStore(
14239
14243
  (s) => s.state.ui.rightSideBarVisible
14240
14244
  );
14241
- const navBarVisible = useAppStore((s) => s.state.ui.navBarVisible);
14245
+ const chrome = useChromeConfig();
14246
+ const navBarVisible = chrome.showNavBar;
14242
14247
  const instanceId = useAppStore((s) => s.instanceId);
14243
14248
  const {
14244
14249
  width: leftWidth,
@@ -14464,6 +14469,7 @@ var Layout = ({ children }) => {
14464
14469
  leftSideBarVisible,
14465
14470
  mounted,
14466
14471
  rightSideBarVisible: !hasDesktopFieldsPlugin && rightSideBarVisible,
14472
+ navBarVisible,
14467
14473
  mobilePanelHeightToggle: mobilePanelHeightMode === "toggle",
14468
14474
  mobilePanelHeightMinContent: mobilePanelHeightMode === "min-content",
14469
14475
  mobilePanelCustomHeight: mobilePanelHeight !== null && leftSideBarVisible
@@ -14479,7 +14485,7 @@ var Layout = ({ children }) => {
14479
14485
  Nav,
14480
14486
  {
14481
14487
  items: pluginItems,
14482
- footer: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
14488
+ footer: chrome.showThemeToggle ? /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
14483
14489
  IconButton,
14484
14490
  {
14485
14491
  type: "button",
@@ -14487,7 +14493,7 @@ var Layout = ({ children }) => {
14487
14493
  onClick: toggleTheme,
14488
14494
  children: themeIcon
14489
14495
  }
14490
- )
14496
+ ) : void 0
14491
14497
  }
14492
14498
  ) }),
14493
14499
  /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)(
@@ -14576,11 +14582,45 @@ var Layout = ({ children }) => {
14576
14582
 
14577
14583
  // components/Editor/index.tsx
14578
14584
  var import_jsx_runtime93 = require("react/jsx-runtime");
14585
+ var CHROME_KEYS = [
14586
+ "showNavBar",
14587
+ "showThemeToggle",
14588
+ "showHistoryControls",
14589
+ "showUrlBar",
14590
+ "showDeviceToggle",
14591
+ "showFullScreenToggle"
14592
+ ];
14593
+ var DEFAULT_CHROME = {
14594
+ showNavBar: true,
14595
+ showThemeToggle: true,
14596
+ showHistoryControls: true,
14597
+ showUrlBar: true,
14598
+ showDeviceToggle: true,
14599
+ showFullScreenToggle: true
14600
+ };
14601
+ var splitUiConfig = (ui) => {
14602
+ const runtime = {};
14603
+ const chrome = {};
14604
+ if (!ui) return { runtime, chrome };
14605
+ for (const [key, value] of Object.entries(ui)) {
14606
+ if (CHROME_KEYS.includes(key)) {
14607
+ chrome[key] = value;
14608
+ } else {
14609
+ runtime[key] = value;
14610
+ }
14611
+ }
14612
+ return { runtime, chrome };
14613
+ };
14579
14614
  var propsContext = (0, import_react95.createContext)({});
14580
14615
  function PropsProvider(props) {
14581
14616
  return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(propsContext.Provider, { value: props, children: props.children });
14582
14617
  }
14583
14618
  var usePropsContext = () => (0, import_react95.useContext)(propsContext);
14619
+ var useChromeConfig = () => {
14620
+ const { ui } = usePropsContext();
14621
+ const { chrome } = splitUiConfig(ui);
14622
+ return __spreadValues(__spreadValues({}, DEFAULT_CHROME), chrome);
14623
+ };
14584
14624
  function EditorProvider({ children }) {
14585
14625
  const {
14586
14626
  config,
@@ -14608,7 +14648,8 @@ function EditorProvider({ children }) {
14608
14648
  );
14609
14649
  const [generatedAppState] = (0, import_react95.useState)(() => {
14610
14650
  var _a, _b, _c, _d, _e, _f;
14611
- const initial = __spreadValues(__spreadValues({}, defaultAppState.ui), initialUi);
14651
+ const { runtime: initialUiRuntime } = splitUiConfig(initialUi);
14652
+ const initial = __spreadValues(__spreadValues({}, defaultAppState.ui), initialUiRuntime);
14612
14653
  let clientUiState = {};
14613
14654
  if (Object.keys((initialData == null ? void 0 : initialData.root) || {}).length > 0 && !((_a = initialData == null ? void 0 : initialData.root) == null ? void 0 : _a.props)) {
14614
14655
  console.warn(
package/dist/index.mjs CHANGED
@@ -25,8 +25,8 @@ import {
25
25
  usePropsContext,
26
26
  useRouteParams,
27
27
  useStableValue
28
- } from "./chunk-74TOLW7F.mjs";
29
- import "./chunk-YBG2RYVF.mjs";
28
+ } from "./chunk-KX5XDJF6.mjs";
29
+ import "./chunk-BZ4BQZJR.mjs";
30
30
  import {
31
31
  Action,
32
32
  ActionBar,
@@ -35,21 +35,21 @@ import {
35
35
  Label,
36
36
  RichTextMenu,
37
37
  Separator
38
- } from "./chunk-TGVAC3JP.mjs";
39
- import "./chunk-X4EUZIHA.mjs";
38
+ } from "./chunk-BUR5T7IX.mjs";
39
+ import "./chunk-FT6UFK7G.mjs";
40
40
  import {
41
41
  getRouteProps,
42
42
  migrate,
43
43
  resolveAllData,
44
44
  resolveRouteFromString,
45
45
  transformProps
46
- } from "./chunk-II42EKFK.mjs";
46
+ } from "./chunk-PUDWMFBH.mjs";
47
47
  import "./chunk-6QJ2HF4O.mjs";
48
- import "./chunk-XLVEWZWT.mjs";
49
- import "./chunk-MJJPWASL.mjs";
50
- import "./chunk-56I7ST5F.mjs";
48
+ import "./chunk-OIFPBVSF.mjs";
49
+ import "./chunk-AD7BMXAA.mjs";
50
+ import "./chunk-LRFRIIKG.mjs";
51
51
  import "./chunk-M4JDRFYB.mjs";
52
- import "./chunk-ERNSJXVF.mjs";
52
+ import "./chunk-IIRJMJFU.mjs";
53
53
  import "./chunk-Y2EFNT5P.mjs";
54
54
  import {
55
55
  walkTree
@@ -1,6 +1,6 @@
1
1
  import { Reducer } from 'react';
2
- import { D as Data, A as AppState, O as OnAction, P as PrivateAppState, E as EditorAction } from './actions-C0LX6bI4.mjs';
3
- import { A as AppStore } from './index-DMbFEg8G.mjs';
2
+ import { D as Data, A as AppState, O as OnAction, P as PrivateAppState, E as EditorAction } from './actions-DDpLL_TR.mjs';
3
+ import { A as AppStore } from './index-BTatdZaE.mjs';
4
4
  import '@tiptap/react';
5
5
  import '@tiptap/extension-blockquote';
6
6
  import '@tiptap/extension-bold';
@@ -1,6 +1,6 @@
1
1
  import { Reducer } from 'react';
2
- import { D as Data, A as AppState, O as OnAction, P as PrivateAppState, E as EditorAction } from './actions-C0LX6bI4.js';
3
- import { A as AppStore } from './index-DmThy7vE.js';
2
+ import { D as Data, A as AppState, O as OnAction, P as PrivateAppState, E as EditorAction } from './actions-DDpLL_TR.js';
3
+ import { A as AppStore } from './index-zhUFD8aP.js';
4
4
  import '@tiptap/react';
5
5
  import '@tiptap/extension-blockquote';
6
6
  import '@tiptap/extension-bold';
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  useAlignOptions
3
- } from "./chunk-XLVEWZWT.mjs";
3
+ } from "./chunk-OIFPBVSF.mjs";
4
4
  import {
5
5
  AlignLeft,
6
6
  SelectControl,
7
7
  useControlContext
8
- } from "./chunk-56I7ST5F.mjs";
8
+ } from "./chunk-LRFRIIKG.mjs";
9
9
  import "./chunk-M4JDRFYB.mjs";
10
- import "./chunk-ERNSJXVF.mjs";
10
+ import "./chunk-IIRJMJFU.mjs";
11
11
  import "./chunk-Y2EFNT5P.mjs";
12
12
  import "./chunk-JIXMPJZA.mjs";
13
13
  import {
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  useListOptions
3
- } from "./chunk-X4EUZIHA.mjs";
3
+ } from "./chunk-FT6UFK7G.mjs";
4
4
  import {
5
5
  List,
6
6
  SelectControl,
7
7
  useControlContext
8
- } from "./chunk-56I7ST5F.mjs";
8
+ } from "./chunk-LRFRIIKG.mjs";
9
9
  import "./chunk-M4JDRFYB.mjs";
10
- import "./chunk-ERNSJXVF.mjs";
10
+ import "./chunk-IIRJMJFU.mjs";
11
11
  import "./chunk-Y2EFNT5P.mjs";
12
12
  import "./chunk-JIXMPJZA.mjs";
13
13
  import {
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  useHeadingOptions
3
- } from "./chunk-MJJPWASL.mjs";
3
+ } from "./chunk-AD7BMXAA.mjs";
4
4
  import {
5
5
  Heading,
6
6
  SelectControl,
7
7
  useControlContext
8
- } from "./chunk-56I7ST5F.mjs";
8
+ } from "./chunk-LRFRIIKG.mjs";
9
9
  import "./chunk-M4JDRFYB.mjs";
10
- import "./chunk-ERNSJXVF.mjs";
10
+ import "./chunk-IIRJMJFU.mjs";
11
11
  import "./chunk-Y2EFNT5P.mjs";
12
12
  import "./chunk-JIXMPJZA.mjs";
13
13
  import {