lightnet 4.0.3 → 4.0.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/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # lightnet
2
2
 
3
+ ## 4.0.5
4
+
5
+ ### Patch Changes
6
+
7
+ - [#376](https://github.com/LightNetDev/LightNet/pull/376) [`f652369`](https://github.com/LightNetDev/LightNet/commit/f652369745ab9886f71dc1daefd8020b700eadca) Thanks [@smn-cds](https://github.com/smn-cds)! - Fix exported Language type.
8
+
9
+ ## 4.0.4
10
+
11
+ ### Patch Changes
12
+
13
+ - [#374](https://github.com/LightNetDev/LightNet/pull/374) [`efcedcf`](https://github.com/LightNetDev/LightNet/commit/efcedcf6ef06e16e2b9151e14de8dd8337ff76da) Thanks [@smn-cds](https://github.com/smn-cds)! - Update dependencies
14
+
15
+ - [#374](https://github.com/LightNetDev/LightNet/pull/374) [`efcedcf`](https://github.com/LightNetDev/LightNet/commit/efcedcf6ef06e16e2b9151e14de8dd8337ff76da) Thanks [@smn-cds](https://github.com/smn-cds)! - Fix "Powered by LightNet" button is not clickable on details page.
16
+
3
17
  ## 4.0.3
4
18
 
5
19
  ### Patch Changes
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "LightNet makes it easy to run your own digital media library.",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
- "version": "4.0.3",
6
+ "version": "4.0.5",
7
7
  "repository": {
8
8
  "type": "git",
9
9
  "url": "https://github.com/LightNetDev/lightnet",
@@ -51,8 +51,8 @@
51
51
  "tailwindcss": ">=3.4.0 <4.0.0"
52
52
  },
53
53
  "dependencies": {
54
- "@astrojs/react": "^5.0.2",
55
- "@iconify-json/lucide": "^1.2.100",
54
+ "@astrojs/react": "^5.0.3",
55
+ "@iconify-json/lucide": "^1.2.101",
56
56
  "@iconify-json/mdi": "^1.2.3",
57
57
  "@iconify/tailwind": "^1.2.0",
58
58
  "@tailwindcss/typography": "^0.5.19",
@@ -60,21 +60,21 @@
60
60
  "autoprefixer": "^10.4.27",
61
61
  "embla-carousel": "^8.6.0",
62
62
  "embla-carousel-wheel-gestures": "^8.1.0",
63
- "fuse.js": "^7.1.0",
63
+ "fuse.js": "^7.3.0",
64
64
  "i18next": "^25.10.10",
65
65
  "lucide-react": "^1.7.0",
66
- "marked": "^17.0.5",
67
- "postcss": "^8.5.8",
66
+ "marked": "^17.0.6",
67
+ "postcss": "^8.5.9",
68
68
  "postcss-load-config": "^6.0.1",
69
69
  "yaml": "^2.8.3"
70
70
  },
71
71
  "devDependencies": {
72
72
  "@internal/e2e-test-utils": "^0.0.1",
73
- "@playwright/test": "^1.58.2",
73
+ "@playwright/test": "^1.59.1",
74
74
  "@types/react": "^19.2.14",
75
- "astro": "^6.1.1",
75
+ "astro": "^6.1.4",
76
76
  "typescript": "^5.9.3",
77
- "vitest": "^4.1.2"
77
+ "vitest": "^4.1.3"
78
78
  },
79
79
  "engines": {
80
80
  "node": ">=22"
@@ -235,7 +235,7 @@ export const extendedConfigSchema = configSchema.transform((config, ctx) => {
235
235
  })
236
236
 
237
237
  export type Link = z.input<typeof linkSchema>
238
- export type Language = z.output<typeof languageSchema>
238
+ export type Language = z.input<typeof languageSchema>
239
239
 
240
240
  export type LightnetConfig = z.input<typeof configSchema>
241
241
  export type ExtendedLightnetConfig = z.output<typeof extendedConfigSchema>
@@ -31,7 +31,7 @@ export default function Toast({
31
31
  return (
32
32
  <div
33
33
  id={id}
34
- className={`pointer-events-none fixed bottom-4 end-0 flex justify-end px-4 opacity-0 transition duration-300 will-change-transform ${className}`}
34
+ className={`pointer-events-none fixed bottom-4 end-0 hidden justify-end px-4 opacity-0 transition duration-300 will-change-transform ${className}`}
35
35
  data-toast="true"
36
36
  data-variant={variant}
37
37
  data-toast-hidden-transform={hiddenTransform}
@@ -46,7 +46,7 @@ export default function Toast({
46
46
  }}
47
47
  >
48
48
  <div
49
- className={`pointer-events-auto flex max-w-sm flex-col items-start gap-1 rounded-md border p-4 text-base shadow-md backdrop-blur-sm ${alertClasses}`}
49
+ className={`flex max-w-sm flex-col items-start gap-1 rounded-md border p-4 text-base shadow-md backdrop-blur-sm ${alertClasses}`}
50
50
  >
51
51
  {children}
52
52
  </div>
@@ -29,6 +29,7 @@ export function showToast(
29
29
  window.clearTimeout(Number(existingTimeoutId))
30
30
  }
31
31
 
32
+ element.style.display = "flex"
32
33
  element.style.opacity = "100%"
33
34
  element.style.transform = overshootTransform
34
35
  element.dataset.toastVisible = "true"
@@ -45,6 +46,7 @@ export function showToast(
45
46
  element.style.opacity = "0%"
46
47
  element.style.transform = hiddenTransform
47
48
  element.dataset.toastVisible = "false"
49
+ element.style.display = "hidden"
48
50
  delete element.dataset[TIMEOUT_DATA_KEY]
49
51
  }, duration)
50
52
 
@@ -6,6 +6,8 @@ import Toast from "../../../../components/Toast"
6
6
  interface Props {
7
7
  className?: string
8
8
  }
9
+
10
+ const { t } = Astro.locals.i18n
9
11
  ---
10
12
 
11
13
  <button
@@ -13,10 +15,10 @@ interface Props {
13
15
  class:list={[Astro.props.className]}
14
16
  id="share-btn"
15
17
  ><ForwardIcon />
16
- {Astro.locals.i18n.t("ln.details.share")}</button
18
+ {t("ln.details.share")}</button
17
19
  >
18
20
  <Toast id="share-success" variant="success">
19
- {Astro.locals.i18n.t("ln.share.url-copied-to-clipboard")}
21
+ {t("ln.share.url-copied-to-clipboard")}
20
22
  </Toast>
21
23
  <script>
22
24
  import { showToastById } from "../../../../components/showToast"
@@ -11,10 +11,16 @@ interface Context {
11
11
  languages: Record<string, { labelText: string }>
12
12
  }
13
13
 
14
+ type EnrichedSearchItem = SearchItem & {
15
+ translatedCategories: string[] | null | undefined
16
+ translatedType: string
17
+ translatedLanguage: string
18
+ }
19
+
14
20
  const SEARCH_API_PATH = pathWithBase("/api/internal/search.json")
15
21
 
16
22
  export function useSearch({ categories, mediaTypes, languages }: Context) {
17
- const fuse = useRef<Fuse<SearchItem>>(undefined)
23
+ const fuse = useRef<Fuse<EnrichedSearchItem>>(undefined)
18
24
  const [allItems, setAllItems] = useState<SearchItem[]>([])
19
25
  const [isLoading, setIsLoading] = useState(true)
20
26
  const [query, setQuery] = useState<Partial<SearchQuery>>({})