Changed the project structure for subsequent publication

This commit is contained in:
Artur
2025-09-19 17:38:51 +03:00
parent c9dbd77e27
commit cd379b9c3b
9 changed files with 4250 additions and 2 deletions

View File

@ -3,6 +3,7 @@
".dev/*",
"node_modules/*",
"src/*",
"*.map",
".browserslistrc",
".gitignore",
"LICENSE",

View File

@ -1,2 +1 @@
dist/*
temp-repo/*

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,108 @@
<!--
(c) Copyright Ascensio System SIA 2010-2025
This program is a free software product. You can redistribute it and/or
modify it under the terms of the GNU Affero General Public License (AGPL)
version 3 as published by the Free Software Foundation. In accordance with
Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
that Ascensio System SIA expressly excludes the warranty of non-infringement
of any third-party rights.
This program is distributed WITHOUT ANY WARRANTY; without even the implied
warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
You can contact Ascensio System SIA at 20A-6 Ernesta Birznieka-Upish
street, Riga, Latvia, EU, LV-1050.
The interactive user interfaces in modified source and object code versions
of the Program must display Appropriate Legal Notices, as required under
Section 5 of the GNU AGPL version 3.
Pursuant to Section 7(b) of the License you must retain the original Product
logo when distributing the program. Pursuant to Section 7(e) we decline to
grant you any rights under trademark law for use of our trademarks.
All the Product's GUI elements, including illustrations and icon sets, as
well as technical writing content are licensed under the terms of the
Creative Commons Attribution-ShareAlike 4.0 International. See the License
terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
-->
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<base href="../" />
<title>AI Constructor</title>
<link rel="stylesheet" href="dist/styles.css" />
<link
rel="stylesheet"
href="https://onlyoffice.github.io/sdkjs-plugins/v1/plugins.css"
/>
<script
type="text/javascript"
src="https://onlyoffice.github.io/sdkjs-plugins/v1/plugins.js"
></script>
<script
type="text/javascript"
src="https://onlyoffice.github.io/sdkjs-plugins/v1/plugins-ui.js"
></script>
<script></script>
</head>
<body class="">
<div id="overlay" class="overlay">
<div class="loader"></div>
<div class="overlay-close"></div>
</div>
<section class="content">
<div class="sidebar">
<div id="search" class="search">
<input
type="text"
id="searchFilter"
placeholder="Search icons"
/>
</div>
<div id="categories-container" class="categories-container">
<div id="categories" class="categories"></div>
</div>
</div>
<div id="icons-container" class="icons-container">
<div id="icons" class="icons"></div>
<div id="summary" class="summary">
<span id="total" class="total"></span>
<button id="clear" class="btn-text-default i18n">
Clear
</button>
</div>
</div>
</section>
<script>
function isBrowserSupportsES6() {
try {
new Function("let a = 1; const b = 2; class C {};");
return true;
} catch (e) {
return false;
}
}
if (isBrowserSupportsES6()) {
document.write(
'<script type="module" src="dist/bundle.modern.js" defer><\/script>'
);
} else {
document.write(
'<script src="dist/bundle.es5.js" defer><\/script>'
);
}
window.addEventListener("resize", onResize);
function onResize() {
const frameHeight = window.frameElement.offsetHeight;
document.body.style.height = `${frameHeight}px`;
}
onResize();
</script>
</body>
</html>

View File

@ -0,0 +1,125 @@
body.light {
--font-color: #323130;
--font-color-hover: #000000;
--color-pad: rgba(0, 0, 0, 0.02);
--color-pad-hover: rgba(0, 0, 0, 0.1);
--color-pad-selected: rgba(0, 0, 0, 0.2);
--color-summary: rgba(255, 255, 255, 0.2);
}
body.dark {
--font-color: #d9d9d9;
--font-color-hover: #ffffff;
--color-pad: rgba(255, 255, 255, 0.02);
--color-pad-hover: rgba(255, 255, 255, 0.1);
--color-pad-selected: rgba(255, 255, 255, 0.2);
--color-summary: #404040;
}
body {
margin: 0;
}
.content {
overflow-y: auto;
height: inherit;
display: flex;
box-sizing: border-box;
}
.sidebar {
height: 100%;
min-width: 215px;
box-sizing: border-box;
.search {
margin: 4px 12px;
height: 30px;
box-sizing: border-box;
input {
height: 30px;
width: calc(100% - 12px);
box-sizing: border-box;
}
}
.categories-container {
height: calc(100% - 38px);
overflow-y: scroll;
box-sizing: border-box;
background-color: var(--color-pad);
}
.category {
cursor: pointer;
color: var(--font-color);
user-select: none;
line-height: 22px;
position: relative;
&::before {
content: "📁 ";
position: absolute;
left: 4px;
}
&.selected {
background: var(--color-pad-selected);
&::before {
content: "✅ ";
}
}
.category-name {
display: block;
min-width: 160px;
box-sizing: border-box;
padding: 4px 12px 4px 33px;
border-radius: 3px;
&:hover {
color: var(--font-color-hover);
background-color: var(--color-pad-hover);
}
}
}
}
.icons-container {
height: 100%;
width: 100%;
box-sizing: border-box;
.icons {
height: calc(100% - 20px);
padding: 12px;
box-sizing: border-box;
overflow-y: scroll;
display: flex;
flex-wrap: wrap;
justify-content: space-between;
align-content: flex-start;
gap: 5px;
.icon {
color: var(--font-color);
width: 48px;
height: 48px;
background: var(--color-pad);
&:hover {
color: var(--font-color-hover);
background: var(--color-pad-hover);
}
&:focus {
box-shadow: 0 0 0 2px var(--color-pad-hover);
}
&.selected {
background: var(--color-pad-selected);
}
}
}
.summary {
height: 20px;
padding: 0 12px;
line-height: 20px;
text-align: right;
background: var(--color-summary);
box-shadow: 2px 0 2px 0 var(--font-color);
button {
cursor: default;
height: 18px;
}
}
}

View File

@ -101,7 +101,7 @@ class IconsPlugin {
Asc.scope.editor = Asc.plugin.info.editorType;
Asc.scope.parsedSvgs = parsed;
const isCalc = true;
const isClose = false;
const isClose = true;
Asc.plugin.callCommand(
Commands.insertIcon,
isClose,