@marvalt/digivalt-core 0.2.3 → 0.2.8
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 +38 -0
- package/README.md +13 -1
- package/bin/env-example-fragments.cjs +101 -0
- package/bin/init.cjs +66 -4
- package/dist/config/integrations.d.ts +2 -0
- package/dist/config.cjs +40 -12
- package/dist/config.cjs.map +1 -1
- package/dist/config.d.ts +2 -0
- package/dist/config.esm.js +40 -12
- package/dist/config.esm.js.map +1 -1
- package/dist/hooks/useGravityForms.d.ts +6 -12
- package/dist/hooks/useGravityFormsNew.d.ts +6 -9
- package/dist/hooks/useSuiteCRM.d.ts +15 -22
- package/dist/index.cjs +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/lib/structured-data.d.ts +1 -0
- package/dist/seo/DigiValtSeoHead.d.ts +21 -0
- package/dist/seo/JsonLd.d.ts +11 -0
- package/dist/seo/defaults.d.ts +16 -0
- package/dist/seo/eventJsonLd.d.ts +16 -0
- package/dist/seo/index.d.ts +13 -0
- package/dist/seo/preconnect.d.ts +10 -0
- package/dist/seo/types.d.ts +7 -0
- package/dist/seo.cjs +562 -0
- package/dist/seo.cjs.map +1 -0
- package/dist/seo.d.ts +166 -0
- package/dist/seo.esm.js +544 -0
- package/dist/seo.esm.js.map +1 -0
- package/dist/services.cjs +40 -12
- package/dist/services.cjs.map +1 -1
- package/dist/services.esm.js +40 -12
- package/dist/services.esm.js.map +1 -1
- package/dist/static.cjs +1 -0
- package/dist/static.cjs.map +1 -1
- package/dist/static.esm.js +1 -0
- package/dist/static.esm.js.map +1 -1
- package/dist/utils/cfImages.d.ts +7 -0
- package/docs/SEO-PERFORMANCE.md +143 -0
- package/package.json +12 -2
- package/template/DIGIVALT_SETUP.md +19 -3
- package/template/scripts/deploy-secrets.js +4 -0
|
@@ -1,27 +1,24 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Custom hook for fetching all Gravity Forms using static data
|
|
3
3
|
*/
|
|
4
|
-
export declare const useGravityForms: () =>
|
|
4
|
+
export declare const useGravityForms: () => any;
|
|
5
5
|
/**
|
|
6
6
|
* Custom hook for fetching a specific Gravity Form using static data
|
|
7
7
|
*/
|
|
8
|
-
export declare const useGravityForm: (formId: string) =>
|
|
8
|
+
export declare const useGravityForm: (formId: string) => any;
|
|
9
9
|
/**
|
|
10
10
|
* Custom hook for fetching a Gravity Form schema for rendering using static data
|
|
11
11
|
*/
|
|
12
|
-
export declare const useGravityFormSchema: (formId: string) =>
|
|
12
|
+
export declare const useGravityFormSchema: (formId: string) => any;
|
|
13
13
|
/**
|
|
14
14
|
* Custom hook for submitting Gravity Forms using the npm package
|
|
15
15
|
*/
|
|
16
|
-
export declare const useGravityFormSubmission: () =>
|
|
17
|
-
formId: string;
|
|
18
|
-
values: Record<string, any>;
|
|
19
|
-
}, unknown>;
|
|
16
|
+
export declare const useGravityFormSubmission: () => any;
|
|
20
17
|
/**
|
|
21
18
|
* Custom hook for Gravity Form submissions using the npm package
|
|
22
19
|
*/
|
|
23
|
-
export declare const useGravityFormSubmissions: (formId: string) =>
|
|
20
|
+
export declare const useGravityFormSubmissions: (formId: string) => any;
|
|
24
21
|
/**
|
|
25
22
|
* Custom hook for Gravity Form entries using the npm package
|
|
26
23
|
*/
|
|
27
|
-
export declare const useGravityFormEntries: (formId: string, page?: number, perPage?: number) =>
|
|
24
|
+
export declare const useGravityFormEntries: (formId: string, page?: number, perPage?: number) => any;
|
|
@@ -1,15 +1,11 @@
|
|
|
1
|
-
import { SuiteCRMLead, SuiteCRMContact, SuiteCRMAccount, SuiteCRMOpportunity } from '../services/suitecrm';
|
|
2
1
|
/**
|
|
3
2
|
* Custom hook for creating SuiteCRM leads
|
|
4
3
|
*/
|
|
5
|
-
export declare const useSuiteCRMCreateLead: () =>
|
|
4
|
+
export declare const useSuiteCRMCreateLead: () => any;
|
|
6
5
|
/**
|
|
7
6
|
* Custom hook for updating SuiteCRM leads
|
|
8
7
|
*/
|
|
9
|
-
export declare const useSuiteCRMUpdateLead: () =>
|
|
10
|
-
leadId: string;
|
|
11
|
-
lead: Partial<SuiteCRMLead>;
|
|
12
|
-
}, unknown>;
|
|
8
|
+
export declare const useSuiteCRMUpdateLead: () => any;
|
|
13
9
|
/**
|
|
14
10
|
* Custom hook for fetching SuiteCRM leads
|
|
15
11
|
*/
|
|
@@ -18,55 +14,52 @@ export declare const useSuiteCRMLeads: (params?: {
|
|
|
18
14
|
per_page?: number;
|
|
19
15
|
filter?: string;
|
|
20
16
|
sort?: string;
|
|
21
|
-
}) =>
|
|
17
|
+
}) => any;
|
|
22
18
|
/**
|
|
23
19
|
* Custom hook for fetching a specific SuiteCRM lead
|
|
24
20
|
*/
|
|
25
|
-
export declare const useSuiteCRMLead: (leadId: string) =>
|
|
21
|
+
export declare const useSuiteCRMLead: (leadId: string) => any;
|
|
26
22
|
/**
|
|
27
23
|
* Custom hook for searching SuiteCRM leads
|
|
28
24
|
*/
|
|
29
|
-
export declare const useSuiteCRMSearchLeads: (query: string) =>
|
|
25
|
+
export declare const useSuiteCRMSearchLeads: (query: string) => any;
|
|
30
26
|
/**
|
|
31
27
|
* Custom hook for creating SuiteCRM contacts
|
|
32
28
|
*/
|
|
33
|
-
export declare const useSuiteCRMCreateContact: () =>
|
|
29
|
+
export declare const useSuiteCRMCreateContact: () => any;
|
|
34
30
|
/**
|
|
35
31
|
* Custom hook for updating SuiteCRM contacts
|
|
36
32
|
*/
|
|
37
|
-
export declare const useSuiteCRMUpdateContact: () =>
|
|
38
|
-
contactId: string;
|
|
39
|
-
contact: Partial<SuiteCRMContact>;
|
|
40
|
-
}, unknown>;
|
|
33
|
+
export declare const useSuiteCRMUpdateContact: () => any;
|
|
41
34
|
/**
|
|
42
35
|
* Custom hook for fetching a specific SuiteCRM contact
|
|
43
36
|
*/
|
|
44
|
-
export declare const useSuiteCRMContact: (contactId: string) =>
|
|
37
|
+
export declare const useSuiteCRMContact: (contactId: string) => any;
|
|
45
38
|
/**
|
|
46
39
|
* Custom hook for creating SuiteCRM accounts
|
|
47
40
|
*/
|
|
48
|
-
export declare const useSuiteCRMCreateAccount: () =>
|
|
41
|
+
export declare const useSuiteCRMCreateAccount: () => any;
|
|
49
42
|
/**
|
|
50
43
|
* Custom hook for fetching a specific SuiteCRM account
|
|
51
44
|
*/
|
|
52
|
-
export declare const useSuiteCRMAccount: (accountId: string) =>
|
|
45
|
+
export declare const useSuiteCRMAccount: (accountId: string) => any;
|
|
53
46
|
/**
|
|
54
47
|
* Custom hook for creating SuiteCRM opportunities
|
|
55
48
|
*/
|
|
56
|
-
export declare const useSuiteCRMCreateOpportunity: () =>
|
|
49
|
+
export declare const useSuiteCRMCreateOpportunity: () => any;
|
|
57
50
|
/**
|
|
58
51
|
* Custom hook for fetching a specific SuiteCRM opportunity
|
|
59
52
|
*/
|
|
60
|
-
export declare const useSuiteCRMOpportunity: (opportunityId: string) =>
|
|
53
|
+
export declare const useSuiteCRMOpportunity: (opportunityId: string) => any;
|
|
61
54
|
/**
|
|
62
55
|
* Custom hook for fetching SuiteCRM lead sources
|
|
63
56
|
*/
|
|
64
|
-
export declare const useSuiteCRMLeadSources: () =>
|
|
57
|
+
export declare const useSuiteCRMLeadSources: () => any;
|
|
65
58
|
/**
|
|
66
59
|
* Custom hook for fetching SuiteCRM lead statuses
|
|
67
60
|
*/
|
|
68
|
-
export declare const useSuiteCRMLeadStatuses: () =>
|
|
61
|
+
export declare const useSuiteCRMLeadStatuses: () => any;
|
|
69
62
|
/**
|
|
70
63
|
* Custom hook for testing SuiteCRM connection
|
|
71
64
|
*/
|
|
72
|
-
export declare const useSuiteCRMConnectionTest: () =>
|
|
65
|
+
export declare const useSuiteCRMConnectionTest: () => any;
|
package/dist/index.cjs
CHANGED
|
@@ -2487,7 +2487,7 @@ var index = /*#__PURE__*/Object.freeze({
|
|
|
2487
2487
|
* Core integration library for DigiVAlt React apps
|
|
2488
2488
|
*/
|
|
2489
2489
|
const getDigiValtVersion = () => {
|
|
2490
|
-
return "0.2.
|
|
2490
|
+
return "0.2.6";
|
|
2491
2491
|
};
|
|
2492
2492
|
|
|
2493
2493
|
exports.generateAllData = generateAllData;
|
package/dist/index.esm.js
CHANGED
|
@@ -2485,7 +2485,7 @@ var index = /*#__PURE__*/Object.freeze({
|
|
|
2485
2485
|
* Core integration library for DigiVAlt React apps
|
|
2486
2486
|
*/
|
|
2487
2487
|
const getDigiValtVersion = () => {
|
|
2488
|
-
return "0.2.
|
|
2488
|
+
return "0.2.6";
|
|
2489
2489
|
};
|
|
2490
2490
|
|
|
2491
2491
|
export { generateAllData, generateGravityFormsData, generateMauticData, generateSuiteCRMData, generateWordPressData, index as generators, getDigiValtVersion };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface DigiValtSeoHeadProps {
|
|
3
|
+
title?: string;
|
|
4
|
+
description?: string;
|
|
5
|
+
keywords?: string;
|
|
6
|
+
/** Path only, e.g. `/about` — combined with `VITE_SEO_SITE_URL` for canonical and og:url */
|
|
7
|
+
pathname?: string;
|
|
8
|
+
/** Full canonical URL override */
|
|
9
|
+
canonicalUrl?: string;
|
|
10
|
+
/** Page URL for og:url when not derivable from siteUrl + pathname */
|
|
11
|
+
ogUrl?: string;
|
|
12
|
+
imageUrl?: string;
|
|
13
|
+
ogType?: 'website' | 'article';
|
|
14
|
+
noindex?: boolean;
|
|
15
|
+
children?: React.ReactNode;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Document head: title, description, canonical, Open Graph, Twitter cards, optional verification meta.
|
|
19
|
+
* Requires `HelmetProvider` from `react-helmet-async` above this component in the tree.
|
|
20
|
+
*/
|
|
21
|
+
export declare const DigiValtSeoHead: React.FC<DigiValtSeoHeadProps>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { StructuredData } from './types';
|
|
3
|
+
export interface JsonLdProps {
|
|
4
|
+
data: StructuredData | StructuredData[];
|
|
5
|
+
/** Optional id for multiple blocks on one page */
|
|
6
|
+
id?: string;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Renders one or more `<script type="application/ld+json">` tags.
|
|
10
|
+
*/
|
|
11
|
+
export declare const JsonLd: React.FC<JsonLdProps>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export interface SeoDefaults {
|
|
2
|
+
siteUrl: string;
|
|
3
|
+
siteName: string;
|
|
4
|
+
defaultTitle: string;
|
|
5
|
+
defaultDescription: string;
|
|
6
|
+
defaultKeywords?: string;
|
|
7
|
+
defaultImage: string;
|
|
8
|
+
twitterHandle?: string;
|
|
9
|
+
facebookAppId?: string;
|
|
10
|
+
googleSiteVerification?: string;
|
|
11
|
+
bingSiteVerification?: string;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* SEO defaults from env-backed integration config (see `VITE_SEO_*` in docs).
|
|
15
|
+
*/
|
|
16
|
+
export declare function getSeoDefaultsFromEnv(): SeoDefaults;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { StructuredData } from './types';
|
|
2
|
+
export interface BuildEventJsonLdOptions {
|
|
3
|
+
siteUrl: string;
|
|
4
|
+
/** URL path including leading slash, e.g. `/events/slug` */
|
|
5
|
+
path: string;
|
|
6
|
+
fallbackImageUrl?: string;
|
|
7
|
+
/** Ticket or registration page when not in event meta */
|
|
8
|
+
defaultOffersUrl?: string;
|
|
9
|
+
organizerName?: string;
|
|
10
|
+
organizerUrl?: string;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Build schema.org Event JSON-LD from a WordPress `eventbrite_event`-style REST object
|
|
14
|
+
* (title, slug, featured_media_cloudflare_url, event_meta, link, etc.).
|
|
15
|
+
*/
|
|
16
|
+
export declare function buildEventJsonLd(event: Record<string, unknown>, options: BuildEventJsonLdOptions): StructuredData;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export type { StructuredData } from './types';
|
|
2
|
+
export { getSeoDefaultsFromEnv } from './defaults';
|
|
3
|
+
export type { SeoDefaults } from './defaults';
|
|
4
|
+
export { recommendedPreconnectHosts } from './preconnect';
|
|
5
|
+
export type { PreconnectLink } from './preconnect';
|
|
6
|
+
export { JsonLd } from './JsonLd';
|
|
7
|
+
export type { JsonLdProps } from './JsonLd';
|
|
8
|
+
export { DigiValtSeoHead } from './DigiValtSeoHead';
|
|
9
|
+
export type { DigiValtSeoHeadProps } from './DigiValtSeoHead';
|
|
10
|
+
export { buildEventJsonLd } from './eventJsonLd';
|
|
11
|
+
export type { BuildEventJsonLdOptions } from './eventJsonLd';
|
|
12
|
+
export { createOrganizationSchema, createWebSiteSchema, createArticleSchema, createServiceSchema, createBreadcrumbSchema, createFAQSchema, } from '../lib/structured-data';
|
|
13
|
+
export { boundedShareImageUrl, DEFAULT_OG_IMAGE_MAX_WIDTH, buildCloudflareSrcSet, getCloudflareVariantUrl, isCloudflareImageUrl, } from '../utils/cfImages';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export interface PreconnectLink {
|
|
2
|
+
rel: 'preconnect';
|
|
3
|
+
href: string;
|
|
4
|
+
crossOrigin?: '' | 'anonymous' | 'use-credentials';
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Suggest `<link rel="preconnect">` targets from an image URL (e.g. Cloudflare Images on imagedelivery.net).
|
|
8
|
+
* Apps may add more hosts (fonts, API) in `index.html` or via Helmet.
|
|
9
|
+
*/
|
|
10
|
+
export declare function recommendedPreconnectHosts(imageUrl?: string | null): PreconnectLink[];
|