@awaitio/input-url 0.0.0-stage → 1.0.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/LICENSE ADDED
@@ -0,0 +1,94 @@
1
+ # AwaitIO License
2
+
3
+ Copyright © 2026 Orukami s.r.o., Rybná 716/24, 110 00 Praha 1, Czech Republic, company ID 64049159, registered in the Commercial Register kept by the Municipal Court in Prague, section C, file 74046 (the "Licensor")
4
+
5
+ The source code of AwaitIO is public. Whether you can use it for free depends on how many people use it: small teams use AwaitIO for free, including commercially, while for-profit organizations with more users need a Company License. This keeps AwaitIO free for most people and funds its development.
6
+
7
+ This license covers everything in this repository, the package `awaitio` and every package published by the Licensor under the `@awaitio` scope on npm, now or in the future, such as `@awaitio/input-text`, `@awaitio/input-textarea` and `@awaitio/input-datetime` (together, "AwaitIO").
8
+
9
+ ## Users
10
+
11
+ A "user" is a person who uses an application built with AwaitIO, whether it runs locally or is deployed: an employee, a contractor or anyone else who opens it, runs its actions or answers them. What counts is the number of real people, not the number of logins: several people sharing one login are several users. Count each person once across all of your organization's AwaitIO applications and environments.
12
+
13
+ ## Organization
14
+
15
+ Your "organization" is you, if you are an individual, or the legal entity that uses AwaitIO, together with every entity that controls it, is controlled by it or is under common control with it. "Control" means owning more than 50% of the voting shares or other ownership interest, or having the power to direct the entity's management. Users are counted across the whole organization: entities in one group count their users together and cannot each use the Free License separately.
16
+
17
+ ## Free License
18
+
19
+ ### Who is eligible
20
+
21
+ You may use AwaitIO for free if you are:
22
+
23
+ - an individual, including a sole trader or a freelancer, or a for-profit organization, in each case with up to 3 users;
24
+ - a non-profit or not-for-profit organization, or an educational institution; or
25
+ - evaluating whether AwaitIO fits your needs, with any number of users, for 30 days from your organization's first use of AwaitIO. The evaluation period is counted once per organization and does not start again with a new application, environment or version. After it ends, an organization that is not eligible for the Free License otherwise needs a Company License or an Enterprise agreement to keep using AwaitIO.
26
+
27
+ ### What you may do
28
+
29
+ If you are eligible, you are granted permission, free of charge, to:
30
+
31
+ - use AwaitIO, commercially or not, including in production;
32
+ - build applications and internal tools with AwaitIO, for yourself and for your clients; and
33
+ - modify AwaitIO for your own use, or to contribute fixes and improvements back to AwaitIO.
34
+
35
+ ## Company License
36
+
37
+ An individual or a for-profit organization with more than 3 users needs a Company License to use AwaitIO. It allows the same use as the Free License, in any number of applications and environments. Its price depends on the number of users:
38
+
39
+ - 4 to 10 users: 50 USD per month per organization;
40
+ - 11 to 50 users: 250 USD per month per organization.
41
+
42
+ An individual or a for-profit organization with more than 50 users needs an Enterprise agreement instead of a Company License (see below).
43
+
44
+ To get one, sponsor AwaitIO on GitHub Sponsors (https://github.com/sponsors/awaitio) with the monthly Company License tier for your number of users, from your organization's GitHub account or on its behalf. The Company License is valid for as long as the monthly sponsorship is active; when it ends, so does the Company License. When your organization grows past 10 users, move to the higher tier; when it grows past 50 users, agree on an Enterprise agreement.
45
+
46
+ The Licensor issues an invoice for every payment on request: write to license@awaitio.com with your organization's billing details. For more than 50 users, a written contract, a service-level agreement, priority support or other custom terms, write to the same address to agree on an Enterprise agreement.
47
+
48
+ Eligibility is decided by the organization that runs the application. If you build tools with AwaitIO for a client and the client runs them, the client's users count and the client needs a Company License unless it is eligible for the Free License itself. People who only develop, test or demonstrate an application for a client, such as the developers of an agency or a freelancer, are not users of it and do not count towards their own organization either. Whoever runs the application for its users pays: if you run it for your client yourself, for example as a hosted back office, its users count as yours. An agency or a freelancer may get the client's Company License on the client's behalf, for example as part of its own price: the license then covers the client, in the tier for the client's number of users, for as long as the sponsorship for it is active.
49
+
50
+ ## Same software, honor system
51
+
52
+ The Free License and the Company License cover exactly the same software. AwaitIO has no paid features, no license keys, no usage limits and no telemetry, and it never checks which license you have. The licensing works on trust: if your organization needs a Company License, get one.
53
+
54
+ ## Sponsoring
55
+
56
+ Anyone may sponsor AwaitIO on GitHub Sponsors, once or monthly, with any amount, to support its development. A sponsorship other than a monthly Company License tier is a gift and does not grant a Company License.
57
+
58
+ ## What nobody may do
59
+
60
+ Whatever your license, without a separate written agreement with the Licensor you may not:
61
+
62
+ 1. copy or modify AwaitIO in order to sell, rent, license, relicense or sublicense AwaitIO itself or your own derivative or fork of it;
63
+ 2. offer AwaitIO, or a derivative or fork of it, to third parties as a framework, builder or platform for making internal tools, admin panels or back offices, that is, a product whose main purpose is to let others build their own applications;
64
+ 3. offer to third parties a commercial hosted or managed service built on AwaitIO, such as a dashboard, cloud, monitoring or management service for applications that use AwaitIO.
65
+
66
+ Building applications with AwaitIO, running them and handing them over to your clients is none of the above. An application with its own purpose, such as the back office of a particular business, or the same application delivered to many clients, is not a framework, builder or platform under point 2, even when it is built with AwaitIO. Neither is making your own components, plugins or extensions for AwaitIO and sharing, selling or licensing them, as long as they do not include AwaitIO itself or a modified copy of it.
67
+
68
+ ## Changes to this license
69
+
70
+ The Licensor may change this license, including its prices and eligibility, at any time. A change applies to the versions of AwaitIO released after it; each version is governed by the license included with that version.
71
+
72
+ If you do not agree with the license of a newer version, you may keep using the versions you already have under the license they came with, but you may not upgrade to a version released under the license you do not agree with. Installing or using a newer version means you accept its license.
73
+
74
+ ## Warranty
75
+
76
+ AwaitIO is provided "as is", without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose and non-infringement. In no event shall the Licensor or copyright holders be liable for any claim, damages or other liability, whether in an action of contract, tort or otherwise, arising from, out of or in connection with AwaitIO or the use of or other dealings in AwaitIO.
77
+
78
+ ## Questions and license confirmation
79
+
80
+ If you are not sure whether or which license you need, for example how to count your users or whether your use is allowed, write to license@awaitio.com before you decide; the Licensor will answer in writing. If you need a confirmation that your organization holds a valid license, for example for an audit, a client or a procurement process, write to the same address and the Licensor will confirm in writing which license your organization holds and for how long it is valid.
81
+
82
+ ## Governing law
83
+
84
+ This license and every dispute arising from it or in connection with AwaitIO are governed by the laws of the Czech Republic, excluding its conflict-of-laws rules and the United Nations Convention on Contracts for the International Sale of Goods. The courts of the Czech Republic with jurisdiction for Prague have exclusive jurisdiction, unless mandatory law gives a consumer the right to sue in the courts of their own country.
85
+
86
+ ## Support
87
+
88
+ Support is provided through GitHub issues:
89
+
90
+ - under the Free License, on a best-effort basis;
91
+ - under a Company License, standard support with a first response within 3 working days;
92
+ - under an Enterprise agreement, priority support with a first response within 12 hours on working days, unless the agreement says otherwise.
93
+
94
+ Working days are business days in the Czech Republic. The response times are targets, not a service-level agreement; an Enterprise agreement may add one.
package/README.md CHANGED
@@ -1,3 +1,38 @@
1
- # Temporary Holding Version
1
+ # @awaitio/input-url
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ URL input for [AwaitIO](https://awaitio.com): `io.input.url()`, returns a URL.
4
+
5
+ ![A Website field filled with https://northwind-coffee.example/pricing](https://docs.awaitio.com/images/io-input-url.png)
6
+
7
+ ## Install
8
+
9
+ ```bash
10
+ npm install @awaitio/input-url
11
+ ```
12
+
13
+ Needs `awaitio` and `zod` in the app, see the [quickstart](https://docs.awaitio.com/quickstart).
14
+
15
+ ## Setup
16
+
17
+ Register it under the key you want in `io`, see [Input components](https://docs.awaitio.com/core/input-components):
18
+
19
+ ```ts
20
+ import { inputUrl } from '@awaitio/input-url';
21
+
22
+ export const app = new AwaitIO({
23
+ // name, actionsDirectory, theme, secret, users…
24
+ components: { input: { url: inputUrl } },
25
+ });
26
+ ```
27
+
28
+ ## Usage
29
+
30
+ ```ts
31
+ const website = await io.input.url('Website', {
32
+ placeholder: 'https://example.com',
33
+ });
34
+
35
+ website.hostname; // 'example.com'
36
+ ```
37
+
38
+ Props, optional, returns, built-in validation and custom validation are on the [Input URL docs page](https://docs.awaitio.com/io/input-url).
@@ -0,0 +1,2 @@
1
+ export { inputUrl } from './inputUrl';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.inputUrl = void 0;
4
+ var inputUrl_1 = require("./inputUrl");
5
+ Object.defineProperty(exports, "inputUrl", { enumerable: true, get: function () { return inputUrl_1.inputUrl; } });
@@ -0,0 +1,8 @@
1
+ import { z } from 'zod/v4';
2
+ export declare const inputUrl: import("awaitio").ComponentDefinition<z.ZodObject<{
3
+ placeholder: z.ZodOptional<z.ZodString>;
4
+ helpText: z.ZodOptional<z.ZodString>;
5
+ defaultValue: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodCustom<URL, URL>]>, z.ZodTransform<string, string | URL>>>;
6
+ allowedProtocols: z.ZodDefault<z.ZodArray<z.ZodString>>;
7
+ }, z.core.$strip>, z.ZodPipe<z.ZodString, z.ZodTransform<URL, string>>>;
8
+ //# sourceMappingURL=inputUrl.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"inputUrl.d.ts","sourceRoot":"","sources":["../src/inputUrl.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC;AAE3B,eAAO,MAAM,QAAQ;;;;;uEAiCnB,CAAC"}
@@ -0,0 +1,40 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.inputUrl = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const awaitio_1 = require("awaitio");
6
+ const ui_1 = require("awaitio/ui");
7
+ const v4_1 = require("zod/v4");
8
+ exports.inputUrl = (0, awaitio_1.defineComponent)({
9
+ props: v4_1.z.object({
10
+ placeholder: v4_1.z.string().optional(),
11
+ helpText: v4_1.z.string().optional(),
12
+ // A URL from the handler travels as its text.
13
+ defaultValue: v4_1.z
14
+ .union([v4_1.z.string(), v4_1.z.instanceof(URL)])
15
+ .transform((value) => {
16
+ return value.toString();
17
+ })
18
+ .optional(),
19
+ // Schemes the address may use, without the colon: by default only web addresses.
20
+ allowedProtocols: v4_1.z.array(v4_1.z.string()).min(1).default(['http', 'https']),
21
+ }),
22
+ // The browser sends the text; the handler gets a URL.
23
+ returns: v4_1.z
24
+ .string()
25
+ .trim()
26
+ .url('enter a URL')
27
+ .transform((value) => {
28
+ return new URL(value);
29
+ }),
30
+ initialValue: (props) => {
31
+ return props.defaultValue ?? '';
32
+ },
33
+ validate: ({ label, props, value }) => {
34
+ const protocol = value.protocol.replace(/:$/, '');
35
+ return props.allowedProtocols.includes(protocol) ? null : `${label} must start with ${props.allowedProtocols.map((allowed) => `${allowed}://`).join(' or ')}.`;
36
+ },
37
+ component: ({ props, value, onChange, disabled, autoFocus, optional }) => {
38
+ return (0, jsx_runtime_1.jsx)(ui_1.Input, { type: "url", inputMode: "url", value: value, onChange: onChange, placeholder: props.placeholder, required: !optional, disabled: disabled, autoFocus: autoFocus });
39
+ },
40
+ });
package/dist/ui/ui.js ADDED
@@ -0,0 +1 @@
1
+ var awaitioComponent=(function(a,l,p,i){"use strict";const u=t=>({kind:"awaitio-component",...t,uiDirectory:null}),s="__AWAITIO__",d=t=>{const e=window[s],n=document.currentScript,o=n instanceof HTMLScriptElement?n.dataset.type:void 0;if(!e||!o)throw new Error("A component UI script must be loaded by the AwaitIO UI.");e.registerComponent(o,t)},m=t=>{const e=window[s],n=document.currentScript,o=n instanceof HTMLScriptElement?n.dataset.type:void 0;if(!e||!o)throw new Error("A display component UI script must be loaded by the AwaitIO UI.");e.registerDisplay(o,t)},w=t=>{const e=window[s],n=document.currentScript,o=n instanceof HTMLScriptElement?n.dataset.type:void 0;if(!e||!o)throw new Error("A layout UI script must be loaded by the AwaitIO UI.");e.registerLayout(o,t)},y=t=>{const e=window[s],n=document.currentScript,o=n instanceof HTMLScriptElement?n.dataset.type:void 0;if(!e||!o)throw new Error("A theme UI script must be loaded by the AwaitIO UI.");e.registerTheme(o,t)},r=u({props:i.z.object({placeholder:i.z.string().optional(),helpText:i.z.string().optional(),defaultValue:i.z.union([i.z.string(),i.z.instanceof(URL)]).transform(t=>t.toString()).optional(),allowedProtocols:i.z.array(i.z.string()).min(1).default(["http","https"])}),returns:i.z.string().trim().url("enter a URL").transform(t=>new URL(t)),initialValue:t=>t.defaultValue??"",validate:({label:t,props:e,value:n})=>{const o=n.protocol.replace(/:$/,"");return e.allowedProtocols.includes(o)?null:`${t} must start with ${e.allowedProtocols.map(c=>`${c}://`).join(" or ")}.`},component:({props:t,value:e,onChange:n,disabled:o,autoFocus:c,optional:f})=>l.jsx(p.Input,{type:"url",inputMode:"url",value:e,onChange:n,placeholder:t.placeholder,required:!f,disabled:o,autoFocus:c})});return Object.values(r).every(t=>t&&t.kind==="awaitio-theme-block")?y({blocks:Object.fromEntries(Object.entries(r).map(([t,e])=>[t,e.component]))}):r.kind==="awaitio-layout"?w({component:r.component}):r.kind==="awaitio-display"?m({component:r.component,wrap:r.wrap??!0}):d({component:r.component,initialValue:r.initialValue,wrap:r.wrap??!0,submitButton:r.submitButton??!0}),a.inputUrl=r,Object.defineProperty(a,Symbol.toStringTag,{value:"Module"}),a})({},__AWAITIO__.jsxRuntime,__AWAITIO__.ui,__AWAITIO__.zod);
package/package.json CHANGED
@@ -1,6 +1,38 @@
1
1
  {
2
2
  "name": "@awaitio/input-url",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
3
+ "version": "1.0.0",
4
+ "description": "URL input for AwaitIO: io.input.url(), returns a URL.",
5
+ "license": "SEE LICENSE IN LICENSE",
6
+ "main": "dist/index.js",
7
+ "types": "dist/index.d.ts",
8
+ "files": [
9
+ "dist"
10
+ ],
11
+ "peerDependencies": {
12
+ "zod": "^3.25.0 || ^4.0.0",
13
+ "awaitio": "^1.0.0"
14
+ },
15
+ "dependencies": {
16
+ "react": "^19.1.0"
17
+ },
18
+ "devDependencies": {
19
+ "@types/node": "^22.14.0",
20
+ "@types/react": "^19.1.0",
21
+ "@typescript/native": "npm:typescript@^7.0.2",
22
+ "@vitejs/plugin-react": "^5.0.0",
23
+ "typescript": "npm:@typescript/typescript6@^6.0.2",
24
+ "vite": "^7.1.0",
25
+ "vitest": "^3.2.0",
26
+ "zod": "^4.3.6",
27
+ "awaitio": "1.0.0"
28
+ },
29
+ "scripts": {
30
+ "build": "rm -rf dist && tsc -p tsconfig.build.json && vite build",
31
+ "dev": "tsc -p tsconfig.build.json --watch --preserveWatchOutput & vite build --watch",
32
+ "tsc": "tsc --noEmit",
33
+ "lint": "eslint .",
34
+ "lint:fix": "eslint . --fix",
35
+ "test": "vitest run",
36
+ "release": "pnpm build && pnpm publish --access public --no-git-checks"
37
+ }
6
38
  }