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.
@@ -84,4 +84,46 @@ declare const tzGroups: {
84
84
  }[];
85
85
  declare function findTimeZone(groups: typeof tzGroups): string;
86
86
 
87
- export { tzGroups as A, type Block as B, type Collection as C, validateEmail as D, validateVerificationCode as E, validateRequired as F, type ValidationResult as V, getMarketPrice as a, getPriceAmount as b, formatMinor as c, createPaymentForCheckout as d, getCurrencySymbol as e, formatPayment as f, getGalleryThumbnail as g, findTimeZone as h, type CollectionEntry as i, getBlockLabel as j, formatBlockValue as k, extractBlockValues as l, getBlockTextValue as m, getBlockValue as n, getBlockValues as o, prepareBlocksForSubmission as p, getBlockObjectValues as q, getBlockFromArray as r, getImageUrl as s, thumbnailUrl as t, translateMap as u, validatePhoneNumber as v, convertToMajor as w, convertToMinor as x, getCurrencyFromMarket as y, formatCurrencyAmount as z };
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
- export { tzGroups as A, type Block as B, type Collection as C, validateEmail as D, validateVerificationCode as E, validateRequired as F, type ValidationResult as V, getMarketPrice as a, getPriceAmount as b, formatMinor as c, createPaymentForCheckout as d, getCurrencySymbol as e, formatPayment as f, getGalleryThumbnail as g, findTimeZone as h, type CollectionEntry as i, getBlockLabel as j, formatBlockValue as k, extractBlockValues as l, getBlockTextValue as m, getBlockValue as n, getBlockValues as o, prepareBlocksForSubmission as p, getBlockObjectValues as q, getBlockFromArray as r, getImageUrl as s, thumbnailUrl as t, translateMap as u, validatePhoneNumber as v, convertToMajor as w, convertToMinor as x, getCurrencyFromMarket as y, formatCurrencyAmount as z };
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, i as CollectionEntry, V as ValidationResult, w as convertToMajor, x as convertToMinor, d as createPaymentForCheckout, l as extractBlockValues, h as findTimeZone, k as formatBlockValue, z as formatCurrencyAmount, c as formatMinor, f as formatPayment, r as getBlockFromArray, j as getBlockLabel, q as getBlockObjectValues, m as getBlockTextValue, n as getBlockValue, o as getBlockValues, y as getCurrencyFromMarket, e as getCurrencySymbol, g as getGalleryThumbnail, s as getImageUrl, a as getMarketPrice, b as getPriceAmount, p as prepareBlocksForSubmission, t as thumbnailUrl, u as translateMap, A as tzGroups, D as validateEmail, v as validatePhoneNumber, F as validateRequired, E as validateVerificationCode } from './timezone-Ctc3v4hK.cjs';
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
- declare function fetchSvgContent(mediaObject: any): Promise<string | null>;
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, i as CollectionEntry, V as ValidationResult, w as convertToMajor, x as convertToMinor, d as createPaymentForCheckout, l as extractBlockValues, h as findTimeZone, k as formatBlockValue, z as formatCurrencyAmount, c as formatMinor, f as formatPayment, r as getBlockFromArray, j as getBlockLabel, q as getBlockObjectValues, m as getBlockTextValue, n as getBlockValue, o as getBlockValues, y as getCurrencyFromMarket, e as getCurrencySymbol, g as getGalleryThumbnail, s as getImageUrl, a as getMarketPrice, b as getPriceAmount, p as prepareBlocksForSubmission, t as thumbnailUrl, u as translateMap, A as tzGroups, D as validateEmail, v as validatePhoneNumber, F as validateRequired, E as validateVerificationCode } from './timezone-Cnh6zsAn.js';
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
- declare function fetchSvgContent(mediaObject: any): Promise<string | null>;
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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "arky-sdk",
3
- "version": "0.3.8",
3
+ "version": "0.3.9",
4
4
  "description": "Official TypeScript SDK for Arky - All-in-one business platform",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",