@sessile/core 0.3.1 → 0.4.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.
@@ -0,0 +1,14 @@
1
+ /**
2
+ * `@sessile/core/internal`: building blocks shared with the sibling `@sessile/*` packages
3
+ * (displacement-map encoding, refraction LUTs, tile cache, raw shader sources).
4
+ *
5
+ * Not part of the public contract: these may change in any release. Siblings depend on an
6
+ * exact core version, so they can rely on it; applications should not.
7
+ *
8
+ * SPDX-License-Identifier: MPL-2.0
9
+ */
10
+ export { buildRefractMapDataUrl, createRefractMapBuilder, type RefractMapBuilder, type RefractMapParams, type RefractMapResult, } from '../refractMap.ts';
11
+ export { MAX_REFRACT_TILE_PX, clearRefractTilesCache, resolveRefractTiles, type RefractTileParams, type RefractTilesResult, } from '../refractTiles.ts';
12
+ export { BEZEL_HEIGHT_PROFILES, CAUSTIC_FOLD_LIMIT, DEFAULT_REFRACTION_IOR, DEFAULT_REFRACTION_SAMPLES, NORMAL_FLOOR, computeRefractionProfileLut, getRefractionProfileKey, resolveRefractionProfileLut, sampleRefractionLut, traceBezelRay, type BezelHeightFn, type BezelRayTrace, type BezelRayTraceInput, type RefractionProfileLut, type RefractionProfileOptions, type RefractionProfileSpec, } from '../refractProfile.ts';
13
+ export { OVERLAY_FRAGMENT_SHADER, OVERLAY_VERTEX_SHADER } from '../overlayRenderer.ts';
14
+ export { buildCircularBevelTable, buildColorOpticsMatrix, buildContourAlphaDataUrl, type CircularBevelTable } from '../optics.ts';
@@ -0,0 +1,14 @@
1
+ /**
2
+ * `@sessile/core/internal`: building blocks shared with the sibling `@sessile/*` packages
3
+ * (displacement-map encoding, refraction LUTs, tile cache, raw shader sources).
4
+ *
5
+ * Not part of the public contract: these may change in any release. Siblings depend on an
6
+ * exact core version, so they can rely on it; applications should not.
7
+ *
8
+ * SPDX-License-Identifier: MPL-2.0
9
+ */
10
+ export { buildRefractMapDataUrl, createRefractMapBuilder, } from "../refractMap.js";
11
+ export { MAX_REFRACT_TILE_PX, clearRefractTilesCache, resolveRefractTiles, } from "../refractTiles.js";
12
+ export { BEZEL_HEIGHT_PROFILES, CAUSTIC_FOLD_LIMIT, DEFAULT_REFRACTION_IOR, DEFAULT_REFRACTION_SAMPLES, NORMAL_FLOOR, computeRefractionProfileLut, getRefractionProfileKey, resolveRefractionProfileLut, sampleRefractionLut, traceBezelRay, } from "../refractProfile.js";
13
+ export { OVERLAY_FRAGMENT_SHADER, OVERLAY_VERTEX_SHADER } from "../overlayRenderer.js";
14
+ export { buildCircularBevelTable, buildColorOpticsMatrix, buildContourAlphaDataUrl } from "../optics.js";
@@ -0,0 +1,8 @@
1
+ /**
2
+ * `@sessile/core/legibility`: adaptive legibility solver, backdrop telemetry and the sRGB
3
+ * luminance helpers it is built on. Optional: surfaces that never enable legibility do not
4
+ * need this module.
5
+ *
6
+ * SPDX-License-Identifier: MPL-2.0
7
+ */
8
+ export { LEGIBILITY_CALM_KNEE, LEGIBILITY_LIMIT_MARGIN, LEGIBILITY_POLICIES, LEGIBILITY_SMOOTHING, LEGIBILITY_STAGES, LEGIBILITY_TABLE_SIZE, TELEMETRY_STRIDE, compensateLegibilityEdges, computeBackdropRisk, contrastRatio, createAsymmetricSmoother, createLegibilityParams, createTelemetryAccumulator, linearToSrgb, measureTelemetryGrid, relativeLuminance, srgbLuma, resolveLegibilityGoal, resolveLegibilityParams, srgbToLinear, type AsymmetricSmoother, type AsymmetricSmootherOptions, type BackdropTelemetry, type BackdropTelemetryAccumulator, type BackdropTelemetryGrid, type ForegroundPolarity, type LegibilityGoal, type LegibilityParams, type LegibilityPolicy, type LegibilityRisk, type LegibilityTarget, type LegibilityTier, } from '../legibility.ts';
@@ -0,0 +1,8 @@
1
+ /**
2
+ * `@sessile/core/legibility`: adaptive legibility solver, backdrop telemetry and the sRGB
3
+ * luminance helpers it is built on. Optional: surfaces that never enable legibility do not
4
+ * need this module.
5
+ *
6
+ * SPDX-License-Identifier: MPL-2.0
7
+ */
8
+ export { LEGIBILITY_CALM_KNEE, LEGIBILITY_LIMIT_MARGIN, LEGIBILITY_POLICIES, LEGIBILITY_SMOOTHING, LEGIBILITY_STAGES, LEGIBILITY_TABLE_SIZE, TELEMETRY_STRIDE, compensateLegibilityEdges, computeBackdropRisk, contrastRatio, createAsymmetricSmoother, createLegibilityParams, createTelemetryAccumulator, linearToSrgb, measureTelemetryGrid, relativeLuminance, srgbLuma, resolveLegibilityGoal, resolveLegibilityParams, srgbToLinear, } from "../legibility.js";
@@ -0,0 +1,9 @@
1
+ /**
2
+ * `@sessile/core/overlay`: WebGL2 / 2D Canvas perimeter highlight and shadow renderer.
3
+ * Kept off the main entry so hosts that never draw an edge overlay skip ~1.2k lines of
4
+ * renderer and shader source.
5
+ *
6
+ * SPDX-License-Identifier: MPL-2.0
7
+ */
8
+ export type { IGlassOverlayRenderer, OverlayRenderFrame, RendererCapabilities } from '../contracts.ts';
9
+ export { createGlassOverlayRenderer, type GlassOverlayRendererOptions } from '../overlayRenderer.ts';
@@ -0,0 +1,8 @@
1
+ /**
2
+ * `@sessile/core/overlay`: WebGL2 / 2D Canvas perimeter highlight and shadow renderer.
3
+ * Kept off the main entry so hosts that never draw an edge overlay skip ~1.2k lines of
4
+ * renderer and shader source.
5
+ *
6
+ * SPDX-License-Identifier: MPL-2.0
7
+ */
8
+ export { createGlassOverlayRenderer } from "../overlayRenderer.js";
package/dist/index.d.ts CHANGED
@@ -2,15 +2,17 @@
2
2
  * Public entry point for `@sessile/core`.
3
3
  * Zero-dependency Live-DOM continuous glass morphing kernel.
4
4
  *
5
+ * Only the stable surface lives here. Optional modules ship as subpaths so bundles that never
6
+ * import them pay nothing: `@sessile/core/overlay` (WebGL2/2D edge renderer) and
7
+ * `@sessile/core/legibility` (adaptive legibility solver and backdrop telemetry).
8
+ * `@sessile/core/internal` serves the sibling `@sessile/*` packages and carries no semver
9
+ * guarantee.
10
+ *
5
11
  * SPDX-License-Identifier: MPL-2.0
6
12
  */
7
13
  export { DEFAULT_OPTICAL_MATERIALS, DEFAULT_SPRINGS, MAX_GPU_PRIMITIVES, type EdgeInsets, type GlassFieldState, type GlassPrimitive, type IGlassOverlayRenderer, type OpticalMaterial, type OpticalPresetVariant, type OverlayRenderFrame, type Point, type Rect, type RendererCapabilities, type RimMode, type SdfSample, type Size, type SminSample, type SpringParams, type ThemeMode, } from './contracts.ts';
8
14
  export { computeFieldBounds, computePairMergeStatus, computeRoundedBoxDistance, computeRoundedBoxSdf, computeSmin, computeSminDistance, createPreparedField, evaluateFieldDistance, evaluateFieldSdf, prepareField, type PairMergeStatus, type PreparedField, } from './sdf.ts';
9
15
  export { extractFieldContourPath, formatRoundedRectPath, } from './contour.ts';
10
- export { buildRefractMapDataUrl, createRefractMapBuilder, type RefractMapBuilder, type RefractMapParams, type RefractMapResult, } from './refractMap.ts';
11
- export { MAX_REFRACT_TILE_PX, clearRefractTilesCache, resolveRefractTiles, type RefractTileParams, type RefractTilesResult, } from './refractTiles.ts';
12
- export { BEZEL_HEIGHT_PROFILES, CAUSTIC_FOLD_LIMIT, DEFAULT_REFRACTION_IOR, DEFAULT_REFRACTION_SAMPLES, NORMAL_FLOOR, computeRefractionProfileLut, getRefractionProfileKey, resolveRefractionProfileLut, sampleRefractionLut, traceBezelRay, type BezelHeightFn, type BezelHeightProfileName, type BezelRayTrace, type BezelRayTraceInput, type RefractionProfileLut, type RefractionProfileName, type RefractionProfileOptions, type RefractionProfileSpec, } from './refractProfile.ts';
13
- export { OVERLAY_FRAGMENT_SHADER, OVERLAY_VERTEX_SHADER, createGlassOverlayRenderer, type GlassOverlayRendererOptions, } from './overlayRenderer.ts';
16
+ export type { BezelHeightProfileName, RefractionProfileName } from './refractProfile.ts';
14
17
  export { clamp, computeAreaPreservingScale, createElasticPressController, createMorphTimeline, createSpringChannel, cubicBezier, deformSizePreservingArea, easeInOutCubic, easeInQuad, easeOutCubic, evaluateSpring, evaluateSpringState, lerp, riseAndFall, smoothstep, type AreaPreservingScale, type ElasticPressController, type ElasticPressOptions, type ElasticPressState, type MorphTimeline, type MorphTimelineOptions, type MorphTimelinePhase, type MorphTimelineState, type SpringChannel, type SpringChannelOptions, type SpringChannelState, type SpringSample, } from './physics.ts';
15
- export { buildCircularBevelTable, buildColorOpticsMatrix, buildContourAlphaDataUrl, interpolateCssGlassSurfaceToMaterial, interpolateOpticalMaterial, interpolateVeilOptics, parseCssBoxShadow, parseCssFilterOptics, parseCssGlassSurface, parseCssRgba, tryParseCssRgba, resolveOpticalMaterial, type BackdropVeilOptics, type CircularBevelTable, type ExtractedCssGlassSurface, type ParseCssGlassSurfaceInput, type ParsedBoxShadowLayer, } from './optics.ts';
16
- export { LEGIBILITY_CALM_KNEE, LEGIBILITY_LIMIT_MARGIN, LEGIBILITY_POLICIES, LEGIBILITY_SMOOTHING, LEGIBILITY_STAGES, LEGIBILITY_TABLE_SIZE, TELEMETRY_STRIDE, compensateLegibilityEdges, computeBackdropRisk, contrastRatio, createAsymmetricSmoother, createLegibilityParams, createTelemetryAccumulator, linearToSrgb, measureTelemetryGrid, relativeLuminance, srgbLuma, resolveLegibilityGoal, resolveLegibilityParams, srgbToLinear, type AsymmetricSmoother, type AsymmetricSmootherOptions, type BackdropTelemetry, type BackdropTelemetryAccumulator, type BackdropTelemetryGrid, type ForegroundPolarity, type LegibilityGoal, type LegibilityParams, type LegibilityPolicy, type LegibilityRisk, type LegibilityTarget, type LegibilityTier, } from './legibility.ts';
18
+ export { interpolateCssGlassSurfaceToMaterial, interpolateOpticalMaterial, interpolateVeilOptics, parseCssBoxShadow, parseCssFilterOptics, parseCssGlassSurface, parseCssRgba, tryParseCssRgba, resolveOpticalMaterial, type BackdropVeilOptics, type ExtractedCssGlassSurface, type ParseCssGlassSurfaceInput, type ParsedBoxShadowLayer, } from './optics.ts';
package/dist/index.js CHANGED
@@ -2,15 +2,16 @@
2
2
  * Public entry point for `@sessile/core`.
3
3
  * Zero-dependency Live-DOM continuous glass morphing kernel.
4
4
  *
5
+ * Only the stable surface lives here. Optional modules ship as subpaths so bundles that never
6
+ * import them pay nothing: `@sessile/core/overlay` (WebGL2/2D edge renderer) and
7
+ * `@sessile/core/legibility` (adaptive legibility solver and backdrop telemetry).
8
+ * `@sessile/core/internal` serves the sibling `@sessile/*` packages and carries no semver
9
+ * guarantee.
10
+ *
5
11
  * SPDX-License-Identifier: MPL-2.0
6
12
  */
7
13
  export { DEFAULT_OPTICAL_MATERIALS, DEFAULT_SPRINGS, MAX_GPU_PRIMITIVES, } from "./contracts.js";
8
14
  export { computeFieldBounds, computePairMergeStatus, computeRoundedBoxDistance, computeRoundedBoxSdf, computeSmin, computeSminDistance, createPreparedField, evaluateFieldDistance, evaluateFieldSdf, prepareField, } from "./sdf.js";
9
15
  export { extractFieldContourPath, formatRoundedRectPath, } from "./contour.js";
10
- export { buildRefractMapDataUrl, createRefractMapBuilder, } from "./refractMap.js";
11
- export { MAX_REFRACT_TILE_PX, clearRefractTilesCache, resolveRefractTiles, } from "./refractTiles.js";
12
- export { BEZEL_HEIGHT_PROFILES, CAUSTIC_FOLD_LIMIT, DEFAULT_REFRACTION_IOR, DEFAULT_REFRACTION_SAMPLES, NORMAL_FLOOR, computeRefractionProfileLut, getRefractionProfileKey, resolveRefractionProfileLut, sampleRefractionLut, traceBezelRay, } from "./refractProfile.js";
13
- export { OVERLAY_FRAGMENT_SHADER, OVERLAY_VERTEX_SHADER, createGlassOverlayRenderer, } from "./overlayRenderer.js";
14
16
  export { clamp, computeAreaPreservingScale, createElasticPressController, createMorphTimeline, createSpringChannel, cubicBezier, deformSizePreservingArea, easeInOutCubic, easeInQuad, easeOutCubic, evaluateSpring, evaluateSpringState, lerp, riseAndFall, smoothstep, } from "./physics.js";
15
- export { buildCircularBevelTable, buildColorOpticsMatrix, buildContourAlphaDataUrl, interpolateCssGlassSurfaceToMaterial, interpolateOpticalMaterial, interpolateVeilOptics, parseCssBoxShadow, parseCssFilterOptics, parseCssGlassSurface, parseCssRgba, tryParseCssRgba, resolveOpticalMaterial, } from "./optics.js";
16
- export { LEGIBILITY_CALM_KNEE, LEGIBILITY_LIMIT_MARGIN, LEGIBILITY_POLICIES, LEGIBILITY_SMOOTHING, LEGIBILITY_STAGES, LEGIBILITY_TABLE_SIZE, TELEMETRY_STRIDE, compensateLegibilityEdges, computeBackdropRisk, contrastRatio, createAsymmetricSmoother, createLegibilityParams, createTelemetryAccumulator, linearToSrgb, measureTelemetryGrid, relativeLuminance, srgbLuma, resolveLegibilityGoal, resolveLegibilityParams, srgbToLinear, } from "./legibility.js";
17
+ export { interpolateCssGlassSurfaceToMaterial, interpolateOpticalMaterial, interpolateVeilOptics, parseCssBoxShadow, parseCssFilterOptics, parseCssGlassSurface, parseCssRgba, tryParseCssRgba, resolveOpticalMaterial, } from "./optics.js";