nudge-ui 0.2.0
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/README.md +66 -0
- package/bin/nudge-ui.mjs +7 -0
- package/dist/LICENSE +21 -0
- package/dist/client.mjs +261 -0
- package/dist/compiler/ast.d.ts +18 -0
- package/dist/compiler/ast.js +75 -0
- package/dist/compiler/componentContractTypes.d.ts +19 -0
- package/dist/compiler/componentContractTypes.js +1 -0
- package/dist/compiler/componentContracts.d.ts +2 -0
- package/dist/compiler/componentContracts.js +260 -0
- package/dist/compiler/componentInstrumentation.d.ts +32 -0
- package/dist/compiler/componentInstrumentation.js +140 -0
- package/dist/compiler/componentPolicyResolution.d.ts +71 -0
- package/dist/compiler/componentPolicyResolution.js +388 -0
- package/dist/compiler/index.d.ts +9 -0
- package/dist/compiler/index.js +9 -0
- package/dist/compiler/packageComponentContracts.d.ts +32 -0
- package/dist/compiler/packageComponentContracts.js +308 -0
- package/dist/compiler/reactComponentProtocols.d.ts +145 -0
- package/dist/compiler/reactComponentProtocols.js +47 -0
- package/dist/compiler/reactIdentity.d.ts +15 -0
- package/dist/compiler/reactIdentity.js +339 -0
- package/dist/compiler/sourcePaths.d.ts +12 -0
- package/dist/compiler/sourcePaths.js +27 -0
- package/dist/css/dialects/index.d.ts +62 -0
- package/dist/css/dialects/index.js +103 -0
- package/dist/css/dialects/tailwind.d.ts +46 -0
- package/dist/css/dialects/tailwind.js +119 -0
- package/dist/css/dialects/vanillaExtract.d.ts +20 -0
- package/dist/css/dialects/vanillaExtract.js +32 -0
- package/dist/css/index.d.ts +10 -0
- package/dist/css/index.js +10 -0
- package/dist/css/model/index.d.ts +190 -0
- package/dist/css/model/index.js +10 -0
- package/dist/css/token-inventory/index.d.ts +26 -0
- package/dist/css/token-inventory/index.js +24 -0
- package/dist/css/token-inventory/inventory.d.ts +8 -0
- package/dist/css/token-inventory/inventory.js +421 -0
- package/dist/css/token-inventory/parseStylesheet.d.ts +16 -0
- package/dist/css/token-inventory/parseStylesheet.js +155 -0
- package/dist/css/token-inventory/policy.d.ts +47 -0
- package/dist/css/token-inventory/policy.js +50 -0
- package/dist/css/token-inventory/types.d.ts +97 -0
- package/dist/css/token-inventory/types.js +1 -0
- package/dist/css/value-semantics/borderSemantics.d.ts +28 -0
- package/dist/css/value-semantics/borderSemantics.js +91 -0
- package/dist/css/value-semantics/boxSemantics.d.ts +37 -0
- package/dist/css/value-semantics/boxSemantics.js +71 -0
- package/dist/css/value-semantics/colorSemantics.d.ts +99 -0
- package/dist/css/value-semantics/colorSemantics.js +526 -0
- package/dist/css/value-semantics/cssSyntax.d.ts +19 -0
- package/dist/css/value-semantics/cssSyntax.js +111 -0
- package/dist/css/value-semantics/fontSemantics.d.ts +35 -0
- package/dist/css/value-semantics/fontSemantics.js +131 -0
- package/dist/css/value-semantics/index.d.ts +20 -0
- package/dist/css/value-semantics/index.js +15 -0
- package/dist/css/value-semantics/propertyPolicy.d.ts +118 -0
- package/dist/css/value-semantics/propertyPolicy.js +356 -0
- package/dist/css/value-semantics/stringMaps.d.ts +2 -0
- package/dist/css/value-semantics/stringMaps.js +1 -0
- package/dist/css/value-semantics/structuredValues.d.ts +64 -0
- package/dist/css/value-semantics/structuredValues.js +250 -0
- package/dist/css/value-semantics/tokenInterpretation.d.ts +90 -0
- package/dist/css/value-semantics/tokenInterpretation.js +193 -0
- package/dist/css/virtual-design-tokens.d.ts +17 -0
- package/dist/hosts/astro/astroRuntimeConfig.d.ts +12 -0
- package/dist/hosts/astro/astroRuntimeConfig.js +26 -0
- package/dist/hosts/astro/clientAsset.d.ts +12 -0
- package/dist/hosts/astro/clientAsset.js +51 -0
- package/dist/hosts/astro/clientTransport.d.ts +3 -0
- package/dist/hosts/astro/clientTransport.js +57 -0
- package/dist/hosts/astro/index.d.ts +3 -0
- package/dist/hosts/astro/index.js +2 -0
- package/dist/hosts/astro/integration.d.ts +35 -0
- package/dist/hosts/astro/integration.js +96 -0
- package/dist/hosts/astro/middleware.d.ts +13 -0
- package/dist/hosts/astro/middleware.js +22 -0
- package/dist/hosts/astro/projectContext.d.ts +11 -0
- package/dist/hosts/astro/projectContext.js +34 -0
- package/dist/hosts/astro/responseInstrumentation.d.ts +41 -0
- package/dist/hosts/astro/responseInstrumentation.js +80 -0
- package/dist/hosts/next/index.d.ts +4 -0
- package/dist/hosts/next/index.js +7 -0
- package/dist/hosts/next/loader.d.ts +66 -0
- package/dist/hosts/next/loader.js +346 -0
- package/dist/hosts/next/loaders/identity-loader.cjs +228257 -0
- package/dist/hosts/next/loaders/loader-plugin.cjs +228257 -0
- package/dist/hosts/next/manifest.d.ts +38 -0
- package/dist/hosts/next/manifest.js +30 -0
- package/dist/hosts/next/mount.d.ts +12 -0
- package/dist/hosts/next/mount.js +23 -0
- package/dist/hosts/next/repositoryScope.d.ts +20 -0
- package/dist/hosts/next/repositoryScope.js +33 -0
- package/dist/hosts/next/sidecar.d.ts +27 -0
- package/dist/hosts/next/sidecar.js +526 -0
- package/dist/hosts/next/wrapper.d.ts +67 -0
- package/dist/hosts/next/wrapper.js +310 -0
- package/dist/hosts/static/cli.d.ts +12 -0
- package/dist/hosts/static/cli.js +77 -0
- package/dist/hosts/static/html/bootstrap.d.ts +27 -0
- package/dist/hosts/static/html/bootstrap.js +93 -0
- package/dist/hosts/static/index.d.ts +4 -0
- package/dist/hosts/static/index.js +4 -0
- package/dist/hosts/static/manifest.d.ts +18 -0
- package/dist/hosts/static/manifest.js +51 -0
- package/dist/hosts/static/server.d.ts +72 -0
- package/dist/hosts/static/server.js +554 -0
- package/dist/hosts/vite/index.d.ts +20 -0
- package/dist/hosts/vite/index.js +48 -0
- package/dist/hosts/vite/react.d.ts +67 -0
- package/dist/hosts/vite/react.js +231 -0
- package/dist/hosts/vite/tokens/activeStylesheets.d.ts +28 -0
- package/dist/hosts/vite/tokens/activeStylesheets.js +70 -0
- package/dist/hosts/vite/tokens/fileMap.d.ts +2 -0
- package/dist/hosts/vite/tokens/fileMap.js +1 -0
- package/dist/hosts/vite/tokens/viteStylesheetArtifacts.d.ts +46 -0
- package/dist/hosts/vite/tokens/viteStylesheetArtifacts.js +104 -0
- package/dist/hosts/vite/virtual/design-tokens.d.ts +9 -0
- package/dist/hosts/vite/virtual/design-tokens.js +7 -0
- package/dist/hosts/vite/virtual-design-tokens.d.ts +1 -0
- package/dist/hosts/vite/vite.d.ts +62 -0
- package/dist/hosts/vite/vite.js +854 -0
- package/dist/html/dom.d.ts +13 -0
- package/dist/html/dom.js +46 -0
- package/dist/html/identity.d.ts +40 -0
- package/dist/html/identity.js +196 -0
- package/dist/html/insertions.d.ts +26 -0
- package/dist/html/insertions.js +59 -0
- package/dist/inspector/agent/McpConnectionDialog.d.ts +26 -0
- package/dist/inspector/agent/McpConnectionDialog.js +135 -0
- package/dist/inspector/agent/client.d.ts +98 -0
- package/dist/inspector/agent/client.js +728 -0
- package/dist/inspector/agent/connectionStatus.d.ts +13 -0
- package/dist/inspector/agent/connectionStatus.js +35 -0
- package/dist/inspector/agent/httpTransport.d.ts +21 -0
- package/dist/inspector/agent/httpTransport.js +347 -0
- package/dist/inspector/agent/protocol.d.ts +95 -0
- package/dist/inspector/agent/protocol.js +9 -0
- package/dist/inspector/agent/verification.d.ts +39 -0
- package/dist/inspector/agent/verification.js +207 -0
- package/dist/inspector/canvas/CanvasCard.d.ts +10 -0
- package/dist/inspector/canvas/CanvasCard.js +275 -0
- package/dist/inspector/canvas/CanvasElementOverlay.d.ts +2 -0
- package/dist/inspector/canvas/CanvasElementOverlay.js +301 -0
- package/dist/inspector/canvas/CanvasWorkspace.d.ts +2 -0
- package/dist/inspector/canvas/CanvasWorkspace.js +301 -0
- package/dist/inspector/canvas/LockedWorkspaceNotice.d.ts +6 -0
- package/dist/inspector/canvas/LockedWorkspaceNotice.js +17 -0
- package/dist/inspector/canvas/StaleChangeIndicator.d.ts +7 -0
- package/dist/inspector/canvas/StaleChangeIndicator.js +43 -0
- package/dist/inspector/canvas/agentPresentation.d.ts +87 -0
- package/dist/inspector/canvas/agentPresentation.js +421 -0
- package/dist/inspector/canvas/canvasGestures.d.ts +12 -0
- package/dist/inspector/canvas/canvasGestures.js +21 -0
- package/dist/inspector/canvas/canvasStore.d.ts +108 -0
- package/dist/inspector/canvas/canvasStore.js +448 -0
- package/dist/inspector/canvas/frameProtocol.d.ts +231 -0
- package/dist/inspector/canvas/frameProtocol.js +165 -0
- package/dist/inspector/canvas/linkEligibility.d.ts +8 -0
- package/dist/inspector/canvas/linkEligibility.js +68 -0
- package/dist/inspector/canvas/measurementProjection.d.ts +8 -0
- package/dist/inspector/canvas/measurementProjection.js +16 -0
- package/dist/inspector/canvas/normalizeUrl.d.ts +7 -0
- package/dist/inspector/canvas/normalizeUrl.js +27 -0
- package/dist/inspector/canvas/projection.d.ts +41 -0
- package/dist/inspector/canvas/projection.js +232 -0
- package/dist/inspector/canvas/rendererBootstrap.d.ts +4 -0
- package/dist/inspector/canvas/rendererBootstrap.js +410 -0
- package/dist/inspector/canvas/rendererCidIndex.d.ts +11 -0
- package/dist/inspector/canvas/rendererCidIndex.js +21 -0
- package/dist/inspector/canvas/rendererElementSelector.d.ts +2 -0
- package/dist/inspector/canvas/rendererElementSelector.js +378 -0
- package/dist/inspector/canvas/rendererSelectionProxy.d.ts +2 -0
- package/dist/inspector/canvas/rendererSelectionProxy.js +61 -0
- package/dist/inspector/canvas/rendererStylesheet.d.ts +16 -0
- package/dist/inspector/canvas/rendererStylesheet.js +221 -0
- package/dist/inspector/canvas/resizeHandleScale.d.ts +13 -0
- package/dist/inspector/canvas/resizeHandleScale.js +20 -0
- package/dist/inspector/canvas/roleDetection.d.ts +5 -0
- package/dist/inspector/canvas/roleDetection.js +21 -0
- package/dist/inspector/canvas/sessionStore.d.ts +71 -0
- package/dist/inspector/canvas/sessionStore.js +453 -0
- package/dist/inspector/canvas/staleChangeDetector.d.ts +11 -0
- package/dist/inspector/canvas/staleChangeDetector.js +217 -0
- package/dist/inspector/canvas/toolbarScale.d.ts +7 -0
- package/dist/inspector/canvas/toolbarScale.js +11 -0
- package/dist/inspector/canvas/workspaceLease.d.ts +26 -0
- package/dist/inspector/canvas/workspaceLease.js +214 -0
- package/dist/inspector/changes/changesLog.d.ts +46 -0
- package/dist/inspector/changes/changesLog.js +209 -0
- package/dist/inspector/changes/codecs.d.ts +98 -0
- package/dist/inspector/changes/codecs.js +389 -0
- package/dist/inspector/changes/editModel.d.ts +74 -0
- package/dist/inspector/changes/editModel.js +120 -0
- package/dist/inspector/changes/managedStyleProjection.d.ts +6 -0
- package/dist/inspector/changes/managedStyleProjection.js +109 -0
- package/dist/inspector/changes/model.d.ts +13 -0
- package/dist/inspector/changes/model.js +163 -0
- package/dist/inspector/changes/presentation.d.ts +14 -0
- package/dist/inspector/changes/presentation.js +81 -0
- package/dist/inspector/changes/previewDiagnostics.d.ts +39 -0
- package/dist/inspector/changes/previewDiagnostics.js +172 -0
- package/dist/inspector/changes/structuralTypes.d.ts +35 -0
- package/dist/inspector/changes/structuralTypes.js +1 -0
- package/dist/inspector/changes/types.d.ts +76 -0
- package/dist/inspector/changes/types.js +16 -0
- package/dist/inspector/changes/workspaceChanges.d.ts +43 -0
- package/dist/inspector/changes/workspaceChanges.js +239 -0
- package/dist/inspector/clientManifest.d.ts +24 -0
- package/dist/inspector/clientManifest.js +69 -0
- package/dist/inspector/componentSemantics/ComponentPropsSection.d.ts +5 -0
- package/dist/inspector/componentSemantics/ComponentPropsSection.js +44 -0
- package/dist/inspector/componentSemantics/adapterRegistry.d.ts +11 -0
- package/dist/inspector/componentSemantics/adapterRegistry.js +75 -0
- package/dist/inspector/componentSemantics/boundaries.d.ts +2 -0
- package/dist/inspector/componentSemantics/boundaries.js +10 -0
- package/dist/inspector/componentSemantics/changeAction.d.ts +3 -0
- package/dist/inspector/componentSemantics/changeAction.js +6 -0
- package/dist/inspector/componentSemantics/changeModel.d.ts +8 -0
- package/dist/inspector/componentSemantics/changeModel.js +60 -0
- package/dist/inspector/componentSemantics/index.d.ts +4 -0
- package/dist/inspector/componentSemantics/index.js +2 -0
- package/dist/inspector/componentSemantics/reactRuntime.d.ts +10 -0
- package/dist/inspector/componentSemantics/reactRuntime.js +186 -0
- package/dist/inspector/componentSemantics/runtimeBridge.d.ts +25 -0
- package/dist/inspector/componentSemantics/runtimeBridge.js +161 -0
- package/dist/inspector/componentSemantics/runtimeTypes.d.ts +2 -0
- package/dist/inspector/componentSemantics/runtimeTypes.js +1 -0
- package/dist/inspector/componentSemantics/textBinding.d.ts +69 -0
- package/dist/inspector/componentSemantics/textBinding.js +514 -0
- package/dist/inspector/componentSemantics/types.d.ts +96 -0
- package/dist/inspector/componentSemantics/types.js +5 -0
- package/dist/inspector/conformance/borderCases.d.ts +7 -0
- package/dist/inspector/conformance/borderCases.js +428 -0
- package/dist/inspector/conformance/colorCases.d.ts +8 -0
- package/dist/inspector/conformance/colorCases.js +470 -0
- package/dist/inspector/conformance/fixture.d.ts +68 -0
- package/dist/inspector/conformance/fixture.js +153 -0
- package/dist/inspector/conformance/projection.d.ts +2 -0
- package/dist/inspector/conformance/projection.js +3 -0
- package/dist/inspector/conformance/spacingCases.d.ts +6 -0
- package/dist/inspector/conformance/spacingCases.js +417 -0
- package/dist/inspector/conformance/typographyCases.d.ts +7 -0
- package/dist/inspector/conformance/typographyCases.js +174 -0
- package/dist/inspector/editScope.d.ts +4 -0
- package/dist/inspector/editScope.js +5 -0
- package/dist/inspector/index.d.ts +20 -0
- package/dist/inspector/index.js +236 -0
- package/dist/inspector/inline-text/inlineTextEditor.d.ts +74 -0
- package/dist/inspector/inline-text/inlineTextEditor.js +1207 -0
- package/dist/inspector/inline-text/inlineTextLifecycle.d.ts +2 -0
- package/dist/inspector/inline-text/inlineTextLifecycle.js +17 -0
- package/dist/inspector/inline-text/textChangeBoundary.d.ts +6 -0
- package/dist/inspector/inline-text/textChangeBoundary.js +1 -0
- package/dist/inspector/inspection/bridge.d.ts +72 -0
- package/dist/inspector/inspection/bridge.js +134 -0
- package/dist/inspector/inspection/browserCssInspection.d.ts +74 -0
- package/dist/inspector/inspection/browserCssInspection.js +317 -0
- package/dist/inspector/inspection/browserCssInspectionRegistry.d.ts +12 -0
- package/dist/inspector/inspection/browserCssInspectionRegistry.js +66 -0
- package/dist/inspector/inspection/selectionProperty.d.ts +32 -0
- package/dist/inspector/inspection/selectionProperty.js +33 -0
- package/dist/inspector/inspection/useBrowserCssInspection.d.ts +20 -0
- package/dist/inspector/inspection/useBrowserCssInspection.js +159 -0
- package/dist/inspector/overlay/DropGuideOverlay.d.ts +17 -0
- package/dist/inspector/overlay/DropGuideOverlay.js +17 -0
- package/dist/inspector/overlay/InspectorOverlay.d.ts +5 -0
- package/dist/inspector/overlay/InspectorOverlay.js +328 -0
- package/dist/inspector/overlay/MeasurementGuideOverlay.d.ts +19 -0
- package/dist/inspector/overlay/MeasurementGuideOverlay.js +40 -0
- package/dist/inspector/overlay/clickPolicy.d.ts +7 -0
- package/dist/inspector/overlay/clickPolicy.js +13 -0
- package/dist/inspector/overlay/dropGuide.d.ts +22 -0
- package/dist/inspector/overlay/dropGuide.js +48 -0
- package/dist/inspector/overlay/elementSelector.d.ts +1 -0
- package/dist/inspector/overlay/elementSelector.js +100 -0
- package/dist/inspector/overlay/frameThrottle.d.ts +10 -0
- package/dist/inspector/overlay/frameThrottle.js +38 -0
- package/dist/inspector/overlay/interactionStyles.d.ts +3 -0
- package/dist/inspector/overlay/interactionStyles.js +70 -0
- package/dist/inspector/overlay/measurementGeometry.d.ts +25 -0
- package/dist/inspector/overlay/measurementGeometry.js +104 -0
- package/dist/inspector/overlay/overlayGeometry.d.ts +40 -0
- package/dist/inspector/overlay/overlayGeometry.js +59 -0
- package/dist/inspector/overlay/selectedGeometry.d.ts +7 -0
- package/dist/inspector/overlay/selectedGeometry.js +51 -0
- package/dist/inspector/overlay/structuralGestures.d.ts +28 -0
- package/dist/inspector/overlay/structuralGestures.js +180 -0
- package/dist/inspector/projection/cssEscapes.d.ts +3 -0
- package/dist/inspector/projection/cssEscapes.js +20 -0
- package/dist/inspector/projection/managedStylesheet.d.ts +33 -0
- package/dist/inspector/projection/managedStylesheet.js +240 -0
- package/dist/inspector/projection/renderedInstance.d.ts +56 -0
- package/dist/inspector/projection/renderedInstance.js +306 -0
- package/dist/inspector/projection/structuralProjection.d.ts +93 -0
- package/dist/inspector/projection/structuralProjection.js +560 -0
- package/dist/inspector/projection/structuralProjectionBoundary.d.ts +5 -0
- package/dist/inspector/projection/structuralProjectionBoundary.js +65 -0
- package/dist/inspector/projection/textProjection.d.ts +53 -0
- package/dist/inspector/projection/textProjection.js +705 -0
- package/dist/inspector/projection/workspaceProjection.d.ts +43 -0
- package/dist/inspector/projection/workspaceProjection.js +58 -0
- package/dist/inspector/prompt/PromptSettingsDialog.d.ts +15 -0
- package/dist/inspector/prompt/PromptSettingsDialog.js +17 -0
- package/dist/inspector/prompt/clipboardHandoff.d.ts +34 -0
- package/dist/inspector/prompt/clipboardHandoff.js +212 -0
- package/dist/inspector/prompt/copyToClipboard.d.ts +1 -0
- package/dist/inspector/prompt/copyToClipboard.js +34 -0
- package/dist/inspector/prompt/detectFramework.d.ts +6 -0
- package/dist/inspector/prompt/detectFramework.js +4 -0
- package/dist/inspector/prompt/generatePrompt.d.ts +7 -0
- package/dist/inspector/prompt/generatePrompt.js +391 -0
- package/dist/inspector/prompt/promptSettings.d.ts +8 -0
- package/dist/inspector/prompt/promptSettings.js +28 -0
- package/dist/inspector/runtime/devFlag.d.ts +28 -0
- package/dist/inspector/runtime/devFlag.js +50 -0
- package/dist/inspector/runtime/documentStylesheetOrder.d.ts +19 -0
- package/dist/inspector/runtime/documentStylesheetOrder.js +89 -0
- package/dist/inspector/runtime/domRealm.d.ts +4 -0
- package/dist/inspector/runtime/domRealm.js +11 -0
- package/dist/inspector/runtime/runtimeConfig.d.ts +119 -0
- package/dist/inspector/runtime/runtimeConfig.js +276 -0
- package/dist/inspector/runtime/staticHtmlRuntimeIdentity.d.ts +32 -0
- package/dist/inspector/runtime/staticHtmlRuntimeIdentity.js +149 -0
- package/dist/inspector/runtime/useRuntimeConfig.d.ts +10 -0
- package/dist/inspector/runtime/useRuntimeConfig.js +13 -0
- package/dist/inspector/selection/editScope.d.ts +32 -0
- package/dist/inspector/selection/editScope.js +140 -0
- package/dist/inspector/selection/editTarget.d.ts +8 -0
- package/dist/inspector/selection/editTarget.js +11 -0
- package/dist/inspector/selection/hierarchy.d.ts +7 -0
- package/dist/inspector/selection/hierarchy.js +42 -0
- package/dist/inspector/selection/resolveSelection.d.ts +10 -0
- package/dist/inspector/selection/resolveSelection.js +60 -0
- package/dist/inspector/selection/selectionStore.d.ts +41 -0
- package/dist/inspector/selection/selectionStore.js +262 -0
- package/dist/inspector/selection/selectionTarget.d.ts +5 -0
- package/dist/inspector/selection/selectionTarget.js +50 -0
- package/dist/inspector/selection/sourceSite.d.ts +2 -0
- package/dist/inspector/selection/sourceSite.js +12 -0
- package/dist/inspector/selection/styleSelection.d.ts +22 -0
- package/dist/inspector/selection/styleSelection.js +104 -0
- package/dist/inspector/session/index.d.ts +3 -0
- package/dist/inspector/session/index.js +2 -0
- package/dist/inspector/session/lifecycle.d.ts +22 -0
- package/dist/inspector/session/lifecycle.js +63 -0
- package/dist/inspector/session/sessionContext.d.ts +21 -0
- package/dist/inspector/session/sessionContext.js +28 -0
- package/dist/inspector/session/sessionFactory.d.ts +29 -0
- package/dist/inspector/session/sessionFactory.js +73 -0
- package/dist/inspector/settings/SettingsDialog.d.ts +12 -0
- package/dist/inspector/settings/SettingsDialog.js +46 -0
- package/dist/inspector/shell/AppShell.d.ts +2 -0
- package/dist/inspector/shell/AppShell.js +9 -0
- package/dist/inspector/shell/ChangesLog.d.ts +6 -0
- package/dist/inspector/shell/ChangesLog.js +92 -0
- package/dist/inspector/shell/CopyPromptButton.d.ts +9 -0
- package/dist/inspector/shell/CopyPromptButton.js +159 -0
- package/dist/inspector/shell/DomNavigation.d.ts +8 -0
- package/dist/inspector/shell/DomNavigation.js +30 -0
- package/dist/inspector/shell/EmptyState.d.ts +2 -0
- package/dist/inspector/shell/EmptyState.js +15 -0
- package/dist/inspector/shell/InspectorShell.d.ts +11 -0
- package/dist/inspector/shell/InspectorShell.js +268 -0
- package/dist/inspector/shell/openStore.d.ts +6 -0
- package/dist/inspector/shell/openStore.js +29 -0
- package/dist/inspector/shell/panelLayout.d.ts +2 -0
- package/dist/inspector/shell/panelLayout.js +29 -0
- package/dist/inspector/shell/shortcuts.d.ts +3 -0
- package/dist/inspector/shell/shortcuts.js +25 -0
- package/dist/inspector/shell/stateValue.d.ts +3 -0
- package/dist/inspector/shell/stateValue.js +34 -0
- package/dist/inspector/shell/styleState.d.ts +7 -0
- package/dist/inspector/shell/styleState.js +13 -0
- package/dist/inspector/spacing/projection.d.ts +43 -0
- package/dist/inspector/spacing/projection.js +136 -0
- package/dist/inspector/styleEditors/AppearanceSection.d.ts +13 -0
- package/dist/inspector/styleEditors/AppearanceSection.js +6 -0
- package/dist/inspector/styleEditors/AspectRatioField.d.ts +17 -0
- package/dist/inspector/styleEditors/AspectRatioField.js +10 -0
- package/dist/inspector/styleEditors/BorderEditor.d.ts +13 -0
- package/dist/inspector/styleEditors/BorderEditor.js +295 -0
- package/dist/inspector/styleEditors/BorderRadiusEditor.d.ts +14 -0
- package/dist/inspector/styleEditors/BorderRadiusEditor.js +108 -0
- package/dist/inspector/styleEditors/BoxShadowEditor.d.ts +13 -0
- package/dist/inspector/styleEditors/BoxShadowEditor.js +13 -0
- package/dist/inspector/styleEditors/ColorPicker.d.ts +15 -0
- package/dist/inspector/styleEditors/ColorPicker.js +73 -0
- package/dist/inspector/styleEditors/GapField.d.ts +17 -0
- package/dist/inspector/styleEditors/GapField.js +12 -0
- package/dist/inspector/styleEditors/GridChildSection.d.ts +14 -0
- package/dist/inspector/styleEditors/GridChildSection.js +91 -0
- package/dist/inspector/styleEditors/GridPicker.d.ts +13 -0
- package/dist/inspector/styleEditors/GridPicker.js +179 -0
- package/dist/inspector/styleEditors/GridSection.d.ts +17 -0
- package/dist/inspector/styleEditors/GridSection.js +27 -0
- package/dist/inspector/styleEditors/GridValueField.d.ts +17 -0
- package/dist/inspector/styleEditors/GridValueField.js +70 -0
- package/dist/inspector/styleEditors/InsetSection.d.ts +15 -0
- package/dist/inspector/styleEditors/InsetSection.js +15 -0
- package/dist/inspector/styleEditors/LayoutBlockedIndicator.d.ts +6 -0
- package/dist/inspector/styleEditors/LayoutBlockedIndicator.js +6 -0
- package/dist/inspector/styleEditors/LayoutComboField.d.ts +18 -0
- package/dist/inspector/styleEditors/LayoutComboField.js +138 -0
- package/dist/inspector/styleEditors/LayoutDropdown.d.ts +14 -0
- package/dist/inspector/styleEditors/LayoutDropdown.js +34 -0
- package/dist/inspector/styleEditors/LayoutSection.d.ts +13 -0
- package/dist/inspector/styleEditors/LayoutSection.js +342 -0
- package/dist/inspector/styleEditors/OpacityEditor.d.ts +13 -0
- package/dist/inspector/styleEditors/OpacityEditor.js +34 -0
- package/dist/inspector/styleEditors/PositionInsets.d.ts +15 -0
- package/dist/inspector/styleEditors/PositionInsets.js +12 -0
- package/dist/inspector/styleEditors/SpacingBox.d.ts +29 -0
- package/dist/inspector/styleEditors/SpacingBox.js +189 -0
- package/dist/inspector/styleEditors/Typography.d.ts +13 -0
- package/dist/inspector/styleEditors/Typography.js +137 -0
- package/dist/inspector/styleEditors/completeCssValue.d.ts +8 -0
- package/dist/inspector/styleEditors/completeCssValue.js +34 -0
- package/dist/inspector/styleEditors/gridChildModel.d.ts +74 -0
- package/dist/inspector/styleEditors/gridChildModel.js +138 -0
- package/dist/inspector/styleEditors/layoutValue.d.ts +24 -0
- package/dist/inspector/styleEditors/layoutValue.js +103 -0
- package/dist/inspector/styleEditors/nudgeValue.d.ts +8 -0
- package/dist/inspector/styleEditors/nudgeValue.js +71 -0
- package/dist/inspector/styleEditors/rowLookup.d.ts +11 -0
- package/dist/inspector/styleEditors/rowLookup.js +13 -0
- package/dist/inspector/styleEditors/stringRecord.d.ts +4 -0
- package/dist/inspector/styleEditors/stringRecord.js +1 -0
- package/dist/inspector/styleEditors/valuePolicy.d.ts +20 -0
- package/dist/inspector/styleEditors/valuePolicy.js +82 -0
- package/dist/inspector/testing.d.ts +10 -0
- package/dist/inspector/testing.js +9 -0
- package/dist/inspector/tokens/TokenChip.d.ts +24 -0
- package/dist/inspector/tokens/TokenChip.js +23 -0
- package/dist/inspector/tokens/TokenDropdown.d.ts +13 -0
- package/dist/inspector/tokens/TokenDropdown.js +59 -0
- package/dist/inspector/tokens/TokenField.d.ts +68 -0
- package/dist/inspector/tokens/TokenField.js +485 -0
- package/dist/inspector/tokens/TokenLabel.d.ts +7 -0
- package/dist/inspector/tokens/TokenLabel.js +23 -0
- package/dist/inspector/tokens/TokensPanel.d.ts +5 -0
- package/dist/inspector/tokens/TokensPanel.js +47 -0
- package/dist/inspector/tokens/catalog.d.ts +51 -0
- package/dist/inspector/tokens/catalog.js +184 -0
- package/dist/inspector/tokens/editActions.d.ts +35 -0
- package/dist/inspector/tokens/editActions.js +164 -0
- package/dist/inspector/tokens/resolution/cascade.d.ts +14 -0
- package/dist/inspector/tokens/resolution/cascade.js +31 -0
- package/dist/inspector/tokens/resolution/cssomCollector.d.ts +43 -0
- package/dist/inspector/tokens/resolution/cssomCollector.js +528 -0
- package/dist/inspector/tokens/resolution/selectorSemantics.d.ts +12 -0
- package/dist/inspector/tokens/resolution/selectorSemantics.js +106 -0
- package/dist/inspector/tokens/resolution.d.ts +56 -0
- package/dist/inspector/tokens/resolution.js +1401 -0
- package/dist/inspector/tokens/tokenEdits.d.ts +3 -0
- package/dist/inspector/tokens/tokenEdits.js +22 -0
- package/dist/inspector/tokens/valueSemanticsAdapter.d.ts +6 -0
- package/dist/inspector/tokens/valueSemanticsAdapter.js +68 -0
- package/dist/inspector/ui/AtRuleContext.d.ts +18 -0
- package/dist/inspector/ui/AtRuleContext.js +54 -0
- package/dist/inspector/ui/Button.d.ts +9 -0
- package/dist/inspector/ui/Button.js +4 -0
- package/dist/inspector/ui/ColorSwatch.d.ts +7 -0
- package/dist/inspector/ui/ColorSwatch.js +6 -0
- package/dist/inspector/ui/ControlSurface.d.ts +14 -0
- package/dist/inspector/ui/ControlSurface.js +10 -0
- package/dist/inspector/ui/FieldRow.d.ts +14 -0
- package/dist/inspector/ui/FieldRow.js +15 -0
- package/dist/inspector/ui/IconButton.d.ts +14 -0
- package/dist/inspector/ui/IconButton.js +5 -0
- package/dist/inspector/ui/InspectorPopover.d.ts +17 -0
- package/dist/inspector/ui/InspectorPopover.js +13 -0
- package/dist/inspector/ui/PopoverListbox.d.ts +37 -0
- package/dist/inspector/ui/PopoverListbox.js +21 -0
- package/dist/inspector/ui/SegmentedControl.d.ts +24 -0
- package/dist/inspector/ui/SegmentedControl.js +16 -0
- package/dist/inspector/ui/Select.d.ts +25 -0
- package/dist/inspector/ui/Select.js +56 -0
- package/dist/inspector/ui/SideValuesField.d.ts +44 -0
- package/dist/inspector/ui/SideValuesField.js +76 -0
- package/dist/inspector/ui/StatusCallout.d.ts +9 -0
- package/dist/inspector/ui/StatusCallout.js +4 -0
- package/dist/inspector/ui/TextInput.d.ts +12 -0
- package/dist/inspector/ui/TextInput.js +5 -0
- package/dist/inspector/ui/ToggleButton.d.ts +11 -0
- package/dist/inspector/ui/ToggleButton.js +6 -0
- package/dist/inspector/ui/assets/grid.svg +14 -0
- package/dist/inspector/ui/css.d.ts +9 -0
- package/dist/inspector/ui/labels.d.ts +1 -0
- package/dist/inspector/ui/labels.js +7 -0
- package/dist/inspector/ui/styles.d.ts +1 -0
- package/dist/inspector/ui/styles.js +68 -0
- package/dist/inspector/virtual-modules.d.ts +7 -0
- package/dist/inspector/vite-env.d.ts +10 -0
- package/dist/internal/agent-protocol.d.ts +232 -0
- package/dist/internal/agent-protocol.js +237 -0
- package/dist/nudge-ui.mjs +15722 -0
- package/dist/project/files.d.ts +19 -0
- package/dist/project/files.js +226 -0
- package/dist/project/identity.d.ts +6 -0
- package/dist/project/identity.js +19 -0
- package/dist/project/pathPolicy.d.ts +8 -0
- package/dist/project/pathPolicy.js +12 -0
- package/dist/project/tokens.d.ts +36 -0
- package/dist/project/tokens.js +223 -0
- package/dist/transport/index.d.ts +8 -0
- package/dist/transport/index.js +8 -0
- package/dist/transport/routes.d.ts +13 -0
- package/dist/transport/routes.js +16 -0
- package/package.json +137 -0
|
@@ -0,0 +1,470 @@
|
|
|
1
|
+
function token(cssName, value, source) {
|
|
2
|
+
return {
|
|
3
|
+
cssName,
|
|
4
|
+
name: cssName,
|
|
5
|
+
declarations: [{ value, source, important: false, context: { selector: ":root" } }],
|
|
6
|
+
};
|
|
7
|
+
}
|
|
8
|
+
const COLOR_TEXT_PRIMARY = token("--color-text-primary", "#1a1a2e", "fixtures/color.css:1");
|
|
9
|
+
const COLOR_TEXT_SECONDARY = token("--color-text-secondary", "#52526b", "fixtures/color.css:2");
|
|
10
|
+
const COLOR_SURFACE_RAISED = token("--color-surface-raised", "#ffffff", "fixtures/color.css:3");
|
|
11
|
+
const COLOR_SURFACE_SUNKEN = token("--color-surface-sunken", "#f5f5f0", "fixtures/color.css:4");
|
|
12
|
+
const COLOR_SURFACE = token("--color-surface", "#fafafa", "fixtures/color.css:5");
|
|
13
|
+
const COLOR_ACCENT = token("--color-accent", "oklch(63% .2 25)", "fixtures/color.css:6");
|
|
14
|
+
const COLOR_PRIMARY = token("--color-primary", "#2563eb", "fixtures/color.css:7");
|
|
15
|
+
const COLOR_DANGER = token("--color-danger", "#dc2626", "fixtures/color.css:8");
|
|
16
|
+
const OPACITY_MUTED = token("--opacity-muted", "0.35", "fixtures/color.css:9");
|
|
17
|
+
/**
|
|
18
|
+
* Framework-neutral color corpus covering `color` and `background-color`.
|
|
19
|
+
* Each fixture asserts authored CSS values and capability against the
|
|
20
|
+
* inspector's resolution pipeline. The gallery lets a human exercise the
|
|
21
|
+
* same cases through the real inspector UI.
|
|
22
|
+
*/
|
|
23
|
+
export const COLOR_CASES = [
|
|
24
|
+
{
|
|
25
|
+
id: "color-named-keywords",
|
|
26
|
+
css: `.subject {
|
|
27
|
+
color: red;
|
|
28
|
+
background-color: linen;
|
|
29
|
+
}`,
|
|
30
|
+
markup: '<p class="subject" data-cid="ColorCase" data-src="fixtures/color.tsx:1:1">A named-keyword element with a warm background.</p>',
|
|
31
|
+
selected: ".subject",
|
|
32
|
+
catalog: [],
|
|
33
|
+
expected: {
|
|
34
|
+
catalog: [],
|
|
35
|
+
properties: {
|
|
36
|
+
color: { authored: "red", capability: "color" },
|
|
37
|
+
"background-color": { authored: "linen", capability: "color" },
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
id: "color-hex-short",
|
|
43
|
+
css: `.subject {
|
|
44
|
+
color: #f00;
|
|
45
|
+
background-color: #0f0;
|
|
46
|
+
}`,
|
|
47
|
+
markup: '<p class="subject" data-cid="ColorCase" data-src="fixtures/color.tsx:2:1">Short hex colors remain a meaningful declared value.</p>',
|
|
48
|
+
selected: ".subject",
|
|
49
|
+
catalog: [],
|
|
50
|
+
expected: {
|
|
51
|
+
catalog: [],
|
|
52
|
+
properties: {
|
|
53
|
+
color: { authored: "#f00", capability: "color" },
|
|
54
|
+
"background-color": { authored: "#0f0", capability: "color" },
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
id: "color-hex-six-digit",
|
|
60
|
+
css: `.subject {
|
|
61
|
+
color: #1a1a2e;
|
|
62
|
+
background-color: #ffffff;
|
|
63
|
+
}`,
|
|
64
|
+
markup: '<p class="subject" data-cid="ColorCase" data-src="fixtures/color.tsx:3:1">Six-digit hex colors span the full gamut.</p>',
|
|
65
|
+
selected: ".subject",
|
|
66
|
+
catalog: [],
|
|
67
|
+
expected: {
|
|
68
|
+
catalog: [],
|
|
69
|
+
properties: {
|
|
70
|
+
color: { authored: "#1a1a2e", capability: "color" },
|
|
71
|
+
"background-color": { authored: "#ffffff", capability: "color" },
|
|
72
|
+
},
|
|
73
|
+
},
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
id: "color-hex-alpha-eight",
|
|
77
|
+
css: `.subject {
|
|
78
|
+
color: #ff000088;
|
|
79
|
+
background-color: #00000033;
|
|
80
|
+
}`,
|
|
81
|
+
markup: '<p class="subject" data-cid="ColorCase" data-src="fixtures/color.tsx:4:1">Eight-digit hex with alpha channel preserves the full authored value.</p>',
|
|
82
|
+
selected: ".subject",
|
|
83
|
+
catalog: [],
|
|
84
|
+
expected: {
|
|
85
|
+
catalog: [],
|
|
86
|
+
properties: {
|
|
87
|
+
color: { authored: "#ff000088", opacity: "53.3333%", capability: "color" },
|
|
88
|
+
"background-color": { authored: "#00000033", opacity: "20%", capability: "color" },
|
|
89
|
+
},
|
|
90
|
+
},
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
id: "color-hex-four-digit",
|
|
94
|
+
css: `.subject {
|
|
95
|
+
color: #f008;
|
|
96
|
+
background-color: #00f8;
|
|
97
|
+
}`,
|
|
98
|
+
markup: '<p class="subject" data-cid="ColorCase" data-src="fixtures/color.tsx:5:1">Four-digit hex with alpha shorthand.</p>',
|
|
99
|
+
selected: ".subject",
|
|
100
|
+
catalog: [],
|
|
101
|
+
expected: {
|
|
102
|
+
catalog: [],
|
|
103
|
+
properties: {
|
|
104
|
+
color: { authored: "#f008", opacity: "53.3333%", capability: "color" },
|
|
105
|
+
"background-color": { authored: "#00f8", opacity: "53.3333%", capability: "color" },
|
|
106
|
+
},
|
|
107
|
+
},
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
id: "color-rgb-legacy",
|
|
111
|
+
css: `.subject {
|
|
112
|
+
color: rgb(255, 0, 0);
|
|
113
|
+
background-color: rgba(0, 0, 0, 0.8);
|
|
114
|
+
}`,
|
|
115
|
+
markup: '<p class="subject" data-cid="ColorCase" data-src="fixtures/color.tsx:6:1">Legacy comma-separated rgb and rgba syntax.</p>',
|
|
116
|
+
selected: ".subject",
|
|
117
|
+
catalog: [],
|
|
118
|
+
expected: {
|
|
119
|
+
catalog: [],
|
|
120
|
+
properties: {
|
|
121
|
+
color: { authored: "rgb(255, 0, 0)", capability: "color" },
|
|
122
|
+
"background-color": { authored: "rgba(0, 0, 0, 0.8)", opacity: "80%", capability: "color" },
|
|
123
|
+
},
|
|
124
|
+
},
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
id: "color-rgb-modern",
|
|
128
|
+
css: `.subject {
|
|
129
|
+
color: rgb(255 0 0);
|
|
130
|
+
background-color: rgb(0 255 0 / 25%);
|
|
131
|
+
}`,
|
|
132
|
+
markup: '<p class="subject" data-cid="ColorCase" data-src="fixtures/color.tsx:7:1">Modern space-separated rgb with optional alpha.</p>',
|
|
133
|
+
selected: ".subject",
|
|
134
|
+
catalog: [],
|
|
135
|
+
expected: {
|
|
136
|
+
catalog: [],
|
|
137
|
+
properties: {
|
|
138
|
+
color: { authored: "rgb(255 0 0)", capability: "color" },
|
|
139
|
+
"background-color": { authored: "rgb(0 255 0 / 25%)", opacity: "25%", capability: "color" },
|
|
140
|
+
},
|
|
141
|
+
},
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
id: "color-rgb-percent",
|
|
145
|
+
css: `.subject {
|
|
146
|
+
color: rgb(100% 0% 0%);
|
|
147
|
+
background-color: rgb(94% 97% 100%);
|
|
148
|
+
}`,
|
|
149
|
+
markup: '<p class="subject" data-cid="ColorCase" data-src="fixtures/color.tsx:8:1">Percentage-based rgb channels.</p>',
|
|
150
|
+
selected: ".subject",
|
|
151
|
+
catalog: [],
|
|
152
|
+
expected: {
|
|
153
|
+
catalog: [],
|
|
154
|
+
properties: {
|
|
155
|
+
color: { authored: "rgb(100% 0% 0%)", capability: "color" },
|
|
156
|
+
"background-color": { authored: "rgb(94% 97% 100%)", capability: "color" },
|
|
157
|
+
},
|
|
158
|
+
},
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
id: "color-hsl-legacy",
|
|
162
|
+
css: `.subject {
|
|
163
|
+
color: hsl(0, 100%, 50%);
|
|
164
|
+
background-color: hsla(240, 100%, 50%, 0.3);
|
|
165
|
+
}`,
|
|
166
|
+
markup: '<p class="subject" data-cid="ColorCase" data-src="fixtures/color.tsx:9:1">Legacy comma-separated hsl and hsla syntax.</p>',
|
|
167
|
+
selected: ".subject",
|
|
168
|
+
catalog: [],
|
|
169
|
+
expected: {
|
|
170
|
+
catalog: [],
|
|
171
|
+
properties: {
|
|
172
|
+
color: { authored: "hsl(0, 100%, 50%)", capability: "color" },
|
|
173
|
+
"background-color": { authored: "hsla(240, 100%, 50%, 0.3)", opacity: "30%", capability: "color" },
|
|
174
|
+
},
|
|
175
|
+
},
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
id: "color-hsl-modern",
|
|
179
|
+
css: `.subject {
|
|
180
|
+
color: hsl(0 100% 50% / 80%);
|
|
181
|
+
background-color: hsl(240 100% 50% / 40%);
|
|
182
|
+
}`,
|
|
183
|
+
markup: '<p class="subject" data-cid="ColorCase" data-src="fixtures/color.tsx:10:1">Modern space-separated hsl with alpha.</p>',
|
|
184
|
+
selected: ".subject",
|
|
185
|
+
catalog: [],
|
|
186
|
+
expected: {
|
|
187
|
+
catalog: [],
|
|
188
|
+
properties: {
|
|
189
|
+
color: { authored: "hsl(0 100% 50% / 80%)", opacity: "80%", capability: "color" },
|
|
190
|
+
"background-color": { authored: "hsl(240 100% 50% / 40%)", opacity: "40%", capability: "color" },
|
|
191
|
+
},
|
|
192
|
+
},
|
|
193
|
+
},
|
|
194
|
+
{
|
|
195
|
+
id: "color-oklch",
|
|
196
|
+
css: `.subject {
|
|
197
|
+
color: oklch(63% .2 25);
|
|
198
|
+
background-color: oklch(95% .01 100);
|
|
199
|
+
}`,
|
|
200
|
+
markup: '<p class="subject" data-cid="ColorCase" data-src="fixtures/color.tsx:11:1">oklch color space with chromatic coverage.</p>',
|
|
201
|
+
selected: ".subject",
|
|
202
|
+
catalog: [],
|
|
203
|
+
expected: {
|
|
204
|
+
catalog: [],
|
|
205
|
+
properties: {
|
|
206
|
+
color: { authored: "oklch(63% .2 25)", capability: "color" },
|
|
207
|
+
"background-color": { authored: "oklch(95% .01 100)", capability: "color" },
|
|
208
|
+
},
|
|
209
|
+
},
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
id: "color-oklab",
|
|
213
|
+
css: `.subject {
|
|
214
|
+
color: oklab(50% .1 .05);
|
|
215
|
+
background-color: lab(50% 50 50);
|
|
216
|
+
}`,
|
|
217
|
+
markup: '<p class="subject" data-cid="ColorCase" data-src="fixtures/color.tsx:12:1">oklab and lab color spaces.</p>',
|
|
218
|
+
selected: ".subject",
|
|
219
|
+
catalog: [],
|
|
220
|
+
expected: {
|
|
221
|
+
catalog: [],
|
|
222
|
+
properties: {
|
|
223
|
+
color: { authored: "oklab(50% .1 .05)", capability: "color" },
|
|
224
|
+
"background-color": { authored: "lab(50% 50 50)", capability: "color" },
|
|
225
|
+
},
|
|
226
|
+
},
|
|
227
|
+
},
|
|
228
|
+
{
|
|
229
|
+
id: "color-transparent-currentcolor",
|
|
230
|
+
css: `.subject {
|
|
231
|
+
color: transparent;
|
|
232
|
+
background-color: currentColor;
|
|
233
|
+
}`,
|
|
234
|
+
markup: '<p class="subject" data-cid="ColorCase" data-src="fixtures/color.tsx:13:1">Special keywords are kept as-authored.</p>',
|
|
235
|
+
selected: ".subject",
|
|
236
|
+
catalog: [],
|
|
237
|
+
expected: {
|
|
238
|
+
catalog: [],
|
|
239
|
+
properties: {
|
|
240
|
+
color: { authored: "transparent", capability: "color" },
|
|
241
|
+
"background-color": { authored: "currentColor", capability: "color" },
|
|
242
|
+
},
|
|
243
|
+
},
|
|
244
|
+
},
|
|
245
|
+
{
|
|
246
|
+
id: "color-system-keywords",
|
|
247
|
+
css: `.subject {
|
|
248
|
+
color: HighlightText;
|
|
249
|
+
background-color: ButtonFace;
|
|
250
|
+
}`,
|
|
251
|
+
markup: '<p class="subject" data-cid="ColorCase" data-src="fixtures/color.tsx:14:1">Deprecated system color keywords.</p>',
|
|
252
|
+
selected: ".subject",
|
|
253
|
+
catalog: [],
|
|
254
|
+
expected: {
|
|
255
|
+
catalog: [],
|
|
256
|
+
properties: {
|
|
257
|
+
color: { authored: "HighlightText", capability: "color" },
|
|
258
|
+
"background-color": { authored: "ButtonFace", capability: "color" },
|
|
259
|
+
},
|
|
260
|
+
},
|
|
261
|
+
},
|
|
262
|
+
{
|
|
263
|
+
id: "color-token-simple",
|
|
264
|
+
css: `:root {
|
|
265
|
+
--color-text-primary: #1a1a2e;
|
|
266
|
+
--color-surface-raised: #ffffff;
|
|
267
|
+
}
|
|
268
|
+
.subject {
|
|
269
|
+
color: var(--color-text-primary);
|
|
270
|
+
background-color: var(--color-surface-raised);
|
|
271
|
+
}`,
|
|
272
|
+
markup: '<p class="subject" data-cid="ColorCase" data-src="fixtures/color.tsx:15:1">Token-backed colors across foreground and background.</p>',
|
|
273
|
+
selected: ".subject",
|
|
274
|
+
catalog: [COLOR_TEXT_PRIMARY, COLOR_SURFACE_RAISED],
|
|
275
|
+
expected: {
|
|
276
|
+
catalog: [
|
|
277
|
+
{ name: "--color-text-primary", value: "#1a1a2e" },
|
|
278
|
+
{ name: "--color-surface-raised", value: "#ffffff" },
|
|
279
|
+
],
|
|
280
|
+
properties: {
|
|
281
|
+
color: { authored: "var(--color-text-primary)", tokens: ["--color-text-primary"], capability: "color" },
|
|
282
|
+
"background-color": { authored: "var(--color-surface-raised)", tokens: ["--color-surface-raised"], capability: "color" },
|
|
283
|
+
},
|
|
284
|
+
},
|
|
285
|
+
},
|
|
286
|
+
{
|
|
287
|
+
id: "color-token-fallback",
|
|
288
|
+
css: `:root {
|
|
289
|
+
--color-text-secondary: #52526b;
|
|
290
|
+
--color-surface-sunken: #f5f5f0;
|
|
291
|
+
}
|
|
292
|
+
.subject {
|
|
293
|
+
color: var(--color-text-secondary, #333);
|
|
294
|
+
background-color: var(--color-surface-sunken, #eee);
|
|
295
|
+
}`,
|
|
296
|
+
markup: '<p class="subject" data-cid="ColorCase" data-src="fixtures/color.tsx:16:1">Tokens with fallback values keep the authored fallback intact.</p>',
|
|
297
|
+
selected: ".subject",
|
|
298
|
+
catalog: [COLOR_TEXT_SECONDARY, COLOR_SURFACE_SUNKEN],
|
|
299
|
+
expected: {
|
|
300
|
+
catalog: [
|
|
301
|
+
{ name: "--color-text-secondary", value: "#52526b" },
|
|
302
|
+
{ name: "--color-surface-sunken", value: "#f5f5f0" },
|
|
303
|
+
],
|
|
304
|
+
properties: {
|
|
305
|
+
color: { authored: "var(--color-text-secondary, #333)", tokens: ["--color-text-secondary"], capability: "color" },
|
|
306
|
+
"background-color": { authored: "var(--color-surface-sunken, #eee)", tokens: ["--color-surface-sunken"], capability: "color" },
|
|
307
|
+
},
|
|
308
|
+
},
|
|
309
|
+
},
|
|
310
|
+
{
|
|
311
|
+
id: "color-token-bg-only",
|
|
312
|
+
css: `:root {
|
|
313
|
+
--color-surface: #fafafa;
|
|
314
|
+
}
|
|
315
|
+
.subject {
|
|
316
|
+
background-color: var(--color-surface);
|
|
317
|
+
}`,
|
|
318
|
+
markup: '<p class="subject" data-cid="ColorCase" data-src="fixtures/color.tsx:17:1">Background-color only, no foreground token.</p>',
|
|
319
|
+
selected: ".subject",
|
|
320
|
+
catalog: [COLOR_SURFACE],
|
|
321
|
+
expected: {
|
|
322
|
+
catalog: [{ name: "--color-surface", value: "#fafafa" }],
|
|
323
|
+
properties: {
|
|
324
|
+
"background-color": { authored: "var(--color-surface)", tokens: ["--color-surface"], capability: "color" },
|
|
325
|
+
},
|
|
326
|
+
},
|
|
327
|
+
},
|
|
328
|
+
{
|
|
329
|
+
id: "color-token-unknown-fallback",
|
|
330
|
+
css: `.subject {
|
|
331
|
+
color: var(--unknown-color, hotpink);
|
|
332
|
+
background-color: var(--unknown-bg, transparent);
|
|
333
|
+
}`,
|
|
334
|
+
markup: '<p class="subject" data-cid="ColorCase" data-src="fixtures/color.tsx:18:1">Unknown tokens should surface the raw expression.</p>',
|
|
335
|
+
selected: ".subject",
|
|
336
|
+
catalog: [],
|
|
337
|
+
expected: {
|
|
338
|
+
catalog: [],
|
|
339
|
+
properties: {
|
|
340
|
+
color: { authored: "var(--unknown-color, hotpink)", tokens: [], capability: "color" },
|
|
341
|
+
"background-color": { authored: "var(--unknown-bg, transparent)", tokens: [], capability: "color" },
|
|
342
|
+
},
|
|
343
|
+
},
|
|
344
|
+
},
|
|
345
|
+
{
|
|
346
|
+
id: "color-mix-token",
|
|
347
|
+
css: `:root {
|
|
348
|
+
--color-primary: #2563eb;
|
|
349
|
+
}
|
|
350
|
+
.subject {
|
|
351
|
+
color: color-mix(in oklab, var(--color-primary) 50%, transparent);
|
|
352
|
+
background-color: color-mix(in srgb, var(--color-primary) 10%, white);
|
|
353
|
+
}`,
|
|
354
|
+
markup: '<p class="subject" data-cid="ColorCase" data-src="fixtures/color.tsx:19:1">color-mix() preserves the authored expression with token references.</p>',
|
|
355
|
+
selected: ".subject",
|
|
356
|
+
catalog: [COLOR_PRIMARY],
|
|
357
|
+
expected: {
|
|
358
|
+
catalog: [{ name: "--color-primary", value: "#2563eb" }],
|
|
359
|
+
properties: {
|
|
360
|
+
color: { authored: "color-mix(in oklab, var(--color-primary) 50%, transparent)", tokens: ["--color-primary"], opacity: "50%", capability: "color" },
|
|
361
|
+
"background-color": { authored: "color-mix(in srgb, var(--color-primary) 10%, white)", tokens: ["--color-primary"], capability: "color" },
|
|
362
|
+
},
|
|
363
|
+
},
|
|
364
|
+
},
|
|
365
|
+
{
|
|
366
|
+
id: "color-opacity-token",
|
|
367
|
+
css: `:root {
|
|
368
|
+
--color-primary: #2563eb;
|
|
369
|
+
--opacity-muted: 0.35;
|
|
370
|
+
}
|
|
371
|
+
.subject {
|
|
372
|
+
color: color-mix(in srgb, var(--color-primary) var(--opacity-muted), transparent);
|
|
373
|
+
background-color: rgb(37 99 235 / var(--opacity-muted));
|
|
374
|
+
}`,
|
|
375
|
+
markup: '<p class="subject" data-cid="ColorCase" data-src="fixtures/color.tsx:23:1">Opacity can be supplied by a token and displayed as its resolved value.</p>',
|
|
376
|
+
selected: ".subject",
|
|
377
|
+
catalog: [COLOR_PRIMARY, OPACITY_MUTED],
|
|
378
|
+
expected: {
|
|
379
|
+
catalog: [
|
|
380
|
+
{ name: "--color-primary", value: "#2563eb" },
|
|
381
|
+
{ name: "--opacity-muted", value: "0.35" },
|
|
382
|
+
],
|
|
383
|
+
properties: {
|
|
384
|
+
color: {
|
|
385
|
+
authored: "color-mix(in srgb, var(--color-primary) var(--opacity-muted), transparent)",
|
|
386
|
+
tokens: ["--color-primary", "--opacity-muted"],
|
|
387
|
+
opacity: "35%",
|
|
388
|
+
opacityToken: "--opacity-muted",
|
|
389
|
+
capability: "color",
|
|
390
|
+
},
|
|
391
|
+
"background-color": {
|
|
392
|
+
authored: "rgb(37 99 235 / var(--opacity-muted))",
|
|
393
|
+
tokens: ["--opacity-muted"],
|
|
394
|
+
opacity: "35%",
|
|
395
|
+
opacityToken: "--opacity-muted",
|
|
396
|
+
capability: "color",
|
|
397
|
+
},
|
|
398
|
+
},
|
|
399
|
+
},
|
|
400
|
+
},
|
|
401
|
+
{
|
|
402
|
+
id: "color-fill-and-stroke",
|
|
403
|
+
css: `:root {
|
|
404
|
+
--color-accent: oklch(63% .2 25);
|
|
405
|
+
--color-surface: #fafafa;
|
|
406
|
+
}
|
|
407
|
+
.subject {
|
|
408
|
+
background-color: var(--color-surface);
|
|
409
|
+
fill: var(--color-accent);
|
|
410
|
+
stroke: var(--color-accent);
|
|
411
|
+
}`,
|
|
412
|
+
markup: '<p class="subject" data-cid="ColorCase" data-src="fixtures/color.tsx:20:1">fill and stroke are treated as color-capable properties.</p>',
|
|
413
|
+
selected: ".subject",
|
|
414
|
+
catalog: [COLOR_ACCENT, COLOR_SURFACE],
|
|
415
|
+
expected: {
|
|
416
|
+
catalog: [
|
|
417
|
+
{ name: "--color-accent", value: "oklch(63% .2 25)" },
|
|
418
|
+
{ name: "--color-surface", value: "#fafafa" },
|
|
419
|
+
],
|
|
420
|
+
properties: {
|
|
421
|
+
"background-color": { authored: "var(--color-surface)", tokens: ["--color-surface"], capability: "color" },
|
|
422
|
+
fill: { authored: "var(--color-accent)", tokens: ["--color-accent"], capability: "color" },
|
|
423
|
+
stroke: { authored: "var(--color-accent)", tokens: ["--color-accent"], capability: "color" },
|
|
424
|
+
},
|
|
425
|
+
},
|
|
426
|
+
},
|
|
427
|
+
{
|
|
428
|
+
id: "color-hex-comparison",
|
|
429
|
+
css: `.subject {
|
|
430
|
+
color: #dc2626;
|
|
431
|
+
background-color: #fef2f2;
|
|
432
|
+
}
|
|
433
|
+
.subject-two {
|
|
434
|
+
color: #dc2626;
|
|
435
|
+
background-color: #fef2f2;
|
|
436
|
+
}`,
|
|
437
|
+
markup: '<div class="subject" data-cid="ColorCase" data-src="fixtures/color.tsx:21:1">A companion element with both foreground and background.</div><div class="subject-two" data-cid="ColorCase" data-src="fixtures/color.tsx:21:2">A companion element with both foreground and background.</div>',
|
|
438
|
+
selected: ".subject-two",
|
|
439
|
+
catalog: [],
|
|
440
|
+
expected: {
|
|
441
|
+
catalog: [],
|
|
442
|
+
properties: {
|
|
443
|
+
color: { authored: "#dc2626", capability: "color" },
|
|
444
|
+
"background-color": { authored: "#fef2f2", capability: "color" },
|
|
445
|
+
},
|
|
446
|
+
},
|
|
447
|
+
},
|
|
448
|
+
{
|
|
449
|
+
id: "color-token-alias-chain",
|
|
450
|
+
css: `:root {
|
|
451
|
+
--color-danger: #dc2626;
|
|
452
|
+
--color-error: var(--color-danger);
|
|
453
|
+
}
|
|
454
|
+
.subject {
|
|
455
|
+
color: var(--color-error);
|
|
456
|
+
}`,
|
|
457
|
+
markup: '<p class="subject" data-cid="ColorCase" data-src="fixtures/color.tsx:22:1">An aliased token that points to another defined token.</p>',
|
|
458
|
+
selected: ".subject",
|
|
459
|
+
catalog: [COLOR_DANGER, token("--color-error", "var(--color-danger)", "fixtures/color.css:3b")],
|
|
460
|
+
expected: {
|
|
461
|
+
catalog: [
|
|
462
|
+
{ name: "--color-danger", value: "#dc2626" },
|
|
463
|
+
{ name: "--color-error", value: "var(--color-danger)" },
|
|
464
|
+
],
|
|
465
|
+
properties: {
|
|
466
|
+
color: { authored: "var(--color-error)", tokens: ["--color-error"], capability: "color" },
|
|
467
|
+
},
|
|
468
|
+
},
|
|
469
|
+
},
|
|
470
|
+
];
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import type { TokenDefinition } from "../../css/model/index.js";
|
|
2
|
+
import type { EditCapability, ResolvedProperty, TokenOrigin } from "../../css/model/index.js";
|
|
3
|
+
import type { TokenCatalogRow } from "../tokens/catalog.js";
|
|
4
|
+
import type { PreviewResult } from "../projection/managedStylesheet.js";
|
|
5
|
+
import { type InspectorProjection, type ProjectionAxis, type ProjectionGroup, type ProjectionSide, type ProjectionState } from "../spacing/projection.js";
|
|
6
|
+
export interface ConformancePropertyExpectation {
|
|
7
|
+
authored: string;
|
|
8
|
+
tokens?: string[];
|
|
9
|
+
opacity?: string;
|
|
10
|
+
opacityToken?: string | null;
|
|
11
|
+
computed?: string;
|
|
12
|
+
capability: EditCapability;
|
|
13
|
+
confidence?: "exact" | "probable" | "unknown";
|
|
14
|
+
structure?: Partial<Pick<NonNullable<ResolvedProperty["structure"]>, "width" | "style" | "color">>;
|
|
15
|
+
}
|
|
16
|
+
export interface ConformanceProjectionFieldExpectation {
|
|
17
|
+
authoredValue?: string;
|
|
18
|
+
value: string;
|
|
19
|
+
tokenName?: string | null;
|
|
20
|
+
sourceProperty?: string;
|
|
21
|
+
}
|
|
22
|
+
export interface ConformanceProjectionExpectation {
|
|
23
|
+
spacing: Partial<Record<ProjectionGroup, {
|
|
24
|
+
linked?: boolean;
|
|
25
|
+
axes?: Partial<Record<ProjectionAxis, {
|
|
26
|
+
state: ProjectionState;
|
|
27
|
+
}>>;
|
|
28
|
+
fields: Partial<Record<ProjectionSide, ConformanceProjectionFieldExpectation>>;
|
|
29
|
+
}>>;
|
|
30
|
+
}
|
|
31
|
+
export interface ConformanceFixture {
|
|
32
|
+
id: string;
|
|
33
|
+
css: string;
|
|
34
|
+
markup: string;
|
|
35
|
+
selected: string;
|
|
36
|
+
catalog: TokenDefinition[];
|
|
37
|
+
expected: {
|
|
38
|
+
catalog: Array<{
|
|
39
|
+
name: string;
|
|
40
|
+
value?: string;
|
|
41
|
+
adapter?: string;
|
|
42
|
+
origin?: TokenOrigin;
|
|
43
|
+
}>;
|
|
44
|
+
properties: Record<string, ConformancePropertyExpectation>;
|
|
45
|
+
projection?: ConformanceProjectionExpectation;
|
|
46
|
+
preview?: {
|
|
47
|
+
property: string;
|
|
48
|
+
value: string;
|
|
49
|
+
computed?: string;
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
export interface ConformanceResult {
|
|
54
|
+
fixture: string;
|
|
55
|
+
selected: HTMLElement;
|
|
56
|
+
catalog: readonly TokenCatalogRow[];
|
|
57
|
+
properties: ResolvedProperty[];
|
|
58
|
+
projection: InspectorProjection;
|
|
59
|
+
preview: PreviewResult | null;
|
|
60
|
+
cleanup(): void;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Mounts one data-led fixture and runs it through the same CSSOM resolver used
|
|
64
|
+
* by the inspector. The caller owns assertions; this module only owns setup,
|
|
65
|
+
* teardown, and the public inspection result.
|
|
66
|
+
*/
|
|
67
|
+
export declare function runConformanceFixture(fixture: ConformanceFixture, doc?: Document): ConformanceResult;
|
|
68
|
+
export declare function assertConformanceFixture(result: ConformanceResult, fixture: ConformanceFixture): string[];
|