@progressive-development/pd-content 0.9.1 → 1.0.0
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/LICENSE +21 -2
- package/README.md +42 -57
- package/dist/_virtual/_commonjsHelpers.js +7 -0
- package/dist/_virtual/prism-java.js +3 -0
- package/dist/_virtual/prism-java2.js +3 -0
- package/dist/_virtual/prism-python.js +3 -0
- package/dist/_virtual/prism-python2.js +3 -0
- package/dist/_virtual/prism-typescript.js +3 -0
- package/dist/_virtual/prism-typescript2.js +3 -0
- package/dist/_virtual/prism.js +7 -0
- package/dist/_virtual/prism2.js +3 -0
- package/dist/generated/locales/be.d.ts +10 -0
- package/dist/generated/locales/be.d.ts.map +1 -1
- package/dist/generated/locales/de.d.ts +10 -0
- package/dist/generated/locales/de.d.ts.map +1 -1
- package/dist/generated/locales/en.d.ts +10 -0
- package/dist/generated/locales/en.d.ts.map +1 -1
- package/dist/index.d.ts +8 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +9 -0
- package/dist/locales/be.js +11 -1
- package/dist/locales/de.js +11 -1
- package/dist/locales/en.js +11 -1
- package/dist/node_modules/.pnpm/prismjs@1.30.0/node_modules/prismjs/components/prism-bash.js +235 -0
- package/dist/node_modules/.pnpm/prismjs@1.30.0/node_modules/prismjs/components/prism-java.js +135 -0
- package/dist/node_modules/.pnpm/prismjs@1.30.0/node_modules/prismjs/components/prism-json.js +27 -0
- package/dist/node_modules/.pnpm/prismjs@1.30.0/node_modules/prismjs/components/prism-markdown.js +415 -0
- package/dist/node_modules/.pnpm/prismjs@1.30.0/node_modules/prismjs/components/prism-python.js +76 -0
- package/dist/node_modules/.pnpm/prismjs@1.30.0/node_modules/prismjs/components/prism-sql.js +32 -0
- package/dist/node_modules/.pnpm/prismjs@1.30.0/node_modules/prismjs/components/prism-typescript.js +71 -0
- package/dist/node_modules/.pnpm/prismjs@1.30.0/node_modules/prismjs/components/prism-yaml.js +83 -0
- package/dist/node_modules/.pnpm/prismjs@1.30.0/node_modules/prismjs/prism.js +1959 -0
- package/dist/pd-box-view/PdBoxView.d.ts +9 -0
- package/dist/pd-box-view/PdBoxView.d.ts.map +1 -1
- package/dist/pd-box-view/pd-box-view.stories.d.ts +41 -8
- package/dist/pd-box-view/pd-box-view.stories.d.ts.map +1 -1
- package/dist/pd-code-snippet/PdCodeSnippet.d.ts +105 -0
- package/dist/pd-code-snippet/PdCodeSnippet.d.ts.map +1 -0
- package/dist/pd-code-snippet/PdCodeSnippet.js +504 -0
- package/dist/pd-code-snippet/pd-code-snippet.d.ts +4 -0
- package/dist/pd-code-snippet/pd-code-snippet.d.ts.map +1 -0
- package/dist/pd-code-snippet/pd-code-snippet.js +5 -0
- package/dist/pd-code-snippet/pd-code-snippet.stories.d.ts +55 -0
- package/dist/pd-code-snippet/pd-code-snippet.stories.d.ts.map +1 -0
- package/dist/pd-collapse/PdCollapse.d.ts +31 -7
- package/dist/pd-collapse/PdCollapse.d.ts.map +1 -1
- package/dist/pd-collapse/PdCollapse.js +73 -18
- package/dist/pd-collapse/pd-collapse.stories.d.ts +49 -21
- package/dist/pd-collapse/pd-collapse.stories.d.ts.map +1 -1
- package/dist/pd-collapse-group/PdCollapseGroup.d.ts +8 -7
- package/dist/pd-collapse-group/PdCollapseGroup.d.ts.map +1 -1
- package/dist/pd-collapse-group/PdCollapseGroup.js +7 -6
- package/dist/pd-collapse-group/pd-collapse-group.stories.d.ts +39 -4
- package/dist/pd-collapse-group/pd-collapse-group.stories.d.ts.map +1 -1
- package/dist/pd-edit-content/PdEditContent.d.ts +13 -0
- package/dist/pd-edit-content/PdEditContent.d.ts.map +1 -1
- package/dist/pd-edit-content/PdEditContent.js +33 -10
- package/dist/pd-edit-content/pd-edit-content.stories.d.ts +54 -10
- package/dist/pd-edit-content/pd-edit-content.stories.d.ts.map +1 -1
- package/dist/pd-loading-state/PdLoadingState.d.ts +64 -0
- package/dist/pd-loading-state/PdLoadingState.d.ts.map +1 -0
- package/dist/pd-loading-state/PdLoadingState.js +219 -0
- package/dist/pd-loading-state/pd-loading-state.d.ts +6 -0
- package/dist/pd-loading-state/pd-loading-state.d.ts.map +1 -0
- package/dist/pd-loading-state/pd-loading-state.stories.d.ts +48 -0
- package/dist/pd-loading-state/pd-loading-state.stories.d.ts.map +1 -0
- package/dist/pd-loading-state.d.ts +2 -0
- package/dist/pd-loading-state.js +1 -0
- package/dist/pd-more-info/PdMoreInfo.d.ts +6 -2
- package/dist/pd-more-info/PdMoreInfo.d.ts.map +1 -1
- package/dist/pd-more-info/PdMoreInfo.js +30 -4
- package/dist/pd-more-info/pd-more-info.stories.d.ts +41 -5
- package/dist/pd-more-info/pd-more-info.stories.d.ts.map +1 -1
- package/dist/pd-notice-box/PdNoticeBox.d.ts +88 -0
- package/dist/pd-notice-box/PdNoticeBox.d.ts.map +1 -0
- package/dist/pd-notice-box/PdNoticeBox.js +224 -0
- package/dist/pd-notice-box/pd-notice-box.d.ts +3 -0
- package/dist/pd-notice-box/pd-notice-box.d.ts.map +1 -0
- package/dist/pd-notice-box/pd-notice-box.js +8 -0
- package/dist/pd-notice-box/pd-notice-box.stories.d.ts +58 -0
- package/dist/pd-notice-box/pd-notice-box.stories.d.ts.map +1 -0
- package/dist/pd-panel-viewer/PdPanel.d.ts +5 -0
- package/dist/pd-panel-viewer/PdPanel.d.ts.map +1 -1
- package/dist/pd-panel-viewer/PdPanelViewer.d.ts +53 -2
- package/dist/pd-panel-viewer/PdPanelViewer.d.ts.map +1 -1
- package/dist/pd-panel-viewer/PdPanelViewer.js +188 -33
- package/dist/pd-panel-viewer/pd-panel-viewer.stories.d.ts +46 -0
- package/dist/pd-panel-viewer/pd-panel-viewer.stories.d.ts.map +1 -0
- package/dist/pd-resize-content/PdResizeContent.d.ts +12 -10
- package/dist/pd-resize-content/PdResizeContent.d.ts.map +1 -1
- package/dist/pd-resize-content/PdResizeContent.js +19 -9
- package/dist/pd-resize-content/pd-resize-content.stories.d.ts +36 -4
- package/dist/pd-resize-content/pd-resize-content.stories.d.ts.map +1 -1
- package/dist/pd-tab/PdTab.d.ts +35 -2
- package/dist/pd-tab/PdTab.d.ts.map +1 -1
- package/dist/pd-tab/PdTab.js +181 -71
- package/dist/pd-tab/pd-tab.stories.d.ts +51 -21
- package/dist/pd-tab/pd-tab.stories.d.ts.map +1 -1
- package/dist/pd-timeline/PdTimeline.d.ts +50 -0
- package/dist/pd-timeline/PdTimeline.d.ts.map +1 -0
- package/dist/pd-timeline/PdTimeline.js +315 -0
- package/dist/pd-timeline/pd-timeline.d.ts +3 -0
- package/dist/pd-timeline/pd-timeline.d.ts.map +1 -0
- package/dist/pd-timeline/pd-timeline.stories.d.ts +56 -0
- package/dist/pd-timeline/pd-timeline.stories.d.ts.map +1 -0
- package/dist/pd-timeline-wizard/PdTimelineWizard.d.ts +39 -0
- package/dist/pd-timeline-wizard/PdTimelineWizard.d.ts.map +1 -0
- package/dist/pd-timeline-wizard/PdTimelineWizard.js +150 -0
- package/dist/pd-timeline-wizard/pd-timeline-wizard.d.ts +3 -0
- package/dist/pd-timeline-wizard/pd-timeline-wizard.d.ts.map +1 -0
- package/dist/pd-timeline-wizard/pd-timeline-wizard.stories.d.ts +54 -0
- package/dist/pd-timeline-wizard/pd-timeline-wizard.stories.d.ts.map +1 -0
- package/dist/pd-timeline-wizard.d.ts +2 -0
- package/dist/pd-timeline-wizard.js +8 -0
- package/dist/pd-timeline.d.ts +2 -0
- package/dist/pd-timeline.js +8 -0
- package/dist/types.d.ts +25 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +17 -8
package/LICENSE
CHANGED
|
@@ -1,2 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2021-present PD Progressive Development UG
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,76 +1,61 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @progressive-development/pd-content
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[](https://www.npmjs.com/package/@progressive-development/pd-content)
|
|
4
|
+
[](LICENSE)
|
|
5
|
+
|
|
6
|
+
Content layout components for collapsible sections, tabs, panels, and timelines.
|
|
7
|
+
|
|
8
|
+
## Features
|
|
9
|
+
|
|
10
|
+
- **Lit 3 & TypeScript** – Modern, type-safe web components
|
|
11
|
+
- **Accessible** – WCAG 2.1 compliant, keyboard navigation, ARIA support
|
|
12
|
+
- **Themeable** – CSS Custom Properties for easy customization
|
|
13
|
+
- **Localized** – Built-in i18n support (EN, DE, BE)
|
|
14
|
+
- **Lightweight** – No heavy dependencies, tree-shakeable
|
|
15
|
+
- **Framework-agnostic** – Works with React, Vue, Angular, or vanilla JS
|
|
16
|
+
- **Touch Gesture Support** – Swipe navigation for panels via HammerJS integration
|
|
17
|
+
- **Smooth Animations** – GPU-accelerated expand/collapse with cubic-bezier easing
|
|
18
|
+
- **Accordion Pattern** – Collapse groups with mutual exclusion (only one open at a time)
|
|
19
|
+
- **Responsive Content Switching** – Auto-switch between inline and popup mode based on viewport
|
|
4
20
|
|
|
5
21
|
## Installation
|
|
6
22
|
|
|
7
23
|
```bash
|
|
8
|
-
npm
|
|
24
|
+
npm install @progressive-development/pd-content
|
|
9
25
|
```
|
|
10
26
|
|
|
11
|
-
##
|
|
27
|
+
## Quick Start
|
|
12
28
|
|
|
13
29
|
```html
|
|
14
30
|
<script type="module">
|
|
15
|
-
import '
|
|
31
|
+
import '@progressive-development/pd-content';
|
|
16
32
|
</script>
|
|
17
33
|
|
|
18
|
-
<pd-
|
|
34
|
+
<pd-collapse title="Section 1">
|
|
35
|
+
<p>Collapsible content here</p>
|
|
36
|
+
</pd-collapse>
|
|
19
37
|
```
|
|
20
38
|
|
|
21
|
-
##
|
|
39
|
+
## Components
|
|
22
40
|
|
|
23
|
-
|
|
41
|
+
| Component | Description |
|
|
42
|
+
|-----------|-------------|
|
|
43
|
+
| `<pd-collapse>` | Expandable/collapsible content section |
|
|
44
|
+
| `<pd-collapse-group>` | Accordion container for collapse elements |
|
|
45
|
+
| `<pd-tab>` | Tabbed content navigation |
|
|
46
|
+
| `<pd-panel>` | Content panel |
|
|
47
|
+
| `<pd-panel-viewer>` | Swipeable panel carousel |
|
|
48
|
+
| `<pd-box-view>` | Card-style content box |
|
|
49
|
+
| `<pd-more-info>` | Expandable info section |
|
|
50
|
+
| `<pd-edit-content>` | Inline editable content |
|
|
51
|
+
| `<pd-resize-content>` | Responsive content with popup fallback |
|
|
52
|
+
| `<pd-timeline>` | Vertical timeline display |
|
|
53
|
+
| `<pd-timeline-wizard>` | Timeline with step progression |
|
|
24
54
|
|
|
25
|
-
|
|
26
|
-
npm run lint
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
To automatically fix linting and formatting errors, run
|
|
30
|
-
|
|
31
|
-
```bash
|
|
32
|
-
npm run format
|
|
33
|
-
```
|
|
55
|
+
## Documentation
|
|
34
56
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
To execute a single test run:
|
|
38
|
-
|
|
39
|
-
```bash
|
|
40
|
-
npm run test
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
To run the tests in interactive watch mode run:
|
|
44
|
-
|
|
45
|
-
```bash
|
|
46
|
-
npm run test:watch
|
|
47
|
-
```
|
|
57
|
+
📖 **Full documentation:** [pd-components.web.app](https://pd-components.web.app/)
|
|
48
58
|
|
|
49
|
-
##
|
|
50
|
-
|
|
51
|
-
To run a local instance of Storybook for your component, run
|
|
52
|
-
|
|
53
|
-
```bash
|
|
54
|
-
npm run storybook
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
To build a production version of Storybook, run
|
|
58
|
-
|
|
59
|
-
```bash
|
|
60
|
-
npm run storybook:build
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
## Tooling configs
|
|
65
|
-
|
|
66
|
-
For most of the tools, the configuration is in the `package.json` to minimize the amount of files in your project.
|
|
67
|
-
|
|
68
|
-
If you customize the configuration a lot, you can consider moving them to individual files.
|
|
69
|
-
|
|
70
|
-
## Local Demo with `web-dev-server`
|
|
71
|
-
|
|
72
|
-
```bash
|
|
73
|
-
npm start
|
|
74
|
-
```
|
|
59
|
+
## License
|
|
75
60
|
|
|
76
|
-
|
|
61
|
+
MIT © [PD Progressive Development UG](https://progressive-development.com)
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
2
|
+
|
|
3
|
+
function getDefaultExportFromCjs (x) {
|
|
4
|
+
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export { commonjsGlobal, getDefaultExportFromCjs };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { getDefaultExportFromCjs } from './_commonjsHelpers.js';
|
|
2
|
+
import { __require as requirePrism } from '../node_modules/.pnpm/prismjs@1.30.0/node_modules/prismjs/prism.js';
|
|
3
|
+
|
|
4
|
+
var prismExports = requirePrism();
|
|
5
|
+
const Prism = /*@__PURE__*/getDefaultExportFromCjs(prismExports);
|
|
6
|
+
|
|
7
|
+
export { Prism as default };
|
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
export declare const templates: {
|
|
2
2
|
"pd.moreInfo.less": string;
|
|
3
3
|
"pd.moreInfo.more": string;
|
|
4
|
+
"pdContent.loadingstate.ariaLabel": string;
|
|
5
|
+
"pdContent.loadingstate.ariaLoading": string;
|
|
6
|
+
"pdContent.loadingstate.pleaseWait": string;
|
|
7
|
+
"pdContent.loadingstate.syncState": string;
|
|
8
|
+
"pd.edit.content.edit": string;
|
|
9
|
+
"pd.panel.viewer.aria.label": string;
|
|
10
|
+
"pd.panel.viewer.prev": string;
|
|
11
|
+
"pd.panel.viewer.next": string;
|
|
12
|
+
"pd.panel.viewer.progress": string;
|
|
13
|
+
"pd.panel.viewer.panel": string;
|
|
4
14
|
};
|
|
5
15
|
//# sourceMappingURL=be.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"be.d.ts","sourceRoot":"","sources":["../../../src/generated/locales/be.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,SAAS
|
|
1
|
+
{"version":3,"file":"be.d.ts","sourceRoot":"","sources":["../../../src/generated/locales/be.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,SAAS;;;;;;;;;;;;;CAarB,CAAC"}
|
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
export declare const templates: {
|
|
2
|
+
"pd.edit.content.edit": string;
|
|
2
3
|
"pd.moreInfo.more": string;
|
|
3
4
|
"pd.moreInfo.less": string;
|
|
5
|
+
"pd.panel.viewer.aria.label": string;
|
|
6
|
+
"pd.panel.viewer.prev": string;
|
|
7
|
+
"pd.panel.viewer.next": string;
|
|
8
|
+
"pd.panel.viewer.progress": string;
|
|
9
|
+
"pd.panel.viewer.panel": string;
|
|
10
|
+
"pdContent.loadingstate.ariaLabel": string;
|
|
11
|
+
"pdContent.loadingstate.ariaLoading": string;
|
|
12
|
+
"pdContent.loadingstate.syncState": string;
|
|
13
|
+
"pdContent.loadingstate.pleaseWait": string;
|
|
4
14
|
};
|
|
5
15
|
//# sourceMappingURL=de.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"de.d.ts","sourceRoot":"","sources":["../../../src/generated/locales/de.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,SAAS
|
|
1
|
+
{"version":3,"file":"de.d.ts","sourceRoot":"","sources":["../../../src/generated/locales/de.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,SAAS;;;;;;;;;;;;;CAarB,CAAC"}
|
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
export declare const templates: {
|
|
2
2
|
"pd.moreInfo.less": string;
|
|
3
3
|
"pd.moreInfo.more": string;
|
|
4
|
+
"pdContent.loadingstate.ariaLabel": string;
|
|
5
|
+
"pdContent.loadingstate.ariaLoading": string;
|
|
6
|
+
"pdContent.loadingstate.pleaseWait": string;
|
|
7
|
+
"pdContent.loadingstate.syncState": string;
|
|
8
|
+
"pd.edit.content.edit": string;
|
|
9
|
+
"pd.panel.viewer.aria.label": string;
|
|
10
|
+
"pd.panel.viewer.prev": string;
|
|
11
|
+
"pd.panel.viewer.next": string;
|
|
12
|
+
"pd.panel.viewer.progress": string;
|
|
13
|
+
"pd.panel.viewer.panel": string;
|
|
4
14
|
};
|
|
5
15
|
//# sourceMappingURL=en.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"en.d.ts","sourceRoot":"","sources":["../../../src/generated/locales/en.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,SAAS
|
|
1
|
+
{"version":3,"file":"en.d.ts","sourceRoot":"","sources":["../../../src/generated/locales/en.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,SAAS;;;;;;;;;;;;;CAarB,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -7,7 +7,14 @@ export { PdResizeContent } from './pd-resize-content/pd-resize-content.js';
|
|
|
7
7
|
export { PdTab } from './pd-tab/pd-tab.js';
|
|
8
8
|
export { PdPanel } from './pd-panel-viewer/pd-panel.js';
|
|
9
9
|
export { PdPanelViewer } from './pd-panel-viewer/pd-panel-viewer.js';
|
|
10
|
-
export
|
|
10
|
+
export { PdTimeline } from './pd-timeline/pd-timeline.js';
|
|
11
|
+
export { PdTimelineWizard } from './pd-timeline-wizard/pd-timeline-wizard.js';
|
|
12
|
+
export { PdLoadingState } from './pd-loading-state/pd-loading-state.js';
|
|
13
|
+
export { PdNoticeBox } from './pd-notice-box/pd-notice-box.js';
|
|
14
|
+
export { PdCodeSnippet } from './pd-code-snippet/pd-code-snippet.js';
|
|
15
|
+
export type { LoadingState, LoadingSubTask, } from './pd-loading-state/pd-loading-state.js';
|
|
16
|
+
export type { CodeLanguage } from './pd-code-snippet/pd-code-snippet.js';
|
|
17
|
+
export type { PdCollapseToggleEventDetail, PdEditLink, PdCollapseElement, NoticeType, NoticeVariant, TabHeader, } from './types.js';
|
|
11
18
|
export { templates as beTemplates } from './generated/locales/be.js';
|
|
12
19
|
export { templates as deTemplates } from './generated/locales/de.js';
|
|
13
20
|
export { templates as enTemplates } from './generated/locales/en.js';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AACzD,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,0CAA0C,CAAC;AAC3E,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AACrE,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAC5D,OAAO,EAAE,eAAe,EAAE,MAAM,0CAA0C,CAAC;AAC3E,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AAErE,YAAY,EACV,2BAA2B,EAC3B,UAAU,EACV,iBAAiB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AACzD,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,0CAA0C,CAAC;AAC3E,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AACrE,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAC5D,OAAO,EAAE,eAAe,EAAE,MAAM,0CAA0C,CAAC;AAC3E,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AACrE,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,4CAA4C,CAAC;AAC9E,OAAO,EAAE,cAAc,EAAE,MAAM,wCAAwC,CAAC;AACxE,OAAO,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAC/D,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AAErE,YAAY,EACV,YAAY,EACZ,cAAc,GACf,MAAM,wCAAwC,CAAC;AAEhD,YAAY,EAAE,YAAY,EAAE,MAAM,sCAAsC,CAAC;AAEzE,YAAY,EACV,2BAA2B,EAC3B,UAAU,EACV,iBAAiB,EACjB,UAAU,EACV,aAAa,EACb,SAAS,GACV,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAE,SAAS,IAAI,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACrE,OAAO,EAAE,SAAS,IAAI,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACrE,OAAO,EAAE,SAAS,IAAI,WAAW,EAAE,MAAM,2BAA2B,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -7,6 +7,11 @@ import './pd-resize-content.js';
|
|
|
7
7
|
import './pd-tab.js';
|
|
8
8
|
import './pd-panel.js';
|
|
9
9
|
import './pd-panel-viewer.js';
|
|
10
|
+
import './pd-timeline.js';
|
|
11
|
+
import './pd-timeline-wizard.js';
|
|
12
|
+
export { PdLoadingState } from './pd-loading-state/PdLoadingState.js';
|
|
13
|
+
import './pd-notice-box/pd-notice-box.js';
|
|
14
|
+
import './pd-code-snippet/pd-code-snippet.js';
|
|
10
15
|
export { templates as beTemplates } from './locales/be.js';
|
|
11
16
|
export { templates as deTemplates } from './locales/de.js';
|
|
12
17
|
export { templates as enTemplates } from './locales/en.js';
|
|
@@ -19,3 +24,7 @@ export { PdResizeContent } from './pd-resize-content/PdResizeContent.js';
|
|
|
19
24
|
export { PdTab } from './pd-tab/PdTab.js';
|
|
20
25
|
export { PdPanel } from './pd-panel-viewer/PdPanel.js';
|
|
21
26
|
export { PdPanelViewer } from './pd-panel-viewer/PdPanelViewer.js';
|
|
27
|
+
export { PdTimeline } from './pd-timeline/PdTimeline.js';
|
|
28
|
+
export { PdTimelineWizard } from './pd-timeline-wizard/PdTimelineWizard.js';
|
|
29
|
+
export { PdNoticeBox } from './pd-notice-box/PdNoticeBox.js';
|
|
30
|
+
export { PdCodeSnippet } from './pd-code-snippet/PdCodeSnippet.js';
|
package/dist/locales/be.js
CHANGED
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
const templates = {
|
|
2
2
|
"pd.moreInfo.less": `Minder informatie`,
|
|
3
|
-
"pd.moreInfo.more": `Meer informatie
|
|
3
|
+
"pd.moreInfo.more": `Meer informatie`,
|
|
4
|
+
"pdContent.loadingstate.ariaLabel": `Laadproces`,
|
|
5
|
+
"pdContent.loadingstate.ariaLoading": `Laden`,
|
|
6
|
+
"pdContent.loadingstate.pleaseWait": `Even geduld, gegevens worden geladen`,
|
|
7
|
+
"pdContent.loadingstate.syncState": `Gegevens worden gesynchroniseerd`,
|
|
8
|
+
"pd.edit.content.edit": `Edit`,
|
|
9
|
+
"pd.panel.viewer.aria.label": `Panel viewer`,
|
|
10
|
+
"pd.panel.viewer.prev": `Previous panel`,
|
|
11
|
+
"pd.panel.viewer.next": `Next panel`,
|
|
12
|
+
"pd.panel.viewer.progress": `Panel navigation`,
|
|
13
|
+
"pd.panel.viewer.panel": `Panel`
|
|
4
14
|
};
|
|
5
15
|
|
|
6
16
|
export { templates };
|
package/dist/locales/de.js
CHANGED
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
const templates = {
|
|
2
|
+
"pd.edit.content.edit": `Edit`,
|
|
2
3
|
"pd.moreInfo.more": `Mehr Informationen`,
|
|
3
|
-
"pd.moreInfo.less": `Text ausblenden
|
|
4
|
+
"pd.moreInfo.less": `Text ausblenden`,
|
|
5
|
+
"pd.panel.viewer.aria.label": `Panel viewer`,
|
|
6
|
+
"pd.panel.viewer.prev": `Previous panel`,
|
|
7
|
+
"pd.panel.viewer.next": `Next panel`,
|
|
8
|
+
"pd.panel.viewer.progress": `Panel navigation`,
|
|
9
|
+
"pd.panel.viewer.panel": `Panel`,
|
|
10
|
+
"pdContent.loadingstate.ariaLabel": `Ladevorgang`,
|
|
11
|
+
"pdContent.loadingstate.ariaLoading": `Laden`,
|
|
12
|
+
"pdContent.loadingstate.syncState": `Daten werden synchronisiert`,
|
|
13
|
+
"pdContent.loadingstate.pleaseWait": `Bitte warten, Daten werden geladen`
|
|
4
14
|
};
|
|
5
15
|
|
|
6
16
|
export { templates };
|
package/dist/locales/en.js
CHANGED
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
const templates = {
|
|
2
2
|
"pd.moreInfo.less": `Less information`,
|
|
3
|
-
"pd.moreInfo.more": `More information
|
|
3
|
+
"pd.moreInfo.more": `More information`,
|
|
4
|
+
"pdContent.loadingstate.ariaLabel": `Loading process`,
|
|
5
|
+
"pdContent.loadingstate.ariaLoading": `Loading`,
|
|
6
|
+
"pdContent.loadingstate.pleaseWait": `Please wait, data is being loaded`,
|
|
7
|
+
"pdContent.loadingstate.syncState": `Data is being synchronized`,
|
|
8
|
+
"pd.edit.content.edit": `Edit`,
|
|
9
|
+
"pd.panel.viewer.aria.label": `Panel viewer`,
|
|
10
|
+
"pd.panel.viewer.prev": `Previous panel`,
|
|
11
|
+
"pd.panel.viewer.next": `Next panel`,
|
|
12
|
+
"pd.panel.viewer.progress": `Panel navigation`,
|
|
13
|
+
"pd.panel.viewer.panel": `Panel`
|
|
4
14
|
};
|
|
5
15
|
|
|
6
16
|
export { templates };
|
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
(function (Prism) {
|
|
2
|
+
// $ set | grep '^[A-Z][^[:space:]]*=' | cut -d= -f1 | tr '\n' '|'
|
|
3
|
+
// + LC_ALL, RANDOM, REPLY, SECONDS.
|
|
4
|
+
// + make sure PS1..4 are here as they are not always set,
|
|
5
|
+
// - some useless things.
|
|
6
|
+
var envVars = '\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b';
|
|
7
|
+
|
|
8
|
+
var commandAfterHeredoc = {
|
|
9
|
+
pattern: /(^(["']?)\w+\2)[ \t]+\S.*/,
|
|
10
|
+
lookbehind: true,
|
|
11
|
+
alias: 'punctuation', // this looks reasonably well in all themes
|
|
12
|
+
inside: null // see below
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
var insideString = {
|
|
16
|
+
'bash': commandAfterHeredoc,
|
|
17
|
+
'environment': {
|
|
18
|
+
pattern: RegExp('\\$' + envVars),
|
|
19
|
+
alias: 'constant'
|
|
20
|
+
},
|
|
21
|
+
'variable': [
|
|
22
|
+
// [0]: Arithmetic Environment
|
|
23
|
+
{
|
|
24
|
+
pattern: /\$?\(\([\s\S]+?\)\)/,
|
|
25
|
+
greedy: true,
|
|
26
|
+
inside: {
|
|
27
|
+
// If there is a $ sign at the beginning highlight $(( and )) as variable
|
|
28
|
+
'variable': [
|
|
29
|
+
{
|
|
30
|
+
pattern: /(^\$\(\([\s\S]+)\)\)/,
|
|
31
|
+
lookbehind: true
|
|
32
|
+
},
|
|
33
|
+
/^\$\(\(/
|
|
34
|
+
],
|
|
35
|
+
'number': /\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,
|
|
36
|
+
// Operators according to https://www.gnu.org/software/bash/manual/bashref.html#Shell-Arithmetic
|
|
37
|
+
'operator': /--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/,
|
|
38
|
+
// If there is no $ sign at the beginning highlight (( and )) as punctuation
|
|
39
|
+
'punctuation': /\(\(?|\)\)?|,|;/
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
// [1]: Command Substitution
|
|
43
|
+
{
|
|
44
|
+
pattern: /\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,
|
|
45
|
+
greedy: true,
|
|
46
|
+
inside: {
|
|
47
|
+
'variable': /^\$\(|^`|\)$|`$/
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
// [2]: Brace expansion
|
|
51
|
+
{
|
|
52
|
+
pattern: /\$\{[^}]+\}/,
|
|
53
|
+
greedy: true,
|
|
54
|
+
inside: {
|
|
55
|
+
'operator': /:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,
|
|
56
|
+
'punctuation': /[\[\]]/,
|
|
57
|
+
'environment': {
|
|
58
|
+
pattern: RegExp('(\\{)' + envVars),
|
|
59
|
+
lookbehind: true,
|
|
60
|
+
alias: 'constant'
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
/\$(?:\w+|[#?*!@$])/
|
|
65
|
+
],
|
|
66
|
+
// Escape sequences from echo and printf's manuals, and escaped quotes.
|
|
67
|
+
'entity': /\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
Prism.languages.bash = {
|
|
71
|
+
'shebang': {
|
|
72
|
+
pattern: /^#!\s*\/.*/,
|
|
73
|
+
alias: 'important'
|
|
74
|
+
},
|
|
75
|
+
'comment': {
|
|
76
|
+
pattern: /(^|[^"{\\$])#.*/,
|
|
77
|
+
lookbehind: true
|
|
78
|
+
},
|
|
79
|
+
'function-name': [
|
|
80
|
+
// a) function foo {
|
|
81
|
+
// b) foo() {
|
|
82
|
+
// c) function foo() {
|
|
83
|
+
// but not “foo {”
|
|
84
|
+
{
|
|
85
|
+
// a) and c)
|
|
86
|
+
pattern: /(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,
|
|
87
|
+
lookbehind: true,
|
|
88
|
+
alias: 'function'
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
// b)
|
|
92
|
+
pattern: /\b[\w-]+(?=\s*\(\s*\)\s*\{)/,
|
|
93
|
+
alias: 'function'
|
|
94
|
+
}
|
|
95
|
+
],
|
|
96
|
+
// Highlight variable names as variables in for and select beginnings.
|
|
97
|
+
'for-or-select': {
|
|
98
|
+
pattern: /(\b(?:for|select)\s+)\w+(?=\s+in\s)/,
|
|
99
|
+
alias: 'variable',
|
|
100
|
+
lookbehind: true
|
|
101
|
+
},
|
|
102
|
+
// Highlight variable names as variables in the left-hand part
|
|
103
|
+
// of assignments (“=” and “+=”).
|
|
104
|
+
'assign-left': {
|
|
105
|
+
pattern: /(^|[\s;|&]|[<>]\()\w+(?:\.\w+)*(?=\+?=)/,
|
|
106
|
+
inside: {
|
|
107
|
+
'environment': {
|
|
108
|
+
pattern: RegExp('(^|[\\s;|&]|[<>]\\()' + envVars),
|
|
109
|
+
lookbehind: true,
|
|
110
|
+
alias: 'constant'
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
alias: 'variable',
|
|
114
|
+
lookbehind: true
|
|
115
|
+
},
|
|
116
|
+
// Highlight parameter names as variables
|
|
117
|
+
'parameter': {
|
|
118
|
+
pattern: /(^|\s)-{1,2}(?:\w+:[+-]?)?\w+(?:\.\w+)*(?=[=\s]|$)/,
|
|
119
|
+
alias: 'variable',
|
|
120
|
+
lookbehind: true
|
|
121
|
+
},
|
|
122
|
+
'string': [
|
|
123
|
+
// Support for Here-documents https://en.wikipedia.org/wiki/Here_document
|
|
124
|
+
{
|
|
125
|
+
pattern: /((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,
|
|
126
|
+
lookbehind: true,
|
|
127
|
+
greedy: true,
|
|
128
|
+
inside: insideString
|
|
129
|
+
},
|
|
130
|
+
// Here-document with quotes around the tag
|
|
131
|
+
// → No expansion (so no “inside”).
|
|
132
|
+
{
|
|
133
|
+
pattern: /((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,
|
|
134
|
+
lookbehind: true,
|
|
135
|
+
greedy: true,
|
|
136
|
+
inside: {
|
|
137
|
+
'bash': commandAfterHeredoc
|
|
138
|
+
}
|
|
139
|
+
},
|
|
140
|
+
// “Normal” string
|
|
141
|
+
{
|
|
142
|
+
// https://www.gnu.org/software/bash/manual/html_node/Double-Quotes.html
|
|
143
|
+
pattern: /(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,
|
|
144
|
+
lookbehind: true,
|
|
145
|
+
greedy: true,
|
|
146
|
+
inside: insideString
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
// https://www.gnu.org/software/bash/manual/html_node/Single-Quotes.html
|
|
150
|
+
pattern: /(^|[^$\\])'[^']*'/,
|
|
151
|
+
lookbehind: true,
|
|
152
|
+
greedy: true
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
// https://www.gnu.org/software/bash/manual/html_node/ANSI_002dC-Quoting.html
|
|
156
|
+
pattern: /\$'(?:[^'\\]|\\[\s\S])*'/,
|
|
157
|
+
greedy: true,
|
|
158
|
+
inside: {
|
|
159
|
+
'entity': insideString.entity
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
],
|
|
163
|
+
'environment': {
|
|
164
|
+
pattern: RegExp('\\$?' + envVars),
|
|
165
|
+
alias: 'constant'
|
|
166
|
+
},
|
|
167
|
+
'variable': insideString.variable,
|
|
168
|
+
'function': {
|
|
169
|
+
pattern: /(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cargo|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|java|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|sysctl|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,
|
|
170
|
+
lookbehind: true
|
|
171
|
+
},
|
|
172
|
+
'keyword': {
|
|
173
|
+
pattern: /(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/,
|
|
174
|
+
lookbehind: true
|
|
175
|
+
},
|
|
176
|
+
// https://www.gnu.org/software/bash/manual/html_node/Shell-Builtin-Commands.html
|
|
177
|
+
'builtin': {
|
|
178
|
+
pattern: /(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/,
|
|
179
|
+
lookbehind: true,
|
|
180
|
+
// Alias added to make those easier to distinguish from strings.
|
|
181
|
+
alias: 'class-name'
|
|
182
|
+
},
|
|
183
|
+
'boolean': {
|
|
184
|
+
pattern: /(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/,
|
|
185
|
+
lookbehind: true
|
|
186
|
+
},
|
|
187
|
+
'file-descriptor': {
|
|
188
|
+
pattern: /\B&\d\b/,
|
|
189
|
+
alias: 'important'
|
|
190
|
+
},
|
|
191
|
+
'operator': {
|
|
192
|
+
// Lots of redirections here, but not just that.
|
|
193
|
+
pattern: /\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/,
|
|
194
|
+
inside: {
|
|
195
|
+
'file-descriptor': {
|
|
196
|
+
pattern: /^\d/,
|
|
197
|
+
alias: 'important'
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
},
|
|
201
|
+
'punctuation': /\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,
|
|
202
|
+
'number': {
|
|
203
|
+
pattern: /(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,
|
|
204
|
+
lookbehind: true
|
|
205
|
+
}
|
|
206
|
+
};
|
|
207
|
+
|
|
208
|
+
commandAfterHeredoc.inside = Prism.languages.bash;
|
|
209
|
+
|
|
210
|
+
/* Patterns in command substitution. */
|
|
211
|
+
var toBeCopied = [
|
|
212
|
+
'comment',
|
|
213
|
+
'function-name',
|
|
214
|
+
'for-or-select',
|
|
215
|
+
'assign-left',
|
|
216
|
+
'parameter',
|
|
217
|
+
'string',
|
|
218
|
+
'environment',
|
|
219
|
+
'function',
|
|
220
|
+
'keyword',
|
|
221
|
+
'builtin',
|
|
222
|
+
'boolean',
|
|
223
|
+
'file-descriptor',
|
|
224
|
+
'operator',
|
|
225
|
+
'punctuation',
|
|
226
|
+
'number'
|
|
227
|
+
];
|
|
228
|
+
var inside = insideString.variable[1].inside;
|
|
229
|
+
for (var i = 0; i < toBeCopied.length; i++) {
|
|
230
|
+
inside[toBeCopied[i]] = Prism.languages.bash[toBeCopied[i]];
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
Prism.languages.sh = Prism.languages.bash;
|
|
234
|
+
Prism.languages.shell = Prism.languages.bash;
|
|
235
|
+
}(Prism));
|