@vllnt/convex-slugs 0.1.0-canary.35a39c1
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 +21 -0
- package/README.md +138 -0
- package/dist/client/index.d.ts +90 -0
- package/dist/client/index.d.ts.map +1 -0
- package/dist/client/index.js +102 -0
- package/dist/client/index.js.map +1 -0
- package/dist/client/types.d.ts +27 -0
- package/dist/client/types.d.ts.map +1 -0
- package/dist/client/types.js +3 -0
- package/dist/client/types.js.map +1 -0
- package/dist/component/_generated/api.d.ts +38 -0
- package/dist/component/_generated/api.d.ts.map +1 -0
- package/dist/component/_generated/api.js +31 -0
- package/dist/component/_generated/api.js.map +1 -0
- package/dist/component/_generated/component.d.ts +67 -0
- package/dist/component/_generated/component.d.ts.map +1 -0
- package/dist/component/_generated/component.js +11 -0
- package/dist/component/_generated/component.js.map +1 -0
- package/dist/component/_generated/dataModel.d.ts +46 -0
- package/dist/component/_generated/dataModel.d.ts.map +1 -0
- package/dist/component/_generated/dataModel.js +11 -0
- package/dist/component/_generated/dataModel.js.map +1 -0
- package/dist/component/_generated/server.d.ts +121 -0
- package/dist/component/_generated/server.d.ts.map +1 -0
- package/dist/component/_generated/server.js +78 -0
- package/dist/component/_generated/server.js.map +1 -0
- package/dist/component/convex.config.d.ts +3 -0
- package/dist/component/convex.config.d.ts.map +1 -0
- package/dist/component/convex.config.js +7 -0
- package/dist/component/convex.config.js.map +1 -0
- package/dist/component/mutations.d.ts +102 -0
- package/dist/component/mutations.d.ts.map +1 -0
- package/dist/component/mutations.js +191 -0
- package/dist/component/mutations.js.map +1 -0
- package/dist/component/queries.d.ts +44 -0
- package/dist/component/queries.d.ts.map +1 -0
- package/dist/component/queries.js +75 -0
- package/dist/component/queries.js.map +1 -0
- package/dist/component/schema.d.ts +36 -0
- package/dist/component/schema.d.ts.map +1 -0
- package/dist/component/schema.js +27 -0
- package/dist/component/schema.js.map +1 -0
- package/dist/component/validators.d.ts +30 -0
- package/dist/component/validators.d.ts.map +1 -0
- package/dist/component/validators.js +25 -0
- package/dist/component/validators.js.map +1 -0
- package/dist/log.d.ts +5 -0
- package/dist/log.d.ts.map +1 -0
- package/dist/log.js +4 -0
- package/dist/log.js.map +1 -0
- package/dist/react/index.d.ts +55 -0
- package/dist/react/index.d.ts.map +1 -0
- package/dist/react/index.js +40 -0
- package/dist/react/index.js.map +1 -0
- package/dist/shared.d.ts +49 -0
- package/dist/shared.d.ts.map +1 -0
- package/dist/shared.js +52 -0
- package/dist/shared.js.map +1 -0
- package/package.json +112 -0
- package/src/client/index.ts +213 -0
- package/src/client/types.ts +29 -0
- package/src/component/_generated/api.ts +54 -0
- package/src/component/_generated/component.ts +96 -0
- package/src/component/_generated/dataModel.ts +60 -0
- package/src/component/_generated/server.ts +156 -0
- package/src/component/convex.config.ts +9 -0
- package/src/component/mutations.ts +212 -0
- package/src/component/queries.ts +84 -0
- package/src/component/schema.ts +27 -0
- package/src/component/validators.ts +32 -0
- package/src/react/index.test.tsx +110 -0
- package/src/react/index.tsx +79 -0
- package/src/shared.ts +78 -0
- package/src/test.ts +12 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"queries.js","sourceRoot":"","sources":["../../src/component/queries.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAClC,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAE3D;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG,KAAK,CAAC;IAC3B,IAAI,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE;IAC7C,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC;IACtC,OAAO,EAAE,KAAK,EAAE,GAAG,EAAE,IAA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 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Sandboxed tables — the slug registry's own concern. `resourceRef` is an opaque
|
|
3
|
+
* host-owned reference (never assume its shape). Uniqueness is on `(scope, slug)`.
|
|
4
|
+
*
|
|
5
|
+
* `redirects` keeps at most one row per `(scope, fromSlug)`. The `by_scope_to`
|
|
6
|
+
* index lets `rename` repoint chains so `redirectFor` always lands on the live
|
|
7
|
+
* slug (A→B then B→C leaves A→C, not A→B).
|
|
8
|
+
*/
|
|
9
|
+
declare const _default: import("convex/server").SchemaDefinition<{
|
|
10
|
+
slugs: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
11
|
+
scope: string;
|
|
12
|
+
slug: string;
|
|
13
|
+
resourceRef: string;
|
|
14
|
+
}, {
|
|
15
|
+
scope: import("convex/values").VString<string, "required">;
|
|
16
|
+
slug: import("convex/values").VString<string, "required">;
|
|
17
|
+
resourceRef: import("convex/values").VString<string, "required">;
|
|
18
|
+
}, "required", "scope" | "slug" | "resourceRef">, {
|
|
19
|
+
by_scope_slug: ["scope", "slug", "_creationTime"];
|
|
20
|
+
by_scope_resource: ["scope", "resourceRef", "_creationTime"];
|
|
21
|
+
}, {}, {}>;
|
|
22
|
+
redirects: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
23
|
+
scope: string;
|
|
24
|
+
fromSlug: string;
|
|
25
|
+
toSlug: string;
|
|
26
|
+
}, {
|
|
27
|
+
scope: import("convex/values").VString<string, "required">;
|
|
28
|
+
fromSlug: import("convex/values").VString<string, "required">;
|
|
29
|
+
toSlug: import("convex/values").VString<string, "required">;
|
|
30
|
+
}, "required", "scope" | "fromSlug" | "toSlug">, {
|
|
31
|
+
by_scope_from: ["scope", "fromSlug", "_creationTime"];
|
|
32
|
+
by_scope_to: ["scope", "toSlug", "_creationTime"];
|
|
33
|
+
}, {}, {}>;
|
|
34
|
+
}, true>;
|
|
35
|
+
export default _default;
|
|
36
|
+
//# sourceMappingURL=schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../src/component/schema.ts"],"names":[],"mappings":"AAGA;;;;;;;GAOG;;;;;;;;;;;;;;;;;;;;;;;;;;;AACH,wBAeG"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { defineSchema, defineTable } from "convex/server";
|
|
2
|
+
import { v } from "convex/values";
|
|
3
|
+
/**
|
|
4
|
+
* Sandboxed tables — the slug registry's own concern. `resourceRef` is an opaque
|
|
5
|
+
* host-owned reference (never assume its shape). Uniqueness is on `(scope, slug)`.
|
|
6
|
+
*
|
|
7
|
+
* `redirects` keeps at most one row per `(scope, fromSlug)`. The `by_scope_to`
|
|
8
|
+
* index lets `rename` repoint chains so `redirectFor` always lands on the live
|
|
9
|
+
* slug (A→B then B→C leaves A→C, not A→B).
|
|
10
|
+
*/
|
|
11
|
+
export default defineSchema({
|
|
12
|
+
slugs: defineTable({
|
|
13
|
+
scope: v.string(),
|
|
14
|
+
slug: v.string(),
|
|
15
|
+
resourceRef: v.string(),
|
|
16
|
+
})
|
|
17
|
+
.index("by_scope_slug", ["scope", "slug"])
|
|
18
|
+
.index("by_scope_resource", ["scope", "resourceRef"]),
|
|
19
|
+
redirects: defineTable({
|
|
20
|
+
scope: v.string(),
|
|
21
|
+
fromSlug: v.string(),
|
|
22
|
+
toSlug: v.string(),
|
|
23
|
+
})
|
|
24
|
+
.index("by_scope_from", ["scope", "fromSlug"])
|
|
25
|
+
.index("by_scope_to", ["scope", "toSlug"]),
|
|
26
|
+
});
|
|
27
|
+
//# sourceMappingURL=schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../src/component/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC1D,OAAO,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAElC;;;;;;;GAOG;AACH,eAAe,YAAY,CAAC;IAC1B,KAAK,EAAE,WAAW,CAAC;QACjB,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;QACjB,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;QAChB,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE;KACxB,CAAC;SACC,KAAK,CAAC,eAAe,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;SACzC,KAAK,CAAC,mBAAmB,EAAE,CAAC,OAAO,EAAE,aAAa,CAAC,CAAC;IACvD,SAAS,EAAE,WAAW,CAAC;QACrB,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;QACjB,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE;QACpB,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE;KACnB,CAAC;SACC,KAAK,CAAC,eAAe,EAAE,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC;SAC7C,KAAK,CAAC,aAAa,EAAE,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;CAC7C,CAAC,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Stable code-tag for a rejected slug write, as a Convex validator union. Kept
|
|
3
|
+
* in lockstep with the `SlugReason` string-literal union in `src/shared.ts`.
|
|
4
|
+
*/
|
|
5
|
+
export declare const slugReason: import("convex/values").VUnion<"SLUG_TAKEN" | "SLUG_NOT_FOUND" | "SLUG_INVALID" | "SLUG_RESERVED", [import("convex/values").VLiteral<"SLUG_TAKEN", "required">, import("convex/values").VLiteral<"SLUG_NOT_FOUND", "required">, import("convex/values").VLiteral<"SLUG_INVALID", "required">, import("convex/values").VLiteral<"SLUG_RESERVED", "required">], "required", never>;
|
|
6
|
+
/**
|
|
7
|
+
* Result of a write that may be rejected. `reason` carries a stable code-tag
|
|
8
|
+
* (one of {@link slugReason}) when `ok` is `false`, and is absent when `ok` is
|
|
9
|
+
* `true`.
|
|
10
|
+
*/
|
|
11
|
+
export declare const reserveResult: import("convex/values").VObject<{
|
|
12
|
+
reason?: "SLUG_TAKEN" | "SLUG_NOT_FOUND" | "SLUG_INVALID" | "SLUG_RESERVED" | undefined;
|
|
13
|
+
ok: boolean;
|
|
14
|
+
}, {
|
|
15
|
+
ok: import("convex/values").VBoolean<boolean, "required">;
|
|
16
|
+
reason: import("convex/values").VUnion<"SLUG_TAKEN" | "SLUG_NOT_FOUND" | "SLUG_INVALID" | "SLUG_RESERVED" | undefined, [import("convex/values").VLiteral<"SLUG_TAKEN", "required">, import("convex/values").VLiteral<"SLUG_NOT_FOUND", "required">, import("convex/values").VLiteral<"SLUG_INVALID", "required">, import("convex/values").VLiteral<"SLUG_RESERVED", "required">], "optional", never>;
|
|
17
|
+
}, "required", "ok" | "reason">;
|
|
18
|
+
/**
|
|
19
|
+
* Numeric length backstop applied inside the component. The client owns the full
|
|
20
|
+
* config (charset, reserved words); these bounds re-guard empty/oversized slugs
|
|
21
|
+
* at the trust boundary even if a caller bypasses the client class.
|
|
22
|
+
*/
|
|
23
|
+
export declare const lengthBounds: import("convex/values").VObject<{
|
|
24
|
+
minLength: number;
|
|
25
|
+
maxLength: number;
|
|
26
|
+
}, {
|
|
27
|
+
minLength: import("convex/values").VFloat64<number, "required">;
|
|
28
|
+
maxLength: import("convex/values").VFloat64<number, "required">;
|
|
29
|
+
}, "required", "minLength" | "maxLength">;
|
|
30
|
+
//# sourceMappingURL=validators.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validators.d.ts","sourceRoot":"","sources":["../../src/component/validators.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,eAAO,MAAM,UAAU,kXAKtB,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,aAAa;;;;;;+BAGxB,CAAC;AAEH;;;;GAIG;AACH,eAAO,MAAM,YAAY;;;;;;yCAGvB,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { v } from "convex/values";
|
|
2
|
+
/**
|
|
3
|
+
* Stable code-tag for a rejected slug write, as a Convex validator union. Kept
|
|
4
|
+
* in lockstep with the `SlugReason` string-literal union in `src/shared.ts`.
|
|
5
|
+
*/
|
|
6
|
+
export const slugReason = v.union(v.literal("SLUG_TAKEN"), v.literal("SLUG_NOT_FOUND"), v.literal("SLUG_INVALID"), v.literal("SLUG_RESERVED"));
|
|
7
|
+
/**
|
|
8
|
+
* Result of a write that may be rejected. `reason` carries a stable code-tag
|
|
9
|
+
* (one of {@link slugReason}) when `ok` is `false`, and is absent when `ok` is
|
|
10
|
+
* `true`.
|
|
11
|
+
*/
|
|
12
|
+
export const reserveResult = v.object({
|
|
13
|
+
ok: v.boolean(),
|
|
14
|
+
reason: v.optional(slugReason),
|
|
15
|
+
});
|
|
16
|
+
/**
|
|
17
|
+
* Numeric length backstop applied inside the component. The client owns the full
|
|
18
|
+
* config (charset, reserved words); these bounds re-guard empty/oversized slugs
|
|
19
|
+
* at the trust boundary even if a caller bypasses the client class.
|
|
20
|
+
*/
|
|
21
|
+
export const lengthBounds = v.object({
|
|
22
|
+
minLength: v.number(),
|
|
23
|
+
maxLength: v.number(),
|
|
24
|
+
});
|
|
25
|
+
//# sourceMappingURL=validators.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validators.js","sourceRoot":"","sources":["../../src/component/validators.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAElC;;;GAGG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAC/B,CAAC,CAAC,OAAO,CAAC,YAAY,CAAC,EACvB,CAAC,CAAC,OAAO,CAAC,gBAAgB,CAAC,EAC3B,CAAC,CAAC,OAAO,CAAC,cAAc,CAAC,EACzB,CAAC,CAAC,OAAO,CAAC,eAAe,CAAC,CAC3B,CAAC;AAEF;;;;GAIG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,CAAC,MAAM,CAAC;IACpC,EAAE,EAAE,CAAC,CAAC,OAAO,EAAE;IACf,MAAM,EAAE,CAAC,CAAC,QAAQ,CAAC,UAAU,CAAC;CAC/B,CAAC,CAAC;AAEH;;;;GAIG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,CAAC,MAAM,CAAC;IACnC,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;IACrB,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;CACtB,CAAC,CAAC"}
|
package/dist/log.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"log.d.ts","sourceRoot":"","sources":["../src/log.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAC7D,KAAK,KAAK,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;AAEvC,wBAAgB,GAAG,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAErF"}
|
package/dist/log.js
ADDED
package/dist/log.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"log.js","sourceRoot":"","sources":["../src/log.ts"],"names":[],"mappings":"AAGA,MAAM,UAAU,GAAG,CAAC,KAAY,EAAE,KAAa,EAAE,IAA8B;IAC7E,OAAO,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,KAAK,EAAE,GAAG,IAAI,EAAE,CAAC,CAAC,CAAC;AACrD,CAAC"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Optional, tree-shakeable React front-tooling for `@vllnt/convex-slugs`.
|
|
3
|
+
*
|
|
4
|
+
* Thin reactive hooks over `useQuery` from `convex/react`. Each hook takes the
|
|
5
|
+
* HOST's re-exported slug function reference plus its args — the component never
|
|
6
|
+
* imports the host `api`. `react` and `convex/react` are optional peer deps: a
|
|
7
|
+
* backend-only consumer pulls none of this code.
|
|
8
|
+
*/
|
|
9
|
+
import type { FunctionReference } from "convex/server";
|
|
10
|
+
/**
|
|
11
|
+
* Args accepted by the slug-resolving hooks: a slug plus an optional scope.
|
|
12
|
+
* Declared as a type alias (not an interface) so it satisfies Convex's
|
|
13
|
+
* `DefaultFunctionArgs` index-signature constraint on {@link ResolveRef}.
|
|
14
|
+
*/
|
|
15
|
+
type ResolveArgs = {
|
|
16
|
+
slug: string;
|
|
17
|
+
scope?: string;
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* The host's re-exported `resolve` query reference: takes `{ slug, scope? }`
|
|
21
|
+
* (the host forwards the optional scope to the client) and returns the holding
|
|
22
|
+
* `resourceRef`, or `null` when the slug is free.
|
|
23
|
+
*/
|
|
24
|
+
type ResolveRef = FunctionReference<"query", "public", ResolveArgs, string | null>;
|
|
25
|
+
/** Live handle-availability state for {@link useSlugAvailable}. */
|
|
26
|
+
interface SlugAvailability {
|
|
27
|
+
/** `true` when the slug is free, `false` when taken, `undefined` while loading. */
|
|
28
|
+
available: boolean | undefined;
|
|
29
|
+
/** The `resourceRef` holding the slug, or `null` when free / still loading. */
|
|
30
|
+
resourceRef: string | null;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Reactive handle-availability check — live "is this slug free?" UX. Wraps the
|
|
34
|
+
* host's re-exported `resolve` query: a slug is available exactly when `resolve`
|
|
35
|
+
* returns `null` (no holder).
|
|
36
|
+
*
|
|
37
|
+
* @param resolveRef - The host's re-exported slug `resolve` query reference.
|
|
38
|
+
* @param args - `{ slug, scope? }` the candidate slug and optional scope.
|
|
39
|
+
* @returns `{ available, resourceRef }`. `available` is `undefined` while the
|
|
40
|
+
* query loads, `true` when the slug is free, `false` when held; `resourceRef`
|
|
41
|
+
* is the current holder, or `null` when free or loading.
|
|
42
|
+
*/
|
|
43
|
+
export declare function useSlugAvailable(resolveRef: ResolveRef, args: ResolveArgs): SlugAvailability;
|
|
44
|
+
/**
|
|
45
|
+
* Reactive slug resolution — the `resourceRef` currently holding `slug`, or
|
|
46
|
+
* `null` when free. Wraps the host's re-exported `resolve` query.
|
|
47
|
+
*
|
|
48
|
+
* @param resolveRef - The host's re-exported slug `resolve` query reference.
|
|
49
|
+
* @param args - `{ slug, scope? }` the slug to resolve and optional scope.
|
|
50
|
+
* @returns The held `resourceRef`, `null` when the slug is free, or `undefined`
|
|
51
|
+
* while the query loads.
|
|
52
|
+
*/
|
|
53
|
+
export declare function useResolve(resolveRef: ResolveRef, args: ResolveArgs): string | null | undefined;
|
|
54
|
+
export {};
|
|
55
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/react/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAGvD;;;;GAIG;AACH,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF;;;;GAIG;AACH,KAAK,UAAU,GAAG,iBAAiB,CACjC,OAAO,EACP,QAAQ,EACR,WAAW,EACX,MAAM,GAAG,IAAI,CACd,CAAC;AAEF,mEAAmE;AACnE,UAAU,gBAAgB;IACxB,mFAAmF;IACnF,SAAS,EAAE,OAAO,GAAG,SAAS,CAAC;IAC/B,+EAA+E;IAC/E,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5B;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,gBAAgB,CAC9B,UAAU,EAAE,UAAU,EACtB,IAAI,EAAE,WAAW,GAChB,gBAAgB,CAMlB;AAED;;;;;;;;GAQG;AACH,wBAAgB,UAAU,CACxB,UAAU,EAAE,UAAU,EACtB,IAAI,EAAE,WAAW,GAChB,MAAM,GAAG,IAAI,GAAG,SAAS,CAE3B"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Optional, tree-shakeable React front-tooling for `@vllnt/convex-slugs`.
|
|
3
|
+
*
|
|
4
|
+
* Thin reactive hooks over `useQuery` from `convex/react`. Each hook takes the
|
|
5
|
+
* HOST's re-exported slug function reference plus its args — the component never
|
|
6
|
+
* imports the host `api`. `react` and `convex/react` are optional peer deps: a
|
|
7
|
+
* backend-only consumer pulls none of this code.
|
|
8
|
+
*/
|
|
9
|
+
import { useQuery } from "convex/react";
|
|
10
|
+
/**
|
|
11
|
+
* Reactive handle-availability check — live "is this slug free?" UX. Wraps the
|
|
12
|
+
* host's re-exported `resolve` query: a slug is available exactly when `resolve`
|
|
13
|
+
* returns `null` (no holder).
|
|
14
|
+
*
|
|
15
|
+
* @param resolveRef - The host's re-exported slug `resolve` query reference.
|
|
16
|
+
* @param args - `{ slug, scope? }` the candidate slug and optional scope.
|
|
17
|
+
* @returns `{ available, resourceRef }`. `available` is `undefined` while the
|
|
18
|
+
* query loads, `true` when the slug is free, `false` when held; `resourceRef`
|
|
19
|
+
* is the current holder, or `null` when free or loading.
|
|
20
|
+
*/
|
|
21
|
+
export function useSlugAvailable(resolveRef, args) {
|
|
22
|
+
const result = useQuery(resolveRef, args);
|
|
23
|
+
return {
|
|
24
|
+
available: result === undefined ? undefined : result === null,
|
|
25
|
+
resourceRef: result ?? null,
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Reactive slug resolution — the `resourceRef` currently holding `slug`, or
|
|
30
|
+
* `null` when free. Wraps the host's re-exported `resolve` query.
|
|
31
|
+
*
|
|
32
|
+
* @param resolveRef - The host's re-exported slug `resolve` query reference.
|
|
33
|
+
* @param args - `{ slug, scope? }` the slug to resolve and optional scope.
|
|
34
|
+
* @returns The held `resourceRef`, `null` when the slug is free, or `undefined`
|
|
35
|
+
* while the query loads.
|
|
36
|
+
*/
|
|
37
|
+
export function useResolve(resolveRef, args) {
|
|
38
|
+
return useQuery(resolveRef, args);
|
|
39
|
+
}
|
|
40
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/react/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAgCxC;;;;;;;;;;GAUG;AACH,MAAM,UAAU,gBAAgB,CAC9B,UAAsB,EACtB,IAAiB;IAEjB,MAAM,MAAM,GAAG,QAAQ,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC;IAC1C,OAAO;QACL,SAAS,EAAE,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,KAAK,IAAI;QAC7D,WAAW,EAAE,MAAM,IAAI,IAAI;KAC5B,CAAC;AACJ,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,UAAU,CACxB,UAAsB,EACtB,IAAiB;IAEjB,OAAO,QAAQ,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC;AACpC,CAAC"}
|
package/dist/shared.d.ts
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/** Shared constants + pure utilities used by both `client/` and `component/`. */
|
|
2
|
+
export declare const COMPONENT_NAME = "slugs";
|
|
3
|
+
/** Default namespace when the host does not scope a slug. */
|
|
4
|
+
export declare const DEFAULT_SCOPE = "global";
|
|
5
|
+
/** Default minimum slug length (after normalization). */
|
|
6
|
+
export declare const DEFAULT_MIN_LENGTH = 1;
|
|
7
|
+
/** Default maximum slug length (after normalization). */
|
|
8
|
+
export declare const DEFAULT_MAX_LENGTH = 256;
|
|
9
|
+
/** Opaque host-supplied resource reference. Never assume its shape or source. */
|
|
10
|
+
export type ResourceRef = string;
|
|
11
|
+
/** Stable code-tag for a rejected slug write. */
|
|
12
|
+
export type SlugReason = "SLUG_TAKEN" | "SLUG_NOT_FOUND" | "SLUG_INVALID" | "SLUG_RESERVED";
|
|
13
|
+
/**
|
|
14
|
+
* Resolved validation config (no optionals) — what {@link validateSlug} checks
|
|
15
|
+
* a normalized slug against.
|
|
16
|
+
*/
|
|
17
|
+
export interface SlugConstraints {
|
|
18
|
+
minLength: number;
|
|
19
|
+
maxLength: number;
|
|
20
|
+
pattern?: RegExp;
|
|
21
|
+
reservedWords: ReadonlyArray<string>;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Normalize a slug for storage/lookup. `foldCase` lowercases (the default —
|
|
25
|
+
* handles are case-insensitive); when false the raw case is preserved.
|
|
26
|
+
*
|
|
27
|
+
* Applies Unicode NFC normalization before trimming so visually-identical
|
|
28
|
+
* slugs with different compositions (e.g. precomposed vs. combining-character
|
|
29
|
+
* forms) are treated as the same string.
|
|
30
|
+
*
|
|
31
|
+
* @param slug - Raw, host-supplied slug.
|
|
32
|
+
* @param foldCase - Lowercase before comparison when `true`.
|
|
33
|
+
* @returns The NFC-normalized, trimmed (and optionally lowercased) slug.
|
|
34
|
+
*/
|
|
35
|
+
export declare function normalizeSlug(slug: string, foldCase: boolean): string;
|
|
36
|
+
/**
|
|
37
|
+
* Validate an already-normalized slug against {@link SlugConstraints}. Returns a
|
|
38
|
+
* {@link SlugReason} when the slug is rejected, or `null` when it is acceptable.
|
|
39
|
+
*
|
|
40
|
+
* Order: empty/length first (`SLUG_INVALID`), then charset (`SLUG_INVALID`),
|
|
41
|
+
* then reserved words (`SLUG_RESERVED`). Reserved-word matching is exact on the
|
|
42
|
+
* normalized form.
|
|
43
|
+
*
|
|
44
|
+
* @param slug - The normalized slug (output of {@link normalizeSlug}).
|
|
45
|
+
* @param c - Resolved validation constraints.
|
|
46
|
+
* @returns A rejection reason, or `null` when valid.
|
|
47
|
+
*/
|
|
48
|
+
export declare function validateSlug(slug: string, c: SlugConstraints): SlugReason | null;
|
|
49
|
+
//# sourceMappingURL=shared.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../src/shared.ts"],"names":[],"mappings":"AAAA,iFAAiF;AAEjF,eAAO,MAAM,cAAc,UAAU,CAAC;AAEtC,6DAA6D;AAC7D,eAAO,MAAM,aAAa,WAAW,CAAC;AAEtC,yDAAyD;AACzD,eAAO,MAAM,kBAAkB,IAAI,CAAC;AAEpC,yDAAyD;AACzD,eAAO,MAAM,kBAAkB,MAAM,CAAC;AAEtC,iFAAiF;AACjF,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC;AAEjC,iDAAiD;AACjD,MAAM,MAAM,UAAU,GAClB,YAAY,GACZ,gBAAgB,GAChB,cAAc,GACd,eAAe,CAAC;AAEpB;;;GAGG;AACH,MAAM,WAAW,eAAe;IAC9B,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;CACtC;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,GAAG,MAAM,CAGrE;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,CAAC,EAAE,eAAe,GAAG,UAAU,GAAG,IAAI,CAchF"}
|
package/dist/shared.js
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/** Shared constants + pure utilities used by both `client/` and `component/`. */
|
|
2
|
+
export const COMPONENT_NAME = "slugs";
|
|
3
|
+
/** Default namespace when the host does not scope a slug. */
|
|
4
|
+
export const DEFAULT_SCOPE = "global";
|
|
5
|
+
/** Default minimum slug length (after normalization). */
|
|
6
|
+
export const DEFAULT_MIN_LENGTH = 1;
|
|
7
|
+
/** Default maximum slug length (after normalization). */
|
|
8
|
+
export const DEFAULT_MAX_LENGTH = 256;
|
|
9
|
+
/**
|
|
10
|
+
* Normalize a slug for storage/lookup. `foldCase` lowercases (the default —
|
|
11
|
+
* handles are case-insensitive); when false the raw case is preserved.
|
|
12
|
+
*
|
|
13
|
+
* Applies Unicode NFC normalization before trimming so visually-identical
|
|
14
|
+
* slugs with different compositions (e.g. precomposed vs. combining-character
|
|
15
|
+
* forms) are treated as the same string.
|
|
16
|
+
*
|
|
17
|
+
* @param slug - Raw, host-supplied slug.
|
|
18
|
+
* @param foldCase - Lowercase before comparison when `true`.
|
|
19
|
+
* @returns The NFC-normalized, trimmed (and optionally lowercased) slug.
|
|
20
|
+
*/
|
|
21
|
+
export function normalizeSlug(slug, foldCase) {
|
|
22
|
+
const normalized = slug.normalize("NFC").trim();
|
|
23
|
+
return foldCase ? normalized.toLowerCase() : normalized;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Validate an already-normalized slug against {@link SlugConstraints}. Returns a
|
|
27
|
+
* {@link SlugReason} when the slug is rejected, or `null` when it is acceptable.
|
|
28
|
+
*
|
|
29
|
+
* Order: empty/length first (`SLUG_INVALID`), then charset (`SLUG_INVALID`),
|
|
30
|
+
* then reserved words (`SLUG_RESERVED`). Reserved-word matching is exact on the
|
|
31
|
+
* normalized form.
|
|
32
|
+
*
|
|
33
|
+
* @param slug - The normalized slug (output of {@link normalizeSlug}).
|
|
34
|
+
* @param c - Resolved validation constraints.
|
|
35
|
+
* @returns A rejection reason, or `null` when valid.
|
|
36
|
+
*/
|
|
37
|
+
export function validateSlug(slug, c) {
|
|
38
|
+
if (slug.length < Math.max(1, c.minLength)) {
|
|
39
|
+
return "SLUG_INVALID";
|
|
40
|
+
}
|
|
41
|
+
if (slug.length > c.maxLength) {
|
|
42
|
+
return "SLUG_INVALID";
|
|
43
|
+
}
|
|
44
|
+
if (c.pattern !== undefined && !c.pattern.test(slug)) {
|
|
45
|
+
return "SLUG_INVALID";
|
|
46
|
+
}
|
|
47
|
+
if (c.reservedWords.includes(slug)) {
|
|
48
|
+
return "SLUG_RESERVED";
|
|
49
|
+
}
|
|
50
|
+
return null;
|
|
51
|
+
}
|
|
52
|
+
//# sourceMappingURL=shared.js.map
|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}
|
package/package.json
ADDED
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@vllnt/convex-slugs",
|
|
3
|
+
"version": "0.1.0-canary.35a39c1",
|
|
4
|
+
"description": "Unique slug and handle registry with rename redirects, as a Convex component",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"packageManager": "pnpm@9.15.4",
|
|
8
|
+
"files": [
|
|
9
|
+
"dist",
|
|
10
|
+
"src"
|
|
11
|
+
],
|
|
12
|
+
"exports": {
|
|
13
|
+
"./package.json": "./package.json",
|
|
14
|
+
".": {
|
|
15
|
+
"types": "./dist/client/index.d.ts",
|
|
16
|
+
"default": "./dist/client/index.js"
|
|
17
|
+
},
|
|
18
|
+
"./react": {
|
|
19
|
+
"types": "./dist/react/index.d.ts",
|
|
20
|
+
"default": "./dist/react/index.js"
|
|
21
|
+
},
|
|
22
|
+
"./test": "./src/test.ts",
|
|
23
|
+
"./_generated/component.js": {
|
|
24
|
+
"types": "./dist/component/_generated/component.d.ts"
|
|
25
|
+
},
|
|
26
|
+
"./_generated/component": {
|
|
27
|
+
"types": "./dist/component/_generated/component.d.ts"
|
|
28
|
+
},
|
|
29
|
+
"./convex.config": {
|
|
30
|
+
"types": "./dist/component/convex.config.d.ts",
|
|
31
|
+
"default": "./dist/component/convex.config.js"
|
|
32
|
+
},
|
|
33
|
+
"./convex.config.js": {
|
|
34
|
+
"types": "./dist/component/convex.config.d.ts",
|
|
35
|
+
"default": "./dist/component/convex.config.js"
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
"types": "./dist/client/index.d.ts",
|
|
39
|
+
"module": "./dist/client/index.js",
|
|
40
|
+
"scripts": {
|
|
41
|
+
"build": "tsc --project ./tsconfig.build.json",
|
|
42
|
+
"build:codegen": "pnpm convex codegen --component-dir ./src/component && pnpm build",
|
|
43
|
+
"build:clean": "rm -rf dist *.tsbuildinfo && pnpm build:codegen",
|
|
44
|
+
"typecheck": "tsc --noEmit",
|
|
45
|
+
"typecheck:ci": "tsc --noEmit --project tsconfig.ci.json",
|
|
46
|
+
"lint": "eslint .",
|
|
47
|
+
"test": "vitest run --passWithNoTests",
|
|
48
|
+
"test:watch": "vitest --typecheck --clearScreen false",
|
|
49
|
+
"test:coverage": "vitest run --coverage --coverage.reporter=text",
|
|
50
|
+
"generate:llms": "node scripts/generate-llms.mjs",
|
|
51
|
+
"preversion": "pnpm install --frozen-lockfile && pnpm build && pnpm test:coverage && pnpm typecheck && pnpm generate:llms",
|
|
52
|
+
"prepublishOnly": "npm whoami || npm login",
|
|
53
|
+
"alpha": "npm version prerelease --preid alpha && npm publish --tag alpha && git push --follow-tags",
|
|
54
|
+
"release": "npm version patch && npm publish && git push --follow-tags"
|
|
55
|
+
},
|
|
56
|
+
"dependencies": {},
|
|
57
|
+
"peerDependencies": {
|
|
58
|
+
"convex": "^1.41.0",
|
|
59
|
+
"react": ">=18"
|
|
60
|
+
},
|
|
61
|
+
"devDependencies": {
|
|
62
|
+
"@edge-runtime/vm": "^5.0.0",
|
|
63
|
+
"@testing-library/react": "^16.3.2",
|
|
64
|
+
"@types/react": "^18.3.31",
|
|
65
|
+
"@types/react-dom": "^18.3.7",
|
|
66
|
+
"@vitest/coverage-v8": "^4.1.8",
|
|
67
|
+
"@vllnt/eslint-config": "^1.0.0",
|
|
68
|
+
"@vllnt/typescript": "^1.0.0",
|
|
69
|
+
"convex": "^1.41.0",
|
|
70
|
+
"convex-test": "^0.0.53",
|
|
71
|
+
"eslint": "^9.0.0",
|
|
72
|
+
"jsdom": "^29.1.1",
|
|
73
|
+
"prettier": "^3.4.0",
|
|
74
|
+
"react": "^18.3.0",
|
|
75
|
+
"react-dom": "^18.3.1",
|
|
76
|
+
"typescript": "^5.7.0",
|
|
77
|
+
"vitest": "^4.1.8"
|
|
78
|
+
},
|
|
79
|
+
"homepage": "https://github.com/vllnt/convex-slugs#readme",
|
|
80
|
+
"bugs": {
|
|
81
|
+
"url": "https://github.com/vllnt/convex-slugs/issues"
|
|
82
|
+
},
|
|
83
|
+
"author": {
|
|
84
|
+
"name": "bntvllnt",
|
|
85
|
+
"url": "https://bntvllnt.com"
|
|
86
|
+
},
|
|
87
|
+
"funding": {
|
|
88
|
+
"type": "github",
|
|
89
|
+
"url": "https://github.com/sponsors/bntvllnt"
|
|
90
|
+
},
|
|
91
|
+
"repository": {
|
|
92
|
+
"type": "git",
|
|
93
|
+
"url": "https://github.com/vllnt/convex-slugs"
|
|
94
|
+
},
|
|
95
|
+
"engines": {
|
|
96
|
+
"node": ">=18"
|
|
97
|
+
},
|
|
98
|
+
"publishConfig": {
|
|
99
|
+
"access": "public"
|
|
100
|
+
},
|
|
101
|
+
"sideEffects": false,
|
|
102
|
+
"keywords": [
|
|
103
|
+
"convex",
|
|
104
|
+
"convex-component",
|
|
105
|
+
"slugs"
|
|
106
|
+
],
|
|
107
|
+
"peerDependenciesMeta": {
|
|
108
|
+
"react": {
|
|
109
|
+
"optional": true
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}
|