| |
| @use "breakpoints" as *; |
| @use "lmf-readout" as lmf; |
|
|
| |
| @use "shared-chrome"; |
| @use "violin"; |
| @use "responsive"; |
| @use "demo-list"; |
| @use "loaders"; |
| @use "semantic-analysis"; |
| @use "attribution-inspector"; |
| @use "attribution-sidebar"; |
| @use "tooltip-vars"; |
|
|
| |
| html { |
| margin: 0; |
| padding: 0; |
| overflow-x: hidden; |
| width: 100%; |
| max-width: 100vw; |
| |
| touch-action: pan-y; |
| } |
|
|
| |
| body { |
| margin: 0; |
| padding: 0; |
| background-color: var(--bg-color); |
| color: var(--text-color); |
| font-family: var(--font-family-ui); |
| font-weight: 400; |
| font-size: var(--font-size-base); |
| transition: background-color 0.3s ease, color 0.3s ease; |
| overflow-x: hidden; |
| width: 100%; |
| max-width: 100vw; |
| |
| } |
|
|
| a { |
| color: inherit; |
| } |
|
|
| textarea{ |
| font-family: inherit; |
| width: 100%; |
| height: 50px; |
| min-height: 50px; |
| max-height: 300px; |
| box-sizing: border-box; |
| resize: vertical; |
| background-color: var(--input-bg); |
| color: var(--text-color); |
| border: 1px solid var(--input-border); |
| transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease; |
| } |
|
|
| .textarea-wrapper { |
| width: 100%; |
| box-sizing: border-box; |
| position: relative; |
| |
| textarea { |
| width: 100%; |
| box-sizing: border-box; |
| resize: vertical; |
| } |
| |
| .textarea-counter { |
| font-size: 8pt; |
| color: var(--text-muted); |
| white-space: nowrap; |
| } |
| |
| .button-group { |
| display: flex; |
| justify-content: space-between; |
| align-items: center; |
| width: 100%; |
| min-height: var(--textarea-actions-button-row-min-height); |
| margin-top: 5px; |
| gap: 10px; |
| box-sizing: border-box; |
| flex-wrap: wrap; |
| |
| .button-left { |
| flex-shrink: 0; |
| } |
|
|
| .button-left-stack { |
| display: flex; |
| flex-direction: column; |
| align-items: flex-start; |
| gap: 25px; |
| } |
|
|
| .button-left-primary { |
| display: flex; |
| align-items: center; |
| gap: 10px; |
| position: relative; |
| } |
| |
| .button-right { |
| display: flex; |
| align-items: center; |
| gap: 10px; |
| flex-shrink: 0; |
| |
| } |
|
|
| .text-metrics { |
| flex: 1 1 auto; |
| display: flex; |
| flex-direction: column; |
| justify-content: center; |
| align-items: center; |
| gap: 2px; |
| font-size: 8pt; |
| color: var(--text-muted); |
| min-width: 150px; |
| min-height: 32px; |
| transition: opacity 0.2s ease; |
| } |
|
|
| .text-metrics-primary { |
| display: flex; |
| align-items: center; |
| justify-content: center; |
| gap: 6px; |
| flex-wrap: wrap; |
| text-align: center; |
| max-width: 100%; |
| } |
|
|
| .text-metrics-secondary { |
| font-size: 8pt; |
| color: var(--text-muted); |
| text-align: center; |
| } |
|
|
| .text-metrics.is-hidden { |
| visibility: hidden; |
| opacity: 0; |
| } |
|
|
| .text-metrics-secondary.is-hidden { |
| visibility: hidden; |
| opacity: 0; |
| } |
|
|
| .text-metrics-divider { |
| color: var(--text-muted); |
| } |
| } |
| } |
|
|
| |
| .text-action-buttons-top { |
| display: flex; |
| gap: 4px; |
| align-items: center; |
| |
| .textarea-counter { |
| font-size: 8pt; |
| color: var(--text-muted); |
| white-space: nowrap; |
| margin-right: 8px; |
| } |
| } |
|
|
| |
|
|
|
|
| #header { |
| display: table; |
| width: 100%; |
| background-color: lightgray; |
| height: 30px; |
| } |
|
|
| #headertext { |
| display: table-cell; |
| vertical-align: middle; |
| text-align: center; |
| font-size: 18px; |
| font-family: 'Source Sans Pro', sans-serif; |
| } |
|
|
| svg { |
| vertical-align: top; |
| } |
|
|
|
|
| select { |
| font-size: 9pt; |
| font-weight: 600; |
| background-color: var(--input-bg); |
| color: var(--text-color); |
| padding: 8px 6px; |
| -webkit-box-sizing: border-box; |
| -moz-box-sizing: border-box; |
| box-sizing: border-box; |
| border-radius: 4px; |
| border: 1px solid var(--input-border); |
| outline: 0; |
| transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease; |
| } |
|
|
| .slider { |
| -webkit-appearance: none; |
| width: 100px; |
| height: 10px; |
| border-radius: 5px; |
| background: #d3d3d3; |
| outline: none; |
| opacity: 0.7; |
| -webkit-transition: .2s; |
| transition: opacity .2s; |
| } |
|
|
| .slider:hover { |
| opacity: 1; |
| } |
|
|
| .slider::-webkit-slider-thumb { |
| -webkit-appearance: none; |
| appearance: none; |
| width: 15px; |
| height: 15px; |
| border-radius: 50%; |
| background: #666666; |
| cursor: pointer; |
| } |
|
|
| #clear_highlight_btn { |
| margin-top: 10px; |
| padding: 4px 12px; |
| font-size: 9pt; |
| cursor: pointer; |
| } |
|
|
| .navbar { |
| position: absolute; |
| top: 0; |
| left: 0; |
| width: 100%; |
| height: 50px; |
| background-color: antiquewhite; |
| } |
|
|
| .navbarContent { |
| margin: 10px 20px; |
|
|
| span { |
| padding-left: 10px; |
| } |
|
|
| button { |
| margin-left: 10px; |
| } |
| } |
|
|
| .navbarTitle { |
| font-size: 12pt; |
| font-weight: bold; |
| } |
|
|
| |
| .floating_content { |
| padding: 0; |
| margin: 0; |
| width: 100%; |
| max-width: 100%; |
| box-sizing: border-box; |
| } |
|
|
|
|
| |
| .demo-section { |
| margin-bottom: 15px; |
| } |
|
|
| |
| .input-section { |
| margin-bottom: 15px; |
| } |
|
|
| |
| .results-section { |
| margin-top: 20px; |
| } |
|
|
| .container { |
| margin-right: auto; |
| margin-left: auto; |
| padding: 10pt; |
| } |
|
|
| #input { |
| margin-right: 5px; |
| float: left; |
| width: calc(50% - 225px); |
| height: 100%; |
| } |
|
|
| |
|
|
| |
| |
| .LMF { |
| position: relative; |
| @include lmf.lmf-readout-text; |
| background-color: var(--text-area-bg); |
| |
| |
| min-height: 350px; |
| |
| |
| &.loading { |
| |
| animation: textPulse 2s ease-in-out infinite; |
| } |
| } |
|
|
| |
| .truncated-text { |
| display: inline; |
| font-size: inherit; |
| color: var(--token-truncated-color); |
| } |
|
|
| .token { |
| display: inline; |
| font-size: inherit; |
| font-weight: 500; |
| cursor: pointer; |
| user-select: text; |
| |
| |
| border-radius: 6px; |
| transition: box-shadow 0.15s ease, outline 0.15s ease; |
|
|
| &:hover { |
| |
| |
| box-shadow: 0 0 5px var(--token-hover-shadow), 0 0 9px var(--token-hover-shadow); |
| outline: 2px solid var(--token-hover-outline); |
| outline-offset: -2px; |
| position: relative; |
| z-index: 2; |
| } |
|
|
| |
| &.bin-highlighted { |
| border-radius: 6px; |
| |
| outline: 1.5px solid var(--bin-highlight-outline); |
| outline-offset: -2px; |
| box-shadow: none; |
| position: relative; |
| z-index: 1; |
| } |
|
|
| } |
|
|
| |
| .svg-overlay { |
| position: absolute; |
| top: 0; |
| left: 0; |
| width: 100%; |
| height: 100%; |
| z-index: 1; |
| pointer-events: none; |
| |
| |
| g.token-group { |
| pointer-events: auto; |
| cursor: pointer; |
| |
| |
| &:hover rect { |
| |
| |
| |
| |
| |
| stroke: var(--accent-stroke); |
| stroke-width: 2.5px; |
| } |
| |
| |
| &:hover rect.bin-highlighted { |
| |
| |
| |
| |
| |
| stroke: var(--accent-stroke); |
| stroke-width: 2.5px; |
| } |
| } |
| |
| rect { |
| rx: 6px; |
| ry: 6px; |
| pointer-events: auto; |
| cursor: pointer; |
| transition: fill-opacity 0.1s ease, stroke-opacity 0.15s ease, filter 0.15s ease, stroke 0.15s ease, stroke-width 0.15s ease; |
| |
| |
| &.token-hovered { |
| |
| |
| |
| |
| |
| |
| |
| |
| stroke: var(--accent-stroke); |
| stroke-width: 2.5px; |
| } |
| |
| |
| &.bin-highlighted { |
| |
| filter: none; |
| |
| } |
|
|
| |
| &.token-hovered.bin-highlighted { |
| |
| |
| |
| |
| |
| |
| stroke: var(--accent-stroke); |
| stroke-width: 2.5px; |
| } |
| } |
| } |
|
|
| |
| |
| .text-layer { |
| position: relative; |
| z-index: 2; |
| pointer-events: none; |
| } |
|
|
| |
| .text-loading-overlay { |
| position: absolute; |
| top: 0; |
| left: 0; |
| right: 0; |
| bottom: 0; |
| min-height: 100%; |
| background: var(--loading-overlay-bg); |
| display: flex; |
| align-items: center; |
| justify-content: center; |
| z-index: 100; |
| pointer-events: none; |
| opacity: 0; |
| transition: opacity 0.3s ease-in-out, background-color 0.3s ease; |
| |
| &.visible { |
| opacity: 1; |
| } |
| |
| .loading-content { |
| display: flex; |
| flex-direction: column; |
| align-items: center; |
| gap: 10px; |
| color: var(--text-color); |
| font-size: 12pt; |
| |
| background: transparent; |
| padding: 0; |
| |
| .loading-spinner { |
| width: 60px; |
| height: 60px; |
| border: 4px solid var(--loading-spinner-border); |
| border-top: 4px solid var(--loading-spinner-top); |
| border-radius: 50%; |
| animation: spin 1s linear infinite; |
| } |
| } |
| } |
|
|
| |
| @keyframes textPulse { |
| 0%, 100% { |
| opacity: 1; |
| } |
| 50% { |
| opacity: 0.85; |
| } |
| } |
|
|
| .tooltip { |
| font-size: 9pt; |
| font-weight: 500; |
| border-radius: 5px; |
| padding: 5px; |
| background: var(--tooltip-bg); |
| color: var(--text-color); |
| opacity: 0; |
| transition-property: opacity, background-color, color; |
| transition-duration: .2s; |
| position: absolute; |
| z-index: 101; |
| pointer-events: auto; |
| cursor: pointer; |
| user-select: none; |
| -webkit-user-select: none; |
| |
| max-width: min(16rem, calc(100vw - 24px)); |
| box-sizing: border-box; |
| overflow-wrap: break-word; |
|
|
| &.tooltip-visible { |
| opacity: var(--tooltip-visible-opacity); |
| } |
| } |
|
|
| |
| .currentToken { |
| font-family: lmf.$mono-font-stack; |
| font-size: 9pt; |
| line-height: 1.4; |
| margin-bottom: 4px; |
| } |
|
|
| |
| .predictions { |
| .row { |
| font-family: lmf.$mono-font-stack; |
| } |
| } |
|
|
| |
| .demos { |
| height: 150px; |
| } |
|
|
| |
|
|
| |
| .demo-path-nav-wrapper { |
| flex-wrap: wrap; |
| row-gap: 4px; |
| min-height: 28px; |
| align-items: center; |
| } |
|
|
| |
| .demo-path-navigator { |
| line-height: 28px; |
| } |
|
|
| |
| .demo-multiselect-bar-center { |
| display: flex; |
| align-items: center; |
| gap: 4px; |
| flex-wrap: nowrap; |
| background-color: var(--panel-bg, transparent); |
| padding: 1px 6px; |
| border-radius: 4px; |
| margin-right: 4px; |
| width: fit-content; |
| flex-shrink: 0; |
|
|
| .multiselect-count { |
| font-size: 9pt; |
| color: var(--text-muted); |
| white-space: nowrap; |
| } |
|
|
| |
| .refresh-btn { |
| font-size: 9pt; |
| padding: 1px 6px; |
| min-width: auto; |
| height: auto; |
| white-space: nowrap; |
| |
| &.inactive { |
| opacity: 0.5; |
| cursor: not-allowed; |
| pointer-events: none; |
| } |
| |
| |
| &:not(.inactive) { |
| color: var(--text-color, #333); |
| font-weight: 500; |
| |
| &:hover { |
| color: var(--primary-color, #3b82f6); |
| } |
| } |
| } |
| } |
|
|
| |
| .demo-checkbox-inline { |
| cursor: pointer; |
| margin-right: 1px; |
| width: 14px; |
| height: 14px; |
| |
| vertical-align: middle; |
| |
| display: inline-block; |
| |
| margin-top: 0; |
| margin-bottom: 0; |
| |
| flex-shrink: 0; |
| order: -1; |
| } |
|
|
| |
| .demo-checkbox-inline { |
| |
| appearance: none; |
| -webkit-appearance: none; |
| -moz-appearance: none; |
| |
| |
| background-color: transparent; |
| border: 1px solid var(--text-muted, #888); |
| border-radius: 2px; |
| |
| |
| &:checked { |
| background-color: var(--primary-color, #3b82f6); |
| border-color: var(--primary-color, #3b82f6); |
| |
| background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M2 6l3 3 5-5'/%3E%3C/svg%3E"); |
| background-repeat: no-repeat; |
| background-position: center; |
| background-size: 10px 10px; |
| } |
| |
| |
| &:hover:not(:disabled) { |
| border-color: var(--text-color, #333); |
| } |
| |
| |
| &:focus:not(:disabled) { |
| outline: 1px solid var(--primary-color, #3b82f6); |
| outline-offset: 1px; |
| } |
| |
| |
| &:disabled { |
| opacity: 0.3; |
| cursor: not-allowed; |
| pointer-events: none; |
| } |
| } |
|
|
| |
| :root[data-theme="dark"] { |
| .demo-checkbox-inline { |
| |
| &:hover:not(:disabled) { |
| border-color: var(--text-color, var(--text-color-light)); |
| } |
| } |
| } |
|
|
| .demo-history-promote-btn { |
| background: transparent !important; |
| border: none !important; |
| color: var(--text-color); |
| cursor: pointer; |
| font-family: var(--font-icon); |
| font-size: var(--font-icon-size); |
| line-height: 1; |
| padding: 6px 6px; |
| opacity: 0.6; |
| transition: opacity 0.2s; |
| flex-shrink: 0; |
|
|
| &:hover { |
| opacity: 1; |
| color: var(--accent-color, #3498db); |
| } |
| } |
|
|
| .demo-delete-btn { |
| background: transparent !important; |
| border: none !important; |
| color: var(--text-color); |
| cursor: pointer; |
| font-family: var(--font-icon); |
| font-size: var(--font-icon-size); |
| line-height: 1; |
| padding: 6px 6px; |
| opacity: 0.6; |
| transition: opacity 0.2s; |
| flex-shrink: 0; |
|
|
| &:hover { |
| opacity: 1; |
| color: var(--error-color, #e74c3c); |
| } |
| } |
|
|
|
|
| |
| #loader { |
| top: 0px; |
| opacity: 1; |
| transition-property: opacity; |
| transition-duration: 0.5s; |
| } |
|
|
| |
| .main_frame { |
| opacity: 1; |
| transition-property: opacity; |
| transition-duration: 1s; |
| } |
|
|
| |
|
|
| .app-page-toolbar { |
| position: relative; |
| z-index: 1000; |
| border-bottom: 1px solid var(--border-color); |
| display: flex; |
| justify-content: space-between; |
| align-items: center; |
| flex-wrap: wrap; |
| gap: 10px; |
| row-gap: 6px; |
| background-color: var(--bg-color); |
| box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); |
| box-sizing: border-box; |
| padding: max(10px, env(safe-area-inset-top)) 20px 10px 20px; |
| transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease; |
| } |
|
|
| |
| .app-page-toolbar--bleed { |
| margin: 0 -20px 10px -20px; |
| padding: max(10px, env(safe-area-inset-top)) 20px 10px 20px; |
| } |
|
|
| .app-page-toolbar-actions { |
| display: flex; |
| align-items: center; |
| justify-content: flex-end; |
| flex-wrap: wrap; |
| gap: 10px; |
| flex: 0 0 auto; |
| max-width: 100%; |
| margin-left: auto; |
| } |
|
|
| |
| .page-toolbar-title { |
| margin: 0; |
| font-size: var(--page-chrome-title-size); |
| font-weight: var(--page-chrome-title-weight); |
| line-height: var(--page-chrome-line-height); |
| display: flex; |
| flex-direction: column; |
| align-items: flex-start; |
| gap: 2px; |
| white-space: normal; |
| overflow: visible; |
| flex: 1 1 240px; |
| min-width: 0; |
|
|
| .title-main-line { |
| display: flex; |
| flex-wrap: wrap; |
| align-items: baseline; |
| column-gap: 1em; |
| row-gap: 2px; |
| } |
|
|
| .title-tagline { |
| font-size: var(--page-chrome-subtitle-size); |
| font-weight: var(--page-chrome-subtitle-weight); |
| line-height: var(--page-chrome-line-height); |
| } |
|
|
| .title-formula { |
| font-size: 10px; |
| font-weight: 400; |
| color: var(--text-muted); |
| opacity: 0.75; |
| font-style: italic; |
| } |
| } |
|
|
| |
| .language-toggle-btn { |
| padding: 4px 10px; |
| border: 1px solid var(--button-border); |
| background: var(--button-bg); |
| color: var(--button-text); |
| border-radius: 4px; |
| cursor: pointer; |
| font-size: 13px; |
| transition: background-color 0.2s, border-color 0.2s; |
|
|
| &:hover { |
| background-color: var(--button-hover-bg); |
| } |
|
|
| &:active { |
| background-color: var(--button-active-bg); |
| } |
| } |
|
|
| |
| .demo-header { |
| font-weight: bold; |
| display: flex; |
| align-items: center; |
| gap: 5px; |
| } |
|
|
| |
| .file-input-wrapper { |
| display: inline-flex; |
| align-items: stretch; |
| border: 1px solid var(--input-border); |
| border-radius: 4px; |
| background-color: var(--input-bg); |
| overflow: visible; |
| font-size: 9pt; |
| |
| |
| .file-input-button { |
| |
| padding: 3px 8px; |
| border-radius: 0; |
| border-right: 1px solid var(--input-border); |
| white-space: nowrap; |
| display: inline-flex; |
| align-items: center; |
| } |
| |
| |
| :root[data-theme="dark"] & { |
| .file-input-button { |
| background-color: #3a3a3a; |
| color: var(--text-color); |
| |
| &:hover { |
| background-color: #4a4a4a; |
| } |
| |
| &:active { |
| background-color: #505050; |
| } |
| } |
| } |
| |
| .file-input-filename { |
| padding: 3px 2px; |
| color: var(--text-muted); |
| overflow-wrap: break-word; |
| word-wrap: break-word; |
| word-break: break-word; |
| max-width: 200px; |
| min-width: 100px; |
| font-size: clamp(7pt, 2vw, 9pt); |
| display: flex; |
| align-items: center; |
| justify-content: center; |
| text-align: center; |
| flex: 1; |
| line-height: 1.3; |
| } |
| } |
|
|
| |
| .demos-loading { |
| display: none; |
| color: #666; |
| font-size: 9pt; |
| margin-left: 5px; |
| } |
|
|
| |
| .input-header { |
| padding-top: 10px; |
| display: flex; |
| align-items: center; |
| justify-content: space-between; |
| gap: 5px; |
| } |
|
|
| |
| .loader-small-container { |
| position: absolute; |
| left: 100%; |
| margin-left: 10px; |
| z-index: 10; |
| } |
|
|
|
|
|
|
| |
| #major_tooltip { |
| position: absolute; |
| pointer-events: none; |
| |
| transition-property: background-color, color; |
| } |
|
|
| #attribution_panel_tooltip { |
| transition-property: background-color, color; |
| } |
|
|
| |
| @media (max-width: $breakpoint-mobile) { |
| #major_tooltip { |
| position: fixed; |
| } |
| } |
|
|
| |
| .predictions-table { |
| display: table; |
|
|
| |
| .topk-chart-row { |
| display: table-row; |
| color: var(--tooltip-text-normal); |
| } |
|
|
| .topk-chart-row--ellipsis { |
| display: block !important; |
| text-align: left; |
| padding-left: 30px; |
| font-weight: bold; |
| } |
|
|
| .topk-chart-row--selected { |
| color: var(--tooltip-text-selected); |
| } |
|
|
| .topk-chart-row--pickable { |
| cursor: pointer; |
| } |
|
|
| .topk-chart-bar-cell { |
| display: table-cell; |
| padding-left: 5px; |
| vertical-align: baseline; |
| } |
|
|
| .topk-chart-bar-fill { |
| display: inline-block; |
| height: 10px; |
| background-color: currentColor; |
| vertical-align: middle; |
| } |
|
|
| .topk-chart-prob { |
| display: inline-block; |
| } |
|
|
| .topk-chart-token-cell { |
| display: table-cell; |
| padding-right: 5px; |
| } |
|
|
| .topk-chart-info-row { |
| display: block; |
| } |
|
|
| .topk-chart-info-msg { |
| color: var(--tooltip-text-detail); |
| padding-left: 5px; |
| } |
|
|
| .topk-chart-info-parts { |
| color: var(--tooltip-text-detail); |
| padding-left: 5px; |
| margin-top: 4px; |
| font-family: lmf.$mono-font-stack; |
| font-size: 8.5pt; |
| line-height: 1.3; |
| word-break: break-word; |
| } |
| } |
|
|
| |
| .tooltip .predictions-table { |
| table-layout: fixed; |
| } |
|
|
| .tooltip .topk-chart-token-cell { |
| word-break: break-word; |
| overflow-wrap: anywhere; |
| } |
|
|
| .tooltip .topk-chart-info-msg { |
| overflow-wrap: break-word; |
| } |
|
|
| .tooltip .currentToken { |
| overflow-wrap: break-word; |
| } |
|
|
| @keyframes spin { |
| 0% { transform: rotate(0deg); } |
| 100% { transform: rotate(360deg); } |
| } |
|
|
|
|
|
|
| |
| .toast { |
| position: fixed; |
| top: 20px; |
| right: 20px; |
| background-color: var(--panel-bg); |
| color: var(--text-color); |
| padding: 12px 20px; |
| border-radius: 4px; |
| box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15); |
| z-index: 102; |
| opacity: 0; |
| transform: translateY(-20px); |
| transition: opacity 0.3s ease, transform 0.3s ease; |
| pointer-events: none; |
| max-width: 300px; |
| word-wrap: break-word; |
| border: 1px solid var(--border-color); |
| display: flex; |
| align-items: flex-start; |
| gap: 12px; |
|
|
| &.show { |
| opacity: 1; |
| transform: translateY(0); |
| } |
|
|
| &.success { |
| border-left: 4px solid #4caf50; |
| } |
|
|
| &.error { |
| border-left: 4px solid #f44336; |
| } |
|
|
| &.dismissible { |
| pointer-events: auto; |
| } |
|
|
| .toast-message { |
| flex: 1; |
| min-width: 0; |
| } |
|
|
| .toast-close { |
| flex-shrink: 0; |
| padding: 0 4px; |
| font-size: 18px; |
| line-height: 1; |
| color: inherit; |
| background: none; |
| border: none; |
| cursor: pointer; |
| opacity: 0.7; |
|
|
| &:hover { |
| opacity: 1; |
| } |
| } |
| } |
|
|
| |
|
|
| |
|
|