From a1cdb8df8ff56a5417138122cf268701357c9f33 Mon Sep 17 00:00:00 2001 From: isanchez-userfront <147533431+isanchez-userfront@users.noreply.github.com> Date: Mon, 17 Mar 2025 03:25:27 -0500 Subject: [PATCH 1/2] DEV-1765: moved to monorepo --- README.md | 144 +----------------------------------------------------- 1 file changed, 2 insertions(+), 142 deletions(-) diff --git a/README.md b/README.md index 0fb072e..c20c6f4 100644 --- a/README.md +++ b/README.md @@ -1,143 +1,3 @@ -# Userfront Toolkit +# ⚠️ This repository has moved -## Toolkit installation and usage - -For more information and examples, visit the Userfront Toolkit home page: https://userfront.com/dashboard/toolkit - -To install and use the Userfront Toolkit, follow the instructions for your framework or platform: - -### React - -Use Userfront React instead: [https://github.com/userfront/userfront/tree/main/packages/react](https://github.com/userfront/userfront/tree/main/packages/react) - -### Vue - -**Install:** `npm install --save @userfront/toolkit` - -**Use:** - -```js - - - - - -``` - -### Without framework - -**Install:** `npm install --save @userfront/toolkit` - -**Use:** - -```html - - - - - - - - -``` - -_or_ - -If bundling, or if you want to use the npm library rather than a script, run this on page load: - -```js -import Userfront from "@userfront/toolkit/web-components"; - -Userfront.init("myTenantId"); - -// Now Toolkit components are registered as Web Components -``` - -```html - - - -``` - -## Components - -| React | Vue & Web Components | -| ----------------------- | --------------------------------------------- | -| `` | `` | -| `` | `` | -| `` | `` | -| `` | `` | - -**Note**: when using them in plain HTML, Web Components are not self-closing and must have the full closing tag. -When using in Vue, they can be written in self-closing form: ``. - -The Vue components are `` because they are Web Components under the hood, and Web Components are required to be in kebab-case. - -### Props - -In React, props are `camelCase`. In Vue and Web Components, props are `kebab-case`, as required by the Web Components standard. - -All props are optional. - -- `tenantId` / `tenant-id`: your workspace ID - - This prop is not necessary if you call `Userfront.init("workspace_id")` before using the components. - - Your workspace ID can be found on the [**Overview** page in your Userfront dashboard](https://userfront.com/dashboard). -- `compact`: - - Default: `false` - - `true`: hide the email & password inputs in favor of a "Username and password" button. Clicking this button will display the necessary inputs. - - **Note**: The **Password** factor must be an enabled factor in your workspace's authentication flow configured on the [**Authentication** page in your Userfront dashboard](https://userfront.com/dashboard/authentication). - - `false`: show the username and password fields directly in the form's sign-on method selection view. -- `redirect`: controls if and where the form should redirect **after** sign-on. - - Default: `undefined` - - `false`: the form does not redirect. - - If set to a path, redirect to that path. - - If empty, redirect to the path configured on the [**Paths & routing** page in your Userfront dashboard](https://userfront.com/dashboard/paths). -- `redirectOnLoadIfLoggedIn` / `redirect-on-load-if-logged-in`: - - Default: `false` - - `true`: redirects per the `redirect` parameter if the user is already logged in when the form is loaded. - - `false`: do not redirect if the user is already logged in when the form is loaded. - -## Development - -### Repo structure - -This repo holds several different libraries. - -- `(root)` - you are here - - `/.github/workflows` - CI/CD scripts. - - `/package` - source for the npm package - - `/site` - standalone dev/test app for all libraries. - -The repo is configured as an npm workspace to enable sharing of libraries and dynamically linking the package to the dev app. - -### Development installation and setup - -1. Clone this repo. -2. Install: - - `npm install` -3. Run dev servers: - - `npm run dev` - - This will run the live dev servers for both the package and the site. -4. Run unit test: - - `npm run test` -5. Run Storybook: - - `npm run storybook -w package` - - Find the link to the local Storybook server in the output. - - Storybook should hot reload on changes to the package. Each UI state has its own component, so changes should show immediately and shouldn't require reloading the page. - -### Architecture - -See the `README.md` in `packages/toolkit-react` for a more detailed overview of the toolkit's architecture. +The Userfront Toolkit is now located at [userfront/userfront/packages/toolkit](https://github.com/userfront/userfront/tree/main/packages/toolkit). \ No newline at end of file From 61e3eb05333bd71f3ea579afcc7525cdb41f4ecb Mon Sep 17 00:00:00 2001 From: Userfront Robot <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 17 Mar 2025 16:44:27 +0000 Subject: [PATCH 2/2] Update to v1.0.11-alpha.2 --- package-lock.json | 2 +- package/package-lock.json | 4 ++-- package/package.json | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index 7f8500b..c12fb69 100644 --- a/package-lock.json +++ b/package-lock.json @@ -18698,7 +18698,7 @@ }, "package": { "name": "@userfront/toolkit", - "version": "1.0.11-alpha.1", + "version": "1.0.11-alpha.2", "license": "MIT", "dependencies": { "@r2wc/react-to-web-component": "^2.0.2", diff --git a/package/package-lock.json b/package/package-lock.json index 8430261..1fc391d 100644 --- a/package/package-lock.json +++ b/package/package-lock.json @@ -1,12 +1,12 @@ { "name": "@userfront/react", - "version": "1.0.11-alpha.1", + "version": "1.0.11-alpha.2", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@userfront/react", - "version": "1.0.11-alpha.1", + "version": "1.0.11-alpha.2", "license": "MIT", "dependencies": { "@r2wc/react-to-web-component": "^2.0.2", diff --git a/package/package.json b/package/package.json index c3ff099..c88edc8 100644 --- a/package/package.json +++ b/package/package.json @@ -1,6 +1,6 @@ { "name": "@userfront/toolkit", - "version": "1.0.11-alpha.1", + "version": "1.0.11-alpha.2", "description": "Bindings and components for authentication with Userfront with React, Vue, other frameworks, and plain JS + HTML", "type": "module", "directories": {