Skip to content

Commit

Permalink
Merge branch 'main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelfig authored Dec 2, 2023
2 parents 0bc3ed9 + 8fe8467 commit eb4bfe6
Show file tree
Hide file tree
Showing 8 changed files with 73 additions and 13 deletions.
55 changes: 50 additions & 5 deletions main/.vuepress/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,57 @@ module.exports = {
}
});
if (location.hash) {
// Re-navigate to the page target once content has loaded.
if (location.hash && location.hash !== '#') {
// Once content has loaded, re-navigate to the page target
// without triggering interfering router/history/scroll logic.
const hash = location.hash;
fixups.set(['main'], _elems => {
const old = location.hash;
location.hash = '';
location.hash = old;
const stopPropagation = evt => {
evt.stopImmediatePropagation();
const props = {};
const proto = Object.getPrototypeOf(evt);
const propSource = proto === Event.prototype ? {} : proto;
for (const name of Object.getOwnPropertyNames(propSource)) {
if (name !== 'constructor') props[name] = evt[name];
}
console.log('suppress', evt.type, { __proto__: evt, ...props });
};
const stopEvents = types => {
const restorers = types.map(type => {
window.addEventListener(type, stopPropagation, true);
return () => window.removeEventListener(type, stopPropagation, true);
});
const passEvents = () => {
// Run and drop references to all restore functions.
while (restorers.length > 0) restorers.pop()();
};
return passEvents;
};
// Navigate to the page itself as a blank slate.
const passStateEvents = stopEvents(['hashchange', 'popstate']);
const passScrollEvents = stopEvents(['scroll']);
location.replace('#');
// Restore state-change events, then navigate back to the target.
passStateEvents();
try {
const target = document.getElementById(decodeURIComponent(hash.slice(1)));
if (target && target.innerHTML.trim() === '') {
document.documentElement.classList.add('scrollingToTarget');
target.scrollIntoView({ behavior: 'instant' });
document.documentElement.classList.remove('scrollingToTarget');
}
} catch (err) {
console.warn(err);
}
location.replace(hash);
// Restore scroll events and create a new history entry to be overridden
// if the initial target lacks a TOC entry to highlight.
passScrollEvents();
history.pushState(null, '', hash);
});
}
Expand Down
4 changes: 4 additions & 0 deletions main/.vuepress/styles/index.styl
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,10 @@
}
}

:root.scrollingToTarget {
scroll-padding-top: $navbarHeight;
}

.ag-btn
background-color $accentColor
color $white
Expand Down
6 changes: 3 additions & 3 deletions main/glossary/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ appropriately branded assets to the purse, but cannot withdraw assets from the p
## dIBC

Dynamic version of the [Inter-Blockchain Communication](#ibc) protocol.
See [here](https://github.com/Agoric/agoric-sdk/blob/HEAD/packages/SwingSet/docs/networking.md) for more details.
For more details, see the [agoric-sdk `network` package](https://github.com/Agoric/agoric-sdk/tree/master/packages/network).

## E()

Expand Down Expand Up @@ -280,8 +280,8 @@ Guide](https://github.com/endojs/endo/blob/HEAD/packages/ses/docs/guide.md) for

## IBC

The Inter-Blockchain Communication protocol, used by blockchains to communicate with each other. A short article about IBC
is available [here](https://www.computerweekly.com/blog/Open-Source-Insider/What-developers-need-to-know-about-inter-blockchain-communication).
The Inter-Blockchain Communication protocol, used by blockchains to communicate with each other.
For more details, see [What developers need to know about inter-blockchain communication](https://www.computerweekly.com/blog/Open-Source-Insider/What-developers-need-to-know-about-inter-blockchain-communication).

## Invitation

Expand Down
10 changes: 10 additions & 0 deletions main/guides/getting-started/start-a-project.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,16 @@
After you've [installed the Agoric SDK](./README.md) (_recall: use `agoric --version` to confirm._), you're ready for your first _Agoric Dapp_ (decentralized application).


::: tip Beta Dapp Architecture
The Dapp architecture presented here is a beta preview of
our eventual permissionless contract deployment model,
extending our [Distributed Computing Framework](../js-programming/)
to a stateful peer on end-user machines.

The [Mainnet-1 launch](https://agoric.com/blog/announcements/agoric-composable-smart-contract-framework-reaches-mainnet-1-milestone)
uses a ["smart wallet" architecture](./contract-rpc.md) with a lower client-side footprint.
:::

We'll be running **three terminal windows**. See below:

1. ```sh
Expand Down
2 changes: 1 addition & 1 deletion main/guides/getting-started/syncing-up.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ produced a handful of blocks with the `agoric-upgrade-8` upgrade.

The `agoric-upgrade-9` release requires Go version 1.18 or higher.

1. `git clone https://github.com/agoric/agoric-sdk.git; agoric-sdk && git checkout tags/agoric-upgrade-9`
1. `git clone https://github.com/agoric/agoric-sdk.git; cd agoric-sdk && git checkout tags/agoric-upgrade-9`
1. `yarn install && yarn build`
1. `(cd packages/cosmic-swingset && make)`
1. `agd start`
2 changes: 1 addition & 1 deletion main/guides/js-programming/notifiers.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ many clients to receive notifications without the originator having to track a s
An object wanting to publish updates to interested clients makes a notifier or a
subscription available to them.

In JavaScript, async iterations are manipulated by `AsyncGenerators`, `AsyncIterables`, and `AsyncIterators`. For an introduction to them, see [here](https://javascript.info/async-iterators-generators).
In JavaScript, async iterations are manipulated by `AsyncGenerators`, `AsyncIterables`, and `AsyncIterators`. For an introduction to them, see [Async iteration and generators](https://javascript.info/async-iterators-generators).

## Distributed Asynchronous Iteration

Expand Down
5 changes: 3 additions & 2 deletions main/reference/repl/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# Agoric REPL

**Note**: This page describes the Agoric REPL. For information about the `Node.js` REPL,
click [here](https://nodejs.org/api/repl.html).
**Note**: This page describes the Agoric REPL.
If you are instead looking for information about `node` or the Node.js REPL, see
[Node.js documentation](https://nodejs.org/api/repl.html).

## Introduction

Expand Down
2 changes: 1 addition & 1 deletion main/reference/zoe-api/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ what you're willing to offer. It turns out, many smart contracts (apart from gif
involve an exchange of digital assets that can be put in terms of offer proposals.

Start creating your own contract or build on any of our existing contracts.
Explore our pre-built contracts [here](/guides/zoe/contracts/README.md).
Explore our [pre-built contracts](/guides/zoe/contracts/README.md).

The Zoe API supports the following objects:

Expand Down

0 comments on commit eb4bfe6

Please sign in to comment.