diff --git a/packages/temple-esbuild/package.json b/packages/temple-esbuild/package.json index fbd3264..293f147 100644 --- a/packages/temple-esbuild/package.json +++ b/packages/temple-esbuild/package.json @@ -19,9 +19,6 @@ "scripts": { "build": "tsc" }, - "peerDependencies": { - "esbuild": "^0.20" - }, "dependencies": { "@ossph/temple": "0.0.15" }, diff --git a/packages/temple-express/src/index.ts b/packages/temple-express/src/index.ts index b95ce04..8889865 100644 --- a/packages/temple-express/src/index.ts +++ b/packages/temple-express/src/index.ts @@ -3,7 +3,7 @@ import temple from '@ossph/temple/compiler'; export default function engine( options: TempleOptions, - next: (res: string) => string = (res) => res, + next: (res: string) => string = (res) => res ) { const compiler = temple(options); return async ( @@ -12,7 +12,11 @@ export default function engine( callback: (err: Error | null, results: string | undefined) => void, ) => { const { settings, _locals, cache, ...props } = options; - const build = await compiler.import(filePath); - callback(null, next(build.document.render(props))); + try { + const build = await compiler.import(filePath); + callback(null, next(build.document.inline(props))); + } catch (e) { + callback(e as Error, undefined); + } }; } \ No newline at end of file diff --git a/packages/temple-web/public/styles/theme.css b/packages/temple-web/public/styles/theme.css index c09270e..62a3d05 100644 --- a/packages/temple-web/public/styles/theme.css +++ b/packages/temple-web/public/styles/theme.css @@ -325,6 +325,97 @@ a, a:link a:hover, a:active, a:visited { } } +/* Table +---------------------------------*/ +.tbl-container { + position: relative; +} +.tbl { + border-collapse: collapse; + display: table; + width: 100%; +} + +.tbl-scroll { + overflow: auto; + flex-grow: 1; + height: 100%; + width: 100%; +} + +.tbl-nowrap { + white-space: nowrap; +} + +.tbl-z0 { + z-index: 0; +} +.tbl-z1 { + z-index: 1; +} +.tbl-z2 { + z-index: 2; +} +.tbl-z3 { + z-index: 3; +} +.tbl-z4 { + z-index: 4; +} + +.tbl-sticky { + position: sticky; +} +.tbl-sticky-b { + bottom: 0; +} +.tbl-sticky-l { + left: 0; +} +.tbl-sticky-t { + top: 0; +} +.tbl-sticky-r { + right: 0; +} + +.tbl-col { + border-color: black; + border-style: solid; + border-top-width: 1px; + padding-bottom: 16px; + padding-left: 12px; + padding-right: 12px; + padding-top: 16px; +} + +.tbl-foot { + border-color: black; + border-style: solid; + border-top-width: 1px; + padding-bottom: 16px; + padding-left: 12px; + padding-right: 12px; + padding-top: 16px; +} + +.tbl-row { + padding-bottom: 16px; + padding-left: 12px; + padding-right: 12px; + padding-top: 16px; +} + +.tbl-head { + border-color: black; + border-style: solid; + border-top-width: 1px; + padding-bottom: 16px; + padding-left: 12px; + padding-right: 12px; + padding-top: 16px; +} + /* Head ---------------------------------*/ .head { diff --git a/packages/temple-web/src/components/code-preview.tml b/packages/temple-web/src/components/code-preview.tml index 2308dd4..0d2a600 100644 --- a/packages/temple-web/src/components/code-preview.tml +++ b/packages/temple-web/src/components/code-preview.tml @@ -12,7 +12,6 @@ } -
+
+Something went wrong. Please try again later.
+{error || ''}+
+ To use Temple in your project, run one of the + following commands in your terminal: +
+The reactive web component template engine.
-