lincd-cli 1.2.7 → 1.2.9
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/defaults/app-with-backend/.husky/pre-commit +0 -0
- package/defaults/app-with-backend/.yarn/releases/yarn-3.6.1.cjs +0 -0
- package/lib/cjs/cli-methods.d.ts.map +1 -1
- package/lib/cjs/cli-methods.js +84 -19
- package/lib/cjs/cli-methods.js.map +1 -1
- package/lib/cjs/cli.d.ts.map +1 -1
- package/lib/cjs/cli.js +21 -7
- package/lib/cjs/cli.js.map +1 -1
- package/lib/cjs/package.json +5 -5
- package/lib/cjs/utils.d.ts.map +1 -1
- package/lib/cjs/utils.js +2 -0
- package/lib/cjs/utils.js.map +1 -1
- package/lib/esm/cli-methods.d.ts.map +1 -1
- package/lib/esm/cli-methods.js +83 -19
- package/lib/esm/cli-methods.js.map +1 -1
- package/lib/esm/cli.d.ts.map +1 -1
- package/lib/esm/cli.js +22 -8
- package/lib/esm/cli.js.map +1 -1
- package/lib/esm/package.json +5 -5
- package/lib/esm/utils.d.ts.map +1 -1
- package/lib/esm/utils.js +2 -0
- package/lib/esm/utils.js.map +1 -1
- package/package.json +6 -6
- package/defaults/app-static/src/index-static.tsx +0 -22
- package/defaults/app-with-backend/src/App.module.css +0 -17
- package/defaults/app-with-backend/src/App.tsx +0 -30
- package/defaults/app-with-backend/src/backend.ts +0 -9
- package/defaults/app-with-backend/src/components/Error.module.css +0 -9
- package/defaults/app-with-backend/src/components/Error.tsx +0 -11
- package/defaults/app-with-backend/src/components/Spinner.module.css +0 -17
- package/defaults/app-with-backend/src/components/Spinner.tsx +0 -12
- package/defaults/app-with-backend/src/config-frontend.ts +0 -17
- package/defaults/app-with-backend/src/index.tsx +0 -34
- package/defaults/app-with-backend/src/layout/DefaultLayout.module.css +0 -12
- package/defaults/app-with-backend/src/layout/DefaultLayout.tsx +0 -12
- package/defaults/app-with-backend/src/layout/Header.module.css +0 -25
- package/defaults/app-with-backend/src/layout/Header.tsx +0 -27
- package/defaults/app-with-backend/src/package.ts +0 -12
- package/defaults/app-with-backend/src/pages/Home.module.css +0 -15
- package/defaults/app-with-backend/src/pages/Home.tsx +0 -21
- package/defaults/app-with-backend/src/pages/Page1.tsx +0 -11
- package/defaults/app-with-backend/src/pages/PageNotFound.tsx +0 -12
- package/defaults/app-with-backend/src/pages/Signin.tsx +0 -12
- package/defaults/app-with-backend/src/routes.tsx +0 -85
- package/defaults/app-with-backend/src/theme.css +0 -95
- package/defaults/app-with-backend/src/types.ts +0 -14
- package/defaults/app-with-backend/src/utils/lazyWithPreload.tsx +0 -42
- package/defaults/app-with-backend/src/utils/preloadRoutes.ts +0 -38
- package/defaults/app-with-backend/tsconfig.json +0 -24
- package/defaults/package/src/backend.ts +0 -2
- package/defaults/package/src/data/example-ontology.json +0 -10
- package/defaults/package/src/data/example-ontology.json.d.ts +0 -1
- package/defaults/package/src/index.ts +0 -8
- package/defaults/package/src/ontologies/example-ontology.ts +0 -43
- package/defaults/package/src/package.ts +0 -13
- package/defaults/package/src/types.ts +0 -4
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
@import 'tailwindcss';
|
|
2
|
-
/*apply tailwind config, which ensures that all LINCD components are considered "content" for tailwind */
|
|
3
|
-
@config "../node_modules/lincd-cli/lib/esm/tailwind.config.js";
|
|
4
|
-
|
|
5
|
-
/*Use this to generate ALL css variables */
|
|
6
|
-
/*@theme static {*/
|
|
7
|
-
/* --*: initial;*/
|
|
8
|
-
/*--color-primary: var(--color-red-500);*/
|
|
9
|
-
/*--color-secondary: var(--color-blue-500);*/
|
|
10
|
-
/*}*/
|
|
11
|
-
|
|
12
|
-
/*for theme variables, see https://github.com/tailwindlabs/tailwindcss/blob/main/packages/tailwindcss/theme.css*/
|
|
13
|
-
|
|
14
|
-
/*@use 'todomvc-app-css/index.css';*/
|
|
15
|
-
/*@use 'todomvc-common/base.css';*/
|
|
16
|
-
|
|
17
|
-
/*LINCD uses tailwind for creating themes, see https://tailwindcss.com/docs/theme#what-are-theme-variables */
|
|
18
|
-
/*@theme {*/
|
|
19
|
-
/* --font-sans: ui-sans-serif, system-ui, sans-serif, 'Apple Color Emoji',*/
|
|
20
|
-
/* 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';*/
|
|
21
|
-
/* --font-serif: ui-serif, Georgia, Cambria, 'Times New Roman', Times, serif;*/
|
|
22
|
-
/* --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,*/
|
|
23
|
-
/* 'Liberation Mono', 'Courier New', monospace;*/
|
|
24
|
-
/*}*/
|
|
25
|
-
|
|
26
|
-
@theme {
|
|
27
|
-
/* Primary Palette mapped to Tailwind sky */
|
|
28
|
-
--color-primary-50: var(--color-sky-50);
|
|
29
|
-
--color-primary-100: var(--color-sky-100);
|
|
30
|
-
--color-primary-200: var(--color-sky-200);
|
|
31
|
-
--color-primary-300: var(--color-sky-300);
|
|
32
|
-
--color-primary-400: var(--color-sky-400);
|
|
33
|
-
--color-primary-500: var(--color-sky-500);
|
|
34
|
-
--color-primary-600: var(--color-sky-600);
|
|
35
|
-
--color-primary-700: var(--color-sky-700);
|
|
36
|
-
--color-primary-800: var(--color-sky-800);
|
|
37
|
-
--color-primary-900: var(--color-sky-900);
|
|
38
|
-
|
|
39
|
-
/* === Shadows === */
|
|
40
|
-
--shadow-surface: var(--shadow-sm); /* Background panels, sections */
|
|
41
|
-
--shadow-card: var(--shadow-md); /* Cards, organized content blocks */
|
|
42
|
-
--shadow-popover: var(--shadow-lg); /* Tooltips, dropdowns, popovers */
|
|
43
|
-
--shadow-modal: var(--shadow-2xl); /* Modals, overlays */
|
|
44
|
-
--shadow-floating-action: var(
|
|
45
|
-
--shadow-lg
|
|
46
|
-
); /* Floating buttons, floating toolbars */
|
|
47
|
-
--shadow-content: none; /* Buttons, inputs inside surfaces */
|
|
48
|
-
/* === Backgrounds / Surfaces === */
|
|
49
|
-
--bg-page: var(--color-gray-50); /* Main app background */
|
|
50
|
-
--bg-section: var(--color-gray-100); /* Sections inside pages */
|
|
51
|
-
--bg-card: var(--color-white); /* Cards */
|
|
52
|
-
--bg-popover: var(--color-white); /* Popovers, dropdowns */
|
|
53
|
-
--bg-modal: var(--color-white); /* Modals, dialogs */
|
|
54
|
-
--bg-sidebar: var(--color-gray-200); /* Sidebars */
|
|
55
|
-
--bg-footer: var(--color-gray-300); /* Footer areas */
|
|
56
|
-
--bg-overlay: var(--color-gray-900); /* Overlay scrims (dark) */
|
|
57
|
-
/* for bg-card and text-card? */
|
|
58
|
-
--color-card: var(--color-white);
|
|
59
|
-
|
|
60
|
-
/* === Z-Index === */
|
|
61
|
-
--z-base: 0; /* Normal document flow */
|
|
62
|
-
--z-surface: 10; /* Cards, panels */
|
|
63
|
-
--z-popover: 30; /* Dropdowns, popovers */
|
|
64
|
-
--z-modal: 50; /* Modals, dialogs */
|
|
65
|
-
--z-overlay: 75; /* Overlays, backdrops */
|
|
66
|
-
--z-tooltip: 100; /* Tooltips, highest priority */
|
|
67
|
-
/* === Border Radius === */
|
|
68
|
-
/*TODO: should this not be much larger then card? from large to small? */
|
|
69
|
-
--radius-surface: var(--radius-sm); /* Default background surfaces */
|
|
70
|
-
--radius-card: var(--radius-lg); /* Cards and panels */
|
|
71
|
-
/*TODO: we need something for items inside a card, like buttons and images. Or even if they are on surfaces */
|
|
72
|
-
--radius-element: var(--radius-md); /* Images and buttons */
|
|
73
|
-
--radius-popover: var(--radius-md); /* Popovers, tooltips, dropdowns */
|
|
74
|
-
--radius-modal: var(--radius-2xl); /* Modals, overlays */
|
|
75
|
-
--radius-floating-action: var(
|
|
76
|
-
--radius-full
|
|
77
|
-
); /* Floating buttons, floating toolbars (FAB) */
|
|
78
|
-
--radius-none: 0px; /* Flat design option */
|
|
79
|
-
/* === Z-Index === */
|
|
80
|
-
--z-base: 0; /* Normal flow */
|
|
81
|
-
--z-surface: 10; /* Cards, panels */
|
|
82
|
-
--z-popover: 30; /* Dropdowns, popovers */
|
|
83
|
-
--z-modal: 50; /* Modals, dialogs */
|
|
84
|
-
--z-overlay: 75; /* Overlays, spinners */
|
|
85
|
-
--z-tooltip: 100; /* Tooltips, highest priority */
|
|
86
|
-
/* === Spacing (example for consistent gaps/padding) === */
|
|
87
|
-
--spacing-card: calc(var(--spacing) * 4);
|
|
88
|
-
|
|
89
|
-
/* TODO: set Header font family and font sizes in theme. Should they become increasingly bigger? Or should they be semantic? Like sub-header, ... we had some names once*/
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
/*@source utilities:bg:*,text:*,p-*,m-*,rounded-*,shadow-**/
|
|
93
|
-
/*@source inline("utilities:bg:*,text:*,p-*,m-*,w-*,h-*,min-w-*,min-h-*,max-w-*,max-h-*,gap-*,space-x-*,space-y-*,border-*,opacity-*,scale-*,rotate-*,translate-*,z-*,leading-*,tracking-*,font-*,rounded-*,shadow-*")*/
|
|
94
|
-
/*@source inline("components:btn-primary,card")*/
|
|
95
|
-
/*@source inline("shortcuts:container")*/
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
declare module '*.css' {
|
|
2
|
-
const styles: {
|
|
3
|
-
readonly [key: string]: string;
|
|
4
|
-
};
|
|
5
|
-
// export type ClassName = string;
|
|
6
|
-
export default styles;
|
|
7
|
-
}
|
|
8
|
-
declare module '*.scss' {
|
|
9
|
-
const styles: {
|
|
10
|
-
readonly [key: string]: string;
|
|
11
|
-
};
|
|
12
|
-
// export type ClassName = string;
|
|
13
|
-
export default styles;
|
|
14
|
-
}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { ComponentType, lazy } from 'react';
|
|
2
|
-
|
|
3
|
-
export interface PreloadableComponent<T extends ComponentType<any>> {
|
|
4
|
-
preload: () => Promise<{ default: T }>;
|
|
5
|
-
Component: React.LazyExoticComponent<T>;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* Creates a lazy-loaded component with a preload function
|
|
10
|
-
* This allows preloading the component before React needs it
|
|
11
|
-
*
|
|
12
|
-
* @example
|
|
13
|
-
* const SigninPage = lazyWithPreload(() => import('./pages/Signin'));
|
|
14
|
-
* // Later, before navigation or on server:
|
|
15
|
-
* SigninPage.preload();
|
|
16
|
-
*/
|
|
17
|
-
export function lazyWithPreload<T extends ComponentType<any>>(
|
|
18
|
-
importFunc: () => Promise<{ default: T }>
|
|
19
|
-
): PreloadableComponent<T> {
|
|
20
|
-
let modulePromise: Promise<{ default: T }> | null = null;
|
|
21
|
-
|
|
22
|
-
const preload = () => {
|
|
23
|
-
if (!modulePromise) {
|
|
24
|
-
modulePromise = importFunc();
|
|
25
|
-
}
|
|
26
|
-
return modulePromise;
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
const Component = lazy(() => {
|
|
30
|
-
// If preload was called, reuse the same promise
|
|
31
|
-
// This ensures React uses the already-loaded module
|
|
32
|
-
if (!modulePromise) {
|
|
33
|
-
modulePromise = importFunc();
|
|
34
|
-
}
|
|
35
|
-
return modulePromise;
|
|
36
|
-
});
|
|
37
|
-
|
|
38
|
-
return {
|
|
39
|
-
preload,
|
|
40
|
-
Component,
|
|
41
|
-
};
|
|
42
|
-
}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Client-side script to preload lazy routes before hydration
|
|
3
|
-
* This should be called BEFORE React's hydrateRoot()
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
// This will be populated by the server with the routes that need preloading
|
|
7
|
-
declare global {
|
|
8
|
-
interface Window {
|
|
9
|
-
__PRELOAD_ROUTES__?: string[];
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export async function preloadMatchedRoute() {
|
|
14
|
-
// Get the list of routes to preload from the server
|
|
15
|
-
const routesToPreload = window.__PRELOAD_ROUTES__ || [];
|
|
16
|
-
|
|
17
|
-
if (routesToPreload.length === 0) {
|
|
18
|
-
return;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
// Dynamically import the routes module to access PRELOADABLE_ROUTES
|
|
22
|
-
const routesModule = await import('../routes');
|
|
23
|
-
const { PRELOADABLE_ROUTES } = routesModule;
|
|
24
|
-
|
|
25
|
-
// Preload each route
|
|
26
|
-
const preloadPromises = routesToPreload
|
|
27
|
-
.map((routeKey) => {
|
|
28
|
-
const preloadableRoute = PRELOADABLE_ROUTES[routeKey];
|
|
29
|
-
if (preloadableRoute && preloadableRoute.preload) {
|
|
30
|
-
return preloadableRoute.preload();
|
|
31
|
-
}
|
|
32
|
-
return null;
|
|
33
|
-
})
|
|
34
|
-
.filter(Boolean);
|
|
35
|
-
|
|
36
|
-
// Wait for all preloads to complete
|
|
37
|
-
await Promise.all(preloadPromises);
|
|
38
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"module": "esnext",
|
|
4
|
-
"moduleResolution": "node",
|
|
5
|
-
"sourceMap": true,
|
|
6
|
-
"target": "es2018",
|
|
7
|
-
"resolveJsonModule": true,
|
|
8
|
-
"declaration": false,
|
|
9
|
-
"experimentalDecorators": true,
|
|
10
|
-
"emitDecoratorMetadata": true,
|
|
11
|
-
"esModuleInterop": true,
|
|
12
|
-
"resolveJsonModule": true,
|
|
13
|
-
"jsx": "react-jsx",
|
|
14
|
-
"types": ["node", "react", "react-dom"],
|
|
15
|
-
"plugins": [
|
|
16
|
-
{
|
|
17
|
-
"name": "typescript-plugin-css-modules"
|
|
18
|
-
}
|
|
19
|
-
],
|
|
20
|
-
"pretty": true
|
|
21
|
-
},
|
|
22
|
-
"files": ["./src/index.tsx", "./src/types.ts"],
|
|
23
|
-
"include": ["./src/backend.ts"]
|
|
24
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"@context": {
|
|
3
|
-
"dc": "http://purl.org/dc/elements/1.1/",
|
|
4
|
-
"owl": "http://www.w3.org/2002/07/owl#",
|
|
5
|
-
"rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
|
|
6
|
-
"rdfs": "http://www.w3.org/2000/01/rdf-schema#",
|
|
7
|
-
"${hyphen_name}": "${uri_base}"
|
|
8
|
-
},
|
|
9
|
-
"@graph": []
|
|
10
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export var json: string;
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import {NamedNode} from 'lincd/models';
|
|
2
|
-
import {JSONLD} from 'lincd-jsonld/utils/JSONLD';
|
|
3
|
-
import {createNameSpace} from 'lincd/utils/NameSpace';
|
|
4
|
-
import {linkedOntology} from '../package.js';
|
|
5
|
-
//import all the exports of this file as one variable called _this (we need this at the end)
|
|
6
|
-
import * as _this from './${hyphen_name}.js';
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* Load the data of this ontology into memory, thus adding the properties of the entities of this ontology to the local graph.
|
|
10
|
-
*/
|
|
11
|
-
export var loadData = () => {
|
|
12
|
-
if (typeof module !== 'undefined' && typeof exports !== 'undefined') {
|
|
13
|
-
// CommonJS import
|
|
14
|
-
return import('../data/${hyphen_name}.json').then((data) => JSONLD.parse(data));
|
|
15
|
-
} else {
|
|
16
|
-
// ESM import
|
|
17
|
-
//@ts-ignore
|
|
18
|
-
return import('../data/${hyphen_name}.json',{ with: { type: "json" } }).then((data) => JSONLD.parse(data.defauilt));
|
|
19
|
-
}
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* The namespace of this ontology, which can be used to create NamedNodes with URI's not listed in this file
|
|
24
|
-
*/
|
|
25
|
-
export var ns = createNameSpace('${uri_base}');
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
* The NamedNode of the ontology itself
|
|
29
|
-
*/
|
|
30
|
-
export var _self: NamedNode = ns('');
|
|
31
|
-
|
|
32
|
-
//A list of all the entities (Classes & Properties) of this ontology, each exported as a NamedNode
|
|
33
|
-
// export var ExampleClass: NamedNode = ns('ExampleClass');
|
|
34
|
-
// export var exampleProperty: NamedNode = ns('exampleProperty');
|
|
35
|
-
|
|
36
|
-
//An extra grouping object so all the entities can be accessed from the prefix/name
|
|
37
|
-
export const ${camel_name} = {
|
|
38
|
-
// ExampleClass,
|
|
39
|
-
// exampleProperty,
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
//Registers this ontology to LINCD.JS, so that data loading can be automated amongst other things
|
|
43
|
-
linkedOntology(_this, ns, '${hyphen_name}', loadData, '../data/${hyphen_name}.json');
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import {linkedPackage} from 'lincd/utils/Package';
|
|
2
|
-
|
|
3
|
-
export const {
|
|
4
|
-
linkedComponent,
|
|
5
|
-
linkedShape,
|
|
6
|
-
linkedUtil,
|
|
7
|
-
linkedOntology,
|
|
8
|
-
registerPackageExport,
|
|
9
|
-
packageExports,
|
|
10
|
-
packageName,
|
|
11
|
-
getPackageShape
|
|
12
|
-
|
|
13
|
-
} = linkedPackage('${package_name}');
|