@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/cspell.json +5 -0
- package/jsconfig.json +1 -15
- package/jsconfig.template.jsonc +32 -0
- package/netlify.toml +0 -1
- package/package.json +9 -9
- package/src/app.html +1 -1
- package/src/hooks.server.js +13 -0
- package/src/lib/components/Badges.svelte +6 -2
- package/src/lib/components/LegalNav.svelte +6 -1
- package/src/lib/components/MetaTags.svelte +8 -2
- package/src/lib/components/foss/FossItemContent.svelte +8 -6
- package/src/lib/components/layout/Footer.svelte +26 -46
- package/src/lib/index.js +27 -19
- package/src/lib/pages/AboutContent.svelte +17 -29
- package/src/lib/pages/FossContent.svelte +8 -13
- package/src/lib/pages/HomeContent.svelte +13 -25
- package/src/lib/pages/LicenseContent.svelte +69 -90
- package/src/lib/pages/PrivacyContent.svelte +102 -85
- package/src/lib/pages/PrivacyDashboard.svelte +79 -75
- package/src/lib/pages/TermsConditionsContent.svelte +13 -18
- package/src/lib/pages/TermsUseContent.svelte +17 -23
- package/src/lib/stores/posthog.js +115 -0
- package/src/lib/stores/trackingStatus.js +30 -0
- package/src/lib/types/appConstants.js +60 -0
- package/src/lib/types/fossTypes.js +17 -0
- package/src/lib/utils/privacy.js +47 -4
- package/src/lib/utils/trackingCookies.js +40 -10
- package/src/lib/utils/trackingStatus.js +18 -3
- package/src/routes/+layout.js +0 -2
- package/src/routes/+layout.svelte +36 -40
- package/static/offline.min.css +2 -3
- package/svelte.config.js +5 -2
- package/vite.config.js +2 -4
- package/src/lib/components/PostHog.svelte +0 -36
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
|
|
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>
|