@plasmicapp/react-web 0.2.231 → 0.2.234

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.
@@ -13,6 +13,7 @@ export interface TransProps {
13
13
  transKey?: string;
14
14
  children?: React.ReactNode;
15
15
  }
16
+ export declare function usePlasmicTranslator(): PlasmicTranslator | undefined;
16
17
  export declare function genTranslatableString(elt: React.ReactNode, opts?: {
17
18
  tagPrefix?: string;
18
19
  }): {
@@ -0,0 +1,12 @@
1
+ import React from "react";
2
+ interface PlasmicPageGuardProps {
3
+ appId: string;
4
+ authorizeEndpoint: string;
5
+ minRole?: string;
6
+ canTriggerLogin: boolean;
7
+ children: React.ReactNode;
8
+ unauthorizedComp?: React.ReactNode;
9
+ }
10
+ export declare function PlasmicPageGuard(props: PlasmicPageGuardProps): JSX.Element | null;
11
+ export declare function withPlasmicPageGuard<P extends object>(WrappedComponent: React.ComponentType<P>, options: Omit<PlasmicPageGuardProps, "children">): React.FC<P>;
12
+ export {};
@@ -0,0 +1,17 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var authReact = require('@plasmicapp/auth-react');
6
+
7
+
8
+
9
+ Object.keys(authReact).forEach(function (k) {
10
+ if (k !== 'default' && !exports.hasOwnProperty(k)) Object.defineProperty(exports, k, {
11
+ enumerable: true,
12
+ get: function () {
13
+ return authReact[k];
14
+ }
15
+ });
16
+ });
17
+ //# sourceMappingURL=index.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;"}
@@ -0,0 +1 @@
1
+ export * from "@plasmicapp/auth-react";
@@ -0,0 +1,2 @@
1
+ export * from '@plasmicapp/auth-react';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,8 @@
1
+ {
2
+ "exports": {
3
+ "import": "./index.js",
4
+ "require": "./index.cjs.js"
5
+ },
6
+ "module": "./index.js",
7
+ "main": "./index.cjs.js"
8
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plasmicapp/react-web",
3
- "version": "0.2.231",
3
+ "version": "0.2.234",
4
4
  "description": "plasmic library for rendering in the presentational style",
5
5
  "main": "dist/index.cjs.js",
6
6
  "types": "dist/index.d.ts",
@@ -47,6 +47,11 @@
47
47
  "require": "./lib/prepass/index.cjs.js"
48
48
  },
49
49
  "./lib/plasmic.css": "./lib/plasmic.css",
50
+ "./lib/auth": {
51
+ "types": "./lib/auth/index.d.ts",
52
+ "import": "./lib/auth/index.js",
53
+ "require": "./lib/auth/index.cjs.js"
54
+ },
50
55
  "./skinny": {
51
56
  "import": "./skinny/dist/index.js"
52
57
  },
@@ -61,7 +66,7 @@
61
66
  ],
62
67
  "scripts": {
63
68
  "build": "rollup -c && mkdir -p lib && cp src/styles/plasmic.css lib/",
64
- "clean": "rm -rf dist/ skinny/dist/ lib/host/*js lib/host/*.ts lib/host/*.map lib/data-sources/*js lib/data-sources/*.ts lib/data-sources/*.map lib/query/*js lib/query/*.ts lib/query/*.map",
69
+ "clean": "rm -rf dist/ skinny/dist/ lib/host/*js lib/host/*.ts lib/host/*.map lib/data-sources/*js lib/data-sources/*.ts lib/data-sources/*.map lib/query/*js lib/query/*.ts lib/query/*.map lib/auth/*js lib/auth/*.ts lib/auth/*.map",
65
70
  "start": "tsdx watch",
66
71
  "test": "yarn --cwd=../.. test",
67
72
  "lint": "tsdx lint",
@@ -80,6 +85,7 @@
80
85
  },
81
86
  "prettier": {},
82
87
  "dependencies": {
88
+ "@plasmicapp/auth-react": "^0.0.5",
83
89
  "@plasmicapp/data-sources": "0.1.94",
84
90
  "@plasmicapp/data-sources-context": "0.1.11",
85
91
  "@plasmicapp/host": "1.0.149",
@@ -149,5 +155,5 @@
149
155
  "react": ">=16.8.0",
150
156
  "react-dom": ">=16.8.0"
151
157
  },
152
- "gitHead": "dc2ad8008e43ddf96d46c346afd43dc36c34e8d5"
158
+ "gitHead": "ff42d1b747943bedcc21cb39f8ffb92d38347292"
153
159
  }
@@ -0,0 +1 @@
1
+ export * from "@plasmicapp/auth-react";
@@ -12,7 +12,7 @@ export { PlasmicSlot, renderPlasmicSlot } from "./render/PlasmicSlot";
12
12
  export { createUseScreenVariants } from "./render/screen-variants";
13
13
  export { PlasmicDataSourceContextProvider, PlasmicRootProvider, useCurrentUser, useIsSSR, } from "./render/ssr";
14
14
  export { Stack } from "./render/Stack";
15
- export { genTranslatableString, Trans, PlasmicTranslator, } from "./render/translation";
15
+ export { genTranslatableString, Trans, PlasmicTranslator, usePlasmicTranslator, } from "./render/translation";
16
16
  export { useTrigger } from "./render/triggers";
17
17
  export * from "./states";
18
18
  export declare const classNames: typeof _classNames;
@@ -10,8 +10,8 @@ import { _ as __awaiter, a as __generator, b as __assign, c as __rest, d as __sp
10
10
  export { o as omit, p as pick } from './common-ed411407.js';
11
11
  export { PlasmicHead, plasmicHeadMeta } from './render/PlasmicHead/index.js';
12
12
  export { PlasmicImg } from './render/PlasmicImg/index.js';
13
- import { T as Trans } from './ssr-b32a66e3.js';
14
- export { P as PlasmicLink, a as PlasmicRootProvider, T as Trans, g as genTranslatableString, u as useIsSSR } from './ssr-b32a66e3.js';
13
+ import { T as Trans } from './ssr-d19c2950.js';
14
+ export { P as PlasmicLink, a as PlasmicRootProvider, T as Trans, g as genTranslatableString, u as useIsSSR, b as usePlasmicTranslator } from './ssr-d19c2950.js';
15
15
  import ReactDOM__default from 'react-dom';
16
16
  import { useFocusRing } from '@react-aria/focus';
17
17
  import { proxy, ref, useSnapshot, getVersion, subscribe } from 'valtio';