@veryfront/ext-css-tailwind 0.1.1186 → 0.1.1189

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/esm/deno.d.ts ADDED
@@ -0,0 +1,38 @@
1
+ declare namespace _default {
2
+ let name: string;
3
+ let version: string;
4
+ let exports: string;
5
+ namespace veryfront {
6
+ let extension: boolean;
7
+ let activation: string;
8
+ namespace contracts {
9
+ let provides: string[];
10
+ }
11
+ namespace npm {
12
+ let runtimeVersionFromManifest: boolean;
13
+ }
14
+ let capabilities: {
15
+ type: string;
16
+ }[];
17
+ }
18
+ let imports: {
19
+ "@tailwindcss/forms": string;
20
+ "@tailwindcss/typography": string;
21
+ daisyui: string;
22
+ "tailwind-scrollbar-hide": string;
23
+ tailwindcss: string;
24
+ "tailwindcss-animate": string;
25
+ "tailwindcss/index.css": string;
26
+ "tailwindcss/package.json": string;
27
+ "@std/assert": string;
28
+ "@std/testing/bdd": string;
29
+ "veryfront/extensions": string;
30
+ "veryfront/extensions/css": string;
31
+ "veryfront/errors": string;
32
+ };
33
+ namespace tasks {
34
+ let test: string;
35
+ }
36
+ }
37
+ export default _default;
38
+ //# sourceMappingURL=deno.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deno.d.ts","sourceRoot":"","sources":["../src/deno.js"],"names":[],"mappings":""}
package/esm/deno.js ADDED
@@ -0,0 +1,34 @@
1
+ export default {
2
+ "name": "@veryfront/ext-css-tailwind",
3
+ "version": "0.1.0",
4
+ "exports": "./src/index.ts",
5
+ "veryfront": {
6
+ "extension": true,
7
+ "activation": "explicit",
8
+ "contracts": {
9
+ "provides": ["CSSProcessor"]
10
+ },
11
+ "npm": {
12
+ "runtimeVersionFromManifest": true
13
+ },
14
+ "capabilities": [{ "type": "fs:read" }]
15
+ },
16
+ "imports": {
17
+ "@tailwindcss/forms": "npm:@tailwindcss/forms@0.5.11",
18
+ "@tailwindcss/typography": "npm:@tailwindcss/typography@0.5.19",
19
+ "daisyui": "npm:daisyui@5.5.14",
20
+ "tailwind-scrollbar-hide": "npm:tailwind-scrollbar-hide@2.0.0",
21
+ "tailwindcss": "npm:tailwindcss@4.2.2",
22
+ "tailwindcss-animate": "npm:tailwindcss-animate@1.0.7",
23
+ "tailwindcss/index.css": "npm:tailwindcss@4.2.2/index.css",
24
+ "tailwindcss/package.json": "npm:tailwindcss@4.2.2/package.json",
25
+ "@std/assert": "jsr:@std/assert@1.0.19",
26
+ "@std/testing/bdd": "jsr:@std/testing@1.0.17/bdd",
27
+ "veryfront/extensions": "../../src/extensions/index.ts",
28
+ "veryfront/extensions/css": "../../src/extensions/css/index.ts",
29
+ "veryfront/errors": "../../src/errors/index.ts"
30
+ },
31
+ "tasks": {
32
+ "test": "deno test --frozen --allow-read src/"
33
+ }
34
+ };
@@ -0,0 +1,14 @@
1
+ /** Tailwind CSS implementation of the provider-neutral CSSProcessor contract. */
2
+ import "../_dnt.polyfills.js";
3
+ import type { ExtensionFactory } from "veryfront/extensions";
4
+ import { type CSSCompiler, type CSSProcessor } from "veryfront/extensions/css";
5
+ export declare const TAILWIND_DEFAULT_STYLESHEET = "@import \"tailwindcss\";\n@plugin \"@tailwindcss/typography\";\n@custom-variant dark (&:is(.dark, [data-theme=\"dark\"]) *, &:is(.dark, [data-theme=\"dark\"]));";
6
+ export declare class TailwindCSSProcessor implements CSSProcessor {
7
+ readonly cacheIdentity: string;
8
+ readonly defaultStylesheet = "@import \"tailwindcss\";\n@plugin \"@tailwindcss/typography\";\n@custom-variant dark (&:is(.dark, [data-theme=\"dark\"]) *, &:is(.dark, [data-theme=\"dark\"]));";
9
+ constructor();
10
+ compile(stylesheet: string): Promise<CSSCompiler>;
11
+ }
12
+ declare const extTailwind: ExtensionFactory;
13
+ export default extTailwind;
14
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/src/index.ts"],"names":[],"mappings":"AAAA,iFAAiF;AACjF,OAAO,sBAAsB,CAAC;AAO9B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,EAAE,KAAK,WAAW,EAAE,KAAK,YAAY,EAAoB,MAAM,0BAA0B,CAAC;AAoBjG,eAAO,MAAM,2BAA2B,qKAEqD,CAAC;AAqD9F,qBAAa,oBAAqB,YAAW,YAAY;IACvD,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,iBAAiB,sKAA+B;;IAenD,OAAO,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC;CA2CxD;AAKD,QAAA,MAAM,WAAW,EAAE,gBAYlB,CAAC;AAEF,eAAe,WAAW,CAAC"}
@@ -0,0 +1,150 @@
1
+ /** Tailwind CSS implementation of the provider-neutral CSSProcessor contract. */
2
+ import "../_dnt.polyfills.js";
3
+ import { createHash } from "node:crypto";
4
+ import { readFileSync } from "node:fs";
5
+ import { createRequire } from "node:module";
6
+ import { isProxy as isProxyWithoutHooks } from "node:util/types";
7
+ import { CSSProcessorName } from "veryfront/extensions/css";
8
+ import { IMPORT_RESOLUTION_ERROR } from "veryfront/errors";
9
+ import { compile } from "tailwindcss";
10
+ import extensionPackage from "../deno.js";
11
+ import { exactTailwindVersion } from "./manifest-dependency.js";
12
+ import { loadPlugin } from "./plugin-loader.js";
13
+ import { TAILWIND_PLUGIN_POLICY_IDENTITY } from "./plugin-policy.js";
14
+ const ENGINE_SEMANTICS_VERSION = "veryfront.css-tailwind.v4";
15
+ const apply = Reflect.apply;
16
+ const arrayJoin = Array.prototype.join;
17
+ const freeze = Object.freeze;
18
+ const getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
19
+ const getOwnPropertyDescriptors = Object.getOwnPropertyDescriptors;
20
+ const getPrototypeOf = Object.getPrototypeOf;
21
+ const isArray = Array.isArray;
22
+ const objectPrototype = Object.prototype;
23
+ const ownKeys = Reflect.ownKeys;
24
+ const requireFromExtension = createRequire(globalThis[Symbol.for("import-meta-ponyfill-esmodule")](import.meta).url);
25
+ const tailwindVersion = exactTailwindVersion(extensionPackage.imports.tailwindcss);
26
+ export const TAILWIND_DEFAULT_STYLESHEET = `@import "tailwindcss";
27
+ @plugin "@tailwindcss/typography";
28
+ @custom-variant dark (&:is(.dark, [data-theme="dark"]) *, &:is(.dark, [data-theme="dark"]));`;
29
+ function sha256(value) {
30
+ return createHash("sha256").update(value, "utf8").digest("hex");
31
+ }
32
+ function loadTailwindBaseStylesheet() {
33
+ let resolved;
34
+ try {
35
+ resolved = requireFromExtension.resolve("tailwindcss/index.css");
36
+ }
37
+ catch (cause) {
38
+ throw IMPORT_RESOLUTION_ERROR.create({
39
+ detail: "ext-css-tailwind could not resolve its pinned base stylesheet",
40
+ cause,
41
+ });
42
+ }
43
+ try {
44
+ return readFileSync(resolved, "utf8");
45
+ }
46
+ catch (cause) {
47
+ throw IMPORT_RESOLUTION_ERROR.create({
48
+ detail: `ext-css-tailwind could not read its pinned base stylesheet: ${resolved}`,
49
+ cause,
50
+ });
51
+ }
52
+ }
53
+ const tailwindBaseStylesheet = loadTailwindBaseStylesheet();
54
+ function assertEmptyConfig(value) {
55
+ if (value === undefined)
56
+ return;
57
+ if (typeof value !== "object" ||
58
+ value === null ||
59
+ isArray(value) ||
60
+ isProxyWithoutHooks(value)) {
61
+ throw new TypeError("ext-css-tailwind config must be an object");
62
+ }
63
+ let prototype;
64
+ let keys;
65
+ try {
66
+ prototype = getPrototypeOf(value);
67
+ keys = ownKeys(getOwnPropertyDescriptors(value));
68
+ }
69
+ catch (cause) {
70
+ throw new TypeError("ext-css-tailwind config could not be inspected", { cause });
71
+ }
72
+ if (prototype !== objectPrototype && prototype !== null) {
73
+ throw new TypeError("ext-css-tailwind config must not inherit configuration");
74
+ }
75
+ if (keys.length !== 0) {
76
+ throw new TypeError("ext-css-tailwind does not accept configuration properties");
77
+ }
78
+ }
79
+ export class TailwindCSSProcessor {
80
+ cacheIdentity;
81
+ defaultStylesheet = TAILWIND_DEFAULT_STYLESHEET;
82
+ constructor() {
83
+ const identityParts = [
84
+ ENGINE_SEMANTICS_VERSION,
85
+ `ext-css-tailwind@${extensionPackage.version}`,
86
+ `tailwindcss@${tailwindVersion}`,
87
+ `base=${sha256(tailwindBaseStylesheet)}`,
88
+ `default=${sha256(this.defaultStylesheet)}`,
89
+ `plugins=${sha256(TAILWIND_PLUGIN_POLICY_IDENTITY)}`,
90
+ ];
91
+ this.cacheIdentity = apply(arrayJoin, identityParts, [";"]);
92
+ freeze(this);
93
+ }
94
+ async compile(stylesheet) {
95
+ if (typeof stylesheet !== "string") {
96
+ throw new TypeError("ext-css-tailwind stylesheet must be a string");
97
+ }
98
+ const native = await compile(stylesheet, {
99
+ base: "/",
100
+ loadStylesheet: (id) => {
101
+ if (id !== "tailwindcss") {
102
+ throw IMPORT_RESOLUTION_ERROR.create({
103
+ detail: `ext-css-tailwind cannot resolve stylesheet import "${id}"`,
104
+ });
105
+ }
106
+ return Promise.resolve({
107
+ content: tailwindBaseStylesheet,
108
+ base: "/",
109
+ path: "/tailwindcss/index.css",
110
+ });
111
+ },
112
+ loadModule: (id) => Promise.resolve({
113
+ // deno-lint-ignore no-explicit-any -- Tailwind's vendor API accepts opaque plugin modules.
114
+ module: loadPlugin(id),
115
+ base: "/",
116
+ path: "/",
117
+ }),
118
+ });
119
+ const buildDescriptor = getOwnPropertyDescriptor(native, "build");
120
+ if (buildDescriptor === undefined ||
121
+ !("value" in buildDescriptor) ||
122
+ typeof buildDescriptor.value !== "function") {
123
+ throw IMPORT_RESOLUTION_ERROR.create({
124
+ detail: "ext-css-tailwind compiler did not expose a stable build method",
125
+ });
126
+ }
127
+ const nativeBuild = buildDescriptor.value;
128
+ return freeze({
129
+ build(candidates) {
130
+ return apply(nativeBuild, native, [candidates]);
131
+ },
132
+ });
133
+ }
134
+ }
135
+ freeze(TailwindCSSProcessor.prototype);
136
+ freeze(TailwindCSSProcessor);
137
+ const extTailwind = (config) => {
138
+ assertEmptyConfig(config);
139
+ return {
140
+ name: "ext-css-tailwind",
141
+ version: extensionPackage.version,
142
+ contracts: { provides: [CSSProcessorName] },
143
+ capabilities: [{ type: "fs:read" }],
144
+ setup(ctx) {
145
+ ctx.provide(CSSProcessorName, new TailwindCSSProcessor());
146
+ ctx.logger.debug(`[ext-css-tailwind] ${CSSProcessorName} registered`);
147
+ },
148
+ };
149
+ };
150
+ export default extTailwind;
@@ -0,0 +1,3 @@
1
+ /** Resolve Tailwind's exact version from this extension's checked-in manifest. */
2
+ export declare function exactTailwindVersion(specifier: unknown): string;
3
+ //# sourceMappingURL=manifest-dependency.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"manifest-dependency.d.ts","sourceRoot":"","sources":["../../src/src/manifest-dependency.ts"],"names":[],"mappings":"AAAA,kFAAkF;AAMlF,wBAAgB,oBAAoB,CAAC,SAAS,EAAE,OAAO,GAAG,MAAM,CAc/D"}
@@ -0,0 +1,13 @@
1
+ /** Resolve Tailwind's exact version from this extension's checked-in manifest. */
2
+ const TAILWIND_NPM_PREFIX = "npm:tailwindcss@";
3
+ const EXACT_SEMVER_PATTERN = /^(?:0|[1-9]\d*)\.(?:0|[1-9]\d*)\.(?:0|[1-9]\d*)(?:-(?:(?:0|[1-9]\d*)|\d*[A-Za-z-][0-9A-Za-z-]*)(?:\.(?:(?:0|[1-9]\d*)|\d*[A-Za-z-][0-9A-Za-z-]*))*)?(?:\+[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?$/;
4
+ export function exactTailwindVersion(specifier) {
5
+ if (typeof specifier !== "string" || !specifier.startsWith(TAILWIND_NPM_PREFIX)) {
6
+ throw new TypeError("ext-css-tailwind imports.tailwindcss must target npm:tailwindcss at an exact semantic version");
7
+ }
8
+ const version = specifier.slice(TAILWIND_NPM_PREFIX.length);
9
+ if (!EXACT_SEMVER_PATTERN.test(version)) {
10
+ throw new TypeError("ext-css-tailwind imports.tailwindcss must use an exact semantic version without a range or subpath");
11
+ }
12
+ return version;
13
+ }
@@ -0,0 +1,7 @@
1
+ /** Static plugin loading owned entirely by ext-css-tailwind. */
2
+ /**
3
+ * Resolve an audited plugin from the extension's immutable local registry.
4
+ * Unknown packages and version overrides fail before Tailwind receives a value.
5
+ */
6
+ export declare function loadPlugin(id: string): unknown;
7
+ //# sourceMappingURL=plugin-loader.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin-loader.d.ts","sourceRoot":"","sources":["../../src/src/plugin-loader.ts"],"names":[],"mappings":"AAAA,gEAAgE;AAsEhE;;;GAGG;AACH,wBAAgB,UAAU,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAK9C"}
@@ -0,0 +1,68 @@
1
+ /** Static plugin loading owned entirely by ext-css-tailwind. */
2
+ import forms from "@tailwindcss/forms";
3
+ import typography from "@tailwindcss/typography";
4
+ import daisyui from "daisyui";
5
+ import scrollbarHide from "tailwind-scrollbar-hide";
6
+ import tailwindcssAnimate from "tailwindcss-animate";
7
+ import { IMPORT_RESOLUTION_ERROR, SECURITY_VIOLATION } from "veryfront/errors";
8
+ import { bareName, resolveTailwindPluginPolicy, TAILWIND_PLUGIN_ALLOWLIST, } from "./plugin-policy.js";
9
+ function getStaticPlugin(name) {
10
+ switch (name) {
11
+ case "@tailwindcss/forms":
12
+ return forms;
13
+ case "@tailwindcss/typography":
14
+ return typography;
15
+ case "daisyui":
16
+ return daisyui;
17
+ case "tailwind-scrollbar-hide":
18
+ return scrollbarHide;
19
+ case "tailwindcss-animate":
20
+ return tailwindcssAnimate;
21
+ default:
22
+ throw IMPORT_RESOLUTION_ERROR.create({
23
+ detail: `Tailwind plugin "${name}" is absent from the static extension registry`,
24
+ });
25
+ }
26
+ }
27
+ function requirePinnedPlugin(specifier) {
28
+ try {
29
+ return resolveTailwindPluginPolicy(specifier).name;
30
+ }
31
+ catch (cause) {
32
+ const displayName = typeof specifier === "string" ? bareName(specifier) : "<non-string>";
33
+ throw SECURITY_VIOLATION.create({
34
+ detail: `Package "${displayName}" is not an audited ext-css-tailwind plugin`,
35
+ cause,
36
+ });
37
+ }
38
+ }
39
+ function assertStaticPlugin(name, value) {
40
+ if (typeof value !== "function" &&
41
+ (typeof value !== "object" || value === null)) {
42
+ throw IMPORT_RESOLUTION_ERROR.create({
43
+ detail: `Tailwind plugin "${name}" did not export a plugin value`,
44
+ });
45
+ }
46
+ }
47
+ function assertCompleteStaticRegistry() {
48
+ for (let index = 0; index < TAILWIND_PLUGIN_ALLOWLIST.length; index++) {
49
+ const name = TAILWIND_PLUGIN_ALLOWLIST[index];
50
+ if (name === undefined) {
51
+ throw IMPORT_RESOLUTION_ERROR.create({
52
+ detail: "ext-css-tailwind plugin policy contains an invalid entry",
53
+ });
54
+ }
55
+ assertStaticPlugin(name, getStaticPlugin(name));
56
+ }
57
+ }
58
+ assertCompleteStaticRegistry();
59
+ /**
60
+ * Resolve an audited plugin from the extension's immutable local registry.
61
+ * Unknown packages and version overrides fail before Tailwind receives a value.
62
+ */
63
+ export function loadPlugin(id) {
64
+ const name = requirePinnedPlugin(id);
65
+ const plugin = getStaticPlugin(name);
66
+ assertStaticPlugin(name, plugin);
67
+ return plugin;
68
+ }
@@ -0,0 +1,24 @@
1
+ /** Audited local plugin policy owned by ext-css-tailwind. */
2
+ export type TailwindPluginPolicyEntry = Readonly<{
3
+ name: string;
4
+ version: string;
5
+ importSpecifier: string;
6
+ npmSpecifier: string;
7
+ }>;
8
+ /**
9
+ * Complete immutable inventory of third-party plugin implementations shipped
10
+ * by this extension. Each entry must have a matching exact import-map target
11
+ * and a static import in `plugin-loader.ts`.
12
+ */
13
+ export declare const TAILWIND_PLUGIN_POLICY: readonly Readonly<{
14
+ name: string;
15
+ version: string;
16
+ importSpecifier: string;
17
+ npmSpecifier: string;
18
+ }>[];
19
+ export declare const PACKAGE_SPEC_RE: Readonly<RegExp>;
20
+ export declare function bareName(specifier: string): string;
21
+ export declare const TAILWIND_PLUGIN_ALLOWLIST: readonly string[];
22
+ export declare function resolveTailwindPluginPolicy(specifier: string): TailwindPluginPolicyEntry;
23
+ export declare const TAILWIND_PLUGIN_POLICY_IDENTITY: string;
24
+ //# sourceMappingURL=plugin-policy.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin-policy.d.ts","sourceRoot":"","sources":["../../src/src/plugin-policy.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAE7D,MAAM,MAAM,yBAAyB,GAAG,QAAQ,CAAC;IAC/C,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,eAAe,EAAE,MAAM,CAAC;IACxB,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC,CAAC;AA2BH;;;;GAIG;AACH,eAAO,MAAM,sBAAsB;UApC3B,MAAM;aACH,MAAM;qBACE,MAAM;kBACT,MAAM;IAuCpB,CAAC;AAEH,eAAO,MAAM,eAAe,kBAE3B,CAAC;AAEF,wBAAgB,QAAQ,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAUlD;AAaD,eAAO,MAAM,yBAAyB,mBAAoB,CAAC;AAE3D,wBAAgB,2BAA2B,CACzC,SAAS,EAAE,MAAM,GAChB,yBAAyB,CAqB3B;AAsBD,eAAO,MAAM,+BAA+B,EAIrC,MAAM,CAAC"}
@@ -0,0 +1,86 @@
1
+ /** Audited local plugin policy owned by ext-css-tailwind. */
2
+ const apply = Reflect.apply;
3
+ const MapConstructor = Map;
4
+ const NativeTypeError = TypeError;
5
+ const arrayMap = Array.prototype.map;
6
+ const arraySort = Array.prototype.sort;
7
+ const freeze = Object.freeze;
8
+ const jsonStringify = JSON.stringify;
9
+ const mapGet = Map.prototype.get;
10
+ const regexpExec = RegExp.prototype.exec;
11
+ const stringIndexOf = String.prototype.indexOf;
12
+ const stringSlice = String.prototype.slice;
13
+ const stringStartsWith = String.prototype.startsWith;
14
+ function definePlugin(name, version) {
15
+ return freeze({
16
+ name,
17
+ version,
18
+ importSpecifier: name,
19
+ npmSpecifier: `npm:${name}@${version}`,
20
+ });
21
+ }
22
+ /**
23
+ * Complete immutable inventory of third-party plugin implementations shipped
24
+ * by this extension. Each entry must have a matching exact import-map target
25
+ * and a static import in `plugin-loader.ts`.
26
+ */
27
+ export const TAILWIND_PLUGIN_POLICY = freeze([
28
+ definePlugin("tailwindcss-animate", "1.0.7"),
29
+ definePlugin("@tailwindcss/typography", "0.5.19"),
30
+ definePlugin("@tailwindcss/forms", "0.5.11"),
31
+ definePlugin("tailwind-scrollbar-hide", "2.0.0"),
32
+ definePlugin("daisyui", "5.5.14"),
33
+ ]);
34
+ export const PACKAGE_SPEC_RE = freeze(/^(?:@[a-z0-9][\w.-]*\/)?[a-z0-9][\w.-]*(?:@[\w.+-]+)?$/);
35
+ export function bareName(specifier) {
36
+ if (typeof specifier !== "string") {
37
+ throw new NativeTypeError("Tailwind plugin specifier must be a string");
38
+ }
39
+ if (apply(stringStartsWith, specifier, ["@"])) {
40
+ const index = apply(stringIndexOf, specifier, ["@", 1]);
41
+ return index === -1 ? specifier : apply(stringSlice, specifier, [0, index]);
42
+ }
43
+ const index = apply(stringIndexOf, specifier, ["@"]);
44
+ return index === -1 ? specifier : apply(stringSlice, specifier, [0, index]);
45
+ }
46
+ const POLICY_BY_NAME = new MapConstructor(apply(arrayMap, TAILWIND_PLUGIN_POLICY, [
47
+ (entry) => [entry.name, entry],
48
+ ]));
49
+ /** Immutable public view of the packages this extension can load. */
50
+ const allowlist = apply(arrayMap, TAILWIND_PLUGIN_POLICY, [
51
+ (entry) => entry.name,
52
+ ]);
53
+ apply(arraySort, allowlist, []);
54
+ export const TAILWIND_PLUGIN_ALLOWLIST = freeze(allowlist);
55
+ export function resolveTailwindPluginPolicy(specifier) {
56
+ if (typeof specifier !== "string" ||
57
+ apply(regexpExec, PACKAGE_SPEC_RE, [specifier]) === null) {
58
+ throw new NativeTypeError(`Invalid Tailwind plugin specifier: ${specifier}`);
59
+ }
60
+ const name = bareName(specifier);
61
+ const policy = apply(mapGet, POLICY_BY_NAME, [name]);
62
+ if (policy === undefined) {
63
+ throw new NativeTypeError(`Tailwind plugin is not allowlisted: ${name}`);
64
+ }
65
+ const pinnedSpecifier = `${policy.name}@${policy.version}`;
66
+ if (specifier !== name && specifier !== pinnedSpecifier) {
67
+ throw new NativeTypeError(`Tailwind plugin ${name} must use the audited version ${pinnedSpecifier}`);
68
+ }
69
+ return policy;
70
+ }
71
+ const identityPlugins = apply(arrayMap, TAILWIND_PLUGIN_POLICY, [
72
+ (entry) => ({
73
+ name: entry.name,
74
+ version: entry.version,
75
+ importSpecifier: entry.importSpecifier,
76
+ npmSpecifier: entry.npmSpecifier,
77
+ }),
78
+ ]);
79
+ apply(arraySort, identityPlugins, [
80
+ (left, right) => left.name < right.name ? -1 : left.name > right.name ? 1 : 0,
81
+ ]);
82
+ export const TAILWIND_PLUGIN_POLICY_IDENTITY = apply(jsonStringify, JSON, [{
83
+ schema: "veryfront.tailwind-plugin-policy.v3",
84
+ resolution: "extension-owned-static-npm-imports",
85
+ plugins: identityPlugins,
86
+ }]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@veryfront/ext-css-tailwind",
3
- "version": "0.1.1186",
3
+ "version": "0.1.1189",
4
4
  "description": "Veryfront first-party extension package for ext-css-tailwind",
5
5
  "keywords": [
6
6
  "veryfront",
@@ -27,7 +27,7 @@
27
27
  },
28
28
  "scripts": {},
29
29
  "engines": {
30
- "node": ">=18.0.0"
30
+ "node": ">=22.3.0"
31
31
  },
32
32
  "publishConfig": {
33
33
  "access": "public"
@@ -58,7 +58,7 @@
58
58
  "tailwindcss-animate": "1.0.7"
59
59
  },
60
60
  "peerDependencies": {
61
- "veryfront": "^0.1.1186"
61
+ "veryfront": "^0.1.1189"
62
62
  },
63
63
  "type": "module",
64
64
  "types": "./esm/src/index.d.ts",