@corva/ui 3.84.0-2 → 3.84.0-4
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/MCP_README.md +0 -33
- package/cjs-bundle/componentsV2/LiveDotIndicator/LiveDotIndicator.js +1 -1
- package/cjs-bundle/componentsV2/LiveDotIndicator/LiveDotIndicator.js.map +1 -1
- package/cjs-bundle/componentsV2/LiveDotIndicator/LiveDotIndicator.scss.js +1 -1
- package/cjs-bundle/utils/index.js.map +1 -1
- package/componentsV2/AppFooter/AppFooter.stories.d.ts.map +1 -1
- package/componentsV2/AppHeader/AppHeader.stories.d.ts.map +1 -1
- package/componentsV2/LiveDotIndicator/LiveDotIndicator.d.ts.map +1 -1
- package/componentsV2/LiveDotIndicator/LiveDotIndicator.js +1 -1
- package/componentsV2/LiveDotIndicator/LiveDotIndicator.js.map +1 -1
- package/componentsV2/LiveDotIndicator/LiveDotIndicator.scss.js +1 -1
- package/mcp-server/server.mjs +53 -104
- package/package.json +1 -1
- package/tsconfig.tsbuildinfo +1 -1
- package/utils/index.d.ts +2 -2
- package/utils/index.js.map +1 -1
- package/components/FilesLoaderV2/FilesLoaderV2.figma.d.ts +0 -2
- package/components/FilesLoaderV2/FilesLoaderV2.figma.d.ts.map +0 -1
package/MCP_README.md
CHANGED
|
@@ -42,9 +42,6 @@ supports Claude Code, Cursor, and Codex CLI.
|
|
|
42
42
|
- `get_corva_mcp_setup_guide` - Static connection reference for the Corva MCP data server: endpoints, per-client
|
|
43
43
|
registration commands, browser OAuth flow, and the verification call. Pairs with the `setup_corva_mcp` prompt, which
|
|
44
44
|
runs the guided end-to-end setup.
|
|
45
|
-
- `get_figma_to_code_guide` - Static method reference for implementing Figma designs with `@corva/ui`: source
|
|
46
|
-
precedence, capability-based component search across V2 and V1, token and prop discipline, and gap reporting. Pairs
|
|
47
|
-
with the `figma_to_code` prompt, which runs the strict guided workflow.
|
|
48
45
|
|
|
49
46
|
### Usage
|
|
50
47
|
|
|
@@ -62,36 +59,6 @@ Mentioning `@corva/ui`, component names, or asking about the design system trigg
|
|
|
62
59
|
MCP prompts are surfaced as slash commands in clients that support them. In Claude Code they appear under
|
|
63
60
|
`/mcp__corva-ui__<name>`.
|
|
64
61
|
|
|
65
|
-
- `figma_to_code` — Translate a Figma node into React components that follow `@corva/ui` conventions. Orchestrates the
|
|
66
|
-
Figma MCP server (for design context and Code Connect mappings) and the `@corva/ui` MCP tools above (for component,
|
|
67
|
-
icon, theme, and hook lookups).
|
|
68
|
-
|
|
69
|
-
**Argument** (optional; the assistant asks if missing):
|
|
70
|
-
|
|
71
|
-
- `input` — Freeform request. Paste the full Figma node URL (e.g.
|
|
72
|
-
`https://www.figma.com/design/<fileKey>/...?node-id=<nodeId>`) together with any extra context: target path or
|
|
73
|
-
directory in the app, an existing file to extend, naming preferences, edge cases. The assistant extracts the URL
|
|
74
|
-
itself.
|
|
75
|
-
|
|
76
|
-
> A single freeform argument is intentional: Claude Code's MCP-prompt bridge splits positional string arguments on
|
|
77
|
-
> whitespace, so a multi-arg schema would only capture the first token of each.
|
|
78
|
-
|
|
79
|
-
**Example invocation** (Claude Code):
|
|
80
|
-
|
|
81
|
-
```
|
|
82
|
-
/mcp__corva-ui__figma_to_code https://www.figma.com/design/ABC/Sample?node-id=1-2 create under src/apps/drilling/RigStatusCard.tsx
|
|
83
|
-
```
|
|
84
|
-
|
|
85
|
-
**Prerequisite:** a Figma MCP server must be connected in the same client session so the prompt can call its
|
|
86
|
-
`get_design_context` tool (the prompt detects the server alias itself). Either connect Figma's remote server
|
|
87
|
-
(`https://mcp.figma.com/mcp`, browser OAuth — Figma's recommended option) or enable the desktop one: open the file in
|
|
88
|
-
Figma Desktop, switch to Dev Mode (`Shift+D`) and click **Enable desktop MCP server** in the MCP server section of the
|
|
89
|
-
inspect panel, then register `http://127.0.0.1:3845/mcp` as an HTTP MCP server in your client — enabling it in Figma
|
|
90
|
-
alone does not connect it. Reconnect or restart your client afterwards.
|
|
91
|
-
|
|
92
|
-
**Scope:** primarily consumer mode — app repos that depend on `@corva/ui` and import from its entry points. Authoring
|
|
93
|
-
mode (inside the `@corva/ui` repo itself) is auto-detected from `package.json` and adjusts output conventions.
|
|
94
|
-
|
|
95
62
|
- `feedback` — Send feedback about `@corva/ui` or this MCP server to the maintainers. The prompt collects your message
|
|
96
63
|
(and an optional sentiment / which component the feedback is about) and submits it via the `submit_feedback` tool.
|
|
97
64
|
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("classnames"),t=require("./LiveDotIndicator.scss.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("classnames"),t=require("react"),r=require("./LiveDotIndicator.scss.js"),a=require("react/jsx-runtime");function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=i(e),c={live:r.live,offline:r.offline},o="cubic-bezier(0.455, 0.03, 0.515, 0.955)",s="cubic-bezier(0.215, 0.61, 0.355, 1)",u=[{opacity:.5,easing:o},{opacity:1,easing:o},{opacity:.5}],f=[{transform:"scale(1)",opacity:0,easing:s},{transform:"scale(2)",opacity:.5,easing:s},{transform:"scale(3.5)",opacity:0}];exports.LiveDotIndicator=function(e){var i=e.state,o=e.className,s=e.testId,l=t.useRef(null);return t.useLayoutEffect((function(){var e;if("live"===i&&null!==(e=l.current)&&void 0!==e&&e.animate){var t=[l.current.animate(u,{duration:3250,delay:-400,iterations:1/0}),l.current.animate(f,{duration:3250,iterations:1/0,pseudoElement:"::after"})];return function(){return t.forEach((function(e){return e.cancel()}))}}}),[i]),a.jsx("div",{"data-testid":s,className:n.default(r.root,c[i],o),ref:l})};
|
|
2
2
|
//# sourceMappingURL=LiveDotIndicator.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LiveDotIndicator.js","sources":["../../../../src/componentsV2/LiveDotIndicator/LiveDotIndicator.tsx"],"sourcesContent":["import classNames from 'classnames';\n\nimport styles from './LiveDotIndicator.scss';\n\nexport type LiveDotIndicatorProps = {\n state: 'live' | 'offline';\n\n className?: string;\n testId?: string;\n};\n\nconst StateToClassMap: Record<LiveDotIndicatorProps['state'], string> = {\n live: styles.live,\n offline: styles.offline,\n};\n\nexport const LiveDotIndicator = ({ state, className, testId }: LiveDotIndicatorProps) => (\n <div\n
|
|
1
|
+
{"version":3,"file":"LiveDotIndicator.js","sources":["../../../../src/componentsV2/LiveDotIndicator/LiveDotIndicator.tsx"],"sourcesContent":["import classNames from 'classnames';\nimport { useLayoutEffect, useRef } from 'react';\n\nimport styles from './LiveDotIndicator.scss';\n\nexport type LiveDotIndicatorProps = {\n state: 'live' | 'offline';\n\n className?: string;\n testId?: string;\n};\n\nconst StateToClassMap: Record<LiveDotIndicatorProps['state'], string> = {\n live: styles.live,\n offline: styles.offline,\n};\n\nconst PULSE_DURATION_MS = 3250;\nconst BG_EASING = 'cubic-bezier(0.455, 0.03, 0.515, 0.955)';\nconst RING_EASING = 'cubic-bezier(0.215, 0.61, 0.355, 1)';\n\n// Keyframe easing, not the option: a CSS animation eases each keyframe interval, and these match the CSS it replaces.\nconst BG_KEYFRAMES: Keyframe[] = [\n { opacity: 0.5, easing: BG_EASING },\n { opacity: 1, easing: BG_EASING },\n { opacity: 0.5 },\n];\n\nconst RING_KEYFRAMES: Keyframe[] = [\n { transform: 'scale(1)', opacity: 0, easing: RING_EASING },\n { transform: 'scale(2)', opacity: 0.5, easing: RING_EASING },\n { transform: 'scale(3.5)', opacity: 0 },\n];\n\nexport const LiveDotIndicator = ({ state, className, testId }: LiveDotIndicatorProps) => {\n const dotRef = useRef<HTMLDivElement>(null);\n\n // Web Animations, not CSS keyframes: every React root listens for animation events, and while a\n // document listens, Chromium updates a running CSS animation on the main thread every frame.\n useLayoutEffect(() => {\n // A DOM without Web Animations (jsdom in consumers' tests) renders the dot still, as it renders any page.\n if (state !== 'live' || !dotRef.current?.animate) return undefined;\n\n const animations = [\n dotRef.current.animate(BG_KEYFRAMES, {\n duration: PULSE_DURATION_MS,\n delay: -400,\n iterations: Infinity,\n }),\n dotRef.current.animate(RING_KEYFRAMES, {\n duration: PULSE_DURATION_MS,\n iterations: Infinity,\n pseudoElement: '::after',\n }),\n ];\n\n return () => animations.forEach(animation => animation.cancel());\n }, [state]);\n\n return (\n <div\n data-testid={testId}\n className={classNames(styles.root, StateToClassMap[state], className)}\n ref={dotRef}\n />\n );\n};\n"],"names":["StateToClassMap","live","styles","offline","BG_EASING","RING_EASING","BG_KEYFRAMES","opacity","easing","RING_KEYFRAMES","transform","_ref","state","className","testId","dotRef","useRef","useLayoutEffect","_dotRef$current","current","animate","animations","duration","delay","iterations","Infinity","pseudoElement","forEach","animation","cancel","_jsx","classNames","root","ref"],"mappings":"6QAYMA,EAAkE,CACtEC,KAAMC,EAAOD,KACbE,QAASD,EAAOC,SAIZC,EAAY,0CACZC,EAAc,sCAGdC,EAA2B,CAC/B,CAAEC,QAAS,GAAKC,OAAQJ,GACxB,CAAEG,QAAS,EAAGC,OAAQJ,GACtB,CAAEG,QAAS,KAGPE,EAA6B,CACjC,CAAEC,UAAW,WAAYH,QAAS,EAAGC,OAAQH,GAC7C,CAAEK,UAAW,WAAYH,QAAS,GAAKC,OAAQH,GAC/C,CAAEK,UAAW,aAAcH,QAAS,6BAGN,SAAyDI,GAAA,IAAtDC,IAAAA,MAAOC,IAAAA,UAAWC,IAAAA,OAC7CC,EAASC,SAAuB,MAwBtC,OApBAC,EAAAA,iBAAgB,WAAM,IAAAC,EAEpB,GAAc,SAAVN,GAAqB,QAAAG,EAAAA,EAAOI,eAAP,IAAAD,GAAAA,EAAgBE,QAAzC,CAEA,IAAMC,EAAa,CACjBN,EAAOI,QAAQC,QAAQd,EAAc,CACnCgB,SA5BkB,KA6BlBC,OAAQ,IACRC,WAAYC,MAEdV,EAAOI,QAAQC,QAAQX,EAAgB,CACrCa,SAjCkB,KAkClBE,WAAYC,IACZC,cAAe,aAInB,OAAO,WAAA,OAAML,EAAWM,SAAQ,SAAAC,GAAS,OAAIA,EAAUC,WAAS,CAfE,CAgBpE,GAAG,CAACjB,IAGFkB,EAAAA,IAAA,MAAA,CACE,cAAahB,EACbD,UAAWkB,EAAU,QAAC7B,EAAO8B,KAAMhC,EAAgBY,GAAQC,GAC3DoB,IAAKlB,GAGX"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";require('./../../ext-esm/style-inject/dist/style-inject.es.js')('.LiveDotIndicator_root__9o2vz{display:inline-block;padding:2px;vertical-align:middle}.LiveDotIndicator_root__9o2vz:before{border-radius:50%;content:"";display:block;height:4px;width:4px}.LiveDotIndicator_live__2lXWs{
|
|
1
|
+
"use strict";require('./../../ext-esm/style-inject/dist/style-inject.es.js')('.LiveDotIndicator_root__9o2vz{display:inline-block;padding:2px;vertical-align:middle}.LiveDotIndicator_root__9o2vz:before{border-radius:50%;content:"";display:block;height:4px;width:4px}.LiveDotIndicator_live__2lXWs{isolation:isolate;position:relative}.LiveDotIndicator_live__2lXWs:after,.LiveDotIndicator_live__2lXWs:before{background:var(--palette-success-bright)}.LiveDotIndicator_live__2lXWs:after{border-radius:50%;content:"";height:4px;left:2px;position:absolute;top:2px;width:4px;z-index:-1}.LiveDotIndicator_offline__1W-4D:before{background:var(--palette-background-b-9);box-shadow:0 0 0 2px rgb(from var(--palette-background-b-9) r g b/.4)}'),module.exports={spacing:"8",root:"LiveDotIndicator_root__9o2vz",live:"LiveDotIndicator_live__2lXWs",offline:"LiveDotIndicator_offline__1W-4D"};
|
|
2
2
|
//# sourceMappingURL=LiveDotIndicator.scss.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/utils/index.ts"],"sourcesContent":["import {\n formatMentionText,\n isSuggestionsListOpened,\n stripMentionMarkup,\n} from '../components/UserMention/utils';\n\nimport * as StageDesignVActualUtils from './StageDesignVActualUtils';\nimport * as alerts from './alerts';\nimport * as audio from './audio';\nimport * as casing from './casing';\nimport * as chartSeries from './chartSeries';\nimport * as completion from './completion';\nimport * as components from './components';\nimport * as convert from './convert';\nimport * as csvExport from './csvExport';\nimport * as devcenter from './devcenter';\nimport * as drillstring from './drillstring';\nimport * as drillstringUtils from './DrillstringUtils';\nimport * as fluidCheckUtils from './FluidCheckUtils';\nimport * as formatting from './formatting';\nimport * as ga from './ga';\nimport * as goals from './goals';\nimport * as goalsConfig from './goalsConfig';\nimport * as lasParser from './lasParser';\nimport * as main from './main';\nimport * as mapUnits from './mapUnits';\nimport * as mapbox from './mapbox';\nimport * as metricsUtils from './metrics';\nimport * as mobileDetect from './mobileDetect';\nimport * as nativeMessages from './nativeMessages';\nimport * as notifications from './notifications';\nimport * as feed from './feed';\nimport * as permissions from './permissions';\nimport * as reports from './reports';\nimport * as time from './time';\nimport * as torqueAndHookloadUtils from './torqueAndHookloadUtils';\nimport * as accuracy from './accuracy';\nimport {\n createNotification,\n removeNotification,\n showErrorNotification,\n showInfoNotification,\n showNeutralNotification,\n showSuccessNotification,\n showWarningNotification,\n} from './notificationToasts';\nimport { showToast } from './devcenterToasts';\nimport { convertKeysToCamelCase, convertKeysToSnakeCase, getConvertKeys } from './convertKeys';\nimport * as dashboardReports from './dashboardReports';\nimport * as apps from './apps';\nimport * as themeVariables from './themeVariables';\nimport * as env from './env';\nimport * as fileExtension from './fileExtension';\nimport { jsonaDataFormatter } from './jsonaDataFormatter';\nimport * as bha from './bha';\nimport { getLocalStorageItem, updateLocalStorageItem } from './localStorage';\nimport { sharedDCStore } from './sharedDCStore';\nimport resolveWellHubSlug from './resolveWellHubSlug';\nimport { enableHighchartsDelayedTooltip } from './delayedHighcharts';\nimport { formatFileSize } from './formatFileSize';\nimport { getXAxis, getYAxis } from './charts';\n\nconst {\n convertArray,\n convertValue,\n getAllUnitTypes,\n getDefaultImperialUnit,\n getDefaultUnits,\n getUnitDescription,\n getUnitDisplay,\n getUnitPlural,\n getUnitPreference,\n getUnitsByType,\n getUnitSingular,\n getUnitSystem,\n updateUserUnits,\n getUserUnits,\n subscribeForUserUnitsUpdates,\n getUniqueUnitsByType,\n} = convert;\n\nexport {\n StageDesignVActualUtils,\n accuracy,\n alerts,\n apps,\n audio,\n bha,\n casing,\n chartSeries,\n enableHighchartsDelayedTooltip,\n completion,\n components,\n convert,\n convertArray,\n convertKeysToCamelCase,\n convertKeysToSnakeCase,\n convertValue,\n createNotification,\n csvExport,\n dashboardReports,\n devcenter,\n drillstring,\n drillstringUtils,\n env,\n feed,\n fileExtension,\n fluidCheckUtils,\n formatting,\n ga,\n formatMentionText,\n getAllUnitTypes,\n getConvertKeys,\n getDefaultImperialUnit,\n getDefaultUnits,\n getLocalStorageItem,\n getUniqueUnitsByType,\n getUnitDescription,\n getUnitDisplay,\n getUnitPlural,\n getUnitPreference,\n getUnitSingular,\n getUnitSystem,\n getUnitsByType,\n getUserUnits,\n goals,\n goalsConfig,\n jsonaDataFormatter,\n lasParser,\n main,\n mapUnits,\n mapbox,\n metricsUtils,\n mobileDetect,\n nativeMessages,\n notifications,\n permissions,\n removeNotification,\n reports,\n resolveWellHubSlug,\n sharedDCStore,\n showErrorNotification,\n showInfoNotification,\n showNeutralNotification,\n showSuccessNotification,\n showToast,\n showWarningNotification,\n subscribeForUserUnitsUpdates,\n themeVariables,\n time,\n torqueAndHookloadUtils,\n updateLocalStorageItem,\n updateUserUnits,\n isSuggestionsListOpened,\n stripMentionMarkup,\n formatFileSize,\n};\n\nexport * from './delay';\nexport * from './downloadBlob';\nexport * from './getSingleAsset';\n\nexport * as chart from './charts';\n// Deprecated, reexported for backwards compatibility\n/**\n * @deprecated
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/utils/index.ts"],"sourcesContent":["import {\n formatMentionText,\n isSuggestionsListOpened,\n stripMentionMarkup,\n} from '../components/UserMention/utils';\n\nimport * as StageDesignVActualUtils from './StageDesignVActualUtils';\nimport * as alerts from './alerts';\nimport * as audio from './audio';\nimport * as casing from './casing';\nimport * as chartSeries from './chartSeries';\nimport * as completion from './completion';\nimport * as components from './components';\nimport * as convert from './convert';\nimport * as csvExport from './csvExport';\nimport * as devcenter from './devcenter';\nimport * as drillstring from './drillstring';\nimport * as drillstringUtils from './DrillstringUtils';\nimport * as fluidCheckUtils from './FluidCheckUtils';\nimport * as formatting from './formatting';\nimport * as ga from './ga';\nimport * as goals from './goals';\nimport * as goalsConfig from './goalsConfig';\nimport * as lasParser from './lasParser';\nimport * as main from './main';\nimport * as mapUnits from './mapUnits';\nimport * as mapbox from './mapbox';\nimport * as metricsUtils from './metrics';\nimport * as mobileDetect from './mobileDetect';\nimport * as nativeMessages from './nativeMessages';\nimport * as notifications from './notifications';\nimport * as feed from './feed';\nimport * as permissions from './permissions';\nimport * as reports from './reports';\nimport * as time from './time';\nimport * as torqueAndHookloadUtils from './torqueAndHookloadUtils';\nimport * as accuracy from './accuracy';\nimport {\n createNotification,\n removeNotification,\n showErrorNotification,\n showInfoNotification,\n showNeutralNotification,\n showSuccessNotification,\n showWarningNotification,\n} from './notificationToasts';\nimport { showToast } from './devcenterToasts';\nimport { convertKeysToCamelCase, convertKeysToSnakeCase, getConvertKeys } from './convertKeys';\nimport * as dashboardReports from './dashboardReports';\nimport * as apps from './apps';\nimport * as themeVariables from './themeVariables';\nimport * as env from './env';\nimport * as fileExtension from './fileExtension';\nimport { jsonaDataFormatter } from './jsonaDataFormatter';\nimport * as bha from './bha';\nimport { getLocalStorageItem, updateLocalStorageItem } from './localStorage';\nimport { sharedDCStore } from './sharedDCStore';\nimport resolveWellHubSlug from './resolveWellHubSlug';\nimport { enableHighchartsDelayedTooltip } from './delayedHighcharts';\nimport { formatFileSize } from './formatFileSize';\nimport { getXAxis, getYAxis } from './charts';\n\nconst {\n convertArray,\n convertValue,\n getAllUnitTypes,\n getDefaultImperialUnit,\n getDefaultUnits,\n getUnitDescription,\n getUnitDisplay,\n getUnitPlural,\n getUnitPreference,\n getUnitsByType,\n getUnitSingular,\n getUnitSystem,\n updateUserUnits,\n getUserUnits,\n subscribeForUserUnitsUpdates,\n getUniqueUnitsByType,\n} = convert;\n\nexport {\n StageDesignVActualUtils,\n accuracy,\n alerts,\n apps,\n audio,\n bha,\n casing,\n chartSeries,\n enableHighchartsDelayedTooltip,\n completion,\n components,\n convert,\n convertArray,\n convertKeysToCamelCase,\n convertKeysToSnakeCase,\n convertValue,\n createNotification,\n csvExport,\n dashboardReports,\n devcenter,\n drillstring,\n drillstringUtils,\n env,\n feed,\n fileExtension,\n fluidCheckUtils,\n formatting,\n ga,\n formatMentionText,\n getAllUnitTypes,\n getConvertKeys,\n getDefaultImperialUnit,\n getDefaultUnits,\n getLocalStorageItem,\n getUniqueUnitsByType,\n getUnitDescription,\n getUnitDisplay,\n getUnitPlural,\n getUnitPreference,\n getUnitSingular,\n getUnitSystem,\n getUnitsByType,\n getUserUnits,\n goals,\n goalsConfig,\n jsonaDataFormatter,\n lasParser,\n main,\n mapUnits,\n mapbox,\n metricsUtils,\n mobileDetect,\n nativeMessages,\n notifications,\n permissions,\n removeNotification,\n reports,\n resolveWellHubSlug,\n sharedDCStore,\n showErrorNotification,\n showInfoNotification,\n showNeutralNotification,\n showSuccessNotification,\n showToast,\n showWarningNotification,\n subscribeForUserUnitsUpdates,\n themeVariables,\n time,\n torqueAndHookloadUtils,\n updateLocalStorageItem,\n updateUserUnits,\n isSuggestionsListOpened,\n stripMentionMarkup,\n formatFileSize,\n};\n\nexport * from './delay';\nexport * from './downloadBlob';\nexport * from './getSingleAsset';\n\nexport * as chart from './charts';\n// Deprecated, reexported for backwards compatibility\n/**\n * @deprecated use `chart.getXAxis`\n */\nexport const getChartHorizontalAxis = getXAxis;\n\n/**\n * @deprecated use `chart.getYAxis`\n */\nexport const getChartVerticalAxis = getYAxis;\n\nexport * from './safeTemplate';\n"],"names":["convertArray","convert","convertValue","getAllUnitTypes","getDefaultImperialUnit","getDefaultUnits","getUnitDescription","getUnitDisplay","getUnitPlural","getUnitPreference","getUnitsByType","getUnitSingular","getUnitSystem","updateUserUnits","getUserUnits","subscribeForUserUnitsUpdates","getUniqueUnitsByType","getChartHorizontalAxis","getXAxis","getChartVerticalAxis","getYAxis"],"mappings":"8rDA+DEA,GAgBEC,EAAAA,aAfFC,GAeED,EAAAA,aAdFE,GAcEF,EAAAA,gBAbFG,GAaEH,EAAAA,uBAZFI,GAYEJ,EAAAA,gBAXFK,GAWEL,EAAAA,mBAVFM,GAUEN,EAAAA,eATFO,GASEP,EAAAA,cARFQ,GAQER,EAAAA,kBAPFS,GAOET,EAAAA,eANFU,GAMEV,EAAAA,gBALFW,GAKEX,EAAAA,cAJFY,GAIEZ,EAAAA,gBAHFa,GAGEb,EAAAA,aAFFc,GAEEd,EAAAA,6BADFe,GACEf,EADkBe,qBAyFTC,GAAyBC,EAAQA,SAKjCC,GAAuBC,EAAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppFooter.stories.d.ts","sourceRoot":"","sources":["../../../src/componentsV2/AppFooter/AppFooter.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAW,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAMvC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAIxC,KAAK,KAAK,GAAG,cAAc,CAAC,OAAO,SAAS,CAAC,CAAC;AAE9C,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,KAAK,CAGrB,CAAC;
|
|
1
|
+
{"version":3,"file":"AppFooter.stories.d.ts","sourceRoot":"","sources":["../../../src/componentsV2/AppFooter/AppFooter.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAW,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAMvC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAIxC,KAAK,KAAK,GAAG,cAAc,CAAC,OAAO,SAAS,CAAC,CAAC;AAE9C,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,KAAK,CAGrB,CAAC;eA4Ba,IAAI;AAGnB,eAAO,MAAM,OAAO,UAAW,KAAK,4CAanC,CAAC;AAMF,eAAO,MAAM,kBAAkB,+CA0B9B,CAAC;AAQF,eAAO,MAAM,iBAAiB,+CAyB7B,CAAC;AAeF,eAAO,MAAM,gBAAgB,+CAiB5B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppHeader.stories.d.ts","sourceRoot":"","sources":["../../../src/componentsV2/AppHeader/AppHeader.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAC7C,OAAO,EAAE,cAAc,EAAY,MAAM,OAAO,CAAC;AAUjD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,KAAK,KAAK,GAAG,cAAc,CAAC,OAAO,SAAS,CAAC,CAAC;AA+F9C,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,KAAK,CAGrB,CAAC;
|
|
1
|
+
{"version":3,"file":"AppHeader.stories.d.ts","sourceRoot":"","sources":["../../../src/componentsV2/AppHeader/AppHeader.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAC7C,OAAO,EAAE,cAAc,EAAY,MAAM,OAAO,CAAC;AAUjD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,KAAK,KAAK,GAAG,cAAc,CAAC,OAAO,SAAS,CAAC,CAAC;AA+F9C,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,KAAK,CAGrB,CAAC;eAiCa,IAAI;AAEnB,eAAO,MAAM,OAAO,UAAW,KAAK,4CAInC,CAAC;AAEF,eAAO,MAAM,aAAa,+CA0CzB,CAAC;AAOF,eAAO,MAAM,QAAQ,+CAIpB,CAAC;AAMF,eAAO,MAAM,WAAW,+CA4DvB,CAAC;AAOF,eAAO,MAAM,kBAAkB,+CAqB9B,CAAC;AAOF,eAAO,MAAM,8BAA8B,+CAkB1C,CAAC;AAOF,eAAO,MAAM,WAAW,+CA0BvB,CAAC;AAWF,eAAO,MAAM,eAAe,+CAU3B,CAAC;AAMF,eAAO,MAAM,cAAc,+CAoI1B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LiveDotIndicator.d.ts","sourceRoot":"","sources":["../../../src/componentsV2/LiveDotIndicator/LiveDotIndicator.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"LiveDotIndicator.d.ts","sourceRoot":"","sources":["../../../src/componentsV2/LiveDotIndicator/LiveDotIndicator.tsx"],"names":[],"mappings":"AAKA,MAAM,MAAM,qBAAqB,GAAG;IAClC,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;IAE1B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAwBF,eAAO,MAAM,gBAAgB,iCAAkC,qBAAqB,4CAgCnF,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import t from"classnames";import e from"./LiveDotIndicator.scss.js";import{jsx as
|
|
1
|
+
import t from"classnames";import{useRef as r,useLayoutEffect as a}from"react";import e from"./LiveDotIndicator.scss.js";import{jsx as i}from"react/jsx-runtime";var n={live:e.live,offline:e.offline},o="cubic-bezier(0.455, 0.03, 0.515, 0.955)",c="cubic-bezier(0.215, 0.61, 0.355, 1)",s=[{opacity:.5,easing:o},{opacity:1,easing:o},{opacity:.5}],f=[{transform:"scale(1)",opacity:0,easing:c},{transform:"scale(2)",opacity:.5,easing:c},{transform:"scale(3.5)",opacity:0}],m=function(o){var c=o.state,m=o.className,u=o.testId,l=r(null);return a((function(){var t;if("live"===c&&null!==(t=l.current)&&void 0!==t&&t.animate){var r=[l.current.animate(s,{duration:3250,delay:-400,iterations:1/0}),l.current.animate(f,{duration:3250,iterations:1/0,pseudoElement:"::after"})];return function(){return r.forEach((function(t){return t.cancel()}))}}}),[c]),i("div",{"data-testid":u,className:t(e.root,n[c],m),ref:l})};export{m as LiveDotIndicator};
|
|
2
2
|
//# sourceMappingURL=LiveDotIndicator.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LiveDotIndicator.js","sources":["../../../src/componentsV2/LiveDotIndicator/LiveDotIndicator.tsx"],"sourcesContent":["import classNames from 'classnames';\n\nimport styles from './LiveDotIndicator.scss';\n\nexport type LiveDotIndicatorProps = {\n state: 'live' | 'offline';\n\n className?: string;\n testId?: string;\n};\n\nconst StateToClassMap: Record<LiveDotIndicatorProps['state'], string> = {\n live: styles.live,\n offline: styles.offline,\n};\n\nexport const LiveDotIndicator = ({ state, className, testId }: LiveDotIndicatorProps) => (\n <div\n
|
|
1
|
+
{"version":3,"file":"LiveDotIndicator.js","sources":["../../../src/componentsV2/LiveDotIndicator/LiveDotIndicator.tsx"],"sourcesContent":["import classNames from 'classnames';\nimport { useLayoutEffect, useRef } from 'react';\n\nimport styles from './LiveDotIndicator.scss';\n\nexport type LiveDotIndicatorProps = {\n state: 'live' | 'offline';\n\n className?: string;\n testId?: string;\n};\n\nconst StateToClassMap: Record<LiveDotIndicatorProps['state'], string> = {\n live: styles.live,\n offline: styles.offline,\n};\n\nconst PULSE_DURATION_MS = 3250;\nconst BG_EASING = 'cubic-bezier(0.455, 0.03, 0.515, 0.955)';\nconst RING_EASING = 'cubic-bezier(0.215, 0.61, 0.355, 1)';\n\n// Keyframe easing, not the option: a CSS animation eases each keyframe interval, and these match the CSS it replaces.\nconst BG_KEYFRAMES: Keyframe[] = [\n { opacity: 0.5, easing: BG_EASING },\n { opacity: 1, easing: BG_EASING },\n { opacity: 0.5 },\n];\n\nconst RING_KEYFRAMES: Keyframe[] = [\n { transform: 'scale(1)', opacity: 0, easing: RING_EASING },\n { transform: 'scale(2)', opacity: 0.5, easing: RING_EASING },\n { transform: 'scale(3.5)', opacity: 0 },\n];\n\nexport const LiveDotIndicator = ({ state, className, testId }: LiveDotIndicatorProps) => {\n const dotRef = useRef<HTMLDivElement>(null);\n\n // Web Animations, not CSS keyframes: every React root listens for animation events, and while a\n // document listens, Chromium updates a running CSS animation on the main thread every frame.\n useLayoutEffect(() => {\n // A DOM without Web Animations (jsdom in consumers' tests) renders the dot still, as it renders any page.\n if (state !== 'live' || !dotRef.current?.animate) return undefined;\n\n const animations = [\n dotRef.current.animate(BG_KEYFRAMES, {\n duration: PULSE_DURATION_MS,\n delay: -400,\n iterations: Infinity,\n }),\n dotRef.current.animate(RING_KEYFRAMES, {\n duration: PULSE_DURATION_MS,\n iterations: Infinity,\n pseudoElement: '::after',\n }),\n ];\n\n return () => animations.forEach(animation => animation.cancel());\n }, [state]);\n\n return (\n <div\n data-testid={testId}\n className={classNames(styles.root, StateToClassMap[state], className)}\n ref={dotRef}\n />\n );\n};\n"],"names":["StateToClassMap","live","styles","offline","BG_EASING","RING_EASING","BG_KEYFRAMES","opacity","easing","RING_KEYFRAMES","transform","LiveDotIndicator","_ref","state","className","testId","dotRef","useRef","useLayoutEffect","_dotRef$current","current","animate","animations","duration","delay","iterations","Infinity","pseudoElement","forEach","animation","cancel","_jsx","classNames","root","ref"],"mappings":"gKAYA,IAAMA,EAAkE,CACtEC,KAAMC,EAAOD,KACbE,QAASD,EAAOC,SAIZC,EAAY,0CACZC,EAAc,sCAGdC,EAA2B,CAC/B,CAAEC,QAAS,GAAKC,OAAQJ,GACxB,CAAEG,QAAS,EAAGC,OAAQJ,GACtB,CAAEG,QAAS,KAGPE,EAA6B,CACjC,CAAEC,UAAW,WAAYH,QAAS,EAAGC,OAAQH,GAC7C,CAAEK,UAAW,WAAYH,QAAS,GAAKC,OAAQH,GAC/C,CAAEK,UAAW,aAAcH,QAAS,IAGzBI,EAAmB,SAAyDC,GAAA,IAAtDC,IAAAA,MAAOC,IAAAA,UAAWC,IAAAA,OAC7CC,EAASC,EAAuB,MAwBtC,OApBAC,GAAgB,WAAM,IAAAC,EAEpB,GAAc,SAAVN,GAAqB,QAAAG,EAAAA,EAAOI,eAAP,IAAAD,GAAAA,EAAgBE,QAAzC,CAEA,IAAMC,EAAa,CACjBN,EAAOI,QAAQC,QAAQf,EAAc,CACnCiB,SA5BkB,KA6BlBC,OAAQ,IACRC,WAAYC,MAEdV,EAAOI,QAAQC,QAAQZ,EAAgB,CACrCc,SAjCkB,KAkClBE,WAAYC,IACZC,cAAe,aAInB,OAAO,WAAA,OAAML,EAAWM,SAAQ,SAAAC,GAAS,OAAIA,EAAUC,WAAS,CAfE,CAgBpE,GAAG,CAACjB,IAGFkB,EAAA,MAAA,CACE,cAAahB,EACbD,UAAWkB,EAAW9B,EAAO+B,KAAMjC,EAAgBa,GAAQC,GAC3DoB,IAAKlB,GAGX"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import
|
|
1
|
+
import o from'./../../ext-esm/style-inject/dist/style-inject.es.js';var e={spacing:"8",root:"LiveDotIndicator_root__9o2vz",live:"LiveDotIndicator_live__2lXWs",offline:"LiveDotIndicator_offline__1W-4D"};o('.LiveDotIndicator_root__9o2vz{display:inline-block;padding:2px;vertical-align:middle}.LiveDotIndicator_root__9o2vz:before{border-radius:50%;content:"";display:block;height:4px;width:4px}.LiveDotIndicator_live__2lXWs{isolation:isolate;position:relative}.LiveDotIndicator_live__2lXWs:after,.LiveDotIndicator_live__2lXWs:before{background:var(--palette-success-bright)}.LiveDotIndicator_live__2lXWs:after{border-radius:50%;content:"";height:4px;left:2px;position:absolute;top:2px;width:4px;z-index:-1}.LiveDotIndicator_offline__1W-4D:before{background:var(--palette-background-b-9);box-shadow:0 0 0 2px rgb(from var(--palette-background-b-9) r g b/.4)}');export{e as default};
|
|
2
2
|
//# sourceMappingURL=LiveDotIndicator.scss.js.map
|