@quicktalog/common 1.13.0 → 1.15.0

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/constants.js CHANGED
@@ -1,7 +1,4 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DEFAULT_EMAIL = exports.layouts = exports.themes = void 0;
4
- exports.themes = [
1
+ export const themes = [
5
2
  {
6
3
  id: 1,
7
4
  key: "theme-advent-1",
@@ -52,7 +49,7 @@ exports.themes = [
52
49
  type: "dark",
53
50
  },
54
51
  ];
55
- exports.layouts = [
52
+ export const layouts = [
56
53
  {
57
54
  key: "variant_1",
58
55
  label: "Side Image",
@@ -78,4 +75,4 @@ exports.layouts = [
78
75
  description: "Carousel layout: Catalogue items are displayed in a horizontal scrollable carousel, allowing users to swipe or scroll through items. Great for featured items or visually rich catalogues.",
79
76
  },
80
77
  ];
81
- exports.DEFAULT_EMAIL = "quicktalog@outlook.com";
78
+ export const DEFAULT_EMAIL = "quicktalog@outlook.com";
package/dist/helpers.js CHANGED
@@ -1,8 +1,4 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.generateUniqueSlug = void 0;
4
- exports.fetchImageFromUnsplash = fetchImageFromUnsplash;
5
- async function fetchImageFromUnsplash(query) {
1
+ export async function fetchImageFromUnsplash(query) {
6
2
  try {
7
3
  const res = await fetch(`https://api.unsplash.com/search/photos?page=1&per_page=1&query=${encodeURIComponent(query)}`, {
8
4
  headers: {
@@ -19,7 +15,7 @@ async function fetchImageFromUnsplash(query) {
19
15
  }
20
16
  return "https://static1.squarespace.com/static/5898e29c725e25e7132d5a5a/58aa11bc9656ca13c4524c68/58aa11e99656ca13c45253e2/1487540713345/600x400-Image-Placeholder.jpg?format=original";
21
17
  }
22
- const generateUniqueSlug = (name) => {
18
+ export const generateUniqueSlug = (name) => {
23
19
  const slug = name
24
20
  .toLowerCase()
25
21
  .trim()
@@ -28,4 +24,3 @@ const generateUniqueSlug = (name) => {
28
24
  .replace(/^-|-$/g, "");
29
25
  return slug;
30
26
  };
31
- exports.generateUniqueSlug = generateUniqueSlug;
package/dist/index.js CHANGED
@@ -1,20 +1,4 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./constants"), exports);
18
- __exportStar(require("./helpers"), exports);
19
- __exportStar(require("./types"), exports);
20
- __exportStar(require("./pricing"), exports);
1
+ export * from "./constants";
2
+ export * from "./helpers";
3
+ export * from "./types";
4
+ export * from "./pricing";
package/dist/pricing.js CHANGED
@@ -1,7 +1,4 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.tiers = void 0;
4
- exports.tiers = [
1
+ export const tiers = [
5
2
  {
6
3
  id: 0,
7
4
  name: "Starter",
package/dist/types.js CHANGED
@@ -1,2 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ export {};
package/package.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "@quicktalog/common",
3
- "version": "1.13.0",
3
+ "version": "1.15.0",
4
+ "type": "module",
4
5
  "main": "dist/index.js",
5
6
  "types": "dist/index.d.ts",
6
7
  "scripts": {
package/tsconfig.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
- "compilerOptions": {
3
- "target": "ES2020",
4
- "module": "commonjs",
5
- "declaration": true,
6
- "outDir": "dist",
7
- "strict": true,
8
- "esModuleInterop": true,
9
- "skipLibCheck": true
10
- },
11
- "include": ["src"],
12
- "exclude": ["dist"]
2
+ "compilerOptions": {
3
+ "module": "ES2020",
4
+ "target": "ES2020",
5
+ "declaration": true,
6
+ "outDir": "dist",
7
+ "strict": true,
8
+ "esModuleInterop": true,
9
+ "skipLibCheck": true
10
+ },
11
+ "include": ["src"],
12
+ "exclude": ["dist"]
13
13
  }