@ptx-showcase/utils 0.0.2 → 0.0.3

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.
@@ -0,0 +1 @@
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},s=(n,r,a)=>(a=n==null?{}:e(i(n)),o(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));let c=require(`js-cookie`);c=s(c,1);var l=(e,t,n)=>{c.default.set(e,t,{expires:1/24,secure:!0,sameSite:`Strict`,...n})},u=e=>c.default.get(e),d=(e,t)=>{c.default.remove(e,t)};exports.deleteCookie=d,exports.getCookie=u,exports.setCookie=l;
@@ -1,3 +1,6 @@
1
- export declare const setCookie: (name: string, value: string, options?: Cookies.CookieAttributes) => void;
2
- export declare const getCookie: (name: string) => string | undefined;
3
- export declare const deleteCookie: (name: string, options?: Cookies.CookieAttributes) => void;
1
+ import { default as Cookies } from 'js-cookie'
2
+ type CookieOptions = Parameters<typeof Cookies.set>[2]
3
+ export declare const setCookie: (name: string, value: string, options?: CookieOptions) => void
4
+ export declare const getCookie: (name: string) => string | undefined
5
+ export declare const deleteCookie: (name: string, options?: CookieOptions) => void
6
+ export {}
@@ -0,0 +1,14 @@
1
+ import e from "js-cookie";
2
+ //#region src/cookie/index.ts
3
+ var t = (t, n, r) => {
4
+ e.set(t, n, {
5
+ expires: 1 / 24,
6
+ secure: !0,
7
+ sameSite: "Strict",
8
+ ...r
9
+ });
10
+ }, n = (t) => e.get(t), r = (t, n) => {
11
+ e.remove(t, n);
12
+ };
13
+ //#endregion
14
+ export { r as deleteCookie, n as getCookie, t as setCookie };
package/dist/index.cjs CHANGED
@@ -0,0 +1 @@
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});function e(e){return`Hello, ${e}!`}exports.hello=e;
package/dist/index.d.ts CHANGED
@@ -1 +1 @@
1
- export {}
1
+ export declare function hello(name: string): string;
package/dist/index.js CHANGED
@@ -0,0 +1,6 @@
1
+ //#region src/index.ts
2
+ function e(e) {
3
+ return `Hello, ${e}!`;
4
+ }
5
+ //#endregion
6
+ export { e as hello };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ptx-showcase/utils",
3
3
  "description": "Shared utilities for PTX Showcase projects",
4
- "version": "0.0.2",
4
+ "version": "0.0.3",
5
5
  "private": false,
6
6
  "type": "module",
7
7
  "license": "MIT",
@@ -13,19 +13,19 @@
13
13
  "types": "./dist/index.d.ts",
14
14
  "exports": {
15
15
  ".": {
16
- "types": "./dist/index.d.ts",
17
16
  "import": "./dist/index.js",
18
- "require": "./dist/index.cjs"
17
+ "require": "./dist/index.cjs",
18
+ "types": "./dist/index.d.ts"
19
19
  },
20
20
  "./cookie": {
21
- "types": "./dist/cookie/index.d.ts",
22
21
  "import": "./dist/cookie/index.js",
23
- "require": "./dist/cookie/index.cjs"
22
+ "require": "./dist/cookie/index.cjs",
23
+ "types": "./dist/cookie/index.d.ts"
24
24
  }
25
25
  },
26
26
  "scripts": {
27
27
  "dev": "vite",
28
- "build": "tsc && vite build",
28
+ "build": "vite build",
29
29
  "preview": "vite preview"
30
30
  },
31
31
  "publishConfig": {
@@ -1 +0,0 @@
1
- export {};