@genesislcap/foundation-layout 15.111.4-FUI-2675.1 → 15.111.5

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.
@@ -288,7 +288,7 @@
288
288
  {
289
289
  "kind": "variable",
290
290
  "name": "layoutStyles",
291
- "default": "css`\n ${containerStyles}\n ${loadingSpinnerStyles}\n\n :host {\n /* Tab strip uses its own multiplier (9 → 32px) so panel contents keep the 28px control height. */\n --foundation-tab-height: calc(\n (((var(--layout-tab-height-multiplier, 9) + var(--density)) * var(--design-unit)) - 4) * 1px\n );\n }\n\n .lm_goldenlayout {\n border-radius: calc(var(--control-corner-radius) * 1.5px);\n font-family: var(--body-font);\n box-sizing: border-box;\n }\n\n .lm_goldenlayout * {\n box-sizing: border-box;\n }\n\n /*\n * Defaults match flexlayout (rapid-design-system flexlayout-react.overrides.css) and rapid-tabs:\n * a bordered layer-2 panel whose strip holds flat tabs split by 1px separators, over a\n * card-container content area with a top edge only. Only fallbacks changed; the theming tokens\n * (--card-*, --rapid-layout-item-*, --tab-rest-*, --tab-active-*) still win when set.\n */\n /*\n * Borders on golden-layout boxes must not take up space. golden-layout sizes each box's content\n * in JS from the box's outer size (offsetWidth/offsetHeight minus a single \\`itemBorder\\`), so a real\n * border pushes the content past the box and it clips on the right and bottom. The panel border is\n * therefore drawn by an overlay above the panel's content (.lm_stack::after), as is the content's\n * edge (.lm_content::after), with \\`itemBorder\\` pinned to 0 (glVisualConfig). The tokens are\n * unchanged.\n */\n .lm_stack.lm_item {\n background-color: var(--rapid-layout-item-background, var(--neutral-layer-2));\n border: 0;\n border-radius: var(--card-corner-radius, calc(var(--control-corner-radius) * 3px));\n box-sizing: border-box;\n /* Rapid's panel elevation (rapid-design-system tokens/elevation.ts); none outside Rapid. */\n box-shadow: var(--nested-shadow, var(--panel-shadow-override, var(--card-box-shadow, var(--panel-shadow, none))));\n }\n\n /* Positions the overlay; a maximised stack keeps golden-layout's absolute positioning. */\n .lm_stack.lm_item:not(.lm_maximised) {\n position: relative;\n }\n\n .lm_stack.lm_item::after {\n content: '';\n position: absolute;\n inset: 0;\n z-index: 2;\n pointer-events: none;\n border-radius: inherit;\n border-style: solid;\n border-width: var(--rapid-layout-item-border-width, 1px);\n border-color: var(--rapid-layout-item-border-color, var(--panel-border, var(--neutral-stroke-rest)));\n }\n\n .lm_maximised .lm_header {\n border-bottom: var(--card-border, 0);\n position: unset;\n }\n\n .lm_maximised .lm_header .lm_tabs {\n z-index: 3;\n }\n\n .lm_content {\n /* The panel frames its content, so nested self-framing components (accordions) drop their own\n border. */\n --nested-border: 0;\n /* ...and nested containers (cards, tabs) drop their shadow. */\n --nested-shadow: none;\n\n background-color: var(--neutral-layer-card-container);\n /* The content fills the panel's whole box (its border is an overlay), so it shares its radius. */\n border-radius: 0 0 var(--card-corner-radius, calc(var(--control-corner-radius) * 3px))\n var(--card-corner-radius, calc(var(--control-corner-radius) * 3px));\n box-sizing: border-box;\n color: var(--neutral-foreground-rest);\n }\n\n /* A theme's --rapid-layout-item-inner-border, drawn over the content rather than as a border\n (see .lm_stack.lm_item). None by default: the header draws the top edge (see .lm_header). */\n .lm_content::after {\n content: '';\n position: absolute;\n inset: 0;\n z-index: 1;\n pointer-events: none;\n border-radius: inherit;\n border: var(--rapid-layout-item-inner-border, 0);\n }\n\n .lm_header .lm_tabs {\n padding: 0 0 0 12px;\n }\n\n .lm_header .lm_tab.lm_active {\n background: var(--tab-active-background-color, var(--neutral-layer-card-container));\n color: var(--accent-foreground-rest);\n border-style: solid;\n border-width: var(--tab-active-border-width, 0 0 0 var(--tab-rest-border-width, 1px));\n border-color: var(--tab-active-border-color, var(--tab-rest-border-color, var(--neutral-stroke-rest)));\n }\n\n /* The content's top edge is drawn along the bottom of the header (an inset shadow under the\n tabs), not over the content, so the active tab's own background covers it and the tab flows\n straight into its panel: paint order alone, no z-index. Inactive tabs redraw the edge over\n their own (hover) background. */\n .lm_header,\n .lm_header .lm_tab:not(.lm_active) {\n box-shadow: inset 0 -1px 0 var(--neutral-stroke-rest);\n }\n\n /* A separator before each tab and after the last, as flexlayout's spacers draw. */\n .lm_header .lm_tab {\n align-items: center;\n background: var(--tab-rest-background-color, transparent);\n border-style: solid;\n border-width: 0 0 0 var(--tab-rest-border-width, 1px);\n border-color: var(--tab-rest-border-color, var(--neutral-stroke-rest));\n border-radius: 0;\n color: var(--accent-foreground-rest);\n display: flex;\n font-family: inherit;\n font-size: var(--type-ramp-minus-1-font-size);\n font-weight: 400;\n height: var(--foundation-tab-height, ${DEFAULT_TAB_HEIGHT});\n margin-right: 0;\n padding: 0 calc((12 + var(--design-unit) * 2 * var(--density)) * 1px);\n float: left;\n cursor: pointer;\n position: relative;\n }\n\n .lm_header .lm_tabs .lm_tab:last-child {\n border-right: var(--tab-rest-border-width, 1px) solid var(--tab-rest-border-color, var(--neutral-stroke-rest));\n }\n\n .lm_header .lm_tab:not(.lm_active):hover {\n background-color: var(--neutral-fill-stealth-active);\n color: var(--neutral-foreground-rest);\n }\n\n .lm_header .lm_tab:not(.lm_active):hover .lm_title {\n color: var(--neutral-foreground-rest);\n }\n\n /*\n * Window controls (tab dropdown, maximise / restore, close): round neutral icon buttons, the\n * same face as a neutral rapid-button (foundation-ui button-face.ts). The face paints the\n * background, so the icon is a mask on a ::before layer, coloured like a button's icon. Each\n * control names its icon in --layout-control-icon (custom buttons too, see setupCustomButtons).\n */\n .lm_header .lm_controls {\n top: 0;\n right: 6px;\n height: var(--foundation-tab-height, ${DEFAULT_TAB_HEIGHT});\n display: flex;\n align-items: center;\n gap: 4px;\n }\n .lm_header .lm_controls > * {\n position: relative;\n top: 0;\n width: 24px;\n height: 24px;\n margin: 0;\n box-sizing: border-box;\n border-radius: 9999px;\n opacity: 1;\n cursor: pointer;\n transition:\n ${GRADIENT_START} 200ms ease-out,\n ${GRADIENT_END} 200ms ease-out,\n box-shadow 200ms ease-out;\n }\n ${neutralButtonFace(\n '.lm_header .lm_controls > *',\n '.lm_header .lm_controls > *:hover',\n '.lm_header .lm_controls > *:active',\n )}\n .lm_header .lm_controls > *::before {\n content: '';\n position: absolute;\n inset: 0;\n background-color: var(--icon-color, var(--neutral-foreground-hint));\n mask-image: var(--layout-control-icon, none);\n mask-repeat: no-repeat;\n mask-position: center;\n /* The golden-layout glyphs fill their viewBox edge to edge (flexlayout's have built-in\n padding), so they're drawn a little smaller to match flexlayout's icons. */\n mask-size: calc(var(--design-unit) * 2.5px);\n }\n .lm_header .lm_controls > *:hover::before {\n background-color: var(--neutral-foreground-rest);\n }\n\n .lm_controls .lm_maximise {\n --layout-control-icon: url('${LAYOUT_ICONS.maximiseSVG}');\n }\n .lm_maximised .lm_controls .lm_maximise {\n --layout-control-icon: url('${LAYOUT_ICONS.minimiseSVG}');\n }\n .lm_controls .lm_close {\n --layout-control-icon: url('${LAYOUT_ICONS.closeSVG}');\n }\n .lm_header .lm_tab .lm_close_tab {\n background-image: url('${LAYOUT_ICONS.closeSVG}');\n background-size: calc(var(--foundation-tab-height, ${DEFAULT_TAB_HEIGHT}) * 0.2777);\n background-repeat: no-repeat;\n background-position: center;\n margin-left: calc((12 + var(--design-unit) * 2 * var(--density)) * 1px);\n position: relative;\n }\n\n .lm_header .lm_tab:not(.lm_active) .lm_title {\n color: var(--neutral-foreground-hint);\n }\n\n .lm_header .lm_controls .lm_tabdropdown {\n --layout-control-icon: url('${LAYOUT_ICONS.tabDropdownSVG}');\n }\n .lm_header .lm_tabdropdown_list {\n top: var(--foundation-tab-height, ${DEFAULT_TAB_HEIGHT});\n right: 108px;\n background-color: var(--neutral-layer-3);\n border: 1px solid;\n border-color: var(--neutral-stroke-rest);\n border-radius: calc(var(--control-corner-radius) * 1.5px);\n box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.35);\n }\n .lm_header .lm_tabdropdown_list > .lm_tab {\n box-shadow: none;\n padding: 0 16px;\n white-space: nowrap;\n background-color: transparent;\n color: var(--neutral-foreground-rest);\n height: var(--foundation-tab-height, ${DEFAULT_TAB_HEIGHT});\n border-width: 0;\n border-radius: 0;\n overflow: visible;\n text-overflow: unset;\n }\n .lm_header .lm_tabdropdown_list > .lm_tab:last-child {\n border-bottom: 0;\n }\n\n /* gl base styles start */\n .lm_root {\n position: relative;\n }\n .lm_row > .lm_item {\n float: left;\n }\n .lm_content {\n overflow: hidden;\n position: relative;\n }\n .lm_dragging,\n .lm_dragging * {\n cursor: move !important;\n user-select: none;\n }\n .lm_maximised {\n left: 0;\n padding: 0;\n position: absolute;\n top: 0;\n z-index: 40;\n }\n .lm_maximise_placeholder {\n display: none;\n }\n .lm_splitter {\n position: relative;\n z-index: 20;\n }\n .lm_splitter:hover,\n .lm_splitter.lm_dragging {\n background: var(--accent-stroke, var(--accent-fill-rest));\n border-radius: calc(var(--control-corner-radius) * 4px);\n }\n .lm_splitter.lm_vertical .lm_drag_handle {\n width: 100%;\n height: 15px;\n position: absolute;\n top: -5px;\n cursor: ns-resize !important;\n }\n .lm_splitter.lm_horizontal {\n float: left;\n height: 100%;\n }\n .lm_splitter.lm_horizontal .lm_drag_handle {\n width: 15px;\n height: 100%;\n position: absolute;\n left: -5px;\n cursor: ew-resize !important;\n }\n .lm_header {\n overflow: visible;\n position: relative;\n border-bottom: var(--card-border, 0);\n }\n .lm_header .lm_controls {\n position: absolute;\n }\n .lm_header ul {\n margin: 0;\n padding: 0;\n list-style-type: none;\n }\n .lm_header .lm_tabs {\n position: absolute;\n }\n .lm_header .lm_tab i {\n width: 2px;\n height: 19px;\n position: absolute;\n }\n .lm_header .lm_tab i.lm_left {\n top: 0;\n left: -2px;\n }\n .lm_header .lm_tab i.lm_right {\n top: 0;\n right: -2px;\n }\n .lm_header .lm_tab .lm_title {\n display: inline-block;\n overflow: hidden;\n text-overflow: ellipsis;\n user-select: none;\n }\n .lm_header .lm_tab .lm_close_tab {\n width: calc(var(--foundation-tab-height, ${DEFAULT_TAB_HEIGHT}) * 0.3888);\n height: calc(var(--foundation-tab-height, ${DEFAULT_TAB_HEIGHT}) * 0.3888);\n text-align: center;\n }\n .lm_stack.lm_left .lm_header,\n .lm_stack.lm_right .lm_header {\n height: 100%;\n }\n .lm_dragProxy.lm_left .lm_header,\n .lm_dragProxy.lm_right .lm_header,\n .lm_stack.lm_left .lm_header,\n .lm_stack.lm_right .lm_header {\n width: 20px;\n float: left;\n vertical-align: top;\n }\n .lm_dragProxy.lm_left .lm_header .lm_tabs,\n .lm_dragProxy.lm_right .lm_header .lm_tabs,\n .lm_stack.lm_left .lm_header .lm_tabs,\n .lm_stack.lm_right .lm_header .lm_tabs {\n transform-origin: left top;\n top: 0;\n width: 1000px;\n }\n .lm_dragProxy.lm_left .lm_header .lm_controls,\n .lm_dragProxy.lm_right .lm_header .lm_controls,\n .lm_stack.lm_left .lm_header .lm_controls,\n .lm_stack.lm_right .lm_header .lm_controls {\n bottom: 0;\n }\n .lm_dragProxy.lm_left .lm_items,\n .lm_dragProxy.lm_right .lm_items,\n .lm_stack.lm_left .lm_items,\n .lm_stack.lm_right .lm_items {\n float: left;\n }\n .lm_dragProxy.lm_left .lm_header .lm_tabs,\n .lm_stack.lm_left .lm_header .lm_tabs {\n transform: rotate(-90deg) scaleX(-1);\n left: 0;\n }\n .lm_dragProxy.lm_left .lm_header .lm_tabs .lm_tab,\n .lm_stack.lm_left .lm_header .lm_tabs .lm_tab {\n transform: scaleX(-1);\n margin-top: 1px;\n }\n .lm_dragProxy.lm_left .lm_header .lm_tabdropdown_list,\n .lm_stack.lm_left .lm_header .lm_tabdropdown_list {\n top: initial;\n right: initial;\n left: 20px;\n }\n .lm_dragProxy.lm_right .lm_content {\n float: left;\n }\n .lm_dragProxy.lm_right .lm_header .lm_tabs,\n .lm_stack.lm_right .lm_header .lm_tabs {\n transform: rotate(90deg) scaleX(1);\n left: 100%;\n margin-left: 0;\n }\n .lm_dragProxy.lm_right .lm_header .lm_controls,\n .lm_stack.lm_right .lm_header .lm_controls {\n left: 3px;\n }\n .lm_dragProxy.lm_right .lm_header .lm_tabdropdown_list,\n .lm_stack.lm_right .lm_header .lm_tabdropdown_list {\n top: initial;\n right: 20px;\n }\n .lm_dragProxy.lm_bottom .lm_header .lm_tab,\n .lm_stack.lm_bottom .lm_header .lm_tab {\n margin-top: 0;\n border-top: none;\n }\n .lm_dragProxy.lm_bottom .lm_header .lm_controls,\n .lm_stack.lm_bottom .lm_header .lm_controls {\n top: 3px;\n }\n .lm_dragProxy.lm_bottom .lm_header .lm_tabdropdown_list,\n .lm_stack.lm_bottom .lm_header .lm_tabdropdown_list {\n top: initial;\n bottom: 20px;\n }\n .lm_drop_tab_placeholder {\n float: left;\n width: 100px;\n height: 10px;\n visibility: hidden;\n }\n .lm_header .lm_tabdropdown_list {\n position: absolute;\n top: 20px;\n right: 0;\n z-index: 5;\n overflow: hidden;\n }\n .lm_header .lm_tabdropdown_list .lm_tab {\n clear: both;\n padding-right: 10px;\n margin: 0;\n }\n .lm_header .lm_tabdropdown_list .lm_tab .lm_title {\n width: 100px;\n }\n .lm_header .lm_tabdropdown_list .lm_close_tab {\n display: none !important;\n }\n .lm_dragProxy {\n position: absolute;\n top: 0;\n left: 0;\n z-index: 30;\n }\n .lm_dragProxy .lm_header {\n background: transparent;\n }\n .lm_dragProxy .lm_content::after {\n content: none;\n }\n .lm_dragProxy .lm_content {\n border-top: none;\n overflow: hidden;\n }\n .lm_dropTargetIndicator {\n display: none;\n position: absolute;\n z-index: 20;\n box-shadow: none;\n }\n .lm_dropTargetIndicator .lm_inner {\n width: 100%;\n height: 100%;\n position: relative;\n top: 0;\n left: 0;\n }\n .lm_transition_indicator {\n display: none;\n width: 20px;\n height: 20px;\n position: absolute;\n top: 0;\n left: 0;\n z-index: 20;\n }\n .lm_popin {\n width: 20px;\n height: 20px;\n position: absolute;\n bottom: 0;\n right: 0;\n z-index: 9999;\n }\n .lm_popin > * {\n width: 100%;\n height: 100%;\n position: absolute;\n top: 0;\n left: 0;\n }\n .lm_popin > .lm_bg {\n z-index: 10;\n }\n .lm_popin > .lm_icon {\n z-index: 20;\n } /*# sourceMappingURL=goldenlayout-base.css.map */\n`",
291
+ "default": "css`\n ${containerStyles}\n ${loadingSpinnerStyles}\n\n :host {\n --foundation-tab-height: calc(\n (((var(--base-height-multiplier) + var(--density)) * var(--design-unit)) - 4) * 1px\n );\n }\n\n .lm_goldenlayout {\n border-radius: calc(var(--control-corner-radius) * 1.5px);\n font-family: var(--body-font);\n box-sizing: border-box;\n }\n\n .lm_goldenlayout * {\n box-sizing: border-box;\n }\n\n .lm_stack.lm_item {\n background-color: var(--rapid-layout-item-background, var(--neutral-layer-3));\n border-style: solid;\n border-width: var(--rapid-layout-item-border-width, 0);\n border-color: var(--rapid-layout-item-border-color, var(--neutral-stroke-rest));\n border-radius: var(--card-corner-radius, calc(var(--control-corner-radius) * 1.5px));\n box-sizing: border-box;\n }\n\n .lm_maximised .lm_header {\n border-bottom: var(--card-border, 0);\n position: unset;\n }\n\n .lm_maximised .lm_header .lm_tabs {\n z-index: 3;\n }\n\n .lm_content {\n background-color: var(--neutral-layer-card-container);\n border-radius: calc(var(--control-corner-radius) * 1.5px) calc(var(--control-corner-radius) * 1.5px)\n var(--card-corner-radius, calc(var(--control-corner-radius) * 1.5px))\n var(--card-corner-radius, calc(var(--control-corner-radius) * 1.5px));\n border: var(--rapid-layout-item-inner-border, 1px solid var(--neutral-stroke-rest));\n box-sizing: border-box;\n color: var(--neutral-foreground-rest);\n }\n\n .lm_header .lm_tabs {\n padding: 0 16px;\n }\n\n .lm_header .lm_tab.lm_active {\n background: var(--tab-active-background-color, var(--neutral-layer-card-container));\n color: var(--accent-foreground-rest);\n border-style: solid;\n border-width: var(--tab-active-border-width, 1px 1px 0 1px);\n border-color: var(--tab-active-border-color, var(--neutral-stroke-rest));\n }\n\n .lm_header .lm_tab {\n align-items: center;\n background: var(--tab-rest-background-color, var(--neutral-layer-4));\n border-style: solid;\n border-width: var(--tab-rest-border-width, 1px);\n border-color: var(--tab-rest-border-color, transparent);\n border-radius: calc(var(--control-corner-radius) * 1.5px)\n calc(var(--control-corner-radius) * 1.5px) 0 0;\n color: var(--accent-foreground-rest);\n display: flex;\n font-family: inherit;\n font-size: var(--type-ramp-minus-1-font-size);\n font-weight: 400;\n height: var(--foundation-tab-height, ${DEFAULT_TAB_HEIGHT});\n margin-right: 2px;\n padding: 0 calc((12 + var(--design-unit) * 2 * var(--density)) * 1px);\n float: left;\n cursor: pointer;\n position: relative;\n }\n\n .lm_header .lm_tab:not(.lm_active):hover {\n background-color: var(--neutral-layer-card-container);\n color: var(--accent-foreground-rest);\n }\n\n .lm_header .lm_controls {\n top: 4px;\n display: flex;\n }\n .lm_header .lm_controls > * {\n width: calc(var(--foundation-tab-height, ${DEFAULT_TAB_HEIGHT}) - 8px);\n height: calc(var(--foundation-tab-height, ${DEFAULT_TAB_HEIGHT}) - 8px);\n background-repeat: no-repeat;\n background-position: center;\n background-size: calc(var(--foundation-tab-height, ${DEFAULT_TAB_HEIGHT}) * 0.45);\n background-color: var(\n --icon-button-background,\n color-mix(in srgb, var(--neutral-fill-strong-rest), transparent 90%)\n );\n border-radius: calc(var(--control-corner-radius) * 1.5px);\n margin-right: 4px;\n top: 3px;\n opacity: 1;\n }\n .lm_header .lm_controls > *:hover {\n background-color: color-mix(in srgb, var(--neutral-fill-strong-hover), transparent 75%);\n cursor: pointer;\n }\n\n .lm_controls .lm_maximise {\n background-image: url('${LAYOUT_ICONS.maximiseSVG}');\n }\n .lm_maximised .lm_controls .lm_maximise {\n background-image: url('${LAYOUT_ICONS.minimiseSVG}');\n }\n .lm_controls .lm_close {\n background-image: url('${LAYOUT_ICONS.closeSVG}');\n }\n .lm_header .lm_tab .lm_close_tab {\n background-image: url('${LAYOUT_ICONS.closeSVG}');\n background-size: calc(var(--foundation-tab-height, ${DEFAULT_TAB_HEIGHT}) * 0.2777);\n background-repeat: no-repeat;\n background-position: center;\n margin-left: calc((12 + var(--design-unit) * 2 * var(--density)) * 1px);\n position: relative;\n }\n\n .lm_header .lm_tab:not(.lm_active) .lm_title {\n color: var(--neutral-foreground-hint);\n }\n\n .lm_header .lm_controls .lm_tabdropdown::before {\n content: none;\n }\n .lm_header .lm_controls .lm_tabdropdown {\n background-image: url('${LAYOUT_ICONS.tabDropdownSVG}');\n }\n .lm_header .lm_tabdropdown_list {\n top: var(--foundation-tab-height, ${DEFAULT_TAB_HEIGHT});\n right: 108px;\n background-color: var(--neutral-layer-3);\n border: 1px solid;\n border-color: var(--neutral-stroke-rest);\n border-radius: calc(var(--control-corner-radius) * 1.5px);\n box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.35);\n }\n .lm_header .lm_tabdropdown_list > .lm_tab {\n box-shadow: none;\n padding: 0 16px;\n white-space: nowrap;\n background-color: transparent;\n color: var(--neutral-foreground-rest);\n height: var(--foundation-tab-height, ${DEFAULT_TAB_HEIGHT});\n border-radius: 0;\n overflow: visible;\n text-overflow: unset;\n }\n .lm_header .lm_tabdropdown_list > .lm_tab:last-child {\n border-bottom: 0;\n }\n\n /* gl base styles start */\n .lm_root {\n position: relative;\n }\n .lm_row > .lm_item {\n float: left;\n }\n .lm_content {\n overflow: hidden;\n position: relative;\n }\n .lm_dragging,\n .lm_dragging * {\n cursor: move !important;\n user-select: none;\n }\n .lm_maximised {\n left: 0;\n padding: 0;\n position: absolute;\n top: 0;\n z-index: 40;\n }\n .lm_maximise_placeholder {\n display: none;\n }\n .lm_splitter {\n position: relative;\n z-index: 20;\n }\n .lm_splitter:hover,\n .lm_splitter.lm_dragging {\n background: var(--accent-fill-rest);\n border-radius: calc(var(--control-corner-radius) * 4px);\n }\n .lm_splitter.lm_vertical .lm_drag_handle {\n width: 100%;\n height: 15px;\n position: absolute;\n top: -5px;\n cursor: ns-resize !important;\n }\n .lm_splitter.lm_horizontal {\n float: left;\n height: 100%;\n }\n .lm_splitter.lm_horizontal .lm_drag_handle {\n width: 15px;\n height: 100%;\n position: absolute;\n left: -5px;\n cursor: ew-resize !important;\n }\n .lm_header {\n overflow: visible;\n position: relative;\n border-bottom: var(--card-border, 0);\n }\n .lm_header .lm_controls {\n position: absolute;\n right: 3px;\n }\n .lm_header .lm_controls > li {\n cursor: pointer;\n float: left;\n width: 18px;\n height: 18px;\n text-align: center;\n }\n .lm_header ul {\n margin: 0;\n padding: 0;\n list-style-type: none;\n }\n .lm_header .lm_tabs {\n position: absolute;\n }\n .lm_header .lm_tab i {\n width: 2px;\n height: 19px;\n position: absolute;\n }\n .lm_header .lm_tab i.lm_left {\n top: 0;\n left: -2px;\n }\n .lm_header .lm_tab i.lm_right {\n top: 0;\n right: -2px;\n }\n .lm_header .lm_tab .lm_title {\n display: inline-block;\n overflow: hidden;\n text-overflow: ellipsis;\n user-select: none;\n }\n .lm_header .lm_tab .lm_close_tab {\n width: calc(var(--foundation-tab-height, ${DEFAULT_TAB_HEIGHT}) * 0.3888);\n height: calc(var(--foundation-tab-height, ${DEFAULT_TAB_HEIGHT}) * 0.3888);\n text-align: center;\n }\n .lm_stack.lm_left .lm_header,\n .lm_stack.lm_right .lm_header {\n height: 100%;\n }\n .lm_dragProxy.lm_left .lm_header,\n .lm_dragProxy.lm_right .lm_header,\n .lm_stack.lm_left .lm_header,\n .lm_stack.lm_right .lm_header {\n width: 20px;\n float: left;\n vertical-align: top;\n }\n .lm_dragProxy.lm_left .lm_header .lm_tabs,\n .lm_dragProxy.lm_right .lm_header .lm_tabs,\n .lm_stack.lm_left .lm_header .lm_tabs,\n .lm_stack.lm_right .lm_header .lm_tabs {\n transform-origin: left top;\n top: 0;\n width: 1000px;\n }\n .lm_dragProxy.lm_left .lm_header .lm_controls,\n .lm_dragProxy.lm_right .lm_header .lm_controls,\n .lm_stack.lm_left .lm_header .lm_controls,\n .lm_stack.lm_right .lm_header .lm_controls {\n bottom: 0;\n }\n .lm_dragProxy.lm_left .lm_items,\n .lm_dragProxy.lm_right .lm_items,\n .lm_stack.lm_left .lm_items,\n .lm_stack.lm_right .lm_items {\n float: left;\n }\n .lm_dragProxy.lm_left .lm_header .lm_tabs,\n .lm_stack.lm_left .lm_header .lm_tabs {\n transform: rotate(-90deg) scaleX(-1);\n left: 0;\n }\n .lm_dragProxy.lm_left .lm_header .lm_tabs .lm_tab,\n .lm_stack.lm_left .lm_header .lm_tabs .lm_tab {\n transform: scaleX(-1);\n margin-top: 1px;\n }\n .lm_dragProxy.lm_left .lm_header .lm_tabdropdown_list,\n .lm_stack.lm_left .lm_header .lm_tabdropdown_list {\n top: initial;\n right: initial;\n left: 20px;\n }\n .lm_dragProxy.lm_right .lm_content {\n float: left;\n }\n .lm_dragProxy.lm_right .lm_header .lm_tabs,\n .lm_stack.lm_right .lm_header .lm_tabs {\n transform: rotate(90deg) scaleX(1);\n left: 100%;\n margin-left: 0;\n }\n .lm_dragProxy.lm_right .lm_header .lm_controls,\n .lm_stack.lm_right .lm_header .lm_controls {\n left: 3px;\n }\n .lm_dragProxy.lm_right .lm_header .lm_tabdropdown_list,\n .lm_stack.lm_right .lm_header .lm_tabdropdown_list {\n top: initial;\n right: 20px;\n }\n .lm_dragProxy.lm_bottom .lm_header .lm_tab,\n .lm_stack.lm_bottom .lm_header .lm_tab {\n margin-top: 0;\n border-top: none;\n }\n .lm_dragProxy.lm_bottom .lm_header .lm_controls,\n .lm_stack.lm_bottom .lm_header .lm_controls {\n top: 3px;\n }\n .lm_dragProxy.lm_bottom .lm_header .lm_tabdropdown_list,\n .lm_stack.lm_bottom .lm_header .lm_tabdropdown_list {\n top: initial;\n bottom: 20px;\n }\n .lm_drop_tab_placeholder {\n float: left;\n width: 100px;\n height: 10px;\n visibility: hidden;\n }\n .lm_header .lm_tabdropdown_list {\n position: absolute;\n top: 20px;\n right: 0;\n z-index: 5;\n overflow: hidden;\n }\n .lm_header .lm_tabdropdown_list .lm_tab {\n clear: both;\n padding-right: 10px;\n margin: 0;\n }\n .lm_header .lm_tabdropdown_list .lm_tab .lm_title {\n width: 100px;\n }\n .lm_header .lm_tabdropdown_list .lm_close_tab {\n display: none !important;\n }\n .lm_dragProxy {\n position: absolute;\n top: 0;\n left: 0;\n z-index: 30;\n }\n .lm_dragProxy .lm_header {\n background: transparent;\n }\n .lm_dragProxy .lm_content {\n border-top: none;\n overflow: hidden;\n }\n .lm_dropTargetIndicator {\n display: none;\n position: absolute;\n z-index: 20;\n box-shadow: none;\n }\n .lm_dropTargetIndicator .lm_inner {\n width: 100%;\n height: 100%;\n position: relative;\n top: 0;\n left: 0;\n }\n .lm_transition_indicator {\n display: none;\n width: 20px;\n height: 20px;\n position: absolute;\n top: 0;\n left: 0;\n z-index: 20;\n }\n .lm_popin {\n width: 20px;\n height: 20px;\n position: absolute;\n bottom: 0;\n right: 0;\n z-index: 9999;\n }\n .lm_popin > * {\n width: 100%;\n height: 100%;\n position: absolute;\n top: 0;\n left: 0;\n }\n .lm_popin > .lm_bg {\n z-index: 10;\n }\n .lm_popin > .lm_icon {\n z-index: 20;\n } /*# sourceMappingURL=goldenlayout-base.css.map */\n`",
292
292
  "description": "`ElementStyles` which defines the css for FoundationLayout.",
293
293
  "privacy": "public"
294
294
  }
@@ -306,642 +306,600 @@
306
306
  },
307
307
  {
308
308
  "kind": "javascript-module",
309
- "path": "src/main/index.ts",
310
- "declarations": [],
309
+ "path": "src/utils/constants.ts",
310
+ "declarations": [
311
+ {
312
+ "kind": "variable",
313
+ "name": "DEFAULT_RELOAD_BUFFER",
314
+ "type": {
315
+ "text": "number"
316
+ },
317
+ "default": "500",
318
+ "description": "Default time in milliseconds for the layout to buffer calls to reloading\nthe layout while the declarative API is loading.\n\nDuring the first load of the layout, a loading spinner will be shown.",
319
+ "privacy": "public"
320
+ },
321
+ {
322
+ "kind": "variable",
323
+ "name": "LAYOUT_POPOUT_CONTROL_KEY",
324
+ "type": {
325
+ "text": "string"
326
+ },
327
+ "default": "'f-layout-key'",
328
+ "description": "Key to be used for controlling popout behaviour"
329
+ },
330
+ {
331
+ "kind": "variable",
332
+ "name": "POPOUT_GEOMETRY_BROADCAST_INTERVAL",
333
+ "type": {
334
+ "text": "number"
335
+ },
336
+ "default": "1000",
337
+ "description": "How often a popout window should check to broadcast its\ngeometry"
338
+ },
339
+ {
340
+ "kind": "variable",
341
+ "name": "LAYOUT_POPOUT_CONTAINER_CLASS",
342
+ "type": {
343
+ "text": "string"
344
+ },
345
+ "default": "'f-layout-popout'",
346
+ "description": "Put this classname on an element which is a DOM parent of the layout, and\nif the layout goes into popout mode then it will place itself as the only child\nfor the popout container you set."
347
+ },
348
+ {
349
+ "kind": "variable",
350
+ "name": "DEFAULT_TAB_HEIGHT",
351
+ "type": {
352
+ "text": "string"
353
+ },
354
+ "default": "'36px'"
355
+ },
356
+ {
357
+ "kind": "function",
358
+ "name": "getLayoutHeaderHeight"
359
+ },
360
+ {
361
+ "kind": "variable",
362
+ "name": "DEFAULT_BORDER_WIDTH",
363
+ "type": {
364
+ "text": "number"
365
+ },
366
+ "default": "0"
367
+ },
368
+ {
369
+ "kind": "function",
370
+ "name": "getItemBorderWidth"
371
+ }
372
+ ],
311
373
  "exports": [
312
374
  {
313
375
  "kind": "js",
314
- "name": "FoundationLayoutItem",
376
+ "name": "DEFAULT_RELOAD_BUFFER",
315
377
  "declaration": {
316
- "name": "FoundationLayoutItem",
317
- "module": "./layout-item"
378
+ "name": "DEFAULT_RELOAD_BUFFER",
379
+ "module": "src/utils/constants.ts"
318
380
  }
319
381
  },
320
382
  {
321
383
  "kind": "js",
322
- "name": "FoundationLayoutRegion",
384
+ "name": "LAYOUT_POPOUT_CONTROL_KEY",
323
385
  "declaration": {
324
- "name": "FoundationLayoutRegion",
325
- "module": "./layout-region"
386
+ "name": "LAYOUT_POPOUT_CONTROL_KEY",
387
+ "module": "src/utils/constants.ts"
326
388
  }
327
389
  },
328
390
  {
329
391
  "kind": "js",
330
- "name": "FoundationLayout",
392
+ "name": "POPOUT_GEOMETRY_BROADCAST_INTERVAL",
331
393
  "declaration": {
332
- "name": "FoundationLayout",
333
- "module": "./layout-main"
394
+ "name": "POPOUT_GEOMETRY_BROADCAST_INTERVAL",
395
+ "module": "src/utils/constants.ts"
334
396
  }
335
397
  },
336
398
  {
337
399
  "kind": "js",
338
- "name": "layoutStyles",
400
+ "name": "LAYOUT_POPOUT_CONTAINER_CLASS",
339
401
  "declaration": {
340
- "name": "layoutStyles",
341
- "module": "./layout-main"
402
+ "name": "LAYOUT_POPOUT_CONTAINER_CLASS",
403
+ "module": "src/utils/constants.ts"
342
404
  }
343
405
  },
344
406
  {
345
407
  "kind": "js",
346
- "name": "layoutTemplate",
408
+ "name": "DEFAULT_TAB_HEIGHT",
347
409
  "declaration": {
348
- "name": "layoutTemplate",
349
- "module": "./layout-main"
410
+ "name": "DEFAULT_TAB_HEIGHT",
411
+ "module": "src/utils/constants.ts"
350
412
  }
351
413
  },
352
414
  {
353
415
  "kind": "js",
354
- "name": "*",
416
+ "name": "getLayoutHeaderHeight",
355
417
  "declaration": {
356
- "name": "*",
357
- "package": "./layout-components"
418
+ "name": "getLayoutHeaderHeight",
419
+ "module": "src/utils/constants.ts"
420
+ }
421
+ },
422
+ {
423
+ "kind": "js",
424
+ "name": "DEFAULT_BORDER_WIDTH",
425
+ "declaration": {
426
+ "name": "DEFAULT_BORDER_WIDTH",
427
+ "module": "src/utils/constants.ts"
428
+ }
429
+ },
430
+ {
431
+ "kind": "js",
432
+ "name": "getItemBorderWidth",
433
+ "declaration": {
434
+ "name": "getItemBorderWidth",
435
+ "module": "src/utils/constants.ts"
358
436
  }
359
437
  }
360
438
  ]
361
439
  },
362
440
  {
363
441
  "kind": "javascript-module",
364
- "path": "src/main/layout-components.ts",
442
+ "path": "src/utils/error.ts",
443
+ "declarations": [
444
+ {
445
+ "kind": "class",
446
+ "description": "",
447
+ "name": "LayoutUsageError",
448
+ "superclass": {
449
+ "name": "Error",
450
+ "module": "src/utils/error.ts"
451
+ }
452
+ },
453
+ {
454
+ "kind": "class",
455
+ "description": "",
456
+ "name": "LayoutRegistrationError",
457
+ "superclass": {
458
+ "name": "Error",
459
+ "module": "src/utils/error.ts"
460
+ }
461
+ }
462
+ ],
463
+ "exports": [
464
+ {
465
+ "kind": "js",
466
+ "name": "LayoutUsageError",
467
+ "declaration": {
468
+ "name": "LayoutUsageError",
469
+ "module": "src/utils/error.ts"
470
+ }
471
+ },
472
+ {
473
+ "kind": "js",
474
+ "name": "LayoutRegistrationError",
475
+ "declaration": {
476
+ "name": "LayoutRegistrationError",
477
+ "module": "src/utils/error.ts"
478
+ }
479
+ }
480
+ ]
481
+ },
482
+ {
483
+ "kind": "javascript-module",
484
+ "path": "src/utils/events.ts",
365
485
  "declarations": [
366
486
  {
367
487
  "kind": "variable",
368
- "name": "foundationLayoutComponents",
488
+ "name": "LayoutEmitEvents",
369
489
  "type": {
370
- "text": "object"
490
+ "text": "{\n firstLoaded: 'first-loaded',\n itemAdded: 'item-added',\n itemRemoved: 'item-removed',\n itemResized: 'item-resized',\n stateChanged: 'state-changed',\n}"
371
491
  },
372
- "default": "{\n foundationLayout,\n foundationLayoutRegion,\n foundationLayoutItem,\n register(container?: Container, ...rest: any[]) {\n if (!container) {\n // preserve backward compatibility with code that loops through\n // the values of this object and calls them as funcs with no args\n return;\n }\n for (const key in this) {\n if (key === 'register') {\n continue;\n }\n this[key]().register(container, ...rest);\n }\n },\n}",
373
- "description": "Registration object to register the layout with your design system.",
492
+ "default": "{\n firstLoaded: 'first-loaded',\n itemAdded: 'item-added',\n itemRemoved: 'item-removed',\n itemResized: 'item-resized',\n stateChanged: 'state-changed',\n}",
493
+ "description": "Defines events that the layout system emits\n\n'firstLoaded' - emitted when the layout has finished loading the first time\nusing the declarative API after DEFAULT_RELOAD_BUFFER ms.\n<br/>\n'itemAdded' - emitted when an item is added to the layout'\n<br/>\n'itemRemoved' - emitted when an item is removed from the layout'\n<br/>\n'itemResized' - emitted when the user drags the divider to resize elements\n<br/>\n'stateChanged' - emitted on every persisted layout change. This is the broadest\nevent: it fires wherever the layout caches/saves its state, which includes item\nadd/remove/resize but ALSO the changes the granular events miss — dragging a pane\nto a new position, loading a whole layout via FoundationLayout.loadLayout,\nreverting to the default, and contained-item autosave requests. Prefer this when\nyou need to mirror the layout to your own store and must not miss any change.",
494
+ "privacy": "public"
495
+ },
496
+ {
497
+ "kind": "variable",
498
+ "name": "LayoutReceiveEvents",
499
+ "type": {
500
+ "text": "{\n changeTitle: 'change-title',\n autosave: 'autosave',\n}"
501
+ },
502
+ "default": "{\n changeTitle: 'change-title',\n autosave: 'autosave',\n}",
503
+ "description": "Defines events that the layout system listens for\n\n'changeTitle' - emit this from a contained item to update the title of the window that contains it.\n'autosave' - emit this from a contained item to hint to the layout system that it should autosave the layout. A contained item should do this if it has just changed some state it would like to persist. See LayoutComponentWithState.",
374
504
  "privacy": "public"
375
505
  }
376
506
  ],
377
507
  "exports": [
378
508
  {
379
509
  "kind": "js",
380
- "name": "foundationLayoutComponents",
510
+ "name": "LayoutEmitEvents",
381
511
  "declaration": {
382
- "name": "foundationLayoutComponents",
383
- "module": "src/main/layout-components.ts"
512
+ "name": "LayoutEmitEvents",
513
+ "module": "src/utils/events.ts"
514
+ }
515
+ },
516
+ {
517
+ "kind": "js",
518
+ "name": "LayoutReceiveEvents",
519
+ "declaration": {
520
+ "name": "LayoutReceiveEvents",
521
+ "module": "src/utils/events.ts"
384
522
  }
385
523
  }
386
524
  ]
387
525
  },
388
526
  {
389
527
  "kind": "javascript-module",
390
- "path": "src/main/layout-item.ts",
528
+ "path": "src/utils/factory-registry.ts",
391
529
  "declarations": [
392
530
  {
393
- "kind": "class",
394
- "description": "",
395
- "name": "FoundationLayoutItem",
396
- "members": [
531
+ "kind": "function",
532
+ "name": "registerFactory",
533
+ "return": {
534
+ "type": {
535
+ "text": "void"
536
+ }
537
+ },
538
+ "parameters": [
397
539
  {
398
- "kind": "field",
399
- "name": "title",
540
+ "name": "key",
400
541
  "type": {
401
542
  "text": "string"
402
543
  },
403
- "description": "Sets the title of the item which is displayed on the tab.",
404
- "privacy": "public"
405
- },
406
- {
407
- "kind": "field",
408
- "name": "closable",
409
- "type": {
410
- "text": "boolean"
411
- },
412
- "default": "false",
413
- "description": "Boolean attribute controls whether the window can be closed in the GUI.\nDefaults to `false`.",
414
- "privacy": "public"
544
+ "description": "Unique identifier for the factory. Should be descriptive and unique across the application."
415
545
  },
416
546
  {
417
- "kind": "field",
418
- "name": "size",
547
+ "name": "factory",
419
548
  "type": {
420
- "text": "string"
549
+ "text": "ComponentFactory"
421
550
  },
422
- "description": "optional string describing the size of the new item (see the written documentation for more info)",
423
- "privacy": "public"
424
- },
551
+ "description": "The factory function that creates the component."
552
+ }
553
+ ],
554
+ "description": "Registers a factory function with a unique key.\nThis allows framework components to be used in the declarative layout API\nwithout needing to pass function references through HTML attributes.",
555
+ "privacy": "public"
556
+ },
557
+ {
558
+ "kind": "function",
559
+ "name": "getFactory",
560
+ "return": {
561
+ "type": {
562
+ "text": ""
563
+ }
564
+ },
565
+ "parameters": [
425
566
  {
426
- "kind": "field",
427
- "name": "registration",
567
+ "name": "key",
428
568
  "type": {
429
569
  "text": "string"
430
570
  },
431
- "description": "Sets the registration name for the item, which can be used later to add the item via the JavaScript API using FoundationLayout.addItem.",
432
- "privacy": "public"
433
- },
434
- {
435
- "kind": "field",
436
- "name": "_presentation",
437
- "type": {
438
- "text": "ComponentPresentation | null | undefined"
439
- },
440
- "privacy": "private",
441
- "default": "void 0",
442
- "inheritedFrom": {
443
- "name": "FoundationElement",
444
- "module": "src/foundation-element/foundation-element.ts"
445
- }
446
- },
447
- {
448
- "kind": "field",
449
- "name": "$presentation",
450
- "type": {
451
- "text": "ComponentPresentation | null"
452
- },
453
- "privacy": "public",
454
- "description": "A property which resolves the ComponentPresentation instance\nfor the current component.",
455
- "inheritedFrom": {
456
- "name": "FoundationElement",
457
- "module": "src/foundation-element/foundation-element.ts"
458
- }
459
- },
460
- {
461
- "kind": "field",
462
- "name": "template",
463
- "type": {
464
- "text": "ElementViewTemplate | void | null"
465
- },
466
- "privacy": "public",
467
- "description": "Sets the template of the element instance. When undefined,\nthe element will attempt to resolve the template from\nthe associated presentation or custom element definition.",
468
- "inheritedFrom": {
469
- "name": "FoundationElement",
470
- "module": "src/foundation-element/foundation-element.ts"
471
- }
472
- },
473
- {
474
- "kind": "method",
475
- "name": "templateChanged",
476
- "privacy": "protected",
477
- "return": {
478
- "type": {
479
- "text": "void"
480
- }
481
- },
482
- "inheritedFrom": {
483
- "name": "FoundationElement",
484
- "module": "src/foundation-element/foundation-element.ts"
485
- }
486
- },
487
- {
488
- "kind": "field",
489
- "name": "styles",
490
- "type": {
491
- "text": "ElementStyles | void | null"
492
- },
493
- "privacy": "public",
494
- "description": "Sets the default styles for the element instance. When undefined,\nthe element will attempt to resolve default styles from\nthe associated presentation or custom element definition.",
495
- "inheritedFrom": {
496
- "name": "FoundationElement",
497
- "module": "src/foundation-element/foundation-element.ts"
498
- }
499
- },
500
- {
501
- "kind": "method",
502
- "name": "stylesChanged",
503
- "privacy": "protected",
504
- "return": {
505
- "type": {
506
- "text": "void"
507
- }
508
- },
509
- "inheritedFrom": {
510
- "name": "FoundationElement",
511
- "module": "src/foundation-element/foundation-element.ts"
512
- }
513
- },
514
- {
515
- "kind": "method",
516
- "name": "compose",
517
- "privacy": "public",
518
- "static": true,
519
- "return": {
520
- "type": {
521
- "text": "(\n overrideDefinition?: OverrideFoundationElementDefinition<T>\n ) => FoundationElementRegistry<T, K>"
522
- }
523
- },
524
- "parameters": [
525
- {
526
- "name": "this",
527
- "type": {
528
- "text": "K"
529
- }
530
- },
531
- {
532
- "name": "elementDefinition",
533
- "type": {
534
- "text": "T"
535
- },
536
- "description": "The definition of the element to create the registry\nfunction for."
537
- }
538
- ],
539
- "description": "Defines an element registry function with a set of element definition defaults.",
540
- "inheritedFrom": {
541
- "name": "FoundationElement",
542
- "module": "src/foundation-element/foundation-element.ts"
543
- }
571
+ "description": "The unique identifier for the factory."
544
572
  }
545
573
  ],
546
- "attributes": [
547
- {
548
- "name": "title",
549
- "type": {
550
- "text": "string"
551
- },
552
- "description": "Sets the title of the item which is displayed on the tab.",
553
- "fieldName": "title"
554
- },
555
- {
556
- "type": {
557
- "text": "boolean"
558
- },
559
- "default": "false",
560
- "description": "Boolean attribute controls whether the window can be closed in the GUI.\nDefaults to `false`.",
561
- "fieldName": "closable"
562
- },
563
- {
564
- "name": "size",
565
- "type": {
566
- "text": "string"
567
- },
568
- "description": "optional string describing the size of the new item (see the written documentation for more info)",
569
- "fieldName": "size"
570
- },
574
+ "description": "Retrieves a factory function by its key.",
575
+ "privacy": "public"
576
+ },
577
+ {
578
+ "kind": "function",
579
+ "name": "unregisterFactory",
580
+ "return": {
581
+ "type": {
582
+ "text": ""
583
+ }
584
+ },
585
+ "parameters": [
571
586
  {
572
- "name": "registration",
587
+ "name": "key",
573
588
  "type": {
574
589
  "text": "string"
575
590
  },
576
- "description": "Sets the registration name for the item, which can be used later to add the item via the JavaScript API using FoundationLayout.addItem.",
577
- "fieldName": "registration"
591
+ "description": "The unique identifier for the factory to remove."
578
592
  }
579
593
  ],
580
- "superclass": {
581
- "name": "FoundationElement",
582
- "package": "@microsoft/fast-foundation"
583
- },
584
- "tagName": "%%prefix%%-layout-item",
585
- "customElement": true
594
+ "description": "Removes a factory from the registry.\nThis is useful for cleanup when a component is unmounted or no longer needed.",
595
+ "privacy": "public"
586
596
  }
587
597
  ],
588
598
  "exports": [
589
599
  {
590
600
  "kind": "js",
591
- "name": "FoundationLayoutItem",
601
+ "name": "registerFactory",
592
602
  "declaration": {
593
- "name": "FoundationLayoutItem",
594
- "module": "src/main/layout-item.ts"
603
+ "name": "registerFactory",
604
+ "module": "src/utils/factory-registry.ts"
605
+ }
606
+ },
607
+ {
608
+ "kind": "js",
609
+ "name": "getFactory",
610
+ "declaration": {
611
+ "name": "getFactory",
612
+ "module": "src/utils/factory-registry.ts"
613
+ }
614
+ },
615
+ {
616
+ "kind": "js",
617
+ "name": "unregisterFactory",
618
+ "declaration": {
619
+ "name": "unregisterFactory",
620
+ "module": "src/utils/factory-registry.ts"
595
621
  }
596
622
  }
597
623
  ]
598
624
  },
599
625
  {
600
626
  "kind": "javascript-module",
601
- "path": "src/main/layout-main.ts",
602
- "declarations": [
627
+ "path": "src/utils/index.ts",
628
+ "declarations": [],
629
+ "exports": [
603
630
  {
604
- "kind": "class",
605
- "description": "",
606
- "name": "FoundationLayout",
607
- "members": [
608
- {
609
- "kind": "field",
610
- "name": "layout",
611
- "type": {
612
- "text": "GoldenLayout"
613
- },
614
- "privacy": "private"
615
- },
616
- {
617
- "kind": "field",
618
- "name": "layoutConfig",
619
- "type": {
620
- "text": "LayoutConfig"
621
- },
622
- "privacy": "private",
623
- "default": "{ root: undefined }"
624
- },
625
- {
626
- "kind": "field",
627
- "name": "defaultLayoutConfig",
628
- "type": {
629
- "text": "LayoutConfig"
630
- },
631
- "privacy": "private",
632
- "default": "{ root: undefined }"
633
- },
634
- {
635
- "kind": "field",
636
- "name": "reloadBuffer",
637
- "type": {
638
- "text": "number"
639
- },
640
- "default": "DEFAULT_RELOAD_BUFFER",
641
- "description": "Number describing how long to wait in ms before reloading the config when adding items\ndeclaratively by the html API. Default 500 (ms).",
642
- "privacy": "public"
643
- },
644
- {
645
- "kind": "field",
646
- "name": "reloadPending",
647
- "type": {
648
- "text": "boolean"
649
- },
650
- "privacy": "private",
651
- "default": "false"
652
- },
653
- {
654
- "kind": "field",
655
- "name": "registeredComponents",
656
- "type": {
657
- "text": "number"
658
- },
659
- "privacy": "private",
660
- "default": "0"
661
- },
662
- {
663
- "kind": "field",
664
- "name": "autoSaveKey",
665
- "type": {
666
- "text": "string | undefined"
667
- },
668
- "description": "Attribute which if set will auto save and load the layout as the user changes it.\nOmit this attribute to disable this feature.\nSet attribute using `auto-save-key`.",
669
- "privacy": "public"
670
- },
671
- {
672
- "kind": "field",
673
- "name": "missingItemPlaceholder",
674
- "description": "Function which is used to generate the placeholder text when a layout is loaded\nwith a missing item.",
675
- "privacy": "public"
676
- },
631
+ "kind": "js",
632
+ "name": "*",
633
+ "declaration": {
634
+ "name": "*",
635
+ "package": "./constants"
636
+ }
637
+ },
638
+ {
639
+ "kind": "js",
640
+ "name": "*",
641
+ "declaration": {
642
+ "name": "*",
643
+ "package": "./error"
644
+ }
645
+ },
646
+ {
647
+ "kind": "js",
648
+ "name": "*",
649
+ "declaration": {
650
+ "name": "*",
651
+ "package": "./events"
652
+ }
653
+ },
654
+ {
655
+ "kind": "js",
656
+ "name": "*",
657
+ "declaration": {
658
+ "name": "*",
659
+ "package": "./factory-registry"
660
+ }
661
+ },
662
+ {
663
+ "kind": "js",
664
+ "name": "*",
665
+ "declaration": {
666
+ "name": "*",
667
+ "package": "./misc"
668
+ }
669
+ },
670
+ {
671
+ "kind": "js",
672
+ "name": "*",
673
+ "declaration": {
674
+ "name": "*",
675
+ "package": "./templates"
676
+ }
677
+ },
678
+ {
679
+ "kind": "js",
680
+ "name": "*",
681
+ "declaration": {
682
+ "name": "*",
683
+ "package": "./popout-events"
684
+ }
685
+ },
686
+ {
687
+ "kind": "js",
688
+ "name": "*",
689
+ "declaration": {
690
+ "name": "*",
691
+ "package": "./types"
692
+ }
693
+ },
694
+ {
695
+ "kind": "js",
696
+ "name": "*",
697
+ "declaration": {
698
+ "name": "*",
699
+ "package": "./error"
700
+ }
701
+ }
702
+ ]
703
+ },
704
+ {
705
+ "kind": "javascript-module",
706
+ "path": "src/utils/logger.ts",
707
+ "declarations": [
708
+ {
709
+ "kind": "variable",
710
+ "name": "logger"
711
+ }
712
+ ],
713
+ "exports": [
714
+ {
715
+ "kind": "js",
716
+ "name": "logger",
717
+ "declaration": {
718
+ "name": "logger",
719
+ "module": "src/utils/logger.ts"
720
+ }
721
+ }
722
+ ]
723
+ },
724
+ {
725
+ "kind": "javascript-module",
726
+ "path": "src/utils/misc.ts",
727
+ "declarations": [],
728
+ "exports": []
729
+ },
730
+ {
731
+ "kind": "javascript-module",
732
+ "path": "src/utils/popout-events.ts",
733
+ "declarations": [
734
+ {
735
+ "kind": "variable",
736
+ "name": "LAYOUT_POPOUT_CHANNEL_NAME",
737
+ "type": {
738
+ "text": "string"
739
+ },
740
+ "default": "'f-layout-popout-channel'",
741
+ "description": "Name of the default broadcast channel used for layout popouts",
742
+ "privacy": "public"
743
+ }
744
+ ],
745
+ "exports": [
746
+ {
747
+ "kind": "js",
748
+ "name": "LAYOUT_POPOUT_CHANNEL_NAME",
749
+ "declaration": {
750
+ "name": "LAYOUT_POPOUT_CHANNEL_NAME",
751
+ "module": "src/utils/popout-events.ts"
752
+ }
753
+ },
754
+ {
755
+ "kind": "js",
756
+ "name": "PopoutGeometry",
757
+ "declaration": {
758
+ "name": "PopoutGeometry",
759
+ "module": "src/utils/popout-events.ts"
760
+ }
761
+ }
762
+ ]
763
+ },
764
+ {
765
+ "kind": "javascript-module",
766
+ "path": "src/utils/templates.ts",
767
+ "declarations": [],
768
+ "exports": []
769
+ },
770
+ {
771
+ "kind": "javascript-module",
772
+ "path": "src/utils/types.ts",
773
+ "declarations": [],
774
+ "exports": []
775
+ },
776
+ {
777
+ "kind": "javascript-module",
778
+ "path": "src/main/index.ts",
779
+ "declarations": [],
780
+ "exports": [
781
+ {
782
+ "kind": "js",
783
+ "name": "FoundationLayoutItem",
784
+ "declaration": {
785
+ "name": "FoundationLayoutItem",
786
+ "module": "./layout-item"
787
+ }
788
+ },
789
+ {
790
+ "kind": "js",
791
+ "name": "FoundationLayoutRegion",
792
+ "declaration": {
793
+ "name": "FoundationLayoutRegion",
794
+ "module": "./layout-region"
795
+ }
796
+ },
797
+ {
798
+ "kind": "js",
799
+ "name": "FoundationLayout",
800
+ "declaration": {
801
+ "name": "FoundationLayout",
802
+ "module": "./layout-main"
803
+ }
804
+ },
805
+ {
806
+ "kind": "js",
807
+ "name": "layoutStyles",
808
+ "declaration": {
809
+ "name": "layoutStyles",
810
+ "module": "./layout-main"
811
+ }
812
+ },
813
+ {
814
+ "kind": "js",
815
+ "name": "layoutTemplate",
816
+ "declaration": {
817
+ "name": "layoutTemplate",
818
+ "module": "./layout-main"
819
+ }
820
+ },
821
+ {
822
+ "kind": "js",
823
+ "name": "*",
824
+ "declaration": {
825
+ "name": "*",
826
+ "package": "./layout-components"
827
+ }
828
+ }
829
+ ]
830
+ },
831
+ {
832
+ "kind": "javascript-module",
833
+ "path": "src/main/layout-components.ts",
834
+ "declarations": [
835
+ {
836
+ "kind": "variable",
837
+ "name": "foundationLayoutComponents",
838
+ "type": {
839
+ "text": "object"
840
+ },
841
+ "default": "{\n foundationLayout,\n foundationLayoutRegion,\n foundationLayoutItem,\n register(container?: Container, ...rest: any[]) {\n if (!container) {\n // preserve backward compatibility with code that loops through\n // the values of this object and calls them as funcs with no args\n return;\n }\n for (const key in this) {\n if (key === 'register') {\n continue;\n }\n this[key]().register(container, ...rest);\n }\n },\n}",
842
+ "description": "Registration object to register the layout with your design system.",
843
+ "privacy": "public"
844
+ }
845
+ ],
846
+ "exports": [
847
+ {
848
+ "kind": "js",
849
+ "name": "foundationLayoutComponents",
850
+ "declaration": {
851
+ "name": "foundationLayoutComponents",
852
+ "module": "src/main/layout-components.ts"
853
+ }
854
+ }
855
+ ]
856
+ },
857
+ {
858
+ "kind": "javascript-module",
859
+ "path": "src/main/layout-item.ts",
860
+ "declarations": [
861
+ {
862
+ "kind": "class",
863
+ "description": "",
864
+ "name": "FoundationLayoutItem",
865
+ "members": [
677
866
  {
678
867
  "kind": "field",
679
- "name": "dimensionsConfig",
868
+ "name": "title",
680
869
  "type": {
681
- "text": "LayoutConfig.Dimensions | undefined"
870
+ "text": "string"
682
871
  },
683
- "description": "Apply dimensions config to the layout, such as setting the size of the drag handles.",
872
+ "description": "Sets the title of the item which is displayed on the tab.",
684
873
  "privacy": "public"
685
874
  },
686
875
  {
687
876
  "kind": "field",
688
- "name": "hasFirstLoaded",
877
+ "name": "closable",
689
878
  "type": {
690
879
  "text": "boolean"
691
880
  },
692
881
  "default": "false",
693
- "description": "Boolean signifies whether the layout has loaded for the first time or not.",
882
+ "description": "Boolean attribute controls whether the window can be closed in the GUI.\nDefaults to `false`.",
694
883
  "privacy": "public"
695
884
  },
696
885
  {
697
886
  "kind": "field",
698
- "name": "customButtons",
887
+ "name": "size",
699
888
  "type": {
700
- "text": "CustomButton[]"
889
+ "text": "string"
701
890
  },
702
- "default": "[]",
703
- "description": "Set custom button definition on this property to add them to the layout header controls",
891
+ "description": "optional string describing the size of the new item (see the written documentation for more info)",
704
892
  "privacy": "public"
705
893
  },
706
894
  {
707
895
  "kind": "field",
708
- "name": "dragging",
896
+ "name": "registration",
709
897
  "type": {
710
- "text": "boolean"
711
- },
712
- "default": "false",
713
- "privacy": "public"
714
- },
715
- {
716
- "kind": "field",
717
- "name": "class",
718
- "privacy": "public",
719
- "default": "'FoundationLayoutMain'",
720
- "type": {
721
- "text": "'FoundationLayoutMain'"
722
- }
723
- },
724
- {
725
- "kind": "field",
726
- "name": "lifecycleUpdateToken",
727
- "type": {
728
- "text": "string | undefined"
729
- },
730
- "privacy": "public",
731
- "default": "undefined",
732
- "description": "Used to calculate whether a layout item should run its lifecycle methods or not"
733
- },
734
- {
735
- "kind": "field",
736
- "name": "popoutConfig",
737
- "type": {
738
- "text": "LayoutPopoutConfig | undefined"
739
- },
740
- "default": "undefined",
741
- "description": "Controls whether popout functionality is enabled on the layout. Defaults to disabled.\nPass an empty object `{}` to use default configurations, or a LayoutPopoutConfig object to further customise."
742
- },
743
- {
744
- "kind": "method",
745
- "name": "layoutRequiredRegistrations",
746
- "static": true,
747
- "return": {
748
- "type": {
749
- "text": ""
750
- }
751
- },
752
- "parameters": [
753
- {
754
- "name": "layout",
755
- "type": {
756
- "text": "SerialisedLayout"
757
- },
758
- "description": "any version of {@link SerialisedLayout}object describing the layout\n * "
759
- }
760
- ],
761
- "description": "JS API, public",
762
- "privacy": "public"
763
- },
764
- {
765
- "kind": "method",
766
- "name": "registeredItems",
767
- "return": {
768
- "type": {
769
- "text": ""
770
- }
771
- },
772
- "privacy": "public"
773
- },
774
- {
775
- "kind": "method",
776
- "name": "getLayout",
777
- "return": {
778
- "type": {
779
- "text": ""
780
- }
781
- },
782
- "privacy": "public"
783
- },
784
- {
785
- "kind": "method",
786
- "name": "tryActivatePopoutMode",
787
- "return": {
788
- "type": {
789
- "text": "boolean"
790
- }
791
- },
792
- "description": "If in a popout window from the dynamic layout, this function will run the flow to put the component in popout mode.\nThis function is automatically called if using the declarative HTML API, but if only using the JavaScript API then you will need to call this function manually."
793
- },
794
- {
795
- "kind": "method",
796
- "name": "tryLoadLayoutFromLocalStorage",
797
- "return": {
798
- "type": {
799
- "text": ""
800
- }
801
- },
802
- "description": "Try to load a layout from local storage, or return false. Only required if manually calling FoundationLayout.registerItem",
803
- "privacy": "public"
804
- },
805
- {
806
- "kind": "method",
807
- "name": "clearAutosaveAndRevertToDefault",
808
- "return": {
809
- "type": {
810
- "text": ""
811
- }
812
- },
813
- "privacy": "public"
814
- },
815
- {
816
- "kind": "method",
817
- "name": "loadLayout",
818
- "parameters": [
819
- {
820
- "name": "layout",
821
- "type": {
822
- "text": "SerialisedLayout"
823
- },
824
- "description": "any version of {@link SerialisedLayout}object describing the layout\n * "
825
- },
826
- {
827
- "name": "handleMissingItem",
828
- "default": "'error'",
829
- "type": {
830
- "text": "'placeholder' | 'error'"
831
- },
832
- "description": "what to do if the layout contains items that are not currently registered with the layout system. Defaults to 'error' which will throw an error. If set to 'placeholder' then any missing items will be replaced with a placeholder element. You can control the text of the placeholder element with {@link FoundationLayout.missingItemPlaceholder}.\n * "
833
- },
834
- {
835
- "name": "disableCache",
836
- "default": "false",
837
- "type": {
838
- "text": "boolean"
839
- },
840
- "description": "if set to true then the layout will give you a new instance of every item, even if it has a currently cached item to use. Using this will not stop you from saving and loading state via the {@link LayoutComponentWithState}interface. Defaults to false.\n * "
841
- }
842
- ],
843
- "privacy": "public"
844
- },
845
- {
846
- "kind": "method",
847
- "name": "addItem",
848
- "parameters": [
849
- {
850
- "name": "config",
851
- "type": {
852
- "text": "RegisteredElementConfig | RegisteredElementConfig[]"
853
- },
854
- "description": "{@link RegisteredElementConfig}configuration items for the new items(s). Pass an array of {@link RegisteredElementConfig}to add multiple items at once.\n * "
855
- },
856
- {
857
- "name": "placement",
858
- "default": "defaultAddItemPlacement",
859
- "type": {
860
- "text": "Placement"
861
- },
862
- "description": "where and how to add the new items to the layout. For more info and defaults see {@link Placement}.\n * "
863
- }
864
- ],
865
- "privacy": "public"
866
- },
867
- {
868
- "kind": "method",
869
- "name": "removeItems",
870
- "return": {
871
- "type": {
872
- "text": ""
873
- }
874
- },
875
- "parameters": [
876
- {
877
- "name": "registration",
878
- "type": {
879
- "text": "string"
880
- },
881
- "description": "string of the registration ID"
882
- },
883
- {
884
- "name": "force",
885
- "default": "false",
886
- "type": {
887
- "text": "boolean"
888
- },
889
- "description": "if set to true then the item will be removed even if it is not closable. Defaults to false, which is the same behaviour as the close button on the header."
890
- }
891
- ],
892
- "privacy": "public"
893
- },
894
- {
895
- "kind": "method",
896
- "name": "registerItem",
897
- "return": {
898
- "type": {
899
- "text": ""
900
- }
898
+ "text": "string"
901
899
  },
902
- "parameters": [
903
- {
904
- "name": "registration",
905
- "type": {
906
- "text": "string"
907
- },
908
- "description": "string of the registration ID"
909
- },
910
- {
911
- "name": "elementsOrFactory",
912
- "type": {
913
- "text": "Element[] | ComponentFactory"
914
- },
915
- "description": "Either Elements[] containing the reference to the elements to register, or a ComponentFactory function"
916
- }
917
- ],
900
+ "description": "Sets the registration name for the item, which can be used later to add the item via the JavaScript API using FoundationLayout.addItem.",
918
901
  "privacy": "public"
919
902
  },
920
- {
921
- "kind": "method",
922
- "name": "updateLifecycleToken",
923
- "privacy": "private",
924
- "return": {
925
- "type": {
926
- "text": "void"
927
- }
928
- },
929
- "description": "The `LifecycleMixin` can use the lifecycleUpdateToken to determine if it needs to gate\nlifecycle methods from running when other items have been added or deleted.\nThis key is updated every time one of these actions are performed, so you can check if the key has changed and know you potentially need to gate some of your lifecycle functionality.\nThis method should be called whenever we are about to perform an action which will cause a lifecycle update, should as adding or removing an item from the layout"
930
- },
931
- {
932
- "kind": "method",
933
- "name": "handleGLRunErrors",
934
- "privacy": "private",
935
- "parameters": [
936
- {
937
- "name": "e",
938
- "type": {
939
- "text": "Error"
940
- }
941
- }
942
- ],
943
- "description": "For specific golden layout errors we can provide better information to the caller. Else re-throw the original error"
944
- },
945
903
  {
946
904
  "kind": "field",
947
905
  "name": "_presentation",
@@ -1054,375 +1012,404 @@
1054
1012
  }
1055
1013
  }
1056
1014
  ],
1057
- "events": [
1058
- {
1059
- "description": "emitted when the layout has finished loading the first time",
1060
- "name": "first-loaded"
1061
- },
1015
+ "attributes": [
1062
1016
  {
1063
- "description": "emitted when an item is added to the layout",
1064
- "name": "item-added"
1017
+ "name": "title",
1018
+ "type": {
1019
+ "text": "string"
1020
+ },
1021
+ "description": "Sets the title of the item which is displayed on the tab.",
1022
+ "fieldName": "title"
1065
1023
  },
1066
1024
  {
1067
- "description": "emitted when an item is removed from the layout",
1068
- "name": "item-removed"
1025
+ "type": {
1026
+ "text": "boolean"
1027
+ },
1028
+ "default": "false",
1029
+ "description": "Boolean attribute controls whether the window can be closed in the GUI.\nDefaults to `false`.",
1030
+ "fieldName": "closable"
1069
1031
  },
1070
1032
  {
1071
- "description": "emitted when the user drags the divider to resize elements",
1072
- "name": "item-resized"
1073
- },
1074
- {
1075
- "description": "emitted on every persisted layout change (add/remove/resize, drag-move, loadLayout, revert-to-default, autosave request); use this to mirror the layout without missing any change",
1076
- "name": "state-changed"
1077
- }
1078
- ],
1079
- "attributes": [
1080
- {
1081
- "name": "reload-buffer",
1033
+ "name": "size",
1082
1034
  "type": {
1083
- "text": "number"
1084
- },
1085
- "default": "DEFAULT_RELOAD_BUFFER",
1086
- "description": "Number describing how long to wait in ms before reloading the config when adding items\ndeclaratively by the html API. Default 500 (ms).",
1087
- "resolveInitializer": {
1088
- "module": "/src/utils"
1035
+ "text": "string"
1089
1036
  },
1090
- "fieldName": "reloadBuffer"
1037
+ "description": "optional string describing the size of the new item (see the written documentation for more info)",
1038
+ "fieldName": "size"
1091
1039
  },
1092
1040
  {
1093
- "name": "auto-save-key",
1041
+ "name": "registration",
1094
1042
  "type": {
1095
- "text": "string | undefined"
1043
+ "text": "string"
1096
1044
  },
1097
- "description": "Attribute which if set will auto save and load the layout as the user changes it.\nOmit this attribute to disable this feature.\nSet attribute using `auto-save-key`.",
1098
- "fieldName": "autoSaveKey"
1045
+ "description": "Sets the registration name for the item, which can be used later to add the item via the JavaScript API using FoundationLayout.addItem.",
1046
+ "fieldName": "registration"
1099
1047
  }
1100
1048
  ],
1101
1049
  "superclass": {
1102
1050
  "name": "FoundationElement",
1103
1051
  "package": "@microsoft/fast-foundation"
1104
1052
  },
1105
- "tagName": "%%prefix%%-layout",
1053
+ "tagName": "%%prefix%%-layout-item",
1106
1054
  "customElement": true
1107
- },
1108
- {
1109
- "kind": "variable",
1110
- "name": "layoutTemplate",
1111
- "default": "html<FoundationLayout>`\n <template>\n ${when(\n (x) => Boolean(x.popoutConfig),\n html<FoundationLayout>`\n <foundation-layout-popout-controller\n ${ref('popoutController')}\n :parentLayout=\"${(x) => x}\"\n channel-name=\"${(x) => x.popoutConfig?.channelName}\"\n ></foundation-layout-popout-controller>\n `,\n )}\n ${when((x) => !x.hasFirstLoaded && x.usingDeclerativeAPI, loadingTemplate)}\n <div class=\"layout-container\" ${ref('layoutElement')}></div>\n </template>\n`",
1112
- "description": "`ViewTemplate` which defines the html for FoundationLayout.",
1113
- "privacy": "public"
1114
1055
  }
1115
1056
  ],
1116
1057
  "exports": [
1117
1058
  {
1118
1059
  "kind": "js",
1119
- "name": "layoutStyles",
1120
- "declaration": {
1121
- "name": "layoutStyles",
1122
- "module": "../styles"
1123
- }
1124
- },
1125
- {
1126
- "kind": "js",
1127
- "name": "FoundationLayout",
1128
- "declaration": {
1129
- "name": "FoundationLayout",
1130
- "module": "src/main/layout-main.ts"
1131
- }
1132
- },
1133
- {
1134
- "kind": "js",
1135
- "name": "layoutTemplate",
1060
+ "name": "FoundationLayoutItem",
1136
1061
  "declaration": {
1137
- "name": "layoutTemplate",
1138
- "module": "src/main/layout-main.ts"
1062
+ "name": "FoundationLayoutItem",
1063
+ "module": "src/main/layout-item.ts"
1139
1064
  }
1140
1065
  }
1141
1066
  ]
1142
1067
  },
1143
1068
  {
1144
1069
  "kind": "javascript-module",
1145
- "path": "src/main/layout-popout-controller.ts",
1070
+ "path": "src/main/layout-main.ts",
1146
1071
  "declarations": [
1147
1072
  {
1148
1073
  "kind": "class",
1149
1074
  "description": "",
1150
- "name": "FoundationLayoutPopoutController",
1075
+ "name": "FoundationLayout",
1151
1076
  "members": [
1152
1077
  {
1153
1078
  "kind": "field",
1154
- "name": "channelName",
1079
+ "name": "layout",
1155
1080
  "type": {
1156
- "text": "string"
1157
- }
1081
+ "text": "GoldenLayout"
1082
+ },
1083
+ "privacy": "private"
1158
1084
  },
1159
1085
  {
1160
1086
  "kind": "field",
1161
- "name": "layoutKey",
1087
+ "name": "layoutConfig",
1162
1088
  "type": {
1163
- "text": "string"
1089
+ "text": "LayoutConfig"
1164
1090
  },
1165
- "privacy": "private"
1091
+ "privacy": "private",
1092
+ "default": "{ root: undefined }"
1166
1093
  },
1167
1094
  {
1168
1095
  "kind": "field",
1169
- "name": "channel",
1096
+ "name": "defaultLayoutConfig",
1170
1097
  "type": {
1171
- "text": "TypedBroadcastChannel<LayoutPopoutEvents>"
1098
+ "text": "LayoutConfig"
1172
1099
  },
1173
- "privacy": "private"
1100
+ "privacy": "private",
1101
+ "default": "{ root: undefined }"
1174
1102
  },
1175
1103
  {
1176
1104
  "kind": "field",
1177
- "name": "pollInterval",
1105
+ "name": "reloadBuffer",
1178
1106
  "type": {
1179
- "text": "any"
1107
+ "text": "number"
1180
1108
  },
1181
- "privacy": "private"
1109
+ "default": "DEFAULT_RELOAD_BUFFER",
1110
+ "description": "Number describing how long to wait in ms before reloading the config when adding items\ndeclaratively by the html API. Default 500 (ms).",
1111
+ "privacy": "public"
1182
1112
  },
1183
1113
  {
1184
1114
  "kind": "field",
1185
- "name": "unloadHandler",
1115
+ "name": "reloadPending",
1186
1116
  "type": {
1187
- "text": "() => void"
1117
+ "text": "boolean"
1188
1118
  },
1189
- "privacy": "private"
1119
+ "privacy": "private",
1120
+ "default": "false"
1190
1121
  },
1191
1122
  {
1192
1123
  "kind": "field",
1193
- "name": "lastUpdate",
1124
+ "name": "registeredComponents",
1194
1125
  "type": {
1195
- "text": "string"
1126
+ "text": "number"
1196
1127
  },
1197
- "privacy": "private"
1128
+ "privacy": "private",
1129
+ "default": "0"
1198
1130
  },
1199
1131
  {
1200
1132
  "kind": "field",
1201
- "name": "popoutRegistry",
1133
+ "name": "autoSaveKey",
1202
1134
  "type": {
1203
- "text": "Map<\n string,\n { geometry: PopoutGeometry; state?: unknown; window?: Window }\n >"
1135
+ "text": "string | undefined"
1204
1136
  },
1205
- "privacy": "private",
1206
- "default": "new Map()"
1137
+ "description": "Attribute which if set will auto save and load the layout as the user changes it.\nOmit this attribute to disable this feature.\nSet attribute using `auto-save-key`.",
1138
+ "privacy": "public"
1207
1139
  },
1208
1140
  {
1209
- "kind": "method",
1210
- "name": "setupChannel",
1211
- "privacy": "private"
1141
+ "kind": "field",
1142
+ "name": "missingItemPlaceholder",
1143
+ "description": "Function which is used to generate the placeholder text when a layout is loaded\nwith a missing item.",
1144
+ "privacy": "public"
1212
1145
  },
1213
1146
  {
1214
- "kind": "method",
1215
- "name": "setupListener",
1216
- "privacy": "private"
1147
+ "kind": "field",
1148
+ "name": "dimensionsConfig",
1149
+ "type": {
1150
+ "text": "LayoutConfig.Dimensions | undefined"
1151
+ },
1152
+ "description": "Apply dimensions config to the layout, such as setting the size of the drag handles.",
1153
+ "privacy": "public"
1217
1154
  },
1218
1155
  {
1219
- "kind": "method",
1220
- "name": "applyStateToParent",
1221
- "privacy": "private",
1222
- "parameters": [
1223
- {
1224
- "name": "state",
1225
- "type": {
1226
- "text": "unknown"
1227
- }
1228
- }
1229
- ]
1156
+ "kind": "field",
1157
+ "name": "hasFirstLoaded",
1158
+ "type": {
1159
+ "text": "boolean"
1160
+ },
1161
+ "default": "false",
1162
+ "description": "Boolean signifies whether the layout has loaded for the first time or not.",
1163
+ "privacy": "public"
1230
1164
  },
1231
1165
  {
1232
- "kind": "method",
1233
- "name": "setupUnloadListener",
1234
- "privacy": "private"
1166
+ "kind": "field",
1167
+ "name": "customButtons",
1168
+ "type": {
1169
+ "text": "CustomButton[]"
1170
+ },
1171
+ "default": "[]",
1172
+ "description": "Set custom button definition on this property to add them to the layout header controls",
1173
+ "privacy": "public"
1235
1174
  },
1236
1175
  {
1237
- "kind": "method",
1238
- "name": "teardownUnloadListener",
1239
- "privacy": "private"
1176
+ "kind": "field",
1177
+ "name": "dragging",
1178
+ "type": {
1179
+ "text": "boolean"
1180
+ },
1181
+ "default": "false",
1182
+ "privacy": "public"
1240
1183
  },
1241
1184
  {
1242
- "kind": "method",
1243
- "name": "emitAutosave",
1244
- "privacy": "private"
1185
+ "kind": "field",
1186
+ "name": "class",
1187
+ "privacy": "public",
1188
+ "default": "'FoundationLayoutMain'",
1189
+ "type": {
1190
+ "text": "'FoundationLayoutMain'"
1191
+ }
1245
1192
  },
1246
1193
  {
1247
- "kind": "method",
1248
- "name": "startPolling",
1249
- "privacy": "private"
1194
+ "kind": "field",
1195
+ "name": "lifecycleUpdateToken",
1196
+ "type": {
1197
+ "text": "string | undefined"
1198
+ },
1199
+ "privacy": "public",
1200
+ "default": "undefined",
1201
+ "description": "Used to calculate whether a layout item should run its lifecycle methods or not"
1250
1202
  },
1251
1203
  {
1252
- "kind": "method",
1253
- "name": "stopPolling",
1254
- "privacy": "private"
1204
+ "kind": "field",
1205
+ "name": "popoutConfig",
1206
+ "type": {
1207
+ "text": "LayoutPopoutConfig | undefined"
1208
+ },
1209
+ "default": "undefined",
1210
+ "description": "Controls whether popout functionality is enabled on the layout. Defaults to disabled.\nPass an empty object `{}` to use default configurations, or a LayoutPopoutConfig object to further customise."
1255
1211
  },
1256
1212
  {
1257
1213
  "kind": "method",
1258
- "name": "getGeometry",
1259
- "privacy": "private",
1214
+ "name": "layoutRequiredRegistrations",
1215
+ "static": true,
1260
1216
  "return": {
1261
1217
  "type": {
1262
- "text": "Promise<PopoutGeometry>"
1218
+ "text": ""
1263
1219
  }
1264
- }
1220
+ },
1221
+ "parameters": [
1222
+ {
1223
+ "name": "layout",
1224
+ "type": {
1225
+ "text": "SerialisedLayout"
1226
+ },
1227
+ "description": "any version of {@link SerialisedLayout}object describing the layout\n * "
1228
+ }
1229
+ ],
1230
+ "description": "JS API, public",
1231
+ "privacy": "public"
1265
1232
  },
1266
1233
  {
1267
1234
  "kind": "method",
1268
- "name": "getComponentState",
1269
- "privacy": "private",
1235
+ "name": "registeredItems",
1270
1236
  "return": {
1271
1237
  "type": {
1272
- "text": "unknown"
1238
+ "text": ""
1273
1239
  }
1274
- }
1240
+ },
1241
+ "privacy": "public"
1275
1242
  },
1276
1243
  {
1277
1244
  "kind": "method",
1278
- "name": "broadcastUpdate",
1279
- "privacy": "private",
1280
- "parameters": [
1281
- {
1282
- "name": "geometry",
1283
- "type": {
1284
- "text": "PopoutGeometry"
1285
- }
1286
- },
1287
- {
1288
- "name": "state",
1289
- "optional": true,
1290
- "type": {
1291
- "text": "unknown"
1292
- }
1245
+ "name": "getLayout",
1246
+ "return": {
1247
+ "type": {
1248
+ "text": ""
1293
1249
  }
1294
- ]
1250
+ },
1251
+ "privacy": "public"
1295
1252
  },
1296
1253
  {
1297
1254
  "kind": "method",
1298
- "name": "openPopout",
1299
- "privacy": "public",
1300
- "parameters": [
1301
- {
1302
- "name": "registration",
1255
+ "name": "tryActivatePopoutMode",
1256
+ "return": {
1257
+ "type": {
1258
+ "text": "boolean"
1259
+ }
1260
+ },
1261
+ "description": "If in a popout window from the dynamic layout, this function will run the flow to put the component in popout mode.\nThis function is automatically called if using the declarative HTML API, but if only using the JavaScript API then you will need to call this function manually."
1262
+ },
1263
+ {
1264
+ "kind": "method",
1265
+ "name": "tryLoadLayoutFromLocalStorage",
1266
+ "return": {
1267
+ "type": {
1268
+ "text": ""
1269
+ }
1270
+ },
1271
+ "description": "Try to load a layout from local storage, or return false. Only required if manually calling FoundationLayout.registerItem",
1272
+ "privacy": "public"
1273
+ },
1274
+ {
1275
+ "kind": "method",
1276
+ "name": "clearAutosaveAndRevertToDefault",
1277
+ "return": {
1278
+ "type": {
1279
+ "text": ""
1280
+ }
1281
+ },
1282
+ "privacy": "public"
1283
+ },
1284
+ {
1285
+ "kind": "method",
1286
+ "name": "loadLayout",
1287
+ "parameters": [
1288
+ {
1289
+ "name": "layout",
1303
1290
  "type": {
1304
- "text": "string"
1291
+ "text": "SerialisedLayout"
1305
1292
  },
1306
- "description": "The registration ID of the component to pop out."
1293
+ "description": "any version of {@link SerialisedLayout}object describing the layout\n * "
1307
1294
  },
1308
1295
  {
1309
- "name": "popoutState",
1310
- "optional": true,
1296
+ "name": "handleMissingItem",
1297
+ "default": "'error'",
1311
1298
  "type": {
1312
- "text": "PopoutState"
1299
+ "text": "'placeholder' | 'error'"
1313
1300
  },
1314
- "description": "Optional state (geometry and component state) to use for the new window."
1301
+ "description": "what to do if the layout contains items that are not currently registered with the layout system. Defaults to 'error' which will throw an error. If set to 'placeholder' then any missing items will be replaced with a placeholder element. You can control the text of the placeholder element with {@link FoundationLayout.missingItemPlaceholder}.\n * "
1315
1302
  },
1316
1303
  {
1317
- "name": "uuid",
1318
- "optional": true,
1304
+ "name": "disableCache",
1305
+ "default": "false",
1319
1306
  "type": {
1320
- "text": "any"
1307
+ "text": "boolean"
1321
1308
  },
1322
- "description": "UUID generator from parent layout"
1309
+ "description": "if set to true then the layout will give you a new instance of every item, even if it has a currently cached item to use. Using this will not stop you from saving and loading state via the {@link LayoutComponentWithState}interface. Defaults to false.\n * "
1323
1310
  }
1324
1311
  ],
1325
- "description": "Opens a component in a popout window."
1312
+ "privacy": "public"
1326
1313
  },
1327
1314
  {
1328
1315
  "kind": "method",
1329
- "name": "getRegistry",
1330
- "privacy": "public",
1331
- "return": {
1332
- "type": {
1333
- "text": "{ [layoutKey: string]: PopoutState }"
1316
+ "name": "addItem",
1317
+ "parameters": [
1318
+ {
1319
+ "name": "config",
1320
+ "type": {
1321
+ "text": "RegisteredElementConfig | RegisteredElementConfig[]"
1322
+ },
1323
+ "description": "{@link RegisteredElementConfig}configuration items for the new items(s). Pass an array of {@link RegisteredElementConfig}to add multiple items at once.\n * "
1324
+ },
1325
+ {
1326
+ "name": "placement",
1327
+ "default": "defaultAddItemPlacement",
1328
+ "type": {
1329
+ "text": "Placement"
1330
+ },
1331
+ "description": "where and how to add the new items to the layout. For more info and defaults see {@link Placement}.\n * "
1334
1332
  }
1335
- }
1333
+ ],
1334
+ "privacy": "public"
1336
1335
  },
1337
1336
  {
1338
1337
  "kind": "method",
1339
- "name": "restorePopouts",
1340
- "privacy": "public",
1338
+ "name": "removeItems",
1339
+ "return": {
1340
+ "type": {
1341
+ "text": ""
1342
+ }
1343
+ },
1341
1344
  "parameters": [
1342
1345
  {
1343
- "name": "registry",
1346
+ "name": "registration",
1344
1347
  "type": {
1345
- "text": "{ [layoutKey: string]: PopoutState }"
1346
- }
1348
+ "text": "string"
1349
+ },
1350
+ "description": "string of the registration ID"
1347
1351
  },
1348
1352
  {
1349
- "name": "uuid",
1353
+ "name": "force",
1354
+ "default": "false",
1350
1355
  "type": {
1351
- "text": "any"
1352
- }
1356
+ "text": "boolean"
1357
+ },
1358
+ "description": "if set to true then the item will be removed even if it is not closable. Defaults to false, which is the same behaviour as the close button on the header."
1353
1359
  }
1354
1360
  ],
1355
- "description": "Restores popouts from a registry"
1361
+ "privacy": "public"
1356
1362
  },
1357
1363
  {
1358
1364
  "kind": "method",
1359
- "name": "closeAllPopouts",
1360
- "privacy": "public"
1361
- }
1362
- ],
1363
- "attributes": [
1364
- {
1365
- "name": "channel-name",
1366
- "type": {
1367
- "text": "string"
1368
- },
1369
- "fieldName": "channelName"
1370
- }
1371
- ],
1372
- "superclass": {
1373
- "name": "FASTElement",
1374
- "package": "@microsoft/fast-element"
1375
- },
1376
- "tagName": "foundation-layout-popout-controller",
1377
- "customElement": true
1378
- }
1379
- ],
1380
- "exports": [
1381
- {
1382
- "kind": "js",
1383
- "name": "FoundationLayoutPopoutController",
1384
- "declaration": {
1385
- "name": "FoundationLayoutPopoutController",
1386
- "module": "src/main/layout-popout-controller.ts"
1387
- }
1388
- },
1389
- {
1390
- "kind": "custom-element-definition",
1391
- "name": "foundation-layout-popout-controller",
1392
- "declaration": {
1393
- "name": "FoundationLayoutPopoutController",
1394
- "module": "src/main/layout-popout-controller.ts"
1395
- }
1396
- }
1397
- ]
1398
- },
1399
- {
1400
- "kind": "javascript-module",
1401
- "path": "src/main/layout-region.ts",
1402
- "declarations": [
1403
- {
1404
- "kind": "class",
1405
- "description": "",
1406
- "name": "FoundationLayoutRegion",
1407
- "members": [
1408
- {
1409
- "kind": "field",
1410
- "name": "size",
1411
- "type": {
1412
- "text": "string"
1365
+ "name": "registerItem",
1366
+ "return": {
1367
+ "type": {
1368
+ "text": ""
1369
+ }
1413
1370
  },
1414
- "description": "optional string describing the size of the new item (see the written documentation for more info)",
1371
+ "parameters": [
1372
+ {
1373
+ "name": "registration",
1374
+ "type": {
1375
+ "text": "string"
1376
+ },
1377
+ "description": "string of the registration ID"
1378
+ },
1379
+ {
1380
+ "name": "elementsOrFactory",
1381
+ "type": {
1382
+ "text": "Element[] | ComponentFactory"
1383
+ },
1384
+ "description": "Either Elements[] containing the reference to the elements to register, or a ComponentFactory function"
1385
+ }
1386
+ ],
1415
1387
  "privacy": "public"
1416
1388
  },
1417
1389
  {
1418
- "kind": "field",
1419
- "name": "type",
1420
- "type": {
1421
- "text": "LayoutRegionType"
1390
+ "kind": "method",
1391
+ "name": "updateLifecycleToken",
1392
+ "privacy": "private",
1393
+ "return": {
1394
+ "type": {
1395
+ "text": "void"
1396
+ }
1422
1397
  },
1423
- "default": "layoutRegionValue[0]",
1424
- "description": "Defines the LayoutRegionType| type of the region.\nDefaults to `horizontal`.",
1425
- "privacy": "public"
1398
+ "description": "The `LifecycleMixin` can use the lifecycleUpdateToken to determine if it needs to gate\nlifecycle methods from running when other items have been added or deleted.\nThis key is updated every time one of these actions are performed, so you can check if the key has changed and know you potentially need to gate some of your lifecycle functionality.\nThis method should be called whenever we are about to perform an action which will cause a lifecycle update, should as adding or removing an item from the layout"
1399
+ },
1400
+ {
1401
+ "kind": "method",
1402
+ "name": "handleGLRunErrors",
1403
+ "privacy": "private",
1404
+ "parameters": [
1405
+ {
1406
+ "name": "e",
1407
+ "type": {
1408
+ "text": "Error"
1409
+ }
1410
+ }
1411
+ ],
1412
+ "description": "For specific golden layout errors we can provide better information to the caller. Else re-throw the original error"
1426
1413
  },
1427
1414
  {
1428
1415
  "kind": "field",
@@ -1536,532 +1523,528 @@
1536
1523
  }
1537
1524
  }
1538
1525
  ],
1526
+ "events": [
1527
+ {
1528
+ "description": "emitted when the layout has finished loading the first time",
1529
+ "name": "first-loaded"
1530
+ },
1531
+ {
1532
+ "description": "emitted when an item is added to the layout",
1533
+ "name": "item-added"
1534
+ },
1535
+ {
1536
+ "description": "emitted when an item is removed from the layout",
1537
+ "name": "item-removed"
1538
+ },
1539
+ {
1540
+ "description": "emitted when the user drags the divider to resize elements",
1541
+ "name": "item-resized"
1542
+ },
1543
+ {
1544
+ "description": "emitted on every persisted layout change (add/remove/resize, drag-move, loadLayout, revert-to-default, autosave request); use this to mirror the layout without missing any change",
1545
+ "name": "state-changed"
1546
+ }
1547
+ ],
1539
1548
  "attributes": [
1540
1549
  {
1541
- "name": "size",
1550
+ "name": "reload-buffer",
1542
1551
  "type": {
1543
- "text": "string"
1552
+ "text": "number"
1544
1553
  },
1545
- "description": "optional string describing the size of the new item (see the written documentation for more info)",
1546
- "fieldName": "size"
1554
+ "default": "DEFAULT_RELOAD_BUFFER",
1555
+ "description": "Number describing how long to wait in ms before reloading the config when adding items\ndeclaratively by the html API. Default 500 (ms).",
1556
+ "resolveInitializer": {
1557
+ "module": "/src/utils"
1558
+ },
1559
+ "fieldName": "reloadBuffer"
1547
1560
  },
1548
1561
  {
1549
- "name": "type",
1562
+ "name": "auto-save-key",
1550
1563
  "type": {
1551
- "text": "LayoutRegionType"
1552
- },
1553
- "default": "defaultLayoutType",
1554
- "description": "Defines the LayoutRegionType| type of the region.\nDefaults to `horizontal`.",
1555
- "resolveInitializer": {
1556
- "module": "src/main/layout-region.ts"
1564
+ "text": "string | undefined"
1557
1565
  },
1558
- "fieldName": "type"
1566
+ "description": "Attribute which if set will auto save and load the layout as the user changes it.\nOmit this attribute to disable this feature.\nSet attribute using `auto-save-key`.",
1567
+ "fieldName": "autoSaveKey"
1559
1568
  }
1560
1569
  ],
1561
1570
  "superclass": {
1562
1571
  "name": "FoundationElement",
1563
1572
  "package": "@microsoft/fast-foundation"
1564
1573
  },
1565
- "tagName": "%%prefix%%-layout-region",
1574
+ "tagName": "%%prefix%%-layout",
1566
1575
  "customElement": true
1567
- }
1568
- ],
1569
- "exports": [
1570
- {
1571
- "kind": "js",
1572
- "name": "FoundationLayoutRegion",
1573
- "declaration": {
1574
- "name": "FoundationLayoutRegion",
1575
- "module": "src/main/layout-region.ts"
1576
- }
1577
- }
1578
- ]
1579
- },
1580
- {
1581
- "kind": "javascript-module",
1582
- "path": "src/utils/constants.ts",
1583
- "declarations": [
1584
- {
1585
- "kind": "variable",
1586
- "name": "DEFAULT_RELOAD_BUFFER",
1587
- "type": {
1588
- "text": "number"
1589
- },
1590
- "default": "500",
1591
- "description": "Default time in milliseconds for the layout to buffer calls to reloading\nthe layout while the declarative API is loading.\n\nDuring the first load of the layout, a loading spinner will be shown.",
1592
- "privacy": "public"
1593
- },
1594
- {
1595
- "kind": "variable",
1596
- "name": "LAYOUT_POPOUT_CONTROL_KEY",
1597
- "type": {
1598
- "text": "string"
1599
- },
1600
- "default": "'f-layout-key'",
1601
- "description": "Key to be used for controlling popout behaviour"
1602
- },
1603
- {
1604
- "kind": "variable",
1605
- "name": "POPOUT_GEOMETRY_BROADCAST_INTERVAL",
1606
- "type": {
1607
- "text": "number"
1608
- },
1609
- "default": "1000",
1610
- "description": "How often a popout window should check to broadcast its\ngeometry"
1611
- },
1612
- {
1613
- "kind": "variable",
1614
- "name": "LAYOUT_POPOUT_CONTAINER_CLASS",
1615
- "type": {
1616
- "text": "string"
1617
- },
1618
- "default": "'f-layout-popout'",
1619
- "description": "Put this classname on an element which is a DOM parent of the layout, and\nif the layout goes into popout mode then it will place itself as the only child\nfor the popout container you set."
1620
- },
1621
- {
1622
- "kind": "variable",
1623
- "name": "DEFAULT_TAB_HEIGHT",
1624
- "type": {
1625
- "text": "string"
1626
- },
1627
- "default": "'32px'"
1628
1576
  },
1629
1577
  {
1630
1578
  "kind": "variable",
1631
- "name": "DEFAULT_TAB_HEIGHT_MULTIPLIER",
1632
- "type": {
1633
- "text": "number"
1634
- },
1635
- "default": "9",
1636
- "description": "Default height multiplier for layout tab strips: 9 → 32px, a step above the 28px control height.\nKept separate from `--base-height-multiplier` so panel contents aren't resized with the strip."
1637
- },
1638
- {
1639
- "kind": "function",
1640
- "name": "getLayoutHeaderHeight"
1641
- },
1642
- {
1643
- "kind": "variable",
1644
- "name": "DEFAULT_BORDER_WIDTH",
1645
- "type": {
1646
- "text": "number"
1647
- },
1648
- "default": "0"
1649
- },
1650
- {
1651
- "kind": "function",
1652
- "name": "getItemBorderWidth"
1579
+ "name": "layoutTemplate",
1580
+ "default": "html<FoundationLayout>`\n <template>\n ${when(\n (x) => Boolean(x.popoutConfig),\n html<FoundationLayout>`\n <foundation-layout-popout-controller\n ${ref('popoutController')}\n :parentLayout=\"${(x) => x}\"\n channel-name=\"${(x) => x.popoutConfig?.channelName}\"\n ></foundation-layout-popout-controller>\n `,\n )}\n ${when((x) => !x.hasFirstLoaded && x.usingDeclerativeAPI, loadingTemplate)}\n <div class=\"layout-container\" ${ref('layoutElement')}></div>\n </template>\n`",
1581
+ "description": "`ViewTemplate` which defines the html for FoundationLayout.",
1582
+ "privacy": "public"
1653
1583
  }
1654
1584
  ],
1655
1585
  "exports": [
1656
1586
  {
1657
1587
  "kind": "js",
1658
- "name": "DEFAULT_RELOAD_BUFFER",
1659
- "declaration": {
1660
- "name": "DEFAULT_RELOAD_BUFFER",
1661
- "module": "src/utils/constants.ts"
1662
- }
1663
- },
1664
- {
1665
- "kind": "js",
1666
- "name": "LAYOUT_POPOUT_CONTROL_KEY",
1667
- "declaration": {
1668
- "name": "LAYOUT_POPOUT_CONTROL_KEY",
1669
- "module": "src/utils/constants.ts"
1670
- }
1671
- },
1672
- {
1673
- "kind": "js",
1674
- "name": "POPOUT_GEOMETRY_BROADCAST_INTERVAL",
1675
- "declaration": {
1676
- "name": "POPOUT_GEOMETRY_BROADCAST_INTERVAL",
1677
- "module": "src/utils/constants.ts"
1678
- }
1679
- },
1680
- {
1681
- "kind": "js",
1682
- "name": "LAYOUT_POPOUT_CONTAINER_CLASS",
1683
- "declaration": {
1684
- "name": "LAYOUT_POPOUT_CONTAINER_CLASS",
1685
- "module": "src/utils/constants.ts"
1686
- }
1687
- },
1688
- {
1689
- "kind": "js",
1690
- "name": "DEFAULT_TAB_HEIGHT",
1691
- "declaration": {
1692
- "name": "DEFAULT_TAB_HEIGHT",
1693
- "module": "src/utils/constants.ts"
1694
- }
1695
- },
1696
- {
1697
- "kind": "js",
1698
- "name": "DEFAULT_TAB_HEIGHT_MULTIPLIER",
1699
- "declaration": {
1700
- "name": "DEFAULT_TAB_HEIGHT_MULTIPLIER",
1701
- "module": "src/utils/constants.ts"
1702
- }
1703
- },
1704
- {
1705
- "kind": "js",
1706
- "name": "getLayoutHeaderHeight",
1588
+ "name": "layoutStyles",
1707
1589
  "declaration": {
1708
- "name": "getLayoutHeaderHeight",
1709
- "module": "src/utils/constants.ts"
1590
+ "name": "layoutStyles",
1591
+ "module": "../styles"
1710
1592
  }
1711
1593
  },
1712
1594
  {
1713
1595
  "kind": "js",
1714
- "name": "DEFAULT_BORDER_WIDTH",
1596
+ "name": "FoundationLayout",
1715
1597
  "declaration": {
1716
- "name": "DEFAULT_BORDER_WIDTH",
1717
- "module": "src/utils/constants.ts"
1598
+ "name": "FoundationLayout",
1599
+ "module": "src/main/layout-main.ts"
1718
1600
  }
1719
1601
  },
1720
1602
  {
1721
1603
  "kind": "js",
1722
- "name": "getItemBorderWidth",
1604
+ "name": "layoutTemplate",
1723
1605
  "declaration": {
1724
- "name": "getItemBorderWidth",
1725
- "module": "src/utils/constants.ts"
1606
+ "name": "layoutTemplate",
1607
+ "module": "src/main/layout-main.ts"
1726
1608
  }
1727
1609
  }
1728
1610
  ]
1729
1611
  },
1730
1612
  {
1731
1613
  "kind": "javascript-module",
1732
- "path": "src/utils/error.ts",
1614
+ "path": "src/main/layout-popout-controller.ts",
1733
1615
  "declarations": [
1734
1616
  {
1735
1617
  "kind": "class",
1736
1618
  "description": "",
1737
- "name": "LayoutUsageError",
1738
- "superclass": {
1739
- "name": "Error",
1740
- "module": "src/utils/error.ts"
1741
- }
1742
- },
1743
- {
1744
- "kind": "class",
1745
- "description": "",
1746
- "name": "LayoutRegistrationError",
1747
- "superclass": {
1748
- "name": "Error",
1749
- "module": "src/utils/error.ts"
1750
- }
1751
- }
1752
- ],
1753
- "exports": [
1754
- {
1755
- "kind": "js",
1756
- "name": "LayoutUsageError",
1757
- "declaration": {
1758
- "name": "LayoutUsageError",
1759
- "module": "src/utils/error.ts"
1760
- }
1761
- },
1762
- {
1763
- "kind": "js",
1764
- "name": "LayoutRegistrationError",
1765
- "declaration": {
1766
- "name": "LayoutRegistrationError",
1767
- "module": "src/utils/error.ts"
1768
- }
1769
- }
1770
- ]
1771
- },
1772
- {
1773
- "kind": "javascript-module",
1774
- "path": "src/utils/events.ts",
1775
- "declarations": [
1776
- {
1777
- "kind": "variable",
1778
- "name": "LayoutEmitEvents",
1779
- "type": {
1780
- "text": "{\n firstLoaded: 'first-loaded',\n itemAdded: 'item-added',\n itemRemoved: 'item-removed',\n itemResized: 'item-resized',\n stateChanged: 'state-changed',\n}"
1781
- },
1782
- "default": "{\n firstLoaded: 'first-loaded',\n itemAdded: 'item-added',\n itemRemoved: 'item-removed',\n itemResized: 'item-resized',\n stateChanged: 'state-changed',\n}",
1783
- "description": "Defines events that the layout system emits\n\n'firstLoaded' - emitted when the layout has finished loading the first time\nusing the declarative API after DEFAULT_RELOAD_BUFFER ms.\n<br/>\n'itemAdded' - emitted when an item is added to the layout'\n<br/>\n'itemRemoved' - emitted when an item is removed from the layout'\n<br/>\n'itemResized' - emitted when the user drags the divider to resize elements\n<br/>\n'stateChanged' - emitted on every persisted layout change. This is the broadest\nevent: it fires wherever the layout caches/saves its state, which includes item\nadd/remove/resize but ALSO the changes the granular events miss — dragging a pane\nto a new position, loading a whole layout via FoundationLayout.loadLayout,\nreverting to the default, and contained-item autosave requests. Prefer this when\nyou need to mirror the layout to your own store and must not miss any change.",
1784
- "privacy": "public"
1785
- },
1786
- {
1787
- "kind": "variable",
1788
- "name": "LayoutReceiveEvents",
1789
- "type": {
1790
- "text": "{\n changeTitle: 'change-title',\n autosave: 'autosave',\n}"
1791
- },
1792
- "default": "{\n changeTitle: 'change-title',\n autosave: 'autosave',\n}",
1793
- "description": "Defines events that the layout system listens for\n\n'changeTitle' - emit this from a contained item to update the title of the window that contains it.\n'autosave' - emit this from a contained item to hint to the layout system that it should autosave the layout. A contained item should do this if it has just changed some state it would like to persist. See LayoutComponentWithState.",
1794
- "privacy": "public"
1795
- }
1796
- ],
1797
- "exports": [
1798
- {
1799
- "kind": "js",
1800
- "name": "LayoutEmitEvents",
1801
- "declaration": {
1802
- "name": "LayoutEmitEvents",
1803
- "module": "src/utils/events.ts"
1804
- }
1805
- },
1806
- {
1807
- "kind": "js",
1808
- "name": "LayoutReceiveEvents",
1809
- "declaration": {
1810
- "name": "LayoutReceiveEvents",
1811
- "module": "src/utils/events.ts"
1812
- }
1813
- }
1814
- ]
1815
- },
1816
- {
1817
- "kind": "javascript-module",
1818
- "path": "src/utils/factory-registry.ts",
1819
- "declarations": [
1820
- {
1821
- "kind": "function",
1822
- "name": "registerFactory",
1823
- "return": {
1824
- "type": {
1825
- "text": "void"
1826
- }
1827
- },
1828
- "parameters": [
1619
+ "name": "FoundationLayoutPopoutController",
1620
+ "members": [
1829
1621
  {
1830
- "name": "key",
1622
+ "kind": "field",
1623
+ "name": "channelName",
1831
1624
  "type": {
1832
1625
  "text": "string"
1833
- },
1834
- "description": "Unique identifier for the factory. Should be descriptive and unique across the application."
1626
+ }
1835
1627
  },
1836
1628
  {
1837
- "name": "factory",
1629
+ "kind": "field",
1630
+ "name": "layoutKey",
1838
1631
  "type": {
1839
- "text": "ComponentFactory"
1632
+ "text": "string"
1840
1633
  },
1841
- "description": "The factory function that creates the component."
1842
- }
1843
- ],
1844
- "description": "Registers a factory function with a unique key.\nThis allows framework components to be used in the declarative layout API\nwithout needing to pass function references through HTML attributes.",
1845
- "privacy": "public"
1846
- },
1847
- {
1848
- "kind": "function",
1849
- "name": "getFactory",
1850
- "return": {
1851
- "type": {
1852
- "text": ""
1853
- }
1854
- },
1855
- "parameters": [
1634
+ "privacy": "private"
1635
+ },
1856
1636
  {
1857
- "name": "key",
1637
+ "kind": "field",
1638
+ "name": "channel",
1858
1639
  "type": {
1859
- "text": "string"
1640
+ "text": "TypedBroadcastChannel<LayoutPopoutEvents>"
1860
1641
  },
1861
- "description": "The unique identifier for the factory."
1862
- }
1863
- ],
1864
- "description": "Retrieves a factory function by its key.",
1865
- "privacy": "public"
1866
- },
1867
- {
1868
- "kind": "function",
1869
- "name": "unregisterFactory",
1870
- "return": {
1871
- "type": {
1872
- "text": ""
1873
- }
1874
- },
1875
- "parameters": [
1642
+ "privacy": "private"
1643
+ },
1876
1644
  {
1877
- "name": "key",
1645
+ "kind": "field",
1646
+ "name": "pollInterval",
1647
+ "type": {
1648
+ "text": "any"
1649
+ },
1650
+ "privacy": "private"
1651
+ },
1652
+ {
1653
+ "kind": "field",
1654
+ "name": "unloadHandler",
1655
+ "type": {
1656
+ "text": "() => void"
1657
+ },
1658
+ "privacy": "private"
1659
+ },
1660
+ {
1661
+ "kind": "field",
1662
+ "name": "lastUpdate",
1878
1663
  "type": {
1879
1664
  "text": "string"
1880
1665
  },
1881
- "description": "The unique identifier for the factory to remove."
1666
+ "privacy": "private"
1667
+ },
1668
+ {
1669
+ "kind": "field",
1670
+ "name": "popoutRegistry",
1671
+ "type": {
1672
+ "text": "Map<\n string,\n { geometry: PopoutGeometry; state?: unknown; window?: Window }\n >"
1673
+ },
1674
+ "privacy": "private",
1675
+ "default": "new Map()"
1676
+ },
1677
+ {
1678
+ "kind": "method",
1679
+ "name": "setupChannel",
1680
+ "privacy": "private"
1681
+ },
1682
+ {
1683
+ "kind": "method",
1684
+ "name": "setupListener",
1685
+ "privacy": "private"
1686
+ },
1687
+ {
1688
+ "kind": "method",
1689
+ "name": "applyStateToParent",
1690
+ "privacy": "private",
1691
+ "parameters": [
1692
+ {
1693
+ "name": "state",
1694
+ "type": {
1695
+ "text": "unknown"
1696
+ }
1697
+ }
1698
+ ]
1699
+ },
1700
+ {
1701
+ "kind": "method",
1702
+ "name": "setupUnloadListener",
1703
+ "privacy": "private"
1704
+ },
1705
+ {
1706
+ "kind": "method",
1707
+ "name": "teardownUnloadListener",
1708
+ "privacy": "private"
1709
+ },
1710
+ {
1711
+ "kind": "method",
1712
+ "name": "emitAutosave",
1713
+ "privacy": "private"
1714
+ },
1715
+ {
1716
+ "kind": "method",
1717
+ "name": "startPolling",
1718
+ "privacy": "private"
1719
+ },
1720
+ {
1721
+ "kind": "method",
1722
+ "name": "stopPolling",
1723
+ "privacy": "private"
1724
+ },
1725
+ {
1726
+ "kind": "method",
1727
+ "name": "getGeometry",
1728
+ "privacy": "private",
1729
+ "return": {
1730
+ "type": {
1731
+ "text": "Promise<PopoutGeometry>"
1732
+ }
1733
+ }
1734
+ },
1735
+ {
1736
+ "kind": "method",
1737
+ "name": "getComponentState",
1738
+ "privacy": "private",
1739
+ "return": {
1740
+ "type": {
1741
+ "text": "unknown"
1742
+ }
1743
+ }
1744
+ },
1745
+ {
1746
+ "kind": "method",
1747
+ "name": "broadcastUpdate",
1748
+ "privacy": "private",
1749
+ "parameters": [
1750
+ {
1751
+ "name": "geometry",
1752
+ "type": {
1753
+ "text": "PopoutGeometry"
1754
+ }
1755
+ },
1756
+ {
1757
+ "name": "state",
1758
+ "optional": true,
1759
+ "type": {
1760
+ "text": "unknown"
1761
+ }
1762
+ }
1763
+ ]
1764
+ },
1765
+ {
1766
+ "kind": "method",
1767
+ "name": "openPopout",
1768
+ "privacy": "public",
1769
+ "parameters": [
1770
+ {
1771
+ "name": "registration",
1772
+ "type": {
1773
+ "text": "string"
1774
+ },
1775
+ "description": "The registration ID of the component to pop out."
1776
+ },
1777
+ {
1778
+ "name": "popoutState",
1779
+ "optional": true,
1780
+ "type": {
1781
+ "text": "PopoutState"
1782
+ },
1783
+ "description": "Optional state (geometry and component state) to use for the new window."
1784
+ },
1785
+ {
1786
+ "name": "uuid",
1787
+ "optional": true,
1788
+ "type": {
1789
+ "text": "any"
1790
+ },
1791
+ "description": "UUID generator from parent layout"
1792
+ }
1793
+ ],
1794
+ "description": "Opens a component in a popout window."
1795
+ },
1796
+ {
1797
+ "kind": "method",
1798
+ "name": "getRegistry",
1799
+ "privacy": "public",
1800
+ "return": {
1801
+ "type": {
1802
+ "text": "{ [layoutKey: string]: PopoutState }"
1803
+ }
1804
+ }
1805
+ },
1806
+ {
1807
+ "kind": "method",
1808
+ "name": "restorePopouts",
1809
+ "privacy": "public",
1810
+ "parameters": [
1811
+ {
1812
+ "name": "registry",
1813
+ "type": {
1814
+ "text": "{ [layoutKey: string]: PopoutState }"
1815
+ }
1816
+ },
1817
+ {
1818
+ "name": "uuid",
1819
+ "type": {
1820
+ "text": "any"
1821
+ }
1822
+ }
1823
+ ],
1824
+ "description": "Restores popouts from a registry"
1825
+ },
1826
+ {
1827
+ "kind": "method",
1828
+ "name": "closeAllPopouts",
1829
+ "privacy": "public"
1882
1830
  }
1883
- ],
1884
- "description": "Removes a factory from the registry.\nThis is useful for cleanup when a component is unmounted or no longer needed.",
1885
- "privacy": "public"
1886
- }
1887
- ],
1888
- "exports": [
1889
- {
1890
- "kind": "js",
1891
- "name": "registerFactory",
1892
- "declaration": {
1893
- "name": "registerFactory",
1894
- "module": "src/utils/factory-registry.ts"
1895
- }
1896
- },
1897
- {
1898
- "kind": "js",
1899
- "name": "getFactory",
1900
- "declaration": {
1901
- "name": "getFactory",
1902
- "module": "src/utils/factory-registry.ts"
1903
- }
1904
- },
1905
- {
1906
- "kind": "js",
1907
- "name": "unregisterFactory",
1908
- "declaration": {
1909
- "name": "unregisterFactory",
1910
- "module": "src/utils/factory-registry.ts"
1911
- }
1912
- }
1913
- ]
1914
- },
1915
- {
1916
- "kind": "javascript-module",
1917
- "path": "src/utils/index.ts",
1918
- "declarations": [],
1919
- "exports": [
1920
- {
1921
- "kind": "js",
1922
- "name": "*",
1923
- "declaration": {
1924
- "name": "*",
1925
- "package": "./constants"
1926
- }
1927
- },
1928
- {
1929
- "kind": "js",
1930
- "name": "*",
1931
- "declaration": {
1932
- "name": "*",
1933
- "package": "./error"
1934
- }
1935
- },
1936
- {
1937
- "kind": "js",
1938
- "name": "*",
1939
- "declaration": {
1940
- "name": "*",
1941
- "package": "./events"
1942
- }
1943
- },
1944
- {
1945
- "kind": "js",
1946
- "name": "*",
1947
- "declaration": {
1948
- "name": "*",
1949
- "package": "./factory-registry"
1950
- }
1951
- },
1952
- {
1953
- "kind": "js",
1954
- "name": "*",
1955
- "declaration": {
1956
- "name": "*",
1957
- "package": "./misc"
1958
- }
1959
- },
1960
- {
1961
- "kind": "js",
1962
- "name": "*",
1963
- "declaration": {
1964
- "name": "*",
1965
- "package": "./templates"
1966
- }
1967
- },
1968
- {
1969
- "kind": "js",
1970
- "name": "*",
1971
- "declaration": {
1972
- "name": "*",
1973
- "package": "./popout-events"
1974
- }
1975
- },
1831
+ ],
1832
+ "attributes": [
1833
+ {
1834
+ "name": "channel-name",
1835
+ "type": {
1836
+ "text": "string"
1837
+ },
1838
+ "fieldName": "channelName"
1839
+ }
1840
+ ],
1841
+ "superclass": {
1842
+ "name": "FASTElement",
1843
+ "package": "@microsoft/fast-element"
1844
+ },
1845
+ "tagName": "foundation-layout-popout-controller",
1846
+ "customElement": true
1847
+ }
1848
+ ],
1849
+ "exports": [
1976
1850
  {
1977
1851
  "kind": "js",
1978
- "name": "*",
1852
+ "name": "FoundationLayoutPopoutController",
1979
1853
  "declaration": {
1980
- "name": "*",
1981
- "package": "./types"
1854
+ "name": "FoundationLayoutPopoutController",
1855
+ "module": "src/main/layout-popout-controller.ts"
1982
1856
  }
1983
1857
  },
1984
1858
  {
1985
- "kind": "js",
1986
- "name": "*",
1987
- "declaration": {
1988
- "name": "*",
1989
- "package": "./error"
1990
- }
1991
- }
1992
- ]
1993
- },
1994
- {
1995
- "kind": "javascript-module",
1996
- "path": "src/utils/logger.ts",
1997
- "declarations": [
1998
- {
1999
- "kind": "variable",
2000
- "name": "logger"
2001
- }
2002
- ],
2003
- "exports": [
2004
- {
2005
- "kind": "js",
2006
- "name": "logger",
1859
+ "kind": "custom-element-definition",
1860
+ "name": "foundation-layout-popout-controller",
2007
1861
  "declaration": {
2008
- "name": "logger",
2009
- "module": "src/utils/logger.ts"
1862
+ "name": "FoundationLayoutPopoutController",
1863
+ "module": "src/main/layout-popout-controller.ts"
2010
1864
  }
2011
1865
  }
2012
1866
  ]
2013
1867
  },
2014
1868
  {
2015
1869
  "kind": "javascript-module",
2016
- "path": "src/utils/misc.ts",
2017
- "declarations": [],
2018
- "exports": []
2019
- },
2020
- {
2021
- "kind": "javascript-module",
2022
- "path": "src/utils/popout-events.ts",
1870
+ "path": "src/main/layout-region.ts",
2023
1871
  "declarations": [
2024
1872
  {
2025
- "kind": "variable",
2026
- "name": "LAYOUT_POPOUT_CHANNEL_NAME",
2027
- "type": {
2028
- "text": "string"
1873
+ "kind": "class",
1874
+ "description": "",
1875
+ "name": "FoundationLayoutRegion",
1876
+ "members": [
1877
+ {
1878
+ "kind": "field",
1879
+ "name": "size",
1880
+ "type": {
1881
+ "text": "string"
1882
+ },
1883
+ "description": "optional string describing the size of the new item (see the written documentation for more info)",
1884
+ "privacy": "public"
1885
+ },
1886
+ {
1887
+ "kind": "field",
1888
+ "name": "type",
1889
+ "type": {
1890
+ "text": "LayoutRegionType"
1891
+ },
1892
+ "default": "layoutRegionValue[0]",
1893
+ "description": "Defines the LayoutRegionType| type of the region.\nDefaults to `horizontal`.",
1894
+ "privacy": "public"
1895
+ },
1896
+ {
1897
+ "kind": "field",
1898
+ "name": "_presentation",
1899
+ "type": {
1900
+ "text": "ComponentPresentation | null | undefined"
1901
+ },
1902
+ "privacy": "private",
1903
+ "default": "void 0",
1904
+ "inheritedFrom": {
1905
+ "name": "FoundationElement",
1906
+ "module": "src/foundation-element/foundation-element.ts"
1907
+ }
1908
+ },
1909
+ {
1910
+ "kind": "field",
1911
+ "name": "$presentation",
1912
+ "type": {
1913
+ "text": "ComponentPresentation | null"
1914
+ },
1915
+ "privacy": "public",
1916
+ "description": "A property which resolves the ComponentPresentation instance\nfor the current component.",
1917
+ "inheritedFrom": {
1918
+ "name": "FoundationElement",
1919
+ "module": "src/foundation-element/foundation-element.ts"
1920
+ }
1921
+ },
1922
+ {
1923
+ "kind": "field",
1924
+ "name": "template",
1925
+ "type": {
1926
+ "text": "ElementViewTemplate | void | null"
1927
+ },
1928
+ "privacy": "public",
1929
+ "description": "Sets the template of the element instance. When undefined,\nthe element will attempt to resolve the template from\nthe associated presentation or custom element definition.",
1930
+ "inheritedFrom": {
1931
+ "name": "FoundationElement",
1932
+ "module": "src/foundation-element/foundation-element.ts"
1933
+ }
1934
+ },
1935
+ {
1936
+ "kind": "method",
1937
+ "name": "templateChanged",
1938
+ "privacy": "protected",
1939
+ "return": {
1940
+ "type": {
1941
+ "text": "void"
1942
+ }
1943
+ },
1944
+ "inheritedFrom": {
1945
+ "name": "FoundationElement",
1946
+ "module": "src/foundation-element/foundation-element.ts"
1947
+ }
1948
+ },
1949
+ {
1950
+ "kind": "field",
1951
+ "name": "styles",
1952
+ "type": {
1953
+ "text": "ElementStyles | void | null"
1954
+ },
1955
+ "privacy": "public",
1956
+ "description": "Sets the default styles for the element instance. When undefined,\nthe element will attempt to resolve default styles from\nthe associated presentation or custom element definition.",
1957
+ "inheritedFrom": {
1958
+ "name": "FoundationElement",
1959
+ "module": "src/foundation-element/foundation-element.ts"
1960
+ }
1961
+ },
1962
+ {
1963
+ "kind": "method",
1964
+ "name": "stylesChanged",
1965
+ "privacy": "protected",
1966
+ "return": {
1967
+ "type": {
1968
+ "text": "void"
1969
+ }
1970
+ },
1971
+ "inheritedFrom": {
1972
+ "name": "FoundationElement",
1973
+ "module": "src/foundation-element/foundation-element.ts"
1974
+ }
1975
+ },
1976
+ {
1977
+ "kind": "method",
1978
+ "name": "compose",
1979
+ "privacy": "public",
1980
+ "static": true,
1981
+ "return": {
1982
+ "type": {
1983
+ "text": "(\n overrideDefinition?: OverrideFoundationElementDefinition<T>\n ) => FoundationElementRegistry<T, K>"
1984
+ }
1985
+ },
1986
+ "parameters": [
1987
+ {
1988
+ "name": "this",
1989
+ "type": {
1990
+ "text": "K"
1991
+ }
1992
+ },
1993
+ {
1994
+ "name": "elementDefinition",
1995
+ "type": {
1996
+ "text": "T"
1997
+ },
1998
+ "description": "The definition of the element to create the registry\nfunction for."
1999
+ }
2000
+ ],
2001
+ "description": "Defines an element registry function with a set of element definition defaults.",
2002
+ "inheritedFrom": {
2003
+ "name": "FoundationElement",
2004
+ "module": "src/foundation-element/foundation-element.ts"
2005
+ }
2006
+ }
2007
+ ],
2008
+ "attributes": [
2009
+ {
2010
+ "name": "size",
2011
+ "type": {
2012
+ "text": "string"
2013
+ },
2014
+ "description": "optional string describing the size of the new item (see the written documentation for more info)",
2015
+ "fieldName": "size"
2016
+ },
2017
+ {
2018
+ "name": "type",
2019
+ "type": {
2020
+ "text": "LayoutRegionType"
2021
+ },
2022
+ "default": "defaultLayoutType",
2023
+ "description": "Defines the LayoutRegionType| type of the region.\nDefaults to `horizontal`.",
2024
+ "resolveInitializer": {
2025
+ "module": "src/main/layout-region.ts"
2026
+ },
2027
+ "fieldName": "type"
2028
+ }
2029
+ ],
2030
+ "superclass": {
2031
+ "name": "FoundationElement",
2032
+ "package": "@microsoft/fast-foundation"
2029
2033
  },
2030
- "default": "'f-layout-popout-channel'",
2031
- "description": "Name of the default broadcast channel used for layout popouts",
2032
- "privacy": "public"
2034
+ "tagName": "%%prefix%%-layout-region",
2035
+ "customElement": true
2033
2036
  }
2034
2037
  ],
2035
2038
  "exports": [
2036
2039
  {
2037
2040
  "kind": "js",
2038
- "name": "LAYOUT_POPOUT_CHANNEL_NAME",
2039
- "declaration": {
2040
- "name": "LAYOUT_POPOUT_CHANNEL_NAME",
2041
- "module": "src/utils/popout-events.ts"
2042
- }
2043
- },
2044
- {
2045
- "kind": "js",
2046
- "name": "PopoutGeometry",
2041
+ "name": "FoundationLayoutRegion",
2047
2042
  "declaration": {
2048
- "name": "PopoutGeometry",
2049
- "module": "src/utils/popout-events.ts"
2043
+ "name": "FoundationLayoutRegion",
2044
+ "module": "src/main/layout-region.ts"
2050
2045
  }
2051
2046
  }
2052
2047
  ]
2053
- },
2054
- {
2055
- "kind": "javascript-module",
2056
- "path": "src/utils/templates.ts",
2057
- "declarations": [],
2058
- "exports": []
2059
- },
2060
- {
2061
- "kind": "javascript-module",
2062
- "path": "src/utils/types.ts",
2063
- "declarations": [],
2064
- "exports": []
2065
2048
  }
2066
2049
  ]
2067
2050
  }