Skip to content

Commit

Permalink
Merge branch 'candidate-3.x.x' into trunk
Browse files Browse the repository at this point in the history
  • Loading branch information
GordonSmith committed Nov 14, 2024
2 parents 2027d3e + b5ec5b7 commit a4fe6c7
Show file tree
Hide file tree
Showing 479 changed files with 389,413 additions and 11,936 deletions.
File renamed without changes.
4 changes: 2 additions & 2 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ permissions:
contents: write
pull-requests: write

name: release-please
name: PR Test and Release

jobs:
release-please:
runs-on: ubuntu-latest
steps:
- name: Initialize Release Please
id: release
if: ${{ github.event_name == 'push' }}
if: ${{ github.event_name == 'push' }}
uses: googleapis/release-please-action@v4
with:
target-branch: ${{ github.ref_name }}
Expand Down
38 changes: 27 additions & 11 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,29 @@
{
".": "3.0.0",
"packages/api": "3.0.0",
"packages/chart": "3.0.0",
"packages/common": "3.0.0",
"packages/comms": "3.0.0",
"packages/dataflow": "9.0.0",
"packages/esbuild-plugins": "1.1.2",
"packages/markdown-it-plugins": "1.0.0",
"packages/observable-shim": "3.0.0",
"packages/observablehq-compiler": "1.3.0",
"packages/util": "3.0.0"
".": "3.1.2",
"packages/api": "3.1.0",
"packages/chart": "3.1.0",
"packages/codemirror": "3.0.0",
"packages/common": "3.1.0",
"packages/comms": "3.1.0",
"packages/composite": "3.0.0",
"packages/dataflow": "9.1.0",
"packages/dgrid": "3.0.0",
"packages/dgrid-shim": "3.0.0",
"packages/dgrid2": "3.0.0",
"packages/eclwatch": "3.0.0",
"packages/esbuild-plugins": "1.2.0",
"packages/form": "3.0.0",
"packages/graph": "3.0.0",
"packages/html": "3.0.0",
"packages/layout": "3.0.0",
"packages/map": "3.0.0",
"packages/map-deck": "3.0.0",
"packages/markdown-it-plugins": "1.1.2",
"packages/observablehq-compiler": "3.1.0",
"packages/other": "3.0.0",
"packages/phosphor": "3.0.0",
"packages/react": "3.0.0",
"packages/timeline": "3.0.0",
"packages/tree": "3.0.0",
"packages/util": "3.1.0"
}
318 changes: 39 additions & 279 deletions .vitepress/config.ts
Original file line number Diff line number Diff line change
@@ -1,287 +1,47 @@
import { ApiClass, ApiItem, ApiModel, ApiProperty } from "@microsoft/api-extractor-model";
import path from "path";
import { IndentedWriter, writeApiItem } from "./mdWriter";

function getGuideSidebar() {
return [
{
text: "Introduction",
children: [
{ text: "Getting Started", link: "/README" }
]
import { defineConfig } from "vitepress";
import { observable } from "@hpcc-js/markdown-it-plugins";
import { eclLang } from "@hpcc-js/markdown-it-plugins/ecl-lang";

// https://vitepress.dev/reference/site-config
export default async () => {

return defineConfig({
title: "@hpcc-js/Visualization",
description: "HPCC Systems JavaScript Library",
base: "/Visualization/",
srcDir: ".",
rewrites: {
},
{
text: "Advanced",
children: [{ text: "API Reference", link: "/docs/api/hpcc-js" }]
}
];
}

// Keep in sync with: ../components/README.md

function getComponentsSidebar() {
return [
{
text: "Editors",
children: [
{ text: "CodeMirror", link: "/components/editor/src/codemirror" },
{ text: "Preview", link: "/components/preview/src/preview" },
]
}, {
text: "Observable HQ",
children: [
{ text: "Getting Started", link: "/components/observable/README" },
{ text: "Observable Script", link: "/components/observable/src/observable" },
]
}, {
text: "Layouts",
children: [
{ text: "Getting Started", link: "/components/layout/README" },
{ text: "Dock Panel", link: "/components/layout/src/lumino/dockPanel" },
{ text: "Drag and Zoom", link: "/components/layout/src/zoom" },
{ text: "Split Panel", link: "/components/layout/src/lumino/splitPanel" },
{ text: "Tab Panel", link: "/components/layout/src/lumino/tabPanel" },
]
}//, {
// text: "Visualizations",
// children: [
// { text: "Gauge", link: "/components/gauge/src/gauge" },
// { text: "Half Pie", link: "/components/pie/src/halfpie" },
// { text: "Observable JS", link: "/components/observable/src/observable" },
// { text: "Pie", link: "/components/pie/src/pie" },
// { text: "Quarter Pie", link: "/components/pie/src/quarterpie" },
// { text: "Sankey", link: "/components/sankey/src/sankey" },
// { text: "Treemap", link: "/components/treemap/src/treemap" },
// ]
// }
];
}

function getVisualizationsSidebar() {
return [
{
text: "Charts",
children: [
{ text: "Getting Started", link: "/packages/chart/README" },
{ text: "Area", link: "/packages/chart/src/Area" },
{ text: "Bar", link: "/packages/chart/src/Bar" },
{ text: "Bubble", link: "/packages/chart/src/Bubble" },
{ text: "Bullet", link: "/packages/chart/src/Bullet" },
{ text: "Column", link: "/packages/chart/src/Column" },
{ text: "Contour", link: "/packages/chart/src/Contour" },
{ text: "Gantt", link: "/packages/chart/src/Gantt" },
{ text: "Gauge", link: "/packages/chart/src/Gauge" },
{ text: "Half Pie", link: "/packages/chart/src/HalfPie" },
{ text: "Heat", link: "/packages/chart/src/Heat" },
{ text: "Hex Bin", link: "/packages/chart/src/HexBin" },
{ text: "Line", link: "/packages/chart/src/Line" },
{ text: "Pie", link: "/packages/chart/src/Pie" },
{ text: "Quarter Pie", link: "/packages/chart/src/QuarterPie" },
{ text: "Quartile Candlestick", link: "/packages/chart/src/QuartileCandlestick" },
{ text: "Radar", link: "/packages/chart/src/Radar" },
{ text: "Radial Bar", link: "/packages/chart/src/RadialBar" },
{ text: "Scatter", link: "/packages/chart/src/Scatter" },
{ text: "Stat Chart", link: "/packages/chart/src/StatChart" },
{ text: "Step", link: "/packages/chart/src/Step" },
{ text: "Summary", link: "/packages/chart/src/Summary" },
{ text: "Summary (Canvas)", link: "/packages/chart/src/SummaryC" },
{ text: "Word Cloud", link: "/packages/chart/src/WordCloud" },
{ text: "XYAxis", link: "/packages/chart/src/XYAxis" },
]
}, {
text: "Editors",
children: [
{ text: "Getting Started", link: "/packages/codemirror/README" },
]
}, {
text: "Grids",
children: [
{ text: "Getting Started", link: "/packages/dgrid2/README" },
{ text: "Table", link: "/packages/dgrid2/src/table" },
]
}, {
text: "Graphs",
children: [
{ text: "Getting Started", link: "/packages/graph/README" },
]
}, {
text: "Layouts",
children: [
{ text: "Getting Started", link: "/packages/layout/README" },
]
}, {
text: "Geospatial 2D",
children: [
{ text: "Getting Started", link: "/packages/map/README" },
]
}, {
text: "Geospatial 3D",
children: [
{ text: "Getting Started", link: "/packages/map-deck/README" },
]
}, {
text: "Observable HQ",
children: [
{ text: "Getting Started", link: "/packages/observablehq-compiler/README" },
{ text: "Compiler", link: "/packages/observablehq-compiler/src/compiler" },
{ text: "Utilities", link: "/packages/observablehq-compiler/src/util" },
]
}, {
text: "Timelines",
children: [
{ text: "Getting Started", link: "/packages/timeline/README" },
]
}, {
text: "Hierarchy",
children: [
{ text: "Getting Started", link: "/packages/tree/README" },
]
}
];
}

module.exports = {
lang: "en-US",
title: "@hpcc-js/Visualization",
description: "HPCC Systems JavaScript Library",
base: "/Visualization/",

head: [
['link', { rel: 'icon', type: 'image/x-icon', href: '/Visualization/resources/favicon.ico' }],
],
lastUpdated: true,
themeConfig: {
// https://vitepress.dev/reference/default-theme-config
nav: [
{ text: "Home", link: "/" },
{ text: "Getting Started", link: "/README" },
],

sidebar: [
{ text: "Getting Started", link: "/README" },
{
text: "Documentation",
items: [
]
}
],

themeConfig: {
repo: "hpcc-systems/Visualization",
docsDir: "",
docsBranch: "trunk",
editLinks: true,
editLinkText: "Edit this page on GitHub",
lastUpdated: "Last Updated",
socialLinks: [
{ icon: "github", link: "https://github.com/hpcc-systems/visualization" }
],

nav: [
{
text: "Guide",
link: "/README",
activeMatch: "^/README"
},
{
text: "Web Components",
link: "/components/README",
activeMatch: "^/components/"
},
{
text: "Visualizations",
link: "/packages/README",
activeMatch: "^/packages/"
},
markdown: {
// https://github.com/vuejs/vitepress/blob/main/src/node/markdown/markdown.ts
config: md => {
md.use(observable, { vitePress: true });
},
{
text: "Release Notes",
link: "https://github.com/hpcc-systems/Visualization/releases"
}
],

sidebar: {
"/README": getGuideSidebar(),
"/components": getComponentsSidebar(),
"/packages": getVisualizationsSidebar()
languages: [eclLang()],
}
},

vue: {
template: {
compilerOptions: {
isCustomElement: (tag) => {
return tag.toLowerCase().indexOf("hpcc-") === 0;
}
}
}
},

markdown: {
config: (md) => {
const structs: { [id: string]: ApiItem } = {};
const props: { [id: string]: ApiItem } = {};

let allMeta = {};
try {
allMeta = require(path.join(__dirname, "../temp/hpcc-js.meta.json"));
} catch (e) {
// File might not exit yet ---
}

function writeAttributes(struct: ApiItem, writer: IndentedWriter, isAttribute: boolean = true): boolean {
let retVal = false;
const structClass = struct as ApiClass;
// writer.writeLine(struct.displayName);
const baseClass = structs[structClass.extendsType?.excerpt?.text?.trim()];
if (baseClass) {
retVal = writeAttributes(baseClass, writer, isAttribute);
}
const classMeta = allMeta[struct.displayName] ?? { observed: {} };
for (const prop of struct.members) {
const propMeta = classMeta.observed[prop.displayName];
if ((prop as ApiProperty).tsdocComment) {
if (propMeta === undefined || propMeta.isAttribute === isAttribute) {
if (writeApiItem(prop, { writer }, false)) {
retVal = true;
}
}
}
}
return retVal;
}

md.core.ruler.before("normalize", "types", function replace(state) {
const apiModel = new ApiModel();
let apiPackage;
try {
apiPackage = apiModel.loadPackage("./temp/hpcc-js.api.json");
} catch (e) {
// File might not exit yet ---
}

apiPackage?.members.forEach(entyrPoint => {
for (const struct of entyrPoint.members) {
// if (struct.displayName.indexOf("HPCC") === 0 && struct.displayName.indexOf("Element") > 0) {
structs[struct.displayName] = struct;
for (const prop of struct.members) {
props[struct.displayName + "." + prop.displayName] = prop;
}
// }
}
});

for (const key in structs) {
const struct = structs[key];
const search = `## \`${key}\``;
if (state.src.indexOf(search) >= 0) {
let replacement = "";
const attrWriter = new IndentedWriter();
attrWriter.writeLine(`## Attributes`);
attrWriter.writeLine();
if (writeAttributes(struct, attrWriter, true)) {
replacement += attrWriter.toString();
}
const propWriter = new IndentedWriter();
propWriter.writeLine(`## Properties`);
propWriter.writeLine();
if (writeAttributes(struct, propWriter, false)) {
replacement += propWriter.toString();
}
state.src = state.src.split(search).join(replacement);
}
}

for (const key in props) {
const search = `### \`${key}\``;
if (state.src.indexOf(search) >= 0) {
const prop = props[key];
const writer = new IndentedWriter();
writeApiItem(prop, { writer }, false);
state.src = state.src.split(search).join(writer.toString());
}
}
});
}
}
});
};
Loading

0 comments on commit a4fe6c7

Please sign in to comment.