arky-sdk 0.3.8 → 0.3.9
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/dist/index.cjs +232 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +18 -2
- package/dist/index.d.ts +18 -2
- package/dist/index.js +232 -2
- package/dist/index.js.map +1 -1
- package/dist/{timezone-Cnh6zsAn.d.ts → svg-BhIM4HZW.d.ts} +43 -1
- package/dist/{timezone-Ctc3v4hK.d.cts → svg-CFjyTGXu.d.cts} +43 -1
- package/dist/utils.d.cts +2 -44
- package/dist/utils.d.ts +2 -44
- package/package.json +1 -1
|
@@ -84,4 +84,46 @@ declare const tzGroups: {
|
|
|
84
84
|
}[];
|
|
85
85
|
declare function findTimeZone(groups: typeof tzGroups): string;
|
|
86
86
|
|
|
87
|
-
|
|
87
|
+
declare const locales: readonly ["en", "sr-latn"];
|
|
88
|
+
/**
|
|
89
|
+
* * returns "slugified" text.
|
|
90
|
+
* @param text: string - text to slugify
|
|
91
|
+
*/
|
|
92
|
+
declare function slugify(text: string): string;
|
|
93
|
+
/**
|
|
94
|
+
* * returns "humanized" text. runs slugify() and then replaces - with space and upper case first letter of every word, and lower case the rest
|
|
95
|
+
* @param text: string - text to humanize
|
|
96
|
+
*/
|
|
97
|
+
declare function humanize(text: string): string;
|
|
98
|
+
/**
|
|
99
|
+
* * returns "categorified" text. runs slugify() and then replaces - with space and upper cases everything
|
|
100
|
+
* @param text: string - text to categorify
|
|
101
|
+
* @returns string - categorified text
|
|
102
|
+
*/
|
|
103
|
+
declare function categorify(text: string): string;
|
|
104
|
+
/**
|
|
105
|
+
* * returns a nicely formatted string of the date passed
|
|
106
|
+
* @param date: string | number | Date - date to format
|
|
107
|
+
* @param locale: string - locale to format the date in
|
|
108
|
+
* @returns string - formatted date
|
|
109
|
+
*/
|
|
110
|
+
declare function formatDate(date: string | number | Date, locale: (typeof locales)[number]): string;
|
|
111
|
+
|
|
112
|
+
declare function fetchSvgContent(mediaObject: any): Promise<string | null>;
|
|
113
|
+
/**
|
|
114
|
+
* Server-side helper for Astro components to fetch SVG content during SSR
|
|
115
|
+
*
|
|
116
|
+
* @param mediaObject The media object from the CMS
|
|
117
|
+
* @returns The SVG content as a string, or empty string on failure
|
|
118
|
+
*/
|
|
119
|
+
declare function getSvgContentForAstro(mediaObject: any): Promise<string>;
|
|
120
|
+
/**
|
|
121
|
+
* Client-side helper to fetch and inject SVG content into DOM elements
|
|
122
|
+
*
|
|
123
|
+
* @param mediaObject The media object from the CMS
|
|
124
|
+
* @param targetElement The DOM element to inject the SVG into
|
|
125
|
+
* @param className Optional CSS class to add to the SVG
|
|
126
|
+
*/
|
|
127
|
+
declare function injectSvgIntoElement(mediaObject: any, targetElement: HTMLElement, className?: string): Promise<void>;
|
|
128
|
+
|
|
129
|
+
export { getImageUrl as A, type Block as B, type Collection as C, thumbnailUrl as D, translateMap as E, convertToMajor as F, convertToMinor as G, getCurrencyFromMarket as H, formatCurrencyAmount as I, tzGroups as J, validateEmail as K, validateVerificationCode as L, validateRequired as M, type ValidationResult as V, getBlockLabel as a, getBlockTextValue as b, getMarketPrice as c, getPriceAmount as d, extractBlockValues as e, formatBlockValue as f, getGalleryThumbnail as g, formatPayment as h, formatMinor as i, createPaymentForCheckout as j, getCurrencySymbol as k, findTimeZone as l, humanize as m, categorify as n, formatDate as o, prepareBlocksForSubmission as p, getSvgContentForAstro as q, fetchSvgContent as r, slugify as s, injectSvgIntoElement as t, type CollectionEntry as u, validatePhoneNumber as v, getBlockValue as w, getBlockValues as x, getBlockObjectValues as y, getBlockFromArray as z };
|
|
@@ -84,4 +84,46 @@ declare const tzGroups: {
|
|
|
84
84
|
}[];
|
|
85
85
|
declare function findTimeZone(groups: typeof tzGroups): string;
|
|
86
86
|
|
|
87
|
-
|
|
87
|
+
declare const locales: readonly ["en", "sr-latn"];
|
|
88
|
+
/**
|
|
89
|
+
* * returns "slugified" text.
|
|
90
|
+
* @param text: string - text to slugify
|
|
91
|
+
*/
|
|
92
|
+
declare function slugify(text: string): string;
|
|
93
|
+
/**
|
|
94
|
+
* * returns "humanized" text. runs slugify() and then replaces - with space and upper case first letter of every word, and lower case the rest
|
|
95
|
+
* @param text: string - text to humanize
|
|
96
|
+
*/
|
|
97
|
+
declare function humanize(text: string): string;
|
|
98
|
+
/**
|
|
99
|
+
* * returns "categorified" text. runs slugify() and then replaces - with space and upper cases everything
|
|
100
|
+
* @param text: string - text to categorify
|
|
101
|
+
* @returns string - categorified text
|
|
102
|
+
*/
|
|
103
|
+
declare function categorify(text: string): string;
|
|
104
|
+
/**
|
|
105
|
+
* * returns a nicely formatted string of the date passed
|
|
106
|
+
* @param date: string | number | Date - date to format
|
|
107
|
+
* @param locale: string - locale to format the date in
|
|
108
|
+
* @returns string - formatted date
|
|
109
|
+
*/
|
|
110
|
+
declare function formatDate(date: string | number | Date, locale: (typeof locales)[number]): string;
|
|
111
|
+
|
|
112
|
+
declare function fetchSvgContent(mediaObject: any): Promise<string | null>;
|
|
113
|
+
/**
|
|
114
|
+
* Server-side helper for Astro components to fetch SVG content during SSR
|
|
115
|
+
*
|
|
116
|
+
* @param mediaObject The media object from the CMS
|
|
117
|
+
* @returns The SVG content as a string, or empty string on failure
|
|
118
|
+
*/
|
|
119
|
+
declare function getSvgContentForAstro(mediaObject: any): Promise<string>;
|
|
120
|
+
/**
|
|
121
|
+
* Client-side helper to fetch and inject SVG content into DOM elements
|
|
122
|
+
*
|
|
123
|
+
* @param mediaObject The media object from the CMS
|
|
124
|
+
* @param targetElement The DOM element to inject the SVG into
|
|
125
|
+
* @param className Optional CSS class to add to the SVG
|
|
126
|
+
*/
|
|
127
|
+
declare function injectSvgIntoElement(mediaObject: any, targetElement: HTMLElement, className?: string): Promise<void>;
|
|
128
|
+
|
|
129
|
+
export { getImageUrl as A, type Block as B, type Collection as C, thumbnailUrl as D, translateMap as E, convertToMajor as F, convertToMinor as G, getCurrencyFromMarket as H, formatCurrencyAmount as I, tzGroups as J, validateEmail as K, validateVerificationCode as L, validateRequired as M, type ValidationResult as V, getBlockLabel as a, getBlockTextValue as b, getMarketPrice as c, getPriceAmount as d, extractBlockValues as e, formatBlockValue as f, getGalleryThumbnail as g, formatPayment as h, formatMinor as i, createPaymentForCheckout as j, getCurrencySymbol as k, findTimeZone as l, humanize as m, categorify as n, formatDate as o, prepareBlocksForSubmission as p, getSvgContentForAstro as q, fetchSvgContent as r, slugify as s, injectSvgIntoElement as t, type CollectionEntry as u, validatePhoneNumber as v, getBlockValue as w, getBlockValues as x, getBlockObjectValues as y, getBlockFromArray as z };
|
package/dist/utils.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { B as Block, C as Collection,
|
|
1
|
+
export { B as Block, C as Collection, u as CollectionEntry, V as ValidationResult, n as categorify, F as convertToMajor, G as convertToMinor, j as createPaymentForCheckout, e as extractBlockValues, r as fetchSvgContent, l as findTimeZone, f as formatBlockValue, I as formatCurrencyAmount, o as formatDate, i as formatMinor, h as formatPayment, z as getBlockFromArray, a as getBlockLabel, y as getBlockObjectValues, b as getBlockTextValue, w as getBlockValue, x as getBlockValues, H as getCurrencyFromMarket, k as getCurrencySymbol, g as getGalleryThumbnail, A as getImageUrl, c as getMarketPrice, d as getPriceAmount, q as getSvgContentForAstro, m as humanize, t as injectSvgIntoElement, p as prepareBlocksForSubmission, s as slugify, D as thumbnailUrl, E as translateMap, J as tzGroups, K as validateEmail, v as validatePhoneNumber, M as validateRequired, L as validateVerificationCode } from './svg-CFjyTGXu.cjs';
|
|
2
2
|
import './types.cjs';
|
|
3
3
|
|
|
4
4
|
declare const ERROR_CODES: {
|
|
@@ -120,46 +120,4 @@ declare const errors: {
|
|
|
120
120
|
};
|
|
121
121
|
};
|
|
122
122
|
|
|
123
|
-
|
|
124
|
-
/**
|
|
125
|
-
* Server-side helper for Astro components to fetch SVG content during SSR
|
|
126
|
-
*
|
|
127
|
-
* @param mediaObject The media object from the CMS
|
|
128
|
-
* @returns The SVG content as a string, or empty string on failure
|
|
129
|
-
*/
|
|
130
|
-
declare function getSvgContentForAstro(mediaObject: any): Promise<string>;
|
|
131
|
-
/**
|
|
132
|
-
* Client-side helper to fetch and inject SVG content into DOM elements
|
|
133
|
-
*
|
|
134
|
-
* @param mediaObject The media object from the CMS
|
|
135
|
-
* @param targetElement The DOM element to inject the SVG into
|
|
136
|
-
* @param className Optional CSS class to add to the SVG
|
|
137
|
-
*/
|
|
138
|
-
declare function injectSvgIntoElement(mediaObject: any, targetElement: HTMLElement, className?: string): Promise<void>;
|
|
139
|
-
|
|
140
|
-
declare const locales: readonly ["en", "sr-latn"];
|
|
141
|
-
/**
|
|
142
|
-
* * returns "slugified" text.
|
|
143
|
-
* @param text: string - text to slugify
|
|
144
|
-
*/
|
|
145
|
-
declare function slugify(text: string): string;
|
|
146
|
-
/**
|
|
147
|
-
* * returns "humanized" text. runs slugify() and then replaces - with space and upper case first letter of every word, and lower case the rest
|
|
148
|
-
* @param text: string - text to humanize
|
|
149
|
-
*/
|
|
150
|
-
declare function humanize(text: string): string;
|
|
151
|
-
/**
|
|
152
|
-
* * returns "categorified" text. runs slugify() and then replaces - with space and upper cases everything
|
|
153
|
-
* @param text: string - text to categorify
|
|
154
|
-
* @returns string - categorified text
|
|
155
|
-
*/
|
|
156
|
-
declare function categorify(text: string): string;
|
|
157
|
-
/**
|
|
158
|
-
* * returns a nicely formatted string of the date passed
|
|
159
|
-
* @param date: string | number | Date - date to format
|
|
160
|
-
* @param locale: string - locale to format the date in
|
|
161
|
-
* @returns string - formatted date
|
|
162
|
-
*/
|
|
163
|
-
declare function formatDate(date: string | number | Date, locale: (typeof locales)[number]): string;
|
|
164
|
-
|
|
165
|
-
export { ERROR_CODES, ERROR_CONSTANTS, type RequestError, type ServerError, type ValidationError, categorify, convertServerErrorToRequestError, errors, fetchSvgContent, formatDate, getErrorMessage, getSvgContentForAstro, humanize, injectSvgIntoElement, isErrorCode, slugify, transformErrors };
|
|
123
|
+
export { ERROR_CODES, ERROR_CONSTANTS, type RequestError, type ServerError, type ValidationError, convertServerErrorToRequestError, errors, getErrorMessage, isErrorCode, transformErrors };
|
package/dist/utils.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { B as Block, C as Collection,
|
|
1
|
+
export { B as Block, C as Collection, u as CollectionEntry, V as ValidationResult, n as categorify, F as convertToMajor, G as convertToMinor, j as createPaymentForCheckout, e as extractBlockValues, r as fetchSvgContent, l as findTimeZone, f as formatBlockValue, I as formatCurrencyAmount, o as formatDate, i as formatMinor, h as formatPayment, z as getBlockFromArray, a as getBlockLabel, y as getBlockObjectValues, b as getBlockTextValue, w as getBlockValue, x as getBlockValues, H as getCurrencyFromMarket, k as getCurrencySymbol, g as getGalleryThumbnail, A as getImageUrl, c as getMarketPrice, d as getPriceAmount, q as getSvgContentForAstro, m as humanize, t as injectSvgIntoElement, p as prepareBlocksForSubmission, s as slugify, D as thumbnailUrl, E as translateMap, J as tzGroups, K as validateEmail, v as validatePhoneNumber, M as validateRequired, L as validateVerificationCode } from './svg-BhIM4HZW.js';
|
|
2
2
|
import './types.js';
|
|
3
3
|
|
|
4
4
|
declare const ERROR_CODES: {
|
|
@@ -120,46 +120,4 @@ declare const errors: {
|
|
|
120
120
|
};
|
|
121
121
|
};
|
|
122
122
|
|
|
123
|
-
|
|
124
|
-
/**
|
|
125
|
-
* Server-side helper for Astro components to fetch SVG content during SSR
|
|
126
|
-
*
|
|
127
|
-
* @param mediaObject The media object from the CMS
|
|
128
|
-
* @returns The SVG content as a string, or empty string on failure
|
|
129
|
-
*/
|
|
130
|
-
declare function getSvgContentForAstro(mediaObject: any): Promise<string>;
|
|
131
|
-
/**
|
|
132
|
-
* Client-side helper to fetch and inject SVG content into DOM elements
|
|
133
|
-
*
|
|
134
|
-
* @param mediaObject The media object from the CMS
|
|
135
|
-
* @param targetElement The DOM element to inject the SVG into
|
|
136
|
-
* @param className Optional CSS class to add to the SVG
|
|
137
|
-
*/
|
|
138
|
-
declare function injectSvgIntoElement(mediaObject: any, targetElement: HTMLElement, className?: string): Promise<void>;
|
|
139
|
-
|
|
140
|
-
declare const locales: readonly ["en", "sr-latn"];
|
|
141
|
-
/**
|
|
142
|
-
* * returns "slugified" text.
|
|
143
|
-
* @param text: string - text to slugify
|
|
144
|
-
*/
|
|
145
|
-
declare function slugify(text: string): string;
|
|
146
|
-
/**
|
|
147
|
-
* * returns "humanized" text. runs slugify() and then replaces - with space and upper case first letter of every word, and lower case the rest
|
|
148
|
-
* @param text: string - text to humanize
|
|
149
|
-
*/
|
|
150
|
-
declare function humanize(text: string): string;
|
|
151
|
-
/**
|
|
152
|
-
* * returns "categorified" text. runs slugify() and then replaces - with space and upper cases everything
|
|
153
|
-
* @param text: string - text to categorify
|
|
154
|
-
* @returns string - categorified text
|
|
155
|
-
*/
|
|
156
|
-
declare function categorify(text: string): string;
|
|
157
|
-
/**
|
|
158
|
-
* * returns a nicely formatted string of the date passed
|
|
159
|
-
* @param date: string | number | Date - date to format
|
|
160
|
-
* @param locale: string - locale to format the date in
|
|
161
|
-
* @returns string - formatted date
|
|
162
|
-
*/
|
|
163
|
-
declare function formatDate(date: string | number | Date, locale: (typeof locales)[number]): string;
|
|
164
|
-
|
|
165
|
-
export { ERROR_CODES, ERROR_CONSTANTS, type RequestError, type ServerError, type ValidationError, categorify, convertServerErrorToRequestError, errors, fetchSvgContent, formatDate, getErrorMessage, getSvgContentForAstro, humanize, injectSvgIntoElement, isErrorCode, slugify, transformErrors };
|
|
123
|
+
export { ERROR_CODES, ERROR_CONSTANTS, type RequestError, type ServerError, type ValidationError, convertServerErrorToRequestError, errors, getErrorMessage, isErrorCode, transformErrors };
|