@axium/client 0.36.4 → 0.36.5

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/lib/Video.svelte CHANGED
@@ -6,11 +6,10 @@
6
6
 
7
7
  interface Props extends MediaProps {
8
8
  extraControls?: Snippet;
9
+ media?: MediaState;
9
10
  }
10
11
 
11
- const { extraControls, ...rest }: Props = $props();
12
-
13
- const media = new MediaState();
12
+ const { extraControls, media = new MediaState(), ...rest }: Props = $props();
14
13
  </script>
15
14
 
16
15
  <div class="Video" onkeydown={media.keydown}>
@@ -106,9 +106,9 @@
106
106
 
107
107
  const oninput = onchange;
108
108
 
109
- /** Localize text for a given field in the current schema */
110
- function subText(name: string, replacements?: ReplacementOptions & Record<string, any>) {
111
- if (!localeInfo?.prefix) return;
109
+ /** Localize text for a given field in the current schema. */
110
+ function subText(name: string, replacements?: ReplacementOptions & Record<string, any>): string | undefined {
111
+ if (!localeInfo?.prefix) return replacements?.$default;
112
112
  return text(`${localeInfo.prefix}.${name}`, replacements);
113
113
  }
114
114
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@axium/client",
3
- "version": "0.36.4",
3
+ "version": "0.36.5",
4
4
  "author": "James Prevett <jp@jamespre.dev>",
5
5
  "funding": {
6
6
  "type": "individual",