@dnax/ui 0.0.29 → 0.0.30

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.
@@ -8,7 +8,11 @@
8
8
  // Events : @ready (media element), @play, @pause, @ended, @timeupdate, @loadedmetadata, @volumechange.
9
9
  // Méthodes exposées : play / pause / togglePlay / seek / getCurrentTime / getDuration / setVolume / setMuted / isPlaying.
10
10
  import { computed, onBeforeUnmount, onMounted, ref, watch } from "vue"
11
- import "@videojs/html/video/skin.css"
11
+ // Importé en texte brut + injecté côté client : passé dans le pipeline CSS normal, ce
12
+ // fichier tiers (build Tailwind de @videojs/html) contient du `@layer`/`@scope` natif qui
13
+ // casse le build des apps consommatrices en Tailwind v3 (PostCSS exige le `@tailwind`
14
+ // correspondant). L'injection runtime l'exclut de PostCSS sans perdre les styles globaux.
15
+ import skinCss from "@videojs/html/video/skin.css?raw"
12
16
 
13
17
  interface Props {
14
18
  /** URL de la vidéo (mp4, webm, ogg, HLS .m3u8, YouTube…) */
@@ -125,7 +129,19 @@ const onPlaceholderClick = () => {
125
129
  play()
126
130
  }
127
131
 
132
+ let skinInjected = false
133
+ const injectSkin = () => {
134
+ if (skinInjected || typeof document === "undefined") return
135
+ skinInjected = true
136
+ if (document.getElementById("q-video-skin")) return
137
+ const style = document.createElement("style")
138
+ style.id = "q-video-skin"
139
+ style.textContent = skinCss
140
+ document.head.appendChild(style)
141
+ }
142
+
128
143
  onMounted(async () => {
144
+ injectSkin()
129
145
  // Charge le framework HTML (custom elements) — uniquement côté client
130
146
  await Promise.all([
131
147
  import("@videojs/html/video/player" as string),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dnax/ui",
3
- "version": "0.0.29",
3
+ "version": "0.0.30",
4
4
  "module": "index.ts",
5
5
  "description": "UI design System",
6
6
  "type": "module",
package/shims.d.ts ADDED
@@ -0,0 +1,6 @@
1
+ // Imports de fichiers CSS en texte brut (Vite `?raw`) : utilisés pour injecter à
2
+ // l'exécution des feuilles tierces que l'on ne veut pas faire passer par PostCSS.
3
+ declare module "*.css?raw" {
4
+ const src: string
5
+ export default src
6
+ }