@inizioevoke/veeva-astroclm 1.1.6 → 1.1.8
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/.env.development +1 -0
- package/.nvmrc +1 -0
- package/astro.config.ts +3 -2
- package/bin/create.js +12 -1
- package/package.json +7 -7
- package/src/components/ui/VeevaControls/VeevaControls.astro +25 -18
- package/src/layouts/GlobalLayout/GlobalLayout.astro +1 -1
- package/src/middleware.ts.bak +0 -12
package/.env.development
CHANGED
package/.nvmrc
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
24
|
package/astro.config.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineConfig } from 'astro/config';
|
|
1
|
+
import { defineConfig, envField } from 'astro/config';
|
|
2
2
|
import preact from '@astrojs/preact';
|
|
3
3
|
import { schema } from '@inizioevoke/veeva-astroclm-core/env';
|
|
4
4
|
import { pruneBuild } from '@inizioevoke/astro-core/integrations';
|
|
@@ -26,7 +26,8 @@ export default defineConfig({
|
|
|
26
26
|
BUILD_TARGET,
|
|
27
27
|
LOG_LEVEL, LOG_OUTPUT, LOG_TIME,
|
|
28
28
|
VEEVA_ENV, VEEVA_PLATFORM, VEEVA_TRAINING,
|
|
29
|
-
WEB_ENV, WEB_SCALING
|
|
29
|
+
WEB_ENV, WEB_SCALING,
|
|
30
|
+
VEEVA_CONTROLS: envField.boolean({ context: 'client', access: 'public', optional: true, default: false })
|
|
30
31
|
}
|
|
31
32
|
},
|
|
32
33
|
integrations: [
|
package/bin/create.js
CHANGED
|
@@ -62,7 +62,7 @@ if (existsSync(targetDir) && readdirSync(targetDir).length > 0) {
|
|
|
62
62
|
}
|
|
63
63
|
mkdirSync(targetDir, { recursive: true })
|
|
64
64
|
|
|
65
|
-
const skipTopLevel = new Set(['bin', 'node_modules', '.git', 'package-lock.json'])
|
|
65
|
+
const skipTopLevel = new Set(['bin', 'node_modules', '.git', '.gitignore', 'package-lock.json'])
|
|
66
66
|
const includedLayouts = new Set(TEMPLATES[template].layouts)
|
|
67
67
|
|
|
68
68
|
cpSync(templateRoot, targetDir, {
|
|
@@ -83,6 +83,17 @@ for (const dir of ['src/contents', 'src/layouts', 'src/pages']) {
|
|
|
83
83
|
mkdirSync(join(targetDir, dir), { recursive: true })
|
|
84
84
|
}
|
|
85
85
|
|
|
86
|
+
// npm never publishes .gitignore, and the template's own ignores (src/pages,
|
|
87
|
+
// src/contents) don't apply to scaffolded projects, so write a dedicated one.
|
|
88
|
+
const gitignore = `.astro/
|
|
89
|
+
deploy/
|
|
90
|
+
dist/
|
|
91
|
+
node_modules/
|
|
92
|
+
.DS_Store
|
|
93
|
+
Thumbs.db
|
|
94
|
+
`
|
|
95
|
+
writeFileSync(join(targetDir, '.gitignore'), gitignore)
|
|
96
|
+
|
|
86
97
|
const pkgPath = join(targetDir, 'package.json')
|
|
87
98
|
const pkg = JSON.parse(readFileSync(pkgPath, 'utf8'))
|
|
88
99
|
pkg.name = basename(targetDir)
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inizioevoke/veeva-astroclm",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.1.
|
|
4
|
+
"version": "1.1.8",
|
|
5
5
|
"bin": "./bin/create.js",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"start": "astro dev",
|
|
@@ -25,18 +25,18 @@
|
|
|
25
25
|
"page-manager": "npx tsx ./tasks/page-manager.ts"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@astrojs/preact": "^6.1.
|
|
28
|
+
"@astrojs/preact": "^6.1.2",
|
|
29
29
|
"@inizioevoke/astro-core": "^3.3.3",
|
|
30
|
-
"@inizioevoke/veeva-astroclm-core": "^1.4.
|
|
30
|
+
"@inizioevoke/veeva-astroclm-core": "^1.4.9",
|
|
31
31
|
"@inizioevoke/veeva-clmjs": "^1.0.1",
|
|
32
32
|
"@inizioevoke/veeva-iva": "^1.4.1",
|
|
33
|
-
"astro": "^7.4.
|
|
34
|
-
"preact": "^11.
|
|
35
|
-
"sass": "^1.
|
|
33
|
+
"astro": "^7.4.7",
|
|
34
|
+
"preact": "^11.2.0",
|
|
35
|
+
"sass": "^1.108.0"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@astrojs/check": "^0.9.12",
|
|
39
|
-
"@types/node": "^26.6.
|
|
39
|
+
"@types/node": "^26.6.6",
|
|
40
40
|
"tsx": "^4.23.15"
|
|
41
41
|
},
|
|
42
42
|
"allowScripts": {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
+
import { BUILD_TARGET, VEEVA_CONTROLS } from 'astro:env/client';
|
|
2
3
|
import Image from '@components/ui/Image.astro';
|
|
3
4
|
import imgAction from '@shared/img/veeva/veeva-action.png';
|
|
4
5
|
import imgHighlighter from '@shared/img/veeva/veeva-highlighter.png';
|
|
@@ -28,21 +29,27 @@ const history = shouldInclude(Astro.props.history);
|
|
|
28
29
|
const reactions = shouldInclude(Astro.props.reactions);
|
|
29
30
|
const navigation = shouldInclude(Astro.props.navigation);
|
|
30
31
|
---
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
}
|
|
35
|
-
{
|
|
36
|
-
<div id="veeva-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
{
|
|
40
|
-
<div id="veeva-
|
|
41
|
-
}
|
|
42
|
-
{
|
|
43
|
-
<div id="veeva-
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
<div id="veeva-
|
|
47
|
-
|
|
48
|
-
<div id="veeva-desktop-
|
|
32
|
+
{(() => {
|
|
33
|
+
if (BUILD_TARGET === 'web' && VEEVA_CONTROLS) {
|
|
34
|
+
return (<>
|
|
35
|
+
<div id="veeva-action" class="veeva-control"><Image src={imgAction} /></div>
|
|
36
|
+
{ highlighter &&
|
|
37
|
+
<div id="veeva-highlighter" class="veeva-control"><Image src={imgHighlighter} /></div>
|
|
38
|
+
}
|
|
39
|
+
{ history &&
|
|
40
|
+
<div id="veeva-history-back" class:list={['veeva-control', highlighter ? 'veeva-has-highlighter' : '']}><Image src={imgHistoryBack} /></div>
|
|
41
|
+
<div id="veeva-history-forward" class:list={['veeva-control', highlighter ? 'veeva-has-highlighter' : '']}><Image src={imgHistoryForward} /></div>
|
|
42
|
+
}
|
|
43
|
+
{ reactions &&
|
|
44
|
+
<div id="veeva-reactions" class="veeva-control"><Image src={imgReactions} /></div>
|
|
45
|
+
}
|
|
46
|
+
{ navigation &&
|
|
47
|
+
<div id="veeva-navigation" class="veeva-control"><Image src={imgNavigation} /></div>
|
|
48
|
+
}
|
|
49
|
+
<div id="veeva-desktop-action" class="veeva-desktop-control"><Image src={imgDesktopAction} /></div>
|
|
50
|
+
<div id="veeva-desktop-previous" class="veeva-desktop-control"><Image src={imgDesktopPrevious} /></div>
|
|
51
|
+
<div id="veeva-desktop-next" class="veeva-desktop-control"><Image src={imgDesktopNext} /></div>
|
|
52
|
+
<div id="veeva-desktop-navigation" class="veeva-desktop-control"><Image src={imgDesktopNavigation} /></div>
|
|
53
|
+
</>);
|
|
54
|
+
}
|
|
55
|
+
})()}
|
|
@@ -49,10 +49,10 @@ const pathname = Astro.url.pathname;
|
|
|
49
49
|
<ResizeScript width={SCREEN_WIDTH} height={SCREEN_HEIGHT} />
|
|
50
50
|
<slot />
|
|
51
51
|
<ModalOverlay />
|
|
52
|
+
<VeevaControls reactions={false} />
|
|
52
53
|
</div>
|
|
53
54
|
</div>
|
|
54
55
|
|
|
55
|
-
{ BUILD_TARGET === 'web' && WEB_ENV !== "production" && <VeevaControls reactions={false} /> }
|
|
56
56
|
<IvaConsole />
|
|
57
57
|
|
|
58
58
|
<script>
|
package/src/middleware.ts.bak
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { defineMiddleware } from "astro:middleware";
|
|
2
|
-
|
|
3
|
-
export const onRequest = defineMiddleware((context, next) => {
|
|
4
|
-
const url = new URL(context.request.url);
|
|
5
|
-
|
|
6
|
-
// Map ./dir to /dir
|
|
7
|
-
if (url.pathname.startsWith('./dir')) {
|
|
8
|
-
return context.rewrite(url.pathname.replace('./dir', '/dir'));
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
return next();
|
|
12
|
-
});
|