@flighthq/materials 0.5.1-next.4305.c5b7dc0 → 0.5.1-next.4329.8d695d9
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 +2 -2
- package/dist/anisotropyPbrExtension.js +2 -2
- package/dist/classicMaterials.js +1 -1
- package/dist/clearcoatPbrExtension.js +2 -2
- package/dist/colorScaleBias.js.map +1 -1
- package/dist/contract.js +32 -32
- package/dist/customShaderMaterial.js +1 -1
- package/dist/enableMaterialConversionGuards.js +1 -1
- package/dist/extendedPbrMaterial.js +2 -2
- package/dist/index.js +1 -1
- package/dist/iridescencePbrExtension.js +2 -2
- package/dist/material3d.js +1 -1
- package/dist/materialPresets.js +3 -3
- package/dist/pbrMaterials.js +2 -2
- package/dist/phongToPbr.js +2 -2
- package/dist/sheenPbrExtension.js +2 -2
- package/dist/specularPbrExtension.js +2 -2
- package/dist/transmissionVolumePbrExtension.js +2 -2
- package/dist/unlitMaterials.js +1 -1
- package/dist/wrappedDiffusePbrExtension.js +2 -2
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -13,5 +13,5 @@ Import the supported application-facing API from `@flighthq/materials`. The `@fl
|
|
|
13
13
|
This package is part of the locked-version Flight SDK graph. Applications may instead install and import `@flighthq/sdk` when package-level tree shaking is sufficient.
|
|
14
14
|
|
|
15
15
|
- [Flight project](https://github.com/flighthq/flight)
|
|
16
|
-
- [Source for @flighthq/materials@0.5.1-next.
|
|
17
|
-
- [License](https://github.com/flighthq/flight/blob/
|
|
16
|
+
- [Source for @flighthq/materials@0.5.1-next.4329.8d695d9](https://github.com/flighthq/flight/tree/8d695d97fdf10328d441d2ba3091fd16029b5387/packages/materials)
|
|
17
|
+
- [License](https://github.com/flighthq/flight/blob/8d695d97fdf10328d441d2ba3091fd16029b5387/LICENSE.md)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { allocateEntity, finishEntity } from '@flighthq/entity/contract';
|
|
2
2
|
import { AnisotropyPbrExtensionKind } from '@flighthq/types/contract';
|
|
3
|
-
import { isValidMaterialWeight } from
|
|
4
|
-
import { isValidPbrUvSet } from
|
|
3
|
+
import { isValidMaterialWeight } from './materialValidation.js';
|
|
4
|
+
import { isValidPbrUvSet } from './pbrExtension.js';
|
|
5
5
|
export function createAnisotropyPbrExtension(opts) {
|
|
6
6
|
const out = allocateEntity();
|
|
7
7
|
initializeAnisotropyPbrExtension(out, opts);
|
package/dist/classicMaterials.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BlinnPhongMaterialKind, LambertMaterialKind, PhongMaterialKind } from '@flighthq/types/contract';
|
|
2
|
-
import { createMaterial3D } from
|
|
2
|
+
import { createMaterial3D } from './material3d.js';
|
|
3
3
|
// Classic Blinn-Phong material: diffuse plus a half-vector specular lobe. `diffuse`/`specular`
|
|
4
4
|
// default to white, `shininess` to 32, `normalScale` to 1, all maps to null.
|
|
5
5
|
export function createBlinnPhongMaterial(opts) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { allocateEntity, finishEntity } from '@flighthq/entity/contract';
|
|
2
2
|
import { ClearcoatPbrExtensionKind } from '@flighthq/types/contract';
|
|
3
|
-
import { isValidMaterialWeight } from
|
|
4
|
-
import { isValidPbrUvSet } from
|
|
3
|
+
import { isValidMaterialWeight } from './materialValidation.js';
|
|
4
|
+
import { isValidPbrUvSet } from './pbrExtension.js';
|
|
5
5
|
export function createClearcoatPbrExtension(opts) {
|
|
6
6
|
const out = allocateEntity();
|
|
7
7
|
initializeClearcoatPbrExtension(out, opts);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"colorScaleBias.js","sourceRoot":"","sources":["../src/colorScaleBias.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAGzE,MAAM,UAAU,mBAAmB,CAAC,MAAoC;IACtE,OAAO,oBAAoB,CAAC,MAAM,CAAC,CAAC;AAC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
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
4
|
-
export * from
|
|
5
|
-
export * from
|
|
6
|
-
export * from
|
|
7
|
-
export * from
|
|
8
|
-
export * from
|
|
9
|
-
export * from
|
|
10
|
-
export * from
|
|
11
|
-
export * from
|
|
12
|
-
export * from
|
|
13
|
-
export * from
|
|
14
|
-
export * from
|
|
15
|
-
export * from
|
|
16
|
-
export * from
|
|
17
|
-
export * from
|
|
18
|
-
export * from
|
|
19
|
-
export * from
|
|
20
|
-
export * from
|
|
21
|
-
export * from
|
|
22
|
-
export * from
|
|
23
|
-
export { initializeClearcoatPbrExtension } from
|
|
24
|
-
export { initializeColorScaleBias } from
|
|
25
|
-
export { initializeStandardMaterial } from
|
|
26
|
-
export { initializeWrappedDiffusePbrExtension } from
|
|
27
|
-
export { initializeAnisotropyPbrExtension } from
|
|
28
|
-
export { initializeSheenPbrExtension } from
|
|
29
|
-
export { initializeTransmissionVolumePbrExtension } from
|
|
30
|
-
export { initializeSpecularPbrExtension } from
|
|
31
|
-
export { initializeMaterial } from
|
|
32
|
-
export { initializeIridescencePbrExtension } from
|
|
1
|
+
export * from './anisotropyPbrExtension.js';
|
|
2
|
+
export * from './classicMaterials.js';
|
|
3
|
+
export * from './clearcoatPbrExtension.js';
|
|
4
|
+
export * from './colorScaleBias.js';
|
|
5
|
+
export * from './customShaderMaterial.js';
|
|
6
|
+
export * from './extendedPbrMaterial.js';
|
|
7
|
+
export * from './iridescencePbrExtension.js';
|
|
8
|
+
export * from './material.js';
|
|
9
|
+
export * from './materialPresets.js';
|
|
10
|
+
export * from './materialValidation.js';
|
|
11
|
+
export * from './pbrExtension.js';
|
|
12
|
+
export * from './enableMaterialConversionGuards.js';
|
|
13
|
+
export * from './explainMaterialConversion.js';
|
|
14
|
+
export * from './pbrMaterials.js';
|
|
15
|
+
export * from './phongToPbr.js';
|
|
16
|
+
export * from './sheenPbrExtension.js';
|
|
17
|
+
export * from './specularPbrExtension.js';
|
|
18
|
+
export * from './material3d.js';
|
|
19
|
+
export * from './standardMaterial.js';
|
|
20
|
+
export * from './transmissionVolumePbrExtension.js';
|
|
21
|
+
export * from './unlitMaterials.js';
|
|
22
|
+
export * from './wrappedDiffusePbrExtension.js';
|
|
23
|
+
export { initializeClearcoatPbrExtension } from './clearcoatPbrExtension.js';
|
|
24
|
+
export { initializeColorScaleBias } from './colorScaleBias.js';
|
|
25
|
+
export { initializeStandardMaterial } from './standardMaterial.js';
|
|
26
|
+
export { initializeWrappedDiffusePbrExtension } from './wrappedDiffusePbrExtension.js';
|
|
27
|
+
export { initializeAnisotropyPbrExtension } from './anisotropyPbrExtension.js';
|
|
28
|
+
export { initializeSheenPbrExtension } from './sheenPbrExtension.js';
|
|
29
|
+
export { initializeTransmissionVolumePbrExtension } from './transmissionVolumePbrExtension.js';
|
|
30
|
+
export { initializeSpecularPbrExtension } from './specularPbrExtension.js';
|
|
31
|
+
export { initializeMaterial } from './material.js';
|
|
32
|
+
export { initializeIridescencePbrExtension } from './iridescencePbrExtension.js';
|
|
33
33
|
//# sourceMappingURL=contract.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CustomShaderMaterialKind } from '@flighthq/types/contract';
|
|
2
|
-
import { createMaterial3D } from
|
|
2
|
+
import { createMaterial3D } from './material3d.js';
|
|
3
3
|
// User-authored shader material. `shaderKey` references backend-native source registered on the
|
|
4
4
|
// render state (registerGlCustomMaterialShader or registerWgpuCustomMaterialShader); `uniforms`
|
|
5
5
|
// carries flat scalar/vector values and `textures` carries named bindings. All default to their
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { logOnce } from '@flighthq/log/contract';
|
|
2
2
|
import { LogLevel } from '@flighthq/types/contract';
|
|
3
|
-
import { setMaterialConversionGuard } from
|
|
3
|
+
import { setMaterialConversionGuard } from './pbrMaterials.js';
|
|
4
4
|
// Uninstalls the guard, restoring the silent conversion.
|
|
5
5
|
export function disableMaterialConversionGuards() {
|
|
6
6
|
setMaterialConversionGuard(null);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ExtendedPbrMaterialKind } from '@flighthq/types/contract';
|
|
2
|
-
import { createMaterial3D } from
|
|
3
|
-
import { createStandardPbrMaterialProperties } from
|
|
2
|
+
import { createMaterial3D } from './material3d.js';
|
|
3
|
+
import { createStandardPbrMaterialProperties } from './pbrMaterials.js';
|
|
4
4
|
// Builds the composable PBR material lane. The ordered extension list is retained by reference so its
|
|
5
5
|
// identity and ordering remain an explicit batching/program-selection fact.
|
|
6
6
|
export function createExtendedPbrMaterial(opts) {
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { clampStandardPbrMaterialProperties, cloneColorScaleBias, cloneMaterial, concatColorScaleBias, convertPhongToStandardPbrMaterial, convertSpecularGlossinessToStandardPbr, disableMaterialConversionGuards, enableMaterialConversionGuards, explainPhongConversion, explainSpecularGlossinessConversion, copyColorScaleBias, copyColorScaleBiasToArrays, copyMaterial, createAluminumStandardPbrMaterial, createAnisotropyPbrExtension, createBlinnPhongMaterial, createCarbonStandardPbrMaterial, createClearcoatPbrExtension, createColorScaleBias, createCustomShaderMaterial, createDepthMaterial, createEmissiveMaterial, createExtendedPbrMaterial, createGlassExtendedPbrMaterial, createGoldStandardPbrMaterial, createIridescencePbrExtension, createIronStandardPbrMaterial, createLambertMaterial, createMarbleStandardPbrMaterial, createMatcapMaterial, createMaterial, createNormalMaterial, createPhongMaterial, createPlasticStandardPbrMaterial, createRubberStandardPbrMaterial, createSheenPbrExtension, createSilverStandardPbrMaterial, createSkinStandardPbrMaterial, createSpecularPbrExtension, createSpecularGlossinessPbrMaterial, createStandardMaterial, createStandardPbrMaterial, createStandardPbrMaterialProperties, createMaterial3D, createToonMaterial, createTransmissionVolumePbrExtension, createUnlitMaterial, createVertexColorMaterial, createWireframeMaterial, createWoodStandardPbrMaterial, createWrappedDiffusePbrExtension, equalsColorScaleBias, equalsColorScaleBiasBiases, equalsColorScaleBiasScales, equalsMaterial, getColorScaleBiasBiasRgb, getColorScaleBiasBiasRgba, getMaterialOfKind, getPbrMetallicFromPhongSpecular, getPbrRoughnessFromPhongShininess, getPhongToPbrLightExposure, getMaterial3DAlphaMode, invertColorScaleBias, isIdentityColorScaleBias, isMaterial3DBlended, isMaterial3DMasked, isMaterial3DOpaque, isValidAnisotropyPbrExtension, isValidClearcoatPbrExtension, isValidIridescencePbrExtension, isValidMaterialClearcoat, isValidMaterialIor, isValidMaterialIridescenceThickness, isValidMaterialWeight, isValidPbrUvSet, isValidSheenPbrExtension, isValidSpecularPbrExtension, isValidTransmissionVolumePbrExtension, isValidWrappedDiffusePbrExtension, setColorScaleBias, setColorScaleBiasBiasRgb, setColorScaleBiasBiasRgba, setColorScaleBiasIdentity, } from
|
|
1
|
+
export { clampStandardPbrMaterialProperties, cloneColorScaleBias, cloneMaterial, concatColorScaleBias, convertPhongToStandardPbrMaterial, convertSpecularGlossinessToStandardPbr, disableMaterialConversionGuards, enableMaterialConversionGuards, explainPhongConversion, explainSpecularGlossinessConversion, copyColorScaleBias, copyColorScaleBiasToArrays, copyMaterial, createAluminumStandardPbrMaterial, createAnisotropyPbrExtension, createBlinnPhongMaterial, createCarbonStandardPbrMaterial, createClearcoatPbrExtension, createColorScaleBias, createCustomShaderMaterial, createDepthMaterial, createEmissiveMaterial, createExtendedPbrMaterial, createGlassExtendedPbrMaterial, createGoldStandardPbrMaterial, createIridescencePbrExtension, createIronStandardPbrMaterial, createLambertMaterial, createMarbleStandardPbrMaterial, createMatcapMaterial, createMaterial, createNormalMaterial, createPhongMaterial, createPlasticStandardPbrMaterial, createRubberStandardPbrMaterial, createSheenPbrExtension, createSilverStandardPbrMaterial, createSkinStandardPbrMaterial, createSpecularPbrExtension, createSpecularGlossinessPbrMaterial, createStandardMaterial, createStandardPbrMaterial, createStandardPbrMaterialProperties, createMaterial3D, createToonMaterial, createTransmissionVolumePbrExtension, createUnlitMaterial, createVertexColorMaterial, createWireframeMaterial, createWoodStandardPbrMaterial, createWrappedDiffusePbrExtension, equalsColorScaleBias, equalsColorScaleBiasBiases, equalsColorScaleBiasScales, equalsMaterial, getColorScaleBiasBiasRgb, getColorScaleBiasBiasRgba, getMaterialOfKind, getPbrMetallicFromPhongSpecular, getPbrRoughnessFromPhongShininess, getPhongToPbrLightExposure, getMaterial3DAlphaMode, invertColorScaleBias, isIdentityColorScaleBias, isMaterial3DBlended, isMaterial3DMasked, isMaterial3DOpaque, isValidAnisotropyPbrExtension, isValidClearcoatPbrExtension, isValidIridescencePbrExtension, isValidMaterialClearcoat, isValidMaterialIor, isValidMaterialIridescenceThickness, isValidMaterialWeight, isValidPbrUvSet, isValidSheenPbrExtension, isValidSpecularPbrExtension, isValidTransmissionVolumePbrExtension, isValidWrappedDiffusePbrExtension, setColorScaleBias, setColorScaleBiasBiasRgb, setColorScaleBiasBiasRgba, setColorScaleBiasIdentity, } from './contract.js';
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { allocateEntity, finishEntity } from '@flighthq/entity/contract';
|
|
2
2
|
import { IridescencePbrExtensionKind } from '@flighthq/types/contract';
|
|
3
|
-
import { isValidMaterialIor, isValidMaterialIridescenceThickness, isValidMaterialWeight, } from
|
|
4
|
-
import { isValidPbrUvSet } from
|
|
3
|
+
import { isValidMaterialIor, isValidMaterialIridescenceThickness, isValidMaterialWeight, } from './materialValidation.js';
|
|
4
|
+
import { isValidPbrUvSet } from './pbrExtension.js';
|
|
5
5
|
export function createIridescencePbrExtension(opts) {
|
|
6
6
|
const out = allocateEntity();
|
|
7
7
|
initializeIridescencePbrExtension(out, opts);
|
package/dist/material3d.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BlendMode } from '@flighthq/types/contract';
|
|
2
|
-
import { createMaterial } from
|
|
2
|
+
import { createMaterial } from './material.js';
|
|
3
3
|
// Builds a Material3D carrying `kind` and the shared trailer, taking each trailer field from
|
|
4
4
|
// `opts` or falling back to its default: opaque, single-sided, Normal blend, and a 0.5
|
|
5
5
|
// mask cutoff. Every 3D material constructor starts from this and adds its own maps and scalars;
|
package/dist/materialPresets.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { createExtendedPbrMaterial } from
|
|
2
|
-
import { createStandardPbrMaterial, createStandardPbrMaterialProperties } from
|
|
3
|
-
import { createTransmissionVolumePbrExtension } from
|
|
1
|
+
import { createExtendedPbrMaterial } from './extendedPbrMaterial.js';
|
|
2
|
+
import { createStandardPbrMaterial, createStandardPbrMaterialProperties } from './pbrMaterials.js';
|
|
3
|
+
import { createTransmissionVolumePbrExtension } from './transmissionVolumePbrExtension.js';
|
|
4
4
|
// Named presets for common real-world materials using glTF metallic-roughness PBR values.
|
|
5
5
|
// These are thin assemblies of standard property blocks, surface materials, and extension
|
|
6
6
|
// descriptors with canonical default parameters. Each function is individually tree-shakable.
|
package/dist/pbrMaterials.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { allocateLinearColor, packLinearChannelsToColor, unpackColorToLinear } from '@flighthq/color/contract';
|
|
2
2
|
import { SpecularGlossinessPbrMaterialKind, StandardPbrMaterialKind } from '@flighthq/types/contract';
|
|
3
|
-
import { explainSpecularGlossinessConversion } from
|
|
4
|
-
import { createMaterial3D } from
|
|
3
|
+
import { explainSpecularGlossinessConversion } from './explainMaterialConversion.js';
|
|
4
|
+
import { createMaterial3D } from './material3d.js';
|
|
5
5
|
// Converts a legacy specular-glossiness material to a metallic-roughness property block.
|
|
6
6
|
// Writes `out` with the computed base-color, metallic, and roughness values. The conversion
|
|
7
7
|
// is the canonical KHR_materials_pbrSpecularGlossiness → metallic-roughness approximation:
|
package/dist/phongToPbr.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { getColorLuminance } from '@flighthq/color/contract';
|
|
2
|
-
import { explainPhongConversion } from
|
|
3
|
-
import { createStandardPbrMaterial, reportMaterialConversionDrop } from
|
|
2
|
+
import { explainPhongConversion } from './explainMaterialConversion.js';
|
|
3
|
+
import { createStandardPbrMaterial, reportMaterialConversionDrop } from './pbrMaterials.js';
|
|
4
4
|
// Migrates a classic `PhongMaterial` to a metallic-roughness `StandardPbrMaterial` whose surface
|
|
5
5
|
// reads equivalently. A reference (not exact) mapping: the Phong reflection-vector lobe and the
|
|
6
6
|
// GGX microfacet lobe cannot match at every angle, so this preserves overall appearance —
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { allocateEntity, finishEntity } from '@flighthq/entity/contract';
|
|
2
2
|
import { SheenPbrExtensionKind } from '@flighthq/types/contract';
|
|
3
|
-
import { isValidMaterialWeight } from
|
|
4
|
-
import { isValidPbrUvSet } from
|
|
3
|
+
import { isValidMaterialWeight } from './materialValidation.js';
|
|
4
|
+
import { isValidPbrUvSet } from './pbrExtension.js';
|
|
5
5
|
export function createSheenPbrExtension(opts) {
|
|
6
6
|
const out = allocateEntity();
|
|
7
7
|
initializeSheenPbrExtension(out, opts);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { allocateEntity, finishEntity } from '@flighthq/entity/contract';
|
|
2
2
|
import { SpecularPbrExtensionKind } from '@flighthq/types/contract';
|
|
3
|
-
import { isValidMaterialWeight } from
|
|
4
|
-
import { isValidPbrUvSet } from
|
|
3
|
+
import { isValidMaterialWeight } from './materialValidation.js';
|
|
4
|
+
import { isValidPbrUvSet } from './pbrExtension.js';
|
|
5
5
|
export function createSpecularPbrExtension(opts) {
|
|
6
6
|
const out = allocateEntity();
|
|
7
7
|
initializeSpecularPbrExtension(out, opts);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { allocateEntity, finishEntity } from '@flighthq/entity/contract';
|
|
2
2
|
import { TransmissionVolumePbrExtensionKind } from '@flighthq/types/contract';
|
|
3
|
-
import { isValidMaterialIor, isValidMaterialWeight } from
|
|
4
|
-
import { isValidPbrUvSet } from
|
|
3
|
+
import { isValidMaterialIor, isValidMaterialWeight } from './materialValidation.js';
|
|
4
|
+
import { isValidPbrUvSet } from './pbrExtension.js';
|
|
5
5
|
export function createTransmissionVolumePbrExtension(opts) {
|
|
6
6
|
const out = allocateEntity();
|
|
7
7
|
initializeTransmissionVolumePbrExtension(out, opts);
|
package/dist/unlitMaterials.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DepthMaterialKind, EmissiveMaterialKind, MatcapMaterialKind, NormalMaterialKind, ToonMaterialKind, UnlitMaterialKind, VertexColorMaterialKind, WireframeMaterialKind, } from '@flighthq/types/contract';
|
|
2
|
-
import { createMaterial3D } from
|
|
2
|
+
import { createMaterial3D } from './material3d.js';
|
|
3
3
|
// Depth-output pass material. `near`/`far` default to a unit range; the depth pass overrides
|
|
4
4
|
// them with the camera's range when used as pass infrastructure.
|
|
5
5
|
export function createDepthMaterial(opts) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { allocateEntity, finishEntity } from '@flighthq/entity/contract';
|
|
2
2
|
import { WrappedDiffusePbrExtensionKind } from '@flighthq/types/contract';
|
|
3
|
-
import { isValidMaterialWeight } from
|
|
4
|
-
import { isValidPbrUvSet } from
|
|
3
|
+
import { isValidMaterialWeight } from './materialValidation.js';
|
|
4
|
+
import { isValidPbrUvSet } from './pbrExtension.js';
|
|
5
5
|
export function createWrappedDiffusePbrExtension(opts) {
|
|
6
6
|
const out = allocateEntity();
|
|
7
7
|
initializeWrappedDiffusePbrExtension(out, opts);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flighthq/materials",
|
|
3
|
-
"version": "0.5.1-next.
|
|
3
|
+
"version": "0.5.1-next.4329.8d695d9",
|
|
4
4
|
"author": "Joshua Granick and other contributors",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -38,13 +38,13 @@
|
|
|
38
38
|
"clean:dist": "tsx ../../scripts/clean-package-dist.ts"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@flighthq/color": "0.5.1-next.
|
|
42
|
-
"@flighthq/entity": "0.5.1-next.
|
|
43
|
-
"@flighthq/log": "0.5.1-next.
|
|
44
|
-
"@flighthq/types": "0.5.1-next.
|
|
41
|
+
"@flighthq/color": "0.5.1-next.4329.8d695d9",
|
|
42
|
+
"@flighthq/entity": "0.5.1-next.4329.8d695d9",
|
|
43
|
+
"@flighthq/log": "0.5.1-next.4329.8d695d9",
|
|
44
|
+
"@flighthq/types": "0.5.1-next.4329.8d695d9"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
|
-
"typescript": "^
|
|
47
|
+
"typescript": "^7.0.2"
|
|
48
48
|
},
|
|
49
49
|
"description": "Color transform and material utilities",
|
|
50
50
|
"sideEffects": false
|