@vedangiitb/qwintly-core 1.3.6 → 1.3.7

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.
@@ -22,7 +22,12 @@ export declare const projectConfigs: {
22
22
  readonly renderingConfig: {
23
23
  readonly approach: "config-driven UI rendering";
24
24
  readonly routeConventions: {
25
- readonly model: "Every route is driven by a colocated JSON config file.";
25
+ readonly model: "Routes mean URL paths (e.g. /about, /pricing) in a Next.js App Router app. Each URL route is implemented by a route folder under /app (e.g. app/about) and is driven by a colocated JSON config file.";
26
+ readonly definition: "In this repo, \"route\" always refers to the user-facing browser URL pathname, not an arbitrary file path.";
27
+ readonly examples: {
28
+ readonly urlRoutes: readonly ["/", "/about", "/pricing"];
29
+ readonly appRouterFolders: readonly ["app/page.tsx", "app/about/page.tsx", "app/pricing/page.tsx"];
30
+ };
26
31
  readonly filesPerRoute: readonly ["page.tsx", "pageConfig.json"];
27
32
  readonly sourceOfTruth: "pageConfig.json (edit this; page.tsx is a fixed renderer)";
28
33
  readonly configShape: {
@@ -32,6 +37,7 @@ export declare const projectConfigs: {
32
37
  };
33
38
  readonly note: "The page renders config.elements (array of BuilderElement).";
34
39
  };
40
+ readonly locationNote: "These files live inside the route folder (App Router convention). Example: for /about -> app/about/page.tsx and app/about/pageConfig.json.";
35
41
  };
36
42
  readonly pageRenderer: {
37
43
  readonly fileName: "page.tsx";
@@ -46,8 +52,8 @@ export declare const projectConfigs: {
46
52
  };
47
53
  };
48
54
  readonly generatorGuidance: {
49
- readonly do: readonly ["UI changes can happen only by editing the route's pageConfig.json elements tree.", "Use Tailwind in className; prefer composition via nested children."];
50
- readonly dont: readonly ["Do not change page.tsx structure for routes (it is a fixed renderer).", "Do not generate React components for layout; encode structure in JSON elements."];
55
+ readonly do: readonly ["Treat a route as a URL path (e.g. /about). Its code lives in the corresponding Next.js App Router folder (e.g. app/about).", "UI changes can happen only by editing that route folder's pageConfig.json elements tree.", "@/lib/renderer/RenderElement , @/types/elements already exist. No need to create them.", "When creating a new URL route (e.g. /pricing), create the App Router folder (e.g. app/pricing) with page.tsx (fixed renderer) + pageConfig.json (initial elements). After that, codegen should only modify pageConfig.json.", "Use Tailwind in className; prefer composition via nested children."];
56
+ readonly dont: readonly ["Do not confuse URL routes with file paths; do not invent 'routes' that are just filenames.", "Do not change page.tsx structure for URL routes (it is a fixed renderer).", "Do not generate React components for layout; encode structure in JSON elements."];
51
57
  };
52
58
  };
53
59
  };
@@ -1 +1 @@
1
- {"version":3,"file":"configs.constants.d.ts","sourceRoot":"","sources":["../../../src/indexer/data/configs.constants.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkFc,CAAC;AAE1C,eAAO,MAAM,QAAQ;;;;;;CAyBc,CAAC"}
1
+ {"version":3,"file":"configs.constants.d.ts","sourceRoot":"","sources":["../../../src/indexer/data/configs.constants.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+Fc,CAAC;AAE1C,eAAO,MAAM,QAAQ;;;;;;CAyBc,CAAC"}
@@ -22,7 +22,12 @@ export const projectConfigs = {
22
22
  renderingConfig: {
23
23
  approach: "config-driven UI rendering",
24
24
  routeConventions: {
25
- model: "Every route is driven by a colocated JSON config file.",
25
+ model: "Routes mean URL paths (e.g. /about, /pricing) in a Next.js App Router app. Each URL route is implemented by a route folder under /app (e.g. app/about) and is driven by a colocated JSON config file.",
26
+ definition: 'In this repo, "route" always refers to the user-facing browser URL pathname, not an arbitrary file path.',
27
+ examples: {
28
+ urlRoutes: ["/", "/about", "/pricing"],
29
+ appRouterFolders: ["app/page.tsx", "app/about/page.tsx", "app/pricing/page.tsx"],
30
+ },
26
31
  filesPerRoute: ["page.tsx", "pageConfig.json"],
27
32
  sourceOfTruth: "pageConfig.json (edit this; page.tsx is a fixed renderer)",
28
33
  configShape: {
@@ -30,6 +35,7 @@ export const projectConfigs = {
30
35
  root: { elements: "BuilderElement[]" },
31
36
  note: "The page renders config.elements (array of BuilderElement).",
32
37
  },
38
+ locationNote: "These files live inside the route folder (App Router convention). Example: for /about -> app/about/page.tsx and app/about/pageConfig.json.",
33
39
  },
34
40
  pageRenderer: {
35
41
  fileName: "page.tsx",
@@ -70,11 +76,15 @@ export default function Page() {
70
76
  },
71
77
  generatorGuidance: {
72
78
  do: [
73
- "UI changes can happen only by editing the route's pageConfig.json elements tree.",
79
+ "Treat a route as a URL path (e.g. /about). Its code lives in the corresponding Next.js App Router folder (e.g. app/about).",
80
+ "UI changes can happen only by editing that route folder's pageConfig.json elements tree.",
81
+ "@/lib/renderer/RenderElement , @/types/elements already exist. No need to create them.",
82
+ "When creating a new URL route (e.g. /pricing), create the App Router folder (e.g. app/pricing) with page.tsx (fixed renderer) + pageConfig.json (initial elements). After that, codegen should only modify pageConfig.json.",
74
83
  "Use Tailwind in className; prefer composition via nested children.",
75
84
  ],
76
85
  dont: [
77
- "Do not change page.tsx structure for routes (it is a fixed renderer).",
86
+ "Do not confuse URL routes with file paths; do not invent 'routes' that are just filenames.",
87
+ "Do not change page.tsx structure for URL routes (it is a fixed renderer).",
78
88
  "Do not generate React components for layout; encode structure in JSON elements.",
79
89
  ],
80
90
  },
@@ -1 +1 @@
1
- {"version":3,"file":"configs.constants.js","sourceRoot":"","sources":["../../../src/indexer/data/configs.constants.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,eAAe,EAAE;QACf,IAAI,EAAE,SAAS;QACf,MAAM,EAAE,YAAY;QACpB,QAAQ,EAAE,YAAY;QACtB,KAAK,EAAE,oBAAoB;QAC3B,OAAO,EAAE,cAAc;KACxB;IACD,aAAa,EAAE;QACb,MAAM,EAAE,eAAe;QACvB,aAAa,EAAE,UAAU;QACzB,SAAS,EAAE,UAAU;QACrB,YAAY,EA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AAE;QAClB,cAAc;QACd,OAAO;QACP,MAAM;QACN,OAAO;QACP,KAAK;QACL,UAAU;QACV,MAAM;KACP;IACD,YAAY,EAAE,MAAO;IACrB,SAAS,EAAE,GAAG;IACd,YAAY,EAAE,GAAG;CACgB,CAAC","sourcesContent":["import { ProjectConfigsConfig } from \"../../types/index/configs.types.js\";\nimport { IndexingConfig } from \"../../types/index/indexing.types.js\";\n\nexport const projectConfigs = {\n frameworkConfig: {\n name: \"Next.js\",\n router: \"App Router\",\n language: \"TypeScript\",\n icons: \"lucide-react icons\",\n styling: \"Tailwind CSS\",\n },\n runtimeConfig: {\n target: \"frontend-only\",\n serverActions: \"disabled\",\n apiRoutes: \"disabled\",\n dataFetching: \"client-side (fetch or mocked)\",\n },\n toolingConfig: {\n packageManager: \"npm\",\n linting: \"eslint\",\n formatting: \"prettier\",\n typecheck: \"tsc --noEmit\",\n testing: \"none\",\n },\n renderingConfig: {\n approach: \"config-driven UI rendering\",\n routeConventions: {\n model: \"Every route is driven by a colocated JSON config file.\",\n filesPerRoute: [\"page.tsx\", \"pageConfig.json\"],\n sourceOfTruth:\n \"pageConfig.json (edit this; page.tsx is a fixed renderer)\",\n configShape: {\n file: \"pageConfig.json\",\n root: { elements: \"BuilderElement[]\" },\n note: \"The page renders config.elements (array of BuilderElement).\",\n },\n },\n pageRenderer: {\n fileName: \"page.tsx\",\n behavior: [\n \"Imports pageConfig from ./pageConfig.json\",\n \"Casts config to { elements: BuilderElement[] }\",\n \"Renders: config.elements.map(el => <RenderElement key={el.id} el={el} />)\",\n ],\n canonicalSource: `import { RenderElement } from \"@/lib/renderer/RenderElement\";\nimport pageConfig from \"./pageConfig.json\";\nimport type { BuilderElement } from \"@/types/elements\";\n\nexport default function Page() {\n const config = pageConfig as { elements: BuilderElement[] };\n return config.elements.map((el) => <RenderElement key={el.id} el={el} />);\n}`,\n },\n elements: {\n typeName: \"BuilderElement\",\n supportedTypes: [\n \"fragment\",\n \"div\",\n \"text\",\n \"image\",\n \"button\",\n \"input\",\n \"textarea\",\n \"link\",\n \"icon\",\n ],\n rendering: {\n notes: [\n \"Unknown element types are warned and rendered as an error box.\",\n \"Elements support Tailwind-only styling via className.\",\n \"Elements may have children: BuilderElement[].\",\n ],\n },\n },\n generatorGuidance: {\n do: [\n \"UI changes can happen only by editing the route's pageConfig.json elements tree.\",\n \"Use Tailwind in className; prefer composition via nested children.\",\n ],\n dont: [\n \"Do not change page.tsx structure for routes (it is a fixed renderer).\",\n \"Do not generate React components for layout; encode structure in JSON elements.\",\n ],\n },\n },\n} as const satisfies ProjectConfigsConfig;\n\nexport const indexing = {\n includeExtensions: [\n \".ts\",\n \".tsx\",\n \".js\",\n \".jsx\",\n \".json\",\n \".md\",\n \".mdx\",\n \".css\",\n \".scss\",\n \".sass\",\n ],\n excludeDirectories: [\n \"node_modules\",\n \".next\",\n \"dist\",\n \"build\",\n \"out\",\n \"coverage\",\n \".git\",\n ],\n maxFileBytes: 200_000,\n chunkSize: 900,\n chunkOverlap: 150,\n} as const satisfies IndexingConfig;\n"]}
1
+ {"version":3,"file":"configs.constants.js","sourceRoot":"","sources":["../../../src/indexer/data/configs.constants.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,eAAe,EAAE;QACf,IAAI,EAAE,SAAS;QACf,MAAM,EAAE,YAAY;QACpB,QAAQ,EAAE,YAAY;QACtB,KAAK,EAAE,oBAAoB;QAC3B,OAAO,EAAE,cAAc;KACxB;IACD,aAAa,EAAE;QACb,MAAM,EAAE,eAAe;QACvB,aAAa,EAAE,UAAU;QACzB,SAAS,EAAE,UAAU;QACrB,YAAY,EAAE,+BAA+B;KAC9C;IACD,aAAa,EAAE;QACb,cAAc,EAAE,KAAK;QACrB,OAAO,EAAE,QAAQ;QACjB,UAAU,EAAE,UAAU;QACtB,SAAS,EAAE,cAAc;QACzB,OAAO,EAAE,MAAM;KAChB;IACD,eAAe,EAAE;QACf,QAAQ,EAAE,4BAA4B;QACtC,gB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,MAAM;QACN,MAAM;QACN,OAAO;QACP,OAAO;KACR;IACD,kBAAkB,EAAE;QAClB,cAAc;QACd,OAAO;QACP,MAAM;QACN,OAAO;QACP,KAAK;QACL,UAAU;QACV,MAAM;KACP;IACD,YAAY,EAAE,MAAO;IACrB,SAAS,EAAE,GAAG;IACd,YAAY,EAAE,GAAG;CACgB,CAAC","sourcesContent":["import { ProjectConfigsConfig } from \"../../types/index/configs.types.js\";\nimport { IndexingConfig } from \"../../types/index/indexing.types.js\";\n\nexport const projectConfigs = {\n frameworkConfig: {\n name: \"Next.js\",\n router: \"App Router\",\n language: \"TypeScript\",\n icons: \"lucide-react icons\",\n styling: \"Tailwind CSS\",\n },\n runtimeConfig: {\n target: \"frontend-only\",\n serverActions: \"disabled\",\n apiRoutes: \"disabled\",\n dataFetching: \"client-side (fetch or mocked)\",\n },\n toolingConfig: {\n packageManager: \"npm\",\n linting: \"eslint\",\n formatting: \"prettier\",\n typecheck: \"tsc --noEmit\",\n testing: \"none\",\n },\n renderingConfig: {\n approach: \"config-driven UI rendering\",\n routeConventions: {\n model:\n \"Routes mean URL paths (e.g. /about, /pricing) in a Next.js App Router app. Each URL route is implemented by a route folder under /app (e.g. app/about) and is driven by a colocated JSON config file.\",\n definition:\n 'In this repo, \"route\" always refers to the user-facing browser URL pathname, not an arbitrary file path.',\n examples: {\n urlRoutes: [\"/\", \"/about\", \"/pricing\"],\n appRouterFolders: [\"app/page.tsx\", \"app/about/page.tsx\", \"app/pricing/page.tsx\"],\n },\n filesPerRoute: [\"page.tsx\", \"pageConfig.json\"],\n sourceOfTruth:\n \"pageConfig.json (edit this; page.tsx is a fixed renderer)\",\n configShape: {\n file: \"pageConfig.json\",\n root: { elements: \"BuilderElement[]\" },\n note: \"The page renders config.elements (array of BuilderElement).\",\n },\n locationNote:\n \"These files live inside the route folder (App Router convention). Example: for /about -> app/about/page.tsx and app/about/pageConfig.json.\",\n },\n pageRenderer: {\n fileName: \"page.tsx\",\n behavior: [\n \"Imports pageConfig from ./pageConfig.json\",\n \"Casts config to { elements: BuilderElement[] }\",\n \"Renders: config.elements.map(el => <RenderElement key={el.id} el={el} />)\",\n ],\n canonicalSource: `import { RenderElement } from \"@/lib/renderer/RenderElement\";\nimport pageConfig from \"./pageConfig.json\";\nimport type { BuilderElement } from \"@/types/elements\";\n\nexport default function Page() {\n const config = pageConfig as { elements: BuilderElement[] };\n return config.elements.map((el) => <RenderElement key={el.id} el={el} />);\n}`,\n },\n elements: {\n typeName: \"BuilderElement\",\n supportedTypes: [\n \"fragment\",\n \"div\",\n \"text\",\n \"image\",\n \"button\",\n \"input\",\n \"textarea\",\n \"link\",\n \"icon\",\n ],\n rendering: {\n notes: [\n \"Unknown element types are warned and rendered as an error box.\",\n \"Elements support Tailwind-only styling via className.\",\n \"Elements may have children: BuilderElement[].\",\n ],\n },\n },\n generatorGuidance: {\n do: [\n \"Treat a route as a URL path (e.g. /about). Its code lives in the corresponding Next.js App Router folder (e.g. app/about).\",\n \"UI changes can happen only by editing that route folder's pageConfig.json elements tree.\",\n \"@/lib/renderer/RenderElement , @/types/elements already exist. No need to create them.\",\n \"When creating a new URL route (e.g. /pricing), create the App Router folder (e.g. app/pricing) with page.tsx (fixed renderer) + pageConfig.json (initial elements). After that, codegen should only modify pageConfig.json.\",\n \"Use Tailwind in className; prefer composition via nested children.\",\n ],\n dont: [\n \"Do not confuse URL routes with file paths; do not invent 'routes' that are just filenames.\",\n \"Do not change page.tsx structure for URL routes (it is a fixed renderer).\",\n \"Do not generate React components for layout; encode structure in JSON elements.\",\n ],\n },\n },\n} as const satisfies ProjectConfigsConfig;\n\nexport const indexing = {\n includeExtensions: [\n \".ts\",\n \".tsx\",\n \".js\",\n \".jsx\",\n \".json\",\n \".md\",\n \".mdx\",\n \".css\",\n \".scss\",\n \".sass\",\n ],\n excludeDirectories: [\n \"node_modules\",\n \".next\",\n \"dist\",\n \"build\",\n \"out\",\n \"coverage\",\n \".git\",\n ],\n maxFileBytes: 200_000,\n chunkSize: 900,\n chunkOverlap: 150,\n} as const satisfies IndexingConfig;\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vedangiitb/qwintly-core",
3
- "version": "1.3.6",
3
+ "version": "1.3.7",
4
4
  "description": "Qwintly Core",
5
5
  "homepage": "https://github.com/vedangiitb/qwintly-core#readme",
6
6
  "bugs": {