@codingfactory/mediables-vue 2.19.2 → 2.20.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.
Files changed (33) hide show
  1. package/dist/{PixiFrameExporter-CRe8z6ua.js → PixiFrameExporter-CGQJH9OE.js} +2 -2
  2. package/dist/{PixiFrameExporter-CRe8z6ua.js.map → PixiFrameExporter-CGQJH9OE.js.map} +1 -1
  3. package/dist/{PixiFrameExporter-R6iQjzVw.cjs → PixiFrameExporter-CfUbYDmD.cjs} +2 -2
  4. package/dist/{PixiFrameExporter-R6iQjzVw.cjs.map → PixiFrameExporter-CfUbYDmD.cjs.map} +1 -1
  5. package/dist/editor-v2-CFLWp7RZ.cjs +2 -0
  6. package/dist/editor-v2-CFLWp7RZ.cjs.map +1 -0
  7. package/dist/editor-v2-DjhJBaCS.js +7187 -0
  8. package/dist/editor-v2-DjhJBaCS.js.map +1 -0
  9. package/dist/filters/index.d.ts +1 -0
  10. package/dist/filters/recipeToCssFilter.d.ts +71 -0
  11. package/dist/index-Dae8SHT7.js.map +1 -1
  12. package/dist/index-QOKC8XA_.cjs.map +1 -1
  13. package/dist/index-ST4ukv22.cjs +357 -0
  14. package/dist/index-ST4ukv22.cjs.map +1 -0
  15. package/dist/index-rw6mdaKW.js +38906 -0
  16. package/dist/index-rw6mdaKW.js.map +1 -0
  17. package/dist/index.d.ts +3 -2
  18. package/dist/mediables-vanilla.cjs +1 -1
  19. package/dist/mediables-vanilla.mjs +10 -9
  20. package/dist/mediables-vue.cjs +1 -1
  21. package/dist/mediables-vue.mjs +97 -87
  22. package/dist/style.css +1 -1
  23. package/dist/utils/videoRecipeCapabilities.d.ts +15 -0
  24. package/dist/vanilla-exports.d.ts +2 -1
  25. package/package.json +1 -1
  26. package/dist/editor-BQ_nY4P6.js +0 -4302
  27. package/dist/editor-BQ_nY4P6.js.map +0 -1
  28. package/dist/editor-CUV1pIsV.cjs +0 -2
  29. package/dist/editor-CUV1pIsV.cjs.map +0 -1
  30. package/dist/index-B8LxZ37n.js +0 -41633
  31. package/dist/index-B8LxZ37n.js.map +0 -1
  32. package/dist/index-DutUeSES.cjs +0 -357
  33. package/dist/index-DutUeSES.cjs.map +0 -1
@@ -8,6 +8,7 @@ export type { FilterDefinition, ControlDefinition, FilterMediaTarget } from './r
8
8
  export { createFilterInstance, createFilterInstances, updateFilterParams, } from './factory';
9
9
  export type { FilterInstanceConfig } from './factory';
10
10
  export { mapControlTypeToComponent, validateControlValue, generateDefaultParams, convertControlValue, } from './controlMapping';
11
+ export { videoRecipeToCssFilter, filterToCssFunction, hasUsableFilterPayload, recipeHasFilters, recipeNoiseAmount, resolveFilterType, resolveFilterValue, resolvedRecipeFilters, } from './recipeToCssFilter';
11
12
  import './definitions/adjustment';
12
13
  import './definitions/adjustmentAdvanced';
13
14
  import './definitions/alpha';
@@ -0,0 +1,71 @@
1
+ /**
2
+ * Recipe → CSS filter translation
3
+ *
4
+ * Canonical helper for converting a `VideoRecipe`'s clip-level filters
5
+ * (and root-level fallback filters) into a CSS `filter:` string suitable
6
+ * for native HTML5 video / image preview rendering.
7
+ *
8
+ * This module is the single source of truth for the recipe → CSS-filter
9
+ * shape so app-side thumbnail previews (e.g. blowglass `VideoThumbnail.vue`)
10
+ * cannot drift from the canonical filter definitions in
11
+ * `video-engine/filters/CSSFilterSystem.ts` + `filters/video-css-filters.ts`.
12
+ *
13
+ * The translation intentionally mirrors the conventions consumers have been
14
+ * using in practice — including the heuristic param-range normalizers
15
+ * (e.g. accepting brightness as `[-1..1]`, `[0..1]`, or `[0..N]` percent) —
16
+ * so swapping to this helper is a no-op compared to the previous in-app
17
+ * translation layer.
18
+ */
19
+ import type { VideoRecipe } from '../types/video';
20
+ type UnknownRecord = Record<string, unknown>;
21
+ /**
22
+ * Resolve the canonical `type` identifier of a filter entry.
23
+ *
24
+ * Recipes have used both `type` and `filterId` historically; this falls
25
+ * back through both before returning `null`.
26
+ */
27
+ export declare const resolveFilterType: (filter: UnknownRecord) => string | null;
28
+ /**
29
+ * Identify whether a candidate filter object carries enough payload to be
30
+ * worth attempting translation. Used by `hasFilters`-style guards.
31
+ */
32
+ export declare const hasUsableFilterPayload: (candidate: unknown) => boolean;
33
+ /**
34
+ * Read a finite numeric value from a filter under any of the candidate keys,
35
+ * checking both the top-level filter object and its nested `params` object.
36
+ */
37
+ export declare const resolveFilterValue: (filter: UnknownRecord, keys: string[]) => number | null;
38
+ /**
39
+ * Collapse a recipe's clip-level + root-level filter lists into a deduped
40
+ * sequence keyed by filter type. Clip-level filters take precedence (they
41
+ * are what the editor saves); root-level filters only fill in any
42
+ * remaining gaps.
43
+ */
44
+ export declare const resolvedRecipeFilters: (recipe: VideoRecipe | undefined | null) => UnknownRecord[];
45
+ /**
46
+ * Whether the recipe has any clip-level or root-level filter payload worth
47
+ * rendering. Useful for `has-filters` indicator state.
48
+ */
49
+ export declare const recipeHasFilters: (recipe: VideoRecipe | undefined | null) => boolean;
50
+ /**
51
+ * Resolve the noise-overlay intensity (0..1) from any `noise`-typed filter
52
+ * on the recipe. Returns 0 when no noise filter is present.
53
+ */
54
+ export declare const recipeNoiseAmount: (recipe: VideoRecipe | undefined | null) => number;
55
+ /**
56
+ * Convert a single resolved filter record to its CSS function string, or
57
+ * `null` if the filter is unrecognized / a no-op.
58
+ *
59
+ * Exported for tests + advanced consumers. Most callers should use
60
+ * `videoRecipeToCssFilter(recipe)` instead.
61
+ */
62
+ export declare const filterToCssFunction: (filter: UnknownRecord) => string | null;
63
+ /**
64
+ * Convert a `VideoRecipe` (or compatible recipe shape) into a CSS `filter:`
65
+ * value string. Returns `''` when the recipe has no translatable filters.
66
+ *
67
+ * Behaviour is byte-identical to the in-app translation layer this helper
68
+ * replaces; callers can safely substitute it.
69
+ */
70
+ export declare const videoRecipeToCssFilter: (recipe: VideoRecipe | undefined | null) => string;
71
+ export {};