@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
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Concern, type Extended } from "@blazetrails/activesupport";
|
|
2
|
+
interface SerializationHost {
|
|
3
|
+
prototype: {
|
|
4
|
+
toHtml(): string;
|
|
5
|
+
};
|
|
6
|
+
"new"(content: unknown): Promise<{
|
|
7
|
+
toHtml(): string;
|
|
8
|
+
}>;
|
|
9
|
+
}
|
|
10
|
+
declare function load(this: SerializationHost, content: unknown): unknown;
|
|
11
|
+
declare function dump(this: SerializationHost, content: unknown): string | null | Promise<string | null>;
|
|
12
|
+
declare const ClassMethods: {
|
|
13
|
+
load: typeof load;
|
|
14
|
+
dump: typeof dump;
|
|
15
|
+
_load: typeof load;
|
|
16
|
+
};
|
|
17
|
+
declare function _dump(this: {
|
|
18
|
+
constructor: unknown;
|
|
19
|
+
}, ..._args: unknown[]): string | null;
|
|
20
|
+
export declare const Serialization: Extended<typeof Concern> & {
|
|
21
|
+
_dump: typeof _dump;
|
|
22
|
+
ClassMethods: typeof ClassMethods;
|
|
23
|
+
};
|
|
24
|
+
export {};
|
|
25
|
+
//# sourceMappingURL=serialization.d.ts.map
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
type SystemTestHost = {
|
|
2
|
+
page(): Promise<{
|
|
3
|
+
locator(selector: string): {
|
|
4
|
+
evaluate<A>(fn: (element: unknown, arg: A) => void, arg: A): Promise<void>;
|
|
5
|
+
};
|
|
6
|
+
}>;
|
|
7
|
+
};
|
|
8
|
+
declare function fillInRichTextarea(this: SystemTestHost, locator?: string | null | {
|
|
9
|
+
with?: unknown;
|
|
10
|
+
}, options?: {
|
|
11
|
+
with?: unknown;
|
|
12
|
+
}): Promise<void>;
|
|
13
|
+
export declare const SystemTestHelper: {
|
|
14
|
+
fillInRichTextarea: typeof fillInRichTextarea;
|
|
15
|
+
fillInRichTextArea: typeof fillInRichTextarea;
|
|
16
|
+
};
|
|
17
|
+
export {};
|
|
18
|
+
//# sourceMappingURL=system-test-helper.d.ts.map
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { Html5Node } from "@blazetrails/nokogiri";
|
|
2
|
+
type Typecast = (value: unknown) => unknown;
|
|
3
|
+
export declare class TrixAttachment {
|
|
4
|
+
static readonly TAG_NAME = "figure";
|
|
5
|
+
static readonly SELECTOR = "[data-trix-attachment]";
|
|
6
|
+
static readonly COMPOSED_ATTRIBUTES: string[];
|
|
7
|
+
static readonly ATTRIBUTES: string[];
|
|
8
|
+
static readonly ATTRIBUTE_TYPES: Record<string, Typecast>;
|
|
9
|
+
static fromAttributes(attributes: Record<string, unknown>): TrixAttachment;
|
|
10
|
+
/** @internal */
|
|
11
|
+
private static processAttributes;
|
|
12
|
+
/** @internal */
|
|
13
|
+
private static transformAttributeKeys;
|
|
14
|
+
/** @internal */
|
|
15
|
+
private static typecastAttributeValues;
|
|
16
|
+
readonly node: Html5Node;
|
|
17
|
+
/** @internal */
|
|
18
|
+
private _attributes?;
|
|
19
|
+
constructor(node: Html5Node);
|
|
20
|
+
get attributes(): Record<string, unknown>;
|
|
21
|
+
toHtml(): string;
|
|
22
|
+
toString(): string;
|
|
23
|
+
/** @internal */
|
|
24
|
+
private attachmentAttributes;
|
|
25
|
+
/** @internal */
|
|
26
|
+
private composedAttributes;
|
|
27
|
+
/** @internal */
|
|
28
|
+
private readJsonObjectAttribute;
|
|
29
|
+
/** @internal */
|
|
30
|
+
private readJsonAttribute;
|
|
31
|
+
}
|
|
32
|
+
export {};
|
|
33
|
+
//# sourceMappingURL=trix-attachment.d.ts.map
|
package/dist/version.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"version.js","sourceRoot":"","sources":["../lib/version.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE9C,MAAM,UAAU,OAAO;IACrB,OAAO,UAAU,EAAE,CAAC;AACtB,CAAC;AAED,UAAU,CAAC,OAAO,GAAG,OAAO,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,74 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blazetrails/actiontext",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"version": "0.1.0-alpha0.1",
|
|
4
|
+
"description": "Rich text content and editing for Trails, mirroring the actiontext gem",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"repository": {
|
|
7
|
+
"url": "git+https://github.com/blazetrailsdev/trails.git",
|
|
8
|
+
"directory": "packages/actiontext"
|
|
9
|
+
},
|
|
10
|
+
"homepage": "https://github.com/blazetrailsdev/trails/tree/main/packages/actiontext#readme",
|
|
11
|
+
"type": "module",
|
|
12
|
+
"main": "dist/index.js",
|
|
13
|
+
"types": "dist/types/index.d.ts",
|
|
14
|
+
"exports": {
|
|
15
|
+
".": {
|
|
16
|
+
"types": "./dist/types/index.d.ts",
|
|
17
|
+
"default": "./dist/index.js"
|
|
18
|
+
},
|
|
19
|
+
"./*.js": {
|
|
20
|
+
"types": "./dist/types/*.d.ts",
|
|
21
|
+
"default": "./dist/*.js"
|
|
22
|
+
},
|
|
23
|
+
"./*": {
|
|
24
|
+
"types": "./dist/types/*.d.ts",
|
|
25
|
+
"default": "./dist/*.js"
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
"files": [
|
|
29
|
+
"dist",
|
|
30
|
+
"app",
|
|
31
|
+
"!dist/**/*.d.ts.map"
|
|
32
|
+
],
|
|
33
|
+
"dependencies": {
|
|
34
|
+
"@blazetrails/actionpack": "0.1.0-alpha0.1",
|
|
35
|
+
"@blazetrails/actionview": "0.1.0-alpha0.1",
|
|
36
|
+
"@blazetrails/activemodel": "0.1.0-alpha0.1",
|
|
37
|
+
"@blazetrails/activerecord": "0.1.0-alpha0.1",
|
|
38
|
+
"@blazetrails/activestorage": "0.1.0-alpha0.1",
|
|
39
|
+
"@blazetrails/activesupport": "0.1.0-alpha0.1",
|
|
40
|
+
"@blazetrails/globalid": "0.1.0-alpha0.1",
|
|
41
|
+
"@blazetrails/html-sanitizer": "0.1.0-alpha0.1",
|
|
42
|
+
"@blazetrails/nokogiri": "0.1.0-alpha0.1",
|
|
43
|
+
"@blazetrails/rake": "0.1.0-alpha0.1",
|
|
44
|
+
"@blazetrails/ruby-compat": "0.1.0-alpha0.1",
|
|
45
|
+
"@blazetrails/thor": "0.1.0-alpha0.1",
|
|
46
|
+
"@blazetrails/trailties": "0.1.0-alpha0.1"
|
|
47
|
+
},
|
|
48
|
+
"engines": {
|
|
49
|
+
"node": ">=26"
|
|
50
|
+
},
|
|
51
|
+
"devDependencies": {
|
|
52
|
+
"@blazetrails/actionmailer": "0.1.0-alpha0.1",
|
|
53
|
+
"@blazetrails/activejob": "0.1.0-alpha0.1",
|
|
54
|
+
"@blazetrails/trails-tsc": "0.1.0-alpha0.1",
|
|
55
|
+
"@rails/actiontext": "8.0.200",
|
|
56
|
+
"playwright": "^1.60.0",
|
|
57
|
+
"trix": "2.1.19",
|
|
58
|
+
"vite": "^7.0.0"
|
|
59
|
+
},
|
|
60
|
+
"mirrors": [
|
|
61
|
+
{
|
|
62
|
+
"source": "rails",
|
|
63
|
+
"ref": "v8.0.5.2",
|
|
64
|
+
"sha": "235c597b100321b6bd2d62f8df63707f42b25b2d"
|
|
65
|
+
}
|
|
66
|
+
],
|
|
67
|
+
"publishConfig": {
|
|
68
|
+
"access": "public"
|
|
69
|
+
},
|
|
70
|
+
"scripts": {
|
|
71
|
+
"build": "tsc && pnpm build:templates",
|
|
72
|
+
"build:templates": "rm -rf dist/app/views dist/.trails && mkdir -p dist/app && cp -R app/views dist/app/ && trails-tsc-views build --views dist/app/views --in-place && cp -R lib/generators/action-text/install/templates dist/generators/action-text/install/ && cp -R lib/trails/generators/test-unit/install/templates dist/trails/generators/test-unit/install/ && trails-tsc-views build-templates dist/generators dist/trails/generators"
|
|
73
|
+
}
|
|
6
74
|
}
|
package/README.md
DELETED