@widlarzgroup/docusaurus-ui 0.1.0 → 0.1.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.
- package/lib/components/ProFeature/ProFeature.d.ts.map +1 -1
- package/lib/components/ProFeature/ProFeature.js +6 -1
- package/lib/components/ProFeature/ProFeature.js.map +1 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +5 -3
- package/lib/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/ProFeature/ProFeature.tsx +9 -8
- package/src/index.ts +5 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProFeature.d.ts","sourceRoot":"","sources":["../../../src/components/ProFeature/ProFeature.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ProFeature.d.ts","sourceRoot":"","sources":["../../../src/components/ProFeature/ProFeature.tsx"],"names":[],"mappings":"AAKA,UAAU,eAAe;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,QAAA,MAAM,UAAU,4BAGb,eAAe,4CA4BjB,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -5,10 +5,15 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
7
7
|
const Link_1 = __importDefault(require("@docusaurus/Link"));
|
|
8
|
+
const router_1 = require("@docusaurus/router");
|
|
8
9
|
const ProFeature_module_css_1 = __importDefault(require("./ProFeature.module.css"));
|
|
9
10
|
const ProBadge_1 = __importDefault(require("../../components/ProBadge/ProBadge"));
|
|
10
11
|
const ProFeature = ({ title = 'Pro Player Feature', description = 'This feature is available exclusively in Pro Player. To access this functionality, please contact us.', }) => {
|
|
11
|
-
|
|
12
|
+
const location = (0, router_1.useLocation)();
|
|
13
|
+
const utmContent = encodeURIComponent(location.pathname);
|
|
14
|
+
const contactUrl = `https://thewidlarzgroup.com/?utm_source=docs&utm_medium=pro-feature&utm_campaign=pro-player&utm_content=${utmContent}#Contact`;
|
|
15
|
+
const learnMoreUrl = `https://sdk.thewidlarzgroup.com/?utm_source=docs&utm_medium=pro-feature&utm_campaign=pro-player&utm_content=${utmContent}`;
|
|
16
|
+
return ((0, jsx_runtime_1.jsx)("div", { className: ProFeature_module_css_1.default.container, children: (0, jsx_runtime_1.jsxs)("div", { className: ProFeature_module_css_1.default.content, children: [(0, jsx_runtime_1.jsx)("div", { className: ProFeature_module_css_1.default.header, children: (0, jsx_runtime_1.jsxs)("div", { className: ProFeature_module_css_1.default.badge, children: [(0, jsx_runtime_1.jsx)(ProBadge_1.default, {}), (0, jsx_runtime_1.jsx)("span", { className: ProFeature_module_css_1.default.badgeText, children: title })] }) }), (0, jsx_runtime_1.jsx)("p", { className: ProFeature_module_css_1.default.description, children: description }), (0, jsx_runtime_1.jsxs)("div", { className: ProFeature_module_css_1.default.actions, children: [(0, jsx_runtime_1.jsx)(Link_1.default, { to: contactUrl, className: ProFeature_module_css_1.default.primaryButton, children: "Contact Us" }), (0, jsx_runtime_1.jsx)(Link_1.default, { to: learnMoreUrl, className: ProFeature_module_css_1.default.secondaryButton, children: "Learn More" })] })] }) }));
|
|
12
17
|
};
|
|
13
18
|
exports.default = ProFeature;
|
|
14
19
|
//# sourceMappingURL=ProFeature.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProFeature.js","sourceRoot":"","sources":["../../../src/components/ProFeature/ProFeature.tsx"],"names":[],"mappings":";;;;;;AAAA,4DAAoC;AACpC,oFAA6C;AAC7C,8EAAsD;AAOtD,MAAM,UAAU,GAAG,CAAC,EAClB,KAAK,GAAG,oBAAoB,EAC5B,WAAW,GAAG,uGAAuG,GACrG,EAAE,EAAE;IACpB,OAAO,CACL,gCAAK,SAAS,EAAE,+BAAM,CAAC,SAAS,YAC9B,iCAAK,SAAS,EAAE,+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O,aAC5B,uBAAC,cAAI,IAAC,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE,+BAAM,CAAC,aAAa,2BAE9C,EACP,uBAAC,cAAI,IAAC,EAAE,EAAE,YAAY,EAAE,SAAS,EAAE,+BAAM,CAAC,eAAe,2BAElD,IACH,IACF,GACF,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,UAAU,CAAC"}
|
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAE7D,MAAM,CAAC,OAAO,UAAU,iBAAiB,CAAC,OAAO,EAAE,WAAW,GAAG,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAE7D,MAAM,CAAC,OAAO,UAAU,iBAAiB,CAAC,OAAO,EAAE,WAAW,GAAG,MAAM,CAmCtE;AAED,cAAc,iBAAiB,CAAC;AAChC,OAAO,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAC"}
|
package/lib/index.js
CHANGED
|
@@ -22,11 +22,13 @@ exports.default = themeDocusaurusUI;
|
|
|
22
22
|
const path_1 = __importDefault(require("path"));
|
|
23
23
|
function themeDocusaurusUI(context) {
|
|
24
24
|
const isDev = process.env.NODE_ENV === 'development';
|
|
25
|
+
// Only use source files in local monorepo development
|
|
26
|
+
// When installed from npm, always use compiled lib
|
|
27
|
+
const isLocalDev = isDev && !__dirname.split(path_1.default.sep).includes('node_modules');
|
|
25
28
|
return {
|
|
26
29
|
name: '@widlarzgroup/docusaurus-ui',
|
|
27
30
|
getThemePath() {
|
|
28
|
-
|
|
29
|
-
return isDev ? '../src/theme' : '../lib/theme';
|
|
31
|
+
return isLocalDev ? '../src/theme' : '../lib/theme';
|
|
30
32
|
},
|
|
31
33
|
getTypeScriptThemePath() {
|
|
32
34
|
return '../src/theme';
|
|
@@ -36,7 +38,7 @@ function themeDocusaurusUI(context) {
|
|
|
36
38
|
},
|
|
37
39
|
// Configure webpack to handle TypeScript and path aliases from source
|
|
38
40
|
configureWebpack(config, isServer, utils) {
|
|
39
|
-
if (!
|
|
41
|
+
if (!isLocalDev)
|
|
40
42
|
return {};
|
|
41
43
|
return {
|
|
42
44
|
resolve: {
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAGA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAGA,oCAmCC;AAtCD,gDAAwB;AAGxB,SAAwB,iBAAiB,CAAC,OAAoB;IAC5D,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,aAAa,CAAC;IACrD,sDAAsD;IACtD,mDAAmD;IACnD,MAAM,UAAU,GAAG,KAAK,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,cAAI,CAAC,GAAG,CAAC,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAC;IAEhF,OAAO;QACL,IAAI,EAAE,6BAA6B;QAEnC,YAAY;YACV,OAAO,UAAU,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,cAAc,CAAC;QACtD,CAAC;QAED,sBAAsB;YACpB,OAAO,cAAc,CAAC;QACxB,CAAC;QAED,gBAAgB;YACd,OAAO,CAAC,cAAI,CAAC,OAAO,CAAC,SAAS,EAAE,kBAAkB,CAAC,CAAC,CAAC;QACvD,CAAC;QAED,sEAAsE;QACtE,gBAAgB,CAAC,MAAM,EAAE,QAAQ,EAAE,KAAK;YACtC,IAAI,CAAC,UAAU;gBAAE,OAAO,EAAE,CAAC;YAE3B,OAAO;gBACL,OAAO,EAAE;oBACP,KAAK,EAAE;wBACL,yCAAyC;wBACzC,GAAG,EAAE,cAAI,CAAC,OAAO,CAAC,SAAS,EAAE,QAAQ,CAAC;qBACvC;iBACF;aACF,CAAC;QACJ,CAAC;KACF,CAAC;AACJ,CAAC;AAED,kDAAgC;AAChC,+EAA8E;AAArE,4IAAA,4BAA4B,OAAA"}
|
package/package.json
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import Link from '@docusaurus/Link';
|
|
2
|
+
import {useLocation} from '@docusaurus/router';
|
|
2
3
|
import styles from './ProFeature.module.css';
|
|
3
4
|
import ProBadge from '@/components/ProBadge/ProBadge';
|
|
4
5
|
|
|
@@ -11,6 +12,12 @@ const ProFeature = ({
|
|
|
11
12
|
title = 'Pro Player Feature',
|
|
12
13
|
description = 'This feature is available exclusively in Pro Player. To access this functionality, please contact us.',
|
|
13
14
|
}: ProFeatureProps) => {
|
|
15
|
+
const location = useLocation();
|
|
16
|
+
const utmContent = encodeURIComponent(location.pathname);
|
|
17
|
+
|
|
18
|
+
const contactUrl = `https://thewidlarzgroup.com/?utm_source=docs&utm_medium=pro-feature&utm_campaign=pro-player&utm_content=${utmContent}#Contact`;
|
|
19
|
+
const learnMoreUrl = `https://sdk.thewidlarzgroup.com/?utm_source=docs&utm_medium=pro-feature&utm_campaign=pro-player&utm_content=${utmContent}`;
|
|
20
|
+
|
|
14
21
|
return (
|
|
15
22
|
<div className={styles.container}>
|
|
16
23
|
<div className={styles.content}>
|
|
@@ -22,16 +29,10 @@ const ProFeature = ({
|
|
|
22
29
|
</div>
|
|
23
30
|
<p className={styles.description}>{description}</p>
|
|
24
31
|
<div className={styles.actions}>
|
|
25
|
-
<Link
|
|
26
|
-
to="https://thewidlarzgroup.com/?utm_source=docs&utm_medium=pro-feature&utm_campaign=pro-player#Contact"
|
|
27
|
-
className={styles.primaryButton}
|
|
28
|
-
>
|
|
32
|
+
<Link to={contactUrl} className={styles.primaryButton}>
|
|
29
33
|
Contact Us
|
|
30
34
|
</Link>
|
|
31
|
-
<Link
|
|
32
|
-
to="https://sdk.thewidlarzgroup.com/?utm_source=docs&utm_medium=pro-feature&utm_campaign=pro-player"
|
|
33
|
-
className={styles.secondaryButton}
|
|
34
|
-
>
|
|
35
|
+
<Link to={learnMoreUrl} className={styles.secondaryButton}>
|
|
35
36
|
Learn More
|
|
36
37
|
</Link>
|
|
37
38
|
</div>
|
package/src/index.ts
CHANGED
|
@@ -3,13 +3,15 @@ import type { LoadContext, Plugin } from '@docusaurus/types';
|
|
|
3
3
|
|
|
4
4
|
export default function themeDocusaurusUI(context: LoadContext): Plugin {
|
|
5
5
|
const isDev = process.env.NODE_ENV === 'development';
|
|
6
|
+
// Only use source files in local monorepo development
|
|
7
|
+
// When installed from npm, always use compiled lib
|
|
8
|
+
const isLocalDev = isDev && !__dirname.split(path.sep).includes('node_modules');
|
|
6
9
|
|
|
7
10
|
return {
|
|
8
11
|
name: '@widlarzgroup/docusaurus-ui',
|
|
9
12
|
|
|
10
13
|
getThemePath() {
|
|
11
|
-
|
|
12
|
-
return isDev ? '../src/theme' : '../lib/theme';
|
|
14
|
+
return isLocalDev ? '../src/theme' : '../lib/theme';
|
|
13
15
|
},
|
|
14
16
|
|
|
15
17
|
getTypeScriptThemePath() {
|
|
@@ -22,7 +24,7 @@ export default function themeDocusaurusUI(context: LoadContext): Plugin {
|
|
|
22
24
|
|
|
23
25
|
// Configure webpack to handle TypeScript and path aliases from source
|
|
24
26
|
configureWebpack(config, isServer, utils) {
|
|
25
|
-
if (!
|
|
27
|
+
if (!isLocalDev) return {};
|
|
26
28
|
|
|
27
29
|
return {
|
|
28
30
|
resolve: {
|