@networkpro/web 1.10.1 → 1.12.2

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.
@@ -1,173 +0,0 @@
1
- <!-- =========================================================================
2
- CODE_OF_CONDUCT.md
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
- <a name="top"></a>
10
-
11
- <sup>[SPDX-License-Identifier](https://spdx.dev/learn/handling-license-info):
12
- `CC-BY-4.0 OR GPL-3.0-or-later`</sup>
13
-
14
- # Contributor Covenant Code of Conduct
15
-
16
- **Network Pro Strategies**
17
- **Effective Date:** 3/21/2025
18
-
19
- &nbsp;
20
-
21
- ## Contents
22
-
23
- - [Our Pledge](#pledge)
24
- - [Our Standards](#standards)
25
- - [Responsibilities](#response)
26
- - [Scope](#scope)
27
- - [Enforcement](#enforce)
28
- - [Attribution](#attribute)
29
-
30
- ---
31
-
32
- <section id="pledge">
33
-
34
- ## Our Pledge
35
-
36
- We as members, contributors, and leaders pledge to make participation in our
37
- community a harassment-free experience for everyone, regardless of age, body
38
- size, visible or invisible disability, ethnicity, sex characteristics, gender
39
- identity and expression, level of experience, education, socio-economic status,
40
- nationality, personal appearance, race, caste, color, religion, or sexual
41
- identity and orientation.
42
-
43
- We pledge to act and interact in ways that contribute to an open, welcoming,
44
- diverse, inclusive, and healthy community.
45
-
46
- </section>
47
-
48
- <section id="standards">
49
-
50
- ## Our Standards
51
-
52
- Examples of behavior that contributes to a positive environment for our
53
- community include:
54
-
55
- - Demonstrating empathy and kindness toward other people
56
- - Being respectful of differing opinions, viewpoints, and experiences
57
- - Giving and gracefully accepting constructive feedback
58
- - Accepting responsibility and apologizing to those affected by our mistakes,
59
- and learning from the experience
60
- - Focusing on what is best not just for us as individuals, but for the overall
61
- community
62
-
63
- Examples of unacceptable behavior include:
64
-
65
- - The use of sexualized language or imagery, and sexual attention or advances of
66
- any kind
67
- - Trolling, insulting or derogatory comments, and personal or political attacks
68
- - Public or private harassment
69
- - Publishing others' private information, such as a physical or email address,
70
- without their explicit permission
71
- - Other conduct which could reasonably be considered inappropriate in a
72
- professional setting
73
-
74
- <sub>[Back to top](#top)</sub>
75
-
76
- </section>
77
-
78
- <section id="response">
79
-
80
- ## Responsibilities
81
-
82
- Company and community leaders are responsible for clarifying and enforcing our standards of
83
- acceptable behavior and will take appropriate and fair corrective action in
84
- response to any behavior that they deem inappropriate, threatening, offensive,
85
- or harmful.
86
-
87
- Company and community leaders have the right and responsibility to remove, edit, or reject
88
- comments, commits, code, wiki edits, issues, and other contributions that are
89
- not aligned to this Code of Conduct, and will communicate reasons for moderation
90
- decisions when appropriate.
91
-
92
- Network Pro Strategies reserves the right, at its sole discretion, to remove, edit, or reject any contributions that are contrary to or detrimental to its business interests.
93
-
94
- <sub>[Back to top](#top)</sub>
95
-
96
- </section>
97
-
98
- <section id="scope">
99
-
100
- ## Scope
101
-
102
- This Code of Conduct applies within all community spaces, and also applies when
103
- an individual is officially representing the company or community in public spaces.
104
- Examples of representing our company or community include using an official email address,
105
- posting via an official social media account, or acting as an appointed
106
- representative at an online or offline event.
107
-
108
- <sub>[Back to top](#top)</sub>
109
-
110
- </section>
111
-
112
- <section id="enforce">
113
-
114
- ## Enforcement
115
-
116
- Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the abuse team at [abuse@neteng.pro](mailto:abuse@neteng.pro). All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances.
117
-
118
- The abuse team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
119
-
120
- Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project’s leadership.
121
-
122
- <sub>[Back to top](#top)</sub>
123
-
124
- </section>
125
-
126
- <section id="attribute">
127
-
128
- ## Attribution
129
-
130
- This Code of Conduct is adapted from the [Contributor Covenant][homepage],
131
- version 2.1, available at
132
- [https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
133
-
134
- The **Enforcement** section is adapted from the
135
- [Contributor Covenant][homepage],
136
- version 1.4, available at
137
- [https://www.contributor-covenant.org/version/1/4/code-of-conduct/][v1.4].
138
-
139
- For answers to common questions about this code of conduct, see the FAQ at
140
- [https://www.contributor-covenant.org/faq][FAQ]. Translations are available at
141
- [https://www.contributor-covenant.org/translations][translations].
142
-
143
- [homepage]: https://www.contributor-covenant.org
144
- [v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
145
- [v1.4]: https://www.contributor-covenant.org/version/1/4/code-of-conduct/
146
- [FAQ]: https://www.contributor-covenant.org/faq
147
- [translations]: https://www.contributor-covenant.org/translations
148
-
149
- <sub>[Back to top](#top)</sub>
150
-
151
- </section>
152
-
153
- ---
154
-
155
- <span style="font-size: 12px; font-weight: bold; text-align: center;">
156
-
157
- [Home](https://netwk.pro) &nbsp; | &nbsp; [Terms of Use](https://netwk.pro/terms-of-use)
158
- [Privacy Policy](https://netwk.pro/privacy) &nbsp; | &nbsp; [Legal](https://netwk.pro/license)
159
-
160
- </span>
161
-
162
- &nbsp;
163
-
164
- <span style="font-size: 12px; text-align: center;">
165
-
166
- Copyright &copy; 2025
167
- **[Network Pro Strategies](https://netwk.pro/)** (Network Pro&trade;)
168
-
169
- Network Pro&trade;, the shield logo, and the "Locking Down Networks&trade;" slogan are [trademarks](https://netwk.pro/license#trademark) of Network Pro Strategies.
170
-
171
- Licensed under **[CC BY 4.0](https://creativecommons.org/licenses/by/4.0/)** and the **[GNU GPL](https://spdx.org/licenses/GPL-3.0-or-later.html)**, as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
172
-
173
- </span>
@@ -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>
@@ -1,38 +0,0 @@
1
- /* ==========================================================================
2
- src/lib/utils/privacy.js
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
- /**
10
- * @file privacy.js
11
- * @description Determines whether the user allows tracking based on DNT, GPC, or manual opt-out.
12
- * @module src/lib/utils/
13
- * @author SunDevil311
14
- * @updated 2025-05-28
15
- */
16
-
17
- /**
18
- * @returns {boolean}
19
- */
20
- export function shouldTrackUser() {
21
- const windowDNT = /** @type {any} */ (window).doNotTrack;
22
- const navigatorGPC = /** @type {any} */ (navigator).globalPrivacyControl;
23
-
24
- const dnt = navigator.doNotTrack === "1" || windowDNT === "1";
25
- const gpc = navigatorGPC === true;
26
-
27
- const manualOptOut = document.cookie.includes("disable_tracking=true");
28
- const manualOptIn = document.cookie.includes("enable_tracking=true");
29
-
30
- console.log("[Privacy] Opt-in cookie present:", manualOptIn);
31
- console.log("[Privacy] Opt-out cookie present:", manualOptOut);
32
-
33
- // Opt-in overrides everything; opt-out disables regardless of DNT/GPC
34
- if (manualOptIn) return true;
35
- if (manualOptOut) return false;
36
-
37
- return !dnt && !gpc;
38
- }
@@ -1,40 +0,0 @@
1
- /* ==========================================================================
2
- src/lib/utils/trackingCookies.js
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
- /**
10
- * @file trackingCookies.js
11
- * @description Handles setting, clearing, and toggling tracking preference cookies.
12
- * @module src/lib/utils/
13
- * @author SunDevil311
14
- * @updated 2025-05-28
15
- */
16
-
17
- /**
18
- * Set a tracking preference cookie.
19
- * @param {"enable" | "disable"} type
20
- */
21
- export function setTrackingPreference(type) {
22
- const maxAge = 60 * 60 * 24 * 365 * 10; // 10 years
23
- const cookieSettings = `path=/; max-age=${maxAge}; SameSite=Lax`;
24
-
25
- if (type === "enable") {
26
- document.cookie = `enable_tracking=true; ${cookieSettings}`;
27
- document.cookie = `disable_tracking=; path=/; max-age=0; SameSite=Lax`;
28
- } else if (type === "disable") {
29
- document.cookie = `disable_tracking=true; ${cookieSettings}`;
30
- document.cookie = `enable_tracking=; path=/; max-age=0; SameSite=Lax`;
31
- }
32
- }
33
-
34
- /**
35
- * Clear both tracking cookies.
36
- */
37
- export function clearTrackingPreferences() {
38
- document.cookie = `enable_tracking=; path=/; max-age=0; SameSite=Lax`;
39
- document.cookie = `disable_tracking=; path=/; max-age=0; SameSite=Lax`;
40
- }
@@ -1,46 +0,0 @@
1
- /* ==========================================================================
2
- src/lib/utils/trackingStatus.js
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
- /**
10
- * @file trackingStatus.js
11
- * @description Get tracking preferences based on cookies and browser privacy signals.
12
- * @module src/lib/utils/
13
- * @author SunDevil311
14
- * @updated 2025-05-28
15
- */
16
-
17
- /**
18
- * @returns {{
19
- * optedOut: boolean,
20
- * optedIn: boolean,
21
- * dnt: boolean,
22
- * gpc: boolean,
23
- * status: string
24
- * }}
25
- */
26
- export function getTrackingPreferences() {
27
- const cookies = document.cookie;
28
- const optedOut = cookies.includes("disable_tracking=true");
29
- const optedIn = cookies.includes("enable_tracking=true");
30
- const dnt = navigator.doNotTrack === "1";
31
-
32
- // @ts-expect-error: 'globalPrivacyControl' is a non-standard property
33
- const gpc = navigator.globalPrivacyControl === true;
34
-
35
- let status = "⚙️ Using default settings (tracking enabled)";
36
-
37
- if (optedOut) {
38
- status = "🔒 Tracking disabled (manual opt-out)";
39
- } else if (optedIn) {
40
- status = "✅ Tracking enabled (manual opt-in)";
41
- } else if (dnt || gpc) {
42
- status = "🛑 Tracking disabled (via browser signal)";
43
- }
44
-
45
- return { optedOut, optedIn, dnt, gpc, status };
46
- }