Skip to content

Commit

Permalink
vaev-markup: Consolidated the html, xml, svg, and, mathml code into a…
Browse files Browse the repository at this point in the history
… single component.
  • Loading branch information
sleepy-monax committed Sep 2, 2024
1 parent d73d608 commit 715c340
Show file tree
Hide file tree
Showing 82 changed files with 2,445 additions and 2,825 deletions.
7 changes: 4 additions & 3 deletions src/web/vaev-base/font.h
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
#pragma once

#include <karm-mime/url.h>
#include <vaev-base/angle.h>
#include <vaev-base/length.h>
#include <vaev-base/percent.h>

#include "angle.h"
#include "length.h"
#include "percent.h"

namespace Vaev {

Expand Down
18 changes: 11 additions & 7 deletions src/web/vaev-devtools/app.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ enum struct SidePanel {

struct State {
Mime::Url url;
Res<Strong<Vaev::Dom::Document>> dom;
Res<Strong<Vaev::Markup::Document>> dom;
SidePanel sidePanel = SidePanel::CLOSE;

bool canGoBack() const {
Expand Down Expand Up @@ -88,7 +88,8 @@ Ui::Child addressBar(Mime::Url const &url) {
0,
Math::Align::CENTER,
Ui::text("{}", url),
Ui::grow(NONE)
Ui::grow(NONE),
Kr::contextMenuIcon(Model::bind<Reload>(), Mdi::REFRESH)
) |
Ui::box({
.padding = {12, 0, 0, 0},
Expand Down Expand Up @@ -170,7 +171,7 @@ Ui::Child appContent(State const &s) {
);
}

Ui::Child app(Mime::Url url, Res<Strong<Vaev::Dom::Document>> dom) {
Ui::Child app(Mime::Url url, Res<Strong<Vaev::Markup::Document>> dom) {
return Ui::reducer<Model>(
{
url,
Expand All @@ -186,10 +187,13 @@ Ui::Child app(Mime::Url url, Res<Strong<Vaev::Dom::Document>> dom) {
Ui::ButtonStyle::subtle(),
Mdi::SURFING
),
addressBar(s.url) | Ui::grow(), Ui::button(Model::bind<Reload>(), Ui::ButtonStyle::subtle(), Mdi::REFRESH), Ui::button([&](Ui::Node &n) {
Ui::showPopover(n, n.bound().bottomEnd(), mainMenu(s));
},
Ui::ButtonStyle::subtle(), Mdi::DOTS_HORIZONTAL),
addressBar(s.url) | Ui::grow(),
Ui::button(
[&](Ui::Node &n) {
Ui::showPopover(n, n.bound().bottomEnd(), mainMenu(s));
},
Ui::ButtonStyle::subtle(), Mdi::DOTS_HORIZONTAL
),
Hideo::controls()
) | Ui::dragRegion(),
appContent(s) | Ui::grow()
Expand Down
4 changes: 2 additions & 2 deletions src/web/vaev-devtools/app.h
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#pragma once

#include <karm-ui/node.h>
#include <vaev-dom/document.h>
#include <vaev-markup/dom.h>

namespace Hideo::Browser {

Ui::Child app(Mime::Url url, Res<Strong<Vaev::Dom::Document>> dom);
Ui::Child app(Mime::Url url, Res<Strong<Vaev::Markup::Document>> dom);

} // namespace Hideo::Browser
2 changes: 0 additions & 2 deletions src/web/vaev-devtools/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
"type": "exe",
"requires": [
"hideo-base",
"vaev-html",
"vaev-xml",
"vaev-view"
],
"provides": [
Expand Down
8 changes: 0 additions & 8 deletions src/web/vaev-dom/_mod.h

This file was deleted.

29 changes: 0 additions & 29 deletions src/web/vaev-dom/attr.h

This file was deleted.

38 changes: 0 additions & 38 deletions src/web/vaev-dom/character-data.h

This file was deleted.

18 changes: 0 additions & 18 deletions src/web/vaev-dom/comment.h

This file was deleted.

30 changes: 0 additions & 30 deletions src/web/vaev-dom/document-type.h

This file was deleted.

24 changes: 0 additions & 24 deletions src/web/vaev-dom/document.h

This file was deleted.

86 changes: 0 additions & 86 deletions src/web/vaev-dom/element.h

This file was deleted.

10 changes: 0 additions & 10 deletions src/web/vaev-dom/manifest.json

This file was deleted.

Loading

0 comments on commit 715c340

Please sign in to comment.