@ahoo-wang/wow-view-engine 10.0.0-beta.1 → 10.0.0-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{actions-ClYpI7gy.js → actions-CThpS7Yj.js} +2790 -2761
- package/dist/actions-CThpS7Yj.js.map +1 -0
- package/dist/analysis/buckets.d.ts.map +1 -1
- package/dist/analysis/columns.d.ts +192 -0
- package/dist/analysis/columns.d.ts.map +1 -0
- package/dist/analysis/index.d.ts +1 -0
- package/dist/analysis/index.d.ts.map +1 -1
- package/dist/analysis/project.d.ts +2 -152
- package/dist/analysis/project.d.ts.map +1 -1
- package/dist/capabilities/analysis.d.ts.map +1 -1
- package/dist/capabilities/cache.d.ts +13 -0
- package/dist/capabilities/cache.d.ts.map +1 -1
- package/dist/capabilities/fields.d.ts +3 -17
- package/dist/capabilities/fields.d.ts.map +1 -1
- package/dist/capabilities/semantic.d.ts +24 -0
- package/dist/capabilities/semantic.d.ts.map +1 -0
- package/dist/dashboard/index.d.ts +1 -0
- package/dist/dashboard/index.d.ts.map +1 -1
- package/dist/dashboard/layout.d.ts +8 -40
- package/dist/dashboard/layout.d.ts.map +1 -1
- package/dist/dashboard/reorder.d.ts +43 -0
- package/dist/dashboard/reorder.d.ts.map +1 -0
- package/dist/dashboard/shape.d.ts +8 -0
- package/dist/dashboard/shape.d.ts.map +1 -0
- package/dist/dashboard/tabs.d.ts.map +1 -1
- package/dist/dashboard/validate.d.ts.map +1 -1
- package/dist/dashboard/validateContent.d.ts +3 -0
- package/dist/dashboard/validateContent.d.ts.map +1 -0
- package/dist/dashboard/validateFilters.d.ts.map +1 -1
- package/dist/{export-D1udIJPm.js → export-D6bnNjrA.js} +2 -2
- package/dist/{export-D1udIJPm.js.map → export-D6bnNjrA.js.map} +1 -1
- package/dist/filter/kinds/dateTime.d.ts.map +1 -1
- package/dist/filter/time.d.ts.map +1 -1
- package/dist/index.d.ts +10 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +212 -177
- package/dist/index.js.map +1 -1
- package/dist/model/cartesian.d.ts +132 -0
- package/dist/model/cartesian.d.ts.map +1 -0
- package/dist/model/chart.d.ts +1 -130
- package/dist/model/chart.d.ts.map +1 -1
- package/dist/model/currency.d.ts +1 -1
- package/dist/model/currency.d.ts.map +1 -1
- package/dist/model/definition.d.ts +9 -0
- package/dist/model/definition.d.ts.map +1 -1
- package/dist/model/field.d.ts +3 -142
- package/dist/model/field.d.ts.map +1 -1
- package/dist/model/fieldNumeric.d.ts +78 -0
- package/dist/model/fieldNumeric.d.ts.map +1 -0
- package/dist/model/fieldTemporal.d.ts +68 -0
- package/dist/model/fieldTemporal.d.ts.map +1 -0
- package/dist/model/index.d.ts +3 -0
- package/dist/model/index.d.ts.map +1 -1
- package/dist/react/actionRunner.d.ts +9 -0
- package/dist/react/actionRunner.d.ts.map +1 -1
- package/dist/react/filterTree.d.ts +109 -0
- package/dist/react/filterTree.d.ts.map +1 -0
- package/dist/react/followUp.d.ts +105 -0
- package/dist/react/followUp.d.ts.map +1 -0
- package/dist/react/index.d.ts +6 -3
- package/dist/react/index.d.ts.map +1 -1
- package/dist/react/rulesClock.d.ts +20 -0
- package/dist/react/rulesClock.d.ts.map +1 -0
- package/dist/react/useAnalysisResult.d.ts +1 -80
- package/dist/react/useAnalysisResult.d.ts.map +1 -1
- package/dist/react/useFilterEditor.d.ts +24 -108
- package/dist/react/useFilterEditor.d.ts.map +1 -1
- package/dist/react/useRecordActions.d.ts +24 -1
- package/dist/react/useRecordActions.d.ts.map +1 -1
- package/dist/react/useRecordDetail.d.ts.map +1 -1
- package/dist/react/useRecordExport.d.ts.map +1 -1
- package/dist/react/useRecordTable.d.ts +6 -0
- package/dist/react/useRecordTable.d.ts.map +1 -1
- package/dist/react/useSaveCommands.d.ts +5 -0
- package/dist/react/useSaveCommands.d.ts.map +1 -1
- package/dist/react/useSearchBox.d.ts.map +1 -1
- package/dist/react/useStale.d.ts +24 -0
- package/dist/react/useStale.d.ts.map +1 -0
- package/dist/react/useWorkbench.d.ts +3 -61
- package/dist/react/useWorkbench.d.ts.map +1 -1
- package/dist/react/workbench/handOver.d.ts +1 -1
- package/dist/react/workbench/handOver.d.ts.map +1 -1
- package/dist/react/workbench/heldView.d.ts +112 -0
- package/dist/react/workbench/heldView.d.ts.map +1 -0
- package/dist/react/workbench/instanceSync.d.ts +5 -1
- package/dist/react/workbench/instanceSync.d.ts.map +1 -1
- package/dist/react/workbench/switching.d.ts +29 -0
- package/dist/react/workbench/switching.d.ts.map +1 -0
- package/dist/react-0RrtrG7t.js +4316 -0
- package/dist/react-0RrtrG7t.js.map +1 -0
- package/dist/react.js +1 -1
- package/dist/record/compile.d.ts +3 -1
- package/dist/record/compile.d.ts.map +1 -1
- package/dist/record/index.d.ts +1 -0
- package/dist/record/index.d.ts.map +1 -1
- package/dist/record/kanban.d.ts.map +1 -1
- package/dist/record/path.d.ts +10 -0
- package/dist/record/path.d.ts.map +1 -1
- package/dist/record/project.d.ts +9 -66
- package/dist/record/project.d.ts.map +1 -1
- package/dist/record/summaries.d.ts +68 -0
- package/dist/record/summaries.d.ts.map +1 -0
- package/dist/runtime/actions.d.ts +16 -0
- package/dist/runtime/actions.d.ts.map +1 -1
- package/dist/runtime/autoApply.d.ts +17 -2
- package/dist/runtime/autoApply.d.ts.map +1 -1
- package/dist/runtime/capabilities.d.ts +15 -1
- package/dist/runtime/capabilities.d.ts.map +1 -1
- package/dist/runtime/commandChecks.d.ts +8 -4
- package/dist/runtime/commandChecks.d.ts.map +1 -1
- package/dist/runtime/dashboard/commands.d.ts +3 -1
- package/dist/runtime/dashboard/commands.d.ts.map +1 -1
- package/dist/runtime/dashboard/editing.d.ts +10 -1
- package/dist/runtime/dashboard/editing.d.ts.map +1 -1
- package/dist/runtime/dashboard/history.d.ts +8 -0
- package/dist/runtime/dashboard/history.d.ts.map +1 -1
- package/dist/runtime/dashboard/panelSync.d.ts +57 -0
- package/dist/runtime/dashboard/panelSync.d.ts.map +1 -0
- package/dist/runtime/dashboardRuntime.d.ts +3 -20
- package/dist/runtime/dashboardRuntime.d.ts.map +1 -1
- package/dist/runtime/datasetResources.d.ts +29 -1
- package/dist/runtime/datasetResources.d.ts.map +1 -1
- package/dist/runtime/define/spec.d.ts +2 -1
- package/dist/runtime/define/spec.d.ts.map +1 -1
- package/dist/runtime/generations.d.ts +89 -0
- package/dist/runtime/generations.d.ts.map +1 -0
- package/dist/runtime/instanceWrites.d.ts.map +1 -1
- package/dist/runtime/panelViews.d.ts.map +1 -1
- package/dist/runtime/preferences.d.ts +37 -11
- package/dist/runtime/preferences.d.ts.map +1 -1
- package/dist/runtime/recordRuntime.d.ts +13 -0
- package/dist/runtime/recordRuntime.d.ts.map +1 -1
- package/dist/runtime/restyle.d.ts +17 -12
- package/dist/runtime/restyle.d.ts.map +1 -1
- package/dist/runtime/summaries.d.ts +16 -2
- package/dist/runtime/summaries.d.ts.map +1 -1
- package/dist/runtime/tabMemory.d.ts +11 -4
- package/dist/runtime/tabMemory.d.ts.map +1 -1
- package/dist/runtime/validateDefinition.d.ts.map +1 -1
- package/dist/runtime/validateSystemViews.d.ts +10 -0
- package/dist/runtime/validateSystemViews.d.ts.map +1 -0
- package/dist/runtime/viewEngine.d.ts +4 -5
- package/dist/runtime/viewEngine.d.ts.map +1 -1
- package/dist/runtime/viewOpening.d.ts +30 -0
- package/dist/runtime/viewOpening.d.ts.map +1 -0
- package/dist/runtime/viewRuntime.d.ts +3 -1
- package/dist/runtime/viewRuntime.d.ts.map +1 -1
- package/dist/runtime/viewRuntimeTypes.d.ts +29 -3
- package/dist/runtime/viewRuntimeTypes.d.ts.map +1 -1
- package/dist/runtime/write.d.ts +11 -0
- package/dist/runtime/write.d.ts.map +1 -1
- package/dist/runtime/writeEffects.d.ts +16 -0
- package/dist/runtime/writeEffects.d.ts.map +1 -0
- package/dist/runtime/writeLedger.d.ts +13 -12
- package/dist/runtime/writeLedger.d.ts.map +1 -1
- package/dist/store/MemoryViewStore.d.ts.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/testing/filter.d.ts +13 -5
- package/dist/testing/filter.d.ts.map +1 -1
- package/dist/testing/source.d.ts +8 -0
- package/dist/testing/source.d.ts.map +1 -1
- package/dist/testing.js +60 -61
- package/dist/testing.js.map +1 -1
- package/dist/theme-check.mjs +206 -222
- package/dist/theme-source.css +265 -109
- package/dist/theme-tokens.json +293 -441
- package/dist/themes/contrast.css +12 -12
- package/dist/themes.css +12 -276
- package/dist/ui/DashboardWorkbench.d.ts +2 -2
- package/dist/ui/DataWorkbench.d.ts +2 -2
- package/dist/ui/ViewHost.d.ts +11 -1
- package/dist/ui/ViewHost.d.ts.map +1 -1
- package/dist/ui/actions/ActionButtons.d.ts +7 -1
- package/dist/ui/actions/ActionButtons.d.ts.map +1 -1
- package/dist/ui/actions/ActionDialog.d.ts.map +1 -1
- package/dist/ui/actions/ActionSurface.d.ts.map +1 -1
- package/dist/ui/actions/BulkStatus.d.ts.map +1 -1
- package/dist/ui/analysis/DimensionCard.d.ts.map +1 -1
- package/dist/ui/analysis/DisplayTab.d.ts.map +1 -1
- package/dist/ui/analysis/ElementsSlot.d.ts.map +1 -1
- package/dist/ui/analysis/HavingRows.d.ts.map +1 -1
- package/dist/ui/analysis/MetricSlot.d.ts.map +1 -1
- package/dist/ui/analysis/RangeSlot.d.ts.map +1 -1
- package/dist/ui/analysis/TopRow.d.ts.map +1 -1
- package/dist/ui/analysis/cartesianSpec.d.ts +1 -1
- package/dist/ui/analysis/exportOffer.d.ts.map +1 -1
- package/dist/ui/charts/EChart.d.ts +5 -7
- package/dist/ui/charts/EChart.d.ts.map +1 -1
- package/dist/ui/charts/MetricCard.d.ts.map +1 -1
- package/dist/ui/charts/PieSlices.d.ts.map +1 -1
- package/dist/ui/charts/candlestickOption.d.ts +1 -1
- package/dist/ui/charts/cartesianPlan.d.ts +0 -30
- package/dist/ui/charts/cartesianPlan.d.ts.map +1 -1
- package/dist/ui/charts/cartesianStacks.d.ts +36 -0
- package/dist/ui/charts/cartesianStacks.d.ts.map +1 -0
- package/dist/ui/charts/cartesianTooltip.d.ts.map +1 -1
- package/dist/ui/charts/pieOption.d.ts +10 -0
- package/dist/ui/charts/pieOption.d.ts.map +1 -1
- package/dist/ui/charts/theme.d.ts +35 -12
- package/dist/ui/charts/theme.d.ts.map +1 -1
- package/dist/ui/charts/waterfallOption.d.ts +4 -3
- package/dist/ui/charts/waterfallOption.d.ts.map +1 -1
- package/dist/ui/columns/ColumnRegion.d.ts +27 -0
- package/dist/ui/columns/ColumnRegion.d.ts.map +1 -0
- package/dist/ui/columns/ColumnSettings.d.ts.map +1 -1
- package/dist/ui/dashboard/DashboardPanelCard.d.ts.map +1 -1
- package/dist/ui/dashboard/FilterSheet.d.ts.map +1 -1
- package/dist/ui/dashboard/FilterWiring.d.ts.map +1 -1
- package/dist/ui/dashboard/PanelHeader.d.ts +18 -0
- package/dist/ui/dashboard/PanelHeader.d.ts.map +1 -0
- package/dist/ui/dashboard/gridWidth.d.ts +6 -0
- package/dist/ui/dashboard/gridWidth.d.ts.map +1 -1
- package/dist/ui/embed/EmbeddedAnalysis.d.ts.map +1 -1
- package/dist/ui/embed/EmbeddedRecord.d.ts.map +1 -1
- package/dist/ui/filter/AppliedBar.d.ts.map +1 -1
- package/dist/ui/filter/ConditionPill.d.ts.map +1 -1
- package/dist/ui/filter/NestedPredicate.d.ts +23 -0
- package/dist/ui/filter/NestedPredicate.d.ts.map +1 -0
- package/dist/ui/filter/inputs/number.d.ts +1 -1
- package/dist/ui/filter/inputs/number.d.ts.map +1 -1
- package/dist/ui/filter/inputs/shared.d.ts +1 -1
- package/dist/ui/filter/inputs/shared.d.ts.map +1 -1
- package/dist/ui/index.d.ts +3 -2
- package/dist/ui/index.d.ts.map +1 -1
- package/dist/ui/kit/DragHandle.d.ts +7 -1
- package/dist/ui/kit/DragHandle.d.ts.map +1 -1
- package/dist/ui/kit/IconButton.d.ts +10 -1
- package/dist/ui/kit/IconButton.d.ts.map +1 -1
- package/dist/ui/kit/PendingDot.d.ts +2 -1
- package/dist/ui/kit/PendingDot.d.ts.map +1 -1
- package/dist/ui/kit/alerts.d.ts.map +1 -1
- package/dist/ui/kit/characterKeys.d.ts +10 -0
- package/dist/ui/kit/characterKeys.d.ts.map +1 -0
- package/dist/ui/kit/display.d.ts +0 -31
- package/dist/ui/kit/display.d.ts.map +1 -1
- package/dist/ui/kit/displayTime.d.ts +58 -0
- package/dist/ui/kit/displayTime.d.ts.map +1 -0
- package/dist/ui/kit/frames.d.ts +233 -0
- package/dist/ui/kit/frames.d.ts.map +1 -0
- package/dist/ui/kit/keptFocus.d.ts +35 -0
- package/dist/ui/kit/keptFocus.d.ts.map +1 -0
- package/dist/ui/kit/pills.d.ts +70 -0
- package/dist/ui/kit/pills.d.ts.map +1 -0
- package/dist/ui/kit/popupLayer.d.ts +160 -0
- package/dist/ui/kit/popupLayer.d.ts.map +1 -0
- package/dist/ui/kit/popups.d.ts +20 -3
- package/dist/ui/kit/popups.d.ts.map +1 -1
- package/dist/ui/kit/presets.d.ts +1 -5
- package/dist/ui/kit/presets.d.ts.map +1 -1
- package/dist/ui/kit/stale.d.ts +30 -0
- package/dist/ui/kit/stale.d.ts.map +1 -0
- package/dist/ui/kit/variants.d.ts +11 -313
- package/dist/ui/kit/variants.d.ts.map +1 -1
- package/dist/ui/manage/ViewManager.d.ts.map +1 -1
- package/dist/ui/manage/ViewManagerRow.d.ts.map +1 -1
- package/dist/ui/messages/actions.d.ts +1 -0
- package/dist/ui/messages/actions.d.ts.map +1 -1
- package/dist/ui/messages/analysis.d.ts +1 -438
- package/dist/ui/messages/analysis.d.ts.map +1 -1
- package/dist/ui/messages/chart.d.ts +257 -0
- package/dist/ui/messages/chart.d.ts.map +1 -0
- package/dist/ui/messages/chartIssues.d.ts +95 -0
- package/dist/ui/messages/chartIssues.d.ts.map +1 -0
- package/dist/ui/messages/chartReading.d.ts +112 -0
- package/dist/ui/messages/chartReading.d.ts.map +1 -0
- package/dist/ui/messages/definition.d.ts +2 -0
- package/dist/ui/messages/definition.d.ts.map +1 -1
- package/dist/ui/messages/en.d.ts +413 -409
- package/dist/ui/messages/en.d.ts.map +1 -1
- package/dist/ui/messages/save.d.ts +1 -0
- package/dist/ui/messages/save.d.ts.map +1 -1
- package/dist/ui/messages/view.d.ts +1 -1
- package/dist/ui/messages/view.d.ts.map +1 -1
- package/dist/ui/messages/zh-CN/actions.d.ts +33 -0
- package/dist/ui/messages/zh-CN/actions.d.ts.map +1 -0
- package/dist/ui/messages/zh-CN/analysis.d.ts +286 -0
- package/dist/ui/messages/zh-CN/analysis.d.ts.map +1 -0
- package/dist/ui/messages/zh-CN/building.d.ts +64 -0
- package/dist/ui/messages/zh-CN/building.d.ts.map +1 -0
- package/dist/ui/messages/zh-CN/bulk.d.ts +28 -0
- package/dist/ui/messages/zh-CN/bulk.d.ts.map +1 -0
- package/dist/ui/messages/zh-CN/capabilities.d.ts +42 -0
- package/dist/ui/messages/zh-CN/capabilities.d.ts.map +1 -0
- package/dist/ui/messages/zh-CN/chart.d.ts +256 -0
- package/dist/ui/messages/zh-CN/chart.d.ts.map +1 -0
- package/dist/ui/messages/zh-CN/chartIssues.d.ts +96 -0
- package/dist/ui/messages/zh-CN/chartIssues.d.ts.map +1 -0
- package/dist/ui/messages/zh-CN/chartReading.d.ts +112 -0
- package/dist/ui/messages/zh-CN/chartReading.d.ts.map +1 -0
- package/dist/ui/messages/zh-CN/clicks.d.ts +85 -0
- package/dist/ui/messages/zh-CN/clicks.d.ts.map +1 -0
- package/dist/ui/messages/zh-CN/config.d.ts +17 -0
- package/dist/ui/messages/zh-CN/config.d.ts.map +1 -0
- package/dist/ui/messages/zh-CN/dashboard.d.ts +316 -0
- package/dist/ui/messages/zh-CN/dashboard.d.ts.map +1 -0
- package/dist/ui/messages/zh-CN/datasets.d.ts +15 -0
- package/dist/ui/messages/zh-CN/datasets.d.ts.map +1 -0
- package/dist/ui/messages/zh-CN/definition.d.ts +78 -0
- package/dist/ui/messages/zh-CN/definition.d.ts.map +1 -0
- package/dist/ui/messages/zh-CN/embed.d.ts +13 -0
- package/dist/ui/messages/zh-CN/embed.d.ts.map +1 -0
- package/dist/ui/messages/zh-CN/export.d.ts +46 -0
- package/dist/ui/messages/zh-CN/export.d.ts.map +1 -0
- package/dist/ui/messages/zh-CN/filter.d.ts +269 -0
- package/dist/ui/messages/zh-CN/filter.d.ts.map +1 -0
- package/dist/ui/messages/zh-CN/filters.d.ts +80 -0
- package/dist/ui/messages/zh-CN/filters.d.ts.map +1 -0
- package/dist/ui/messages/zh-CN/header.d.ts +25 -0
- package/dist/ui/messages/zh-CN/header.d.ts.map +1 -0
- package/dist/ui/messages/zh-CN/manage.d.ts +46 -0
- package/dist/ui/messages/zh-CN/manage.d.ts.map +1 -0
- package/dist/ui/messages/zh-CN/record.d.ts +205 -0
- package/dist/ui/messages/zh-CN/record.d.ts.map +1 -0
- package/dist/ui/messages/zh-CN/refresh.d.ts +17 -0
- package/dist/ui/messages/zh-CN/refresh.d.ts.map +1 -0
- package/dist/ui/messages/zh-CN/render.d.ts +12 -0
- package/dist/ui/messages/zh-CN/render.d.ts.map +1 -0
- package/dist/ui/messages/zh-CN/reorder.d.ts +14 -0
- package/dist/ui/messages/zh-CN/reorder.d.ts.map +1 -0
- package/dist/ui/messages/zh-CN/save.d.ts +62 -0
- package/dist/ui/messages/zh-CN/save.d.ts.map +1 -0
- package/dist/ui/messages/zh-CN/scope.d.ts +27 -0
- package/dist/ui/messages/zh-CN/scope.d.ts.map +1 -0
- package/dist/ui/messages/zh-CN/status.d.ts +36 -0
- package/dist/ui/messages/zh-CN/status.d.ts.map +1 -0
- package/dist/ui/messages/zh-CN/view.d.ts +175 -0
- package/dist/ui/messages/zh-CN/view.d.ts.map +1 -0
- package/dist/ui/messages/zh-CN/workbench.d.ts +18 -0
- package/dist/ui/messages/zh-CN/workbench.d.ts.map +1 -0
- package/dist/ui/messages/zh-CN.d.ts +4 -0
- package/dist/ui/messages/zh-CN.d.ts.map +1 -1
- package/dist/ui/record/DetailStructure.d.ts.map +1 -1
- package/dist/ui/record/RecordCards.d.ts +3 -1
- package/dist/ui/record/RecordCards.d.ts.map +1 -1
- package/dist/ui/record/RecordDetail.d.ts.map +1 -1
- package/dist/ui/record/RecordKanban.d.ts +3 -1
- package/dist/ui/record/RecordKanban.d.ts.map +1 -1
- package/dist/ui/record/RecordTable.d.ts +6 -1
- package/dist/ui/record/RecordTable.d.ts.map +1 -1
- package/dist/ui/record/RowCheckbox.d.ts.map +1 -1
- package/dist/ui/record/SortableHeader.d.ts.map +1 -1
- package/dist/ui/record/cells.d.ts.map +1 -1
- package/dist/ui/record/exportOffer.d.ts.map +1 -1
- package/dist/ui/sort/SortSettings.d.ts.map +1 -1
- package/dist/ui/sort/SortSummary.d.ts +73 -0
- package/dist/ui/sort/SortSummary.d.ts.map +1 -0
- package/dist/ui/theme/entry.d.ts +223 -0
- package/dist/ui/theme/entry.d.ts.map +1 -0
- package/dist/ui/theme/pairs.d.ts +1 -12
- package/dist/ui/theme/pairs.d.ts.map +1 -1
- package/dist/ui/theme/tokens.d.ts +152 -215
- package/dist/ui/theme/tokens.d.ts.map +1 -1
- package/dist/ui/workbench/AnalysisParts.d.ts.map +1 -1
- package/dist/ui/workbench/OpenViewColumn.d.ts +28 -0
- package/dist/ui/workbench/OpenViewColumn.d.ts.map +1 -0
- package/dist/ui/workbench/OpeningSkeleton.d.ts.map +1 -1
- package/dist/ui/workbench/RecordParts.d.ts.map +1 -1
- package/dist/ui/workbench/SaveActions.d.ts.map +1 -1
- package/dist/ui/workbench/SearchBox.d.ts.map +1 -1
- package/dist/ui/workbench/Sidebar.d.ts.map +1 -1
- package/dist/ui/workbench/TitleBar.d.ts.map +1 -1
- package/dist/ui/workbench/ViewEngineProvider.d.ts +3 -1
- package/dist/ui/workbench/ViewEngineProvider.d.ts.map +1 -1
- package/dist/ui/workbench/ViewList.d.ts.map +1 -1
- package/dist/ui/workbench/WorkbenchShell.d.ts +6 -9
- package/dist/ui/workbench/WorkbenchShell.d.ts.map +1 -1
- package/dist/ui/workbench/useSidebarFold.d.ts +16 -27
- package/dist/ui/workbench/useSidebarFold.d.ts.map +1 -1
- package/dist/ui/workbench/useWorkbenchFolds.d.ts +1 -1
- package/dist/ui/workbench/useWorkbenchFolds.d.ts.map +1 -1
- package/dist/ui.js +13546 -13332
- package/dist/ui.js.map +1 -1
- package/dist/{viewRuntimeTypes-D08oR6Ke.js → viewEngine-DL-S0OAZ.js} +1962 -1662
- package/dist/viewEngine-DL-S0OAZ.js.map +1 -0
- package/package.json +18 -18
- package/dist/actions-ClYpI7gy.js.map +0 -1
- package/dist/react-Cqk337ck.js +0 -4202
- package/dist/react-Cqk337ck.js.map +0 -1
- package/dist/themes/azure.css +0 -126
- package/dist/themes/porcelain.css +0 -136
- package/dist/viewRuntimeTypes-D08oR6Ke.js.map +0 -1
package/dist/theme-check.mjs
CHANGED
|
@@ -5840,6 +5840,166 @@ import_postcss.default.Input;
|
|
|
5840
5840
|
import_postcss.default.Rule;
|
|
5841
5841
|
import_postcss.default.Root;
|
|
5842
5842
|
import_postcss.default.Node;
|
|
5843
|
+
// theme-check/colour.ts
|
|
5844
|
+
/**
|
|
5845
|
+
* The colour arithmetic the theme's resolver measures with
|
|
5846
|
+
* (ui/theme.md「质量门」): a colour as clipped sRGB with alpha, a relative
|
|
5847
|
+
* `oklch(from …)` worked out, two colours mixed in OKLab, one colour
|
|
5848
|
+
* composited over another the way the browser paints it, and the WCAG
|
|
5849
|
+
* contrast of an ink on a ground. Pure functions over colour values:
|
|
5850
|
+
* nothing here knows a layer, a preset or the registry, which are
|
|
5851
|
+
* `resolve.ts`'s.
|
|
5852
|
+
*/
|
|
5853
|
+
var toRgb = converter("rgb");
|
|
5854
|
+
var toOklab = converter("oklab");
|
|
5855
|
+
var toOklch = converter("oklch");
|
|
5856
|
+
/** A colour as sRGB with alpha, channels clipped to the gamut. */
|
|
5857
|
+
function rgba(color) {
|
|
5858
|
+
const rgb = toRgb(color);
|
|
5859
|
+
const clip = (channel) => Math.min(1, Math.max(0, channel));
|
|
5860
|
+
return {
|
|
5861
|
+
r: clip(rgb.r),
|
|
5862
|
+
g: clip(rgb.g),
|
|
5863
|
+
b: clip(rgb.b),
|
|
5864
|
+
alpha: rgb.alpha ?? 1
|
|
5865
|
+
};
|
|
5866
|
+
}
|
|
5867
|
+
/** Splits text at the spaces that are not inside brackets. */
|
|
5868
|
+
function splitWords(text) {
|
|
5869
|
+
const words = [];
|
|
5870
|
+
let depth = 0;
|
|
5871
|
+
let start = 0;
|
|
5872
|
+
for (let at = 0; at <= text.length; at += 1) {
|
|
5873
|
+
const char = text[at];
|
|
5874
|
+
if (char === "(") depth += 1;
|
|
5875
|
+
else if (char === ")") depth -= 1;
|
|
5876
|
+
else if ((char === " " || char === void 0) && depth === 0) {
|
|
5877
|
+
if (at > start) words.push(text.slice(start, at));
|
|
5878
|
+
start = at + 1;
|
|
5879
|
+
}
|
|
5880
|
+
}
|
|
5881
|
+
return words;
|
|
5882
|
+
}
|
|
5883
|
+
/** Splits a function's arguments at the commas that are not nested. */
|
|
5884
|
+
function splitArguments(text) {
|
|
5885
|
+
const parts = [];
|
|
5886
|
+
let depth = 0;
|
|
5887
|
+
let start = 0;
|
|
5888
|
+
for (let at = 0; at < text.length; at += 1) {
|
|
5889
|
+
const char = text[at];
|
|
5890
|
+
if (char === "(") depth += 1;
|
|
5891
|
+
else if (char === ")") depth -= 1;
|
|
5892
|
+
else if (char === "," && depth === 0) {
|
|
5893
|
+
parts.push(text.slice(start, at).trim());
|
|
5894
|
+
start = at + 1;
|
|
5895
|
+
}
|
|
5896
|
+
}
|
|
5897
|
+
parts.push(text.slice(start).trim());
|
|
5898
|
+
return parts;
|
|
5899
|
+
}
|
|
5900
|
+
/**
|
|
5901
|
+
* `oklch(from <colour> <l> <c> <h>)`, CSS Color 5's relative colour, as far
|
|
5902
|
+
* as the stylesheet writes it: each channel a number, the origin's own
|
|
5903
|
+
* channel (`l`, `c`, `h`), or `clamp()` / `min()` / `max()` of those.
|
|
5904
|
+
*/
|
|
5905
|
+
function relativeOklch(value, token) {
|
|
5906
|
+
const match = /^oklch\(from\s+([\s\S]+)\)$/.exec(value);
|
|
5907
|
+
if (!match) return void 0;
|
|
5908
|
+
const words = splitWords(match[1]);
|
|
5909
|
+
const [l, c, h] = words.slice(-3);
|
|
5910
|
+
const source = words.slice(0, -3).join(" ");
|
|
5911
|
+
const named = /^var\((--[\w-]+)\)$/.exec(source);
|
|
5912
|
+
const origin = named ? {
|
|
5913
|
+
mode: "rgb",
|
|
5914
|
+
...token(named[1])
|
|
5915
|
+
} : parse(source);
|
|
5916
|
+
if (!origin) throw new Error(`unreadable origin in ${value}`);
|
|
5917
|
+
const from = toOklch(origin);
|
|
5918
|
+
const channels = {
|
|
5919
|
+
l: from.l,
|
|
5920
|
+
c: from.c ?? 0,
|
|
5921
|
+
h: from.h ?? 0
|
|
5922
|
+
};
|
|
5923
|
+
const channel = (expression) => {
|
|
5924
|
+
const call = /^(clamp|min|max)\(([\s\S]+)\)$/.exec(expression);
|
|
5925
|
+
if (call) {
|
|
5926
|
+
const values = splitArguments(call[2]).map(channel);
|
|
5927
|
+
if (call[1] === "min") return Math.min(...values);
|
|
5928
|
+
if (call[1] === "max") return Math.max(...values);
|
|
5929
|
+
const [low, x, high] = values;
|
|
5930
|
+
return Math.max(low, Math.min(x, high));
|
|
5931
|
+
}
|
|
5932
|
+
if (expression in channels) return channels[expression];
|
|
5933
|
+
const number = Number.parseFloat(expression);
|
|
5934
|
+
if (Number.isNaN(number)) throw new Error(`unreadable ${expression}`);
|
|
5935
|
+
return number;
|
|
5936
|
+
};
|
|
5937
|
+
return {
|
|
5938
|
+
mode: "oklch",
|
|
5939
|
+
l: channel(l),
|
|
5940
|
+
c: channel(c),
|
|
5941
|
+
h: channel(h)
|
|
5942
|
+
};
|
|
5943
|
+
}
|
|
5944
|
+
/** `top` over `bottom`, as the browser composites it: in gamma-encoded sRGB. */
|
|
5945
|
+
function over(top, bottom) {
|
|
5946
|
+
const mix = (a, b) => a * top.alpha + b * (1 - top.alpha);
|
|
5947
|
+
return {
|
|
5948
|
+
r: mix(top.r, bottom.r),
|
|
5949
|
+
g: mix(top.g, bottom.g),
|
|
5950
|
+
b: mix(top.b, bottom.b),
|
|
5951
|
+
alpha: 1
|
|
5952
|
+
};
|
|
5953
|
+
}
|
|
5954
|
+
/**
|
|
5955
|
+
* `one` at the share `p` mixed with `other`, as `color-mix(in oklab, …)`
|
|
5956
|
+
* does: alpha premultiplied.
|
|
5957
|
+
*/
|
|
5958
|
+
function mix(one, p, other) {
|
|
5959
|
+
const q = 1 - p;
|
|
5960
|
+
const alpha = one.alpha * p + other.alpha * q;
|
|
5961
|
+
if (alpha === 0) return {
|
|
5962
|
+
r: 0,
|
|
5963
|
+
g: 0,
|
|
5964
|
+
b: 0,
|
|
5965
|
+
alpha: 0
|
|
5966
|
+
};
|
|
5967
|
+
const a = toOklab({
|
|
5968
|
+
mode: "rgb",
|
|
5969
|
+
...one
|
|
5970
|
+
});
|
|
5971
|
+
const b = toOklab({
|
|
5972
|
+
mode: "rgb",
|
|
5973
|
+
...other
|
|
5974
|
+
});
|
|
5975
|
+
const channel = (x, y) => (x * one.alpha * p + y * other.alpha * q) / alpha;
|
|
5976
|
+
return rgba({
|
|
5977
|
+
mode: "oklab",
|
|
5978
|
+
l: channel(a.l, b.l),
|
|
5979
|
+
a: channel(a.a, b.a),
|
|
5980
|
+
b: channel(a.b, b.b),
|
|
5981
|
+
alpha
|
|
5982
|
+
});
|
|
5983
|
+
}
|
|
5984
|
+
/** A token at a Tailwind opacity modifier (`bg-input/30`). */
|
|
5985
|
+
function at(color, opacity) {
|
|
5986
|
+
return {
|
|
5987
|
+
...color,
|
|
5988
|
+
alpha: color.alpha * opacity
|
|
5989
|
+
};
|
|
5990
|
+
}
|
|
5991
|
+
/** WCAG 2.x contrast between a colour and the opaque ground under it. */
|
|
5992
|
+
function contrast(ink, ground) {
|
|
5993
|
+
if (ground.alpha !== 1) throw new Error("a ground must be opaque");
|
|
5994
|
+
const drawn = over(ink, ground);
|
|
5995
|
+
return wcagContrast({
|
|
5996
|
+
mode: "rgb",
|
|
5997
|
+
...drawn
|
|
5998
|
+
}, {
|
|
5999
|
+
mode: "rgb",
|
|
6000
|
+
...ground
|
|
6001
|
+
});
|
|
6002
|
+
}
|
|
5843
6003
|
// src/ui/theme/pairs.ts
|
|
5844
6004
|
var texts = (...inks) => inks.map((ink) => ({
|
|
5845
6005
|
ink,
|
|
@@ -5931,7 +6091,7 @@ var MAP_GROUNDS = [["page", "background"], ["card", "card"]].flatMap(([where, to
|
|
|
5931
6091
|
...texts("primary"),
|
|
5932
6092
|
...STATUS,
|
|
5933
6093
|
...BADGES,
|
|
5934
|
-
...marks("rise", "fall", "primary"),
|
|
6094
|
+
...marks("rise-fill", "fall-fill", "primary"),
|
|
5935
6095
|
...EDGES
|
|
5936
6096
|
],
|
|
5937
6097
|
[
|
|
@@ -5948,7 +6108,7 @@ var MAP_GROUNDS = [["page", "background"], ["card", "card"]].flatMap(([where, to
|
|
|
5948
6108
|
...MAP_EDGE,
|
|
5949
6109
|
...STATUS,
|
|
5950
6110
|
...BADGES,
|
|
5951
|
-
...marks("rise", "fall", "primary"),
|
|
6111
|
+
...marks("rise-fill", "fall-fill", "primary"),
|
|
5952
6112
|
...EDGES
|
|
5953
6113
|
],
|
|
5954
6114
|
[
|
|
@@ -5965,7 +6125,7 @@ var MAP_GROUNDS = [["page", "background"], ["card", "card"]].flatMap(([where, to
|
|
|
5965
6125
|
...MAP_EDGE,
|
|
5966
6126
|
...STATUS,
|
|
5967
6127
|
...BADGES,
|
|
5968
|
-
...marks("rise", "fall", "primary"),
|
|
6128
|
+
...marks("rise-fill", "fall-fill", "primary"),
|
|
5969
6129
|
...EDGES
|
|
5970
6130
|
],
|
|
5971
6131
|
...MAP_GROUNDS,
|
|
@@ -5999,9 +6159,9 @@ var MAP_GROUNDS = [["page", "background"], ["card", "card"]].flatMap(([where, to
|
|
|
5999
6159
|
marks("ring"),
|
|
6000
6160
|
texts("item-selected-foreground"),
|
|
6001
6161
|
texts("outline-hover-foreground"),
|
|
6002
|
-
texts("outline-hover-foreground"),
|
|
6003
6162
|
texts("tooltip-foreground"),
|
|
6004
6163
|
texts("chart-tooltip-foreground", "muted-foreground"),
|
|
6164
|
+
texts("primary-fill-foreground"),
|
|
6005
6165
|
...[
|
|
6006
6166
|
"primary",
|
|
6007
6167
|
"secondary",
|
|
@@ -6012,63 +6172,23 @@ var MAP_GROUNDS = [["page", "background"], ["card", "card"]].flatMap(([where, to
|
|
|
6012
6172
|
layers: one(fill),
|
|
6013
6173
|
pairs: texts(`${fill}-foreground`)
|
|
6014
6174
|
})),
|
|
6015
|
-
...[
|
|
6016
|
-
["card", "card"],
|
|
6017
|
-
["page", "background"],
|
|
6018
|
-
["popover", "popover"],
|
|
6019
|
-
["sidebar", "sidebar"]
|
|
6020
|
-
].map(([where, token]) => ({
|
|
6021
|
-
name: `input wash on ${where}`,
|
|
6022
|
-
layers: washed(token, "input", .3),
|
|
6023
|
-
pairs: [
|
|
6024
|
-
...texts("foreground", "muted-foreground"),
|
|
6025
|
-
...QUIET,
|
|
6026
|
-
...EDGES
|
|
6027
|
-
],
|
|
6028
|
-
dark: true
|
|
6029
|
-
})),
|
|
6030
|
-
...[["header band", "table-header"], ["selected row", "row-selected"]].map(([where, token]) => ({
|
|
6031
|
-
name: `input wash on ${where}`,
|
|
6032
|
-
layers: washed(token, "input", .3),
|
|
6033
|
-
pairs: EDGES,
|
|
6034
|
-
dark: true
|
|
6035
|
-
})),
|
|
6036
6175
|
...[
|
|
6037
6176
|
["page", "background"],
|
|
6038
6177
|
["canvas", "canvas"],
|
|
6039
6178
|
["card", "card"],
|
|
6040
6179
|
["popover", "popover"]
|
|
6041
|
-
].flatMap(([where, token]) => [
|
|
6042
|
-
{
|
|
6043
|
-
|
|
6044
|
-
|
|
6045
|
-
|
|
6046
|
-
|
|
6047
|
-
|
|
6048
|
-
|
|
6049
|
-
|
|
6050
|
-
},
|
|
6051
|
-
|
|
6052
|
-
|
|
6053
|
-
layers: [{ token }, { token: "control-thumb" }],
|
|
6054
|
-
pairs: texts("foreground"),
|
|
6055
|
-
requires: "control-thumb"
|
|
6056
|
-
},
|
|
6057
|
-
{
|
|
6058
|
-
name: `input wash on control over ${where}`,
|
|
6059
|
-
layers: [
|
|
6060
|
-
{ token },
|
|
6061
|
-
{ token: "control" },
|
|
6062
|
-
{
|
|
6063
|
-
token: "input",
|
|
6064
|
-
alpha: .3
|
|
6065
|
-
}
|
|
6066
|
-
],
|
|
6067
|
-
pairs: [...texts("foreground", "muted-foreground"), ...EDGES],
|
|
6068
|
-
dark: true,
|
|
6069
|
-
requires: "control"
|
|
6070
|
-
}
|
|
6071
|
-
])
|
|
6180
|
+
].flatMap(([where, token]) => [{
|
|
6181
|
+
name: `control over ${where}`,
|
|
6182
|
+
layers: [{ token }, { token: "control" }],
|
|
6183
|
+
pairs: [...texts("foreground", "muted-foreground"), {
|
|
6184
|
+
ink: "ring",
|
|
6185
|
+
kind: "edge"
|
|
6186
|
+
}]
|
|
6187
|
+
}, {
|
|
6188
|
+
name: `control thumb over ${where}`,
|
|
6189
|
+
layers: [{ token }, { token: "control-thumb" }],
|
|
6190
|
+
pairs: texts("foreground")
|
|
6191
|
+
}])
|
|
6072
6192
|
];
|
|
6073
6193
|
/**
|
|
6074
6194
|
* Every pair a list of grounds holds in one mode, in its order — the
|
|
@@ -6076,7 +6196,7 @@ var MAP_GROUNDS = [["page", "background"], ["card", "card"]].flatMap(([where, to
|
|
|
6076
6196
|
* (theme-check).
|
|
6077
6197
|
*/
|
|
6078
6198
|
function expandPairs(grounds, mode) {
|
|
6079
|
-
return grounds.
|
|
6199
|
+
return grounds.flatMap(({ name: where, layers, pairs }) => pairs.filter((spec) => spec.mode === void 0 || spec.mode === mode).map(({ ink, kind, alpha, wash }) => {
|
|
6080
6200
|
return {
|
|
6081
6201
|
name: `${ink} ${wash !== void 0 ? "badge" : `${alpha === void 0 ? "" : `${Math.round(alpha * 100)}% `}${kind}`} on ${where}`,
|
|
6082
6202
|
kind,
|
|
@@ -6087,8 +6207,7 @@ function expandPairs(grounds, mode) {
|
|
|
6087
6207
|
ground: wash === void 0 ? layers : [...layers, {
|
|
6088
6208
|
token: ink,
|
|
6089
6209
|
alpha: wash
|
|
6090
|
-
}]
|
|
6091
|
-
...requires ? { requires } : {}
|
|
6210
|
+
}]
|
|
6092
6211
|
};
|
|
6093
6212
|
}));
|
|
6094
6213
|
}
|
|
@@ -6133,9 +6252,6 @@ var CONVENTIONS = [
|
|
|
6133
6252
|
"green-up",
|
|
6134
6253
|
"red-up"
|
|
6135
6254
|
];
|
|
6136
|
-
var toRgb = converter("rgb");
|
|
6137
|
-
var toOklab = converter("oklab");
|
|
6138
|
-
var toOklch = converter("oklch");
|
|
6139
6255
|
/** A declaration's value on one line, with no padding inside its brackets. */
|
|
6140
6256
|
var tidy = (value) => value.replace(/\s+/g, " ").replace(/\(\s+/g, "(").replace(/\s+\)/g, ")").trim();
|
|
6141
6257
|
var LIGHT_BLOCK = ".fve-root,\n.fve-tokens";
|
|
@@ -6156,110 +6272,27 @@ function presetBlocks(css) {
|
|
|
6156
6272
|
});
|
|
6157
6273
|
return found;
|
|
6158
6274
|
}
|
|
6159
|
-
/** A colour as sRGB with alpha, channels clipped to the gamut. */
|
|
6160
|
-
function rgba(color) {
|
|
6161
|
-
const rgb = toRgb(color);
|
|
6162
|
-
const clip = (channel) => Math.min(1, Math.max(0, channel));
|
|
6163
|
-
return {
|
|
6164
|
-
r: clip(rgb.r),
|
|
6165
|
-
g: clip(rgb.g),
|
|
6166
|
-
b: clip(rgb.b),
|
|
6167
|
-
alpha: rgb.alpha ?? 1
|
|
6168
|
-
};
|
|
6169
|
-
}
|
|
6170
|
-
/** Splits text at the spaces that are not inside brackets. */
|
|
6171
|
-
function splitWords(text) {
|
|
6172
|
-
const words = [];
|
|
6173
|
-
let depth = 0;
|
|
6174
|
-
let start = 0;
|
|
6175
|
-
for (let at = 0; at <= text.length; at += 1) {
|
|
6176
|
-
const char = text[at];
|
|
6177
|
-
if (char === "(") depth += 1;
|
|
6178
|
-
else if (char === ")") depth -= 1;
|
|
6179
|
-
else if ((char === " " || char === void 0) && depth === 0) {
|
|
6180
|
-
if (at > start) words.push(text.slice(start, at));
|
|
6181
|
-
start = at + 1;
|
|
6182
|
-
}
|
|
6183
|
-
}
|
|
6184
|
-
return words;
|
|
6185
|
-
}
|
|
6186
|
-
/** Splits a function's arguments at the commas that are not nested. */
|
|
6187
|
-
function splitArguments(text) {
|
|
6188
|
-
const parts = [];
|
|
6189
|
-
let depth = 0;
|
|
6190
|
-
let start = 0;
|
|
6191
|
-
for (let at = 0; at < text.length; at += 1) {
|
|
6192
|
-
const char = text[at];
|
|
6193
|
-
if (char === "(") depth += 1;
|
|
6194
|
-
else if (char === ")") depth -= 1;
|
|
6195
|
-
else if (char === "," && depth === 0) {
|
|
6196
|
-
parts.push(text.slice(start, at).trim());
|
|
6197
|
-
start = at + 1;
|
|
6198
|
-
}
|
|
6199
|
-
}
|
|
6200
|
-
parts.push(text.slice(start).trim());
|
|
6201
|
-
return parts;
|
|
6202
|
-
}
|
|
6203
|
-
/**
|
|
6204
|
-
* `oklch(from <colour> <l> <c> <h>)`, CSS Color 5's relative colour, as far
|
|
6205
|
-
* as the stylesheet writes it: each channel a number, the origin's own
|
|
6206
|
-
* channel (`l`, `c`, `h`), or `clamp()` / `min()` / `max()` of those.
|
|
6207
|
-
*/
|
|
6208
|
-
function relativeOklch(value) {
|
|
6209
|
-
const match = /^oklch\(from\s+([\s\S]+)\)$/.exec(value);
|
|
6210
|
-
if (!match) return void 0;
|
|
6211
|
-
const words = splitWords(match[1]);
|
|
6212
|
-
const [l, c, h] = words.slice(-3);
|
|
6213
|
-
const origin = parse(words.slice(0, -3).join(" "));
|
|
6214
|
-
if (!origin) throw new Error(`unreadable origin in ${value}`);
|
|
6215
|
-
const from = toOklch(origin);
|
|
6216
|
-
const channels = {
|
|
6217
|
-
l: from.l,
|
|
6218
|
-
c: from.c ?? 0,
|
|
6219
|
-
h: from.h ?? 0
|
|
6220
|
-
};
|
|
6221
|
-
const channel = (expression) => {
|
|
6222
|
-
const call = /^(clamp|min|max)\(([\s\S]+)\)$/.exec(expression);
|
|
6223
|
-
if (call) {
|
|
6224
|
-
const values = splitArguments(call[2]).map(channel);
|
|
6225
|
-
if (call[1] === "min") return Math.min(...values);
|
|
6226
|
-
if (call[1] === "max") return Math.max(...values);
|
|
6227
|
-
const [low, x, high] = values;
|
|
6228
|
-
return Math.max(low, Math.min(x, high));
|
|
6229
|
-
}
|
|
6230
|
-
if (expression in channels) return channels[expression];
|
|
6231
|
-
const number = Number.parseFloat(expression);
|
|
6232
|
-
if (Number.isNaN(number)) throw new Error(`unreadable ${expression}`);
|
|
6233
|
-
return number;
|
|
6234
|
-
};
|
|
6235
|
-
return {
|
|
6236
|
-
mode: "oklch",
|
|
6237
|
-
l: channel(l),
|
|
6238
|
-
c: channel(c),
|
|
6239
|
-
h: channel(h)
|
|
6240
|
-
};
|
|
6241
|
-
}
|
|
6242
6275
|
/**
|
|
6243
|
-
* `var(--fve-x, fallback)`, `var(--_fve-brand-x, fallback)
|
|
6276
|
+
* `var(--fve-x, fallback)`, `var(--_fve-brand-x, fallback)` (or `derived`),
|
|
6244
6277
|
* `var(--_fve-link-x, fallback)` or `var(--fvp-x, fallback)`, split at its
|
|
6245
6278
|
* first top-level comma — or with no fallback at all, a token with no
|
|
6246
6279
|
* built-in value (the controls group), which is unset until a theme gives
|
|
6247
6280
|
* it one.
|
|
6248
6281
|
*/
|
|
6249
6282
|
function layerReference(value) {
|
|
6250
|
-
const match = /^var\((--fv[ep]-[\w-]+|--_fve-(?:brand|link)-[\w-]+)(?:,\s*([\s\S]+))?\)$/.exec(value);
|
|
6283
|
+
const match = /^var\((--fv[ep]-[\w-]+|--_fve-(?:brand|derived|link)-[\w-]+)(?:,\s*([\s\S]+))?\)$/.exec(value);
|
|
6251
6284
|
return match ? [match[1], match[2]?.trim()] : void 0;
|
|
6252
6285
|
}
|
|
6253
6286
|
/**
|
|
6254
|
-
* A value with every `var(--fve-*)
|
|
6255
|
-
*
|
|
6256
|
-
* where
|
|
6257
|
-
* makes the whole value invalid.
|
|
6287
|
+
* A value with every `var(--fve-*)`, `var(--fvp-*)` and bound the block
|
|
6288
|
+
* resolved (`var(--_fve-brand-*)`) in it replaced by what `given` has for
|
|
6289
|
+
* it, innermost first, a fallback taken where it has none; `undefined` when
|
|
6290
|
+
* one is left with nothing, as CSS makes the whole value invalid.
|
|
6258
6291
|
*/
|
|
6259
6292
|
function substitute(value, given) {
|
|
6260
6293
|
const held = [];
|
|
6261
6294
|
let text = value;
|
|
6262
|
-
const innermost = /var\((--fv[ep]-[\w-]+)(?:,\s*([^()]*))?\)/;
|
|
6295
|
+
const innermost = /var\((--(?:fv[ep]|_fve-brand)-[\w-]+)(?:,\s*([^()]*))?\)/;
|
|
6263
6296
|
for (let match = innermost.exec(text); match; match = innermost.exec(text)) {
|
|
6264
6297
|
const [whole, variable, fallback] = match;
|
|
6265
6298
|
const set = given(variable);
|
|
@@ -6270,35 +6303,6 @@ function substitute(value, given) {
|
|
|
6270
6303
|
}
|
|
6271
6304
|
return text.replace(/§(\d+)/g, (_, at) => held[Number(at)]);
|
|
6272
6305
|
}
|
|
6273
|
-
/** `top` over `bottom`, as the browser composites it: in gamma-encoded sRGB. */
|
|
6274
|
-
function over(top, bottom) {
|
|
6275
|
-
const mix = (a, b) => a * top.alpha + b * (1 - top.alpha);
|
|
6276
|
-
return {
|
|
6277
|
-
r: mix(top.r, bottom.r),
|
|
6278
|
-
g: mix(top.g, bottom.g),
|
|
6279
|
-
b: mix(top.b, bottom.b),
|
|
6280
|
-
alpha: 1
|
|
6281
|
-
};
|
|
6282
|
-
}
|
|
6283
|
-
/** A token at a Tailwind opacity modifier (`bg-input/30`). */
|
|
6284
|
-
function at(color, opacity) {
|
|
6285
|
-
return {
|
|
6286
|
-
...color,
|
|
6287
|
-
alpha: color.alpha * opacity
|
|
6288
|
-
};
|
|
6289
|
-
}
|
|
6290
|
-
/** WCAG 2.x contrast between a colour and the opaque ground under it. */
|
|
6291
|
-
function contrast(ink, ground) {
|
|
6292
|
-
if (ground.alpha !== 1) throw new Error("a ground must be opaque");
|
|
6293
|
-
const drawn = over(ink, ground);
|
|
6294
|
-
return wcagContrast({
|
|
6295
|
-
mode: "rgb",
|
|
6296
|
-
...drawn
|
|
6297
|
-
}, {
|
|
6298
|
-
mode: "rgb",
|
|
6299
|
-
...ground
|
|
6300
|
-
});
|
|
6301
|
-
}
|
|
6302
6306
|
/** A resolver over one stylesheet, its presets and the registry. */
|
|
6303
6307
|
function createResolver({ styles, presets: presetText, registry }) {
|
|
6304
6308
|
const root = postcss_default.parse(styles);
|
|
@@ -6396,7 +6400,7 @@ function createResolver({ styles, presets: presetText, registry }) {
|
|
|
6396
6400
|
if (brandCache) return brandCache;
|
|
6397
6401
|
const declared = /* @__PURE__ */ new Map();
|
|
6398
6402
|
root.walkAtRules("supports", (supports) => {
|
|
6399
|
-
supports.walkDecls(/^--_fve-brand-/, (decl) => {
|
|
6403
|
+
supports.walkDecls(/^--_fve-(brand|derived)-/, (decl) => {
|
|
6400
6404
|
const rule = decl.parent;
|
|
6401
6405
|
declared.set(decl.prop, {
|
|
6402
6406
|
value: tidy(decl.value),
|
|
@@ -6432,14 +6436,14 @@ function createResolver({ styles, presets: presetText, registry }) {
|
|
|
6432
6436
|
const brand = /* @__PURE__ */ new Map();
|
|
6433
6437
|
for (const [variable, { value, charted }] of brandBlock()) {
|
|
6434
6438
|
if (charted && !brandChart) continue;
|
|
6435
|
-
const derived = substitute(value, layers);
|
|
6439
|
+
const derived = substitute(value, (v) => layers(v) ?? brand.get(v));
|
|
6436
6440
|
if (derived !== void 0) brand.set(variable, derived);
|
|
6437
6441
|
}
|
|
6438
6442
|
const layered = (value) => {
|
|
6439
6443
|
const reference = layerReference(value);
|
|
6440
6444
|
if (!reference) return value;
|
|
6441
6445
|
const [variable, fallback] = reference;
|
|
6442
|
-
const given =
|
|
6446
|
+
const given = /^--_fve-(brand|derived)-/.test(variable) ? brand.get(variable) : variable.startsWith("--_fve-link-") ? link(variable) : layers(variable);
|
|
6443
6447
|
const substituted = given !== void 0 && given !== "initial" ? substitute(given, layers) : void 0;
|
|
6444
6448
|
if (substituted !== void 0) return substituted;
|
|
6445
6449
|
return fallback === void 0 ? void 0 : layered(fallback);
|
|
@@ -6478,48 +6482,29 @@ function createResolver({ styles, presets: presetText, registry }) {
|
|
|
6478
6482
|
b: 0,
|
|
6479
6483
|
alpha: 0
|
|
6480
6484
|
};
|
|
6481
|
-
const relative = relativeOklch(value);
|
|
6485
|
+
const relative = relativeOklch(value, (name) => token(name, seen));
|
|
6482
6486
|
if (relative) return rgba(gamut === "clip" ? relative : clampChroma(relative, "oklch"));
|
|
6483
|
-
const
|
|
6484
|
-
if (
|
|
6485
|
-
const [first, second] = splitArguments(
|
|
6487
|
+
const call = /^color-mix\(in oklab,\s*([\s\S]+)\)$/.exec(value);
|
|
6488
|
+
if (call) {
|
|
6489
|
+
const [first, second] = splitArguments(call[1]);
|
|
6486
6490
|
const weighted = (part) => {
|
|
6487
|
-
const match = /^([\s\S]+?)\s+([\d.]+)
|
|
6488
|
-
|
|
6489
|
-
color: evaluate(match[1], seen),
|
|
6490
|
-
weight: Number(match[2]) / 100
|
|
6491
|
-
} : {
|
|
6491
|
+
const match = /^([\s\S]+?)\s+(?:([\d.]+)%|var\((--[\w-]+)\))$/.exec(part);
|
|
6492
|
+
if (!match) return {
|
|
6492
6493
|
color: evaluate(part, seen),
|
|
6493
6494
|
weight: void 0
|
|
6494
6495
|
};
|
|
6496
|
+
const found = text.get(match[3]);
|
|
6497
|
+
const share = match[2] ?? /^([\d.]+)%$/.exec(found ?? "")?.[1];
|
|
6498
|
+
if (share === void 0) throw new Error(`${match[3].replace(/^--(_fve-)?/, "")} is ${found}, not a percentage`);
|
|
6499
|
+
return {
|
|
6500
|
+
color: evaluate(match[1], seen),
|
|
6501
|
+
weight: Number(share) / 100
|
|
6502
|
+
};
|
|
6495
6503
|
};
|
|
6496
6504
|
const one = weighted(first);
|
|
6497
6505
|
const other = weighted(second);
|
|
6498
6506
|
const p = one.weight ?? 1 - (other.weight ?? .5);
|
|
6499
|
-
|
|
6500
|
-
const alpha = one.color.alpha * p + other.color.alpha * q;
|
|
6501
|
-
if (alpha === 0) return {
|
|
6502
|
-
r: 0,
|
|
6503
|
-
g: 0,
|
|
6504
|
-
b: 0,
|
|
6505
|
-
alpha: 0
|
|
6506
|
-
};
|
|
6507
|
-
const a = toOklab({
|
|
6508
|
-
mode: "rgb",
|
|
6509
|
-
...one.color
|
|
6510
|
-
});
|
|
6511
|
-
const b = toOklab({
|
|
6512
|
-
mode: "rgb",
|
|
6513
|
-
...other.color
|
|
6514
|
-
});
|
|
6515
|
-
const channel = (x, y) => (x * one.color.alpha * p + y * other.color.alpha * q) / alpha;
|
|
6516
|
-
return rgba({
|
|
6517
|
-
mode: "oklab",
|
|
6518
|
-
l: channel(a.l, b.l),
|
|
6519
|
-
a: channel(a.a, b.a),
|
|
6520
|
-
b: channel(a.b, b.b),
|
|
6521
|
-
alpha
|
|
6522
|
-
});
|
|
6507
|
+
return mix(one.color, p, other.color);
|
|
6523
6508
|
}
|
|
6524
6509
|
const parsed = parse(value);
|
|
6525
6510
|
if (!parsed) throw new Error(`unreadable colour ${value}`);
|
|
@@ -6555,7 +6540,7 @@ function createResolver({ styles, presets: presetText, registry }) {
|
|
|
6555
6540
|
};
|
|
6556
6541
|
const lines = linesOf(preset);
|
|
6557
6542
|
if (!pairs.has(mode)) pairs.set(mode, expandPairs(registry.grounds, mode));
|
|
6558
|
-
return pairs.get(mode).
|
|
6543
|
+
return pairs.get(mode).map(({ name, kind, ink, ground: [bottom, ...rest] }) => ({
|
|
6559
6544
|
name,
|
|
6560
6545
|
kind,
|
|
6561
6546
|
line: lines[kind],
|
|
@@ -6898,8 +6883,7 @@ function paletteGates(tokens, mode) {
|
|
|
6898
6883
|
});
|
|
6899
6884
|
}
|
|
6900
6885
|
const card = tokens.get("--card");
|
|
6901
|
-
const
|
|
6902
|
-
const ink = tokens.get("--foreground");
|
|
6886
|
+
const inks = ["dark", "light"].map((ink) => tokens.get(`--_fve-chart-ink-${ink}`));
|
|
6903
6887
|
palette.forEach((color, index) => {
|
|
6904
6888
|
const ratio = contrast(color, card);
|
|
6905
6889
|
if (ratio < 3) problems.push({
|
|
@@ -6910,9 +6894,9 @@ function paletteGates(tokens, mode) {
|
|
|
6910
6894
|
...color,
|
|
6911
6895
|
alpha: 1
|
|
6912
6896
|
};
|
|
6913
|
-
if (
|
|
6897
|
+
if (Math.max(...inks.map((ink) => contrast(ink, opaque))) < 4.5) problems.push({
|
|
6914
6898
|
severity: "error",
|
|
6915
|
-
message: `slot ${index + 1}: neither
|
|
6899
|
+
message: `slot ${index + 1}: neither chart-ink-dark nor chart-ink-light reads 4.5:1 inside it`
|
|
6916
6900
|
});
|
|
6917
6901
|
});
|
|
6918
6902
|
return problems;
|