@blazetrails/actiontext 0.0.0-stage → 0.1.0-alpha0.1
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 -0
- package/app/views/action-text/attachables/_content_attachment.html.tse +3 -0
- package/app/views/action-text/attachables/_missing_attachable.html.tse +1 -0
- package/app/views/action-text/attachables/_remote_image.html.tse +8 -0
- package/app/views/action-text/attachment-galleries/_attachment_gallery.html.tse +3 -0
- package/app/views/action-text/contents/_content.html.tse +1 -0
- package/app/views/active-storage/blobs/_blob.html.tse +14 -0
- package/app/views/layouts/action-text/contents/_content.html.tse +3 -0
- package/dist/.trails/views/action-text/attachables/_content_attachment.html.tse.js +35 -0
- package/dist/.trails/views/action-text/attachables/_content_attachment.html.tse.js.map +1 -0
- package/dist/.trails/views/action-text/attachables/_missing_attachable.html.tse.js +16 -0
- package/dist/.trails/views/action-text/attachables/_missing_attachable.html.tse.js.map +1 -0
- package/dist/.trails/views/action-text/attachables/_remote_image.html.tse.js +42 -0
- package/dist/.trails/views/action-text/attachables/_remote_image.html.tse.js.map +1 -0
- package/dist/.trails/views/action-text/attachment-galleries/_attachment_gallery.html.tse.js +37 -0
- package/dist/.trails/views/action-text/attachment-galleries/_attachment_gallery.html.tse.js.map +1 -0
- package/dist/.trails/views/action-text/contents/_content.html.tse.js +34 -0
- package/dist/.trails/views/action-text/contents/_content.html.tse.js.map +1 -0
- package/dist/.trails/views/active-storage/blobs/_blob.html.tse.js +57 -0
- package/dist/.trails/views/active-storage/blobs/_blob.html.tse.js.map +1 -0
- package/dist/.trails/views/layouts/action-text/contents/_content.html.tse.js +18 -0
- package/dist/.trails/views/layouts/action-text/contents/_content.html.tse.js.map +1 -0
- package/dist/action-text.js +73 -0
- package/dist/action-text.js.map +1 -0
- package/dist/app/helpers/action-text/content-helper.js +84 -0
- package/dist/app/helpers/action-text/content-helper.js.map +1 -0
- package/dist/app/helpers/action-text/tag-helper.js +115 -0
- package/dist/app/helpers/action-text/tag-helper.js.map +1 -0
- package/dist/app/views/action-text/attachables/_content_attachment.html.tse +3 -0
- package/dist/app/views/action-text/attachables/_missing_attachable.html.tse +1 -0
- package/dist/app/views/action-text/attachables/_remote_image.html.tse +8 -0
- package/dist/app/views/action-text/attachment-galleries/_attachment_gallery.html.tse +3 -0
- package/dist/app/views/action-text/contents/_content.html.tse +1 -0
- package/dist/app/views/active-storage/blobs/_blob.html.tse +14 -0
- package/dist/app/views/layouts/action-text/contents/_content.html.tse +3 -0
- package/dist/attachable.js +118 -0
- package/dist/attachable.js.map +1 -0
- package/dist/attachables/content-attachment.js +47 -0
- package/dist/attachables/content-attachment.js.map +1 -0
- package/dist/attachables/missing-attachable.js +30 -0
- package/dist/attachables/missing-attachable.js.map +1 -0
- package/dist/attachables/remote-image.js +46 -0
- package/dist/attachables/remote-image.js.map +1 -0
- package/dist/attachment-gallery.js +60 -0
- package/dist/attachment-gallery.js.map +1 -0
- package/dist/attachment.js +122 -0
- package/dist/attachment.js.map +1 -0
- package/dist/attachments/caching.js +17 -0
- package/dist/attachments/caching.js.map +1 -0
- package/dist/attachments/minification.js +15 -0
- package/dist/attachments/minification.js.map +1 -0
- package/dist/attachments/trix-conversion.js +37 -0
- package/dist/attachments/trix-conversion.js.map +1 -0
- package/dist/attribute.js +83 -0
- package/dist/attribute.js.map +1 -0
- package/dist/constants.encrypted-rich-text.generated.js +4 -0
- package/dist/constants.encrypted-rich-text.generated.js.map +1 -0
- package/dist/constants.generated.js +49 -0
- package/dist/constants.generated.js.map +1 -0
- package/dist/constants.rich-text.generated.js +4 -0
- package/dist/constants.rich-text.generated.js.map +1 -0
- package/dist/content.js +162 -0
- package/dist/content.js.map +1 -0
- package/dist/db/migrate/20180528164100_create_action_text_tables.js +31 -0
- package/dist/db/migrate/20180528164100_create_action_text_tables.js.map +1 -0
- package/dist/deprecator.js +8 -0
- package/dist/deprecator.js.map +1 -0
- package/dist/encrypted-rich-text.js +12 -0
- package/dist/encrypted-rich-text.js.map +1 -0
- package/dist/encryption.js +56 -0
- package/dist/encryption.js.map +1 -0
- package/dist/engine.js +124 -0
- package/dist/engine.js.map +1 -0
- package/dist/fixture-set.js +14 -0
- package/dist/fixture-set.js.map +1 -0
- package/dist/fragment.js +59 -0
- package/dist/fragment.js.map +1 -0
- package/dist/gem-version.js +18 -0
- package/dist/gem-version.js.map +1 -0
- package/dist/generators/action-text/install/install-generator.js +91 -0
- package/dist/generators/action-text/install/install-generator.js.map +1 -0
- package/dist/generators/action-text/install/templates/actiontext.css.tt +440 -0
- package/dist/generators/action-text/install/templates/actiontext.css.tt.js +12 -0
- package/dist/html-conversion.js +21 -0
- package/dist/html-conversion.js.map +1 -0
- package/dist/index.js +22 -0
- package/dist/index.js.map +1 -0
- package/dist/plain-text-conversion.js +126 -0
- package/dist/plain-text-conversion.js.map +1 -0
- package/dist/record.js +11 -0
- package/dist/record.js.map +1 -0
- package/dist/rendering.js +35 -0
- package/dist/rendering.js.map +1 -0
- package/dist/rich-text.js +70 -0
- package/dist/rich-text.js.map +1 -0
- package/dist/serialization.js +30 -0
- package/dist/serialization.js.map +1 -0
- package/dist/system-test-helper.js +38 -0
- package/dist/system-test-helper.js.map +1 -0
- package/dist/tasks/actiontext.rake.js +8 -0
- package/dist/tasks/actiontext.rake.js.map +1 -0
- package/dist/trails/generators/test-unit/install/install-generator.js +16 -0
- package/dist/trails/generators/test-unit/install/install-generator.js.map +1 -0
- package/dist/trails/generators/test-unit/install/templates/fixtures.yml.tt +4 -0
- package/dist/trails/generators/test-unit/install/templates/fixtures.yml.tt.js +12 -0
- package/dist/trix-attachment.js +105 -0
- package/dist/trix-attachment.js.map +1 -0
- package/dist/types/action-text.d.ts +75 -0
- package/dist/types/app/helpers/action-text/content-helper.d.ts +35 -0
- package/dist/types/app/helpers/action-text/tag-helper.d.ts +48 -0
- package/dist/types/attachable.d.ts +41 -0
- package/dist/types/attachables/content-attachment.d.ts +24 -0
- package/dist/types/attachables/missing-attachable.d.ts +9 -0
- package/dist/types/attachables/remote-image.d.ts +23 -0
- package/dist/types/attachment-gallery.d.ts +20 -0
- package/dist/types/attachment.d.ts +51 -0
- package/dist/types/attachments/caching.d.ts +15 -0
- package/dist/types/attachments/minification.d.ts +5 -0
- package/dist/types/attachments/trix-conversion.d.ts +17 -0
- package/dist/types/attribute.d.ts +27 -0
- package/dist/types/constants.encrypted-rich-text.generated.d.ts +2 -0
- package/dist/types/constants.generated.d.ts +2 -0
- package/dist/types/constants.rich-text.generated.d.ts +2 -0
- package/dist/types/content.d.ts +73 -0
- package/dist/types/db/migrate/20180528164100_create_action_text_tables.d.ts +9 -0
- package/dist/types/deprecator.d.ts +3 -0
- package/dist/types/encrypted-rich-text.d.ts +5 -0
- package/dist/types/encryption.d.ts +30 -0
- package/dist/types/engine.d.ts +27 -0
- package/dist/types/fixture-set.d.ts +6 -0
- package/dist/types/fragment.d.ts +19 -0
- package/dist/types/gem-version.d.ts +10 -0
- package/dist/types/generators/action-text/install/install-generator.d.ts +24 -0
- package/dist/types/html-conversion.d.ts +9 -0
- package/dist/types/index.d.ts +22 -0
- package/dist/types/plain-text-conversion.d.ts +41 -0
- package/dist/types/record.d.ts +4 -0
- package/dist/types/rendering.d.ts +15 -0
- package/dist/types/rich-text.d.ts +24 -0
- package/dist/types/serialization.d.ts +25 -0
- package/dist/types/system-test-helper.d.ts +18 -0
- package/dist/types/tasks/actiontext.rake.d.ts +2 -0
- package/dist/types/trails/generators/test-unit/install/install-generator.d.ts +5 -0
- package/dist/types/trix-attachment.d.ts +33 -0
- package/dist/types/version.d.ts +3 -0
- package/dist/version.js +7 -0
- package/dist/version.js.map +1 -0
- package/package.json +71 -3
- package/README.md +0 -3
package/dist/engine.js
ADDED
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import { OrderedOptions, TopLevel, onLoad } from "@blazetrails/activesupport";
|
|
2
|
+
import "@blazetrails/trailties/trailties/action-controller";
|
|
3
|
+
import "@blazetrails/trailties/trailties/active-record";
|
|
4
|
+
import { Engine as TrailsEngine } from "@blazetrails/trailties/engine";
|
|
5
|
+
import "@blazetrails/activestorage/engine";
|
|
6
|
+
import { File, include, prepend, rbFRequire, rbClearMethodCache } from "@blazetrails/ruby-compat";
|
|
7
|
+
import { ActionText } from "./action-text.js";
|
|
8
|
+
import { Attachable } from "./attachable.js";
|
|
9
|
+
import { Attachment } from "./attachment.js";
|
|
10
|
+
import { Attribute } from "./attribute.js";
|
|
11
|
+
import { Content } from "./content.js";
|
|
12
|
+
import { ContentHelper } from "./app/helpers/action-text/content-helper.js";
|
|
13
|
+
import { Encryption } from "./encryption.js";
|
|
14
|
+
import "./app/helpers/action-text/tag-helper.js";
|
|
15
|
+
import "./deprecator.js";
|
|
16
|
+
export class Engine extends TrailsEngine {
|
|
17
|
+
static {
|
|
18
|
+
TrailsEngine.register(this, import.meta.dirname);
|
|
19
|
+
this.isolateNamespace(ActionText);
|
|
20
|
+
this.config.eagerLoadNamespaces.push(ActionText);
|
|
21
|
+
this.config.paths().add("db/migrate", {
|
|
22
|
+
with: File.join(import.meta.dirname, "db", "migrate"),
|
|
23
|
+
});
|
|
24
|
+
this.config.paths().add("lib/tasks", {
|
|
25
|
+
with: File.join(import.meta.dirname, "tasks"),
|
|
26
|
+
glob: `*${File.extname(import.meta.filename)}`,
|
|
27
|
+
});
|
|
28
|
+
/** @inventedArm add — PERMANENT */
|
|
29
|
+
this.config.paths().add("app/helpers", {
|
|
30
|
+
with: File.join(import.meta.dirname, "app", "helpers"),
|
|
31
|
+
eagerLoad: true,
|
|
32
|
+
});
|
|
33
|
+
this.config.set("actionText", new OrderedOptions());
|
|
34
|
+
this.config.actionText.attachmentTagName = "action-text-attachment";
|
|
35
|
+
this.config.autoloadOncePaths = [
|
|
36
|
+
File.join(import.meta.dirname, "app", "helpers"),
|
|
37
|
+
File.join(import.meta.dirname, "app", "models"),
|
|
38
|
+
];
|
|
39
|
+
this.initializer("action_text.deprecator", { before: "load_environment_config" }, (app) => {
|
|
40
|
+
app.deprecators.set("actionText", ActionText.deprecator());
|
|
41
|
+
});
|
|
42
|
+
this.initializer("action_text.attribute", () => {
|
|
43
|
+
onLoad("active_record", function () {
|
|
44
|
+
include(this, Attribute);
|
|
45
|
+
prepend(this, Encryption);
|
|
46
|
+
});
|
|
47
|
+
});
|
|
48
|
+
this.initializer("action_text.asset", () => {
|
|
49
|
+
const config = TopLevel.Trails.application.config;
|
|
50
|
+
if (config.isRespondTo("assets")) {
|
|
51
|
+
const assets = config.get("assets");
|
|
52
|
+
assets.precompile = [
|
|
53
|
+
...assets.precompile,
|
|
54
|
+
"actiontext.js",
|
|
55
|
+
"actiontext.esm.js",
|
|
56
|
+
"trix.js",
|
|
57
|
+
"trix.css",
|
|
58
|
+
];
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
this.initializer("action_text.attachable", () => {
|
|
62
|
+
onLoad("active_storage_blob", function () {
|
|
63
|
+
include(this, Attachable);
|
|
64
|
+
Object.defineProperty(this.prototype, "isPreviewableAttachable", {
|
|
65
|
+
value: function () {
|
|
66
|
+
return this.isRepresentable();
|
|
67
|
+
},
|
|
68
|
+
writable: true,
|
|
69
|
+
configurable: true,
|
|
70
|
+
});
|
|
71
|
+
rbClearMethodCache();
|
|
72
|
+
Object.defineProperty(this.prototype, "attachablePlainTextRepresentation", {
|
|
73
|
+
value: function (caption = null) {
|
|
74
|
+
return `[${String(caption ?? this.filename)}]`;
|
|
75
|
+
},
|
|
76
|
+
writable: true,
|
|
77
|
+
configurable: true,
|
|
78
|
+
});
|
|
79
|
+
rbClearMethodCache();
|
|
80
|
+
Object.defineProperty(this.prototype, "toTrixContentAttachmentPartialPath", {
|
|
81
|
+
value: function () {
|
|
82
|
+
return null;
|
|
83
|
+
},
|
|
84
|
+
writable: true,
|
|
85
|
+
configurable: true,
|
|
86
|
+
});
|
|
87
|
+
rbClearMethodCache();
|
|
88
|
+
});
|
|
89
|
+
});
|
|
90
|
+
/** @inventedArm await — PERMANENT */
|
|
91
|
+
this.initializer("action_text.helper", async () => {
|
|
92
|
+
const helpers = await Engine.instance().helpers();
|
|
93
|
+
for (const base of ["action_controller_base", "action_mailer"]) {
|
|
94
|
+
onLoad(base, function () {
|
|
95
|
+
this.helper(helpers);
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
});
|
|
99
|
+
this.initializer("action_text.renderer", () => {
|
|
100
|
+
for (const base of ["action_controller_base", "action_mailer"]) {
|
|
101
|
+
onLoad(base, function () {
|
|
102
|
+
this.aroundAction((controller, action) => Content.withRenderer(controller, action));
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
});
|
|
106
|
+
this.initializer("action_text.system_test_helper", async () => {
|
|
107
|
+
await rbFRequire(ActionText.loadPath, "action_text/system_test_helper");
|
|
108
|
+
onLoad("action_dispatch_system_test_case", function () {
|
|
109
|
+
include(this, ActionText.SystemTestHelper);
|
|
110
|
+
});
|
|
111
|
+
});
|
|
112
|
+
this.initializer("action_text.configure", (app) => {
|
|
113
|
+
Attachment.tagName = app.config.actionText.attachmentTagName;
|
|
114
|
+
});
|
|
115
|
+
this.config.afterInitialize((app) => {
|
|
116
|
+
const klass = app.config.actionText.sanitizerVendor;
|
|
117
|
+
if (klass != null) {
|
|
118
|
+
ContentHelper.sanitizer = new klass.safeListSanitizer();
|
|
119
|
+
}
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
ActionText.Engine = Engine;
|
|
124
|
+
//# sourceMappingURL=engine.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"engine.js","sourceRoot":"","sources":["../lib/engine.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AAE9E,OAAO,oDAAoD,CAAC;AAC5D,OAAO,gDAAgD,CAAC;AACxD,OAAO,EAAE,MAAM,IAAI,YAAY,EAAE,MAAM,+BAA+B,CAAC;AACvE,OAAO,mCAAmC,CAAC;A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G,CAAC,MAAM,CAAC,UAAU,CAAC,eAAe,CAAC;YACpD,IAAI,KAAK,IAAI,IAAI,EAAE,CAAC;gBAClB,aAAa,CAAC,SAAS,GAAG,IAAI,KAAK,CAAC,iBAAiB,EAAE,CAAC;YAC1D,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC;CACF;AAED,UAAU,CAAC,MAAM,GAAG,MAAM,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { FixtureSet as ActiveRecordFixtureSet } from "@blazetrails/activerecord/fixtures.js";
|
|
2
|
+
import { ActionText } from "./action-text.js";
|
|
3
|
+
import { Attachable } from "./attachable.js";
|
|
4
|
+
export class FixtureSet {
|
|
5
|
+
static attachment(fixtureSetName, label, { columnType = ":integer" } = {}) {
|
|
6
|
+
const signedGlobalId = ActiveRecordFixtureSet.signedGlobalId(fixtureSetName, label, {
|
|
7
|
+
columnType: columnType,
|
|
8
|
+
for: Attachable.LOCATOR_NAME,
|
|
9
|
+
});
|
|
10
|
+
return `<action-text-attachment sgid="${signedGlobalId}"></action-text-attachment>`;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
ActionText.FixtureSet = FixtureSet;
|
|
14
|
+
//# sourceMappingURL=fixture-set.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fixture-set.js","sourceRoot":"","sources":["../lib/fixture-set.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,IAAI,sBAAsB,EAAE,MAAM,uCAAuC,CAAC;AAE7F,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE7C,MAAM,OAAO,UAAU;IACrB,MAAM,CAAC,UAAU,CACf,cAAsB,EACtB,KAAa,EACb,EAAE,UAAU,GAAG,UAAU,EAAE,GAA4B,EAAE;QAEzD,MAAM,cAAc,GAClB,sBACD,CAAC,cAAc,CAAC,cAAc,EAAE,KAAK,EAAE;YACtC,UAAU,EAAE,UAAU;YACtB,GAAG,EAAE,UAAU,CAAC,YAAY;SAC7B,CAAC,CAAC;QAEH,OAAO,iCAAiC,cAAc,6BAA6B,CAAC;IACtF,CAAC;CACF;AAED,UAAU,CAAC,UAAU,GAAG,UAAU,CAAC"}
|
package/dist/fragment.js
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { delegate } from "@blazetrails/activesupport";
|
|
2
|
+
import { XML } from "@blazetrails/nokogiri";
|
|
3
|
+
import { toS } from "@blazetrails/ruby-compat";
|
|
4
|
+
import { ActionText } from "./action-text.js";
|
|
5
|
+
import { HtmlConversion } from "./html-conversion.js";
|
|
6
|
+
import { PlainTextConversion } from "./plain-text-conversion.js";
|
|
7
|
+
export class Fragment {
|
|
8
|
+
static wrap(fragmentOrHtml) {
|
|
9
|
+
if (fragmentOrHtml instanceof this) {
|
|
10
|
+
return fragmentOrHtml;
|
|
11
|
+
}
|
|
12
|
+
else if (fragmentOrHtml instanceof XML.DocumentFragment) {
|
|
13
|
+
return new this(fragmentOrHtml);
|
|
14
|
+
}
|
|
15
|
+
else {
|
|
16
|
+
return this.fromHtml(fragmentOrHtml);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
static fromHtml(html) {
|
|
20
|
+
return new this(HtmlConversion.fragmentForHtml(toS(html).trim()));
|
|
21
|
+
}
|
|
22
|
+
source;
|
|
23
|
+
/** @internal */
|
|
24
|
+
plainText = null;
|
|
25
|
+
/** @internal */
|
|
26
|
+
html = null;
|
|
27
|
+
constructor(source) {
|
|
28
|
+
this.source = source;
|
|
29
|
+
}
|
|
30
|
+
findAll(selector) {
|
|
31
|
+
return this.source.css(selector);
|
|
32
|
+
}
|
|
33
|
+
async update(block) {
|
|
34
|
+
const source = this.source.dup();
|
|
35
|
+
await block(source);
|
|
36
|
+
return new this.constructor(source);
|
|
37
|
+
}
|
|
38
|
+
replace(selector, block) {
|
|
39
|
+
return this.update(async (source) => {
|
|
40
|
+
for (const node of source.css(selector).toA()) {
|
|
41
|
+
const replacementNode = await block(node);
|
|
42
|
+
if (!node.equals(replacementNode))
|
|
43
|
+
node.replace(String(replacementNode));
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
toPlainText() {
|
|
48
|
+
return (this.plainText ??= PlainTextConversion.nodeToPlainText(this.source));
|
|
49
|
+
}
|
|
50
|
+
toHtml() {
|
|
51
|
+
return (this.html ??= HtmlConversion.nodeToHtml(this.source));
|
|
52
|
+
}
|
|
53
|
+
toString() {
|
|
54
|
+
return this.toHtml();
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
delegate.call(Fragment.prototype, "deconstruct", { to: "source.elements" });
|
|
58
|
+
ActionText.Fragment = Fragment;
|
|
59
|
+
//# sourceMappingURL=fragment.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fragment.js","sourceRoot":"","sources":["../lib/fragment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AACtD,OAAO,EAAE,GAAG,EAA8C,MAAM,uBAAuB,CAAC;AACxF,OAAO,EAAE,GAAG,EAAE,MAAM,0BAA0B,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAEjE,MAAM,OAAO,QAAQ;IAGnB,MAAM,CAAC,IAAI,CAAC,cAAuB;QACjC,IAAI,cAAc,YAAY,IAAI,EAAE,CAAC;YACnC,OAAO,cAAc,CAAC;QACxB,CAAC;aAAM,IAAI,cAAc,YAAY,GAAG,CAAC,gBAAgB,EAAE,CAAC;YAC1D,OAAO,IAAI,IAAI,CAAC,cAAkD,CAAC,CAAC;QACtE,CAAC;aAAM,CAAC;YACN,OAAO,IAAI,CAAC,QAAQ,CAA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I,CAAC,MAAM,CAAC,CAAC,CAAC;IAC/E,CAAC;IAED,MAAM;QACJ,OAAO,CAAC,IAAI,CAAC,IAAI,KAAK,cAAc,CAAC,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;IAChE,CAAC;IAED,QAAQ;QACN,OAAO,IAAI,CAAC,MAAM,EAAE,CAAC;IACvB,CAAC;CACF;AAED,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC,SAAS,EAAE,aAAa,EAAE,EAAE,EAAE,EAAE,iBAAiB,EAAE,CAAC,CAAC;AAE5E,UAAU,CAAC,QAAQ,GAAG,QAAQ,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Gem } from "@blazetrails/ruby-compat";
|
|
2
|
+
import { ActionText } from "./action-text.js";
|
|
3
|
+
export function gemVersion() {
|
|
4
|
+
return new Gem.Version(VERSION.STRING);
|
|
5
|
+
}
|
|
6
|
+
const MAJOR = 8;
|
|
7
|
+
const MINOR = 0;
|
|
8
|
+
const TINY = 5;
|
|
9
|
+
const PRE = "2";
|
|
10
|
+
export const VERSION = {
|
|
11
|
+
MAJOR,
|
|
12
|
+
MINOR,
|
|
13
|
+
TINY,
|
|
14
|
+
PRE,
|
|
15
|
+
STRING: [MAJOR, MINOR, TINY, PRE].filter((p) => p != null).join("."),
|
|
16
|
+
};
|
|
17
|
+
ActionText.gemVersion = gemVersion;
|
|
18
|
+
//# sourceMappingURL=gem-version.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gem-version.js","sourceRoot":"","sources":["../lib/gem-version.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,0BAA0B,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE9C,MAAM,UAAU,UAAU;IACxB,OAAO,IAAI,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;AACzC,CAAC;AAED,MAAM,KAAK,GAAG,CAAC,CAAC;AAChB,MAAM,KAAK,GAAG,CAAC,CAAC;AAChB,MAAM,IAAI,GAAG,CAAC,CAAC;AACf,MAAM,GAAG,GAAkB,GAAG,CAAC;AAE/B,MAAM,CAAC,MAAM,OAAO,GAAG;IACrB,KAAK;IACL,KAAK;IACL,IAAI;IACJ,GAAG;IACH,MAAM,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC;CACrE,CAAC;AAEF,UAAU,CAAC,UAAU,GAAG,UAAU,CAAC"}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { File } from "@blazetrails/ruby-compat";
|
|
2
|
+
import { Base } from "@blazetrails/trailties/generators";
|
|
3
|
+
const __dir__ = File.dirname(decodeURIComponent(new URL(import.meta.url).pathname));
|
|
4
|
+
export class InstallGenerator extends Base {
|
|
5
|
+
static {
|
|
6
|
+
this.methodAdded("installJavascriptDependencies");
|
|
7
|
+
this.methodAdded("appendJavascriptDependencies");
|
|
8
|
+
this.methodAdded("createActiontextFiles");
|
|
9
|
+
this.methodAdded("enableImageProcessingGem");
|
|
10
|
+
this.methodAdded("createMigrations");
|
|
11
|
+
this.methodAdded("isUsingJsRuntime");
|
|
12
|
+
this.methodAdded("isUsingBun");
|
|
13
|
+
this.methodAdded("isUsingNode");
|
|
14
|
+
}
|
|
15
|
+
/** @internal */
|
|
16
|
+
_usingJsRuntime;
|
|
17
|
+
/** @internal */
|
|
18
|
+
_usingBun;
|
|
19
|
+
/** @internal */
|
|
20
|
+
_usingNode;
|
|
21
|
+
/** @missingRailsArgs run — PERMANENT */
|
|
22
|
+
async installJavascriptDependencies() {
|
|
23
|
+
this.say("Installing JavaScript dependencies", "green");
|
|
24
|
+
if (await this.isUsingBun()) {
|
|
25
|
+
await this.run("bun add @rails/actiontext trix");
|
|
26
|
+
}
|
|
27
|
+
else if (await this.isUsingNode()) {
|
|
28
|
+
await this.run("pnpm add @rails/actiontext trix");
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
async appendJavascriptDependencies() {
|
|
32
|
+
const destination = this.destinationRoot;
|
|
33
|
+
const applicationJavascriptPath = File.join(destination, "app/javascript/application.js");
|
|
34
|
+
if (await File.isExistAsync(applicationJavascriptPath)) {
|
|
35
|
+
await this.insertIntoFile(applicationJavascriptPath, `\nimport "trix"\nimport "@rails/actiontext"\n`);
|
|
36
|
+
}
|
|
37
|
+
else {
|
|
38
|
+
this.say("You must import the @rails/actiontext and trix JavaScript modules in your application entrypoint.\n", "green");
|
|
39
|
+
}
|
|
40
|
+
const importmapPath = File.join(destination, "config/importmap.rb");
|
|
41
|
+
if (await File.isExistAsync(importmapPath)) {
|
|
42
|
+
await this.appendToFile(importmapPath, `pin "trix"\npin "@rails/actiontext", to: "actiontext.esm.js"\n`);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
async createActiontextFiles() {
|
|
46
|
+
await this.template("actiontext.css", "app/assets/stylesheets/actiontext.css");
|
|
47
|
+
const gemRoot = `${__dir__}/../../../..`;
|
|
48
|
+
await this.copyFile(`${gemRoot}/app/views/active-storage/blobs/_blob.html.tse`, "app/views/active-storage/blobs/_blob.html.tse");
|
|
49
|
+
await this.copyFile(`${gemRoot}/app/views/layouts/action-text/contents/_content.html.tse`, "app/views/layouts/action-text/contents/_content.html.tse");
|
|
50
|
+
}
|
|
51
|
+
async enableImageProcessingGem() {
|
|
52
|
+
const gemfilePath = File.join(this.destinationRoot, "package.json");
|
|
53
|
+
if (await File.isExistAsync(gemfilePath)) {
|
|
54
|
+
this.say("Ensure image_processing gem has been enabled so image uploads will work (remember to bundle!)");
|
|
55
|
+
const imageProcessingRegex = /"@blazetrails\/image-processing"/;
|
|
56
|
+
if ((await File.readlinesAsync(gemfilePath)).filter((l) => imageProcessingRegex.test(l))
|
|
57
|
+
.length > 0) {
|
|
58
|
+
await this.uncommentLines(gemfilePath, imageProcessingRegex);
|
|
59
|
+
}
|
|
60
|
+
else {
|
|
61
|
+
await this.gem("@blazetrails/image-processing");
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
async createMigrations() {
|
|
66
|
+
await this.trailsCommand("railties:install:migrations FROM=active_storage,action_text", {
|
|
67
|
+
inline: true,
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
async isUsingJsRuntime() {
|
|
71
|
+
return (this._usingJsRuntime ||= await File.isExistAsync(File.join(this.destinationRoot, "package.json")));
|
|
72
|
+
}
|
|
73
|
+
async isUsingBun() {
|
|
74
|
+
return (this._usingBun ||=
|
|
75
|
+
(await this.isUsingJsRuntime()) &&
|
|
76
|
+
(await File.isExistAsync(File.join(this.destinationRoot, "bun.config.js"))));
|
|
77
|
+
}
|
|
78
|
+
async isUsingNode() {
|
|
79
|
+
return (this._usingNode ||=
|
|
80
|
+
(await this.isUsingJsRuntime()) &&
|
|
81
|
+
!(await File.isExistAsync(File.join(this.destinationRoot, "bun.config.js"))));
|
|
82
|
+
}
|
|
83
|
+
static {
|
|
84
|
+
this.hookFor("testFramework");
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
InstallGenerator.sourceRoot(File.expandPath("templates", __dir__));
|
|
88
|
+
Object.defineProperty(InstallGenerator, "name", {
|
|
89
|
+
value: "ActionText::Generators::InstallGenerator",
|
|
90
|
+
});
|
|
91
|
+
//# sourceMappingURL=install-generator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"install-generator.js","sourceRoot":"","sources":["../../../../lib/generators/action-text/install/install-generator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,0BAA0B,CAAC;AAEhD,OAAO,EAAE,IAAI,EAAE,MAAM,mCAAmC,CAAC;AAEzD,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,kBAAkB,CA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