@networkpro/web 1.10.0 → 1.11.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.
package/svelte.config.js CHANGED
@@ -23,13 +23,15 @@ const config = {
23
23
  kit: {
24
24
  // Netlify adapter configuration
25
25
  adapter: adapter({
26
- edge: false, // Disable edge functions (optional, enable if needed)
27
- split: false, // Disable splitting function files (optional, enable if needed),
26
+ edge: false, // Disable edge functions for site
27
+ split: false, // Disable splitting function files (optional, enable if needed)
28
28
  }),
29
+
29
30
  // Paths configuration for deployment
30
31
  paths: {
31
32
  base: "", // Always deploy to the root of the domain
32
33
  },
34
+
33
35
  prerender: {
34
36
  // Handle HTTP errors during prerendering
35
37
  handleHttpError: ({ path, _referrer, message }) => {
@@ -46,6 +48,7 @@ const config = {
46
48
  },
47
49
  },
48
50
  },
51
+
49
52
  // File extensions for Svelte and mdsvex
50
53
  extensions: [".svelte", ".svx", ".md"], // Added .md for Markdown support
51
54
  };
package/vite.config.js CHANGED
@@ -9,19 +9,17 @@ This file is part of Network Pro.
9
9
  import { sveltekit } from "@sveltejs/kit/vite";
10
10
  import { defineConfig } from "vite";
11
11
  import lightningcssPlugin from "vite-plugin-lightningcss";
12
+ import tsconfigPaths from "vite-tsconfig-paths"; // NEW: tsconfig/jsconfig alias support
12
13
 
13
14
  export default defineConfig({
14
15
  plugins: [
16
+ tsconfigPaths(), // Insert before sveltekit()
15
17
  sveltekit(),
16
18
  lightningcssPlugin({
17
19
  minify: process.env.NODE_ENV === "production",
18
20
  pruneUnusedFontFaceRules: true,
19
21
  pruneUnusedKeyframes: true,
20
22
  removeUnusedFontFaces: true,
21
- // Enables nesting support in Lightning CSS
22
- //drafts: {
23
- // nesting: true
24
- //}
25
23
  }),
26
24
  ],
27
25
  });
@@ -1,36 +0,0 @@
1
- <!-- ==========================================================================
2
- src/lib/components/PostHog.svelte
3
-
4
- Copyright © 2025 Network Pro Strategies (Network Pro™)
5
- SPDX-License-Identifier: CC-BY-4.0 OR GPL-3.0-or-later
6
- This file is part of Network Pro.
7
- ========================================================================== -->
8
-
9
- <script>
10
- import posthog from "posthog-js";
11
- import { onMount } from "svelte";
12
- import { browser } from "$app/environment";
13
- import { shouldTrackUser } from "$lib/utils/privacy.js";
14
-
15
- onMount(() => {
16
- if (!browser) return;
17
-
18
- const allowTracking = shouldTrackUser();
19
-
20
- // cspell:disable-next-line
21
- posthog.init("phc_Qshfo6AXzh4pS7aPigfqyeo4qj1qlyh7gDuHDeVMSR0", {
22
- api_host: "https://us.i.posthog.com",
23
- loaded: (ph) => {
24
- if (!allowTracking) {
25
- console.log("[PostHog] ⛔ User opted out — disabling tracking");
26
- ph.opt_out_capturing(); // Fully disable any tracking
27
- } else {
28
- console.log("[PostHog] ✅ Tracking enabled");
29
- }
30
- },
31
- autocapture: allowTracking, // Optional: Disable autocapture
32
- capture_pageview: allowTracking, // Optional: Disable initial pageview
33
- person_profiles: "identified_only",
34
- });
35
- });
36
- </script>