@yahoo/uds-v5-wip 1.61.0 → 1.62.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/config/dist/AssetGroup.d.ts +75 -0
- package/dist/config/dist/AssetGroup.js +114 -0
- package/dist/config/dist/Component.d.ts +309 -0
- package/dist/config/dist/Component.js +897 -0
- package/dist/config/dist/ComponentGroup.d.ts +21 -0
- package/dist/config/dist/ComponentGroup.js +46 -0
- package/dist/config/dist/CompositeStyle.d.ts +28 -0
- package/dist/config/dist/CompositeStyle.js +52 -0
- package/dist/config/dist/Config.d.ts +422 -0
- package/dist/config/dist/Config.js +1426 -0
- package/dist/config/dist/Mode.d.ts +42 -0
- package/dist/config/dist/Mode.js +81 -0
- package/dist/config/dist/Modifier.d.ts +52 -0
- package/dist/config/dist/Modifier.js +97 -0
- package/dist/config/dist/MotionDef.d.ts +50 -0
- package/dist/config/dist/MotionDef.js +97 -0
- package/dist/config/dist/Props.d.ts +235 -126
- package/dist/config/dist/Provider.d.ts +21 -0
- package/dist/config/dist/Provider.js +14 -0
- package/dist/config/dist/StyleProp.d.ts +113 -0
- package/dist/config/dist/StyleProp.js +197 -0
- package/dist/config/dist/Token.d.ts +56 -0
- package/dist/config/dist/Token.js +112 -0
- package/dist/config/dist/TokenGroup.d.ts +33 -0
- package/dist/config/dist/TokenGroup.js +68 -0
- package/dist/config/dist/asset-kind.d.ts +56 -0
- package/dist/config/dist/asset-kind.js +29 -0
- package/dist/config/dist/brands.d.ts +31 -0
- package/dist/config/dist/brands.js +20 -0
- package/dist/config/dist/captureCallerPath.d.ts +49 -0
- package/dist/config/dist/captureCallerPath.js +95 -0
- package/dist/config/dist/colorExpressions.d.ts +132 -0
- package/dist/config/dist/colorExpressions.js +148 -0
- package/dist/config/dist/defineAssetGroup.d.ts +158 -0
- package/dist/config/dist/defineAssetGroup.js +263 -0
- package/dist/config/dist/defineProvider.d.ts +30 -0
- package/dist/config/dist/defineProvider.js +60 -0
- package/dist/config/dist/element-marker.d.ts +55 -0
- package/dist/config/dist/element-marker.js +113 -0
- package/dist/config/dist/entity-utils.d.ts +27 -0
- package/dist/config/dist/entity-utils.js +105 -0
- package/dist/config/dist/factories.d.ts +707 -0
- package/dist/config/dist/factories.js +393 -0
- package/dist/config/dist/foreign-component-name.js +42 -0
- package/dist/config/dist/index.d.ts +30 -21
- package/dist/config/dist/index.js +26 -14
- package/dist/config/dist/interpolate.d.ts +21 -0
- package/dist/config/dist/interpolate.js +10 -0
- package/dist/config/dist/markers.d.ts +218 -0
- package/dist/config/dist/markers.js +67 -0
- package/dist/config/dist/refs.d.ts +143 -69
- package/dist/config/dist/refs.js +95 -113
- package/dist/config/dist/token-override-rows.d.ts +67 -0
- package/dist/config/dist/token-override-rows.js +223 -0
- package/dist/config/dist/tokenValueType.js +138 -0
- package/dist/config/dist/types/css-properties.d.ts +132 -122
- package/dist/config/dist/types/css-property-keywords.d.ts +157 -0
- package/dist/config/dist/types/css-property-keywords.js +616 -0
- package/dist/config/dist/types/css-values.d.ts +18 -16
- package/dist/config/dist/types.d.ts +688 -66
- package/dist/config/dist/units.d.ts +15 -0
- package/dist/config/dist/units.js +16 -0
- package/dist/config.d.ts +31 -22
- package/dist/config.js +28 -16
- package/dist/loader/dist/loader/artifacts.js +26 -9
- package/dist/loader/dist/loader.d.ts +11 -23
- package/dist/loader/dist/loader.js +54 -99
- package/dist/loader/dist/next.js +3 -3
- package/dist/loader/dist/transform-runner.js +1 -8
- package/dist/loader/dist/unplugin.d.ts +2 -2
- package/dist/loader/dist/unplugin.js +2 -2
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/utils/dist/index.js +1 -0
- package/dist/utils/dist/motion-utils/resolveMotionState.d.ts +35 -0
- package/dist/utils/dist/motion-utils/resolveMotionState.js +33 -0
- package/dist/utils/dist/string-utils/componentClassName.d.ts +41 -8
- package/dist/utils/dist/string-utils/componentClassName.js +48 -11
- package/dist/utils.d.ts +3 -2
- package/dist/utils.js +3 -2
- package/package.json +3 -3
- package/dist/codegen/dist/loader/getLoaderArtifacts.js +0 -2
- package/dist/config/dist/bindRender.d.ts +0 -16
- package/dist/config/dist/bindRender.js +0 -310
- package/dist/config/dist/className.d.ts +0 -54
- package/dist/config/dist/className.js +0 -77
- package/dist/config/dist/component-config.d.ts +0 -862
- package/dist/config/dist/component-config.js +0 -163
- package/dist/config/dist/component-refs.d.ts +0 -121
- package/dist/config/dist/createConfig.d.ts +0 -456
- package/dist/config/dist/createConfig.js +0 -503
- package/dist/config/dist/createStyler.d.ts +0 -35
- package/dist/config/dist/createStyler.js +0 -93
- package/dist/config/dist/defineComponent.d.ts +0 -317
- package/dist/config/dist/defineComponent.js +0 -264
- package/dist/config/dist/defineCompositeStyle.d.ts +0 -93
- package/dist/config/dist/defineCompositeStyle.js +0 -18
- package/dist/config/dist/defineMotionConfig.d.ts +0 -152
- package/dist/config/dist/definePreview.d.ts +0 -45
- package/dist/config/dist/definePreview.js +0 -35
- package/dist/config/dist/defineStyleProp.d.ts +0 -289
- package/dist/config/dist/defineStyleProp.js +0 -61
- package/dist/config/dist/merge-utils.js +0 -51
- package/dist/config/dist/propertyAcceptedTypes.d.ts +0 -19
- package/dist/config/dist/propertyAcceptedTypes.js +0 -220
- package/dist/config/dist/resolveCompoundProps.d.ts +0 -65
- package/dist/config/dist/resolveCompoundProps.js +0 -120
- package/dist/config/dist/resolveStyleProp.d.ts +0 -157
- package/dist/config/dist/resolveStyleProp.js +0 -260
- package/dist/config/dist/runtime-registry.js +0 -37
- package/dist/config/dist/serialize.d.ts +0 -47
- package/dist/config/dist/serialize.js +0 -111
- package/dist/config/dist/sniffTokenType.d.ts +0 -7
- package/dist/config/dist/sniffTokenType.js +0 -67
- package/dist/config/dist/style-prop-runtime.d.ts +0 -75
- package/dist/config/dist/style-prop-runtime.js +0 -390
- package/dist/loader/dist/loader/internal-meta.js +0 -59
- package/dist/loader/dist/loader/lower-new-api-primitive.js +0 -252
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
//#region ../config/dist/units.d.ts
|
|
2
|
+
//#region src/units.d.ts
|
|
3
|
+
/**
|
|
4
|
+
* Authoring helpers for inline CSS unit values. Pure string formatters
|
|
5
|
+
* — no token resolution, no Config dependency — so they can live as a
|
|
6
|
+
* standalone module and stay tree-shakeable.
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Convert a px value to rem assuming a 16px base.
|
|
10
|
+
*
|
|
11
|
+
* @example rem(14) // '0.875rem'
|
|
12
|
+
*/
|
|
13
|
+
declare function rem(px: number): string; //#endregion
|
|
14
|
+
//#endregion
|
|
15
|
+
export { rem };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
//#region ../config/dist/units.js
|
|
2
|
+
/**
|
|
3
|
+
* Authoring helpers for inline CSS unit values. Pure string formatters
|
|
4
|
+
* — no token resolution, no Config dependency — so they can live as a
|
|
5
|
+
* standalone module and stay tree-shakeable.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Convert a px value to rem assuming a 16px base.
|
|
9
|
+
*
|
|
10
|
+
* @example rem(14) // '0.875rem'
|
|
11
|
+
*/
|
|
12
|
+
function rem(px) {
|
|
13
|
+
return `${px / 16}rem`;
|
|
14
|
+
}
|
|
15
|
+
//#endregion
|
|
16
|
+
export { rem };
|
package/dist/config.d.ts
CHANGED
|
@@ -1,23 +1,32 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { BoolMarker, ComponentConfigInput, ComponentConfigValue, ComponentMotionValue, ComponentSlotStyles, CompositeBinding, CompositeMarker, CompoundPropsEntry, EnumMarker, HiddenMarker, HtmlTag, LayerBundle, LayerInput, LayerOverride, PrimitiveLayer, PrimitivePropBinding, PropBinding, RenderArgs, RootTag, SingleLayerCompositeBinding, SlotMarker, SlotMotion, SplitSlotPath, StringMarker, StylePropBinding, StylePropMarker, StylePropShorthand, TokenGroupMarker, TokenMarker, VerbosePropBinding, WhenClause, bool, composite, enums, hidden, slot, string, styleProp, token, tokenGroup } from "./config/dist/component-config.js";
|
|
4
|
-
import { Props, PropsOf } from "./config/dist/Props.js";
|
|
5
|
-
import { CreateComponentRenderArgs } from "./config/dist/bindRender.js";
|
|
6
|
-
import { buildStylePropClassName } from "./config/dist/className.js";
|
|
7
|
-
import { DefinedPreview, PreviewMetadata, definePreview } from "./config/dist/definePreview.js";
|
|
8
|
-
import { CompositeStyleDef, CompositeStyleInput, CompositeStyleObject, CompositeStylesConfig, DefinedCompositeStyle, defineCompositeStyle } from "./config/dist/defineCompositeStyle.js";
|
|
9
|
-
import { BoundComponent, DefineHelpers, DefinedComponent, PrimitiveComponentInput, defineComponent } from "./config/dist/defineComponent.js";
|
|
1
|
+
import { ASSET_CLASS_CAPABILITIES, AssetKind, isPlaceable } from "./config/dist/asset-kind.js";
|
|
2
|
+
import { AnyRef, AssetGroupName, AssetGroupRef, ComponentName, ComponentRef, CompositeName, CompositeRef, CompositeRefBuilder, ModeName, ModeRef, RegisteredAssetGroups, RegisteredComponents, RegisteredCompositeStyles, RegisteredModes, RegisteredModifiers, RegisteredMotionDefs, RegisteredStyleProps, RegisteredTokenGroups, StylePropName, StylePropRef, TagName, TagRef, TokenGroupName, TokenGroupRef, TokenName, TokenQualifiedName, TokenRef, assetGroup, component, composite, isAssetGroupRef, isComponentRef, isCompositeRef, isModeRef, isStylePropRef, isTagRef, isTokenGroupRef, isTokenRef, mode, styleProp, tag, token, tokenGroup } from "./config/dist/refs.js";
|
|
10
3
|
import { ColorFn, ColorKeyword, CssAngle, CssColor, CssLength, CssPercentage, CssRatio, CssTime, CssValue, CssValueTypeName, CssVarRef, HexColor, HslColor, RgbColor } from "./config/dist/types/css-values.js";
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import { ResolvedCompoundOverrides,
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
|
|
4
|
+
import { ColorExpression, ColorSpace, ColorValue, GradientStop, GradientValue, LengthOrPercent, LineDirection, LinearGradientExpr, MixExpr, RadialGradientExpr, RadialSize, TokenRefToCss, alpha, isColorExpression, isLinearGradientExpr, isMixExpr, isRadialGradientExpr, linearGradient, mix, radialGradient, resolveColorExpression } from "./config/dist/colorExpressions.js";
|
|
5
|
+
import { CSS_GLOBAL_KEYWORDS, CSS_PROPERTY_KEYWORDS, CssPropertyWithKeywords } from "./config/dist/types/css-property-keywords.js";
|
|
6
|
+
import { ColorCssProperty, CssGlobalKeyword, CssPropertyName, CssPropertyValues } from "./config/dist/types/css-properties.js";
|
|
7
|
+
import { AssetGroupBuilder, AssetGroupConfig, AssetGroupDefinition, FontAssetGroupConfig, FontAssetGroupDefinition, IconAssetGroupConfig, IconAssetGroupDefinition, IconAssetMember, IconAssetMetadata, defineAssetGroup, defineAssetIcon } from "./config/dist/defineAssetGroup.js";
|
|
8
|
+
import { AnyStylePropDefinition, ArbitrarySpec, BaseStyles, BuildOptions, ComponentDefinition, ComponentGroupDefinition, ComponentMetadata, CompositeStyleDefinition, CompositeStyleObject, CompoundPropsEntry, CssMotionDefinition, FontAssetMember, GlobalStylesDef, JsMotionDefinition, LayerInput, LiteralFor, ModeDefinition, ModeOptionDefinition, ModifierDefinition, MotionDefinitionInput, MotionKeyframes, MotionStateKeyframe, MotionTransition, OpacityPairSpec, PreviewDefinition, PropBinding, SerializedAssetGroup, SerializedComponentGroup, SerializedConfig, SerializedFontAssetGroup, SerializedIconAssetGroup, SerializedTokenGroup, SlotMotion, StylePropDefinition, StylePropMetadata, StylePropProperty, TokenDefinition, TokenGroupDefinition, TokenModifierKey, TokenModifierValue, TokenType, TokenValue, ValuesEntry } from "./config/dist/types.js";
|
|
9
|
+
import { AssetGroup } from "./config/dist/AssetGroup.js";
|
|
10
|
+
import { Css, CssClassName, CssDeclaration, CssSelector, CssVar, cssClassName, cssDeclaration, cssSelector, cssVar } from "./config/dist/brands.js";
|
|
11
|
+
import { BooleanMarker, LayerMarker, NumberMarker, PREVIEW_SEED_KEY, PreviewAxisMarker, PreviewPropsRule, RequiredBrand, SlotMarker, SlotRef, SlotValueType, StringMarker, VariantMarker, VariantMarkerArray, VariantMarkerObject, isBoolMarker, isLayerMarker, isNumberMarker, isPreviewAxisMarker, isSlotMarker, isStringMarker, isVariantArrayMarker, isVariantMarker, matchesPreviewWhen, resolvePreviewRules } from "./config/dist/markers.js";
|
|
12
|
+
import { Component, ComponentKind, CompositeInfo, FunctionInfo, Layer, PrimitivePropKind, PropBase, PropInfo, PropKind, ResolvedCompoundOverrides, SlotInfo, SlotValueKind, StylePropInfo, StylePropKeyword, StylePropTokenUsage, VariantInfo } from "./config/dist/Component.js";
|
|
13
|
+
import { ComponentGroup } from "./config/dist/ComponentGroup.js";
|
|
14
|
+
import { CompositeStyle } from "./config/dist/CompositeStyle.js";
|
|
15
|
+
import { makeTokenRefToCss } from "./config/dist/entity-utils.js";
|
|
16
|
+
import { DataAttrs } from "./config/dist/Props.js";
|
|
17
|
+
import { BoundComponent, ComponentBuilder, ComponentBuilderMethods, ComponentRenderFn, ConfigCallbackHelpers, DefineComponentFn, DefinedComponent, DefinedProvider, DefinedStyleProp, DefinedTokenGroup, PreviewCallbackHelpers, TokenGroupMetadata, TypedSlotRef, boolean, defineComponent, defineComponentGroup, defineCompositeStyle, defineMode, defineModifier, defineMotion, defineStyleProp, defineTokenGroup, number, slot, string, variant } from "./config/dist/factories.js";
|
|
18
|
+
import { defineProvider } from "./config/dist/defineProvider.js";
|
|
19
|
+
import { Mode, ModeOption } from "./config/dist/Mode.js";
|
|
20
|
+
import { Modifier } from "./config/dist/Modifier.js";
|
|
21
|
+
import { CssMotionDef, JsMotionDef, MotionDef } from "./config/dist/MotionDef.js";
|
|
22
|
+
import { Provider } from "./config/dist/Provider.js";
|
|
23
|
+
import { ResolvedTokenLiteral, Token } from "./config/dist/Token.js";
|
|
24
|
+
import { StyleProp } from "./config/dist/StyleProp.js";
|
|
25
|
+
import { TokenGroup } from "./config/dist/TokenGroup.js";
|
|
26
|
+
import { Config, DependenciesQuery, DependencyKind, DependencyRef, DependentsQuery, parseRegistryKey } from "./config/dist/Config.js";
|
|
27
|
+
import { SOURCE_PATH_KEY, attachSourcePath, captureCallerPath, readSourcePath } from "./config/dist/captureCallerPath.js";
|
|
28
|
+
import { ELEMENT_MARKER_KIND, ElementMarker, OpaqueLeafPredicate, hasElementMarkerDeep, isElementLikeValue, isElementMarker, reviveElementMarkersDeep } from "./config/dist/element-marker.js";
|
|
29
|
+
import { interpolate } from "./config/dist/interpolate.js";
|
|
30
|
+
import { ModeBackedModifierDefinition, ModeBackedModifierInput, ModeBackedModifierLookup, OverrideModeRef, OverrideRow, buildModeBackedModifierLookup, buildNestedModifierUpdate, createModeBackedModifierLookup, mergeModifierUpdates, modifierIdToPath, modifierPathToId, modifierTreeToOverrideRows, overrideRowsToModifierTree, resolveOverrideRowValue } from "./config/dist/token-override-rows.js";
|
|
31
|
+
import { rem } from "./config/dist/units.js";
|
|
32
|
+
export { ASSET_CLASS_CAPABILITIES, AnyRef, AnyStylePropDefinition, ArbitrarySpec, AssetGroup, AssetGroupBuilder, AssetGroupConfig, AssetGroupDefinition, AssetGroupName, AssetGroupRef, AssetKind, BaseStyles, BooleanMarker, BoundComponent, BuildOptions, CSS_GLOBAL_KEYWORDS, CSS_PROPERTY_KEYWORDS, ColorCssProperty, ColorExpression, ColorFn, ColorKeyword, ColorSpace, ColorValue, Component, ComponentBuilder, ComponentBuilderMethods, ComponentDefinition, ComponentGroup, ComponentGroupDefinition, ComponentKind, ComponentMetadata, ComponentName, ComponentRef, ComponentRenderFn, CompositeInfo, CompositeName, CompositeRef, CompositeRefBuilder, CompositeStyle, CompositeStyleDefinition, CompositeStyleObject, CompoundPropsEntry, Config, ConfigCallbackHelpers, Css, CssAngle, CssClassName, CssColor, CssDeclaration, CssGlobalKeyword, CssLength, CssMotionDef, CssMotionDefinition, CssPercentage, CssPropertyName, CssPropertyValues, CssPropertyWithKeywords, CssRatio, CssSelector, CssTime, CssValue, CssValueTypeName, CssVar, CssVarRef, DataAttrs, DefineComponentFn, DefinedComponent, DefinedProvider, DefinedStyleProp, DefinedTokenGroup, DependenciesQuery, DependencyKind, DependencyRef, DependentsQuery, ELEMENT_MARKER_KIND, ElementMarker, FontAssetGroupConfig, FontAssetGroupDefinition, FontAssetMember, FunctionInfo, GlobalStylesDef, GradientStop, GradientValue, HexColor, HslColor, IconAssetGroupConfig, IconAssetGroupDefinition, IconAssetMember, IconAssetMetadata, JsMotionDef, JsMotionDefinition, Layer, LayerInput, LayerMarker, LengthOrPercent, LineDirection, LinearGradientExpr, LiteralFor, MixExpr, Mode, ModeBackedModifierDefinition, ModeBackedModifierInput, ModeBackedModifierLookup, ModeDefinition, ModeName, ModeOption, ModeOptionDefinition, ModeRef, Modifier, ModifierDefinition, MotionDef, MotionDefinitionInput, MotionKeyframes, MotionStateKeyframe, MotionTransition, NumberMarker, OpacityPairSpec, OpaqueLeafPredicate, OverrideModeRef, OverrideRow, PREVIEW_SEED_KEY, PreviewAxisMarker, PreviewCallbackHelpers, PreviewDefinition, PreviewPropsRule, PrimitivePropKind, PropBase, PropBinding, PropInfo, PropKind, Provider, RadialGradientExpr, RadialSize, RegisteredAssetGroups, RegisteredComponents, RegisteredCompositeStyles, RegisteredModes, RegisteredModifiers, RegisteredMotionDefs, RegisteredStyleProps, RegisteredTokenGroups, RequiredBrand, ResolvedCompoundOverrides, ResolvedTokenLiteral, RgbColor, SOURCE_PATH_KEY, SerializedAssetGroup, SerializedComponentGroup, SerializedConfig, SerializedFontAssetGroup, SerializedIconAssetGroup, SerializedTokenGroup, SlotInfo, SlotMarker, SlotMotion, SlotRef, SlotValueKind, SlotValueType, StringMarker, StyleProp, StylePropDefinition, StylePropInfo, StylePropKeyword, StylePropMetadata, StylePropName, StylePropProperty, StylePropRef, StylePropTokenUsage, TagName, TagRef, Token, TokenDefinition, TokenGroup, TokenGroupDefinition, TokenGroupMetadata, TokenGroupName, TokenGroupRef, TokenModifierKey, TokenModifierValue, TokenName, TokenQualifiedName, TokenRef, TokenRefToCss, TokenType, TokenValue, TypedSlotRef, ValuesEntry, VariantInfo, VariantMarker, VariantMarkerArray, VariantMarkerObject, alpha, assetGroup, attachSourcePath, boolean, buildModeBackedModifierLookup, buildNestedModifierUpdate, captureCallerPath, component, composite, createModeBackedModifierLookup, cssClassName, cssDeclaration, cssSelector, cssVar, defineAssetGroup, defineAssetIcon, defineComponent, defineComponentGroup, defineCompositeStyle, defineMode, defineModifier, defineMotion, defineProvider, defineStyleProp, defineTokenGroup, hasElementMarkerDeep, interpolate, isAssetGroupRef, isBoolMarker, isColorExpression, isComponentRef, isCompositeRef, isElementLikeValue, isElementMarker, isLayerMarker, isLinearGradientExpr, isMixExpr, isModeRef, isNumberMarker, isPlaceable, isPreviewAxisMarker, isRadialGradientExpr, isSlotMarker, isStringMarker, isStylePropRef, isTagRef, isTokenGroupRef, isTokenRef, isVariantArrayMarker, isVariantMarker, linearGradient, makeTokenRefToCss, matchesPreviewWhen, mergeModifierUpdates, mix, mode, modifierIdToPath, modifierPathToId, modifierTreeToOverrideRows, number, overrideRowsToModifierTree, parseRegistryKey, radialGradient, readSourcePath, rem, resolveColorExpression, resolveOverrideRowValue, resolvePreviewRules, reviveElementMarkersDeep, slot, string, styleProp, tag, token, tokenGroup, variant };
|
package/dist/config.js
CHANGED
|
@@ -1,17 +1,29 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
1
|
+
import { cssClassName, cssDeclaration, cssSelector, cssVar } from "./config/dist/brands.js";
|
|
2
|
+
import { makeTokenRefToCss } from "./config/dist/entity-utils.js";
|
|
3
|
+
import { AssetGroup } from "./config/dist/AssetGroup.js";
|
|
4
|
+
import { ASSET_CLASS_CAPABILITIES, isPlaceable } from "./config/dist/asset-kind.js";
|
|
5
|
+
import { SOURCE_PATH_KEY, attachSourcePath, captureCallerPath, readSourcePath } from "./config/dist/captureCallerPath.js";
|
|
6
|
+
import { assetGroup, component, composite, isAssetGroupRef, isComponentRef, isCompositeRef, isModeRef, isStylePropRef, isTagRef, isTokenGroupRef, isTokenRef, mode, styleProp, tag, token, tokenGroup } from "./config/dist/refs.js";
|
|
7
|
+
import { alpha, isColorExpression, isLinearGradientExpr, isMixExpr, isRadialGradientExpr, linearGradient, mix, radialGradient, resolveColorExpression } from "./config/dist/colorExpressions.js";
|
|
8
|
+
import { defineAssetGroup, defineAssetIcon } from "./config/dist/defineAssetGroup.js";
|
|
9
|
+
import { ELEMENT_MARKER_KIND, hasElementMarkerDeep, isElementLikeValue, isElementMarker, reviveElementMarkersDeep } from "./config/dist/element-marker.js";
|
|
10
|
+
import { PREVIEW_SEED_KEY, isBoolMarker, isLayerMarker, isNumberMarker, isPreviewAxisMarker, isSlotMarker, isStringMarker, isVariantArrayMarker, isVariantMarker, matchesPreviewWhen, resolvePreviewRules } from "./config/dist/markers.js";
|
|
11
|
+
import { Component, Layer } from "./config/dist/Component.js";
|
|
12
|
+
import { ComponentGroup } from "./config/dist/ComponentGroup.js";
|
|
13
|
+
import { CompositeStyle } from "./config/dist/CompositeStyle.js";
|
|
14
|
+
import { Mode, ModeOption } from "./config/dist/Mode.js";
|
|
15
|
+
import { Modifier } from "./config/dist/Modifier.js";
|
|
16
|
+
import { CssMotionDef, JsMotionDef } from "./config/dist/MotionDef.js";
|
|
17
|
+
import { Provider } from "./config/dist/Provider.js";
|
|
18
|
+
import { StyleProp } from "./config/dist/StyleProp.js";
|
|
19
|
+
import { Token } from "./config/dist/Token.js";
|
|
20
|
+
import { TokenGroup } from "./config/dist/TokenGroup.js";
|
|
21
|
+
import { Config, parseRegistryKey } from "./config/dist/Config.js";
|
|
22
|
+
import { defineProvider } from "./config/dist/defineProvider.js";
|
|
23
|
+
import { boolean, defineComponent, defineComponentGroup, defineCompositeStyle, defineMode, defineModifier, defineMotion, defineStyleProp, defineTokenGroup, number, slot, string, variant } from "./config/dist/factories.js";
|
|
24
|
+
import { interpolate } from "./config/dist/interpolate.js";
|
|
25
|
+
import { buildModeBackedModifierLookup, buildNestedModifierUpdate, createModeBackedModifierLookup, mergeModifierUpdates, modifierIdToPath, modifierPathToId, modifierTreeToOverrideRows, overrideRowsToModifierTree, resolveOverrideRowValue } from "./config/dist/token-override-rows.js";
|
|
26
|
+
import { CSS_GLOBAL_KEYWORDS, CSS_PROPERTY_KEYWORDS } from "./config/dist/types/css-property-keywords.js";
|
|
27
|
+
import { rem } from "./config/dist/units.js";
|
|
16
28
|
import "./config/dist/index.js";
|
|
17
|
-
export {
|
|
29
|
+
export { ASSET_CLASS_CAPABILITIES, AssetGroup, CSS_GLOBAL_KEYWORDS, CSS_PROPERTY_KEYWORDS, Component, ComponentGroup, CompositeStyle, Config, CssMotionDef, ELEMENT_MARKER_KIND, JsMotionDef, Layer, Mode, ModeOption, Modifier, PREVIEW_SEED_KEY, Provider, SOURCE_PATH_KEY, StyleProp, Token, TokenGroup, alpha, assetGroup, attachSourcePath, boolean, buildModeBackedModifierLookup, buildNestedModifierUpdate, captureCallerPath, component, composite, createModeBackedModifierLookup, cssClassName, cssDeclaration, cssSelector, cssVar, defineAssetGroup, defineAssetIcon, defineComponent, defineComponentGroup, defineCompositeStyle, defineMode, defineModifier, defineMotion, defineProvider, defineStyleProp, defineTokenGroup, hasElementMarkerDeep, interpolate, isAssetGroupRef, isBoolMarker, isColorExpression, isComponentRef, isCompositeRef, isElementLikeValue, isElementMarker, isLayerMarker, isLinearGradientExpr, isMixExpr, isModeRef, isNumberMarker, isPlaceable, isPreviewAxisMarker, isRadialGradientExpr, isSlotMarker, isStringMarker, isStylePropRef, isTagRef, isTokenGroupRef, isTokenRef, isVariantArrayMarker, isVariantMarker, linearGradient, makeTokenRefToCss, matchesPreviewWhen, mergeModifierUpdates, mix, mode, modifierIdToPath, modifierPathToId, modifierTreeToOverrideRows, number, overrideRowsToModifierTree, parseRegistryKey, radialGradient, readSourcePath, rem, resolveColorExpression, resolveOverrideRowValue, resolvePreviewRules, reviveElementMarkersDeep, slot, string, styleProp, tag, token, tokenGroup, variant };
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import fs from "node:fs";
|
|
2
2
|
//#region ../loader/dist/loader/artifacts.js
|
|
3
|
+
/**
|
|
4
|
+
* `.uds/config.json` IS the serialized config — no envelope. Parse and
|
|
5
|
+
* cache by file mtime so subsequent transforms reuse the same object.
|
|
6
|
+
*/
|
|
3
7
|
function createCachedJsonLoader() {
|
|
4
8
|
let cached = null;
|
|
5
9
|
let cachedPath = null;
|
|
@@ -27,17 +31,30 @@ function createCachedJsonLoaderWithSeed() {
|
|
|
27
31
|
if (seededPath === filePath && seededData) return seededData;
|
|
28
32
|
return loader(filePath, isDev);
|
|
29
33
|
},
|
|
30
|
-
seed: (filePath,
|
|
34
|
+
seed: (filePath, config) => {
|
|
31
35
|
seededPath = filePath;
|
|
32
|
-
seededData =
|
|
36
|
+
seededData = config;
|
|
33
37
|
}
|
|
34
38
|
};
|
|
35
39
|
}
|
|
36
|
-
const
|
|
37
|
-
const
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
40
|
+
const configLoader = createCachedJsonLoaderWithSeed();
|
|
41
|
+
const loadUdsConfig = configLoader.load;
|
|
42
|
+
configLoader.seed;
|
|
43
|
+
const projectionCache = /* @__PURE__ */ new WeakMap();
|
|
44
|
+
/**
|
|
45
|
+
* Build (or return a cached) projection of the config for the loader's
|
|
46
|
+
* hot path. Keyed by config object identity. The cache survives across
|
|
47
|
+
* transforms within one process; reloading `.uds/manifest.json`
|
|
48
|
+
* produces a fresh object, which transparently invalidates the
|
|
49
|
+
* projection.
|
|
50
|
+
*/
|
|
51
|
+
function getLoaderProjection(config) {
|
|
52
|
+
const cached = projectionCache.get(config);
|
|
53
|
+
if (cached) return cached;
|
|
54
|
+
const components = config.components ?? {};
|
|
55
|
+
const projection = { componentNames: new Set(Object.keys(components)) };
|
|
56
|
+
projectionCache.set(config, projection);
|
|
57
|
+
return projection;
|
|
58
|
+
}
|
|
42
59
|
//#endregion
|
|
43
|
-
export {
|
|
60
|
+
export { getLoaderProjection, loadUdsConfig };
|
|
@@ -3,31 +3,19 @@ import { LoaderDefinitionFunction } from "webpack";
|
|
|
3
3
|
//#region ../loader/dist/loader.d.ts
|
|
4
4
|
//#region src/loader.d.ts
|
|
5
5
|
/**
|
|
6
|
-
* The UDS loader's only build-time job
|
|
7
|
-
*
|
|
6
|
+
* The UDS loader's only build-time job: rewrite alias-prefixed local
|
|
7
|
+
* imports of registered UDS components from `@/uds/components/<seg>`
|
|
8
|
+
* (the authoring file) to `'#uds/components/<seg>'` (the codegen-
|
|
9
|
+
* emitted per-source-file module at `.uds/components/<seg>.tsx`).
|
|
8
10
|
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
* `.uds/components.tsx` barrel. The authoring file
|
|
14
|
-
* (`apps/<app>/src/uds/components/<name>.tsx`) is only read by
|
|
15
|
-
* codegen — production renders the downleveled FC.
|
|
11
|
+
* The authoring file is read only by codegen — production renders the
|
|
12
|
+
* downleveled FC. Per-file targets keep Next.js Fast Refresh surgical:
|
|
13
|
+
* editing one authoring source only invalidates that one downleveled
|
|
14
|
+
* module.
|
|
16
15
|
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
* to bake a literal `className="bg-primary"` into the output.
|
|
21
|
-
* Skips the codegen FC's runtime className concatenation entirely
|
|
22
|
-
* in the all-static case. Falls through to the runtime FC when
|
|
23
|
-
* lowering bails.
|
|
24
|
-
*
|
|
25
|
-
* 3. **Dev-mode metadata** — inject `data-uds-id` + `data-uds-source`
|
|
26
|
-
* attrs onto every UDS JSX site so devtools can map elements
|
|
27
|
-
* back to source positions. Off in production.
|
|
28
|
-
*
|
|
29
|
-
* Anything else (motion wiring, composite expansion, slot resolution,
|
|
30
|
-
* styler tracking) is owned by codegen and intentionally absent here.
|
|
16
|
+
* No JSX-site work: composite / variant / bool / style-prop resolution
|
|
17
|
+
* and motion wiring are owned by the codegen-emitted FC. The loader
|
|
18
|
+
* only changes import sources.
|
|
31
19
|
*/
|
|
32
20
|
declare const transformLoader: LoaderDefinitionFunction;
|
|
33
21
|
declare const normal: LoaderDefinitionFunction<{}, {}>; //#endregion
|
|
@@ -1,56 +1,39 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { injectInternalUdsProps } from "./loader/internal-meta.js";
|
|
3
|
-
import { lowerNewApiPrimitiveJsx } from "./loader/lower-new-api-primitive.js";
|
|
4
|
-
import path from "node:path";
|
|
5
|
-
import * as t from "@babel/types";
|
|
6
|
-
import _generate from "@babel/generator";
|
|
1
|
+
import { getLoaderProjection, loadUdsConfig } from "./loader/artifacts.js";
|
|
7
2
|
import { parse } from "@babel/parser";
|
|
8
3
|
import _traverse from "@babel/traverse";
|
|
9
4
|
//#region ../loader/dist/loader.js
|
|
10
5
|
const traverse = _traverse.default ?? _traverse;
|
|
11
|
-
const generate = _generate.default ?? _generate;
|
|
12
6
|
/**
|
|
13
|
-
* The UDS loader's only build-time job
|
|
14
|
-
*
|
|
7
|
+
* The UDS loader's only build-time job: rewrite alias-prefixed local
|
|
8
|
+
* imports of registered UDS components from `@/uds/components/<seg>`
|
|
9
|
+
* (the authoring file) to `'#uds/components/<seg>'` (the codegen-
|
|
10
|
+
* emitted per-source-file module at `.uds/components/<seg>.tsx`).
|
|
15
11
|
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
* `.uds/components.tsx` barrel. The authoring file
|
|
21
|
-
* (`apps/<app>/src/uds/components/<name>.tsx`) is only read by
|
|
22
|
-
* codegen — production renders the downleveled FC.
|
|
12
|
+
* The authoring file is read only by codegen — production renders the
|
|
13
|
+
* downleveled FC. Per-file targets keep Next.js Fast Refresh surgical:
|
|
14
|
+
* editing one authoring source only invalidates that one downleveled
|
|
15
|
+
* module.
|
|
23
16
|
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
* to bake a literal `className="bg-primary"` into the output.
|
|
28
|
-
* Skips the codegen FC's runtime className concatenation entirely
|
|
29
|
-
* in the all-static case. Falls through to the runtime FC when
|
|
30
|
-
* lowering bails.
|
|
31
|
-
*
|
|
32
|
-
* 3. **Dev-mode metadata** — inject `data-uds-id` + `data-uds-source`
|
|
33
|
-
* attrs onto every UDS JSX site so devtools can map elements
|
|
34
|
-
* back to source positions. Off in production.
|
|
35
|
-
*
|
|
36
|
-
* Anything else (motion wiring, composite expansion, slot resolution,
|
|
37
|
-
* styler tracking) is owned by codegen and intentionally absent here.
|
|
17
|
+
* No JSX-site work: composite / variant / bool / style-prop resolution
|
|
18
|
+
* and motion wiring are owned by the codegen-emitted FC. The loader
|
|
19
|
+
* only changes import sources.
|
|
38
20
|
*/
|
|
39
21
|
const transformLoader = function(source) {
|
|
40
22
|
const loaderContext = this ?? void 0;
|
|
41
23
|
if (!loaderContext?.getOptions) return source;
|
|
42
|
-
const {
|
|
43
|
-
const transformDataPath = path.join(path.dirname(manifestPath), "motion-transform-data.json");
|
|
44
|
-
const projectRoot = path.dirname(path.dirname(manifestPath));
|
|
24
|
+
const { dataPath, isDev, skipWatchDependencies } = loaderContext.getOptions();
|
|
45
25
|
const resourcePath = loaderContext.resourcePath ?? "";
|
|
46
26
|
if (resourcePath.includes(".uds/")) return source;
|
|
47
|
-
if (!skipWatchDependencies)
|
|
48
|
-
|
|
49
|
-
|
|
27
|
+
if (!skipWatchDependencies) loaderContext.addDependency?.(dataPath);
|
|
28
|
+
const config = loadUdsConfig(dataPath, isDev);
|
|
29
|
+
if (!config) return source;
|
|
30
|
+
const projection = getLoaderProjection(config);
|
|
31
|
+
let hasComponentReference = false;
|
|
32
|
+
for (const name of projection.componentNames) if (source.includes(name)) {
|
|
33
|
+
hasComponentReference = true;
|
|
34
|
+
break;
|
|
50
35
|
}
|
|
51
|
-
|
|
52
|
-
if (!manifest) return source;
|
|
53
|
-
if (!Object.keys(manifest.components).some((name) => source.includes(name))) return source;
|
|
36
|
+
if (!hasComponentReference) return source;
|
|
54
37
|
const isTS = resourcePath?.endsWith(".ts") || resourcePath?.endsWith(".tsx");
|
|
55
38
|
const isJSX = resourcePath?.endsWith(".tsx") || resourcePath?.endsWith(".jsx");
|
|
56
39
|
const parserPlugins = [];
|
|
@@ -65,67 +48,39 @@ const transformLoader = function(source) {
|
|
|
65
48
|
} catch {
|
|
66
49
|
return source;
|
|
67
50
|
}
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
nodePath.node.source.value = "#uds/components";
|
|
95
|
-
transformed = true;
|
|
96
|
-
}
|
|
97
|
-
},
|
|
98
|
-
JSXOpeningElement(nodePath) {
|
|
99
|
-
const jsxName = nodePath.node.name;
|
|
100
|
-
const jsxTagName = jsxName?.type === "JSXIdentifier" ? jsxName.name : void 0;
|
|
101
|
-
if (!jsxTagName) return;
|
|
102
|
-
if (!udsImportedNames.has(jsxTagName)) return;
|
|
103
|
-
const componentEntry = manifest.components[jsxTagName];
|
|
104
|
-
if (!componentEntry) return;
|
|
105
|
-
if (isDev) {
|
|
106
|
-
injectInternalUdsProps(nodePath, resourcePath, projectRoot, {
|
|
107
|
-
componentName: jsxTagName,
|
|
108
|
-
slotName: "root"
|
|
109
|
-
});
|
|
110
|
-
transformed = true;
|
|
111
|
-
}
|
|
112
|
-
if (!componentEntry.propBindings) return;
|
|
113
|
-
if (componentEntry.type !== "primitive") return;
|
|
114
|
-
if (nodePath.node.attributes.some((attr) => attr.type === "JSXAttribute" && attr.name?.type === "JSXIdentifier" && attr.name.name === "motion")) return;
|
|
115
|
-
const closingElement = (nodePath.parentPath?.node)?.closingElement ?? null;
|
|
116
|
-
if (lowerNewApiPrimitiveJsx(nodePath.node, closingElement, {
|
|
117
|
-
tag: componentEntry.element,
|
|
118
|
-
propBindings: componentEntry.propBindings,
|
|
119
|
-
defaultClassNames: componentEntry.defaultClassNames ?? [],
|
|
120
|
-
componentName: jsxTagName
|
|
121
|
-
}, t)) transformed = true;
|
|
51
|
+
const edits = [];
|
|
52
|
+
traverse(ast, { ImportDeclaration(nodePath) {
|
|
53
|
+
const importSource = nodePath.node.source?.value;
|
|
54
|
+
if (!importSource) return;
|
|
55
|
+
if (!(!importSource.startsWith(".") && !importSource.startsWith("/"))) return;
|
|
56
|
+
let shouldRewriteSource = false;
|
|
57
|
+
for (const specifier of nodePath.node.specifiers) {
|
|
58
|
+
if (specifier.type !== "ImportSpecifier") continue;
|
|
59
|
+
const importedName = specifier.imported?.type === "Identifier" ? specifier.imported.name : void 0;
|
|
60
|
+
if (!importedName) continue;
|
|
61
|
+
if (projection.componentNames.has(importedName)) shouldRewriteSource = true;
|
|
62
|
+
}
|
|
63
|
+
const segmentMatch = importSource.match(/\/uds\/components\/([^/]+)$/);
|
|
64
|
+
if (!shouldRewriteSource && segmentMatch) {
|
|
65
|
+
const pascal = segmentMatch[1].split("-").filter(Boolean).map((s) => s.charAt(0).toUpperCase() + s.slice(1)).join("");
|
|
66
|
+
if (projection.componentNames.has(pascal)) shouldRewriteSource = true;
|
|
67
|
+
}
|
|
68
|
+
if (shouldRewriteSource && segmentMatch) {
|
|
69
|
+
const sourceNode = nodePath.node.source;
|
|
70
|
+
if (typeof sourceNode.start !== "number" || typeof sourceNode.end !== "number") return;
|
|
71
|
+
const quote = source[sourceNode.start] ?? "'";
|
|
72
|
+
edits.push({
|
|
73
|
+
start: sourceNode.start,
|
|
74
|
+
end: sourceNode.end,
|
|
75
|
+
value: `${quote}#uds/components/${segmentMatch[1]}${quote}`
|
|
76
|
+
});
|
|
122
77
|
}
|
|
123
|
-
});
|
|
124
|
-
if (
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
78
|
+
} });
|
|
79
|
+
if (edits.length === 0) return source;
|
|
80
|
+
edits.sort((a, b) => b.start - a.start);
|
|
81
|
+
let output = source;
|
|
82
|
+
for (const edit of edits) output = output.slice(0, edit.start) + edit.value + output.slice(edit.end);
|
|
83
|
+
return output;
|
|
129
84
|
};
|
|
130
85
|
const normal = transformLoader;
|
|
131
86
|
//#endregion
|
package/dist/loader/dist/next.js
CHANGED
|
@@ -7,14 +7,14 @@ function resolveLoaderPath() {
|
|
|
7
7
|
function applyUds(nextConfig, options) {
|
|
8
8
|
const outputDir = options?.outputDir ?? ".uds";
|
|
9
9
|
const skipWatch = options?.skipWatchDependencies ?? false;
|
|
10
|
-
const
|
|
10
|
+
const dataPath = path.resolve(process.cwd(), outputDir, "config.json");
|
|
11
11
|
const loaderPath = resolveLoaderPath();
|
|
12
12
|
const turbopack = nextConfig.turbopack ?? {};
|
|
13
13
|
const existingRules = turbopack.rules ?? {};
|
|
14
14
|
const udsLoader = {
|
|
15
15
|
loader: loaderPath,
|
|
16
16
|
options: {
|
|
17
|
-
|
|
17
|
+
dataPath,
|
|
18
18
|
isDev: true,
|
|
19
19
|
skipWatchDependencies: skipWatch
|
|
20
20
|
}
|
|
@@ -45,7 +45,7 @@ function applyUds(nextConfig, options) {
|
|
|
45
45
|
use: [{
|
|
46
46
|
loader: loaderPath,
|
|
47
47
|
options: {
|
|
48
|
-
|
|
48
|
+
dataPath,
|
|
49
49
|
isDev: webpackOptions.dev,
|
|
50
50
|
skipWatchDependencies: skipWatch
|
|
51
51
|
}
|
|
@@ -1,14 +1,7 @@
|
|
|
1
|
-
import "../../config/dist/index.js";
|
|
2
1
|
import "./loader/artifacts.js";
|
|
3
2
|
import "./loader.js";
|
|
4
3
|
import "./loader/babel-utils.js";
|
|
5
|
-
import "
|
|
4
|
+
import "@babel/parser";
|
|
6
5
|
import "node:path";
|
|
7
6
|
import "@babel/types";
|
|
8
|
-
import "@babel/parser";
|
|
9
7
|
import "node:zlib";
|
|
10
|
-
//#region ../loader/dist/transform-runner.js
|
|
11
|
-
const VIRTUAL_ARTIFACTS_DIR = "/virtual/uds-loader-artifacts";
|
|
12
|
-
`${VIRTUAL_ARTIFACTS_DIR}`;
|
|
13
|
-
`${VIRTUAL_ARTIFACTS_DIR}`;
|
|
14
|
-
//#endregion
|
|
@@ -4,9 +4,9 @@ import * as _$unplugin from "unplugin";
|
|
|
4
4
|
//#region src/unplugin.d.ts
|
|
5
5
|
interface UdsPluginOptions {
|
|
6
6
|
/**
|
|
7
|
-
* Path to `.uds/
|
|
7
|
+
* Path to `.uds/config.json` (default: `<cwd>/.uds/config.json`)
|
|
8
8
|
*/
|
|
9
|
-
|
|
9
|
+
dataPath?: string;
|
|
10
10
|
/**
|
|
11
11
|
* Enable development-only metadata transforms.
|
|
12
12
|
* Defaults to `process.env.NODE_ENV !== 'production'`.
|
|
@@ -21,7 +21,7 @@ function matchesFilters(id, includes, excludes) {
|
|
|
21
21
|
const udsPlugin = createUnplugin((options = {}) => {
|
|
22
22
|
const includePatterns = toArray(options.include ?? DEFAULT_INCLUDE);
|
|
23
23
|
const excludePatterns = toArray(options.exclude);
|
|
24
|
-
const
|
|
24
|
+
const dataPath = path.resolve(process.cwd(), options.dataPath ?? ".uds/config.json");
|
|
25
25
|
const isDev = options.isDev ?? true;
|
|
26
26
|
return {
|
|
27
27
|
name: "uds-unplugin",
|
|
@@ -34,7 +34,7 @@ const udsPlugin = createUnplugin((options = {}) => {
|
|
|
34
34
|
if (!matchesFilters(resourcePath, includePatterns, excludePatterns)) return null;
|
|
35
35
|
const transformedCode = transformLoader.call({
|
|
36
36
|
getOptions: () => ({
|
|
37
|
-
|
|
37
|
+
dataPath,
|
|
38
38
|
isDev
|
|
39
39
|
}),
|
|
40
40
|
addDependency: () => {},
|