### Install Project Dependencies Source: https://github.com/aprysesdk/webviewer-ui/blob/11.13/README.md Installs all necessary project dependencies using npm. This is the first step before running or building the project. ```bash npm install ``` -------------------------------- ### Run the Development Server Source: https://github.com/aprysesdk/webviewer-ui/blob/11.13/README.md Starts the development server for local testing and development. This command is used to run the project locally. ```bash npm start ``` -------------------------------- ### Install with Legacy Peer Dependencies Source: https://github.com/aprysesdk/webviewer-ui/blob/11.13/README.md Installs project dependencies while using the --legacy-peer-deps flag. This is a troubleshooting step for NPM version 7 or higher to resolve dependency tree issues. ```bash npm install --legacy-peer-deps ``` -------------------------------- ### Build the Project for Production Source: https://github.com/aprysesdk/webviewer-ui/blob/11.13/README.md Compiles and bundles the project for production deployment. This command generates optimized assets for live environments. ```bash npm run build ``` -------------------------------- ### Storybook Preparing State Styles Source: https://github.com/aprysesdk/webviewer-ui/blob/11.13/storybook-static/iframe.html Styles for the 'preparing' state in Storybook, ensuring it overlays the rendering story with a white background. ```css /* We display the preparing loaders *over* the rendering story */ .sb-preparing-story, .sb-preparing-docs { background-color: white; /* Maximum possible z-index. */ ``` -------------------------------- ### Importing Storybook Runtime Scripts Source: https://github.com/aprysesdk/webviewer-ui/blob/11.13/storybook-static/iframe.html These lines demonstrate the import of essential JavaScript runtime files for Storybook's preview environment. These scripts are necessary for the proper functioning and rendering of stories within the iframe. ```javascript import './sb-preview/runtime.js'; import './mocker-runtime-injected.js'; import './runtime~main.6c69ffa1.iframe.bundle.js'; import './16552.87573f55.iframe.bundle.js'; import './main.984f412a.iframe.bundle.js'; ``` -------------------------------- ### Storybook Wrapper Styles Source: https://github.com/aprysesdk/webviewer-ui/blob/11.13/storybook-static/iframe.html Defines the fixed positioning and basic styling for the main Storybook wrapper. Adjusts padding based on screen width. ```css .sb-wrapper { position: fixed; top: 0; bottom: 0; left: 0; right: 0; box-sizing: border-box; padding: 40px; font-family: 'Nunito Sans', -apple-system, '.SFNSText-Regular', 'San Francisco', BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Helvetica, Arial, sans-serif; -webkit-font-smoothing: antialiased; overflow: auto; } @media (max-width: 700px) { .sb-wrapper { padding: 20px; } } @media (max-width: 500px) { .sb-wrapper { padding: 10px; } } ``` -------------------------------- ### Storybook UI Feature Flags Source: https://github.com/aprysesdk/webviewer-ui/blob/11.13/storybook-static/index.html Configures various features and options for the Storybook UI environment. ```javascript window['FEATURES'] = { "argTypeTargetsV7": true, "legacyDecoratorFileOrder": false, "disallowImplicitActionsInRenderV8": true, "viewport": true, "highlight": true, "controls": true, "interactions": true, "actions": true, "backgrounds": true, "outline": true, "measure": true }; window['REFS'] = {}; window['LOGLEVEL'] = "info"; window['DOCS_OPTIONS'] = {}; window['CONFIG_TYPE'] = "PRODUCTION"; window['TAGS_OPTIONS'] = { "dev-only": { "excludeFromDocsStories": true }, "docs-only": { "excludeFromSidebar": true }, "test-only": { "excludeFromSidebar": true, "excludeFromDocsStories": true } }; window['STORYBOOK_RENDERER'] = "react"; window['STORYBOOK_BUILDER'] = "@storybook/builder-webpack5"; window['STORYBOOK_FRAMEWORK'] = "@storybook/react-webpack5"; ``` -------------------------------- ### Storybook Display Control Styles Source: https://github.com/aprysesdk/webviewer-ui/blob/11.13/storybook-static/iframe.html Manages the display of Storybook components based on preparation and preview states. Hides specific elements when not intended to be shown. ```css /* While we aren't showing the main block yet, but still preparing, we want everything the user has rendered, which may or may not be in #storybook-root, to be display none */ .sb-show-preparing-story:not(.sb-show-main) > :not(.sb-preparing-story) { display: none; } .sb-show-preparing-docs:not(.sb-show-main) > :not(.sb-preparing-docs) { display: none; } /* Hide our own blocks when we aren't supposed to be showing them */ :not(.sb-show-preparing-story) > .sb-preparing-story, :not(.sb-show-preparing-docs) > .sb-preparing-docs, :not(.sb-show-nopreview) > .sb-nopreview, :not(.sb-show-errordisplay) > .sb-errordisplay { display: none; } ``` -------------------------------- ### Storybook Heading Styles Source: https://github.com/aprysesdk/webviewer-ui/blob/11.13/storybook-static/iframe.html Basic styling for headings within Storybook, including font size, weight, and spacing. ```css .sb-heading { font-size: 14px; font-weight: 600; letter-spacing: 0.2px; margin: 10px 0; padding-right: 25px; } ``` -------------------------------- ### Storybook Runtime Imports Source: https://github.com/aprysesdk/webviewer-ui/blob/11.13/storybook-static/index.html Imports necessary runtime JavaScript modules for the Storybook manager interface. ```javascript import './sb-manager/globals-runtime.js'; import './sb-addons/storybook-core-server-presets-0/common-manager-bundle.js'; import './sb-addons/links-1/manager-bundle.js'; import './sb-addons/chromatic-com-storybook-2/manager-bundle.js'; import './sb-addons/a11y-3/manager-bundle.js'; import './sb-addons/themes-4/manager-bundle.js'; import './sb-addons/pseudo-states-5/manager-bundle.js'; import './sb-addons/rtl-6/manager-bundle.js'; import './sb-manager/runtime.js'; ``` -------------------------------- ### Storybook Main Content Layout Styles Source: https://github.com/aprysesdk/webviewer-ui/blob/11.13/storybook-static/iframe.html Styles for centering and full-screen display of the main Storybook content. Includes a specific fix for IE11 vertical centering. ```css .sb-show-main.sb-main-centered { margin: 0; display: flex; align-items: center; min-height: 100vh; } .sb-show-main.sb-main-centered #storybook-root { box-sizing: border-box; margin: auto; padding: 1rem; max-height: 100%; /* Hack for centering correctly in IE11 */ } /* Vertical centering fix for IE11 */ @media screen and (-ms-high-contrast: none), (-ms-high-contrast: active) { .sb-show-main.sb-main-centered:after { content: ''; min-height: inherit; font-size: 0; } } .sb-show-main.sb-main-fullscreen { margin: 0; padding: 0; display: block; } .sb-show-main.sb-main-padded { margin: 0; padding: 1rem; display: block; box-sizing: border-box; } ``` -------------------------------- ### Storybook No Preview Component Styles Source: https://github.com/aprysesdk/webviewer-ui/blob/11.13/storybook-static/iframe.html Styles for the 'no preview' state in Storybook, including centering and background styling for the message area. ```css .sb-nopreview { display: flex; align-content: center; justify-content: center; box-sizing: border-box; } .sb-nopreview_main { margin: auto; padding: 30px; border-radius: 10px; background: rgba(0, 0, 0, 0.03); } .sb-nopreview_heading { text-align: center; } ``` -------------------------------- ### Setting Global Storybook Variables Source: https://github.com/aprysesdk/webviewer-ui/blob/11.13/storybook-static/iframe.html This snippet shows how global variables like CONFIG_TYPE, LOGLEVEL, FRAMEWORK_OPTIONS, FEATURES, STORIES, DOCS_OPTIONS, and TAGS_OPTIONS are set within the iframe.html file. These variables are crucial for Storybook's runtime behavior and configuration. ```javascript window['CONFIG_TYPE'] = "PRODUCTION"; window['LOGLEVEL'] = "info"; window['FRAMEWORK_OPTIONS'] = {}; window['FEATURES'] = {"argTypeTargetsV7":true,"legacyDecoratorFileOrder":false,"disallowImplicitActionsInRenderV8":true,"viewport":true,"highlight":true,"controls":true,"interactions":true,"actions":true,"backgrounds":true,"outline":true,"measure":true}; window['STORIES'] = [{"titlePrefix":"","directory":"./src","files":"**/*.mdx","importPathMatcher":"^\\.["\\/"].(?:src(?:\\/(?!\\.)(?:(?:(?!(?:^|\\/)\\.).)\*?)\\/|\\/|$)(?!\\.)(?=.)[^"]*?\\.mdx)$"},{"titlePrefix":"","directory":"./src","files":"**/*.stories.@(js|jsx|ts|tsx)","importPathMatcher":"^\\.["\\/"].(?:src(?:\\/(?!\\.)(?:(?:(?!(?:^|\\/)\\.).)\*?)\\/|\\/|$)(?!\\.)(?=.)[^"]*?\\.stories\\.(js|jsx|ts|tsx))$"}]; window['DOCS_OPTIONS'] = {}; window['TAGS_OPTIONS'] = {"dev-only":{"excludeFromDocsStories":true},"docs-only":{"excludeFromSidebar":true},"test-only":{"excludeFromSidebar":true,"excludeFromDocsStories":true}}; ``` -------------------------------- ### CSS Font Definitions for Storybook Source: https://github.com/aprysesdk/webviewer-ui/blob/11.13/storybook-static/index.html Defines the 'Nunito Sans' font with different weights and styles for use in Storybook. ```css @font-face { font-family: 'Nunito Sans'; font-style: normal; font-weight: 400; font-display: swap; src: url('./sb-common-assets/nunito-sans-regular.woff2') format('woff2'); } @font-face { font-family: 'Nunito Sans'; font-style: italic; font-weight: 400; font-display: swap; src: url('./sb-common-assets/nunito-sans-italic.woff2') format('woff2'); } @font-face { font-family: 'Nunito Sans'; font-style: normal; font-weight: 700; font-display: swap; src: url('./sb-common-assets/nunito-sans-bold.woff2') format('woff2'); } @font-face { font-family: 'Nunito Sans'; font-style: italic; font-weight: 700; font-display: swap; src: url('./sb-common-assets/nunito-sans-bold-italic.woff2') format('woff2'); } ``` -------------------------------- ### Nunito Sans Font Face Declarations Source: https://github.com/aprysesdk/webviewer-ui/blob/11.13/storybook-static/iframe.html Defines the 'Nunito Sans' font with different weights and styles for optimal web display. Uses WOFF2 format for efficient loading. ```css @font-face { font-family: 'Nunito Sans'; font-style: normal; font-weight: 400; font-display: swap; src: url('./sb-common-assets/nunito-sans-regular.woff2') format('woff2'); } @font-face { font-family: 'Nunito Sans'; font-style: italic; font-weight: 400; font-display: swap; src: url('./sb-common-assets/nunito-sans-italic.woff2') format('woff2'); } @font-face { font-family: 'Nunito Sans'; font-style: normal; font-weight: 700; font-display: swap; src: url('./sb-common-assets/nunito-sans-bold.woff2') format('woff2'); } @font-face { font-family: 'Nunito Sans'; font-style: italic; font-weight: 700; font-display: swap; src: url('./sb-common-assets/nunito-sans-bold-italic.woff2') format('woff2'); } ``` -------------------------------- ### Storybook Error Display Styles Source: https://github.com/aprysesdk/webviewer-ui/blob/11.13/storybook-static/iframe.html Comprehensive styling for displaying errors within Storybook, including layout, typography, and code block formatting. Uses a dark background for code snippets. ```css .sb-errordisplay { background: #f6f9fc; color: black; z-index: 999999; width: 100vw; min-height: 100vh; box-sizing: border-box; & ol { padding-left: 18px; margin: 0; } & h1 { font-family: Nunito Sans; font-size: 22px; font-weight: 400; line-height: 30px; font-weight: normal; margin: 0; &::before { content: ''; display: inline-block; width: 12px; height: 12px; background: #ff4400; border-radius: 50%; margin-right: 8px; } } & p, & ol { font-family: Nunito Sans; font-size: 14px; font-weight: 400; line-height: 19px; margin: 0; } & li + li { margin: 0; padding: 0; padding-top: 12px; } & a { color: currentColor; } } .sb-errordisplay_main { margin: auto; padding: 24px; display: flex; box-sizing: border-box; flex-direction: column; min-height: 100%; width: 100%; border-radius: 6px; background: white; border: 1px solid #ff0000; box-shadow: 0 0 64px rgba(0, 0, 0, 0.1); gap: 24px; } .sb-errordisplay_code { padding: 10px; flex: 1; background: #242424; color: #c6c6c6; box-sizing: border-box; font-size: 14px; font-weight: 400; line-height: 19px; border-radius: 4px; font-family: 'Operator Mono', 'Fira Code Retina', 'Fira Code', 'FiraCode-Retina', 'Andale Mono', 'Lucida Console', Consolas, Monaco, monospace; margin: 0; overflow: auto; } .sb-errordisplay pre { white-space: pre-wrap; white-space: revert; } ``` -------------------------------- ### CSS Keyframe Animations Source: https://github.com/aprysesdk/webviewer-ui/blob/11.13/storybook-static/iframe.html Defines keyframe animations for 360-degree rotation and a glowing effect, used for visual feedback in the application. ```css @-webkit-keyframes sb-rotate360 { from { transform: rotate(0deg); } to { transform: rotate(360deg); } } @keyframes sb-rotate360 { from { transform: rotate(0deg); } to { transform: rotate(360deg); } } @-webkit-keyframes sb-glow { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } } @keyframes sb-glow { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } } ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.