@unpunnyfuns/swatchbook-blocks 0.18.0 → 0.19.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/dist/index.d.mts CHANGED
@@ -803,5 +803,5 @@ declare function TypographyScale({
803
803
  sortDir
804
804
  }: TypographyScaleProps): ReactElement;
805
805
  //#endregion
806
- export { AliasChain, type AliasChainProps, AliasedBy, type AliasedByProps, AxesContext, AxisVariance, type AxisVarianceProps, BorderPreview, type BorderPreviewProps, BorderSample, type BorderSampleProps, COLOR_FORMATS, type ColorFormat, ColorFormatContext, ColorPalette, type ColorPaletteProps, ColorTable, type ColorTableProps, CompositeBreakdown, type CompositeBreakdownProps, CompositePreview, type CompositePreviewProps, ConsumerOutput, type ConsumerOutputProps, Diagnostics, type DiagnosticsProps, DimensionBar, type DimensionBarProps, type DimensionKind, DimensionScale, type DimensionScaleProps, FontFamilySample, type FontFamilySampleProps, FontWeightScale, type FontWeightScaleProps, type FormatColorResult, GradientPalette, type GradientPaletteProps, MotionPreview, type MotionPreviewProps, MotionSample, type MotionSampleProps, type MotionSpeed, type NormalizedColor, type ProjectSnapshot, ShadowPreview, type ShadowPreviewProps, ShadowSample, type ShadowSampleProps, StrokeStyleSample, type StrokeStyleSampleProps, SwatchbookContext, SwatchbookProvider, type SwatchbookProviderProps, ThemeContext, TokenDetail, type TokenDetailProps, TokenHeader, type TokenHeaderProps, TokenNavigator, type TokenNavigatorProps, TokenTable, type TokenTableProps, TokenUsageSnippet, type TokenUsageSnippetProps, TypographyScale, type TypographyScaleProps, type VirtualAxisShape as VirtualAxis, type VirtualAxisShape, type VirtualDiagnosticShape as VirtualDiagnostic, type VirtualDiagnosticShape, type VirtualPresetShape as VirtualPreset, type VirtualPresetShape, type VirtualThemeShape as VirtualTheme, type VirtualThemeShape, type VirtualTokenShape as VirtualToken, type VirtualTokenShape, formatColor, useActiveAxes, useActiveTheme, useColorFormat, useOptionalSwatchbookData, useSwatchbookData };
806
+ export { AliasChain, type AliasChainProps, AliasedBy, type AliasedByProps, AxesContext, AxisVariance, type AxisVarianceProps, BorderPreview, type BorderPreviewProps, BorderSample, type BorderSampleProps, COLOR_FORMATS, type ColorFormat, ColorFormatContext, ColorPalette, type ColorPaletteProps, ColorTable, type ColorTableProps, CompositeBreakdown, type CompositeBreakdownProps, CompositePreview, type CompositePreviewProps, ConsumerOutput, type ConsumerOutputProps, Diagnostics, type DiagnosticsProps, DimensionBar, type DimensionBarProps, type DimensionKind, DimensionScale, type DimensionScaleProps, FontFamilySample, type FontFamilySampleProps, FontWeightScale, type FontWeightScaleProps, type FormatColorResult, GradientPalette, type GradientPaletteProps, MotionPreview, type MotionPreviewProps, MotionSample, type MotionSampleProps, type MotionSpeed, type NormalizedColor, type ProjectSnapshot, ShadowPreview, type ShadowPreviewProps, ShadowSample, type ShadowSampleProps, StrokeStyleSample, type StrokeStyleSampleProps, SwatchbookContext, SwatchbookProvider, type SwatchbookProviderProps, ThemeContext, TokenDetail, type TokenDetailProps, TokenHeader, type TokenHeaderProps, TokenNavigator, type TokenNavigatorProps, TokenTable, type TokenTableProps, TokenUsageSnippet, type TokenUsageSnippetProps, TypographyScale, type TypographyScaleProps, type VirtualAxisShape as VirtualAxis, type VirtualAxisShape, type VirtualDiagnosticShape as VirtualDiagnostic, type VirtualDiagnosticShape, type VirtualPresetShape as VirtualPreset, type VirtualPresetShape, type VirtualThemeShape as VirtualTheme, type VirtualThemeShape, type VirtualTokenShape as VirtualToken, type VirtualTokenShape, type VirtualTokenListingShape, formatColor, useActiveAxes, useActiveTheme, useColorFormat, useOptionalSwatchbookData, useSwatchbookData };
807
807
  //# sourceMappingURL=index.d.mts.map
package/dist/index.mjs CHANGED
@@ -3326,8 +3326,11 @@ function TransitionSample({ transition }) {
3326
3326
  //#region src/token-detail/ConsumerOutput.tsx
3327
3327
  function ConsumerOutput({ path }) {
3328
3328
  const { token, cssVar, activeAxes } = useTokenDetailData(path);
3329
+ const { listing } = useProject();
3329
3330
  if (!token) return null;
3330
3331
  const tupleLabel = Object.entries(activeAxes).map(([k, v]) => `${k}=${v}`).join(", ");
3332
+ const names = listing[path]?.names ?? {};
3333
+ const extraPlatforms = Object.keys(names).filter((platform) => platform !== "css" && names[platform]).toSorted();
3331
3334
  return /* @__PURE__ */ jsxs(Fragment$1, { children: [
3332
3335
  /* @__PURE__ */ jsx("div", {
3333
3336
  className: "sb-token-detail__section-header",
@@ -3346,9 +3349,18 @@ function ConsumerOutput({ path }) {
3346
3349
  label: "CSS",
3347
3350
  value: cssVar,
3348
3351
  testId: "consumer-output-css"
3349
- })
3352
+ }),
3353
+ extraPlatforms.map((platform) => /* @__PURE__ */ jsx(OutputRow, {
3354
+ label: formatPlatformLabel(platform),
3355
+ value: names[platform],
3356
+ testId: `consumer-output-${platform}`
3357
+ }, platform))
3350
3358
  ] });
3351
3359
  }
3360
+ function formatPlatformLabel(platform) {
3361
+ if (platform.length === 0) return platform;
3362
+ return platform[0].toUpperCase() + platform.slice(1);
3363
+ }
3352
3364
  function OutputRow({ label, value, testId }) {
3353
3365
  return /* @__PURE__ */ jsxs("div", {
3354
3366
  className: "sb-token-detail__consumer-row",